@adea-ai/ui 0.154.1 → 0.155.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/composites/appearance-editor/appearance-editor.d.ts.map +1 -1
- package/dist/components/composites/appearance-editor/appearance-editor.js +23 -1
- package/dist/components/composites/appearance-editor/appearance-editor.js.map +1 -1
- package/dist/components/composites/appearance-editor/appearance-rows.d.ts +10 -2
- package/dist/components/composites/appearance-editor/appearance-rows.d.ts.map +1 -1
- package/dist/components/composites/appearance-editor/appearance-rows.js +35 -7
- package/dist/components/composites/appearance-editor/appearance-rows.js.map +1 -1
- package/dist/components/composites/appearance-editor/appearance-types.d.ts +6 -0
- package/dist/components/composites/appearance-editor/appearance-types.d.ts.map +1 -1
- package/dist/components/composites/tree/index.d.ts +1 -1
- package/dist/components/composites/tree/index.d.ts.map +1 -1
- package/dist/components/composites/tree/index.js +1 -1
- package/dist/components/composites/tree/tree.d.ts +31 -1
- package/dist/components/composites/tree/tree.d.ts.map +1 -1
- package/dist/components/composites/tree/tree.js +76 -1
- package/dist/components/composites/tree/tree.js.map +1 -1
- package/dist/components/theme/theme-document.d.ts +14 -1
- package/dist/components/theme/theme-document.d.ts.map +1 -1
- package/dist/components/theme/theme-document.js +19 -2
- package/dist/components/theme/theme-document.js.map +1 -1
- package/dist/components/theme/theme-persistence.d.ts.map +1 -1
- package/dist/components/theme/theme-persistence.js +1 -0
- package/dist/components/theme/theme-persistence.js.map +1 -1
- package/dist/components/theme/theme-provider-value.d.ts.map +1 -1
- package/dist/components/theme/theme-provider-value.js +2 -1
- package/dist/components/theme/theme-provider-value.js.map +1 -1
- package/dist/components/theme/theme-state.d.ts +20 -0
- package/dist/components/theme/theme-state.d.ts.map +1 -1
- package/dist/components/theme/theme-state.js +9 -1
- package/dist/components/theme/theme-state.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/lib/theme-engine.d.ts +2 -1
- package/dist/lib/theme-engine.d.ts.map +1 -1
- package/dist/lib/theme-engine.js +2 -1
- package/dist/lib/theme-engine.js.map +1 -1
- package/dist/r/src/components/composites/appearance-editor/appearance-editor.tsx +11 -1
- package/dist/r/src/components/composites/appearance-editor/appearance-rows.tsx +27 -6
- package/dist/r/src/components/composites/appearance-editor/appearance-types.ts +6 -0
- package/dist/r/src/components/composites/tree/index.ts +3 -0
- package/dist/r/src/components/composites/tree/tree.tsx +82 -0
- package/dist/r/src/components/theme/theme-document.ts +36 -1
- package/dist/r/src/components/theme/theme-persistence.ts +4 -0
- package/dist/r/src/components/theme/theme-provider-value.ts +2 -0
- package/dist/r/src/components/theme/theme-state.ts +26 -0
- package/dist/r/src/lib/theme-engine.ts +3 -2
- package/package.json +1 -1
- package/src/components/composites/appearance-editor/appearance-editor.tsx +11 -1
- package/src/components/composites/appearance-editor/appearance-rows.tsx +27 -6
- package/src/components/composites/appearance-editor/appearance-types.ts +6 -0
- package/src/components/composites/tree/index.ts +3 -0
- package/src/components/composites/tree/tree.tsx +82 -0
- package/src/components/theme/theme-document.ts +36 -1
- package/src/components/theme/theme-persistence.ts +4 -0
- package/src/components/theme/theme-provider-value.ts +2 -0
- package/src/components/theme/theme-state.ts +26 -0
- package/src/lib/theme-engine.ts +3 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appearance-editor.d.ts","sourceRoot":"","sources":["../../../../src/components/composites/appearance-editor/appearance-editor.tsx"],"names":[],"mappings":"AA2DA,OAAO,KAAK,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAA;AAWvF;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,
|
|
1
|
+
{"version":3,"file":"appearance-editor.d.ts","sourceRoot":"","sources":["../../../../src/components/composites/appearance-editor/appearance-editor.tsx"],"names":[],"mappings":"AA2DA,OAAO,KAAK,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAA;AAWvF;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,kCA6K5D;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,qBAAqB,kCA+CnE;AAED;;4EAE4E;AAC5E,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,kCAsC9D"}
|
|
@@ -8,7 +8,7 @@ import "../../../lib/theme-defaults.js";
|
|
|
8
8
|
import { Switch as Switch$1 } from "../../ui/switch/switch.js";
|
|
9
9
|
import { Sheet, SheetBody, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger } from "../../ui/sheet/sheet.js";
|
|
10
10
|
import { AccentChoices, GlassChoices, ModeChoices, isCustomAccent } from "./appearance-choices.js";
|
|
11
|
-
import { SettingsRow, TerminalRow, ThemeRow } from "./appearance-rows.js";
|
|
11
|
+
import { CodeRow, SettingsRow, TerminalRow, ThemeRow } from "./appearance-rows.js";
|
|
12
12
|
import { fastIcon } from "../../../lib/fast-icon.js";
|
|
13
13
|
import { className, createComponent, effect, insert, memo, mergeProps, setAttribute, template } from "solid-js/web";
|
|
14
14
|
import { EyeOff, Palette, PanelsTopLeft, SlidersHorizontal } from "lucide-solid";
|
|
@@ -113,6 +113,28 @@ function AppearanceEditor(props) {
|
|
|
113
113
|
});
|
|
114
114
|
}
|
|
115
115
|
}), null);
|
|
116
|
+
insert(_el$2, createComponent(Show, {
|
|
117
|
+
get when() {
|
|
118
|
+
return props.draft.codeThemeId !== void 0;
|
|
119
|
+
},
|
|
120
|
+
get children() {
|
|
121
|
+
return createComponent(CodeRow, {
|
|
122
|
+
get selectedId() {
|
|
123
|
+
return props.draft.codeThemeId ?? "theme";
|
|
124
|
+
},
|
|
125
|
+
get preview() {
|
|
126
|
+
return memo(() => props.resolvedAppearance === "dark")() ? props.darkTheme : props.lightTheme;
|
|
127
|
+
},
|
|
128
|
+
get themes() {
|
|
129
|
+
return props.themes;
|
|
130
|
+
},
|
|
131
|
+
get disabled() {
|
|
132
|
+
return props.saving;
|
|
133
|
+
},
|
|
134
|
+
onSelect: (codeThemeId) => props.onChange({ codeThemeId })
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
}), null);
|
|
116
138
|
insert(_el$2, createComponent(SettingsRow, {
|
|
117
139
|
title: "Accent",
|
|
118
140
|
get icon() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appearance-editor.js","names":["EyeOff","LucideEyeOff","Palette","LucidePalette","PanelsTopLeft","LucidePanelsTopLeft","SlidersHorizontal","LucideSlidersHorizontal","Show","createSignal","createUniqueId","cn","ActionButton","Button","Input","AppearanceFontSettingsGroup","DEFAULT_APPEARANCE_EDITOR_FONT_SETTINGS","Switch","Sheet","SheetBody","SheetContent","SheetDescription","SheetFooter","SheetHeader","SheetTitle","SheetTrigger","ModeChoices","AccentChoices","GlassChoices","isCustomAccent","SettingsRow","TerminalRow","ThemeRow","fastIcon","AppearanceEditor","props","errorId","custom","accentDescription","draft","accent","preset","accentOptions","find","option","id","label","offered","themeAccentOptions","toLowerCase","glassDescription","surface","surfaceCapability","themeDefaultDescription","_el$","_tmpl$4","_el$2","firstChild","_$insert","_$createComponent","when","recoveryNotice","children","recoveryNoticeSlot","_el$7","_tmpl$5","appearance","selectedId","lightThemeId","preview","lightTheme","themes","disabled","saving","onSelect","onChange","darkThemeId","darkTheme","terminalThemeId","undefined","_$memo","resolvedAppearance","title","icon","description","_el$3","_tmpl$","_el$4","_$setAttribute","value","customAccentError","onInput","event","currentTarget","customAccentErrorSlot","_el$8","_tmpl$6","fontSettingsPlacement","settings","fonts","menuPortalMount","frosted","reason","_el$5","_tmpl$2","checked","reduceTransparency","onManageThemes","type","size","variant","onClick","extraRows","hideActions","_el$6","_tmpl$3","AppearanceEditorActions","_$effect","_$className","class","saveReasonId","_el$9","_tmpl$7","_el$0","_el$1","saveDisabledReason","saveDisabledReasonSlot","_el$10","_tmpl$8","onReset","onCancel","onSave","AppearancePopover","setMenuPortalMount","open","onOpenChange","onOpen","onDismiss","as","triggerVariant","tooltip","tooltipIcon","side","closeLabel","ref","_$mergeProps"],"sources":["../../../../src/components/composites/appearance-editor/appearance-editor.tsx"],"sourcesContent":["/*\n * MIT License\n *\n * Copyright (c) 2026 Wing\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n/*\n * Composition substantially translated from Zeron settings/appearance.rs and\n * settings/widgets.rs, pinned at 30a9a9537c5ec96226c87f4bf349b6f77c5dfb59,\n * preserving Adea's existing appearance-surface.tsx port: System/Light/Dark\n * miniatures, compact independent theme rows, accent swatches and helper copy,\n * glass chips, and theme library affordance. Kobalte replaces the port's manual\n * radio keyboard model. The controlled draft and explicit action ports replace\n * GPUI globals and app-specific storage/native authority. Save/Cancel/Reset and\n * custom accent/reduced-transparency are accepted Adea divergences (#425).\n */\nimport {\n EyeOff as LucideEyeOff,\n Palette as LucidePalette,\n PanelsTopLeft as LucidePanelsTopLeft,\n SlidersHorizontal as LucideSlidersHorizontal,\n} from 'lucide-solid'\nimport { Show, createSignal, createUniqueId } from 'solid-js'\nimport { cn } from '#lib/utils'\nimport { ActionButton } from '../action-button'\nimport { Button } from '../../ui/button'\nimport { Input } from '../../ui/input'\nimport { AppearanceFontSettingsGroup } from './font-settings-group'\nimport { DEFAULT_APPEARANCE_EDITOR_FONT_SETTINGS } from '#lib/appearance-font-settings'\nimport { THEME_DEFAULT_ID } from '#lib/theme-defaults'\n\nimport { Switch } from '../../ui/switch'\nimport {\n Sheet,\n SheetBody,\n SheetContent,\n SheetDescription,\n SheetFooter,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from '../../ui/sheet'\nimport type { AppearanceEditorProps, AppearancePopoverProps } from './appearance-types'\nimport { ModeChoices, AccentChoices, GlassChoices, isCustomAccent } from './appearance-choices'\nimport { SettingsRow, TerminalRow, ThemeRow } from './appearance-rows'\nimport { fastIcon } from '#lib/fast-icon'\n\n// lucide icons drawn from a cloned template (see fastIcon).\nconst EyeOff = fastIcon(LucideEyeOff)\nconst Palette = fastIcon(LucidePalette)\nconst PanelsTopLeft = fastIcon(LucidePanelsTopLeft)\nconst SlidersHorizontal = fastIcon(LucideSlidersHorizontal)\n\n/**\n * A live editor whose persistence and preview authority belong to its host.\n * No ThemeProvider is required, and no catalogue, renderer engine or storage is\n * imported. Hosts normalize unknown IDs and custom colors, report recovery,\n * snapshot on open, preview on changes, commit on Save, and restore on dismissal.\n * Both theme rows remain mounted when mode changes. Density remains outside the\n * accepted appearance surface; typeface settings are shared and host-persisted.\n */\nexport function AppearanceEditor(props: AppearanceEditorProps) {\n const errorId = createUniqueId()\n const custom = () => isCustomAccent(props)\n const accentDescription = () => {\n if (props.draft.accent === THEME_DEFAULT_ID)\n return \"Theme default · Uses the palette's intended color.\"\n const preset = props.accentOptions.find((option) => option.id === props.draft.accent)\n if (preset) return `${preset.label} · Controls, selections and code.`\n if (custom()) return 'Custom · Controls, selections and code.'\n const offered = props.themeAccentOptions?.find((option) => option.id === props.draft.accent)\n // A stored theme accent survives a theme switch by id; when the new pair\n // cannot offer that slot the host falls back to the theme's own primary,\n // and the description says so rather than naming a colour not on screen.\n return offered\n ? `Theme ${offered.label.toLowerCase()} · The theme’s own color.`\n : 'Theme default · This theme has no such accent.'\n }\n const glassDescription = () =>\n props.draft.surface === 'opaque'\n ? 'Solid surfaces for every theme.'\n : props.draft.surface === 'frosted'\n ? 'Theme-colored glass where supported.'\n : (props.surfaceCapability.themeDefaultDescription ?? \"Uses this theme's default surface.\")\n return (\n <div data-appearance-editor class={cn('min-w-0', props.class)}>\n <Show when={props.recoveryNotice}>\n {(recoveryNoticeSlot) => (\n <p role=\"status\" class=\"px-4 py-2 text-sm text-muted-foreground\">\n {recoveryNoticeSlot()}\n </p>\n )}\n </Show>\n <ModeChoices {...props} />\n <div class=\"divide-y divide-border rounded-lg border\">\n <ThemeRow\n appearance=\"light\"\n selectedId={props.draft.lightThemeId}\n preview={props.lightTheme}\n themes={props.themes}\n disabled={props.saving}\n onSelect={(lightThemeId) => props.onChange({ lightThemeId })}\n />\n <ThemeRow\n appearance=\"dark\"\n selectedId={props.draft.darkThemeId}\n preview={props.darkTheme}\n themes={props.themes}\n disabled={props.saving}\n onSelect={(darkThemeId) => props.onChange({ darkThemeId })}\n />\n {/* The row exists only when the host carries a terminal preference:\n the draft field is the show/hide switch, so the editor can never\n render a terminal row that writes nothing. */}\n <Show when={props.draft.terminalThemeId !== undefined}>\n <TerminalRow\n selectedId={props.draft.terminalThemeId ?? THEME_DEFAULT_ID}\n preview={props.resolvedAppearance === 'dark' ? props.darkTheme : props.lightTheme}\n themes={props.themes}\n disabled={props.saving}\n onSelect={(terminalThemeId) => props.onChange({ terminalThemeId })}\n />\n </Show>\n <SettingsRow title=\"Accent\" icon={<SlidersHorizontal />} description={accentDescription()}>\n <AccentChoices {...props} />\n </SettingsRow>\n <Show when={custom()}>\n <div class=\"px-4 py-3\">\n <label class=\"mb-2 block text-xs font-medium\" for={`${errorId}-input`}>\n Custom accent\n </label>\n <Input\n id={`${errorId}-input`}\n value={props.draft.accent}\n disabled={props.saving}\n aria-invalid={!!props.customAccentError}\n aria-describedby={props.customAccentError ? errorId : undefined}\n onInput={(event) => props.onChange({ accent: event.currentTarget.value })}\n />\n <Show when={props.customAccentError}>\n {(customAccentErrorSlot) => (\n <p id={errorId} role=\"alert\" class=\"mt-1 text-xs text-foreground\">\n {customAccentErrorSlot()}\n </p>\n )}\n </Show>\n </div>\n </Show>\n {/* Inline, the typefaces read as one more palette choice; `end` hands\n the closing slot to them for hosts whose order is palette and\n surface first, text last. */}\n <Show when={props.fontSettingsPlacement !== 'end'}>\n <AppearanceFontSettingsGroup\n settings={props.draft.fonts ?? DEFAULT_APPEARANCE_EDITOR_FONT_SETTINGS}\n menuPortalMount={props.menuPortalMount}\n disabled={props.saving}\n onChange={(fonts) => props.onChange({ fonts })}\n />\n </Show>\n <SettingsRow title=\"Glass\" icon={<PanelsTopLeft />} description={glassDescription()}>\n <GlassChoices {...props} />\n </SettingsRow>\n <Show when={!props.surfaceCapability.frosted && props.surfaceCapability.reason}>\n <p role=\"status\" class=\"px-4 py-2 text-xs text-muted-foreground\">\n {props.surfaceCapability.reason}\n </p>\n </Show>\n <SettingsRow\n title=\"Reduce transparency\"\n icon={<EyeOff />}\n description=\"Prefer solid surfaces, including during live preview.\"\n >\n <Switch\n checked={props.draft.reduceTransparency}\n disabled={props.saving}\n onChange={(reduceTransparency: boolean) => props.onChange({ reduceTransparency })}\n aria-label=\"Reduce transparency\"\n />\n </SettingsRow>\n <SettingsRow\n title=\"Theme library\"\n icon={<Palette />}\n description={\n props.onManageThemes\n ? 'Manage themes through the application.'\n : 'Theme import is unavailable.'\n }\n >\n <Button\n type=\"button\"\n size=\"sm\"\n variant=\"outline\"\n disabled={!props.onManageThemes || props.saving}\n onClick={() => props.onManageThemes?.()}\n >\n Manage themes\n </Button>\n </SettingsRow>\n <Show when={props.fontSettingsPlacement === 'end'}>\n <AppearanceFontSettingsGroup\n settings={props.draft.fonts ?? DEFAULT_APPEARANCE_EDITOR_FONT_SETTINGS}\n menuPortalMount={props.menuPortalMount}\n disabled={props.saving}\n onChange={(fonts) => props.onChange({ fonts })}\n />\n </Show>\n {props.extraRows}\n </div>\n <Show when={!props.hideActions}>\n {/* Sticky so Save/Cancel stay reachable in a tall scroll container: the\n editor scrolls with its host panel, and actions parked at the bottom\n of a long form were unreachable without scrolling past every row. The\n bar is a band on the subtle-fill rung, like a sheet footer. It bleeds\n through the host panel's padding (`--settings-panel-padding`, set by\n SettingsLayout) so it sits flush with the panel's bottom and side\n edges with no strip of page under it; a sticky offset is measured\n inside a scroll container's padding, so `bottom` is pulled out by the\n same amount. */}\n <div class=\"sticky bottom-[calc(var(--settings-panel-padding,0px)*-1)] z-10 -mx-(--settings-panel-padding) -mb-(--settings-panel-padding) mt-4 border-t bg-muted px-4 py-3\">\n <AppearanceEditorActions {...props} />\n </div>\n </Show>\n </div>\n )\n}\n\n/**\n * Reset, Cancel and Save, with the reason Save is unavailable. Rendered by the\n * editor itself, or — with `hideActions` — by a host that pins them in its own\n * footer, as `AppearancePopover` does.\n */\nexport function AppearanceEditorActions(props: AppearanceEditorProps) {\n const saveReasonId = createUniqueId()\n return (\n <div class=\"flex w-full flex-col gap-2\">\n <Show when={props.saveDisabledReason}>\n {(saveDisabledReasonSlot) => (\n <p id={saveReasonId} role=\"status\" class=\"text-xs text-muted-foreground\">\n {saveDisabledReasonSlot()}\n </p>\n )}\n </Show>\n {/* `global-appearance-editor-actions` lets these buttons grow with the UI\n font preference, like the rest of Appearance's own controls. */}\n <div class=\"global-appearance-editor-actions flex flex-wrap items-center gap-2\">\n <Button\n type=\"button\"\n size=\"sm\"\n variant=\"ghost\"\n disabled={props.saving}\n onClick={() => props.onReset()}\n >\n Reset\n </Button>\n <div class=\"ml-auto flex gap-2\">\n <Button\n type=\"button\"\n size=\"sm\"\n variant=\"outline\"\n disabled={props.saving}\n onClick={() => props.onCancel()}\n >\n Cancel\n </Button>\n <Button\n type=\"button\"\n size=\"sm\"\n disabled={props.saving || !!props.customAccentError || !!props.saveDisabledReason}\n aria-busy={props.saving}\n aria-describedby={props.saveDisabledReason ? saveReasonId : undefined}\n onClick={() => props.onSave()}\n >\n {props.saving ? 'Saving…' : 'Save'}\n </Button>\n </div>\n </div>\n </div>\n )\n}\n\n/** The editor in an inset Sheet docked beside the main view: the body scrolls and\n * Reset/Cancel/Save sit in the panel's full-width footer, always reachable.\n * Dismissal (Escape, the close button, an outside click) is `onDismiss`. */\nexport function AppearancePopover(props: AppearancePopoverProps) {\n const [menuPortalMount, setMenuPortalMount] = createSignal<HTMLElement>()\n\n return (\n <Sheet open={props.open} onOpenChange={(open) => (open ? props.onOpen() : props.onDismiss())}>\n {/* The trigger is an icon-only action, so it explains itself through the\n shared ActionButton's tooltip (keyboard focus included) rather than a\n bare aria-label. `toolbar` also holds the pressed rung while Kobalte\n marks the trigger `data-expanded`, and repeats the glyph in the\n tooltip like the other toolbar actions. */}\n <SheetTrigger\n as={ActionButton}\n variant={props.triggerVariant === 'toolbar' ? 'toolbar' : 'ghost'}\n size=\"icon-sm\"\n tooltip=\"Open appearance settings\"\n tooltipIcon={\n props.triggerVariant === 'toolbar' ? <Palette aria-hidden=\"true\" /> : undefined\n }\n aria-label=\"Appearance settings\"\n >\n <Palette />\n </SheetTrigger>\n <SheetContent side=\"end\" closeLabel=\"Close appearance settings\" ref={setMenuPortalMount}>\n <SheetHeader>\n <SheetTitle>Appearance</SheetTitle>\n <SheetDescription>\n Changes preview immediately. Save keeps them; Cancel restores the previous appearance.\n </SheetDescription>\n </SheetHeader>\n <SheetBody>\n <AppearanceEditor {...props} menuPortalMount={menuPortalMount()} hideActions />\n </SheetBody>\n <SheetFooter>\n <AppearanceEditorActions {...props} />\n </SheetFooter>\n </SheetContent>\n </Sheet>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAiEA,IAAMA,WAASiC,SAAShC,MAAY;AACpC,IAAMC,YAAU+B,SAAS9B,OAAa;AACtC,IAAMC,kBAA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":["EyeOff","LucideEyeOff","Palette","LucidePalette","PanelsTopLeft","LucidePanelsTopLeft","SlidersHorizontal","LucideSlidersHorizontal","Show","createSignal","createUniqueId","cn","ActionButton","Button","Input","AppearanceFontSettingsGroup","DEFAULT_APPEARANCE_EDITOR_FONT_SETTINGS","Switch","Sheet","SheetBody","SheetContent","SheetDescription","SheetFooter","SheetHeader","SheetTitle","SheetTrigger","ModeChoices","AccentChoices","GlassChoices","isCustomAccent","CodeRow","SettingsRow","TerminalRow","ThemeRow","fastIcon","AppearanceEditor","props","errorId","custom","accentDescription","draft","accent","preset","accentOptions","find","option","id","label","offered","themeAccentOptions","toLowerCase","glassDescription","surface","surfaceCapability","themeDefaultDescription","_el$","_tmpl$4","_el$2","firstChild","_$insert","_$createComponent","when","recoveryNotice","children","recoveryNoticeSlot","_el$7","_tmpl$5","appearance","selectedId","lightThemeId","preview","lightTheme","themes","disabled","saving","onSelect","onChange","darkThemeId","darkTheme","terminalThemeId","undefined","_$memo","resolvedAppearance","codeThemeId","title","icon","description","_el$3","_tmpl$","_el$4","_$setAttribute","value","customAccentError","onInput","event","currentTarget","customAccentErrorSlot","_el$8","_tmpl$6","fontSettingsPlacement","settings","fonts","menuPortalMount","frosted","reason","_el$5","_tmpl$2","checked","reduceTransparency","onManageThemes","type","size","variant","onClick","extraRows","hideActions","_el$6","_tmpl$3","AppearanceEditorActions","_$effect","_$className","class","saveReasonId","_el$9","_tmpl$7","_el$0","_el$1","saveDisabledReason","saveDisabledReasonSlot","_el$10","_tmpl$8","onReset","onCancel","onSave","AppearancePopover","setMenuPortalMount","open","onOpenChange","onOpen","onDismiss","as","triggerVariant","tooltip","tooltipIcon","side","closeLabel","ref","_$mergeProps"],"sources":["../../../../src/components/composites/appearance-editor/appearance-editor.tsx"],"sourcesContent":["/*\n * MIT License\n *\n * Copyright (c) 2026 Wing\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n/*\n * Composition substantially translated from Zeron settings/appearance.rs and\n * settings/widgets.rs, pinned at 30a9a9537c5ec96226c87f4bf349b6f77c5dfb59,\n * preserving Adea's existing appearance-surface.tsx port: System/Light/Dark\n * miniatures, compact independent theme rows, accent swatches and helper copy,\n * glass chips, and theme library affordance. Kobalte replaces the port's manual\n * radio keyboard model. The controlled draft and explicit action ports replace\n * GPUI globals and app-specific storage/native authority. Save/Cancel/Reset and\n * custom accent/reduced-transparency are accepted Adea divergences (#425).\n */\nimport {\n EyeOff as LucideEyeOff,\n Palette as LucidePalette,\n PanelsTopLeft as LucidePanelsTopLeft,\n SlidersHorizontal as LucideSlidersHorizontal,\n} from 'lucide-solid'\nimport { Show, createSignal, createUniqueId } from 'solid-js'\nimport { cn } from '#lib/utils'\nimport { ActionButton } from '../action-button'\nimport { Button } from '../../ui/button'\nimport { Input } from '../../ui/input'\nimport { AppearanceFontSettingsGroup } from './font-settings-group'\nimport { DEFAULT_APPEARANCE_EDITOR_FONT_SETTINGS } from '#lib/appearance-font-settings'\nimport { THEME_DEFAULT_ID } from '#lib/theme-defaults'\n\nimport { Switch } from '../../ui/switch'\nimport {\n Sheet,\n SheetBody,\n SheetContent,\n SheetDescription,\n SheetFooter,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from '../../ui/sheet'\nimport type { AppearanceEditorProps, AppearancePopoverProps } from './appearance-types'\nimport { ModeChoices, AccentChoices, GlassChoices, isCustomAccent } from './appearance-choices'\nimport { CodeRow, SettingsRow, TerminalRow, ThemeRow } from './appearance-rows'\nimport { fastIcon } from '#lib/fast-icon'\n\n// lucide icons drawn from a cloned template (see fastIcon).\nconst EyeOff = fastIcon(LucideEyeOff)\nconst Palette = fastIcon(LucidePalette)\nconst PanelsTopLeft = fastIcon(LucidePanelsTopLeft)\nconst SlidersHorizontal = fastIcon(LucideSlidersHorizontal)\n\n/**\n * A live editor whose persistence and preview authority belong to its host.\n * No ThemeProvider is required, and no catalogue, renderer engine or storage is\n * imported. Hosts normalize unknown IDs and custom colors, report recovery,\n * snapshot on open, preview on changes, commit on Save, and restore on dismissal.\n * Both theme rows remain mounted when mode changes. Density remains outside the\n * accepted appearance surface; typeface settings are shared and host-persisted.\n */\nexport function AppearanceEditor(props: AppearanceEditorProps) {\n const errorId = createUniqueId()\n const custom = () => isCustomAccent(props)\n const accentDescription = () => {\n if (props.draft.accent === THEME_DEFAULT_ID)\n return \"Theme default · Uses the palette's intended color.\"\n const preset = props.accentOptions.find((option) => option.id === props.draft.accent)\n if (preset) return `${preset.label} · Controls, selections and code.`\n if (custom()) return 'Custom · Controls, selections and code.'\n const offered = props.themeAccentOptions?.find((option) => option.id === props.draft.accent)\n // A stored theme accent survives a theme switch by id; when the new pair\n // cannot offer that slot the host falls back to the theme's own primary,\n // and the description says so rather than naming a colour not on screen.\n return offered\n ? `Theme ${offered.label.toLowerCase()} · The theme’s own color.`\n : 'Theme default · This theme has no such accent.'\n }\n const glassDescription = () =>\n props.draft.surface === 'opaque'\n ? 'Solid surfaces for every theme.'\n : props.draft.surface === 'frosted'\n ? 'Theme-colored glass where supported.'\n : (props.surfaceCapability.themeDefaultDescription ?? \"Uses this theme's default surface.\")\n return (\n <div data-appearance-editor class={cn('min-w-0', props.class)}>\n <Show when={props.recoveryNotice}>\n {(recoveryNoticeSlot) => (\n <p role=\"status\" class=\"px-4 py-2 text-sm text-muted-foreground\">\n {recoveryNoticeSlot()}\n </p>\n )}\n </Show>\n <ModeChoices {...props} />\n <div class=\"divide-y divide-border rounded-lg border\">\n <ThemeRow\n appearance=\"light\"\n selectedId={props.draft.lightThemeId}\n preview={props.lightTheme}\n themes={props.themes}\n disabled={props.saving}\n onSelect={(lightThemeId) => props.onChange({ lightThemeId })}\n />\n <ThemeRow\n appearance=\"dark\"\n selectedId={props.draft.darkThemeId}\n preview={props.darkTheme}\n themes={props.themes}\n disabled={props.saving}\n onSelect={(darkThemeId) => props.onChange({ darkThemeId })}\n />\n {/* The row exists only when the host carries a terminal preference:\n the draft field is the show/hide switch, so the editor can never\n render a terminal row that writes nothing. */}\n <Show when={props.draft.terminalThemeId !== undefined}>\n <TerminalRow\n selectedId={props.draft.terminalThemeId ?? THEME_DEFAULT_ID}\n preview={props.resolvedAppearance === 'dark' ? props.darkTheme : props.lightTheme}\n themes={props.themes}\n disabled={props.saving}\n onSelect={(terminalThemeId) => props.onChange({ terminalThemeId })}\n />\n </Show>\n {/* The same switch for code: the row exists only when the host stores it. */}\n <Show when={props.draft.codeThemeId !== undefined}>\n <CodeRow\n selectedId={props.draft.codeThemeId ?? THEME_DEFAULT_ID}\n preview={props.resolvedAppearance === 'dark' ? props.darkTheme : props.lightTheme}\n themes={props.themes}\n disabled={props.saving}\n onSelect={(codeThemeId) => props.onChange({ codeThemeId })}\n />\n </Show>\n <SettingsRow title=\"Accent\" icon={<SlidersHorizontal />} description={accentDescription()}>\n <AccentChoices {...props} />\n </SettingsRow>\n <Show when={custom()}>\n <div class=\"px-4 py-3\">\n <label class=\"mb-2 block text-xs font-medium\" for={`${errorId}-input`}>\n Custom accent\n </label>\n <Input\n id={`${errorId}-input`}\n value={props.draft.accent}\n disabled={props.saving}\n aria-invalid={!!props.customAccentError}\n aria-describedby={props.customAccentError ? errorId : undefined}\n onInput={(event) => props.onChange({ accent: event.currentTarget.value })}\n />\n <Show when={props.customAccentError}>\n {(customAccentErrorSlot) => (\n <p id={errorId} role=\"alert\" class=\"mt-1 text-xs text-foreground\">\n {customAccentErrorSlot()}\n </p>\n )}\n </Show>\n </div>\n </Show>\n {/* Inline, the typefaces read as one more palette choice; `end` hands\n the closing slot to them for hosts whose order is palette and\n surface first, text last. */}\n <Show when={props.fontSettingsPlacement !== 'end'}>\n <AppearanceFontSettingsGroup\n settings={props.draft.fonts ?? DEFAULT_APPEARANCE_EDITOR_FONT_SETTINGS}\n menuPortalMount={props.menuPortalMount}\n disabled={props.saving}\n onChange={(fonts) => props.onChange({ fonts })}\n />\n </Show>\n <SettingsRow title=\"Glass\" icon={<PanelsTopLeft />} description={glassDescription()}>\n <GlassChoices {...props} />\n </SettingsRow>\n <Show when={!props.surfaceCapability.frosted && props.surfaceCapability.reason}>\n <p role=\"status\" class=\"px-4 py-2 text-xs text-muted-foreground\">\n {props.surfaceCapability.reason}\n </p>\n </Show>\n <SettingsRow\n title=\"Reduce transparency\"\n icon={<EyeOff />}\n description=\"Prefer solid surfaces, including during live preview.\"\n >\n <Switch\n checked={props.draft.reduceTransparency}\n disabled={props.saving}\n onChange={(reduceTransparency: boolean) => props.onChange({ reduceTransparency })}\n aria-label=\"Reduce transparency\"\n />\n </SettingsRow>\n <SettingsRow\n title=\"Theme library\"\n icon={<Palette />}\n description={\n props.onManageThemes\n ? 'Manage themes through the application.'\n : 'Theme import is unavailable.'\n }\n >\n <Button\n type=\"button\"\n size=\"sm\"\n variant=\"outline\"\n disabled={!props.onManageThemes || props.saving}\n onClick={() => props.onManageThemes?.()}\n >\n Manage themes\n </Button>\n </SettingsRow>\n <Show when={props.fontSettingsPlacement === 'end'}>\n <AppearanceFontSettingsGroup\n settings={props.draft.fonts ?? DEFAULT_APPEARANCE_EDITOR_FONT_SETTINGS}\n menuPortalMount={props.menuPortalMount}\n disabled={props.saving}\n onChange={(fonts) => props.onChange({ fonts })}\n />\n </Show>\n {props.extraRows}\n </div>\n <Show when={!props.hideActions}>\n {/* Sticky so Save/Cancel stay reachable in a tall scroll container: the\n editor scrolls with its host panel, and actions parked at the bottom\n of a long form were unreachable without scrolling past every row. The\n bar is a band on the subtle-fill rung, like a sheet footer. It bleeds\n through the host panel's padding (`--settings-panel-padding`, set by\n SettingsLayout) so it sits flush with the panel's bottom and side\n edges with no strip of page under it; a sticky offset is measured\n inside a scroll container's padding, so `bottom` is pulled out by the\n same amount. */}\n <div class=\"sticky bottom-[calc(var(--settings-panel-padding,0px)*-1)] z-10 -mx-(--settings-panel-padding) -mb-(--settings-panel-padding) mt-4 border-t bg-muted px-4 py-3\">\n <AppearanceEditorActions {...props} />\n </div>\n </Show>\n </div>\n )\n}\n\n/**\n * Reset, Cancel and Save, with the reason Save is unavailable. Rendered by the\n * editor itself, or — with `hideActions` — by a host that pins them in its own\n * footer, as `AppearancePopover` does.\n */\nexport function AppearanceEditorActions(props: AppearanceEditorProps) {\n const saveReasonId = createUniqueId()\n return (\n <div class=\"flex w-full flex-col gap-2\">\n <Show when={props.saveDisabledReason}>\n {(saveDisabledReasonSlot) => (\n <p id={saveReasonId} role=\"status\" class=\"text-xs text-muted-foreground\">\n {saveDisabledReasonSlot()}\n </p>\n )}\n </Show>\n {/* `global-appearance-editor-actions` lets these buttons grow with the UI\n font preference, like the rest of Appearance's own controls. */}\n <div class=\"global-appearance-editor-actions flex flex-wrap items-center gap-2\">\n <Button\n type=\"button\"\n size=\"sm\"\n variant=\"ghost\"\n disabled={props.saving}\n onClick={() => props.onReset()}\n >\n Reset\n </Button>\n <div class=\"ml-auto flex gap-2\">\n <Button\n type=\"button\"\n size=\"sm\"\n variant=\"outline\"\n disabled={props.saving}\n onClick={() => props.onCancel()}\n >\n Cancel\n </Button>\n <Button\n type=\"button\"\n size=\"sm\"\n disabled={props.saving || !!props.customAccentError || !!props.saveDisabledReason}\n aria-busy={props.saving}\n aria-describedby={props.saveDisabledReason ? saveReasonId : undefined}\n onClick={() => props.onSave()}\n >\n {props.saving ? 'Saving…' : 'Save'}\n </Button>\n </div>\n </div>\n </div>\n )\n}\n\n/** The editor in an inset Sheet docked beside the main view: the body scrolls and\n * Reset/Cancel/Save sit in the panel's full-width footer, always reachable.\n * Dismissal (Escape, the close button, an outside click) is `onDismiss`. */\nexport function AppearancePopover(props: AppearancePopoverProps) {\n const [menuPortalMount, setMenuPortalMount] = createSignal<HTMLElement>()\n\n return (\n <Sheet open={props.open} onOpenChange={(open) => (open ? props.onOpen() : props.onDismiss())}>\n {/* The trigger is an icon-only action, so it explains itself through the\n shared ActionButton's tooltip (keyboard focus included) rather than a\n bare aria-label. `toolbar` also holds the pressed rung while Kobalte\n marks the trigger `data-expanded`, and repeats the glyph in the\n tooltip like the other toolbar actions. */}\n <SheetTrigger\n as={ActionButton}\n variant={props.triggerVariant === 'toolbar' ? 'toolbar' : 'ghost'}\n size=\"icon-sm\"\n tooltip=\"Open appearance settings\"\n tooltipIcon={\n props.triggerVariant === 'toolbar' ? <Palette aria-hidden=\"true\" /> : undefined\n }\n aria-label=\"Appearance settings\"\n >\n <Palette />\n </SheetTrigger>\n <SheetContent side=\"end\" closeLabel=\"Close appearance settings\" ref={setMenuPortalMount}>\n <SheetHeader>\n <SheetTitle>Appearance</SheetTitle>\n <SheetDescription>\n Changes preview immediately. Save keeps them; Cancel restores the previous appearance.\n </SheetDescription>\n </SheetHeader>\n <SheetBody>\n <AppearanceEditor {...props} menuPortalMount={menuPortalMount()} hideActions />\n </SheetBody>\n <SheetFooter>\n <AppearanceEditorActions {...props} />\n </SheetFooter>\n </SheetContent>\n </Sheet>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAiEA,IAAMA,WAASkC,SAASjC,MAAY;AACpC,IAAMC,YAAUgC,SAAS/B,OAAa;AACtC,IAAMC,kBAAgB8B,SAA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AA;OAAA,OAAA,CAAAH,gBACTpC,YAAU,EAAAuC,UAAA,aAAA,CAAA,GAAAH,gBACVvC,kBAAgB,EAAA0C,UAAA,yFAAA,CAAA,CAAA;MAAA,EAAA,CAAA;MAAAH,gBAIlBzC,WAAS,EAAA,IAAA4C,WAAA;OAAA,OAAAH,gBACPzB,kBAAgBgH,WAAK/G,OAAK;QAAA,IAAEkE,kBAAe;SAAA,OAAEA,gBAAgB;QAAC;QAAEa,aAAW;OAAA,CAAA,CAAA;MAAA,EAAA,CAAA;MAAAvD,gBAE7EtC,aAAW,EAAA,IAAAyC,WAAA;OAAA,OAAAH,gBACT0D,yBAA4BlF,KAAK;MAAA,EAAA,CAAA;KAAA;IAAA;GAAA,CAAA,CAAA;EAAA;CAAA,CAAA;AAK5C"}
|
|
@@ -31,12 +31,20 @@ export declare function ThemeRow(props: {
|
|
|
31
31
|
* preview; every catalogue record follows, both appearances, because the
|
|
32
32
|
* terminal paints one fixed ANSI palette rather than an appearance axis.
|
|
33
33
|
*/
|
|
34
|
-
export declare function TerminalRow(props:
|
|
34
|
+
export declare function TerminalRow(props: PinnedThemeRowProps): JSX.Element;
|
|
35
|
+
/**
|
|
36
|
+
* The code palette (editor, diff and file views), chosen the same way as the
|
|
37
|
+
* terminal: `'theme'` follows the interface theme, any catalogue record pins
|
|
38
|
+
* that theme's syntax colours and the canvas they were measured on.
|
|
39
|
+
*/
|
|
40
|
+
export declare function CodeRow(props: PinnedThemeRowProps): JSX.Element;
|
|
41
|
+
type PinnedThemeRowProps = {
|
|
35
42
|
selectedId: string;
|
|
36
43
|
/** Resolved interface theme: the `theme` option's palette and the fallback. */
|
|
37
44
|
preview: AdeaTheme;
|
|
38
45
|
themes: readonly AdeaThemeRecord[];
|
|
39
46
|
disabled?: boolean;
|
|
40
47
|
onSelect: (id: string) => void;
|
|
41
|
-
}
|
|
48
|
+
};
|
|
49
|
+
export {};
|
|
42
50
|
//# sourceMappingURL=appearance-rows.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appearance-rows.d.ts","sourceRoot":"","sources":["../../../../src/components/composites/appearance-editor/appearance-rows.tsx"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACjE,OAAO,EAAkD,KAAK,GAAG,EAAE,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"appearance-rows.d.ts","sourceRoot":"","sources":["../../../../src/components/composites/appearance-editor/appearance-rows.tsx"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACjE,OAAO,EAAkD,KAAK,GAAG,EAAE,MAAM,UAAU,CAAA;AA6BnF,wBAAgB,WAAW,CAAC,KAAK,EAAE;IACjC,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,GAAG,CAAC,OAAO,CAAA;IACjB,WAAW,CAAC,EAAE,GAAG,CAAC,OAAO,CAAA;IACzB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAA;CACtB,eA8BA;AAED,8CAA8C;AAC9C,MAAM,MAAM,WAAW,GAAG;IACxB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,OAAO,EAAE,SAAS,CAAA;CACnB,CAAA;AAqND;;GAEG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE;IAC9B,UAAU,EAAE,OAAO,GAAG,MAAM,CAAA;IAC5B,UAAU,EAAE,MAAM,CAAA;IAClB,OAAO,EAAE,SAAS,CAAA;IAClB,MAAM,EAAE,SAAS,eAAe,EAAE,CAAA;IAClC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;CAC/B,eAwBA;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,mBAAmB,eAIrD;AAED;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,mBAAmB,eAEjD;AAED,KAAK,mBAAmB,GAAG;IACzB,UAAU,EAAE,MAAM,CAAA;IAClB,+EAA+E;IAC/E,OAAO,EAAE,SAAS,CAAA;IAClB,MAAM,EAAE,SAAS,eAAe,EAAE,CAAA;IAClC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;CAC/B,CAAA"}
|
|
@@ -4,8 +4,8 @@ import { Button } from "../../ui/button/button.js";
|
|
|
4
4
|
import { DropdownMenu, DropdownMenuContent, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuTrigger, tabStopAt } from "../../ui/dropdown-menu/dropdown-menu.js";
|
|
5
5
|
import { PalettePreview, ThemeMenuPreview } from "./theme-preview.js";
|
|
6
6
|
import { fastIcon } from "../../../lib/fast-icon.js";
|
|
7
|
-
import { className, createComponent, effect, insert, memo, template, use } from "solid-js/web";
|
|
8
|
-
import { ChevronDown, Moon, SquareTerminal, Sun } from "lucide-solid";
|
|
7
|
+
import { className, createComponent, effect, insert, memo, mergeProps, template, use } from "solid-js/web";
|
|
8
|
+
import { ChevronDown, Code, Moon, SquareTerminal, Sun } from "lucide-solid";
|
|
9
9
|
import { For, Show, createMemo, createSignal, onCleanup } from "solid-js";
|
|
10
10
|
// src/components/composites/appearance-editor/appearance-rows.tsx
|
|
11
11
|
var _tmpl$ = /*#__PURE__*/ template(`<section><div><span class="flex size-9 shrink-0 items-center justify-center rounded-lg border bg-foreground/5 text-muted-foreground [&_svg]:size-4"aria-hidden=true></span><div class=min-w-0><h3 class="text-sm font-medium"></h3></div></div><div class="min-w-0 max-w-full shrink-0">`);
|
|
@@ -15,6 +15,7 @@ var _tmpl$4 = /*#__PURE__*/ template(`<div>`);
|
|
|
15
15
|
var _tmpl$5 = /*#__PURE__*/ template(`<span aria-hidden=true class="line-clamp-2 max-w-44 text-2xs text-muted-foreground">`);
|
|
16
16
|
var _tmpl$6 = /*#__PURE__*/ template(`<span class="flex min-w-0 flex-1 flex-col gap-0.5"><span class=truncate>`);
|
|
17
17
|
var ChevronDown$1 = fastIcon(ChevronDown);
|
|
18
|
+
var Code$1 = fastIcon(Code);
|
|
18
19
|
var Moon$1 = fastIcon(Moon);
|
|
19
20
|
var SquareTerminal$1 = fastIcon(SquareTerminal);
|
|
20
21
|
var Sun$1 = fastIcon(Sun);
|
|
@@ -281,6 +282,29 @@ function ThemeRow(props) {
|
|
|
281
282
|
* terminal paints one fixed ANSI palette rather than an appearance axis.
|
|
282
283
|
*/
|
|
283
284
|
function TerminalRow(props) {
|
|
285
|
+
return createComponent(PinnedThemeRow, mergeProps(props, {
|
|
286
|
+
title: "Terminal",
|
|
287
|
+
subject: "The terminal",
|
|
288
|
+
get icon() {
|
|
289
|
+
return createComponent(SquareTerminal$1, {});
|
|
290
|
+
}
|
|
291
|
+
}));
|
|
292
|
+
}
|
|
293
|
+
/**
|
|
294
|
+
* The code palette (editor, diff and file views), chosen the same way as the
|
|
295
|
+
* terminal: `'theme'` follows the interface theme, any catalogue record pins
|
|
296
|
+
* that theme's syntax colours and the canvas they were measured on.
|
|
297
|
+
*/
|
|
298
|
+
function CodeRow(props) {
|
|
299
|
+
return createComponent(PinnedThemeRow, mergeProps(props, {
|
|
300
|
+
title: "Code",
|
|
301
|
+
subject: "Code",
|
|
302
|
+
get icon() {
|
|
303
|
+
return createComponent(Code$1, {});
|
|
304
|
+
}
|
|
305
|
+
}));
|
|
306
|
+
}
|
|
307
|
+
function PinnedThemeRow(props) {
|
|
284
308
|
const options = createMemo(() => [{
|
|
285
309
|
id: THEME_DEFAULT_ID,
|
|
286
310
|
name: "UI theme",
|
|
@@ -298,19 +322,23 @@ function TerminalRow(props) {
|
|
|
298
322
|
});
|
|
299
323
|
const description = () => {
|
|
300
324
|
const option = selectedOption();
|
|
301
|
-
return option && option.id !== "theme" ?
|
|
325
|
+
return option && option.id !== "theme" ? `${props.subject} follows ${option.name}.` : `${props.subject} follows the interface theme.`;
|
|
302
326
|
};
|
|
303
327
|
return createComponent(SettingsRow, {
|
|
304
|
-
title
|
|
328
|
+
get title() {
|
|
329
|
+
return props.title;
|
|
330
|
+
},
|
|
305
331
|
get icon() {
|
|
306
|
-
return
|
|
332
|
+
return props.icon;
|
|
307
333
|
},
|
|
308
334
|
get description() {
|
|
309
335
|
return description();
|
|
310
336
|
},
|
|
311
337
|
get children() {
|
|
312
338
|
return createComponent(ThemeSelectMenu, {
|
|
313
|
-
label
|
|
339
|
+
get label() {
|
|
340
|
+
return props.title;
|
|
341
|
+
},
|
|
314
342
|
get selectedId() {
|
|
315
343
|
return props.selectedId;
|
|
316
344
|
},
|
|
@@ -330,6 +358,6 @@ function TerminalRow(props) {
|
|
|
330
358
|
}
|
|
331
359
|
});
|
|
332
360
|
}
|
|
333
|
-
export { SettingsRow, TerminalRow, ThemeRow };
|
|
361
|
+
export { CodeRow, SettingsRow, TerminalRow, ThemeRow };
|
|
334
362
|
|
|
335
363
|
//# sourceMappingURL=appearance-rows.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appearance-rows.js","names":["For","Show","createMemo","createSignal","onCleanup","ChevronDown","LucideChevronDown","Moon","LucideMoon","SquareTerminal","LucideSquareTerminal","Sun","LucideSun","cn","THEME_DEFAULT_ID","Button","DropdownMenu","DropdownMenuContent","DropdownMenuRadioGroup","DropdownMenuRadioItem","DropdownMenuTrigger","tabStopAt","PalettePreview","ThemeMenuPreview","fastIcon","SettingsRow","props","title","icon","Element","description","stacked","children","_el$","_tmpl$","_el$2","firstChild","_el$3","_el$4","nextSibling","_el$5","_el$6","_$insert","_$createComponent","when","descriptionSlot","_el$7","_tmpl$2","_$effect","_p$","_v$","_v$2","e","_$className","t","undefined","id","name","preview","ThemeSelectMenu","label","selectedId","triggerPreview","options","disabled","onSelect","portalMount","setPortalMount","triggerElement","setTriggerElement","menuOpen","setMenuOpen","focusOutsideTarget","setFocusOutsideTarget","HTMLElement","restoreTriggerFocus","setRestoreTriggerFocus","focusLifecycleVersion","selected","matched","find","option","previewId","selectedName","_el$8","_tmpl$4","_$use","modal","open","onOpenChange","ref","as","variant","size","length","_el$9","_tmpl$3","_el$0","theme","tabKey","onInteractOutside","event","detail","originalEvent","type","closest","focusScope","ownerDocument","body","target","contains","focusTarget","onFocusOutside","preventDefault","onEscapeKeyDown","onCloseAutoFocus","lifecycleVersion","shouldRestore","focus","preventScroll","isConnected","queueMicrotask","activeElement","document","isMenuFocus","isTriggerFocus","value","onChange","each","textValue","closeOnSelect","_el$1","_tmpl$6","_el$10","_el$11","_tmpl$5","ThemeRow","appearance","themes","filter","map","_$memo","TerminalRow","selectedOption"],"sources":["../../../../src/components/composites/appearance-editor/appearance-rows.tsx"],"sourcesContent":["/*\n * MIT License\n *\n * Copyright (c) 2026 Wing\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n// Retains the compact divided row and palette-preview selector from the pinned\n// Zeron/Adea composition; Kobalte owns option navigation and nested dismissal.\n// One shared menu serves the light, dark, and terminal rows: each option is a\n// compact theme preview with its name and one-line description beside it, and\n// the menu sizes to that content instead of clipping it at the trigger width.\nimport type { AdeaTheme, AdeaThemeRecord } from '@adea-ai/themes'\nimport { For, Show, createMemo, createSignal, onCleanup, type JSX } from 'solid-js'\nimport {\n ChevronDown as LucideChevronDown,\n Moon as LucideMoon,\n SquareTerminal as LucideSquareTerminal,\n Sun as LucideSun,\n} from 'lucide-solid'\nimport { cn } from '#lib/utils'\nimport { THEME_DEFAULT_ID } from '#lib/theme-defaults'\nimport { Button } from '../../ui/button'\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuTrigger,\n tabStopAt,\n} from '../../ui/dropdown-menu/dropdown-menu'\nimport { PalettePreview, ThemeMenuPreview } from './theme-preview'\nimport { fastIcon } from '#lib/fast-icon'\n\n// lucide icons drawn from a cloned template (see fastIcon).\nconst ChevronDown = fastIcon(LucideChevronDown)\nconst Moon = fastIcon(LucideMoon)\nconst SquareTerminal = fastIcon(LucideSquareTerminal)\nconst Sun = fastIcon(LucideSun)\n\nexport function SettingsRow(props: {\n title: string\n icon: JSX.Element\n description?: JSX.Element\n stacked?: boolean\n children: JSX.Element\n}) {\n return (\n <section\n class={cn('flex gap-3 px-4 py-4', {\n 'flex-col': props.stacked,\n 'flex-wrap items-center': !props.stacked,\n })}\n >\n {/* Reserve readable copy before choosing a side-by-side control row.\n Wrapping follows the actual host width and enlarged text, rather\n than a viewport breakpoint that also matches a narrow popover. */}\n <div class={cn('flex min-w-0 flex-1 items-center gap-3', { 'basis-48': !props.stacked })}>\n <span\n class=\"flex size-9 shrink-0 items-center justify-center rounded-lg border bg-foreground/5 text-muted-foreground [&_svg]:size-4\"\n aria-hidden=\"true\"\n >\n {props.icon}\n </span>\n <div class=\"min-w-0\">\n <h3 class=\"text-sm font-medium\">{props.title}</h3>\n <Show when={props.description}>\n {(descriptionSlot) => (\n <div class=\"mt-0.5 text-xs text-muted-foreground\">{descriptionSlot()}</div>\n )}\n </Show>\n </div>\n </div>\n <div class=\"min-w-0 max-w-full shrink-0\">{props.children}</div>\n </section>\n )\n}\n\n/** One selectable palette in a theme menu. */\nexport type ThemeOption = {\n id: string\n name: string\n description?: string\n preview: AdeaTheme\n}\n\n/**\n * The shared theme picker. Kobalte handles menu navigation and dismissal; Tab\n * leaves the menu for the adjacent stop (`tabKey=\"leave\"`). The menu width\n * follows its content (bounded by the popper's available width) so a long\n * theme name and its description render fully instead of truncating at the\n * trigger's width.\n */\nfunction ThemeSelectMenu(props: {\n /** Row title; prefixes the trigger's accessible name and labels the group. */\n label: string\n selectedId: string\n /** Palette shown on the trigger; hosts pass the accent-applied preview. */\n triggerPreview: AdeaTheme\n options: readonly ThemeOption[]\n disabled?: boolean\n onSelect: (id: string) => void\n}) {\n const [portalMount, setPortalMount] = createSignal<HTMLDivElement>()\n const [triggerElement, setTriggerElement] = createSignal<HTMLButtonElement>()\n const [menuOpen, setMenuOpen] = createSignal(false)\n const [focusOutsideTarget, setFocusOutsideTarget] = createSignal<HTMLElement>()\n const [restoreTriggerFocus, setRestoreTriggerFocus] = createSignal(false)\n let focusLifecycleVersion = 0\n onCleanup(() => {\n focusLifecycleVersion += 1\n })\n const selected = createMemo(() => {\n const options = props.options\n const selectedId = props.selectedId\n const matched = options.find((option) => option.id === selectedId)\n if (matched) return matched\n const previewId = props.triggerPreview.id\n return options.find((option) => option.id === previewId)\n })\n const selectedName = () => selected()?.name ?? props.triggerPreview.name\n\n return (\n <div ref={setPortalMount}>\n <DropdownMenu\n modal={false}\n open={menuOpen()}\n onOpenChange={(open) => {\n if (open !== menuOpen()) focusLifecycleVersion += 1\n setMenuOpen(open)\n if (open) {\n setFocusOutsideTarget(undefined)\n setRestoreTriggerFocus(false)\n }\n }}\n >\n <DropdownMenuTrigger\n ref={setTriggerElement}\n as={Button}\n variant=\"outline\"\n size=\"sm\"\n aria-label={`${props.label}: ${selectedName()}`}\n disabled={props.disabled || props.options.length === 0}\n class=\"w-full justify-between sm:w-52\"\n >\n <span class=\"flex min-w-0 flex-1 items-center gap-2\">\n <PalettePreview theme={props.triggerPreview} />\n <span class=\"min-w-0 flex-1 truncate\">{selectedName()}</span>\n </span>\n <ChevronDown aria-hidden=\"true\" class=\"shrink-0 text-muted-foreground\" />\n </DropdownMenuTrigger>\n <DropdownMenuContent\n portalMount={portalMount()}\n // A fixed height with its own scroll: an adaptive cap measured the\n // host panel instead, and opening a long theme list scrolled the\n // sidebar to reveal the menu. The content scrolls internally at the\n // cap, so the panel around the trigger never moves. Width still\n // follows content (at least the trigger width, never wider than the\n // popper allows) so long theme names render in full with padding for\n // the selection indicator instead of truncating at the anchor width.\n class=\"max-h-80 w-max min-w-(--kb-popper-anchor-width) max-w-(--kb-popper-content-available-width) overflow-x-hidden overflow-y-auto\"\n tabKey=\"leave\"\n onInteractOutside={(event) => {\n if (event.detail.originalEvent.type !== 'pointerdown') return\n const parentDialog = portalMount()?.closest<HTMLElement>('[role=\"dialog\"]')\n const focusScope = parentDialog ?? portalMount()?.ownerDocument.body\n const target = event.detail.originalEvent.target\n if (!(target instanceof Element) || !focusScope?.contains(target)) return\n\n const focusTarget = tabStopAt(target)\n if (focusTarget) {\n setRestoreTriggerFocus(false)\n setFocusOutsideTarget(focusTarget)\n } else {\n setRestoreTriggerFocus(true)\n }\n }}\n onFocusOutside={(event) => {\n // The containing dialog or document body can briefly reclaim\n // focus when the menu opens. Keep that handoff from dismissing\n // it; focus moving to another descendant still closes the menu.\n const parentDialog = portalMount()?.closest<HTMLElement>('[role=\"dialog\"]')\n const focusScope = parentDialog ?? portalMount()?.ownerDocument.body\n const target = event.detail.originalEvent.target\n if (target === focusScope) {\n event.preventDefault()\n } else if (target instanceof HTMLElement && focusScope?.contains(target)) {\n setRestoreTriggerFocus(false)\n setFocusOutsideTarget(target)\n }\n }}\n onEscapeKeyDown={() => setRestoreTriggerFocus(true)}\n onCloseAutoFocus={(event) => {\n // A prior menu instance can finish its focus cleanup after this\n // row has already reopened. Do not let that cleanup steal focus.\n if (menuOpen()) {\n event.preventDefault()\n return\n }\n\n const lifecycleVersion = focusLifecycleVersion\n const shouldRestore = restoreTriggerFocus()\n const focusTarget = focusOutsideTarget()\n setFocusOutsideTarget(undefined)\n setRestoreTriggerFocus(false)\n if (shouldRestore) {\n // The saved focus may be the containing dialog rather than\n // the trigger when WebKit opens this menu from a pointer click.\n event.preventDefault()\n triggerElement()?.focus({ preventScroll: true })\n return\n }\n\n const parentDialog = portalMount()?.closest<HTMLElement>('[role=\"dialog\"]')\n const focusScope = parentDialog ?? portalMount()?.ownerDocument.body\n if (focusTarget?.isConnected && focusScope?.contains(focusTarget)) {\n // Preserve the intended in-scope destination across\n // Kobalte's deferred stale-focus restore.\n event.preventDefault()\n queueMicrotask(() => {\n if (lifecycleVersion !== focusLifecycleVersion || menuOpen()) return\n\n const activeElement = document.activeElement\n const isMenuFocus =\n activeElement instanceof HTMLElement &&\n activeElement.closest('[role=\"menu\"]') !== null\n const isTriggerFocus = activeElement === triggerElement()\n if (\n activeElement !== focusTarget &&\n (activeElement === document.body ||\n activeElement === focusScope ||\n isMenuFocus ||\n isTriggerFocus)\n ) {\n focusTarget.focus({ preventScroll: true })\n }\n })\n return\n }\n\n const activeElement = document.activeElement\n if (\n focusScope &&\n activeElement instanceof HTMLElement &&\n activeElement !== focusScope &&\n focusScope.contains(activeElement) &&\n activeElement.closest('[role=\"menu\"]') === null\n ) {\n // Preserve a real focus target in this scope instead of\n // restoring the stale element captured when the menu mounted. A\n // focused menu item is about to unmount, so Kobalte must restore\n // focus to the trigger instead.\n event.preventDefault()\n }\n }}\n >\n <DropdownMenuRadioGroup\n value={selected()?.id ?? ''}\n aria-label={`${props.label} options`}\n onChange={(id) => {\n if (!props.disabled && typeof id === 'string') props.onSelect(id)\n }}\n >\n <For each={props.options}>\n {(option) => (\n <DropdownMenuRadioItem\n value={option.id}\n textValue={option.name}\n closeOnSelect={true}\n disabled={props.disabled}\n onSelect={() => setRestoreTriggerFocus(true)}\n >\n <ThemeMenuPreview theme={option.preview} />\n <span class=\"flex min-w-0 flex-1 flex-col gap-0.5\">\n <span class=\"truncate\">{option.name}</span>\n {/* Visual affordance only: the accessible name stays the\n theme name, which is what keyboard and test callers\n match on. */}\n <Show when={option.description}>\n <span\n aria-hidden=\"true\"\n class=\"line-clamp-2 max-w-44 text-2xs text-muted-foreground\"\n >\n {option.description}\n </span>\n </Show>\n </span>\n </DropdownMenuRadioItem>\n )}\n </For>\n </DropdownMenuRadioGroup>\n </DropdownMenuContent>\n </DropdownMenu>\n </div>\n )\n}\n\n/**\n * A compact persistent theme choice for one appearance.\n */\nexport function ThemeRow(props: {\n appearance: 'light' | 'dark'\n selectedId: string\n preview: AdeaTheme\n themes: readonly AdeaThemeRecord[]\n disabled?: boolean\n onSelect: (id: string) => void\n}) {\n const label = () => (props.appearance === 'light' ? 'Light theme' : 'Dark theme')\n const options = createMemo<ThemeOption[]>(() =>\n props.themes\n .filter((theme) => theme.appearance === props.appearance)\n .map((theme) => ({\n id: theme.id,\n name: theme.name,\n description: theme.description,\n preview: theme,\n }))\n )\n return (\n <SettingsRow title={label()} icon={props.appearance === 'light' ? <Sun /> : <Moon />}>\n <ThemeSelectMenu\n label={label()}\n selectedId={props.selectedId}\n triggerPreview={props.preview}\n options={options()}\n disabled={props.disabled}\n onSelect={props.onSelect}\n />\n </SettingsRow>\n )\n}\n\n/**\n * A terminal palette choice independent of the light/dark rows. The first\n * option (`'theme'`) follows the interface theme, painted with the resolved\n * preview; every catalogue record follows, both appearances, because the\n * terminal paints one fixed ANSI palette rather than an appearance axis.\n */\nexport function TerminalRow(props: {\n selectedId: string\n /** Resolved interface theme: the `theme` option's palette and the fallback. */\n preview: AdeaTheme\n themes: readonly AdeaThemeRecord[]\n disabled?: boolean\n onSelect: (id: string) => void\n}) {\n const options = createMemo<ThemeOption[]>(() => [\n {\n id: THEME_DEFAULT_ID,\n name: 'UI theme',\n description: 'Uses the interface theme.',\n preview: props.preview,\n },\n ...props.themes.map((theme) => ({\n id: theme.id,\n name: theme.name,\n description: theme.description,\n preview: theme,\n })),\n ])\n const selectedOption = createMemo(() => {\n const selectedId = props.selectedId\n return options().find((option) => option.id === selectedId)\n })\n const description = () => {\n const option = selectedOption()\n return option && option.id !== THEME_DEFAULT_ID\n ? `The terminal follows ${option.name}.`\n : 'The terminal follows the interface theme.'\n }\n return (\n <SettingsRow title=\"Terminal\" icon={<SquareTerminal />} description={description()}>\n <ThemeSelectMenu\n label=\"Terminal\"\n selectedId={props.selectedId}\n triggerPreview={selectedOption()?.preview ?? props.preview}\n options={options()}\n disabled={props.disabled}\n onSelect={props.onSelect}\n />\n </SettingsRow>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAmDA,IAAMK,gBAAcmB,SAASlB,WAAiB;AAC9C,IAAMC,SAAOiB,SAAShB,IAAU;AAChC,IAAMC,mBAAiBe,SAASd,cAAoB;AACpD,IAAMC,QAAMa,SAASZ,GAAS;AAE9B,SAAgBa,YAAYC,OAMzB;CACD,cAAA;EAAA,IAAAO,OAAAC,OAAA,GAAAC,QAAAF,KAAAG,YAAAC,QAAAF,MAAAC,YAAAE,QAAAD,MAAAE,aAAAC,QAAAF,MAAAF,YAAAK,QAAAN,MAAAI;EAAAG,OAAAL,aAeSX,MAAME,IAAI;EAAAc,OAAAF,aAGsBd,MAAMC,KAAK;EAAAe,OAAAJ,OAAAK,gBAC3C1C,MAAI;GAAA,IAAC2C,OAAI;IAAA,OAAElB,MAAMI;GAAW;GAAAE,WACzBa,2BAAe;IAAA,IAAAC,QAAAC,QAAA;IAAAL,OAAAI,OACoCD,eAAe;IAAA,OAAAC;GAAA,EAAA,CAAA;EACnE,CAAA,GAAA,IAAA;EAAAJ,OAAAD,aAImCf,MAAMM,QAAQ;EAAAgB,QAAAC,QAAA;GAAA,IAAA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ACD,MAAMqC,UAAU7D,iBAAgC,CAC9C;EACEsD,IAAI1C;EACJ2C,MAAM;EACN3B,aAAa;EACb4B,SAAShC,MAAMgC;CACjB,GACA,GAAGhC,MAAMgH,OAAOE,KAAK1C,WAAW;EAC9B1C,IAAI0C,MAAM1C;EACVC,MAAMyC,MAAMzC;EACZ3B,aAAaoE,MAAMpE;EACnB4B,SAASwC;CACX,EAAE,CAAC,CACJ;CACD,MAAM6C,iBAAiB7I,iBAAiB;EACtC,MAAM2D,aAAanC,MAAMmC;EACzB,OAAOE,QAAQ,CAAC,CAACiB,MAAMC,WAAWA,OAAOzB,OAAOK,UAAU;CAC5D,CAAC;CACD,MAAM/B,oBAAoB;EACxB,MAAMmD,SAAS8D,eAAe;EAC9B,OAAO9D,UAAUA,OAAOzB,OAAAA,UACpB,wBAAwByB,OAAOxB,KAAI,KACnC;CACN;CACA,OAAAd,gBACGlB,aAAW;EAACE,OAAK;EAAA,IAAYC,OAAI;GAAA,OAAAe,gBAAGlC,kBAAc,CAAA,CAAA;EAAA;EAAA,IAAKqB,cAAW;GAAA,OAAEA,YAAY;EAAC;EAAA,IAAAE,WAAA;GAAA,OAAAW,gBAC/EgB,iBAAe;IACdC,OAAK;IAAA,IACLC,aAAU;KAAA,OAAEnC,MAAMmC;IAAU;IAAA,IAC5BC,iBAAc;KAAA,OAAEiF,eAAe,CAAC,EAAErF,WAAWhC,MAAMgC;IAAO;IAAA,IAC1DK,UAAO;KAAA,OAAEA,QAAQ;IAAC;IAAA,IAClBC,WAAQ;KAAA,OAAEtC,MAAMsC;IAAQ;IAAA,IACxBC,WAAQ;KAAA,OAAEvC,MAAMuC;IAAQ;GAAA,CAAA;EAAA;CAAA,CAAA;AAIhC"}
|
|
1
|
+
{"version":3,"file":"appearance-rows.js","names":["For","Show","createMemo","createSignal","onCleanup","ChevronDown","LucideChevronDown","Code","LucideCode","Moon","LucideMoon","SquareTerminal","LucideSquareTerminal","Sun","LucideSun","cn","THEME_DEFAULT_ID","Button","DropdownMenu","DropdownMenuContent","DropdownMenuRadioGroup","DropdownMenuRadioItem","DropdownMenuTrigger","tabStopAt","PalettePreview","ThemeMenuPreview","fastIcon","SettingsRow","props","title","icon","Element","description","stacked","children","_el$","_tmpl$","_el$2","firstChild","_el$3","_el$4","nextSibling","_el$5","_el$6","_$insert","_$createComponent","when","descriptionSlot","_el$7","_tmpl$2","_$effect","_p$","_v$","_v$2","e","_$className","t","undefined","id","name","preview","ThemeSelectMenu","label","selectedId","triggerPreview","options","disabled","onSelect","portalMount","setPortalMount","triggerElement","setTriggerElement","menuOpen","setMenuOpen","focusOutsideTarget","setFocusOutsideTarget","HTMLElement","restoreTriggerFocus","setRestoreTriggerFocus","focusLifecycleVersion","selected","matched","find","option","previewId","selectedName","_el$8","_tmpl$4","_$use","modal","open","onOpenChange","ref","as","variant","size","length","_el$9","_tmpl$3","_el$0","theme","tabKey","onInteractOutside","event","detail","originalEvent","type","closest","focusScope","ownerDocument","body","target","contains","focusTarget","onFocusOutside","preventDefault","onEscapeKeyDown","onCloseAutoFocus","lifecycleVersion","shouldRestore","focus","preventScroll","isConnected","queueMicrotask","activeElement","document","isMenuFocus","isTriggerFocus","value","onChange","each","textValue","closeOnSelect","_el$1","_tmpl$6","_el$10","_el$11","_tmpl$5","ThemeRow","appearance","themes","filter","map","_$memo","TerminalRow","PinnedThemeRow","_$mergeProps","subject","CodeRow","selectedOption"],"sources":["../../../../src/components/composites/appearance-editor/appearance-rows.tsx"],"sourcesContent":["/*\n * MIT License\n *\n * Copyright (c) 2026 Wing\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n// Retains the compact divided row and palette-preview selector from the pinned\n// Zeron/Adea composition; Kobalte owns option navigation and nested dismissal.\n// One shared menu serves the light, dark, and terminal rows: each option is a\n// compact theme preview with its name and one-line description beside it, and\n// the menu sizes to that content instead of clipping it at the trigger width.\nimport type { AdeaTheme, AdeaThemeRecord } from '@adea-ai/themes'\nimport { For, Show, createMemo, createSignal, onCleanup, type JSX } from 'solid-js'\nimport {\n ChevronDown as LucideChevronDown,\n Code as LucideCode,\n Moon as LucideMoon,\n SquareTerminal as LucideSquareTerminal,\n Sun as LucideSun,\n} from 'lucide-solid'\nimport { cn } from '#lib/utils'\nimport { THEME_DEFAULT_ID } from '#lib/theme-defaults'\nimport { Button } from '../../ui/button'\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuTrigger,\n tabStopAt,\n} from '../../ui/dropdown-menu/dropdown-menu'\nimport { PalettePreview, ThemeMenuPreview } from './theme-preview'\nimport { fastIcon } from '#lib/fast-icon'\n\n// lucide icons drawn from a cloned template (see fastIcon).\nconst ChevronDown = fastIcon(LucideChevronDown)\nconst Code = fastIcon(LucideCode)\nconst Moon = fastIcon(LucideMoon)\nconst SquareTerminal = fastIcon(LucideSquareTerminal)\nconst Sun = fastIcon(LucideSun)\n\nexport function SettingsRow(props: {\n title: string\n icon: JSX.Element\n description?: JSX.Element\n stacked?: boolean\n children: JSX.Element\n}) {\n return (\n <section\n class={cn('flex gap-3 px-4 py-4', {\n 'flex-col': props.stacked,\n 'flex-wrap items-center': !props.stacked,\n })}\n >\n {/* Reserve readable copy before choosing a side-by-side control row.\n Wrapping follows the actual host width and enlarged text, rather\n than a viewport breakpoint that also matches a narrow popover. */}\n <div class={cn('flex min-w-0 flex-1 items-center gap-3', { 'basis-48': !props.stacked })}>\n <span\n class=\"flex size-9 shrink-0 items-center justify-center rounded-lg border bg-foreground/5 text-muted-foreground [&_svg]:size-4\"\n aria-hidden=\"true\"\n >\n {props.icon}\n </span>\n <div class=\"min-w-0\">\n <h3 class=\"text-sm font-medium\">{props.title}</h3>\n <Show when={props.description}>\n {(descriptionSlot) => (\n <div class=\"mt-0.5 text-xs text-muted-foreground\">{descriptionSlot()}</div>\n )}\n </Show>\n </div>\n </div>\n <div class=\"min-w-0 max-w-full shrink-0\">{props.children}</div>\n </section>\n )\n}\n\n/** One selectable palette in a theme menu. */\nexport type ThemeOption = {\n id: string\n name: string\n description?: string\n preview: AdeaTheme\n}\n\n/**\n * The shared theme picker. Kobalte handles menu navigation and dismissal; Tab\n * leaves the menu for the adjacent stop (`tabKey=\"leave\"`). The menu width\n * follows its content (bounded by the popper's available width) so a long\n * theme name and its description render fully instead of truncating at the\n * trigger's width.\n */\nfunction ThemeSelectMenu(props: {\n /** Row title; prefixes the trigger's accessible name and labels the group. */\n label: string\n selectedId: string\n /** Palette shown on the trigger; hosts pass the accent-applied preview. */\n triggerPreview: AdeaTheme\n options: readonly ThemeOption[]\n disabled?: boolean\n onSelect: (id: string) => void\n}) {\n const [portalMount, setPortalMount] = createSignal<HTMLDivElement>()\n const [triggerElement, setTriggerElement] = createSignal<HTMLButtonElement>()\n const [menuOpen, setMenuOpen] = createSignal(false)\n const [focusOutsideTarget, setFocusOutsideTarget] = createSignal<HTMLElement>()\n const [restoreTriggerFocus, setRestoreTriggerFocus] = createSignal(false)\n let focusLifecycleVersion = 0\n onCleanup(() => {\n focusLifecycleVersion += 1\n })\n const selected = createMemo(() => {\n const options = props.options\n const selectedId = props.selectedId\n const matched = options.find((option) => option.id === selectedId)\n if (matched) return matched\n const previewId = props.triggerPreview.id\n return options.find((option) => option.id === previewId)\n })\n const selectedName = () => selected()?.name ?? props.triggerPreview.name\n\n return (\n <div ref={setPortalMount}>\n <DropdownMenu\n modal={false}\n open={menuOpen()}\n onOpenChange={(open) => {\n if (open !== menuOpen()) focusLifecycleVersion += 1\n setMenuOpen(open)\n if (open) {\n setFocusOutsideTarget(undefined)\n setRestoreTriggerFocus(false)\n }\n }}\n >\n <DropdownMenuTrigger\n ref={setTriggerElement}\n as={Button}\n variant=\"outline\"\n size=\"sm\"\n aria-label={`${props.label}: ${selectedName()}`}\n disabled={props.disabled || props.options.length === 0}\n class=\"w-full justify-between sm:w-52\"\n >\n <span class=\"flex min-w-0 flex-1 items-center gap-2\">\n <PalettePreview theme={props.triggerPreview} />\n <span class=\"min-w-0 flex-1 truncate\">{selectedName()}</span>\n </span>\n <ChevronDown aria-hidden=\"true\" class=\"shrink-0 text-muted-foreground\" />\n </DropdownMenuTrigger>\n <DropdownMenuContent\n portalMount={portalMount()}\n // A fixed height with its own scroll: an adaptive cap measured the\n // host panel instead, and opening a long theme list scrolled the\n // sidebar to reveal the menu. The content scrolls internally at the\n // cap, so the panel around the trigger never moves. Width still\n // follows content (at least the trigger width, never wider than the\n // popper allows) so long theme names render in full with padding for\n // the selection indicator instead of truncating at the anchor width.\n class=\"max-h-80 w-max min-w-(--kb-popper-anchor-width) max-w-(--kb-popper-content-available-width) overflow-x-hidden overflow-y-auto\"\n tabKey=\"leave\"\n onInteractOutside={(event) => {\n if (event.detail.originalEvent.type !== 'pointerdown') return\n const parentDialog = portalMount()?.closest<HTMLElement>('[role=\"dialog\"]')\n const focusScope = parentDialog ?? portalMount()?.ownerDocument.body\n const target = event.detail.originalEvent.target\n if (!(target instanceof Element) || !focusScope?.contains(target)) return\n\n const focusTarget = tabStopAt(target)\n if (focusTarget) {\n setRestoreTriggerFocus(false)\n setFocusOutsideTarget(focusTarget)\n } else {\n setRestoreTriggerFocus(true)\n }\n }}\n onFocusOutside={(event) => {\n // The containing dialog or document body can briefly reclaim\n // focus when the menu opens. Keep that handoff from dismissing\n // it; focus moving to another descendant still closes the menu.\n const parentDialog = portalMount()?.closest<HTMLElement>('[role=\"dialog\"]')\n const focusScope = parentDialog ?? portalMount()?.ownerDocument.body\n const target = event.detail.originalEvent.target\n if (target === focusScope) {\n event.preventDefault()\n } else if (target instanceof HTMLElement && focusScope?.contains(target)) {\n setRestoreTriggerFocus(false)\n setFocusOutsideTarget(target)\n }\n }}\n onEscapeKeyDown={() => setRestoreTriggerFocus(true)}\n onCloseAutoFocus={(event) => {\n // A prior menu instance can finish its focus cleanup after this\n // row has already reopened. Do not let that cleanup steal focus.\n if (menuOpen()) {\n event.preventDefault()\n return\n }\n\n const lifecycleVersion = focusLifecycleVersion\n const shouldRestore = restoreTriggerFocus()\n const focusTarget = focusOutsideTarget()\n setFocusOutsideTarget(undefined)\n setRestoreTriggerFocus(false)\n if (shouldRestore) {\n // The saved focus may be the containing dialog rather than\n // the trigger when WebKit opens this menu from a pointer click.\n event.preventDefault()\n triggerElement()?.focus({ preventScroll: true })\n return\n }\n\n const parentDialog = portalMount()?.closest<HTMLElement>('[role=\"dialog\"]')\n const focusScope = parentDialog ?? portalMount()?.ownerDocument.body\n if (focusTarget?.isConnected && focusScope?.contains(focusTarget)) {\n // Preserve the intended in-scope destination across\n // Kobalte's deferred stale-focus restore.\n event.preventDefault()\n queueMicrotask(() => {\n if (lifecycleVersion !== focusLifecycleVersion || menuOpen()) return\n\n const activeElement = document.activeElement\n const isMenuFocus =\n activeElement instanceof HTMLElement &&\n activeElement.closest('[role=\"menu\"]') !== null\n const isTriggerFocus = activeElement === triggerElement()\n if (\n activeElement !== focusTarget &&\n (activeElement === document.body ||\n activeElement === focusScope ||\n isMenuFocus ||\n isTriggerFocus)\n ) {\n focusTarget.focus({ preventScroll: true })\n }\n })\n return\n }\n\n const activeElement = document.activeElement\n if (\n focusScope &&\n activeElement instanceof HTMLElement &&\n activeElement !== focusScope &&\n focusScope.contains(activeElement) &&\n activeElement.closest('[role=\"menu\"]') === null\n ) {\n // Preserve a real focus target in this scope instead of\n // restoring the stale element captured when the menu mounted. A\n // focused menu item is about to unmount, so Kobalte must restore\n // focus to the trigger instead.\n event.preventDefault()\n }\n }}\n >\n <DropdownMenuRadioGroup\n value={selected()?.id ?? ''}\n aria-label={`${props.label} options`}\n onChange={(id) => {\n if (!props.disabled && typeof id === 'string') props.onSelect(id)\n }}\n >\n <For each={props.options}>\n {(option) => (\n <DropdownMenuRadioItem\n value={option.id}\n textValue={option.name}\n closeOnSelect={true}\n disabled={props.disabled}\n onSelect={() => setRestoreTriggerFocus(true)}\n >\n <ThemeMenuPreview theme={option.preview} />\n <span class=\"flex min-w-0 flex-1 flex-col gap-0.5\">\n <span class=\"truncate\">{option.name}</span>\n {/* Visual affordance only: the accessible name stays the\n theme name, which is what keyboard and test callers\n match on. */}\n <Show when={option.description}>\n <span\n aria-hidden=\"true\"\n class=\"line-clamp-2 max-w-44 text-2xs text-muted-foreground\"\n >\n {option.description}\n </span>\n </Show>\n </span>\n </DropdownMenuRadioItem>\n )}\n </For>\n </DropdownMenuRadioGroup>\n </DropdownMenuContent>\n </DropdownMenu>\n </div>\n )\n}\n\n/**\n * A compact persistent theme choice for one appearance.\n */\nexport function ThemeRow(props: {\n appearance: 'light' | 'dark'\n selectedId: string\n preview: AdeaTheme\n themes: readonly AdeaThemeRecord[]\n disabled?: boolean\n onSelect: (id: string) => void\n}) {\n const label = () => (props.appearance === 'light' ? 'Light theme' : 'Dark theme')\n const options = createMemo<ThemeOption[]>(() =>\n props.themes\n .filter((theme) => theme.appearance === props.appearance)\n .map((theme) => ({\n id: theme.id,\n name: theme.name,\n description: theme.description,\n preview: theme,\n }))\n )\n return (\n <SettingsRow title={label()} icon={props.appearance === 'light' ? <Sun /> : <Moon />}>\n <ThemeSelectMenu\n label={label()}\n selectedId={props.selectedId}\n triggerPreview={props.preview}\n options={options()}\n disabled={props.disabled}\n onSelect={props.onSelect}\n />\n </SettingsRow>\n )\n}\n\n/**\n * A terminal palette choice independent of the light/dark rows. The first\n * option (`'theme'`) follows the interface theme, painted with the resolved\n * preview; every catalogue record follows, both appearances, because the\n * terminal paints one fixed ANSI palette rather than an appearance axis.\n */\nexport function TerminalRow(props: PinnedThemeRowProps) {\n return (\n <PinnedThemeRow {...props} title=\"Terminal\" subject=\"The terminal\" icon={<SquareTerminal />} />\n )\n}\n\n/**\n * The code palette (editor, diff and file views), chosen the same way as the\n * terminal: `'theme'` follows the interface theme, any catalogue record pins\n * that theme's syntax colours and the canvas they were measured on.\n */\nexport function CodeRow(props: PinnedThemeRowProps) {\n return <PinnedThemeRow {...props} title=\"Code\" subject=\"Code\" icon={<Code />} />\n}\n\ntype PinnedThemeRowProps = {\n selectedId: string\n /** Resolved interface theme: the `theme` option's palette and the fallback. */\n preview: AdeaTheme\n themes: readonly AdeaThemeRecord[]\n disabled?: boolean\n onSelect: (id: string) => void\n}\n\nfunction PinnedThemeRow(\n props: PinnedThemeRowProps & { title: string; subject: string; icon: JSX.Element }\n) {\n const options = createMemo<ThemeOption[]>(() => [\n {\n id: THEME_DEFAULT_ID,\n name: 'UI theme',\n description: 'Uses the interface theme.',\n preview: props.preview,\n },\n ...props.themes.map((theme) => ({\n id: theme.id,\n name: theme.name,\n description: theme.description,\n preview: theme,\n })),\n ])\n const selectedOption = createMemo(() => {\n const selectedId = props.selectedId\n return options().find((option) => option.id === selectedId)\n })\n const description = () => {\n const option = selectedOption()\n return option && option.id !== THEME_DEFAULT_ID\n ? `${props.subject} follows ${option.name}.`\n : `${props.subject} follows the interface theme.`\n }\n return (\n <SettingsRow title={props.title} icon={props.icon} description={description()}>\n <ThemeSelectMenu\n label={props.title}\n selectedId={props.selectedId}\n triggerPreview={selectedOption()?.preview ?? props.preview}\n options={options()}\n disabled={props.disabled}\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EACJ2C,MAAM;EACN3B,aAAa;EACb4B,SAAShC,MAAMgC;CACjB,GACA,GAAGhC,MAAMgH,OAAOE,KAAK1C,WAAW;EAC9B1C,IAAI0C,MAAM1C;EACVC,MAAMyC,MAAMzC;EACZ3B,aAAaoE,MAAMpE;EACnB4B,SAASwC;CACX,EAAE,CAAC,CACJ;CACD,MAAMiD,iBAAiBnJ,iBAAiB;EACtC,MAAM6D,aAAanC,MAAMmC;EACzB,OAAOE,QAAQ,CAAC,CAACiB,MAAMC,WAAWA,OAAOzB,OAAOK,UAAU;CAC5D,CAAC;CACD,MAAM/B,oBAAoB;EACxB,MAAMmD,SAASkE,eAAe;EAC9B,OAAOlE,UAAUA,OAAOzB,OAAAA,UACpB,GAAG9B,MAAMuH,QAAO,WAAYhE,OAAOxB,KAAI,KACvC,GAAG/B,MAAMuH,QAAO;CACtB;CACA,OAAAtG,gBACGlB,aAAW;EAAA,IAACE,QAAK;GAAA,OAAED,MAAMC;EAAK;EAAA,IAAEC,OAAI;GAAA,OAAEF,MAAME;EAAI;EAAA,IAAEE,cAAW;GAAA,OAAEA,YAAY;EAAC;EAAA,IAAAE,WAAA;GAAA,OAAAW,gBAC1EgB,iBAAe;IAAA,IACdC,QAAK;KAAA,OAAElC,MAAMC;IAAK;IAAA,IAClBkC,aAAU;KAAA,OAAEnC,MAAMmC;IAAU;IAAA,IAC5BC,iBAAc;KAAA,OAAEqF,eAAe,CAAC,EAAEzF,WAAWhC,MAAMgC;IAAO;IAAA,IAC1DK,UAAO;KAAA,OAAEA,QAAQ;IAAC;IAAA,IAClBC,WAAQ;KAAA,OAAEtC,MAAMsC;IAAQ;IAAA,IACxBC,WAAQ;KAAA,OAAEvC,MAAMuC;IAAQ;GAAA,CAAA;EAAA;CAAA,CAAA;AAIhC"}
|
|
@@ -12,6 +12,12 @@ export type AppearanceDraft = Readonly<{
|
|
|
12
12
|
* presence, not a second prop that could disagree with the draft.
|
|
13
13
|
*/
|
|
14
14
|
terminalThemeId?: string;
|
|
15
|
+
/**
|
|
16
|
+
* The code palette (editor, diff, file views), on the same rule as
|
|
17
|
+
* `terminalThemeId`: `'theme'` follows the interface theme, a theme id pins
|
|
18
|
+
* that theme's syntax colours and canvas. Optional; absent renders no row.
|
|
19
|
+
*/
|
|
20
|
+
codeThemeId?: string;
|
|
15
21
|
/** Theme default, a canonical preset id, or the host's custom accent draft. */
|
|
16
22
|
accent: string;
|
|
17
23
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appearance-types.d.ts","sourceRoot":"","sources":["../../../../src/components/composites/appearance-editor/appearance-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AACnC,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAC/E,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,+BAA+B,CAAA;AAEjF,MAAM,MAAM,eAAe,GAAG,QAAQ,CAAC;IACrC,IAAI,EAAE,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAA;IACjC,YAAY,EAAE,MAAM,CAAA;IACpB,WAAW,EAAE,MAAM,CAAA;IACnB;;;;;OAKG;IACH,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,+EAA+E;IAC/E,MAAM,EAAE,MAAM,CAAA;IACd;;;;OAIG;IACH,KAAK,CAAC,EAAE,4BAA4B,CAAA;IACpC,OAAO,EAAE,OAAO,GAAG,SAAS,GAAG,QAAQ,CAAA;IACvC,kBAAkB,EAAE,OAAO,CAAA;CAC5B,CAAC,CAAA;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,KAAK,EAAE,eAAe,CAAA;IACtB,8EAA8E;IAC9E,UAAU,EAAE,SAAS,CAAA;IACrB,SAAS,EAAE,SAAS,CAAA;IACpB,kBAAkB,EAAE,OAAO,GAAG,MAAM,CAAA;IACpC,MAAM,EAAE,SAAS,eAAe,EAAE,CAAA;IACl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AAG,qBAAqB,GAAG;IAC3D,IAAI,EAAE,OAAO,CAAA;IACb,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,SAAS,EAAE,MAAM,IAAI,CAAA;IACrB;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CACrC,CAAA"}
|
|
1
|
+
{"version":3,"file":"appearance-types.d.ts","sourceRoot":"","sources":["../../../../src/components/composites/appearance-editor/appearance-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AACnC,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAC/E,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,+BAA+B,CAAA;AAEjF,MAAM,MAAM,eAAe,GAAG,QAAQ,CAAC;IACrC,IAAI,EAAE,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAA;IACjC,YAAY,EAAE,MAAM,CAAA;IACpB,WAAW,EAAE,MAAM,CAAA;IACnB;;;;;OAKG;IACH,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,+EAA+E;IAC/E,MAAM,EAAE,MAAM,CAAA;IACd;;;;OAIG;IACH,KAAK,CAAC,EAAE,4BAA4B,CAAA;IACpC,OAAO,EAAE,OAAO,GAAG,SAAS,GAAG,QAAQ,CAAA;IACvC,kBAAkB,EAAE,OAAO,CAAA;CAC5B,CAAC,CAAA;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,KAAK,EAAE,eAAe,CAAA;IACtB,8EAA8E;IAC9E,UAAU,EAAE,SAAS,CAAA;IACrB,SAAS,EAAE,SAAS,CAAA;IACpB,kBAAkB,EAAE,OAAO,GAAG,MAAM,CAAA;IACpC,MAAM,EAAE,SAAS,eAAe,EAAE,CAAA;IAClC,aAAa,EAAE,SAAS,YAAY,EAAE,CAAA;IAC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AO,CAAA;IACb,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,SAAS,EAAE,MAAM,IAAI,CAAA;IACrB;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CACrC,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/** Keyboard-accessible tree rows with virtualization-aware focus handoff. */
|
|
2
|
-
export { Tree, TreeRow, TreeRowActions, type TreeDisclosure, type TreeProps, type TreeRowProps, } from './tree';
|
|
2
|
+
export { Tree, TreeRow, TreeRowActions, TreeStickyHeader, treeStickyAncestors, type TreeDisclosure, type TreeStickyHeaderProps, type TreeProps, type TreeRowProps, } from './tree';
|
|
3
3
|
export type { TreeItemDescriptor } from './tree-navigation';
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/composites/tree/index.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,OAAO,EACL,IAAI,EACJ,OAAO,EACP,cAAc,EACd,KAAK,cAAc,EACnB,KAAK,SAAS,EACd,KAAK,YAAY,GAClB,MAAM,QAAQ,CAAA;AACf,YAAY,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/composites/tree/index.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,OAAO,EACL,IAAI,EACJ,OAAO,EACP,cAAc,EACd,gBAAgB,EAChB,mBAAmB,EACnB,KAAK,cAAc,EACnB,KAAK,qBAAqB,EAC1B,KAAK,SAAS,EACd,KAAK,YAAY,GAClB,MAAM,QAAQ,CAAA;AACf,YAAY,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Tree, TreeRow, TreeRowActions } from "./tree.js";
|
|
1
|
+
export { Tree, TreeRow, TreeRowActions, TreeStickyHeader, treeStickyAncestors } from "./tree.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ComponentProps, JSX } from 'solid-js';
|
|
2
|
-
import { type TreeItemDescriptor } from './tree-navigation';
|
|
2
|
+
import { type TreeItemDescriptor, type TreeNavigationIndex } from './tree-navigation';
|
|
3
3
|
/**
|
|
4
4
|
* Who owns the pointer on a row's disclosure chevron.
|
|
5
5
|
*
|
|
@@ -134,5 +134,35 @@ export declare function TreeRow(props: TreeRowProps): JSX.Element;
|
|
|
134
134
|
export declare function TreeRowActions(props: ComponentProps<'span'> & {
|
|
135
135
|
pinned?: boolean;
|
|
136
136
|
}): JSX.Element;
|
|
137
|
+
export type TreeStickyHeaderProps = {
|
|
138
|
+
/** The first row in view; its expanded ancestors pin above it. Null pins nothing. */
|
|
139
|
+
topId: string | null;
|
|
140
|
+
/** A pinned folder's content: the same icon and name its row shows. */
|
|
141
|
+
label: (id: string) => JSX.Element;
|
|
142
|
+
/** A pinned folder was pressed; a file explorer scrolls its row into view. */
|
|
143
|
+
onSelect?: (id: string) => void;
|
|
144
|
+
/** The most ancestors pinned at once; the deepest ones win. Defaults to 5. */
|
|
145
|
+
maxRows?: number;
|
|
146
|
+
class?: string;
|
|
147
|
+
};
|
|
148
|
+
/**
|
|
149
|
+
* TreeStickyHeader.
|
|
150
|
+
*
|
|
151
|
+
* Pins the folders above the first row in view to the top of a scrolling tree, so a reader deep
|
|
152
|
+
* in a long folder still sees where they are (Zed's sticky scroll, VS Code's sticky tree). Put it
|
|
153
|
+
* first inside `Tree`, whose root is the scroll container. It takes no layout space: the pinned
|
|
154
|
+
* rows float over the rows beneath, so the host's row window math is unchanged.
|
|
155
|
+
*
|
|
156
|
+
* The pinned rows repeat rows the tree already exposes, so they are hidden from assistive
|
|
157
|
+
* technology and kept out of the tab order; they are a pointer shortcut only. The host decides
|
|
158
|
+
* which row is first in view (it owns the row window), and should pass the row under the pinned
|
|
159
|
+
* stack rather than the one at the very top, see `treeStickyAncestors`.
|
|
160
|
+
*/
|
|
161
|
+
export declare function TreeStickyHeader(props: TreeStickyHeaderProps): JSX.Element;
|
|
162
|
+
/**
|
|
163
|
+
* The expanded folders above `id`, outermost first. A host finds the row under the pinned stack
|
|
164
|
+
* by asking again for the row at `scrollTop + ancestors × rowHeight` until the answer settles.
|
|
165
|
+
*/
|
|
166
|
+
export declare function treeStickyAncestors(index: Pick<TreeNavigationIndex, 'byId'>, id: string | null): TreeItemDescriptor[];
|
|
137
167
|
export type { TreeItemDescriptor } from './tree-navigation';
|
|
138
168
|
//# sourceMappingURL=tree.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tree.d.ts","sourceRoot":"","sources":["../../../../src/components/composites/tree/tree.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAenD,OAAO,EAIL,KAAK,kBAAkB,
|
|
1
|
+
{"version":3,"file":"tree.d.ts","sourceRoot":"","sources":["../../../../src/components/composites/tree/tree.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAenD,OAAO,EAIL,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACzB,MAAM,mBAAmB,CAAA;AAgC1B;;;;;;;;;;GAUG;AACH,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,QAAQ,CAAA;AAE7C,KAAK,kBAAkB,GACnB;IAAE,YAAY,EAAE,MAAM,CAAC;IAAC,iBAAiB,CAAC,EAAE,MAAM,CAAA;CAAE,GACpD;IAAE,YAAY,CAAC,EAAE,MAAM,CAAC;IAAC,iBAAiB,EAAE,MAAM,CAAA;CAAE,CAAA;AAExD,MAAM,MAAM,SAAS,GAAG,IAAI,CAC1B,cAAc,CAAC,KAAK,CAAC,EACrB,UAAU,GAAG,MAAM,GAAG,UAAU,GAAG,WAAW,GAAG,YAAY,GAAG,iBA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