@adea-ai/ui 0.110.0 → 0.111.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.
Files changed (100) hide show
  1. package/dist/components/composites/account-menu/account-menu.js +1 -1
  2. package/dist/components/composites/action-button/action-button.js +1 -1
  3. package/dist/components/composites/appearance-editor/accent-swatch-groups.d.ts +17 -2
  4. package/dist/components/composites/appearance-editor/accent-swatch-groups.d.ts.map +1 -1
  5. package/dist/components/composites/appearance-editor/accent-swatch-groups.js +47 -122
  6. package/dist/components/composites/appearance-editor/accent-swatch-groups.js.map +1 -1
  7. package/dist/components/composites/appearance-editor/appearance-choices.d.ts.map +1 -1
  8. package/dist/components/composites/appearance-editor/appearance-choices.js +0 -4
  9. package/dist/components/composites/appearance-editor/appearance-choices.js.map +1 -1
  10. package/dist/components/composites/appearance-editor/appearance-editor.js +1 -1
  11. package/dist/components/composites/appearance-editor/font-settings-group.d.ts.map +1 -1
  12. package/dist/components/composites/appearance-editor/font-settings-group.js +60 -68
  13. package/dist/components/composites/appearance-editor/font-settings-group.js.map +1 -1
  14. package/dist/components/composites/appearance-editor/index.js +1 -1
  15. package/dist/components/layout/split-layout/split-layout.d.ts.map +1 -1
  16. package/dist/components/layout/split-layout/split-layout.js +5 -2
  17. package/dist/components/layout/split-layout/split-layout.js.map +1 -1
  18. package/dist/components/theme/appearance-panel.d.ts.map +1 -1
  19. package/dist/components/theme/appearance-panel.js +0 -3
  20. package/dist/components/theme/appearance-panel.js.map +1 -1
  21. package/dist/components/ui/alert-dialog/alert-dialog.js +2 -2
  22. package/dist/components/ui/alert-dialog/alert-dialog.js.map +1 -1
  23. package/dist/components/ui/combobox/combobox.d.ts.map +1 -1
  24. package/dist/components/ui/combobox/combobox.js +1 -1
  25. package/dist/components/ui/combobox/combobox.js.map +1 -1
  26. package/dist/components/ui/context-menu/context-menu.d.ts.map +1 -1
  27. package/dist/components/ui/context-menu/context-menu.js +2 -2
  28. package/dist/components/ui/context-menu/context-menu.js.map +1 -1
  29. package/dist/components/ui/dialog/dialog.d.ts.map +1 -1
  30. package/dist/components/ui/dialog/dialog.js +17 -11
  31. package/dist/components/ui/dialog/dialog.js.map +1 -1
  32. package/dist/components/ui/drawer/drawer.js +1 -1
  33. package/dist/components/ui/drawer/drawer.js.map +1 -1
  34. package/dist/components/ui/dropdown-menu/dropdown-menu.d.ts +22 -2
  35. package/dist/components/ui/dropdown-menu/dropdown-menu.d.ts.map +1 -1
  36. package/dist/components/ui/dropdown-menu/dropdown-menu.js +79 -30
  37. package/dist/components/ui/dropdown-menu/dropdown-menu.js.map +1 -1
  38. package/dist/components/ui/dropdown-menu/index.d.ts +1 -0
  39. package/dist/components/ui/dropdown-menu/index.d.ts.map +1 -1
  40. package/dist/components/ui/menubar/menubar.d.ts.map +1 -1
  41. package/dist/components/ui/menubar/menubar.js +2 -2
  42. package/dist/components/ui/menubar/menubar.js.map +1 -1
  43. package/dist/components/ui/select/index.d.ts +1 -0
  44. package/dist/components/ui/select/index.d.ts.map +1 -1
  45. package/dist/components/ui/select/select.d.ts +7 -1
  46. package/dist/components/ui/select/select.d.ts.map +1 -1
  47. package/dist/components/ui/select/select.js +34 -20
  48. package/dist/components/ui/select/select.js.map +1 -1
  49. package/dist/components/ui/sheet/sheet.js +1 -1
  50. package/dist/components/ui/sheet/sheet.js.map +1 -1
  51. package/dist/components/ui/tooltip/tooltip.d.ts +16 -6
  52. package/dist/components/ui/tooltip/tooltip.d.ts.map +1 -1
  53. package/dist/components/ui/tooltip/tooltip.js +17 -6
  54. package/dist/components/ui/tooltip/tooltip.js.map +1 -1
  55. package/dist/index.js +2 -2
  56. package/dist/lib/overlay.d.ts +30 -1
  57. package/dist/lib/overlay.d.ts.map +1 -1
  58. package/dist/lib/overlay.js +37 -2
  59. package/dist/lib/overlay.js.map +1 -1
  60. package/dist/r/dialog.json +1 -0
  61. package/dist/r/registry.json +2 -1
  62. package/dist/r/split-layout.json +1 -1
  63. package/dist/r/src/components/composites/appearance-editor/accent-swatch-groups.tsx +33 -86
  64. package/dist/r/src/components/composites/appearance-editor/appearance-choices.tsx +0 -3
  65. package/dist/r/src/components/composites/appearance-editor/font-settings-group.tsx +20 -7
  66. package/dist/r/src/components/layout/split-layout/split-layout.tsx +4 -3
  67. package/dist/r/src/components/theme/appearance-panel.tsx +0 -1
  68. package/dist/r/src/components/ui/alert-dialog/alert-dialog.tsx +2 -2
  69. package/dist/r/src/components/ui/combobox/combobox.tsx +3 -1
  70. package/dist/r/src/components/ui/context-menu/context-menu.tsx +6 -2
  71. package/dist/r/src/components/ui/dialog/dialog.tsx +19 -12
  72. package/dist/r/src/components/ui/drawer/drawer.tsx +1 -1
  73. package/dist/r/src/components/ui/dropdown-menu/dropdown-menu.tsx +44 -6
  74. package/dist/r/src/components/ui/dropdown-menu/index.ts +1 -0
  75. package/dist/r/src/components/ui/menubar/menubar.tsx +6 -2
  76. package/dist/r/src/components/ui/select/index.ts +1 -0
  77. package/dist/r/src/components/ui/select/select.tsx +31 -6
  78. package/dist/r/src/components/ui/sheet/sheet.tsx +1 -1
  79. package/dist/r/src/components/ui/tooltip/tooltip.tsx +34 -3
  80. package/dist/r/src/lib/overlay.ts +45 -1
  81. package/package.json +1 -1
  82. package/registry.json +2 -1
  83. package/src/components/composites/appearance-editor/accent-swatch-groups.tsx +33 -86
  84. package/src/components/composites/appearance-editor/appearance-choices.tsx +0 -3
  85. package/src/components/composites/appearance-editor/font-settings-group.tsx +20 -7
  86. package/src/components/layout/split-layout/split-layout.tsx +4 -3
  87. package/src/components/theme/appearance-panel.tsx +0 -1
  88. package/src/components/ui/alert-dialog/alert-dialog.tsx +2 -2
  89. package/src/components/ui/combobox/combobox.tsx +3 -1
  90. package/src/components/ui/context-menu/context-menu.tsx +6 -2
  91. package/src/components/ui/dialog/dialog.tsx +19 -12
  92. package/src/components/ui/drawer/drawer.tsx +1 -1
  93. package/src/components/ui/dropdown-menu/dropdown-menu.tsx +44 -6
  94. package/src/components/ui/dropdown-menu/index.ts +1 -0
  95. package/src/components/ui/menubar/menubar.tsx +6 -2
  96. package/src/components/ui/select/index.ts +1 -0
  97. package/src/components/ui/select/select.tsx +31 -6
  98. package/src/components/ui/sheet/sheet.tsx +1 -1
  99. package/src/components/ui/tooltip/tooltip.tsx +34 -3
  100. package/src/lib/overlay.ts +45 -1
