waybetter/packages/shell/src/panel/make.css
CRT 1e853e8eff shell: the panel, createPanel(site) (moved from wayBetter for X)
packages/shell/src/panel (waybetter/shell/panel): an app's own tab. An app describes itself
(PanelSite: brand and the home page's words, its own sections and their order, its theme store,
catalog and the preview component a theme document is drawn in, Make's examples and docs, the
install controller, its languages, what its native side serves) and createPanel returns the
component for ShellSite.panel. It is in the shell package because it is drawn in the frame and
shares its stores, native bridge and language.

- Panel.tsx (header, settings search over every settings section, navigation, toasts; Accounts
  and Updates), nav.ts (which built-in sections an app gets: each shows only when the app serves
  what it needs; the app's sections in its order), Home.tsx (hero, highlights, About from the
  app's data), controls.tsx + panel.css.
- Appearance.tsx, ThemeBuilder.tsx + builderModel.ts + builder.css, fonts/ (FontBrowser, FontRoles,
  catalog, the offline Google Fonts list; scripts/google-fonts-catalog.mjs regenerates it):
  the theme documents are the runtime's, the store, catalog, accents, draft palette, file suffix
  and preview are the app's (PanelSite.themes).
- Plugins.tsx (the plugins list and custom CSS over the host's plugins_*/custom_css_*),
  StoreSection.tsx, MakePanel.tsx + makeModel.ts + MarkdownDoc.tsx + markdown.ts + make.css (the
  examples, the theme file and the docs are the app's), Settings.tsx (links and session over
  settings_get/set with `siteLinks`, keyword alerts, the media panel), FeatureToggles.tsx
  (useFeatures + FeatureGroups over features_get/set: the app names its flags and groups),
  PowerSettings.tsx (deck defaults from site.deck: its flags and presets; DeckPreset gets `name`
  and `hint`), BackupPanel.tsx + backup.css, DeveloperPanel.tsx, LanguageSettings.tsx, compare.ts.
- frame: language.ts (createLanguage: follow the site / the system / one language, i18n_set;
  moved from the app), appI18n.ts (createAppI18n: the app's typed i18n instance, useT, dates and
  numbers; the app passes React's useSyncExternalStore), formatDate in i18n.ts (ShellI18n.date).
- tests/panel.test.ts: every panel key has English and is used, sections per app, the builder
  model, the font catalog, plugin header rules, the UI kit demos, Markdown, compare.
- npm package: exports ./shell/panel, ./shell/panel/*, ./shell/panel/*.css; the build is
  scripts/build.mjs (the shell is compiled with the runtime sources it imports under one root and
  its imports are pointed at dist/runtime; stylesheets and the font list are copied).
2026-09-30 07:03:40 +00:00

72 lines
5.9 KiB
CSS

/* "Make" section: examples, UI kit gallery, theme API explorer, bundled docs. Panel tokens only. */
.bmk { display: flex; flex-direction: column; gap: 4px; }
.bmk-intro { margin: 0 2px 14px; color: var(--c-text-2); }
.bmk-intro p { margin: 0 0 10px; max-width: 70ch; line-height: 1.55; }
.bmk-muted, .bmk-intro .bmk-muted { color: var(--c-muted); font-size: 12px; }
.bmk-commands { display: grid; gap: 6px; margin: 0 0 10px; padding: 0; list-style: none; }
.bmk-commands li { display: grid; grid-template-columns: minmax(120px, 190px) 1fr auto; align-items: center; gap: 10px; padding-block: 6px; padding-inline: 12px 6px; border: 1px solid var(--c-line-soft); border-radius: 10px; background: var(--c-card); }
.bmk-commands li > span { color: var(--c-muted); font-size: 12px; }
.bmk-commands li > code { overflow-x: auto; white-space: nowrap; background: transparent; border: 0; padding: 0; color: var(--c-text); scrollbar-width: none; }
@container panel (max-width: 560px) { .bmk-commands li { grid-template-columns: 1fr auto; } .bmk-commands li > span { grid-column: 1 / -1; } }
.bmk-tabs { margin: 0 2px 16px; }
.bmk-doc-link { display: inline; padding: 0; border: 0; background: none; color: var(--c-accent); font: inherit; cursor: pointer; text-decoration: underline; text-decoration-color: rgb(var(--c-accent-rgb) / .35); text-underline-offset: 2px; }
.bmk-doc-link:hover { text-decoration-color: currentColor; }
/* Example picker + editor */
.bmk-examples { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; padding: 10px; }
.bmk-example { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border: 1px solid var(--c-line-soft); border-radius: 10px; background: var(--c-field); text-align: start; cursor: pointer; transition: border-color .15s, background-color .15s; }
.bmk-example strong { font-size: 12.5px; font-weight: 620; }
.bmk-example span { color: var(--c-muted); font-size: 11.5px; line-height: 1.45; }
.bmk-example:hover { border-color: var(--c-line-strong); }
.bmk-example.is-on { border-color: rgb(var(--c-accent-rgb) / .6); background: var(--c-accent-soft); }
.bmk-editor textarea { min-height: 260px; }
.bmk-editor .bt-code-bar { flex-wrap: wrap; }
.bmk-file { display: flex; align-items: center; gap: 8px; margin-inline-end: auto; color: var(--c-faint); font-size: 11.5px; }
.bmk-file .bt-input { width: 220px; height: 28px; padding: 0 8px; font: 12px var(--f-mono); }
.bmk-file .bt-input[aria-invalid='true'] { border-color: var(--c-danger); }
.bmk-warnings { margin: 0; padding-block: 10px; padding-inline: 30px 14px; border-top: 1px solid var(--c-line-soft); color: var(--c-warn); font-size: 12px; }
.bmk-steps { margin: 0; padding-block: 12px 14px; padding-inline: 34px 16px; border-top: 1px solid var(--c-line-soft); color: var(--c-text-2); font-size: 12px; line-height: 1.6; }
/* UI kit gallery */
.bmk-kit { display: grid; }
.bmk-kit-row { display: grid; grid-template-columns: 140px 1fr; align-items: center; gap: 12px; padding: 9px 12px; }
.bmk-kit-row + .bmk-kit-row { border-top: 1px solid var(--c-line-soft); }
.bmk-kit-row .bt-btn { justify-content: center; }
.bmk-kit-code { overflow-x: auto; white-space: nowrap; scrollbar-width: thin; }
.bmk-kit-result { grid-column: 2; color: var(--c-ok); font: 11.5px var(--f-mono); }
@container panel (max-width: 520px) { .bmk-kit-row { grid-template-columns: 1fr; } .bmk-kit-result { grid-column: 1; } }
/* Theme explorer */
.bmk-facts { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 12px 14px; color: var(--c-text-2); font: 11.5px var(--f-mono); }
.bmk-facts b { color: var(--c-muted); font-weight: 500; margin-inline-end: 4px; }
.bmk-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 6px; padding: 0 10px 12px; }
.bmk-swatch { display: flex; align-items: center; gap: 10px; padding: 7px 9px; border: 1px solid var(--c-line-soft); border-radius: 10px; background: var(--c-field); text-align: start; cursor: copy; }
.bmk-swatch:hover { border-color: var(--c-line-strong); }
.bmk-chip { flex: 0 0 30px; height: 30px; border-radius: 8px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12), 0 0 0 1px rgba(0, 0, 0, .25); }
.bmk-swatch-text { display: flex; flex-direction: column; min-width: 0; }
.bmk-swatch-text b { font-size: 12px; font-weight: 600; }
.bmk-swatch-text code { align-self: flex-start; margin: 2px 0; }
.bmk-swatch-text small { color: var(--c-muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bmk-fonts { display: grid; }
.bmk-font { display: grid; gap: 4px; padding: 10px 14px; border-bottom: 1px solid var(--c-line-soft); }
.bmk-font > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.bmk-font b { font-size: 12px; }
.bmk-font p { margin: 0; font-size: 17px; color: var(--c-text); }
.bmk-pre { margin: 10px; max-height: 320px; overflow: auto; }
.bmk-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 0 10px 12px; }
/* Bundled docs */
.bmk-docs .bmk-actions { padding: 0 2px 12px; }
.bmk-doc { max-width: 78ch; color: var(--c-text-2); line-height: 1.6; }
.bmk-doc h2, .bmk-doc h3, .bmk-doc h4, .bmk-doc h5 { margin: 22px 0 8px; color: var(--c-text); letter-spacing: -.01em; scroll-margin-top: 12px; }
.bmk-doc h2 { font-size: 18px; margin-top: 4px; }
.bmk-doc h3 { font-size: 14.5px; }
.bmk-doc h4, .bmk-doc h5 { font-size: 13px; }
.bmk-doc p, .bmk-doc ul, .bmk-doc ol { margin: 0 0 10px; }
.bmk-doc ul, .bmk-doc ol { padding-inline-start: 20px; }
.bmk-doc li + li { margin-top: 4px; }
.bmk-doc .bt-snippet { margin: 8px 0 14px; }
.bmk-doc-table { overflow-x: auto; margin: 6px 0 14px; border: 1px solid var(--c-line-soft); border-radius: 10px; }
.bmk-doc table { width: 100%; border-collapse: collapse; font-size: 12px; }
.bmk-doc th, .bmk-doc td { padding: 7px 10px; text-align: start; vertical-align: top; border-top: 1px solid var(--c-line-soft); }
.bmk-doc th { border-top: 0; background: var(--c-chrome); color: var(--c-text); font-weight: 600; }