@@ -1 +1 @@
1
- {"version":3,"file":"font-settings-group.js","names":["BookOpen","ChevronDown","Code2","PanelsTopLeft","For","createMemo","createSignal","createUniqueId","fontOptions","Button","DropdownMenu","DropdownMenuContent","DropdownMenuRadioGroup","DropdownMenuRadioItem","DropdownMenuSeparator","DropdownMenuTrigger","InputControl","SettingsRow","APPEARANCE_EDITOR_FONT_SIZE_MAX","APPEARANCE_EDITOR_FONT_SIZE_MIN","normalizeAppearanceEditorFontSettings","normalizeAppearanceEditorFontSize","AppearanceEditorFontAxis","AppearanceEditorFontFamilyId","AppearanceEditorFontSettings","AppearanceFontSettingsGroupProps","settings","menuPortalMount","HTMLElement","onChange","disabled","FONT_ROWS","axis","label","description","icon","const","catalogFontOptions","filter","option","id","MENU_FOCUS_TARGET_SELECTOR","isMenuTabStop","element","tabIndex","matches","hasAttribute","getAttribute","closest","getClientRects","length","FontFamilyMenu","props","family","onSelect","menuOpen","setMenuOpen","restoreTriggerFocus","setRestoreTriggerFocus","triggerElement","setTriggerElement","HTMLButtonElement","focusTargetAfterTab","moveFocusOnTab","event","KeyboardEvent","key","isComposing","trigger","owner","parentDialog","focusScope","ownerDocument","body","focusStops","Array","from","querySelectorAll","orderedFocusStops","toSorted","a","b","triggerIndex","indexOf","direction","shiftKey","adjacent","at","stopPropagation","preventDefault","focus","preventScroll","undefined","selectedLabel","find","_$createComponent","modal","open","onOpenChange","children","ref","as","variant","size","aria-label","_el$","_tmpl$","_$insert","hideArrow","portalMount","onFocusOutside","defaultPrevented","detail","originalEvent","target","contains","onInteractOutside","type","Element","focusTarget","onKeyDown","onEscapeKeyDown","onCloseAutoFocus","queueMicrotask","isConnected","value","closeOnSelect","candidate","each","AppearanceFontSettingsGroup","sizeDrafts","setSizeDrafts","Partial","Record","sizeHintPrefix","updateAxis","patch","current","commitSize","input","next","_el$2","_tmpl$2","row","Icon","inputValue","String","sizeHintId","sizeIsInvalid","draft","trim","parsed","Number","isFinite","isInteger","title","_el$3","_tmpl$3","_el$4","firstChild","_el$5","_el$6","nextSibling","_el$7","_el$1","_el$8","_el$10","_el$0","min","max","step","aria-invalid","onInput","currentTarget","onBlur","_$setAttribute","_$createComponent"],"sources":["../../../../src/components/composites/appearance-editor/font-settings-group.tsx"],"sourcesContent":["import { BookOpen, ChevronDown, Code2, PanelsTopLeft } from 'lucide-solid'\nimport { For, createMemo, createSignal, createUniqueId } from 'solid-js'\nimport { fontOptions } from '#lib/font-catalog'\nimport { Button } from '../../ui/button/button'\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from '../../ui/dropdown-menu/dropdown-menu'\nimport { InputControl } from '../../ui/input/input-control'\nimport { SettingsRow } from './appearance-rows'\nimport {\n APPEARANCE_EDITOR_FONT_SIZE_MAX,\n APPEARANCE_EDITOR_FONT_SIZE_MIN,\n normalizeAppearanceEditorFontSettings,\n normalizeAppearanceEditorFontSize,\n type AppearanceEditorFontAxis,\n type AppearanceEditorFontFamilyId,\n type AppearanceEditorFontSettings,\n} from '#lib/appearance-font-settings'\n\nexport type AppearanceFontSettingsGroupProps = {\n settings: AppearanceEditorFontSettings\n menuPortalMount?: HTMLElement\n onChange: (settings: AppearanceEditorFontSettings) => void\n disabled?: boolean\n}\n\nconst FONT_ROWS = [\n {\n axis: 'ui',\n label: 'UI',\n description: 'Controls and interface labels.',\n icon: PanelsTopLeft,\n },\n {\n axis: 'content',\n label: 'Content',\n description: 'Reading and long-form text.',\n icon: BookOpen,\n },\n {\n axis: 'code',\n label: 'Code',\n description: 'Code, terminals, and file paths.',\n icon: Code2,\n },\n] as const satisfies readonly {\n axis: AppearanceEditorFontAxis\n label: string\n description: string\n icon: typeof PanelsTopLeft\n}[]\n\nconst catalogFontOptions = fontOptions.filter((option) => option.id !== 'system')\nconst MENU_FOCUS_TARGET_SELECTOR =\n 'a[href], area[href], button, input, select, textarea, iframe, [tabindex], [contenteditable], details > summary:first-of-type'\n\nfunction isMenuTabStop(element: HTMLElement) {\n return (\n (element.tabIndex >= 0 ||\n (element.matches('details > summary:first-of-type') && !element.hasAttribute('tabindex'))) &&\n !element.matches(':disabled') &&\n element.getAttribute('aria-disabled') !== 'true' &&\n element.closest('[hidden], [inert], [aria-hidden=\"true\"]') === null &&\n element.getClientRects().length > 0\n )\n}\n\nfunction FontFamilyMenu(props: {\n label: string\n family: AppearanceEditorFontFamilyId\n menuPortalMount?: HTMLElement\n disabled?: boolean\n onSelect: (family: AppearanceEditorFontFamilyId) => void\n}) {\n const [menuOpen, setMenuOpen] = createSignal(false)\n const [restoreTriggerFocus, setRestoreTriggerFocus] = createSignal(false)\n const [triggerElement, setTriggerElement] = createSignal<HTMLButtonElement>()\n let focusTargetAfterTab: HTMLElement | undefined\n\n const moveFocusOnTab = (event: KeyboardEvent) => {\n if (event.key !== 'Tab' || event.isComposing) return\n\n const trigger = triggerElement()\n const owner = props.menuPortalMount\n const parentDialog = owner?.closest<HTMLElement>('[role=\"dialog\"]')\n const focusScope = parentDialog ?? owner?.ownerDocument.body\n if (!trigger || !parentDialog || !focusScope) return\n\n const focusStops = Array.from(focusScope.querySelectorAll<HTMLElement>('*')).filter(\n (element) =>\n isMenuTabStop(element) &&\n element.closest('[role=\"menu\"], [hidden], [inert], [aria-hidden=\"true\"]') === null\n )\n const orderedFocusStops = [\n ...focusStops\n .filter((element) => element.tabIndex > 0)\n .toSorted((a, b) => a.tabIndex - b.tabIndex),\n ...focusStops.filter((element) => element.tabIndex <= 0),\n ]\n const triggerIndex = orderedFocusStops.indexOf(trigger)\n if (triggerIndex < 0) return\n const direction = event.shiftKey ? -1 : 1\n const adjacent =\n orderedFocusStops[triggerIndex + direction] ??\n (direction > 0 ? orderedFocusStops[0] : orderedFocusStops.at(-1))\n\n event.stopPropagation()\n setRestoreTriggerFocus(false)\n if (adjacent) {\n event.preventDefault()\n focusTargetAfterTab = adjacent\n setMenuOpen(false)\n adjacent.focus({ preventScroll: true })\n } else {\n focusTargetAfterTab = undefined\n setMenuOpen(false)\n }\n }\n const selectedLabel = () =>\n fontOptions.find((option) => option.id === props.family)?.label ??\n fontOptions.find((option) => option.id === 'system')?.label ??\n 'System'\n\n return (\n <DropdownMenu\n modal={false}\n open={menuOpen()}\n onOpenChange={(open) => {\n setMenuOpen(open)\n if (open) setRestoreTriggerFocus(false)\n }}\n >\n <DropdownMenuTrigger\n ref={setTriggerElement}\n as={Button}\n variant=\"outline\"\n size=\"sm\"\n aria-label={`${props.label} font family`}\n disabled={props.disabled}\n class=\"w-40 max-w-full justify-between\"\n >\n <span class=\"truncate\">{selectedLabel()}</span>\n <ChevronDown aria-hidden=\"true\" class=\"ms-2 size-4 shrink-0 text-muted-foreground\" />\n </DropdownMenuTrigger>\n <DropdownMenuContent\n hideArrow\n portalMount={props.menuPortalMount}\n class=\"min-w-48\"\n onFocusOutside={(event) => {\n // WebKit may briefly focus the owning Popover root while the menu's\n // focus scope starts. Keep the menu open for that transient target;\n // genuine focus moves to another control still dismiss it.\n if (\n !event.defaultPrevented &&\n props.menuPortalMount &&\n event.detail.originalEvent.target === props.menuPortalMount\n ) {\n setRestoreTriggerFocus(true)\n event.preventDefault()\n } else if (\n event.detail.originalEvent.target instanceof HTMLElement &&\n props.menuPortalMount?.contains(event.detail.originalEvent.target)\n ) {\n setRestoreTriggerFocus(false)\n }\n }}\n onInteractOutside={(event) => {\n if (event.detail.originalEvent.type !== 'pointerdown') return\n const owner = props.menuPortalMount\n const target = event.detail.originalEvent.target\n if (!(target instanceof Element) || !owner?.contains(target)) return\n\n const focusTarget = target.closest<HTMLElement>(MENU_FOCUS_TARGET_SELECTOR)\n setRestoreTriggerFocus(!focusTarget || !isMenuTabStop(focusTarget))\n }}\n onKeyDown={moveFocusOnTab}\n onEscapeKeyDown={() => setRestoreTriggerFocus(true)}\n onCloseAutoFocus={(event) => {\n if (menuOpen()) {\n event.preventDefault()\n return\n }\n if (focusTargetAfterTab) {\n const focusTarget = focusTargetAfterTab\n focusTargetAfterTab = undefined\n event.preventDefault()\n queueMicrotask(() => {\n if (!menuOpen() && focusTarget.isConnected) {\n focusTarget.focus({ preventScroll: true })\n }\n })\n return\n }\n if (!restoreTriggerFocus()) return\n\n event.preventDefault()\n setRestoreTriggerFocus(false)\n const trigger = triggerElement()\n if (\n trigger?.isConnected &&\n !trigger.disabled &&\n trigger.closest('[hidden], [inert], [aria-hidden=\"true\"]') === null &&\n trigger.getClientRects().length > 0\n ) {\n trigger.focus({ preventScroll: true })\n }\n }}\n >\n <DropdownMenuRadioGroup\n value={props.family}\n aria-label={`${props.label} system font`}\n onChange={(family) => {\n if (family === 'system') props.onSelect('system')\n }}\n >\n <DropdownMenuRadioItem value=\"system\" closeOnSelect>\n System\n </DropdownMenuRadioItem>\n </DropdownMenuRadioGroup>\n <DropdownMenuSeparator />\n <DropdownMenuRadioGroup\n value={props.family}\n aria-label={`${props.label} available fonts`}\n onChange={(family) => {\n const option = fontOptions.find((candidate) => candidate.id === family)\n if (option && option.id !== 'system') props.onSelect(option.id)\n }}\n >\n <For each={catalogFontOptions}>\n {(option) => (\n <DropdownMenuRadioItem value={option.id} closeOnSelect>\n {option.label}\n </DropdownMenuRadioItem>\n )}\n </For>\n </DropdownMenuRadioGroup>\n </DropdownMenuContent>\n </DropdownMenu>\n )\n}\n\n/** Controlled font controls shared by AppearanceEditor and host-owned settings. */\nexport function AppearanceFontSettingsGroup(props: AppearanceFontSettingsGroupProps) {\n const [sizeDrafts, setSizeDrafts] = createSignal<\n Partial<Record<AppearanceEditorFontAxis, string>>\n >({})\n const sizeHintPrefix = createUniqueId()\n const settings = createMemo(() => normalizeAppearanceEditorFontSettings(props.settings).settings)\n\n const updateAxis = (\n axis: AppearanceEditorFontAxis,\n patch: { family?: AppearanceEditorFontFamilyId; size?: number }\n ) => {\n const current = settings()\n props.onChange({\n ...current,\n [axis]: {\n ...current[axis],\n ...patch,\n },\n })\n }\n\n const commitSize = (axis: AppearanceEditorFontAxis) => {\n const input = sizeDrafts()[axis]\n if (input === undefined) return\n const size = normalizeAppearanceEditorFontSize(input, settings()[axis].size)\n setSizeDrafts((current) => {\n const next = { ...current }\n delete next[axis]\n return next\n })\n if (size !== settings()[axis].size) updateAxis(axis, { size })\n }\n\n return (\n <div class=\"global-appearance-font-settings\">\n <For each={FONT_ROWS}>\n {(row) => {\n const Icon = row.icon\n const value = () => settings()[row.axis]\n const inputValue = () => sizeDrafts()[row.axis] ?? String(value().size)\n const sizeHintId = `${sizeHintPrefix}-${row.axis}-font-size-help`\n const sizeIsInvalid = () => {\n const draft = sizeDrafts()[row.axis]\n if (draft === undefined || draft.trim() === '') return false\n const parsed = Number(draft)\n return (\n !Number.isFinite(parsed) ||\n !Number.isInteger(parsed) ||\n parsed < APPEARANCE_EDITOR_FONT_SIZE_MIN ||\n parsed > APPEARANCE_EDITOR_FONT_SIZE_MAX\n )\n }\n return (\n <SettingsRow title={row.label} icon={<Icon />} description={row.description}>\n <div class=\"flex min-w-0 max-w-full flex-wrap items-center gap-2\">\n <FontFamilyMenu\n label={row.label}\n family={value().family}\n menuPortalMount={props.menuPortalMount}\n disabled={props.disabled}\n onSelect={(family) => updateAxis(row.axis, { family })}\n />\n <div class=\"flex shrink-0 items-center gap-1\">\n <InputControl\n type=\"number\"\n min={APPEARANCE_EDITOR_FONT_SIZE_MIN}\n max={APPEARANCE_EDITOR_FONT_SIZE_MAX}\n step={1}\n value={inputValue()}\n disabled={props.disabled}\n aria-label={`${row.label} font size in pixels`}\n aria-describedby={sizeHintId}\n aria-invalid={sizeIsInvalid()}\n class=\"w-16\"\n onInput={(event) =>\n setSizeDrafts((current) => ({\n ...current,\n [row.axis]: event.currentTarget.value,\n }))\n }\n onBlur={() => commitSize(row.axis)}\n onKeyDown={(event) => {\n if (event.key !== 'Enter') return\n event.preventDefault()\n commitSize(row.axis)\n }}\n />\n <span aria-hidden=\"true\" class=\"text-xs text-muted-foreground\">\n px\n </span>\n </div>\n <span id={sizeHintId} class=\"sr-only\">\n Enter a whole number from {APPEARANCE_EDITOR_FONT_SIZE_MIN} to{' '}\n {APPEARANCE_EDITOR_FONT_SIZE_MAX} pixels.\n </span>\n </div>\n </SettingsRow>\n )\n }}\n </For>\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;;;AA+BA,IAAM+B,YAAY;CAChB;EACEC,MAAM;EACNC,OAAO;EACPC,aAAa;EACbC,MAAMhC;CACR;CACA;EACE6B,MAAM;EACNC,OAAO;EACPC,aAAa;EACbC,MAAMnC;CACR;CACA;EACEgC,MAAM;EACNC,OAAO;EACPC,aAAa;EACbC,MAAMjC;CACR;AAAC;AAQH,IAAMmC,qBAAqB7B,YAAY8B,QAAQC,WAAWA,OAAOC,OAAO,QAAQ;AAChF,IAAMC,6BACJ;AAEF,SAASC,cAAcC,SAAsB;CAC3C,QACGA,QAAQC,YAAY,KAClBD,QAAQE,QAAQ,iCAAiC,KAAK,CAACF,QAAQG,aAAa,UAAU,MACzF,CAACH,QAAQE,QAAQ,WAAW,KAC5BF,QAAQI,aAAa,eAAe,MAAM,UAC1CJ,QAAQK,QAAQ,2CAAyC,MAAM,QAC/DL,QAAQM,eAAe,CAAC,CAACC,SAAS;AAEtC;AAEA,SAASC,eAAeC,OAMrB;CACD,MAAM,CAACG,UAAUC,eAAelD,aAAa,KAAK;CAClD,MAAM,CAACmD,qBAAqBC,0BAA0BpD,aAAa,KAAK;CACxE,MAAM,CAACqD,gBAAgBC,qBAAqBtD,aAAgC;CAC5E,IAAIwD;CAEJ,MAAMC,kBAAkBC,UAAyB;EAC/C,IAAIA,MAAME,QAAQ,SAASF,MAAMG,aAAa;EAE9C,MAAMC,UAAUT,eAAe;EAC/B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AAMtB;OAAQ;OACxBwB,WAAWD,WAAWkF,WAAWQ,IAAI/G,MAAM,EAAEqB,OAAO,CAAC;MAAC,CAAA,GAAAyG,KAAA;MAAAnD,OAAAmD,OAAA/D,gBAGrD/E,cAAY;OACXqG,MAAI;OACJmD,KAAAA;OACAC,KAAAA;OACAC,MAAM;OAAC,IACP7C,QAAK;QAAA,OAAEoB,WAAW;OAAC;OAAA,IACnBnH,WAAQ;QAAA,OAAEsB,MAAMtB;OAAQ;OAAA,KAAA,gBAAA;QAAA,OACZ,GAAGiH,IAAI9G,MAAK;OAAsB;OAAA,oBAC5BkH;OAAU,KAAA,kBAAA;QAAA,OACdC,cAAc;OAAC;OAAA,SAAA;OAE7BwB,UAAU5G,UACRmE,eAAeM,aAAa;QAC1B,GAAGA;SACFM,IAAI/G,OAAOgC,MAAM6G,cAAchD;OAClC,EAAE;OAEJiD,cAAcpC,WAAWK,IAAI/G,IAAI;OACjCwF,YAAYxD,UAAU;QACpB,IAAIA,MAAME,QAAQ,SAAS;QAC3BF,MAAMyB,eAAe;QACrBiD,WAAWK,IAAI/G,IAAI;OACrB;MAAC,CAAA,GAAAgI,KAAA;MAAAe,aAAAd,OAAA,MAMKd,UAAU;MAAAxC,OAAAsD,OAAAA,IACwCG,KAAA;MAAAzD,OAAAsD,OAAAA,IAC1BK,MAAA;MAAA,OAAAV;KAAA;IAAA,CAAA;GAK1C;EAAC,CAAA,CAAA;EAAA,OAAAf;CAAA,EAAA,CAAA;AAIT"}
1
+ {"version":3,"file":"font-settings-group.js","names":["BookOpen","ChevronDown","Code2","PanelsTopLeft","For","createMemo","createSignal","createUniqueId","fontOptions","Button","DropdownMenu","DropdownMenuContent","DropdownMenuRadioGroup","DropdownMenuRadioItem","DropdownMenuSeparator","DropdownMenuTrigger","InputControl","APPEARANCE_EDITOR_FONT_SIZE_MAX","APPEARANCE_EDITOR_FONT_SIZE_MIN","normalizeAppearanceEditorFontSettings","normalizeAppearanceEditorFontSize","AppearanceEditorFontAxis","AppearanceEditorFontFamilyId","AppearanceEditorFontSettings","AppearanceFontSettingsGroupProps","settings","menuPortalMount","HTMLElement","onChange","disabled","FONT_ROWS","axis","label","description","icon","const","catalogFontOptions","filter","option","id","MENU_FOCUS_TARGET_SELECTOR","isMenuTabStop","element","tabIndex","matches","hasAttribute","getAttribute","closest","getClientRects","length","FontFamilyMenu","props","family","onSelect","menuOpen","setMenuOpen","restoreTriggerFocus","setRestoreTriggerFocus","triggerElement","setTriggerElement","HTMLButtonElement","focusTargetAfterTab","moveFocusOnTab","event","KeyboardEvent","key","isComposing","trigger","owner","parentDialog","focusScope","ownerDocument","body","focusStops","Array","from","querySelectorAll","orderedFocusStops","toSorted","a","b","triggerIndex","indexOf","direction","shiftKey","adjacent","at","stopPropagation","preventDefault","focus","preventScroll","undefined","selectedLabel","find","_$createComponent","modal","open","onOpenChange","children","ref","as","variant","size","aria-label","_el$","_tmpl$","_$insert","hideArrow","portalMount","onFocusOutside","defaultPrevented","detail","originalEvent","target","contains","onInteractOutside","type","Element","focusTarget","onKeyDown","onEscapeKeyDown","onCloseAutoFocus","queueMicrotask","isConnected","value","closeOnSelect","candidate","each","AppearanceFontSettingsGroup","sizeDrafts","setSizeDrafts","Partial","Record","sizeHintPrefix","updateAxis","patch","current","commitSize","input","next","_el$2","_tmpl$2","row","Icon","inputValue","String","sizeHintId","sizeIsInvalid","draft","trim","parsed","Number","isFinite","isInteger","_el$3","_tmpl$3","_el$4","firstChild","_el$5","nextSibling","_el$6","_el$7","_el$8","_el$9","_el$0","_el$1","_el$10","_el$14","_el$11","_el$15","_el$13","min","max","step","aria-invalid","onInput","currentTarget","onBlur","_$setAttribute","_$effect","_$createComponent","_$setAttribute"],"sources":["../../../../src/components/composites/appearance-editor/font-settings-group.tsx"],"sourcesContent":["import { BookOpen, ChevronDown, Code2, PanelsTopLeft } from 'lucide-solid'\nimport { For, createMemo, createSignal, createUniqueId } from 'solid-js'\nimport { fontOptions } from '#lib/font-catalog'\nimport { Button } from '../../ui/button/button'\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from '../../ui/dropdown-menu/dropdown-menu'\nimport { InputControl } from '../../ui/input/input-control'\nimport {\n APPEARANCE_EDITOR_FONT_SIZE_MAX,\n APPEARANCE_EDITOR_FONT_SIZE_MIN,\n normalizeAppearanceEditorFontSettings,\n normalizeAppearanceEditorFontSize,\n type AppearanceEditorFontAxis,\n type AppearanceEditorFontFamilyId,\n type AppearanceEditorFontSettings,\n} from '#lib/appearance-font-settings'\n\nexport type AppearanceFontSettingsGroupProps = {\n settings: AppearanceEditorFontSettings\n menuPortalMount?: HTMLElement\n onChange: (settings: AppearanceEditorFontSettings) => void\n disabled?: boolean\n}\n\nconst FONT_ROWS = [\n {\n axis: 'ui',\n label: 'UI',\n description: 'Controls and interface labels.',\n icon: PanelsTopLeft,\n },\n {\n axis: 'content',\n label: 'Content',\n description: 'Reading and long-form text.',\n icon: BookOpen,\n },\n {\n axis: 'code',\n label: 'Code',\n description: 'Code, terminals, and file paths.',\n icon: Code2,\n },\n] as const satisfies readonly {\n axis: AppearanceEditorFontAxis\n label: string\n description: string\n icon: typeof PanelsTopLeft\n}[]\n\nconst catalogFontOptions = fontOptions.filter((option) => option.id !== 'system')\nconst MENU_FOCUS_TARGET_SELECTOR =\n 'a[href], area[href], button, input, select, textarea, iframe, [tabindex], [contenteditable], details > summary:first-of-type'\n\nfunction isMenuTabStop(element: HTMLElement) {\n return (\n (element.tabIndex >= 0 ||\n (element.matches('details > summary:first-of-type') && !element.hasAttribute('tabindex'))) &&\n !element.matches(':disabled') &&\n element.getAttribute('aria-disabled') !== 'true' &&\n element.closest('[hidden], [inert], [aria-hidden=\"true\"]') === null &&\n element.getClientRects().length > 0\n )\n}\n\nfunction FontFamilyMenu(props: {\n label: string\n family: AppearanceEditorFontFamilyId\n menuPortalMount?: HTMLElement\n disabled?: boolean\n onSelect: (family: AppearanceEditorFontFamilyId) => void\n}) {\n const [menuOpen, setMenuOpen] = createSignal(false)\n const [restoreTriggerFocus, setRestoreTriggerFocus] = createSignal(false)\n const [triggerElement, setTriggerElement] = createSignal<HTMLButtonElement>()\n let focusTargetAfterTab: HTMLElement | undefined\n\n const moveFocusOnTab = (event: KeyboardEvent) => {\n if (event.key !== 'Tab' || event.isComposing) return\n\n const trigger = triggerElement()\n const owner = props.menuPortalMount\n const parentDialog = owner?.closest<HTMLElement>('[role=\"dialog\"]')\n const focusScope = parentDialog ?? owner?.ownerDocument.body\n if (!trigger || !parentDialog || !focusScope) return\n\n const focusStops = Array.from(focusScope.querySelectorAll<HTMLElement>('*')).filter(\n (element) =>\n isMenuTabStop(element) &&\n element.closest('[role=\"menu\"], [hidden], [inert], [aria-hidden=\"true\"]') === null\n )\n const orderedFocusStops = [\n ...focusStops\n .filter((element) => element.tabIndex > 0)\n .toSorted((a, b) => a.tabIndex - b.tabIndex),\n ...focusStops.filter((element) => element.tabIndex <= 0),\n ]\n const triggerIndex = orderedFocusStops.indexOf(trigger)\n if (triggerIndex < 0) return\n const direction = event.shiftKey ? -1 : 1\n const adjacent =\n orderedFocusStops[triggerIndex + direction] ??\n (direction > 0 ? orderedFocusStops[0] : orderedFocusStops.at(-1))\n\n event.stopPropagation()\n setRestoreTriggerFocus(false)\n if (adjacent) {\n event.preventDefault()\n focusTargetAfterTab = adjacent\n setMenuOpen(false)\n adjacent.focus({ preventScroll: true })\n } else {\n focusTargetAfterTab = undefined\n setMenuOpen(false)\n }\n }\n const selectedLabel = () =>\n fontOptions.find((option) => option.id === props.family)?.label ??\n fontOptions.find((option) => option.id === 'system')?.label ??\n 'System'\n\n return (\n <DropdownMenu\n modal={false}\n open={menuOpen()}\n onOpenChange={(open) => {\n setMenuOpen(open)\n if (open) setRestoreTriggerFocus(false)\n }}\n >\n <DropdownMenuTrigger\n ref={setTriggerElement}\n as={Button}\n variant=\"outline\"\n size=\"sm\"\n aria-label={`${props.label} font family`}\n disabled={props.disabled}\n class=\"w-32 max-w-full justify-between\"\n >\n <span class=\"truncate\">{selectedLabel()}</span>\n <ChevronDown aria-hidden=\"true\" class=\"ms-2 size-4 shrink-0 text-muted-foreground\" />\n </DropdownMenuTrigger>\n <DropdownMenuContent\n hideArrow\n portalMount={props.menuPortalMount}\n class=\"min-w-48\"\n onFocusOutside={(event) => {\n // WebKit may briefly focus the owning Popover root while the menu's\n // focus scope starts. Keep the menu open for that transient target;\n // genuine focus moves to another control still dismiss it.\n if (\n !event.defaultPrevented &&\n props.menuPortalMount &&\n event.detail.originalEvent.target === props.menuPortalMount\n ) {\n setRestoreTriggerFocus(true)\n event.preventDefault()\n } else if (\n event.detail.originalEvent.target instanceof HTMLElement &&\n props.menuPortalMount?.contains(event.detail.originalEvent.target)\n ) {\n setRestoreTriggerFocus(false)\n }\n }}\n onInteractOutside={(event) => {\n if (event.detail.originalEvent.type !== 'pointerdown') return\n const owner = props.menuPortalMount\n const target = event.detail.originalEvent.target\n if (!(target instanceof Element) || !owner?.contains(target)) return\n\n const focusTarget = target.closest<HTMLElement>(MENU_FOCUS_TARGET_SELECTOR)\n setRestoreTriggerFocus(!focusTarget || !isMenuTabStop(focusTarget))\n }}\n onKeyDown={moveFocusOnTab}\n onEscapeKeyDown={() => setRestoreTriggerFocus(true)}\n onCloseAutoFocus={(event) => {\n if (menuOpen()) {\n event.preventDefault()\n return\n }\n if (focusTargetAfterTab) {\n const focusTarget = focusTargetAfterTab\n focusTargetAfterTab = undefined\n event.preventDefault()\n queueMicrotask(() => {\n if (!menuOpen() && focusTarget.isConnected) {\n focusTarget.focus({ preventScroll: true })\n }\n })\n return\n }\n if (!restoreTriggerFocus()) return\n\n event.preventDefault()\n setRestoreTriggerFocus(false)\n const trigger = triggerElement()\n if (\n trigger?.isConnected &&\n !trigger.disabled &&\n trigger.closest('[hidden], [inert], [aria-hidden=\"true\"]') === null &&\n trigger.getClientRects().length > 0\n ) {\n trigger.focus({ preventScroll: true })\n }\n }}\n >\n <DropdownMenuRadioGroup\n value={props.family}\n aria-label={`${props.label} system font`}\n onChange={(family) => {\n if (family === 'system') props.onSelect('system')\n }}\n >\n <DropdownMenuRadioItem value=\"system\" closeOnSelect>\n System\n </DropdownMenuRadioItem>\n </DropdownMenuRadioGroup>\n <DropdownMenuSeparator />\n <DropdownMenuRadioGroup\n value={props.family}\n aria-label={`${props.label} available fonts`}\n onChange={(family) => {\n const option = fontOptions.find((candidate) => candidate.id === family)\n if (option && option.id !== 'system') props.onSelect(option.id)\n }}\n >\n <For each={catalogFontOptions}>\n {(option) => (\n <DropdownMenuRadioItem value={option.id} closeOnSelect>\n {option.label}\n </DropdownMenuRadioItem>\n )}\n </For>\n </DropdownMenuRadioGroup>\n </DropdownMenuContent>\n </DropdownMenu>\n )\n}\n\n/** Controlled font controls shared by AppearanceEditor and host-owned settings. */\nexport function AppearanceFontSettingsGroup(props: AppearanceFontSettingsGroupProps) {\n const [sizeDrafts, setSizeDrafts] = createSignal<\n Partial<Record<AppearanceEditorFontAxis, string>>\n >({})\n const sizeHintPrefix = createUniqueId()\n const settings = createMemo(() => normalizeAppearanceEditorFontSettings(props.settings).settings)\n\n const updateAxis = (\n axis: AppearanceEditorFontAxis,\n patch: { family?: AppearanceEditorFontFamilyId; size?: number }\n ) => {\n const current = settings()\n props.onChange({\n ...current,\n [axis]: {\n ...current[axis],\n ...patch,\n },\n })\n }\n\n const commitSize = (axis: AppearanceEditorFontAxis) => {\n const input = sizeDrafts()[axis]\n if (input === undefined) return\n const size = normalizeAppearanceEditorFontSize(input, settings()[axis].size)\n setSizeDrafts((current) => {\n const next = { ...current }\n delete next[axis]\n return next\n })\n if (size !== settings()[axis].size) updateAxis(axis, { size })\n }\n\n return (\n <div class=\"global-appearance-font-settings\">\n <For each={FONT_ROWS}>\n {(row) => {\n const Icon = row.icon\n const value = () => settings()[row.axis]\n const inputValue = () => sizeDrafts()[row.axis] ?? String(value().size)\n const sizeHintId = `${sizeHintPrefix}-${row.axis}-font-size-help`\n const sizeIsInvalid = () => {\n const draft = sizeDrafts()[row.axis]\n if (draft === undefined || draft.trim() === '') return false\n const parsed = Number(draft)\n return (\n !Number.isFinite(parsed) ||\n !Number.isInteger(parsed) ||\n parsed < APPEARANCE_EDITOR_FONT_SIZE_MIN ||\n parsed > APPEARANCE_EDITOR_FONT_SIZE_MAX\n )\n }\n return (\n <section class=\"flex items-center gap-3 px-4 py-4\" data-font-settings-row={row.axis}>\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 <Icon />\n </span>\n {/* One line, always: the copy truncates rather than wrapping the\n controls to a second line, so the family menu, the size field\n and the title/subtitle stay aligned. The compact widths keep\n that true at the appearance sheet's own width. */}\n <div class=\"min-w-0 flex-1\">\n <h3 class=\"text-sm font-medium\">{row.label}</h3>\n <div class=\"mt-0.5 truncate text-xs text-muted-foreground\">{row.description}</div>\n </div>\n <div class=\"flex shrink-0 items-center gap-2\">\n <FontFamilyMenu\n label={row.label}\n family={value().family}\n menuPortalMount={props.menuPortalMount}\n disabled={props.disabled}\n onSelect={(family) => updateAxis(row.axis, { family })}\n />\n <div class=\"flex items-center gap-1\">\n <InputControl\n type=\"number\"\n min={APPEARANCE_EDITOR_FONT_SIZE_MIN}\n max={APPEARANCE_EDITOR_FONT_SIZE_MAX}\n step={1}\n value={inputValue()}\n disabled={props.disabled}\n aria-label={`${row.label} font size in pixels`}\n aria-describedby={sizeHintId}\n aria-invalid={sizeIsInvalid()}\n class=\"w-12\"\n onInput={(event) =>\n setSizeDrafts((current) => ({\n ...current,\n [row.axis]: event.currentTarget.value,\n }))\n }\n onBlur={() => commitSize(row.axis)}\n onKeyDown={(event) => {\n if (event.key !== 'Enter') return\n event.preventDefault()\n commitSize(row.axis)\n }}\n />\n <span aria-hidden=\"true\" class=\"text-xs text-muted-foreground\">\n px\n </span>\n </div>\n <span id={sizeHintId} class=\"sr-only\">\n Enter a whole number from {APPEARANCE_EDITOR_FONT_SIZE_MIN} to{' '}\n {APPEARANCE_EDITOR_FONT_SIZE_MAX} pixels.\n </span>\n </div>\n </section>\n )\n }}\n </For>\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;;AA8BA,IAAM8B,YAAY;CAChB;EACEC,MAAM;EACNC,OAAO;EACPC,aAAa;EACbC,MAAM/B;CACR;CACA;EACE4B,MAAM;EACNC,OAAO;EACPC,aAAa;EACbC,MAAMlC;CACR;CACA;EACE+B,MAAM;EACNC,OAAO;EACPC,aAAa;EACbC,MAAMhC;CACR;AAAC;AAQH,IAAMkC,qBAAqB5B,YAAY6B,QAAQC,WAAWA,OAAOC,OAAO,QAAQ;AAChF,IAAMC,6BACJ;AAEF,SAASC,cAAcC,SAAsB;CAC3C,QACGA,QAAQC,YAAY,KAClBD,QAAQE,QAAQ,iCAAiC,KAAK,CAACF,QAAQG,aAAa,UAAU,MACzF,CAACH,QAAQE,QAAQ,WAAW,KAC5BF,QAAQI,aAAa,eAAe,MAAM,UAC1CJ,QAAQK,QAAQ,2CAAyC,MAAM,QAC/DL,QAAQM,eAAe,CAAC,CAACC,SAAS;AAEtC;AAEA,SAASC,eAAeC,OAMrB;CACD,MAAM,CAACG,UAAUC,eAAejD,aAAa,KAAK;CAClD,MAAM,CAACkD,qBAAqBC,0BAA0BnD,aAAa,KAAK;CACxE,MAAM,CAACoD,gBAAgBC,qBAAqBrD,aAAgC;CAC5E,IAAIuD;CAEJ,MAAMC,kBAAkBC,UAAyB;EAC/C,IAAIA,MAAME,QAAQ,SAASF,MAAMG,aAAa;EAE9C,MAAMC,UAAUT,eAAe;EAC/B,MAAMU,QAAQjB,MAAMzB;EACpB,MAAM2C,eAAeD,OAAOrB,QAAqB,mBAAiB;EAClE,MAAMuB,aAAaD,gBAAgBD,OAAOG,cAAcC;EACxD,IAAI,CAACL,WAAW,CAACE,gBAAgB,CAACC,YAAY;EAE9C,MAAMG,aAAaC,MAAMC,KAAKL,WAAWM,i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uD,KAAAA;MACAC,KAAAA;MACAC,MAAM;MAAC,IACPjD,QAAK;OAAA,OAAEoB,WAAW;MAAC;MAAA,IACnBnH,WAAQ;OAAA,OAAEsB,MAAMtB;MAAQ;MAAA,KAAA,gBAAA;OAAA,OACZ,GAAGiH,IAAI9G,MAAK;MAAsB;MAAA,oBAC5BkH;MAAU,KAAA,kBAAA;OAAA,OACdC,cAAc;MAAC;MAAA,SAAA;MAE7B4B,UAAUhH,UACRmE,eAAeM,aAAa;OAC1B,GAAGA;QACFM,IAAI/G,OAAOgC,MAAMiH,cAAcpD;MAClC,EAAE;MAEJqD,cAAcxC,WAAWK,IAAI/G,IAAI;MACjCwF,YAAYxD,UAAU;OACpB,IAAIA,MAAME,QAAQ,SAAS;OAC3BF,MAAMyB,eAAe;OACrBiD,WAAWK,IAAI/G,IAAI;MACrB;KAAC,CAAA,GAAAqI,KAAA;KAAAc,aAAAb,OAAA,MAMKnB,UAAU;KAAAxC,OAAA2D,OAAAA,IACwCE,MAAA;KAAA7D,OAAA2D,OAAAA,IAC1BI,MAAA;KAAAU,aAAAD,aAAAxB,OAAA,0BAtDqCZ,IAAI/G,IAAI,CAAA;KAAA,OAAA2H;IAAA,EAAA,CAAA;GA2DvF;EAAC,CAAA,CAAA;EAAA,OAAAd;CAAA,EAAA,CAAA;AAIT"}
@@ -1,5 +1,5 @@
1
1
  import { APPEARANCE_EDITOR_FONT_AXES, APPEARANCE_EDITOR_FONT_SIZE_MAX, APPEARANCE_EDITOR_FONT_SIZE_MIN, DEFAULT_APPEARANCE_EDITOR_FONT_SETTINGS, applyAppearanceFontSettings, fontSettingsBootstrapScript, normalizeAppearanceEditorFontSettings, normalizeAppearanceEditorFontSize } from "../../../lib/appearance-font-settings.js";
2
- import { PalettePreview, ThemeMiniature, ThemeMiniatureSplit } from "./theme-preview.js";
3
2
  import { AppearanceFontSettingsGroup } from "./font-settings-group.js";
3
+ import { PalettePreview, ThemeMiniature, ThemeMiniatureSplit } from "./theme-preview.js";
4
4
  import { AppearanceEditor, AppearanceEditorActions, AppearancePopover } from "./appearance-editor.js";
5
5
  export { APPEARANCE_EDITOR_FONT_AXES, APPEARANCE_EDITOR_FONT_SIZE_MAX, APPEARANCE_EDITOR_FONT_SIZE_MIN, AppearanceEditor, AppearanceEditorActions, AppearanceFontSettingsGroup, AppearancePopover, DEFAULT_APPEARANCE_EDITOR_FONT_SETTINGS, PalettePreview, ThemeMiniature, ThemeMiniatureSplit, applyAppearanceFontSettings, fontSettingsBootstrapScript, normalizeAppearanceEditorFontSettings, normalizeAppearanceEditorFontSize };
@@ -1 +1 @@
1
- {"version":3,"file":"split-layout.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/split-layout/split-layout.tsx"],"names":[],"mappings":"AACA,OAAO,EAQL,KAAK,QAAQ,EACb,KAAK,GAAG,EACT,MAAM,UAAU,CAAA;AAKjB,OAAO,EAAkB,KAAK,cAAc,EAAE,MAAM,QAAQ,CAAA;AAC5D,YAAY,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAA;AAI5C,OAAO,EAIL,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACtB,MAAM,SAAS,CAAA;AAEhB,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,eAAe,IAAI;IACxD,KAAK,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAA;IAC1B,KAAK,EAAE,MAAM,CAAA;IACb,8DAA8D;IAC9D,YAAY,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,CAAA;IACjC,yFAAyF;IACzF,UAAU,EAAE,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,OAAO,CAAA;IAC9C,yFAAyF;IACzF,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,OAAO,CAAA;IACpD,+GAA+G;IAC/G,YAAY,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,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 import { ActionButton } from "../../composites/action-button/action-button.js";
3
3
  import { MAX_SPLIT_RATIO, MIN_SPLIT_RATIO, listLeaves } from "./tree.js";
4
4
  import { computeLayoutFrames } from "./geometry.js";
5
5
  import { paneDropIntent } from "./drop.js";
@@ -301,12 +301,15 @@ function SplitLayout(props) {
301
301
  insert(_el$4, actions, null);
302
302
  insert(_el$4, (() => {
303
303
  var _c$2 = memo(() => !!props.onClose);
304
- return () => _c$2() ? createComponent(Button, {
304
+ return () => _c$2() ? createComponent(ActionButton, {
305
305
  variant: "ghost",
306
306
  size: "icon-xs",
307
307
  get ["aria-label"]() {
308
308
  return `Close ${props.labelForLeaf(leaf())}`;
309
309
  },
310
+ get tooltip() {
311
+ return `Close ${props.labelForLeaf(leaf())}.`;
312
+ },
310
313
  onClick: () => close(id),
311
314
  get children() {
312
315
  return createComponent(X, {});
@@ -1 +1 @@
1
- {"version":3,"file":"split-layout.js","names":["Resizable","For","createMemo","createComputed","createUniqueId","createSignal","onCleanup","on","Accessor","JSX","X","GripVertical","Button","cn","computeLayoutFrames","LayoutRect","paneDropIntent","PaneDropIntent","PANE_DRAG_TYPE","DRAG_PREVIEW_MAX_WIDTH","DRAG_PREVIEW_MAX_HEIGHT","listLeaves","MIN_SPLIT_RATIO","MAX_SPLIT_RATIO","SplitLayoutBranch","SplitLayoutLeaf","SplitLayoutState","SplitLayoutProps","state","L","label","labelForLeaf","leaf","renderLeaf","Element","renderPaneLabel","paneTabIndex","labelForSeparator","branch","onResize","splitId","ratio","onFocus","leafId","onClose","onMove","targetId","intent","renderPaneActions","class","rectStyle","rect","CSSProperties","left","x","top","y","width","height","dragPreviewPlaceholder","source","HTMLElement","message","placeholder","document","createElement","className","getAttribute","setAttribute","localName","textContent","boundedSnapshotSize","sourceWidth","Math","max","sourceHeight","scale","min","round","cloneDragPreviewNode","Node","nodeType","TEXT_NODE","cloneNode","SVGElement","includes","undefined","HTMLImageElement","snapshot","size","naturalWidth","naturalHeight","complete","Error","context","getContext","drawImage","children","createDocumentFragment","child","childNodes","clone","append","length","attribute","removeAttribute","Array","from","attributes","test","name","HTMLCanvasElement","childClone","SplitLayout","props","root","HTMLDivElement","pendingFrame","refs","Map","domIds","prefix","nextDomId","nextDragId","dragPreview","drag","setDrag","id","token","drop","setDrop","clearDrag","remove","createDragPreview","preview","inert","body","domId","existing","get","created","set","leaves","center","leafMap","map","frames","branches","values","flatMap","frame","node","kind","current","has","target","allowedTarget","transfer","DataTransfer","types","dropLabel","placement","branchMap","schedule","action","cancelAnimationFrame","requestAnimationFrame","active","ownerDocument","activeElement","contains","field","HTMLTextAreaElement","HTMLInputElement","selection","start","selectionStart","end","selectionEnd","direction","selectionDirection","isConnected","focus","preventScroll","setSelectionRange","clear","close","next","_el$","_tmpl$","_el$2","firstChild","_$use","el","_$insert","_$createComponent","each","initial","content","paneLabel","actions","delete","_el$3","_tmpl$2","_el$4","_el$5","_el$6","_el$7","nextSibling","$$focusin","addEventListener","event","dataTransfer","clientX","clientY","currentTarget","getBoundingClientRect","accepted","getData","preventDefault","relatedTarget","dropEffect","_$setAttribute","setData","effectAllowed","setDragImage","previewFrame","scaleX","scaleY","_c$","_$memo","_c$2","variant","aria-label","onClick","_c$3","_el$8","_tmpl$3","_$effect","_$className","_p$","_v$4","_v$5","_v$6","_v$7","focusedLeafId","_v$8","_v$9","_v$0","_v$1","_v$10","Boolean","_v$11","_v$12","e","t","a","o","i","n","s","h","_$style","r","d","l","orientation","sizes","keyboardDelta","onSizesChange","getClientRects","some","Number","isFinite","abs","style","Panel","minSize","maxSize","Handle","aria-orientation","aria-controls","join","aria-valuenow","_v$","_v$2","_v$3","_$delegateEvents","_$createComponent","_$memo","_$className","_$setAttribute","_$style","_$delegateEvents"],"sources":["../../../../src/components/layout/split-layout/split-layout.tsx"],"sourcesContent":["import Resizable from '@corvu/resizable'\nimport {\n For,\n createMemo,\n createComputed,\n createUniqueId,\n createSignal,\n onCleanup,\n on,\n type Accessor,\n type JSX,\n} from 'solid-js'\nimport { X, GripVertical } from 'lucide-solid'\nimport { Button } from '../../ui/button'\nimport { cn } from '#lib/utils'\nimport { computeLayoutFrames, type LayoutRect } from './geometry'\nimport { paneDropIntent, type PaneDropIntent } from './drop'\nexport type { PaneDropIntent } from './drop'\nconst PANE_DRAG_TYPE = 'application/x-adea-pane-move'\nconst DRAG_PREVIEW_MAX_WIDTH = 384\nconst DRAG_PREVIEW_MAX_HEIGHT = 256\nimport {\n listLeaves,\n MIN_SPLIT_RATIO,\n MAX_SPLIT_RATIO,\n type SplitLayoutBranch,\n type SplitLayoutLeaf,\n type SplitLayoutState,\n} from './model'\n\nexport type SplitLayoutProps<L extends SplitLayoutLeaf> = {\n state: SplitLayoutState<L>\n label: string\n /** Accessible name for a pane region and its close button. */\n labelForLeaf: (leaf: L) => string\n /** Called once per stable leaf owner; the accessor tracks opaque payload replacement. */\n renderLeaf: (leaf: Accessor<L>) => JSX.Element\n /** Inline visible header composition, separate from the region and close-button name. */\n renderPaneLabel?: (leaf: Accessor<L>) => JSX.Element\n /** Whether pane regions participate in sequential keyboard navigation; defaults to programmatic focus only. */\n paneTabIndex?: 0 | -1\n /** Accessible splitter name; defaults to the current orientation-specific label. */\n labelForSeparator?: (branch: SplitLayoutBranch<L>) => string\n onResize: (splitId: string, ratio: number) => void\n onFocus?: (leafId: string) => void\n /** Host performs the model transition and returns the surviving focus destination. */\n onClose?: (leafId: string) => string | undefined\n /** Pointer placement only; the host supplies keyboard commands and performs the model transition. */\n onMove?: (leafId: string, targetId: string, intent: PaneDropIntent) => void\n /** Stable header composition for host-owned keyboard actions/capability feedback. */\n renderPaneActions?: (leaf: Accessor<L>) => JSX.Element\n class?: string\n}\nfunction rectStyle(rect: LayoutRect): JSX.CSSProperties {\n return {\n left: `${rect.x * 100}%`,\n top: `${rect.y * 100}%`,\n width: `${rect.width * 100}%`,\n height: `${rect.height * 100}%`,\n }\n}\nfunction dragPreviewPlaceholder(source: HTMLElement, message: string) {\n const placeholder = document.createElement('div')\n placeholder.className = cn(\n source.getAttribute('class'),\n 'flex min-h-8 min-w-0 items-center justify-center bg-muted px-2 text-center text-xs text-muted-foreground'\n )\n placeholder.setAttribute('data-split-drag-placeholder', source.localName)\n placeholder.textContent = message\n return placeholder\n}\nfunction boundedSnapshotSize(width: number, height: number) {\n const sourceWidth = Math.max(1, width)\n const sourceHeight = Math.max(1, height)\n const scale = Math.min(\n 1,\n DRAG_PREVIEW_MAX_WIDTH / sourceWidth,\n DRAG_PREVIEW_MAX_HEIGHT / sourceHeight\n )\n return {\n width: Math.max(1, Math.round(sourceWidth * scale)),\n height: Math.max(1, Math.round(sourceHeight * scale)),\n }\n}\nfunction cloneDragPreviewNode(source: Node): Node | undefined {\n if (source.nodeType === Node.TEXT_NODE) return source.cloneNode(false)\n if (!(source instanceof HTMLElement || source instanceof SVGElement))\n return source.cloneNode(false)\n\n if (['script', 'style', 'link', 'source', 'track', 'meta'].includes(source.localName))\n return undefined\n if (['iframe', 'video', 'audio', 'object', 'embed'].includes(source.localName))\n return dragPreviewPlaceholder(\n source as HTMLElement,\n 'Embedded content unavailable while moving'\n )\n if (source instanceof HTMLImageElement) {\n const snapshot = document.createElement('canvas')\n const size = boundedSnapshotSize(\n source.naturalWidth || source.width,\n source.naturalHeight || source.height\n )\n snapshot.width = size.width\n snapshot.height = size.height\n snapshot.className = source.getAttribute('class') ?? ''\n snapshot.setAttribute('data-split-drag-image', '')\n try {\n if (!source.complete || source.naturalWidth === 0)\n throw new Error('image has no decoded pixels')\n const context = snapshot.getContext('2d')\n if (!context) throw new Error('canvas snapshot context is unavailable')\n context.drawImage(source, 0, 0, snapshot.width, snapshot.height)\n return snapshot\n } catch {\n return dragPreviewPlaceholder(source, 'Image preview unavailable')\n }\n }\n\n // Copying a defined custom element can run its constructor; inserting it can\n // also reconnect a stream or terminal session. Flatten its display tree.\n if (source instanceof HTMLElement && source.localName.includes('-')) {\n const children = document.createDocumentFragment()\n for (const child of source.childNodes) {\n const clone = cloneDragPreviewNode(child)\n if (clone) children.append(clone)\n }\n return children.childNodes.length > 0\n ? children\n : dragPreviewPlaceholder(source, 'Live component preview unavailable while moving')\n }\n\n const clone = source.cloneNode(false) as HTMLElement | SVGElement\n for (const attribute of [\n 'id',\n 'style',\n 'draggable',\n 'data-pane-drag-handle',\n 'data-pane-id',\n 'src',\n 'srcset',\n 'href',\n 'xlink:href',\n 'data',\n 'poster',\n ])\n clone.removeAttribute(attribute)\n for (const attribute of Array.from(clone.attributes))\n if (/^on/i.test(attribute.name)) clone.removeAttribute(attribute.name)\n\n if (source instanceof HTMLCanvasElement && clone instanceof HTMLCanvasElement) {\n const size = boundedSnapshotSize(source.width, source.height)\n clone.width = size.width\n clone.height = size.height\n try {\n const context = clone.getContext('2d')\n if (!context) throw new Error('canvas snapshot context is unavailable')\n context.drawImage(source, 0, 0, clone.width, clone.height)\n } catch {\n return dragPreviewPlaceholder(source, 'Canvas preview unavailable while moving')\n }\n return clone\n }\n\n for (const child of source.childNodes) {\n const childClone = cloneDragPreviewNode(child)\n if (childClone) clone.append(childClone)\n }\n return clone\n}\n/** Muxy frame geometry keeps leaf owners stable; Corvu owns constrained separator interactions. */\nexport function SplitLayout<L extends SplitLayoutLeaf>(props: SplitLayoutProps<L>) {\n let root: HTMLDivElement | undefined\n let pendingFrame: number | undefined\n const refs = new Map<string, HTMLElement>()\n const domIds = new Map<string, string>()\n const prefix = createUniqueId()\n let nextDomId = 0\n let nextDragId = 0\n let dragPreview: HTMLElement | undefined\n const [drag, setDrag] = createSignal<{ id: string; token: string }>()\n const [drop, setDrop] = createSignal<{ id: string; intent: PaneDropIntent }>()\n const clearDrag = () => {\n setDrag(undefined)\n setDrop(undefined)\n dragPreview?.remove()\n dragPreview = undefined\n }\n const createDragPreview = (source: HTMLElement) => {\n dragPreview?.remove()\n const preview = cloneDragPreviewNode(source) as HTMLElement\n preview.className =\n 'pointer-events-none fixed -left-full top-0 z-(--z-dialog) flex h-64 max-h-screen w-96 max-w-screen min-h-0 min-w-0 flex-col overflow-hidden rounded-lg border border-border bg-card text-card-foreground shadow-xl'\n preview.removeAttribute('id')\n preview.removeAttribute('style')\n preview.removeAttribute('role')\n preview.removeAttribute('aria-label')\n preview.removeAttribute('data-pane-id')\n preview.removeAttribute('data-focused')\n preview.removeAttribute('data-drag-source')\n preview.removeAttribute('data-drop-direction')\n preview.removeAttribute('data-drop-placement')\n preview.setAttribute('data-split-drag-preview', '')\n preview.setAttribute('aria-hidden', 'true')\n preview.inert = true\n document.body.append(preview)\n dragPreview = preview\n return preview\n }\n const domId = (id: string) => {\n const existing = domIds.get(id)\n if (existing) return existing\n const created = `${prefix}-pane-${nextDomId++}`\n domIds.set(id, created)\n return created\n }\n const leaves = createMemo(() => listLeaves(props.state.center))\n const leafMap = createMemo(() => new Map(leaves().map((leaf) => [leaf.id, leaf])))\n const frames = createMemo(() => computeLayoutFrames(props.state.center))\n const branches = createMemo(() =>\n Array.from(frames().values()).flatMap((frame) =>\n frame.node.kind === 'split' ? [frame.node] : []\n )\n )\n createComputed(() => {\n const current = drag()\n if (current && (!props.onMove || !leafMap().has(current.id))) clearDrag()\n const target = drop()\n if (target && !leafMap().has(target.id)) setDrop(undefined)\n })\n const allowedTarget = (id: string, transfer: DataTransfer | null) => {\n const current = drag()\n return props.onMove &&\n current &&\n current.id !== id &&\n leafMap().has(current.id) &&\n leafMap().has(id) &&\n transfer?.types.includes(PANE_DRAG_TYPE)\n ? current\n : undefined\n }\n const dropLabel = createMemo(() => {\n const target = drop()\n const leaf = target ? leafMap().get(target.id) : undefined\n return target && leaf\n ? `Drop to place pane ${target.intent.placement} ${props.labelForLeaf(leaf)}`\n : ''\n })\n const branchMap = createMemo(() => new Map(branches().map((branch) => [branch.id, branch])))\n const schedule = (action: () => void) => {\n if (pendingFrame !== undefined) cancelAnimationFrame(pendingFrame)\n pendingFrame = requestAnimationFrame(() => {\n pendingFrame = undefined\n action()\n })\n }\n // Register before keyed children update: capture a focused editor before an\n // ordered DOM move can blur it. Never override a newer focus outside this root.\n createComputed(\n on(\n () => props.state.center,\n () => {\n const active = root?.ownerDocument.activeElement\n if (!root || !(active instanceof HTMLElement) || !root.contains(active)) return\n const field =\n active instanceof HTMLTextAreaElement || active instanceof HTMLInputElement\n ? active\n : undefined\n const selection = field\n ? {\n start: field.selectionStart,\n end: field.selectionEnd,\n direction: field.selectionDirection,\n }\n : undefined\n schedule(() => {\n if (!active.isConnected || !root?.contains(active)) return\n const current = active.ownerDocument.activeElement\n if (current !== active && current !== active.ownerDocument.body) return\n active.focus({ preventScroll: true })\n if (field && selection?.start !== null && selection?.end !== null && selection)\n field.setSelectionRange(\n selection.start,\n selection.end,\n selection.direction ?? undefined\n )\n })\n }\n )\n )\n onCleanup(() => {\n if (pendingFrame !== undefined) cancelAnimationFrame(pendingFrame)\n clearDrag()\n refs.clear()\n domIds.clear()\n })\n const close = (id: string) => {\n const next = props.onClose?.(id)\n if (next) schedule(() => refs.get(next)?.focus({ preventScroll: true }))\n }\n return (\n <div\n ref={(el) => {\n root = el\n }}\n role=\"group\"\n aria-label={props.label}\n data-slot=\"split-layout\"\n data-dragging={drag() ? '' : undefined}\n class={cn('relative size-full min-h-0 min-w-0 data-[dragging]:cursor-grabbing', props.class)}\n >\n <For each={leaves().map((leaf) => leaf.id)}>\n {(id) => {\n const initial = leafMap().get(id)!\n const leaf = () => leafMap().get(id) ?? initial\n const content = props.renderLeaf(leaf)\n const paneLabel = props.renderPaneLabel?.(leaf)\n const actions = props.renderPaneActions?.(leaf)\n const intent = () => (drop()?.id === id ? drop()?.intent : undefined)\n onCleanup(() => {\n refs.delete(id)\n domIds.delete(id)\n })\n return (\n <section\n ref={(el) => refs.set(id, el)}\n id={domId(id)}\n role=\"region\"\n aria-label={props.labelForLeaf(leaf())}\n tabIndex={props.paneTabIndex ?? -1}\n data-pane-id={id}\n data-focused={props.state.focusedLeafId === id ? '' : undefined}\n data-drag-source={drag()?.id === id ? '' : undefined}\n data-drop-direction={intent()?.direction}\n data-drop-placement={intent()?.placement}\n onDragOver={(event) => {\n if (!allowedTarget(id, event.dataTransfer)) return\n const next = paneDropIntent(\n event.clientX,\n event.clientY,\n event.currentTarget.getBoundingClientRect()\n )\n if (!next) {\n setDrop(undefined)\n return\n }\n event.preventDefault()\n if (event.dataTransfer) event.dataTransfer.dropEffect = 'move'\n setDrop({ id, intent: next })\n }}\n onDragLeave={(event) => {\n if (\n event.relatedTarget instanceof Node &&\n event.currentTarget.contains(event.relatedTarget)\n )\n return\n if (drop()?.id === id) setDrop(undefined)\n }}\n onDrop={(event) => {\n const current = allowedTarget(id, event.dataTransfer)\n const next = paneDropIntent(\n event.clientX,\n event.clientY,\n event.currentTarget.getBoundingClientRect()\n )\n const accepted =\n current && next && event.dataTransfer?.getData(PANE_DRAG_TYPE) === current.token\n clearDrag()\n if (!accepted) return\n event.preventDefault()\n props.onMove?.(current.id, id, next)\n }}\n style={rectStyle(frames().get(id)?.rect ?? { x: 0, y: 0, width: 0, height: 0 })}\n class=\"absolute flex min-h-0 min-w-0 flex-col overflow-hidden border border-border transition-opacity motion-reduce:transition-none data-[drag-source]:opacity-40 data-[focused]:border-primary bg-background text-foreground focus-visible:outline focus-visible:outline-2 focus-visible:outline-ring\"\n onFocusIn={() => props.onFocus?.(id)}\n >\n <header class=\"flex min-w-0 shrink-0 items-center gap-2 bg-surface px-2\">\n <span\n data-pane-drag-handle=\"\"\n draggable={Boolean(props.onMove)}\n class={cn('flex min-w-0 flex-1 items-center gap-2 truncate text-sm', {\n 'cursor-grab': Boolean(props.onMove),\n 'cursor-grabbing': drag()?.id === id,\n })}\n title={props.onMove ? `Drag ${props.labelForLeaf(leaf())} to move` : undefined}\n onDragStart={(event) => {\n if (!props.onMove || !event.dataTransfer) {\n event.preventDefault()\n return\n }\n const token = `${prefix}-${++nextDragId}`\n setDrag({ id, token })\n event.dataTransfer.setData(PANE_DRAG_TYPE, token)\n event.dataTransfer.effectAllowed = 'move'\n // The native drag image carries this pane's actual content\n // in a bounded floating-window frame; the source recedes\n // independently as the browser follows the image pointer.\n const source = refs.get(id)\n const frame = source?.getBoundingClientRect()\n if (source && frame && typeof event.dataTransfer.setDragImage === 'function') {\n const preview = createDragPreview(source)\n const previewFrame = preview.getBoundingClientRect()\n const scaleX = previewFrame.width / frame.width\n const scaleY = previewFrame.height / frame.height\n event.dataTransfer.setDragImage(\n preview,\n Math.max(0, Math.round((event.clientX - frame.left) * scaleX)),\n Math.max(0, Math.round((event.clientY - frame.top) * scaleY))\n )\n preview.setAttribute('data-native-drag-image', '')\n }\n }}\n onDragEnd={clearDrag}\n >\n {props.onMove ? (\n <GripVertical class=\"size-3 shrink-0\" aria-hidden=\"true\" />\n ) : null}\n <span class=\"min-w-0 flex-1 truncate\">\n {paneLabel ?? props.labelForLeaf(leaf())}\n </span>\n </span>\n {actions}\n {props.onClose ? (\n <Button\n variant=\"ghost\"\n size=\"icon-xs\"\n aria-label={`Close ${props.labelForLeaf(leaf())}`}\n onClick={() => close(id)}\n >\n <X />\n </Button>\n ) : null}\n </header>\n <div class=\"min-h-0 min-w-0 flex-1 overflow-auto\">{content}</div>\n {intent() ? (\n <div\n aria-hidden=\"true\"\n class={cn('pointer-events-none absolute border-2 border-primary bg-primary/10', {\n 'inset-y-0 left-0 w-1/2':\n intent()?.direction === 'row' && intent()?.placement === 'before',\n 'inset-y-0 right-0 w-1/2':\n intent()?.direction === 'row' && intent()?.placement === 'after',\n 'inset-x-0 top-0 h-1/2':\n intent()?.direction === 'column' && intent()?.placement === 'before',\n 'inset-x-0 bottom-0 h-1/2':\n intent()?.direction === 'column' && intent()?.placement === 'after',\n })}\n />\n ) : null}\n </section>\n )\n }}\n </For>\n <span class=\"sr-only\" role=\"status\">\n {dropLabel()}\n </span>\n <For each={branches().map((branch) => branch.id)}>\n {(id) => {\n const initial = branchMap().get(id)!\n const branch: Accessor<SplitLayoutBranch<L>> = () => branchMap().get(id) ?? initial\n return (\n <Resizable\n orientation={branch().direction === 'row' ? 'horizontal' : 'vertical'}\n sizes={[branch().ratio, 1 - branch().ratio]}\n keyboardDelta={0.05}\n onSizesChange={(sizes) => {\n // Corvu also reports panel registration/unregistration while\n // mounting or disposing a controller. Those incomplete or\n // hidden-host sizes are not user resize intent.\n if (!root?.isConnected || root.getClientRects().length === 0) return\n if (\n sizes.length !== 2 ||\n sizes.some((size) => !Number.isFinite(size)) ||\n Math.abs(sizes[0]! + sizes[1]! - 1) > 0.000001\n )\n return\n if (sizes[0] !== undefined && Math.abs(sizes[0] - branch().ratio) > 0.000001)\n props.onResize(id, sizes[0])\n }}\n style={rectStyle(frames().get(id)?.rect ?? { x: 0, y: 0, width: 0, height: 0 })}\n class=\"pointer-events-none absolute flex min-h-0 min-w-0 data-[orientation=vertical]:flex-col\"\n >\n <Resizable.Panel\n minSize={MIN_SPLIT_RATIO}\n maxSize={MAX_SPLIT_RATIO}\n aria-hidden=\"true\"\n />\n <Resizable.Handle\n aria-label={\n props.labelForSeparator?.(branch()) ??\n (branch().direction === 'row' ? 'Resize pane columns' : 'Resize pane rows')\n }\n aria-orientation={branch().direction === 'row' ? 'vertical' : 'horizontal'}\n aria-controls={listLeaves(branch())\n .map((leaf) => domId(leaf.id))\n .join(' ')}\n aria-valuemin={10}\n aria-valuemax={90}\n aria-valuenow={Math.round(branch().ratio * 100)}\n class=\"pointer-events-auto relative w-px shrink-0 bg-border after:absolute after:inset-y-0 after:-inset-x-1 after:w-3 focus-visible:bg-primary focus-visible:outline-none hover:bg-primary data-[orientation=vertical]:h-px data-[orientation=vertical]:w-full data-[orientation=vertical]:after:inset-x-0 data-[orientation=vertical]:after:-inset-y-1 data-[orientation=vertical]:after:h-3 data-[orientation=vertical]:after:w-full\"\n />\n <Resizable.Panel\n minSize={MIN_SPLIT_RATIO}\n maxSize={MAX_SPLIT_RATIO}\n aria-hidden=\"true\"\n />\n </Resizable>\n )\n }}\n </For>\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;;;AAkBA,IAAMkB,iBAAiB;AACvB,IAAMC,yBAAyB;AAC/B,IAAMC,0BAA0B;AA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GAKhC;EAAC,CAAA,GAAA,IAAA;EAAAuN,QAAAE,QAAA;GAAA,IAAA4C,MA1MS1K,MAAMpF,OAAK+P,OAERhK,KAAK,IAAI,KAAKvC,KAAAA,GAASwM,OAC/BjR,GAAG,sEAAsEqG,MAAMjE,KAAK;GAAC2O,QAAA5C,IAAAc,KAAAhC,aAAAlC,MAAA,cAAAoD,IAAAc,IAAA8B,GAAA;GAAAC,SAAA7C,IAAAe,KAAAjC,aAAAlC,MAAA,iBAAAoD,IAAAe,IAAA8B,IAAA;GAAAC,SAAA9C,IAAAgB,KAAAjB,UAAAnD,MAAAoD,IAAAgB,IAAA8B,IAAA;GAAA,OAAA9C;EAAA,GAAA;GAAAc,GAAAxK,KAAAA;GAAAyK,GAAAzK,KAAAA;GAAA0K,GAAA1K,KAAAA;EAAA,CAAA;EAAA,OAAAsG;CAAA,EAAA,CAAA;AA2MlG;AAACmG,eAAA,CAAA,SAAA,CAAA"}
1
+ {"version":3,"file":"split-layout.js","names":["Resizable","For","createMemo","createComputed","createUniqueId","createSignal","onCleanup","on","Accessor","JSX","X","GripVertical","ActionButton","cn","computeLayoutFrames","LayoutRect","paneDropIntent","PaneDropIntent","PANE_DRAG_TYPE","DRAG_PREVIEW_MAX_WIDTH","DRAG_PREVIEW_MAX_HEIGHT","listLeaves","MIN_SPLIT_RATIO","MAX_SPLIT_RATIO","SplitLayoutBranch","SplitLayoutLeaf","SplitLayoutState","SplitLayoutProps","state","L","label","labelForLeaf","leaf","renderLeaf","Element","renderPaneLabel","paneTabIndex","labelForSeparator","branch","onResize","splitId","ratio","onFocus","leafId","onClose","onMove","targetId","intent","renderPaneActions","class","rectStyle","rect","CSSProperties","left","x","top","y","width","height","dragPreviewPlaceholder","source","HTMLElement","message","placeholder","document","createElement","className","getAttribute","setAttribute","localName","textContent","boundedSnapshotSize","sourceWidth","Math","max","sourceHeight","scale","min","round","cloneDragPreviewNode","Node","nodeType","TEXT_NODE","cloneNode","SVGElement","includes","undefined","HTMLImageElement","snapshot","size","naturalWidth","naturalHeight","complete","Error","context","getContext","drawImage","children","createDocumentFragment","child","childNodes","clone","append","length","attribute","removeAttribute","Array","from","attributes","test","name","HTMLCanvasElement","childClone","SplitLayout","props","root","HTMLDivElement","pendingFrame","refs","Map","domIds","prefix","nextDomId","nextDragId","dragPreview","drag","setDrag","id","token","drop","setDrop","clearDrag","remove","createDragPreview","preview","inert","body","domId","existing","get","created","set","leaves","center","leafMap","map","frames","branches","values","flatMap","frame","node","kind","current","has","target","allowedTarget","transfer","DataTransfer","types","dropLabel","placement","branchMap","schedule","action","cancelAnimationFrame","requestAnimationFrame","active","ownerDocument","activeElement","contains","field","HTMLTextAreaElement","HTMLInputElement","selection","start","selectionStart","end","selectionEnd","direction","selectionDirection","isConnected","focus","preventScroll","setSelectionRange","clear","close","next","_el$","_tmpl$","_el$2","firstChild","_$use","el","_$insert","_$createComponent","each","initial","content","paneLabel","actions","delete","_el$3","_tmpl$2","_el$4","_el$5","_el$6","_el$7","nextSibling","$$focusin","addEventListener","event","dataTransfer","clientX","clientY","currentTarget","getBoundingClientRect","accepted","getData","preventDefault","relatedTarget","dropEffect","_$setAttribute","setData","effectAllowed","setDragImage","previewFrame","scaleX","scaleY","_c$","_$memo","_c$2","variant","aria-label","tooltip","onClick","_c$3","_el$8","_tmpl$3","_$effect","_$className","_p$","_v$4","_v$5","_v$6","_v$7","focusedLeafId","_v$8","_v$9","_v$0","_v$1","_v$10","Boolean","_v$11","_v$12","e","t","a","o","i","n","s","h","_$style","r","d","l","orientation","sizes","keyboardDelta","onSizesChange","getClientRects","some","Number","isFinite","abs","style","Panel","minSize","maxSize","Handle","aria-orientation","aria-controls","join","aria-valuenow","_v$","_v$2","_v$3","_$delegateEvents","_$createComponent","_$memo","_$className","_$setAttribute","_$style","_$delegateEvents"],"sources":["../../../../src/components/layout/split-layout/split-layout.tsx"],"sourcesContent":["import Resizable from '@corvu/resizable'\nimport {\n For,\n createMemo,\n createComputed,\n createUniqueId,\n createSignal,\n onCleanup,\n on,\n type Accessor,\n type JSX,\n} from 'solid-js'\nimport { X, GripVertical } from 'lucide-solid'\nimport { ActionButton } from '../../composites/action-button'\nimport { cn } from '#lib/utils'\nimport { computeLayoutFrames, type LayoutRect } from './geometry'\nimport { paneDropIntent, type PaneDropIntent } from './drop'\nexport type { PaneDropIntent } from './drop'\nconst PANE_DRAG_TYPE = 'application/x-adea-pane-move'\nconst DRAG_PREVIEW_MAX_WIDTH = 384\nconst DRAG_PREVIEW_MAX_HEIGHT = 256\nimport {\n listLeaves,\n MIN_SPLIT_RATIO,\n MAX_SPLIT_RATIO,\n type SplitLayoutBranch,\n type SplitLayoutLeaf,\n type SplitLayoutState,\n} from './model'\n\nexport type SplitLayoutProps<L extends SplitLayoutLeaf> = {\n state: SplitLayoutState<L>\n label: string\n /** Accessible name for a pane region and its close button. */\n labelForLeaf: (leaf: L) => string\n /** Called once per stable leaf owner; the accessor tracks opaque payload replacement. */\n renderLeaf: (leaf: Accessor<L>) => JSX.Element\n /** Inline visible header composition, separate from the region and close-button name. */\n renderPaneLabel?: (leaf: Accessor<L>) => JSX.Element\n /** Whether pane regions participate in sequential keyboard navigation; defaults to programmatic focus only. */\n paneTabIndex?: 0 | -1\n /** Accessible splitter name; defaults to the current orientation-specific label. */\n labelForSeparator?: (branch: SplitLayoutBranch<L>) => string\n onResize: (splitId: string, ratio: number) => void\n onFocus?: (leafId: string) => void\n /** Host performs the model transition and returns the surviving focus destination. */\n onClose?: (leafId: string) => string | undefined\n /** Pointer placement only; the host supplies keyboard commands and performs the model transition. */\n onMove?: (leafId: string, targetId: string, intent: PaneDropIntent) => void\n /** Stable header composition for host-owned keyboard actions/capability feedback. */\n renderPaneActions?: (leaf: Accessor<L>) => JSX.Element\n class?: string\n}\nfunction rectStyle(rect: LayoutRect): JSX.CSSProperties {\n return {\n left: `${rect.x * 100}%`,\n top: `${rect.y * 100}%`,\n width: `${rect.width * 100}%`,\n height: `${rect.height * 100}%`,\n }\n}\nfunction dragPreviewPlaceholder(source: HTMLElement, message: string) {\n const placeholder = document.createElement('div')\n placeholder.className = cn(\n source.getAttribute('class'),\n 'flex min-h-8 min-w-0 items-center justify-center bg-muted px-2 text-center text-xs text-muted-foreground'\n )\n placeholder.setAttribute('data-split-drag-placeholder', source.localName)\n placeholder.textContent = message\n return placeholder\n}\nfunction boundedSnapshotSize(width: number, height: number) {\n const sourceWidth = Math.max(1, width)\n const sourceHeight = Math.max(1, height)\n const scale = Math.min(\n 1,\n DRAG_PREVIEW_MAX_WIDTH / sourceWidth,\n DRAG_PREVIEW_MAX_HEIGHT / sourceHeight\n )\n return {\n width: Math.max(1, Math.round(sourceWidth * scale)),\n height: Math.max(1, Math.round(sourceHeight * scale)),\n }\n}\nfunction cloneDragPreviewNode(source: Node): Node | undefined {\n if (source.nodeType === Node.TEXT_NODE) return source.cloneNode(false)\n if (!(source instanceof HTMLElement || source instanceof SVGElement))\n return source.cloneNode(false)\n\n if (['script', 'style', 'link', 'source', 'track', 'meta'].includes(source.localName))\n return undefined\n if (['iframe', 'video', 'audio', 'object', 'embed'].includes(source.localName))\n return dragPreviewPlaceholder(\n source as HTMLElement,\n 'Embedded content unavailable while moving'\n )\n if (source instanceof HTMLImageElement) {\n const snapshot = document.createElement('canvas')\n const size = boundedSnapshotSize(\n source.naturalWidth || source.width,\n source.naturalHeight || source.height\n )\n snapshot.width = size.width\n snapshot.height = size.height\n snapshot.className = source.getAttribute('class') ?? ''\n snapshot.setAttribute('data-split-drag-image', '')\n try {\n if (!source.complete || source.naturalWidth === 0)\n throw new Error('image has no decoded pixels')\n const context = snapshot.getContext('2d')\n if (!context) throw new Error('canvas snapshot context is unavailable')\n context.drawImage(source, 0, 0, snapshot.width, snapshot.height)\n return snapshot\n } catch {\n return dragPreviewPlaceholder(source, 'Image preview unavailable')\n }\n }\n\n // Copying a defined custom element can run its constructor; inserting it can\n // also reconnect a stream or terminal session. Flatten its display tree.\n if (source instanceof HTMLElement && source.localName.includes('-')) {\n const children = document.createDocumentFragment()\n for (const child of source.childNodes) {\n const clone = cloneDragPreviewNode(child)\n if (clone) children.append(clone)\n }\n return children.childNodes.length > 0\n ? children\n : dragPreviewPlaceholder(source, 'Live component preview unavailable while moving')\n }\n\n const clone = source.cloneNode(false) as HTMLElement | SVGElement\n for (const attribute of [\n 'id',\n 'style',\n 'draggable',\n 'data-pane-drag-handle',\n 'data-pane-id',\n 'src',\n 'srcset',\n 'href',\n 'xlink:href',\n 'data',\n 'poster',\n ])\n clone.removeAttribute(attribute)\n for (const attribute of Array.from(clone.attributes))\n if (/^on/i.test(attribute.name)) clone.removeAttribute(attribute.name)\n\n if (source instanceof HTMLCanvasElement && clone instanceof HTMLCanvasElement) {\n const size = boundedSnapshotSize(source.width, source.height)\n clone.width = size.width\n clone.height = size.height\n try {\n const context = clone.getContext('2d')\n if (!context) throw new Error('canvas snapshot context is unavailable')\n context.drawImage(source, 0, 0, clone.width, clone.height)\n } catch {\n return dragPreviewPlaceholder(source, 'Canvas preview unavailable while moving')\n }\n return clone\n }\n\n for (const child of source.childNodes) {\n const childClone = cloneDragPreviewNode(child)\n if (childClone) clone.append(childClone)\n }\n return clone\n}\n/** Muxy frame geometry keeps leaf owners stable; Corvu owns constrained separator interactions. */\nexport function SplitLayout<L extends SplitLayoutLeaf>(props: SplitLayoutProps<L>) {\n let root: HTMLDivElement | undefined\n let pendingFrame: number | undefined\n const refs = new Map<string, HTMLElement>()\n const domIds = new Map<string, string>()\n const prefix = createUniqueId()\n let nextDomId = 0\n let nextDragId = 0\n let dragPreview: HTMLElement | undefined\n const [drag, setDrag] = createSignal<{ id: string; token: string }>()\n const [drop, setDrop] = createSignal<{ id: string; intent: PaneDropIntent }>()\n const clearDrag = () => {\n setDrag(undefined)\n setDrop(undefined)\n dragPreview?.remove()\n dragPreview = undefined\n }\n const createDragPreview = (source: HTMLElement) => {\n dragPreview?.remove()\n const preview = cloneDragPreviewNode(source) as HTMLElement\n preview.className =\n 'pointer-events-none fixed -left-full top-0 z-(--z-dialog) flex h-64 max-h-screen w-96 max-w-screen min-h-0 min-w-0 flex-col overflow-hidden rounded-lg border border-border bg-card text-card-foreground shadow-xl'\n preview.removeAttribute('id')\n preview.removeAttribute('style')\n preview.removeAttribute('role')\n preview.removeAttribute('aria-label')\n preview.removeAttribute('data-pane-id')\n preview.removeAttribute('data-focused')\n preview.removeAttribute('data-drag-source')\n preview.removeAttribute('data-drop-direction')\n preview.removeAttribute('data-drop-placement')\n preview.setAttribute('data-split-drag-preview', '')\n preview.setAttribute('aria-hidden', 'true')\n preview.inert = true\n document.body.append(preview)\n dragPreview = preview\n return preview\n }\n const domId = (id: string) => {\n const existing = domIds.get(id)\n if (existing) return existing\n const created = `${prefix}-pane-${nextDomId++}`\n domIds.set(id, created)\n return created\n }\n const leaves = createMemo(() => listLeaves(props.state.center))\n const leafMap = createMemo(() => new Map(leaves().map((leaf) => [leaf.id, leaf])))\n const frames = createMemo(() => computeLayoutFrames(props.state.center))\n const branches = createMemo(() =>\n Array.from(frames().values()).flatMap((frame) =>\n frame.node.kind === 'split' ? [frame.node] : []\n )\n )\n createComputed(() => {\n const current = drag()\n if (current && (!props.onMove || !leafMap().has(current.id))) clearDrag()\n const target = drop()\n if (target && !leafMap().has(target.id)) setDrop(undefined)\n })\n const allowedTarget = (id: string, transfer: DataTransfer | null) => {\n const current = drag()\n return props.onMove &&\n current &&\n current.id !== id &&\n leafMap().has(current.id) &&\n leafMap().has(id) &&\n transfer?.types.includes(PANE_DRAG_TYPE)\n ? current\n : undefined\n }\n const dropLabel = createMemo(() => {\n const target = drop()\n const leaf = target ? leafMap().get(target.id) : undefined\n return target && leaf\n ? `Drop to place pane ${target.intent.placement} ${props.labelForLeaf(leaf)}`\n : ''\n })\n const branchMap = createMemo(() => new Map(branches().map((branch) => [branch.id, branch])))\n const schedule = (action: () => void) => {\n if (pendingFrame !== undefined) cancelAnimationFrame(pendingFrame)\n pendingFrame = requestAnimationFrame(() => {\n pendingFrame = undefined\n action()\n })\n }\n // Register before keyed children update: capture a focused editor before an\n // ordered DOM move can blur it. Never override a newer focus outside this root.\n createComputed(\n on(\n () => props.state.center,\n () => {\n const active = root?.ownerDocument.activeElement\n if (!root || !(active instanceof HTMLElement) || !root.contains(active)) return\n const field =\n active instanceof HTMLTextAreaElement || active instanceof HTMLInputElement\n ? active\n : undefined\n const selection = field\n ? {\n start: field.selectionStart,\n end: field.selectionEnd,\n direction: field.selectionDirection,\n }\n : undefined\n schedule(() => {\n if (!active.isConnected || !root?.contains(active)) return\n const current = active.ownerDocument.activeElement\n if (current !== active && current !== active.ownerDocument.body) return\n active.focus({ preventScroll: true })\n if (field && selection?.start !== null && selection?.end !== null && selection)\n field.setSelectionRange(\n selection.start,\n selection.end,\n selection.direction ?? undefined\n )\n })\n }\n )\n )\n onCleanup(() => {\n if (pendingFrame !== undefined) cancelAnimationFrame(pendingFrame)\n clearDrag()\n refs.clear()\n domIds.clear()\n })\n const close = (id: string) => {\n const next = props.onClose?.(id)\n if (next) schedule(() => refs.get(next)?.focus({ preventScroll: true }))\n }\n return (\n <div\n ref={(el) => {\n root = el\n }}\n role=\"group\"\n aria-label={props.label}\n data-slot=\"split-layout\"\n data-dragging={drag() ? '' : undefined}\n class={cn('relative size-full min-h-0 min-w-0 data-[dragging]:cursor-grabbing', props.class)}\n >\n <For each={leaves().map((leaf) => leaf.id)}>\n {(id) => {\n const initial = leafMap().get(id)!\n const leaf = () => leafMap().get(id) ?? initial\n const content = props.renderLeaf(leaf)\n const paneLabel = props.renderPaneLabel?.(leaf)\n const actions = props.renderPaneActions?.(leaf)\n const intent = () => (drop()?.id === id ? drop()?.intent : undefined)\n onCleanup(() => {\n refs.delete(id)\n domIds.delete(id)\n })\n return (\n <section\n ref={(el) => refs.set(id, el)}\n id={domId(id)}\n role=\"region\"\n aria-label={props.labelForLeaf(leaf())}\n tabIndex={props.paneTabIndex ?? -1}\n data-pane-id={id}\n data-focused={props.state.focusedLeafId === id ? '' : undefined}\n data-drag-source={drag()?.id === id ? '' : undefined}\n data-drop-direction={intent()?.direction}\n data-drop-placement={intent()?.placement}\n onDragOver={(event) => {\n if (!allowedTarget(id, event.dataTransfer)) return\n const next = paneDropIntent(\n event.clientX,\n event.clientY,\n event.currentTarget.getBoundingClientRect()\n )\n if (!next) {\n setDrop(undefined)\n return\n }\n event.preventDefault()\n if (event.dataTransfer) event.dataTransfer.dropEffect = 'move'\n setDrop({ id, intent: next })\n }}\n onDragLeave={(event) => {\n if (\n event.relatedTarget instanceof Node &&\n event.currentTarget.contains(event.relatedTarget)\n )\n return\n if (drop()?.id === id) setDrop(undefined)\n }}\n onDrop={(event) => {\n const current = allowedTarget(id, event.dataTransfer)\n const next = paneDropIntent(\n event.clientX,\n event.clientY,\n event.currentTarget.getBoundingClientRect()\n )\n const accepted =\n current && next && event.dataTransfer?.getData(PANE_DRAG_TYPE) === current.token\n clearDrag()\n if (!accepted) return\n event.preventDefault()\n props.onMove?.(current.id, id, next)\n }}\n style={rectStyle(frames().get(id)?.rect ?? { x: 0, y: 0, width: 0, height: 0 })}\n class=\"absolute flex min-h-0 min-w-0 flex-col overflow-hidden border border-border transition-opacity motion-reduce:transition-none data-[drag-source]:opacity-40 data-[focused]:border-primary bg-background text-foreground focus-visible:outline focus-visible:outline-2 focus-visible:outline-ring\"\n onFocusIn={() => props.onFocus?.(id)}\n >\n <header class=\"flex min-w-0 shrink-0 items-center gap-2 bg-surface px-2\">\n <span\n data-pane-drag-handle=\"\"\n draggable={Boolean(props.onMove)}\n class={cn('flex min-w-0 flex-1 items-center gap-2 truncate text-sm', {\n 'cursor-grab': Boolean(props.onMove),\n 'cursor-grabbing': drag()?.id === id,\n })}\n title={props.onMove ? `Drag ${props.labelForLeaf(leaf())} to move` : undefined}\n onDragStart={(event) => {\n if (!props.onMove || !event.dataTransfer) {\n event.preventDefault()\n return\n }\n const token = `${prefix}-${++nextDragId}`\n setDrag({ id, token })\n event.dataTransfer.setData(PANE_DRAG_TYPE, token)\n event.dataTransfer.effectAllowed = 'move'\n // The native drag image carries this pane's actual content\n // in a bounded floating-window frame; the source recedes\n // independently as the browser follows the image pointer.\n const source = refs.get(id)\n const frame = source?.getBoundingClientRect()\n if (source && frame && typeof event.dataTransfer.setDragImage === 'function') {\n const preview = createDragPreview(source)\n const previewFrame = preview.getBoundingClientRect()\n const scaleX = previewFrame.width / frame.width\n const scaleY = previewFrame.height / frame.height\n event.dataTransfer.setDragImage(\n preview,\n Math.max(0, Math.round((event.clientX - frame.left) * scaleX)),\n Math.max(0, Math.round((event.clientY - frame.top) * scaleY))\n )\n preview.setAttribute('data-native-drag-image', '')\n }\n }}\n onDragEnd={clearDrag}\n >\n {props.onMove ? (\n <GripVertical class=\"size-3 shrink-0\" aria-hidden=\"true\" />\n ) : null}\n <span class=\"min-w-0 flex-1 truncate\">\n {paneLabel ?? props.labelForLeaf(leaf())}\n </span>\n </span>\n {actions}\n {props.onClose ? (\n <ActionButton\n variant=\"ghost\"\n size=\"icon-xs\"\n aria-label={`Close ${props.labelForLeaf(leaf())}`}\n tooltip={`Close ${props.labelForLeaf(leaf())}.`}\n onClick={() => close(id)}\n >\n <X />\n </ActionButton>\n ) : null}\n </header>\n <div class=\"min-h-0 min-w-0 flex-1 overflow-auto\">{content}</div>\n {intent() ? (\n <div\n aria-hidden=\"true\"\n class={cn('pointer-events-none absolute border-2 border-primary bg-primary/10', {\n 'inset-y-0 left-0 w-1/2':\n intent()?.direction === 'row' && intent()?.placement === 'before',\n 'inset-y-0 right-0 w-1/2':\n intent()?.direction === 'row' && intent()?.placement === 'after',\n 'inset-x-0 top-0 h-1/2':\n intent()?.direction === 'column' && intent()?.placement === 'before',\n 'inset-x-0 bottom-0 h-1/2':\n intent()?.direction === 'column' && intent()?.placement === 'after',\n })}\n />\n ) : null}\n </section>\n )\n }}\n </For>\n <span class=\"sr-only\" role=\"status\">\n {dropLabel()}\n </span>\n <For each={branches().map((branch) => branch.id)}>\n {(id) => {\n const initial = branchMap().get(id)!\n const branch: Accessor<SplitLayoutBranch<L>> = () => branchMap().get(id) ?? initial\n return (\n <Resizable\n orientation={branch().direction === 'row' ? 'horizontal' : 'vertical'}\n sizes={[branch().ratio, 1 - branch().ratio]}\n keyboardDelta={0.05}\n onSizesChange={(sizes) => {\n // Corvu also reports panel registration/unregistration while\n // mounting or disposing a controller. Those incomplete or\n // hidden-host sizes are not user resize intent.\n if (!root?.isConnected || root.getClientRects().length === 0) return\n if (\n sizes.length !== 2 ||\n sizes.some((size) => !Number.isFinite(size)) ||\n Math.abs(sizes[0]! + sizes[1]! - 1) > 0.000001\n )\n return\n if (sizes[0] !== undefined && Math.abs(sizes[0] - branch().ratio) > 0.000001)\n props.onResize(id, sizes[0])\n }}\n style={rectStyle(frames().get(id)?.rect ?? { x: 0, y: 0, width: 0, height: 0 })}\n class=\"pointer-events-none absolute flex min-h-0 min-w-0 data-[orientation=vertical]:flex-col\"\n >\n <Resizable.Panel\n minSize={MIN_SPLIT_RATIO}\n maxSize={MAX_SPLIT_RATIO}\n aria-hidden=\"true\"\n />\n <Resizable.Handle\n aria-label={\n props.labelForSeparator?.(branch()) ??\n (branch().direction === 'row' ? 'Resize pane columns' : 'Resize pane rows')\n }\n aria-orientation={branch().direction === 'row' ? 'vertical' : 'horizontal'}\n aria-controls={listLeaves(branch())\n .map((leaf) => domId(leaf.id))\n .join(' ')}\n aria-valuemin={10}\n aria-valuemax={90}\n aria-valuenow={Math.round(branch().ratio * 100)}\n class=\"pointer-events-auto relative w-px shrink-0 bg-border after:absolute after:inset-y-0 after:-inset-x-1 after:w-3 focus-visible:bg-primary focus-visible:outline-none hover:bg-primary data-[orientation=vertical]:h-px data-[orientation=vertical]:w-full data-[orientation=vertical]:after:inset-x-0 data-[orientation=vertical]:after:-inset-y-1 data-[orientation=vertical]:after:h-3 data-[orientation=vertical]:after:w-full\"\n />\n <Resizable.Panel\n minSize={MIN_SPLIT_RATIO}\n maxSize={MAX_SPLIT_RATIO}\n aria-hidden=\"true\"\n />\n </Resizable>\n )\n }}\n </For>\n </div>\n )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MxC,OAAO,CAAC,CAACG,QAAQ,GAAG;QAAC;QAAA,SAAA;OAAA,CAAA;OAAA0J,gBAGhDnM,UAAUqR,OAAK;QACdC,SAAShQ;QACTiQ,SAAShQ;QAAe,eAAA;OAAA,CAAA;MAAA;KAAA;IAAA,CAAA;GAKhC;EAAC,CAAA,GAAA,IAAA;EAAAwN,QAAAE,QAAA;GAAA,IAAA4C,MA3MS3K,MAAMpF,OAAKgQ,OAERjK,KAAK,IAAI,KAAKvC,KAAAA,GAASyM,OAC/BlR,GAAG,sEAAsEqG,MAAMjE,KAAK;GAAC4O,QAAA5C,IAAAc,KAAAjC,aAAAlC,MAAA,cAAAqD,IAAAc,IAAA8B,GAAA;GAAAC,SAAA7C,IAAAe,KAAAlC,aAAAlC,MAAA,iBAAAqD,IAAAe,IAAA8B,IAAA;GAAAC,SAAA9C,IAAAgB,KAAAjB,UAAApD,MAAAqD,IAAAgB,IAAA8B,IAAA;GAAA,OAAA9C;EAAA,GAAA;GAAAc,GAAAzK,KAAAA;GAAA0K,GAAA1K,KAAAA;GAAA2K,GAAA3K,KAAAA;EAAA,CAAA;EAAA,OAAAsG;CAAA,EAAA,CAAA;AA4MlG;AAACoG,eAAA,CAAA,SAAA,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"appearance-panel.d.ts","sourceRoot":"","sources":["../../../src/components/theme/appearance-panel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAc9C;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,MAAM,oBAAoB,GAAG,cAAc,CAAC,KAAK,CAAC,CAAA;AAKxD,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,kCAwG1D"}
1
+ {"version":3,"file":"appearance-panel.d.ts","sourceRoot":"","sources":["../../../src/components/theme/appearance-panel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAc9C;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,MAAM,oBAAoB,GAAG,cAAc,CAAC,KAAK,CAAC,CAAA;AAKxD,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,kCAuG1D"}
@@ -106,9 +106,6 @@ function AppearancePanel(props) {
106
106
  get children() {
107
107
  return createComponent(AccentSwatchGroups, {
108
108
  accentOptions: accentPresets,
109
- get themeAccentOptions() {
110
- return themeAccents();
111
- },
112
109
  get resolvedAppearance() {
113
110
  return resolvedAppearance();
114
111
  },
@@ -1 +1 @@
1
- {"version":3,"file":"appearance-panel.js","names":["ComponentProps","Show","splitProps","RadioGroup","Radio","accentPresets","themesForAppearance","DEFAULT_APPEARANCE_EDITOR_FONT_SETTINGS","cn","AccentSwatchGroups","AppearanceFontSettingsGroup","RadioGroupItem","ThemePicker","useTheme","Heading","AppearancePanelProps","LIGHT_THEMES","DARK_THEMES","AppearancePanel","props","local","rest","selection","setSelection","resolvedAppearance","themeAccents","selectedAccent","some","option","id","accent","_el$","_tmpl$","_el$2","firstChild","_el$3","_el$4","_el$5","nextSibling","_el$6","_el$7","_el$8","_el$9","_el$0","_$spread","_$mergeProps","class","_$insert","_$createComponent","as","size","children","value","appearance","onChange","label","description","when","ThemeSection","title","themes","selectedId","lightThemeId","onThemeSelect","theme","darkThemeId","orientation","accentOptions","themeAccentOptions","themeDefaultColor","settings","fonts","ReturnType","_el$1","_tmpl$2","_el$10","_el$11","_$mergeProps","_$createComponent","RadioGroup","Radio"],"sources":["../../../src/components/theme/appearance-panel.tsx"],"sourcesContent":["import type { ComponentProps } from 'solid-js'\nimport { Show, splitProps } from 'solid-js'\nimport { RadioGroup as Radio } from '@kobalte/core/radio-group'\nimport { accentPresets } from '#lib/tokens'\nimport { themesForAppearance } from '#lib/themes'\nimport { DEFAULT_APPEARANCE_EDITOR_FONT_SETTINGS } from '#lib/appearance-font-settings'\nimport { cn } from '#lib/utils'\nimport { AccentSwatchGroups } from '../composites/appearance-editor/accent-swatch-groups'\nimport { AppearanceFontSettingsGroup } from '../composites/appearance-editor/font-settings-group'\nimport { RadioGroup, RadioGroupItem } from '../ui/radio-group/radio-group'\nimport { ThemePicker } from './theme-picker'\nimport { useTheme } from './theme-provider'\nimport { Heading } from '../ui/typography'\n\n/**\n * AppearancePanel.\n *\n * The appearance page, as a component rather than as a screen each application\n * draws for itself. Two applications that both let a user choose a theme should\n * offer the *same* choices in the *same* arrangement — otherwise \"Adea\" and\n * \"Cortana\" are two products that happen to share a component library, which is\n * the opposite of what this system is for.\n *\n * Four axes, in the order a user thinks about them:\n *\n * 1. **Appearance** — light, dark, or follow the system.\n * 2. **Themes** — one for each appearance. Both are shown at once, because the\n * choice is per-appearance and hiding the other half makes it feel like one\n * setting that keeps changing.\n * 3. **Accent** — adea's presets, then the accents the selected theme pair\n * carries itself, layered on whichever theme is active.\n * 4. **Fonts** — separate families and sizes for interface, content and code.\n *\n * The panel reads and writes the provider's preference and keeps no state of its\n * own, so it cannot disagree with what is applied.\n */\nexport type AppearancePanelProps = ComponentProps<'div'>\n\nconst LIGHT_THEMES = themesForAppearance('light')\nconst DARK_THEMES = themesForAppearance('dark')\n\nexport function AppearancePanel(props: AppearancePanelProps) {\n const [local, rest] = splitProps(props, ['class'])\n const { selection, setSelection, resolvedAppearance, themeAccents } = useTheme()\n const selectedAccent = () =>\n accentPresets.some((option) => option.id === selection().accent) ||\n themeAccents().some((option) => option.id === selection().accent)\n ? selection().accent\n : 'theme'\n\n return (\n <div data-slot=\"appearance-panel\" class={cn('flex flex-col gap-8', local.class)} {...rest}>\n {/* --- 1. Appearance ------------------------------------------------- */}\n <section class=\"flex flex-col gap-3\">\n <header class=\"flex flex-col gap-0.5\">\n <Heading as=\"h2\" size=\"card\">\n Appearance\n </Heading>\n <p class=\"max-w-prose text-sm text-muted-foreground\">\n Follow the system, or pin one. The theme below is chosen per appearance, so switching at\n sunset does not make you choose again.\n </p>\n </header>\n <RadioGroup\n value={selection().appearance}\n onChange={(value) => setSelection({ appearance: value as 'light' | 'dark' | 'system' })}\n aria-label=\"Appearance\"\n >\n <RadioGroupItem value=\"light\" label=\"Light\" description=\"Always the light theme.\" />\n <RadioGroupItem value=\"dark\" label=\"Dark\" description=\"Always the dark theme.\" />\n <RadioGroupItem\n value=\"system\"\n label=\"Match the system\"\n description={`Currently resolving to ${resolvedAppearance()}.`}\n />\n </RadioGroup>\n </section>\n\n {/* --- 2. Themes ------------------------------------------------------ */}\n <Show when={resolvedAppearance() === 'light'}>\n <ThemeSection\n title=\"Light theme\"\n description=\"Shown when the appearance resolves to light.\"\n themes={LIGHT_THEMES}\n selectedId={selection().lightThemeId}\n onThemeSelect={(theme) => setSelection({ lightThemeId: theme.id })}\n />\n </Show>\n <Show when={resolvedAppearance() === 'dark'}>\n <ThemeSection\n title=\"Dark theme\"\n description=\"Shown when the appearance resolves to dark.\"\n themes={DARK_THEMES}\n selectedId={selection().darkThemeId}\n onThemeSelect={(theme) => setSelection({ darkThemeId: theme.id })}\n />\n </Show>\n\n {/* --- 3. Accent ------------------------------------------------------ */}\n <section class=\"flex flex-col gap-3\">\n <header class=\"flex flex-col gap-0.5\">\n <Heading as=\"h2\" size=\"card\">\n Accent\n </Heading>\n <p class=\"max-w-prose text-sm text-muted-foreground\">\n Colours the interactive roles — the primary button, the focus ring, a selected row — on\n top of the theme above — one of the presets, or a colour the theme carries itself. Every\n option is measured against the surface it lands on, so none of them can make a label\n unreadable.\n </p>\n </header>\n <Radio\n value={selectedAccent()}\n onChange={(accent) => setSelection({ accent })}\n orientation=\"horizontal\"\n aria-label=\"Accent\"\n class=\"flex flex-col items-start gap-3\"\n >\n <AccentSwatchGroups\n accentOptions={accentPresets}\n themeAccentOptions={themeAccents()}\n resolvedAppearance={resolvedAppearance()}\n themeDefaultColor=\"var(--primary)\"\n />\n </Radio>\n </section>\n\n {/* --- 4. Fonts ------------------------------------------------------- */}\n <section class=\"flex flex-col gap-3\">\n <header class=\"flex flex-col gap-0.5\">\n <Heading as=\"h2\" size=\"card\">\n Fonts\n </Heading>\n <p class=\"max-w-prose text-sm text-muted-foreground\">\n Choose separate families and sizes for the interface, reading, and code. Font families\n come from the shared catalogue and are self-hosted.\n </p>\n </header>\n <AppearanceFontSettingsGroup\n settings={selection().fonts ?? DEFAULT_APPEARANCE_EDITOR_FONT_SETTINGS}\n onChange={(fonts) => setSelection({ fonts })}\n />\n </section>\n </div>\n )\n}\n\nfunction ThemeSection(props: {\n title: string\n description: string\n themes: ReturnType<typeof themesForAppearance>\n selectedId: string\n onThemeSelect: (theme: ReturnType<typeof themesForAppearance>[number]) => void\n}) {\n return (\n <section class=\"flex flex-col gap-3\">\n <header class=\"flex flex-col gap-0.5\">\n <Heading as=\"h2\" size=\"card\">\n {props.title}\n </Heading>\n <p class=\"max-w-prose text-sm text-muted-foreground\">{props.description}</p>\n </header>\n <ThemePicker\n themes={props.themes}\n selectedId={props.selectedId}\n onThemeSelect={props.onThemeSelect}\n />\n </section>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAsCA,IAAMgB,eAAeV,oBAAoB,OAAO;AAChD,IAAMW,cAAcX,oBAAoB,MAAM;AAE9C,SAAgBY,gBAAgBC,OAA6B;CAC3D,MAAM,CAACC,OAAOC,QAAQnB,WAAWiB,OAAO,CAAC,OAAO,CAAC;CACjD,MAAM,EAAEG,WAAWC,cAAcC,oBAAoBC,iBAAiBZ,SAAS;CAC/E,MAAMa,uBACJrB,cAAcsB,MAAMC,WAAWA,OAAOC,OAAOP,UAAU,CAAC,CAACQ,MAAM,KAC/DL,aAAa,CAAC,CAACE,MAAMC,WAAWA,OAAOC,OAAOP,UAAU,CAAC,CAACQ,MAAM,IAC5DR,UAAU,CAAC,CAACQ,SACZ;CAEN,cAAA;EAAA,IAAAC,OAAAC,OAAA,GAAAC,QAAAF,KAAAG,YAAAC,QAAAF,MAAAC,YAAAE,QAAAD,MAAAD,YAAAG,QAAAJ,MAAAK,aAAAC,QAAAF,MAAAH,YAAAM,QAAAD,MAAAL,YAAAO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OAAAzC;EAAAa,OAAA4B,QAAA3B,gBAGOlC,SAAO;GAACmC,IAAE;GAAMC,MAAI;GAAA,IAAAC,WAAA;IAAA,OAClBhC,MAAMwC;GAAK;EAAA,CAAA,GAAAiB,MAAA;EAAA7B,OAAA6B,cAEwCzD,MAAMqC,WAAW;EAAAT,OAAA0B,OAAAzB,gBAExEpC,aAAW;GAAA,IACVgD,SAAM;IAAA,OAAEzC,MAAMyC;GAAM;GAAA,IACpBC,aAAU;IAAA,OAAE1C,MAAM0C;GAAU;GAAA,IAC5BE,gBAAa;IAAA,OAAE5C,MAAM4C;GAAa;EAAA,CAAA,GAAA,IAAA;EAAA,OAAAU;CAAA,EAAA,CAAA;AAI1C"}
1
+ {"version":3,"file":"appearance-panel.js","names":["ComponentProps","Show","splitProps","RadioGroup","Radio","accentPresets","themesForAppearance","DEFAULT_APPEARANCE_EDITOR_FONT_SETTINGS","cn","AccentSwatchGroups","AppearanceFontSettingsGroup","RadioGroupItem","ThemePicker","useTheme","Heading","AppearancePanelProps","LIGHT_THEMES","DARK_THEMES","AppearancePanel","props","local","rest","selection","setSelection","resolvedAppearance","themeAccents","selectedAccent","some","option","id","accent","_el$","_tmpl$","_el$2","firstChild","_el$3","_el$4","_el$5","nextSibling","_el$6","_el$7","_el$8","_el$9","_el$0","_$spread","_$mergeProps","class","_$insert","_$createComponent","as","size","children","value","appearance","onChange","label","description","when","ThemeSection","title","themes","selectedId","lightThemeId","onThemeSelect","theme","darkThemeId","orientation","accentOptions","themeDefaultColor","settings","fonts","ReturnType","_el$1","_tmpl$2","_el$10","_el$11","_$mergeProps","_$createComponent","RadioGroup","Radio"],"sources":["../../../src/components/theme/appearance-panel.tsx"],"sourcesContent":["import type { ComponentProps } from 'solid-js'\nimport { Show, splitProps } from 'solid-js'\nimport { RadioGroup as Radio } from '@kobalte/core/radio-group'\nimport { accentPresets } from '#lib/tokens'\nimport { themesForAppearance } from '#lib/themes'\nimport { DEFAULT_APPEARANCE_EDITOR_FONT_SETTINGS } from '#lib/appearance-font-settings'\nimport { cn } from '#lib/utils'\nimport { AccentSwatchGroups } from '../composites/appearance-editor/accent-swatch-groups'\nimport { AppearanceFontSettingsGroup } from '../composites/appearance-editor/font-settings-group'\nimport { RadioGroup, RadioGroupItem } from '../ui/radio-group/radio-group'\nimport { ThemePicker } from './theme-picker'\nimport { useTheme } from './theme-provider'\nimport { Heading } from '../ui/typography'\n\n/**\n * AppearancePanel.\n *\n * The appearance page, as a component rather than as a screen each application\n * draws for itself. Two applications that both let a user choose a theme should\n * offer the *same* choices in the *same* arrangement — otherwise \"Adea\" and\n * \"Cortana\" are two products that happen to share a component library, which is\n * the opposite of what this system is for.\n *\n * Four axes, in the order a user thinks about them:\n *\n * 1. **Appearance** — light, dark, or follow the system.\n * 2. **Themes** — one for each appearance. Both are shown at once, because the\n * choice is per-appearance and hiding the other half makes it feel like one\n * setting that keeps changing.\n * 3. **Accent** — adea's presets, then the accents the selected theme pair\n * carries itself, layered on whichever theme is active.\n * 4. **Fonts** — separate families and sizes for interface, content and code.\n *\n * The panel reads and writes the provider's preference and keeps no state of its\n * own, so it cannot disagree with what is applied.\n */\nexport type AppearancePanelProps = ComponentProps<'div'>\n\nconst LIGHT_THEMES = themesForAppearance('light')\nconst DARK_THEMES = themesForAppearance('dark')\n\nexport function AppearancePanel(props: AppearancePanelProps) {\n const [local, rest] = splitProps(props, ['class'])\n const { selection, setSelection, resolvedAppearance, themeAccents } = useTheme()\n const selectedAccent = () =>\n accentPresets.some((option) => option.id === selection().accent) ||\n themeAccents().some((option) => option.id === selection().accent)\n ? selection().accent\n : 'theme'\n\n return (\n <div data-slot=\"appearance-panel\" class={cn('flex flex-col gap-8', local.class)} {...rest}>\n {/* --- 1. Appearance ------------------------------------------------- */}\n <section class=\"flex flex-col gap-3\">\n <header class=\"flex flex-col gap-0.5\">\n <Heading as=\"h2\" size=\"card\">\n Appearance\n </Heading>\n <p class=\"max-w-prose text-sm text-muted-foreground\">\n Follow the system, or pin one. The theme below is chosen per appearance, so switching at\n sunset does not make you choose again.\n </p>\n </header>\n <RadioGroup\n value={selection().appearance}\n onChange={(value) => setSelection({ appearance: value as 'light' | 'dark' | 'system' })}\n aria-label=\"Appearance\"\n >\n <RadioGroupItem value=\"light\" label=\"Light\" description=\"Always the light theme.\" />\n <RadioGroupItem value=\"dark\" label=\"Dark\" description=\"Always the dark theme.\" />\n <RadioGroupItem\n value=\"system\"\n label=\"Match the system\"\n description={`Currently resolving to ${resolvedAppearance()}.`}\n />\n </RadioGroup>\n </section>\n\n {/* --- 2. Themes ------------------------------------------------------ */}\n <Show when={resolvedAppearance() === 'light'}>\n <ThemeSection\n title=\"Light theme\"\n description=\"Shown when the appearance resolves to light.\"\n themes={LIGHT_THEMES}\n selectedId={selection().lightThemeId}\n onThemeSelect={(theme) => setSelection({ lightThemeId: theme.id })}\n />\n </Show>\n <Show when={resolvedAppearance() === 'dark'}>\n <ThemeSection\n title=\"Dark theme\"\n description=\"Shown when the appearance resolves to dark.\"\n themes={DARK_THEMES}\n selectedId={selection().darkThemeId}\n onThemeSelect={(theme) => setSelection({ darkThemeId: theme.id })}\n />\n </Show>\n\n {/* --- 3. Accent ------------------------------------------------------ */}\n <section class=\"flex flex-col gap-3\">\n <header class=\"flex flex-col gap-0.5\">\n <Heading as=\"h2\" size=\"card\">\n Accent\n </Heading>\n <p class=\"max-w-prose text-sm text-muted-foreground\">\n Colours the interactive roles — the primary button, the focus ring, a selected row — on\n top of the theme above — one of the presets, or a colour the theme carries itself. Every\n option is measured against the surface it lands on, so none of them can make a label\n unreadable.\n </p>\n </header>\n <Radio\n value={selectedAccent()}\n onChange={(accent) => setSelection({ accent })}\n orientation=\"horizontal\"\n aria-label=\"Accent\"\n class=\"flex flex-col items-start gap-3\"\n >\n <AccentSwatchGroups\n accentOptions={accentPresets}\n resolvedAppearance={resolvedAppearance()}\n themeDefaultColor=\"var(--primary)\"\n />\n </Radio>\n </section>\n\n {/* --- 4. Fonts ------------------------------------------------------- */}\n <section class=\"flex flex-col gap-3\">\n <header class=\"flex flex-col gap-0.5\">\n <Heading as=\"h2\" size=\"card\">\n Fonts\n </Heading>\n <p class=\"max-w-prose text-sm text-muted-foreground\">\n Choose separate families and sizes for the interface, reading, and code. Font families\n come from the shared catalogue and are self-hosted.\n </p>\n </header>\n <AppearanceFontSettingsGroup\n settings={selection().fonts ?? DEFAULT_APPEARANCE_EDITOR_FONT_SETTINGS}\n onChange={(fonts) => setSelection({ fonts })}\n />\n </section>\n </div>\n )\n}\n\nfunction ThemeSection(props: {\n title: string\n description: string\n themes: ReturnType<typeof themesForAppearance>\n selectedId: string\n onThemeSelect: (theme: ReturnType<typeof themesForAppearance>[number]) => void\n}) {\n return (\n <section class=\"flex flex-col gap-3\">\n <header class=\"flex flex-col gap-0.5\">\n <Heading as=\"h2\" size=\"card\">\n {props.title}\n </Heading>\n <p class=\"max-w-prose text-sm text-muted-foreground\">{props.description}</p>\n </header>\n <ThemePicker\n themes={props.themes}\n selectedId={props.selectedId}\n onThemeSelect={props.onThemeSelect}\n />\n </section>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAsCA,IAAMgB,eAAeV,oBAAoB,OAAO;AAChD,IAAMW,cAAcX,oBAAoB,MAAM;AAE9C,SAAgBY,gBAAgBC,OAA6B;CAC3D,MAAM,CAACC,OAAOC,QAAQnB,WAAWiB,OAAO,CAAC,OAAO,CAAC;CACjD,MAAM,EAAEG,WAAWC,cAAcC,oBAAoBC,iBAAiBZ,SAAS;CAC/E,MAAMa,uBACJrB,cAAcsB,MAAMC,WAAWA,OAAOC,OAAOP,UAAU,CAAC,CAACQ,MAAM,KAC/DL,aAAa,CAAC,CAACE,MAAMC,WAAWA,OAAOC,OAAOP,UAAU,CAAC,CAACQ,MAAM,IAC5DR,UAAU,CAAC,CAACQ,SACZ;CAEN,cAAA;EAAA,IAAAC,OAAAC,OAAA,GAAAC,QAAAF,KAAAG,YAAAC,QAAAF,MAAAC,YAAAE,QAAAD,MAAAD,YAAAG,Q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YAAAyC,SAAAD,OAAAxC;EAAAa,OAAA2B,QAAA1B,gBAGOlC,SAAO;GAACmC,IAAE;GAAMC,MAAI;GAAA,IAAAC,WAAA;IAAA,OAClBhC,MAAMwC;GAAK;EAAA,CAAA,GAAAgB,MAAA;EAAA5B,OAAA4B,cAEwCxD,MAAMqC,WAAW;EAAAT,OAAAyB,OAAAxB,gBAExEpC,aAAW;GAAA,IACVgD,SAAM;IAAA,OAAEzC,MAAMyC;GAAM;GAAA,IACpBC,aAAU;IAAA,OAAE1C,MAAM0C;GAAU;GAAA,IAC5BE,gBAAa;IAAA,OAAE5C,MAAM4C;GAAa;EAAA,CAAA,GAAA,IAAA;EAAA,OAAAS;CAAA,EAAA,CAAA;AAI1C"}
@@ -1,5 +1,5 @@
1
1
  import { cn } from "../../../lib/utils.js";
2
- import { overlayMotion, overlayPositioner, overlayScrim, overlaySurface, overlayTitle } from "../../../lib/overlay.js";
2
+ import { dialogSurface, overlayMotion, overlayPositioner, overlayScrim, overlayTitle } from "../../../lib/overlay.js";
3
3
  import { className, createComponent, insert, mergeProps, spread, template, use } from "solid-js/web";
4
4
  import { createEffect, createSignal, splitProps } from "solid-js";
5
5
  import { AlertDialog, Content } from "@kobalte/core/alert-dialog";
@@ -69,7 +69,7 @@ function AlertDialogContent(props) {
69
69
  var _el$ = _tmpl$();
70
70
  className(_el$, overlayPositioner);
71
71
  insert(_el$, createComponent(Content, mergeProps(blockDismissal, { get ["class"]() {
72
- return cn(overlaySurface, overlayMotion, "grid w-full max-w-md gap-4 p-5", local.class);
72
+ return cn(dialogSurface, overlayMotion, "grid w-full max-w-md gap-4 p-5", local.class);
73
73
  } }, rest)));
74
74
  return _el$;
75
75
  })()];
@@ -1 +1 @@
1
- {"version":3,"file":"alert-dialog.js","names":["AlertDialog","KobalteAlertDialog","Content","KobalteAlertDialogContent","ComponentProps","createEffect","createSignal","splitProps","overlayMotion","overlayPositioner","overlayScrim","overlaySurface","overlayTitle","cn","props","_$createComponent","AlertDialogTrigger","Trigger","AlertDialogPortal","Portal","AlertDialogOverlay","Overlay","local","rest","_$mergeProps","class","blockDismissal","onEscapeKeyDown","event","KeyboardEvent","preventDefault","onPointerDownOutside","Event","onFocusOutside","onInteractOutside","const","AlertDialogContent","children","_el$","_tmpl$","_$className","_$insert","AlertDialogHeader","_el$2","_tmpl$2","_$spread","AlertDialogFooter","_el$3","_tmpl$3","AlertDialogTitle","Title","AlertDialogDescription","Description","AlertDialogChoice","CloseButton","wrapper","setWrapper","HTMLSpanElement","root","undefined","querySelector","removeAttribute","_el$4","_tmpl$4","_$use","AlertDialogAction","AlertDialogCancel","AlertDialog","_$createComponent","KobalteAlertDialog","_$mergeProps","KobalteAlertDialogContent"],"sources":["../../../../src/components/ui/alert-dialog/alert-dialog.tsx"],"sourcesContent":["import {\n AlertDialog as KobalteAlertDialog,\n Content as KobalteAlertDialogContent,\n} from '@kobalte/core/alert-dialog'\n// Use the alert-specific export rather than DialogRoot.Content, which other imports can replace.\nimport type { ComponentProps } from 'solid-js'\nimport { createEffect, createSignal, splitProps } from 'solid-js'\nimport {\n overlayMotion,\n overlayPositioner,\n overlayScrim,\n overlaySurface,\n overlayTitle,\n} from '#lib/overlay'\nimport { cn } from '#lib/utils'\n\n/**\n * AlertDialog.\n *\n * A dialog that cannot be dismissed by accident: Escape and a click on the scrim\n * do nothing, and the user must choose one of the actions. That is the whole\n * difference from Dialog, and it is why this exists as its own component rather\n * than a prop — a caller has to reach for it deliberately.\n *\n * The consequence is a rule of use: this is for confirming a destructive or\n * irreversible step. Wrapping an ordinary form in an AlertDialog traps someone who\n * wants to back out.\n *\n * There is deliberately no close button in the corner. An X has no label, and the\n * point of this surface is that every exit is a named choice.\n */\nexport function AlertDialog(props: ComponentProps<typeof KobalteAlertDialog>) {\n return <KobalteAlertDialog {...props} />\n}\n\nexport function AlertDialogTrigger(props: ComponentProps<typeof KobalteAlertDialog.Trigger>) {\n return <KobalteAlertDialog.Trigger {...props} />\n}\n\nexport function AlertDialogPortal(props: ComponentProps<typeof KobalteAlertDialog.Portal>) {\n return <KobalteAlertDialog.Portal {...props} />\n}\n\nexport function AlertDialogOverlay(props: ComponentProps<typeof KobalteAlertDialog.Overlay>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <KobalteAlertDialog.Overlay\n class={cn(\n overlayScrim,\n 'data-expanded:animate-in data-expanded:fade-in-0 data-closed:animate-out data-closed:fade-out-0',\n local.class\n )}\n {...rest}\n />\n )\n}\n\n/**\n * The panel.\n *\n * Kobalte's `AlertDialog.Content` is `Dialog.Content` with `role=\"alertdialog\"`\n * and nothing else — Escape and an outside click dismiss it exactly as they\n * dismiss a Dialog. That is a real gap in the primitive, so the blocking is\n * implemented here, and it is the whole difference between this component and a\n * Dialog:\n *\n * - Escape is prevented, because a key that closes a confirmation is a key that\n * makes \"confirm\" meaningless.\n * - Pointer and focus interactions outside are prevented, including the scrim\n * click, for the same reason.\n *\n * There is deliberately no prop to turn this off. A surface that can be escaped\n * accidentally does not need to be an AlertDialog; it is a Dialog, and using this\n * one would be a claim about the flow that is not true.\n */\nconst blockDismissal = {\n onEscapeKeyDown: (event: KeyboardEvent) => event.preventDefault(),\n onPointerDownOutside: (event: Event) => event.preventDefault(),\n onFocusOutside: (event: Event) => event.preventDefault(),\n onInteractOutside: (event: Event) => event.preventDefault(),\n} as const\n\nexport function AlertDialogContent(props: ComponentProps<typeof KobalteAlertDialogContent>) {\n const [local, rest] = splitProps(props, ['class'])\n\n return (\n <KobalteAlertDialog.Portal>\n <AlertDialogOverlay />\n <div class={overlayPositioner}>\n <KobalteAlertDialogContent\n {...blockDismissal}\n class={cn(overlaySurface, overlayMotion, 'grid w-full max-w-md gap-4 p-5', local.class)}\n {...rest}\n />\n </div>\n </KobalteAlertDialog.Portal>\n )\n}\n\nexport function AlertDialogHeader(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <div\n data-slot=\"alert-dialog-header\"\n class={cn('flex flex-col gap-1.5 text-start', local.class)}\n {...rest}\n />\n )\n}\n\nexport function AlertDialogFooter(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <div\n data-slot=\"alert-dialog-footer\"\n class={cn('flex flex-col-reverse gap-2 sm:flex-row sm:justify-end', local.class)}\n {...rest}\n />\n )\n}\n\nexport function AlertDialogTitle(props: ComponentProps<typeof KobalteAlertDialog.Title>) {\n const [local, rest] = splitProps(props, ['class'])\n return <KobalteAlertDialog.Title class={cn(overlayTitle, local.class)} {...rest} />\n}\n\nexport function AlertDialogDescription(\n props: ComponentProps<typeof KobalteAlertDialog.Description>\n) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <KobalteAlertDialog.Description\n class={cn('text-muted-foreground text-sm', local.class)}\n {...rest}\n />\n )\n}\n\n/**\n * One of the dialog's two named choices.\n *\n * Kobalte labels its close button \"Dismiss\" by default, because a generic close\n * button is usually an icon with no text of its own. In an AlertDialog it is\n * something else: the named choices. An `aria-label` there *replaces* the visible\n * text, so a screen reader hears \"Dismiss\" twice and the user cannot tell the\n * destructive action from the safe one.\n *\n * The injected label is removed rather than overridden with an empty one. An empty\n * `aria-label` is not reliably ignored — some name computations treat its presence\n * as an explicit empty name, which leaves the button unnamed — so the attribute\n * has to go, and the visible text becomes the name. A caller whose button is an\n * icon passes its own `aria-label`, and that one is left alone.\n *\n * Applied through a layout-neutral wrapper because Kobalte keeps the `ref` for its\n * own dismissable layer and does not forward it. The wrapper is `display: contents`\n * so the button remains the flex item its parent lays out.\n */\nfunction AlertDialogChoice(props: ComponentProps<typeof KobalteAlertDialog.CloseButton>) {\n const [local, rest] = splitProps(props, ['class', 'aria-label'])\n const [wrapper, setWrapper] = createSignal<HTMLSpanElement>()\n\n createEffect(() => {\n const root = wrapper()\n if (!root || local['aria-label'] !== undefined) return\n root.querySelector('button')?.removeAttribute('aria-label')\n })\n\n return (\n <span ref={setWrapper} class=\"contents\">\n <KobalteAlertDialog.CloseButton class={cn(local.class)} {...rest} />\n </span>\n )\n}\n\nexport function AlertDialogAction(props: ComponentProps<typeof KobalteAlertDialog.CloseButton>) {\n return <AlertDialogChoice {...props} />\n}\n\nexport function AlertDialogCancel(props: ComponentProps<typeof KobalteAlertDialog.CloseButton>) {\n return <AlertDialogChoice {...props} />\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,SAAgBA,cAAYc,OAAkD;CAC5E,OAAAC,gBAAQd,aAAuBa,KAAK;AACtC;AAEA,SAAgBE,mBAAmBF,OAA0D;CAC3F,OAAAC,gBAAQd,YAAmBgB,SAAYH,KAAK;AAC9C;AAEA,SAAgBI,kBAAkBJ,OAAyD;CACzF,OAAAC,gBAAQd,YAAmBkB,QAAWL,KAAK;AAC7C;AAEA,SAAgBM,mBAAmBN,OAA0D;CAC3F,MAAM,CAACQ,OAAOC,QAAQhB,WAAWO,OAAO,CAAC,OAAO,CAAC;CACjD,OAAAC,gBACGd,YAAmBoB,SAAOG,WAAA,EAAA,KAAA,WAAA;EAAA,OAClBX,GACLH,cACA,mGACAY,MAAMG,KACR;CAAC,EAAA,GACGF,IAAI,CAAA;AAGd;;;;;;;;;;;;;;;;;;;AAoBA,IAAMG,iBAAiB;CACrBC,kBAAkBC,UAAyBA,MAAME,eAAe;CAChEC,uBAAuBH,UAAiBA,MAAME,eAAe;CAC7DG,iBAAiBL,UAAiBA,MAAME,eAAe;CACvDI,oBAAoBN,UAAiBA,MAAME,eAAe;AAC5D;AAEA,SAAgBM,mBAAmBtB,OAAyD;CAC1F,MAAM,CAACQ,OAAOC,QAAQhB,WAAWO,OAAO,CAAC,OAAO,CAAC;CAEjD,OAAAC,gBACGd,YAAmBkB,QAAM,EAAA,IAAAkB,WAAA;EAAA,OAAA,CAAAtB,gBACvBK,oBAAkB,CAAA,CAAA,UAAA;GAAA,IAAAkB,OAAAC,OAAA;GAAAC,UAAAF,MACP7B,iBAAiB;GAAAgC,OAAAH,MAAAvB,gBAC1BZ,SAAyBqB,WACpBE,gBAAc,EAAA,KAAA,WA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A,GACnDF,IAAI,CAAA;AAGd;;;;;;;;;;;;;;;;;;;;AAqBA,SAAS8B,kBAAkBvC,OAA8D;CACvF,MAAM,CAACQ,OAAOC,QAAQhB,WAAWO,OAAO,CAAC,SAAS,YAAY,CAAC;CAC/D,MAAM,CAACyC,SAASC,cAAclD,aAA8B;CAE5DD,mBAAmB;EACjB,MAAMqD,OAAOH,QAAQ;EACrB,IAAI,CAACG,QAAQpC,MAAM,kBAAkBqC,KAAAA,GAAW;EAChDD,KAAKE,cAAc,QAAQ,CAAC,EAAEC,gBAAgB,YAAY;CAC5D,CAAC;CAED,cAAA;EAAA,IAAAC,QAAAC,QAAA;EAAAC,IACaR,YAAUM,KAAA;EAAArB,OAAAqB,OAAA/C,gBAClBd,YAAmBqD,aAAW9B,WAAA,EAAA,KAAA,WAAA;GAAA,OAAQX,GAAGS,MAAMG,KAAK;EAAC,EAAA,GAAMF,IAAI,CAAA,CAAA;EAAA,OAAAuC;CAAA,EAAA,CAAA;AAGtE;AAEA,SAAgBG,kBAAkBnD,OAA8D;CAC9F,OAAAC,gBAAQsC,mBAAsBvC,KAAK;AACrC;AAEA,SAAgBoD,kBAAkBpD,OAA8D;CAC9F,OAAAC,gBAAQsC,mBAAsBvC,KAAK;AACrC"}
1
+ {"version":3,"file":"alert-dialog.js","names":["AlertDialog","KobalteAlertDialog","Content","KobalteAlertDialogContent","ComponentProps","createEffect","createSignal","splitProps","dialogSurface","overlayMotion","overlayPositioner","overlayScrim","overlayTitle","cn","props","_$createComponent","AlertDialogTrigger","Trigger","AlertDialogPortal","Portal","AlertDialogOverlay","Overlay","local","rest","_$mergeProps","class","blockDismissal","onEscapeKeyDown","event","KeyboardEvent","preventDefault","onPointerDownOutside","Event","onFocusOutside","onInteractOutside","const","AlertDialogContent","children","_el$","_tmpl$","_$className","_$insert","AlertDialogHeader","_el$2","_tmpl$2","_$spread","AlertDialogFooter","_el$3","_tmpl$3","AlertDialogTitle","Title","AlertDialogDescription","Description","AlertDialogChoice","CloseButton","wrapper","setWrapper","HTMLSpanElement","root","undefined","querySelector","removeAttribute","_el$4","_tmpl$4","_$use","AlertDialogAction","AlertDialogCancel","AlertDialog","_$createComponent","KobalteAlertDialog","_$mergeProps","KobalteAlertDialogContent"],"sources":["../../../../src/components/ui/alert-dialog/alert-dialog.tsx"],"sourcesContent":["import {\n AlertDialog as KobalteAlertDialog,\n Content as KobalteAlertDialogContent,\n} from '@kobalte/core/alert-dialog'\n// Use the alert-specific export rather than DialogRoot.Content, which other imports can replace.\nimport type { ComponentProps } from 'solid-js'\nimport { createEffect, createSignal, splitProps } from 'solid-js'\nimport {\n dialogSurface,\n overlayMotion,\n overlayPositioner,\n overlayScrim,\n overlayTitle,\n} from '#lib/overlay'\nimport { cn } from '#lib/utils'\n\n/**\n * AlertDialog.\n *\n * A dialog that cannot be dismissed by accident: Escape and a click on the scrim\n * do nothing, and the user must choose one of the actions. That is the whole\n * difference from Dialog, and it is why this exists as its own component rather\n * than a prop — a caller has to reach for it deliberately.\n *\n * The consequence is a rule of use: this is for confirming a destructive or\n * irreversible step. Wrapping an ordinary form in an AlertDialog traps someone who\n * wants to back out.\n *\n * There is deliberately no close button in the corner. An X has no label, and the\n * point of this surface is that every exit is a named choice.\n */\nexport function AlertDialog(props: ComponentProps<typeof KobalteAlertDialog>) {\n return <KobalteAlertDialog {...props} />\n}\n\nexport function AlertDialogTrigger(props: ComponentProps<typeof KobalteAlertDialog.Trigger>) {\n return <KobalteAlertDialog.Trigger {...props} />\n}\n\nexport function AlertDialogPortal(props: ComponentProps<typeof KobalteAlertDialog.Portal>) {\n return <KobalteAlertDialog.Portal {...props} />\n}\n\nexport function AlertDialogOverlay(props: ComponentProps<typeof KobalteAlertDialog.Overlay>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <KobalteAlertDialog.Overlay\n class={cn(\n overlayScrim,\n 'data-expanded:animate-in data-expanded:fade-in-0 data-closed:animate-out data-closed:fade-out-0',\n local.class\n )}\n {...rest}\n />\n )\n}\n\n/**\n * The panel.\n *\n * Kobalte's `AlertDialog.Content` is `Dialog.Content` with `role=\"alertdialog\"`\n * and nothing else — Escape and an outside click dismiss it exactly as they\n * dismiss a Dialog. That is a real gap in the primitive, so the blocking is\n * implemented here, and it is the whole difference between this component and a\n * Dialog:\n *\n * - Escape is prevented, because a key that closes a confirmation is a key that\n * makes \"confirm\" meaningless.\n * - Pointer and focus interactions outside are prevented, including the scrim\n * click, for the same reason.\n *\n * There is deliberately no prop to turn this off. A surface that can be escaped\n * accidentally does not need to be an AlertDialog; it is a Dialog, and using this\n * one would be a claim about the flow that is not true.\n */\nconst blockDismissal = {\n onEscapeKeyDown: (event: KeyboardEvent) => event.preventDefault(),\n onPointerDownOutside: (event: Event) => event.preventDefault(),\n onFocusOutside: (event: Event) => event.preventDefault(),\n onInteractOutside: (event: Event) => event.preventDefault(),\n} as const\n\nexport function AlertDialogContent(props: ComponentProps<typeof KobalteAlertDialogContent>) {\n const [local, rest] = splitProps(props, ['class'])\n\n return (\n <KobalteAlertDialog.Portal>\n <AlertDialogOverlay />\n <div class={overlayPositioner}>\n <KobalteAlertDialogContent\n {...blockDismissal}\n class={cn(dialogSurface, overlayMotion, 'grid w-full max-w-md gap-4 p-5', local.class)}\n {...rest}\n />\n </div>\n </KobalteAlertDialog.Portal>\n )\n}\n\nexport function AlertDialogHeader(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <div\n data-slot=\"alert-dialog-header\"\n class={cn('flex flex-col gap-1.5 text-start', local.class)}\n {...rest}\n />\n )\n}\n\nexport function AlertDialogFooter(props: ComponentProps<'div'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <div\n data-slot=\"alert-dialog-footer\"\n class={cn('flex flex-col-reverse gap-2 sm:flex-row sm:justify-end', local.class)}\n {...rest}\n />\n )\n}\n\nexport function AlertDialogTitle(props: ComponentProps<typeof KobalteAlertDialog.Title>) {\n const [local, rest] = splitProps(props, ['class'])\n return <KobalteAlertDialog.Title class={cn(overlayTitle, local.class)} {...rest} />\n}\n\nexport function AlertDialogDescription(\n props: ComponentProps<typeof KobalteAlertDialog.Description>\n) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <KobalteAlertDialog.Description\n class={cn('text-muted-foreground text-sm', local.class)}\n {...rest}\n />\n )\n}\n\n/**\n * One of the dialog's two named choices.\n *\n * Kobalte labels its close button \"Dismiss\" by default, because a generic close\n * button is usually an icon with no text of its own. In an AlertDialog it is\n * something else: the named choices. An `aria-label` there *replaces* the visible\n * text, so a screen reader hears \"Dismiss\" twice and the user cannot tell the\n * destructive action from the safe one.\n *\n * The injected label is removed rather than overridden with an empty one. An empty\n * `aria-label` is not reliably ignored — some name computations treat its presence\n * as an explicit empty name, which leaves the button unnamed — so the attribute\n * has to go, and the visible text becomes the name. A caller whose button is an\n * icon passes its own `aria-label`, and that one is left alone.\n *\n * Applied through a layout-neutral wrapper because Kobalte keeps the `ref` for its\n * own dismissable layer and does not forward it. The wrapper is `display: contents`\n * so the button remains the flex item its parent lays out.\n */\nfunction AlertDialogChoice(props: ComponentProps<typeof KobalteAlertDialog.CloseButton>) {\n const [local, rest] = splitProps(props, ['class', 'aria-label'])\n const [wrapper, setWrapper] = createSignal<HTMLSpanElement>()\n\n createEffect(() => {\n const root = wrapper()\n if (!root || local['aria-label'] !== undefined) return\n root.querySelector('button')?.removeAttribute('aria-label')\n })\n\n return (\n <span ref={setWrapper} class=\"contents\">\n <KobalteAlertDialog.CloseButton class={cn(local.class)} {...rest} />\n </span>\n )\n}\n\nexport function AlertDialogAction(props: ComponentProps<typeof KobalteAlertDialog.CloseButton>) {\n return <AlertDialogChoice {...props} />\n}\n\nexport function AlertDialogCancel(props: ComponentProps<typeof KobalteAlertDialog.CloseButton>) {\n return <AlertDialogChoice {...props} />\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,SAAgBA,cAAYc,OAAkD;CAC5E,OAAAC,gBAAQd,aAAuBa,KAAK;AACtC;AAEA,SAA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ED,sEAAsE;AACtE,wBAAgB,aAAa,CAAC,KAAK,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,IAAI,CAAA;CAAE,kCAkB3E"}
@@ -108,7 +108,7 @@ function ComboboxItem(props) {
108
108
  return [createComponent(Combobox.ItemLabel, { get children() {
109
109
  return local.children;
110
110
  } }), createComponent(Combobox.ItemIndicator, {
111
- "class": "absolute end-2 flex size-4 items-center justify-center",
111
+ "class": "absolute end-2 flex size-4 items-center justify-center text-primary",
112
112
  get children() {
113
113
  return createComponent(Check, { "class": "size-4" });
114
114
  }