@adea-ai/ui 0.108.0 → 0.109.1

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 (74) hide show
  1. package/dist/NOTICE +13 -0
  2. package/dist/components/composites/update-dialog/update-dialog.js +1 -1
  3. package/dist/components/layout/contextual-sidebar/contextual-sidebar.d.ts.map +1 -1
  4. package/dist/components/layout/contextual-sidebar/contextual-sidebar.js +45 -35
  5. package/dist/components/layout/contextual-sidebar/contextual-sidebar.js.map +1 -1
  6. package/dist/components/layout/contextual-sidebar/mobile-contextual-sidebar.d.ts +12 -0
  7. package/dist/components/layout/contextual-sidebar/mobile-contextual-sidebar.d.ts.map +1 -0
  8. package/dist/components/layout/contextual-sidebar/mobile-contextual-sidebar.js +36 -0
  9. package/dist/components/layout/contextual-sidebar/mobile-contextual-sidebar.js.map +1 -0
  10. package/dist/components/ui/alert-dialog/alert-dialog.d.ts.map +1 -1
  11. package/dist/components/ui/alert-dialog/alert-dialog.js +2 -6
  12. package/dist/components/ui/alert-dialog/alert-dialog.js.map +1 -1
  13. package/dist/components/ui/annotation-surface/annotation-surface.css +27 -0
  14. package/dist/components/ui/annotation-surface/annotation-surface.d.ts +66 -0
  15. package/dist/components/ui/annotation-surface/annotation-surface.d.ts.map +1 -0
  16. package/dist/components/ui/annotation-surface/annotation-surface.js +244 -0
  17. package/dist/components/ui/annotation-surface/annotation-surface.js.map +1 -0
  18. package/dist/components/ui/annotation-surface/geometry.d.ts +10 -0
  19. package/dist/components/ui/annotation-surface/geometry.d.ts.map +1 -0
  20. package/dist/components/ui/annotation-surface/geometry.js +19 -0
  21. package/dist/components/ui/annotation-surface/geometry.js.map +1 -0
  22. package/dist/components/ui/annotation-surface/index.d.ts +4 -0
  23. package/dist/components/ui/annotation-surface/index.d.ts.map +1 -0
  24. package/dist/components/ui/annotation-surface/index.js +2 -0
  25. package/dist/components/ui/board/board.js +1 -1
  26. package/dist/components/ui/dialog/dialog.d.ts.map +1 -1
  27. package/dist/components/ui/dialog/dialog.js +2 -6
  28. package/dist/components/ui/dialog/dialog.js.map +1 -1
  29. package/dist/components/ui/item/item.d.ts +1 -1
  30. package/dist/components/ui/sheet/sheet.d.ts +1 -1
  31. package/dist/components/ui/sheet/sheet.d.ts.map +1 -1
  32. package/dist/components/ui/sheet/sheet.js +2 -5
  33. package/dist/components/ui/sheet/sheet.js.map +1 -1
  34. package/dist/components/ui/typography/typography.d.ts.map +1 -1
  35. package/dist/components/ui/typography/typography.js +2 -2
  36. package/dist/components/ui/typography/typography.js.map +1 -1
  37. package/dist/index.d.ts +1 -0
  38. package/dist/index.d.ts.map +1 -1
  39. package/dist/index.js +3 -2
  40. package/dist/lib/overlay.d.ts +5 -0
  41. package/dist/lib/overlay.d.ts.map +1 -1
  42. package/dist/lib/overlay.js +6 -1
  43. package/dist/lib/overlay.js.map +1 -1
  44. package/dist/r/alert-dialog.json +0 -1
  45. package/dist/r/annotation-surface.json +32 -0
  46. package/dist/r/contextual-sidebar.json +5 -0
  47. package/dist/r/dialog.json +0 -1
  48. package/dist/r/registry.json +37 -3
  49. package/dist/r/sheet.json +0 -1
  50. package/dist/r/src/components/layout/contextual-sidebar/contextual-sidebar.tsx +41 -16
  51. package/dist/r/src/components/layout/contextual-sidebar/mobile-contextual-sidebar.tsx +28 -0
  52. package/dist/r/src/components/ui/alert-dialog/alert-dialog.tsx +8 -8
  53. package/dist/r/src/components/ui/annotation-surface/annotation-surface.css +27 -0
  54. package/dist/r/src/components/ui/annotation-surface/annotation-surface.tsx +316 -0
  55. package/dist/r/src/components/ui/annotation-surface/geometry.ts +31 -0
  56. package/dist/r/src/components/ui/annotation-surface/index.ts +13 -0
  57. package/dist/r/src/components/ui/dialog/dialog.tsx +8 -8
  58. package/dist/r/src/components/ui/sheet/sheet.tsx +2 -7
  59. package/dist/r/src/components/ui/typography/typography.tsx +3 -2
  60. package/dist/r/src/lib/overlay.ts +6 -0
  61. package/package.json +3 -2
  62. package/registry.json +37 -3
  63. package/src/components/layout/contextual-sidebar/contextual-sidebar.tsx +41 -16
  64. package/src/components/layout/contextual-sidebar/mobile-contextual-sidebar.tsx +28 -0
  65. package/src/components/ui/alert-dialog/alert-dialog.tsx +8 -8
  66. package/src/components/ui/annotation-surface/annotation-surface.css +27 -0
  67. package/src/components/ui/annotation-surface/annotation-surface.tsx +316 -0
  68. package/src/components/ui/annotation-surface/geometry.ts +31 -0
  69. package/src/components/ui/annotation-surface/index.ts +13 -0
  70. package/src/components/ui/dialog/dialog.tsx +8 -8
  71. package/src/components/ui/sheet/sheet.tsx +2 -7
  72. package/src/components/ui/typography/typography.tsx +3 -2
  73. package/src/index.ts +1 -0
  74. package/src/lib/overlay.ts +6 -0
package/dist/NOTICE CHANGED
@@ -427,6 +427,19 @@ The shared component owns reusable geometry and pointer/keyboard controls only.
427
427
  T3 runtime state, streaming, Electron services, native picture-in-picture,
428
428
  notifications and content rendering are not included.
429
429
 
430
+ ## Annotation viewport adapted from Adea Dev View
431
+
432
+ `packages/ui/src/components/ui/annotation-surface/` supplies the shared,
433
+ pixel-free viewport, normalized pointer capture and keyboard start behavior for
434
+ Adea's BrowserPane annotation adapter. That adapter is issue #718 and traces its
435
+ region drag interaction to t3code's annotation implementation, pinned at
436
+ `77bca8b2d76a1f42552e5eee7d277fcb1160347a`; the MIT license and copyright for
437
+ that revision are recorded in the t3code section above. Adea's host captures a
438
+ screenshot only when an annotation is submitted, so this shared component never
439
+ reads or renders live pixels and receives no screenshot or permission authority.
440
+ It owns presentation and pointer capture; the host owns normalized domain
441
+ geometry, keyboard edits, annotation commands and capture timing.
442
+
430
443
  ## Catalog browser translated from KiroCrew (issue #425 selected unit)
431
444
 
432
445
  `packages/ui/src/components/composites/catalog-browser/` translates the
@@ -1,6 +1,6 @@
1
1
  import { cn } from "../../../lib/utils.js";
2
- import { Heading } from "../../ui/typography/typography.js";
3
2
  import { Badge } from "../../ui/badge/badge.js";
3
+ import { Heading } from "../../ui/typography/typography.js";
4
4
  import { Button } from "../../ui/button/button.js";
5
5
  import { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, createDialogFocusRestoration } from "../../ui/dialog/dialog.js";
6
6
  import { ActionButton } from "../action-button/action-button.js";
@@ -1 +1 @@
1
- {"version":3,"file":"contextual-sidebar.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/contextual-sidebar/contextual-sidebar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAa7C,MAAM,MAAM,8BAA8B,GAAG;IAC3C,wEAAwE;IACxE,MAAM,EAAE,OAAO,CAAA;IACf,qFAAqF;IACrF,WAAW,IAAI,WAAW,GAAG,SAAS,CAAA;CACvC,CAAA;AAED,MAAM,MAAM,sBAAsB,GAAG;IACnC,qDAAqD;IACrD,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,iEAAiE;IACjE,KAAK,EAAE,MAAM,CAAA;IACb,wDAAwD;IACxD,KAAK,EAAE,MAAM,CAAA;IACb,8EAA8E;IAC9E,IAAI,EAAE,OAAO,CAAA;IACb,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAAA;IACjC,sEAAsE;IACtE,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,gFAAgF;IAChF,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,sEAAsE;IACtE,eAAe,CAAC,EAAE,QAAQ,CAAC,WAAW,GAAG,SAAS,CAAC,CAAA;IACnD,iFAAiF;IACjF,gBAAgB,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,GAAG,SAAS,EAAE,MAAM,EAAE,OAAO,KAAK,IAAI,CAAA;IAC9E,+DAA+D;IAC/D,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,6DAA6D;IAC7D,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;IACnD,iEAAiE;IACjE,MAAM,CAAC,CAAC,OAAO,EAAE,8BAA8B,GAAG,GAAG,CAAC,OAAO,CAAA;IAC7D,0EAA0E;IAC1E,OAAO,CAAC,OAAO,EAAE,8BAA8B,GAAG,GAAG,CAAC,OAAO,CAAA;IAC7D,oEAAoE;IACpE,MAAM,CAAC,CAAC,OAAO,EAAE,8BAA8B,GAAG,GAAG,CAAC,OAAO,CAAA;IAC7D,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IAClC,aAAa,CAAC,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;CACpC,CAAA;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,eAgH9D"}
1
+ {"version":3,"file":"contextual-sidebar.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/contextual-sidebar/contextual-sidebar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAe7C,MAAM,MAAM,8BAA8B,GAAG;IAC3C,wEAAwE;IACxE,MAAM,EAAE,OAAO,CAAA;IACf,qFAAqF;IACrF,WAAW,IAAI,WAAW,GAAG,SAAS,CAAA;CACvC,CAAA;AAED,MAAM,MAAM,sBAAsB,GAAG;IACnC,qDAAqD;IACrD,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,iEAAiE;IACjE,KAAK,EAAE,MAAM,CAAA;IACb,wDAAwD;IACxD,KAAK,EAAE,MAAM,CAAA;IACb,8EAA8E;IA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wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,eAuI9D"}
@@ -1,5 +1,4 @@
1
1
  import { cn } from "../../../lib/utils.js";
2
- import { Sheet, SheetContent, SheetTitle } from "../../ui/sheet/sheet.js";
3
2
  import { SidebarNav, SidebarNavContent, SidebarNavFooter, SidebarNavHeader, SidebarNavTitle } from "../sidebar-nav/sidebar-nav.js";
4
3
  import { PixelResizeHandle } from "../pixel-resize-handle/pixel-resize-handle.js";
5
4
  import { createComponent, memo } from "solid-js/web";
@@ -14,6 +13,17 @@ import { Show, createSignal, createUniqueId, onCleanup, onMount } from "solid-js
14
13
  */
15
14
  function ContextualSidebar(props) {
16
15
  const [isNarrowViewport, setIsNarrowViewport] = createSignal(false);
16
+ const [mobileLoad, setMobileLoad] = createSignal();
17
+ let mobileRequested = false;
18
+ const loadMobile = () => {
19
+ if (mobileRequested) return;
20
+ mobileRequested = true;
21
+ import("./mobile-contextual-sidebar.js").then((module) => {
22
+ if (mobileRequested) setMobileLoad(module);
23
+ }, (error) => {
24
+ if (mobileRequested) setMobileLoad({ error });
25
+ });
26
+ };
17
27
  const [mobileMount, setMobileMount] = createSignal();
18
28
  const id = props.id ?? `contextual-sidebar-${createUniqueId()}`;
19
29
  const resizeLabel = () => props.resizeLabel ?? `Resize ${props.label}`;
@@ -25,13 +35,18 @@ function ContextualSidebar(props) {
25
35
  const media = window.matchMedia("(max-width: 48rem)");
26
36
  const updateViewport = () => {
27
37
  const wasNarrow = isNarrowViewport();
38
+ if (media.matches) loadMobile();
28
39
  if (media.matches && !wasNarrow) props.onOpenChange(false);
29
40
  setIsNarrowViewport(media.matches);
30
41
  };
42
+ if (media.matches) loadMobile();
31
43
  if (media.matches && props.wideViewportAtLoad && props.open) props.onOpenChange(false);
32
44
  setIsNarrowViewport(media.matches);
33
45
  media.addEventListener("change", updateViewport);
34
- onCleanup(() => media.removeEventListener("change", updateViewport));
46
+ onCleanup(() => {
47
+ mobileRequested = false;
48
+ media.removeEventListener("change", updateViewport);
49
+ });
35
50
  });
36
51
  const renderSidebar = (mobile) => {
37
52
  let element;
@@ -155,43 +170,38 @@ function ContextualSidebar(props) {
155
170
  }
156
171
  });
157
172
  };
158
- return createComponent(Sheet, {
159
- get open() {
160
- return memo(() => !!isNarrowViewport())() && props.open;
173
+ return [createComponent(Show, {
174
+ get when() {
175
+ return !isNarrowViewport();
161
176
  },
162
- onOpenChange: (open) => props.onOpenChange(open),
163
- get children() {
164
- return [createComponent(Show, {
165
- get when() {
166
- return !isNarrowViewport();
177
+ children: (_wide) => renderSidebar(false)
178
+ }), createComponent(Show, {
179
+ get when() {
180
+ return mobileLoad();
181
+ },
182
+ keyed: true,
183
+ children: (loaded) => {
184
+ if ("error" in loaded) throw loaded.error;
185
+ return createComponent(loaded.MobileSidebar, {
186
+ get open() {
187
+ return memo(() => !!isNarrowViewport())() && props.open;
167
188
  },
168
- children: (_wide) => renderSidebar(false)
169
- }), createComponent(Show, {
170
- get when() {
171
- return isNarrowViewport();
189
+ get onOpenChange() {
190
+ return props.onOpenChange;
172
191
  },
173
- get children() {
174
- return createComponent(SheetContent, {
175
- side: "start",
176
- get ["class"]() {
177
- return cn("gap-0 p-0", props.sheetClass);
178
- },
179
- get restoreFocusRef() {
180
- return props.restoreFocusRef;
181
- },
182
- get children() {
183
- return [createComponent(SheetTitle, {
184
- "class": "sr-only",
185
- get children() {
186
- return [memo(() => props.title), " navigation"];
187
- }
188
- }), memo(() => renderSidebar(true))];
189
- }
190
- });
191
- }
192
- })];
192
+ get label() {
193
+ return props.label;
194
+ },
195
+ get sheetClass() {
196
+ return props.sheetClass;
197
+ },
198
+ get restoreFocusRef() {
199
+ return props.restoreFocusRef;
200
+ },
201
+ renderSidebar: () => renderSidebar(true)
202
+ });
193
203
  }
194
- });
204
+ })];
195
205
  }
196
206
  //#endregion
197
207
  export { ContextualSidebar };
@@ -1 +1 @@
1
- {"version":3,"file":"contextual-sidebar.js","names":["Accessor","JSX","Show","createSignal","createUniqueId","onCleanup","onMount","cn","Sheet","SheetContent","SheetTitle","SidebarNav","SidebarNavContent","SidebarNavFooter","SidebarNavHeader","SidebarNavTitle","PixelResizeHandle","ContextualSidebarRenderContext","mobile","portalMount","HTMLElement","ContextualSidebarProps","id","label","title","open","onOpenChange","width","minimum","maximum","step","wideViewportAtLoad","resizeLabel","restoreFocusRef","onSidebarElement","element","sidebarClass","sheetClass","headerClass","contentClass","footerClass","headingAs","header","context","Element","content","footer","onWidthChange","onWidthCommit","ContextualSidebar","props","isNarrowViewport","setIsNarrowViewport","mobileMount","setMobileMount","connected","mount","isConnected","undefined","media","window","matchMedia","updateViewport","wasNarrow","matches","addEventListener","removeEventListener","renderSidebar","navigationId","_$createComponent","as","aria-label","aria-hidden","inert","data-open","String","ref","node","queueMicrotask","class","children","when","side","value","controls","onChange","onCommit","_$memo","_wide","_$createComponent","_$memo"],"sources":["../../../../src/components/layout/contextual-sidebar/contextual-sidebar.tsx"],"sourcesContent":["import type { Accessor, JSX } from 'solid-js'\nimport { Show, createSignal, createUniqueId, onCleanup, onMount } from 'solid-js'\nimport { cn } from '#lib/utils'\nimport { Sheet, SheetContent, SheetTitle } from '../../ui/sheet'\nimport {\n SidebarNav,\n SidebarNavContent,\n SidebarNavFooter,\n SidebarNavHeader,\n SidebarNavTitle,\n} from '../sidebar-nav/sidebar-nav'\nimport { PixelResizeHandle } from '../pixel-resize-handle/pixel-resize-handle'\n\nexport type ContextualSidebarRenderContext = {\n /** Whether the slot is being rendered inside the modal mobile sheet. */\n mobile: boolean\n /** Mount nested popovers and menus inside the mobile dialog's accessibility tree. */\n portalMount(): HTMLElement | undefined\n}\n\nexport type ContextualSidebarProps = {\n /** Stable host id prefix; generated when omitted. */\n id?: string\n /** Landmark name shared by the desktop and mobile navigation. */\n label: string\n /** Visible navigation title and mobile dialog title. */\n title: string\n /** Host-controlled expanded state for the desktop panel and mobile dialog. */\n open: boolean\n onOpenChange(open: boolean): void\n /** Current host-owned pixel width, reflected by the resize handle. */\n width: number\n minimum: number\n maximum: number\n step?: number\n /** Pass the host's initial viewport seed to distinguish stale desktop state. */\n wideViewportAtLoad?: boolean\n resizeLabel?: string\n /** Stable external opener used when the modal mobile sheet closes. */\n restoreFocusRef?: Accessor<HTMLElement | undefined>\n /** Called with the nav node so a host can project width onto its layout root. */\n onSidebarElement?: (element: HTMLElement | undefined, mobile: boolean) => void\n /** Host-owned layout classes applied to both nav instances. */\n sidebarClass?: string\n /** Host-owned responsive constraints for the modal sheet. */\n sheetClass?: string\n headerClass?: string\n contentClass?: string\n footerClass?: string\n headingAs?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'\n /** Optional action/content slot alongside the shared heading. */\n header?(context: ContextualSidebarRenderContext): JSX.Element\n /** View-specific navigation rows, projects, rooms, files, or sessions. */\n content(context: ContextualSidebarRenderContext): JSX.Element\n /** Optional view-specific footer, such as an archive affordance. */\n footer?(context: ContextualSidebarRenderContext): JSX.Element\n onWidthChange(width: number): void\n onWidthCommit?(width: number): void\n}\n\n/**\n * ContextualSidebar.\n *\n * Shared navigation geometry and interaction policy for an application's\n * contextual sidebar. The host keeps ownership of the actual grid width,\n * persisted preference, open state, and view-specific navigation content.\n */\nexport function ContextualSidebar(props: ContextualSidebarProps) {\n const [isNarrowViewport, setIsNarrowViewport] = createSignal(false)\n const [mobileMount, setMobileMount] = createSignal<\n { element: HTMLElement; connected: boolean } | undefined\n >()\n const id = props.id ?? `contextual-sidebar-${createUniqueId()}`\n const resizeLabel = () => props.resizeLabel ?? `Resize ${props.label}`\n const portalMount = () => {\n const mount = mobileMount()\n return mount?.connected && mount.element.isConnected ? mount.element : undefined\n }\n\n onMount(() => {\n const media = window.matchMedia('(max-width: 48rem)')\n const updateViewport = () => {\n const wasNarrow = isNarrowViewport()\n // Close before mounting a modal. A desktop-expanded host state is not\n // mobile intent, and opening the Sheet for one frame can steal focus.\n if (media.matches && !wasNarrow) props.onOpenChange(false)\n setIsNarrowViewport(media.matches)\n }\n\n // A route can mount after a wide-loaded host crosses into mobile. Clear\n // that stale seed, but preserve a sidebar intentionally opened at a\n // narrow boot viewport.\n if (media.matches && props.wideViewportAtLoad && props.open) props.onOpenChange(false)\n setIsNarrowViewport(media.matches)\n media.addEventListener('change', updateViewport)\n onCleanup(() => media.removeEventListener('change', updateViewport))\n })\n\n const renderSidebar = (mobile: boolean) => {\n let element: HTMLElement | undefined\n const context: ContextualSidebarRenderContext = {\n mobile,\n portalMount: () => (mobile ? portalMount() : undefined),\n }\n const navigationId = `${id}-${mobile ? 'mobile' : 'desktop'}`\n\n onCleanup(() => {\n if (mobile && mobileMount()?.element === element) setMobileMount(undefined)\n element = undefined\n props.onSidebarElement?.(undefined, mobile)\n })\n\n return (\n <SidebarNav\n as=\"aside\"\n id={navigationId}\n aria-label={props.label}\n aria-hidden={!mobile && !props.open ? 'true' : undefined}\n inert={!mobile && !props.open}\n data-contextual-sidebar={mobile ? 'mobile' : 'desktop'}\n data-open={mobile ? undefined : String(props.open)}\n ref={(node) => {\n element = node\n if (mobile) {\n setMobileMount({ element: node, connected: node.isConnected })\n queueMicrotask(() => {\n if (node.isConnected && mobileMount()?.element === node)\n setMobileMount({ element: node, connected: true })\n })\n }\n props.onSidebarElement?.(node, mobile)\n }}\n class={cn('relative h-full w-full max-w-full', props.sidebarClass)}\n >\n <Show when={!mobile && props.open}>\n <PixelResizeHandle\n side=\"left\"\n value={props.width}\n minimum={props.minimum}\n maximum={props.maximum}\n step={props.step}\n label={resizeLabel()}\n controls={navigationId}\n onChange={props.onWidthChange}\n onCommit={props.onWidthCommit}\n />\n </Show>\n <Show when={!mobile || mobileMount()?.connected}>\n <SidebarNavHeader class={cn(mobile && 'pe-12', props.headerClass)}>\n <SidebarNavTitle as={props.headingAs ?? 'h2'}>{props.title}</SidebarNavTitle>\n {props.header?.(context)}\n </SidebarNavHeader>\n <SidebarNavContent class={props.contentClass}>{props.content(context)}</SidebarNavContent>\n {props.footer ? (\n <SidebarNavFooter class={props.footerClass}>{props.footer(context)}</SidebarNavFooter>\n ) : null}\n </Show>\n </SidebarNav>\n )\n }\n\n return (\n <Sheet\n open={isNarrowViewport() && props.open}\n onOpenChange={(open) => props.onOpenChange(open)}\n >\n <Show when={!isNarrowViewport()}>{(_wide) => renderSidebar(false)}</Show>\n <Show when={isNarrowViewport()}>\n <SheetContent\n side=\"start\"\n class={cn('gap-0 p-0', props.sheetClass)}\n restoreFocusRef={props.restoreFocusRef}\n >\n <SheetTitle class=\"sr-only\">{props.title} navigation</SheetTitle>\n {renderSidebar(true)}\n </SheetContent>\n </Show>\n </Sheet>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;AAmEA,SAAgBiD,kBAAkBC,OAA+B;CAC/D,MAAM,CAACC,kBAAkBC,uBAAuBjD,aAAa,KAAK;CAClE,MAAM,CAACkD,aAAaC,kBAAkBnD,aAEpC;CACF,MAAMmB,KAAK4B,MAAM5B,MAAM,sBAAsBlB,eAAe;CAC5D,MAAM4B,oBAAoBkB,MAAMlB,eAAe,UAAUkB,MAAM3B;CAC/D,MAAMJ,oBAAoB;EACxB,MAAMqC,QAAQH,YAAY;EAC1B,OAAOG,OAAOD,aAAaC,MAAMrB,QAAQsB,cAAcD,MAAMrB,UAAUuB,KAAAA;CACzE;CAEApD,cAAc;EACZ,MAAMqD,QAAQC,OAAOC,WAAW,oBAAoB;EACpD,MAAMC,uBAAuB;GAC3B,MAAMC,YAAYZ,iBAAiB;GAGnC,IAAIQ,MAAMK,WAAW,CAACD,WAAWb,MAAMxB,aAAa,KAAK;GACzD0B,oBAAoBO,MAAMK,OAAO;EACnC;EAKA,IAAIL,MAAMK,WAAWd,MAAMnB,sBAAsBmB,MAAMzB,MAAMyB,MAAMxB,aAAa,KAAK;EACrF0B,oBAAoBO,MAAMK,OAAO;EACjCL,MAAMM,iBAAiB,UAAUH,cAAc;EAC/CzD,gBAAgBsD,MAAMO,oBAAoB,UAAUJ,cAAc,CAAC;CACrE,CAAC;CAED,MAAMK,iBAAiBjD,WAAoB;EACzC,IAAIiB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;MAAA;KAAA;IAAA,CAAA,CAAA;GAAA;EAAA,CAAA;CAIhB;CAEA,OAAA0B,gBACG7D,OAAK;EAAA,IACJiB,OAAI;GAAA,OAAE8D,WAAA,CAAA,CAAApC,iBAAiB,CAAC,CAAA,CAAA,KAAID,MAAMzB;EAAI;EACtCC,eAAeD,SAASyB,MAAMxB,aAAaD,IAAI;EAAC,IAAAuD,WAAA;GAAA,OAAA,CAAAX,gBAE/CnE,MAAI;IAAA,IAAC+E,OAAI;KAAA,OAAE,CAAC9B,iBAAiB;IAAC;IAAA6B,WAAIQ,UAAUrB,cAAc,KAAK;GAAC,CAAA,GAAAE,gBAChEnE,MAAI;IAAA,IAAC+E,OAAI;KAAA,OAAE9B,iBAAiB;IAAC;IAAA,IAAA6B,WAAA;KAAA,OAAAX,gBAC3B5D,cAAY;MACXyE,MAAI;MAAA,KAAA,WAAA;OAAA,OACG3E,GAAG,aAAa2C,MAAMb,UAAU;MAAC;MAAA,IACxCJ,kBAAe;OAAA,OAAEiB,MAAMjB;MAAe;MAAA,IAAA+C,WAAA;OAAA,OAAA,CAAAX,gBAErC3D,YAAU;QAAA,SAAA;QAAA,IAAAsE,WAAA;SAAA,OAAA,CAAAO,WAAkBrC,MAAM1B,KAAK,GAAA,aAAA;QAAA;OAAA,CAAA,GAAA+D,WACvCpB,cAAc,IAAI,CAAC,CAAA;MAAA;KAAA,CAAA;IAAA;GAAA,CAAA,CAAA;EAAA;CAAA,CAAA;AAK9B"}
1
+ {"version":3,"file":"contextual-sidebar.js","names":["Accessor","JSX","Show","createSignal","createUniqueId","onCleanup","onMount","cn","SidebarNav","SidebarNavContent","SidebarNavFooter","SidebarNavHeader","SidebarNavTitle","PixelResizeHandle","MobileModule","MobileLoad","error","ContextualSidebarRenderContext","mobile","portalMount","HTMLElement","ContextualSidebarProps","id","label","title","open","onOpenChange","width","minimum","maximum","step","wideViewportAtLoad","resizeLabel","restoreFocusRef","onSidebarElement","element","sidebarClass","sheetClass","headerClass","contentClass","footerClass","headingAs","header","context","Element","content","footer","onWidthChange","onWidthCommit","ContextualSidebar","props","isNarrowViewport","setIsNarrowViewport","mobileLoad","setMobileLoad","mobileRequested","loadMobile","then","module","mobileMount","setMobileMount","connected","mount","isConnected","undefined","media","window","matchMedia","updateViewport","wasNarrow","matches","addEventListener","removeEventListener","renderSidebar","navigationId","_$createComponent","as","aria-label","aria-hidden","inert","data-open","String","ref","node","queueMicrotask","class","children","when","side","value","controls","onChange","onCommit","_$memo","_wide","keyed","loaded","MobileSidebar","_$createComponent","_$memo"],"sources":["../../../../src/components/layout/contextual-sidebar/contextual-sidebar.tsx"],"sourcesContent":["import type { Accessor, JSX } from 'solid-js'\nimport { Show, createSignal, createUniqueId, onCleanup, onMount } from 'solid-js'\nimport { cn } from '#lib/utils'\nimport {\n SidebarNav,\n SidebarNavContent,\n SidebarNavFooter,\n SidebarNavHeader,\n SidebarNavTitle,\n} from '../sidebar-nav/sidebar-nav'\nimport { PixelResizeHandle } from '../pixel-resize-handle/pixel-resize-handle'\n\ntype MobileModule = typeof import('./mobile-contextual-sidebar')\ntype MobileLoad = MobileModule | { error: unknown }\n\nexport type ContextualSidebarRenderContext = {\n /** Whether the slot is being rendered inside the modal mobile sheet. */\n mobile: boolean\n /** Mount nested popovers and menus inside the mobile dialog's accessibility tree. */\n portalMount(): HTMLElement | undefined\n}\n\nexport type ContextualSidebarProps = {\n /** Stable host id prefix; generated when omitted. */\n id?: string\n /** Landmark name shared by the desktop and mobile navigation. */\n label: string\n /** Visible navigation title and mobile dialog title. */\n title: string\n /** Host-controlled expanded state for the desktop panel and mobile dialog. */\n open: boolean\n onOpenChange(open: boolean): void\n /** Current host-owned pixel width, reflected by the resize handle. */\n width: number\n minimum: number\n maximum: number\n step?: number\n /** Pass the host's initial viewport seed to distinguish stale desktop state. */\n wideViewportAtLoad?: boolean\n resizeLabel?: string\n /** Stable external opener used when the modal mobile sheet closes. */\n restoreFocusRef?: Accessor<HTMLElement | undefined>\n /** Called with the nav node so a host can project width onto its layout root. */\n onSidebarElement?: (element: HTMLElement | undefined, mobile: boolean) => void\n /** Host-owned layout classes applied to both nav instances. */\n sidebarClass?: string\n /** Host-owned responsive constraints for the modal sheet. */\n sheetClass?: string\n headerClass?: string\n contentClass?: string\n footerClass?: string\n headingAs?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'\n /** Optional action/content slot alongside the shared heading. */\n header?(context: ContextualSidebarRenderContext): JSX.Element\n /** View-specific navigation rows, projects, rooms, files, or sessions. */\n content(context: ContextualSidebarRenderContext): JSX.Element\n /** Optional view-specific footer, such as an archive affordance. */\n footer?(context: ContextualSidebarRenderContext): JSX.Element\n onWidthChange(width: number): void\n onWidthCommit?(width: number): void\n}\n\n/**\n * ContextualSidebar.\n *\n * Shared navigation geometry and interaction policy for an application's\n * contextual sidebar. The host keeps ownership of the actual grid width,\n * persisted preference, open state, and view-specific navigation content.\n */\nexport function ContextualSidebar(props: ContextualSidebarProps) {\n const [isNarrowViewport, setIsNarrowViewport] = createSignal(false)\n const [mobileLoad, setMobileLoad] = createSignal<MobileLoad>()\n let mobileRequested = false\n // Keep the resolved component mounted across viewport changes for Sheet cleanup.\n const loadMobile = () => {\n if (mobileRequested) return\n mobileRequested = true\n // Native module caching shares successful loads without keeping a rejected promise.\n void import('./mobile-contextual-sidebar').then(\n (module) => {\n if (mobileRequested) setMobileLoad(module)\n },\n (error: unknown) => {\n if (mobileRequested) setMobileLoad({ error })\n }\n )\n }\n const [mobileMount, setMobileMount] = createSignal<\n { element: HTMLElement; connected: boolean } | undefined\n >()\n const id = props.id ?? `contextual-sidebar-${createUniqueId()}`\n const resizeLabel = () => props.resizeLabel ?? `Resize ${props.label}`\n const portalMount = () => {\n const mount = mobileMount()\n return mount?.connected && mount.element.isConnected ? mount.element : undefined\n }\n\n onMount(() => {\n const media = window.matchMedia('(max-width: 48rem)')\n const updateViewport = () => {\n const wasNarrow = isNarrowViewport()\n if (media.matches) loadMobile()\n // Close before mounting a modal. A desktop-expanded host state is not\n // mobile intent, and opening the Sheet for one frame can steal focus.\n if (media.matches && !wasNarrow) props.onOpenChange(false)\n setIsNarrowViewport(media.matches)\n }\n\n // A route can mount after a wide-loaded host crosses into mobile. Clear\n // that stale seed, but preserve a sidebar intentionally opened at a\n // narrow boot viewport.\n if (media.matches) loadMobile()\n if (media.matches && props.wideViewportAtLoad && props.open) props.onOpenChange(false)\n setIsNarrowViewport(media.matches)\n media.addEventListener('change', updateViewport)\n onCleanup(() => {\n mobileRequested = false\n media.removeEventListener('change', updateViewport)\n })\n })\n\n const renderSidebar = (mobile: boolean) => {\n let element: HTMLElement | undefined\n const context: ContextualSidebarRenderContext = {\n mobile,\n portalMount: () => (mobile ? portalMount() : undefined),\n }\n const navigationId = `${id}-${mobile ? 'mobile' : 'desktop'}`\n\n onCleanup(() => {\n if (mobile && mobileMount()?.element === element) setMobileMount(undefined)\n element = undefined\n props.onSidebarElement?.(undefined, mobile)\n })\n\n return (\n <SidebarNav\n as=\"aside\"\n id={navigationId}\n aria-label={props.label}\n aria-hidden={!mobile && !props.open ? 'true' : undefined}\n inert={!mobile && !props.open}\n data-contextual-sidebar={mobile ? 'mobile' : 'desktop'}\n data-open={mobile ? undefined : String(props.open)}\n ref={(node) => {\n element = node\n if (mobile) {\n setMobileMount({ element: node, connected: node.isConnected })\n queueMicrotask(() => {\n if (node.isConnected && mobileMount()?.element === node)\n setMobileMount({ element: node, connected: true })\n })\n }\n props.onSidebarElement?.(node, mobile)\n }}\n class={cn('relative h-full w-full max-w-full', props.sidebarClass)}\n >\n <Show when={!mobile && props.open}>\n <PixelResizeHandle\n side=\"left\"\n value={props.width}\n minimum={props.minimum}\n maximum={props.maximum}\n step={props.step}\n label={resizeLabel()}\n controls={navigationId}\n onChange={props.onWidthChange}\n onCommit={props.onWidthCommit}\n />\n </Show>\n <Show when={!mobile || mobileMount()?.connected}>\n <SidebarNavHeader class={cn(mobile && 'pe-12', props.headerClass)}>\n <SidebarNavTitle as={props.headingAs ?? 'h2'}>{props.title}</SidebarNavTitle>\n {props.header?.(context)}\n </SidebarNavHeader>\n <SidebarNavContent class={props.contentClass}>{props.content(context)}</SidebarNavContent>\n {props.footer ? (\n <SidebarNavFooter class={props.footerClass}>{props.footer(context)}</SidebarNavFooter>\n ) : null}\n </Show>\n </SidebarNav>\n )\n }\n\n return (\n <>\n <Show when={!isNarrowViewport()}>{(_wide) => renderSidebar(false)}</Show>\n <Show when={mobileLoad()} keyed>\n {(loaded) => {\n if ('error' in loaded) throw loaded.error\n return (\n <loaded.MobileSidebar\n open={isNarrowViewport() && props.open}\n onOpenChange={props.onOpenChange}\n label={props.label}\n sheetClass={props.sheetClass}\n restoreFocusRef={props.restoreFocusRef}\n renderSidebar={() => renderSidebar(true)}\n />\n )\n }}\n </Show>\n </>\n )\n}\n"],"mappings":";;;;;;;;;;;;;AAqEA,SAAgBiD,kBAAkBC,OAA+B;CAC/D,MAAM,CAACC,kBAAkBC,uBAAuBjD,aAAa,KAAK;CAClE,MAAM,CAACkD,YAAYC,iBAAiBnD,aAAyB;CAC7D,IAAIoD,kBAAkB;CAEtB,MAAMC,mBAAmB;EACvB,IAAID,iBAAiB;EACrBA,kBAAkB;EAElB,OAAY,iCAA8B,CAACE,MACxCC,WAAW;GACV,IAAIH,iBAAiBD,cAAcI,MAAM;EAC3C,IACC1C,UAAmB;GAClB,IAAIuC,iBAAiBD,cAAc,EAAEtC,MAAM,CAAC;EAC9C,CACF;CACF;CACA,MAAM,CAAC2C,aAAaC,kBAAkBzD,aAEpC;CACF,MAAMmB,KAAK4B,MAAM5B,MAAM,sBAAsBlB,eAAe;CAC5D,MAAM4B,oBAAoBkB,MAAMlB,eAAe,UAAUkB,MAAM3B;CAC/D,MAAMJ,oBAAoB;EACxB,MAAM2C,QAAQH,YAAY;EAC1B,OAAOG,OAAOD,aAAaC,MAAM3B,QAAQ4B,cAAcD,MAAM3B,UAAU6B,KAAAA;CACzE;CAEA1D,cAAc;EACZ,MAAM2D,QAAQC,OAAOC,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;EAG9C;CAAC,CAAA,CAAA;AAIT"}
@@ -0,0 +1,12 @@
1
+ import type { Accessor, JSX } from 'solid-js';
2
+ export type MobileContextualSidebarProps = {
3
+ open: boolean;
4
+ onOpenChange(open: boolean): void;
5
+ label: string;
6
+ sheetClass?: string;
7
+ restoreFocusRef?: Accessor<HTMLElement | undefined>;
8
+ renderSidebar(): JSX.Element;
9
+ };
10
+ /** Sheet wrappers are loaded only when a contextual sidebar enters mobile mode. */
11
+ export declare function MobileSidebar(props: MobileContextualSidebarProps): JSX.Element;
12
+ //# sourceMappingURL=mobile-contextual-sidebar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mobile-contextual-sidebar.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/contextual-sidebar/mobile-contextual-sidebar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAI7C,MAAM,MAAM,4BAA4B,GAAG;IACzC,IAAI,EAAE,OAAO,CAAA;IACb,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAAA;IACjC,KAAK,EAAE,MAAM,CAAA;IACb,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,eAAe,CAAC,EAAE,QAAQ,CAAC,WAAW,GAAG,SAAS,CAAC,CAAA;IACnD,aAAa,IAAI,GAAG,CAAC,OAAO,CAAA;CAC7B,CAAA;AAED,mFAAmF;AACnF,wBAAgB,aAAa,CAAC,KAAK,EAAE,4BAA4B,eAahE"}
@@ -0,0 +1,36 @@
1
+ import { cn } from "../../../lib/utils.js";
2
+ import { Sheet, SheetContent } from "../../ui/sheet/sheet.js";
3
+ import { createComponent } from "solid-js/web";
4
+ //#region src/components/layout/contextual-sidebar/mobile-contextual-sidebar.tsx
5
+ /** Sheet wrappers are loaded only when a contextual sidebar enters mobile mode. */
6
+ function MobileSidebar(props) {
7
+ return createComponent(Sheet, {
8
+ get open() {
9
+ return props.open;
10
+ },
11
+ get onOpenChange() {
12
+ return props.onOpenChange;
13
+ },
14
+ get children() {
15
+ return createComponent(SheetContent, {
16
+ side: "start",
17
+ get ["aria-label"]() {
18
+ return props.label;
19
+ },
20
+ get ["class"]() {
21
+ return cn("gap-0 p-0", props.sheetClass);
22
+ },
23
+ get restoreFocusRef() {
24
+ return props.restoreFocusRef;
25
+ },
26
+ get children() {
27
+ return props.renderSidebar();
28
+ }
29
+ });
30
+ }
31
+ });
32
+ }
33
+ //#endregion
34
+ export { MobileSidebar };
35
+
36
+ //# sourceMappingURL=mobile-contextual-sidebar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mobile-contextual-sidebar.js","names":["Accessor","JSX","cn","Sheet","SheetContent","MobileContextualSidebarProps","open","onOpenChange","label","sheetClass","restoreFocusRef","HTMLElement","renderSidebar","Element","MobileSidebar","props","_$createComponent","children","side","aria-label","class","_$createComponent"],"sources":["../../../../src/components/layout/contextual-sidebar/mobile-contextual-sidebar.tsx"],"sourcesContent":["import type { Accessor, JSX } from 'solid-js'\nimport { cn } from '#lib/utils'\nimport { Sheet, SheetContent } from '../../ui/sheet'\n\nexport type MobileContextualSidebarProps = {\n open: boolean\n onOpenChange(open: boolean): void\n label: string\n sheetClass?: string\n restoreFocusRef?: Accessor<HTMLElement | undefined>\n renderSidebar(): JSX.Element\n}\n\n/** Sheet wrappers are loaded only when a contextual sidebar enters mobile mode. */\nexport function MobileSidebar(props: MobileContextualSidebarProps) {\n return (\n <Sheet open={props.open} onOpenChange={props.onOpenChange}>\n <SheetContent\n side=\"start\"\n aria-label={props.label}\n class={cn('gap-0 p-0', props.sheetClass)}\n restoreFocusRef={props.restoreFocusRef}\n >\n {props.renderSidebar()}\n </SheetContent>\n </Sheet>\n )\n}\n"],"mappings":";;;;;AAcA,SAAgBc,cAAcC,OAAqC;CACjE,OAAAC,gBACGb,OAAK;EAAA,IAACG,OAAI;GAAA,OAAES,MAAMT;EAAI;EAAA,IAAEC,eAAY;GAAA,OAAEQ,MAA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,kBAAkB,CAAC,KAAK,CAAC,kCAGtF;AAED,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,cAAc,CAAC,OAAO,kBAAkB,CAAC,WAAW,CAAC,kCAS7D;AAsCD,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,kBAAkB,CAAC,WAAW,CAAC,kCAE7F;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,kBAAkB,CAAC,WAAW,CAAC,kCAE7F"}
@@ -1,6 +1,5 @@
1
1
  import { cn } from "../../../lib/utils.js";
2
- import { overlayMotion, overlayPositioner, overlayScrim, overlaySurface } from "../../../lib/overlay.js";
3
- import { headingVariants } from "../typography/typography.js";
2
+ import { overlayMotion, overlayPositioner, overlayScrim, overlaySurface, overlayTitle } from "../../../lib/overlay.js";
4
3
  import { className, createComponent, insert, mergeProps, spread, template, use } from "solid-js/web";
5
4
  import { createEffect, createSignal, splitProps } from "solid-js";
6
5
  import { AlertDialog, Content } from "@kobalte/core/alert-dialog";
@@ -99,10 +98,7 @@ function AlertDialogFooter(props) {
99
98
  function AlertDialogTitle(props) {
100
99
  const [local, rest] = splitProps(props, ["class"]);
101
100
  return createComponent(AlertDialog.Title, mergeProps({ get ["class"]() {
102
- return cn(headingVariants({
103
- size: "card",
104
- leading: "none"
105
- }), local.class);
101
+ return cn(overlayTitle, local.class);
106
102
  } }, rest));
107
103
  }
108
104
  function AlertDialogDescription(props) {
@@ -1 +1 @@
1
- {"version":3,"file":"alert-dialog.js","names":["AlertDialog","KobalteAlertDialog","Content","KobalteAlertDialogContent","ComponentProps","createEffect","createSignal","splitProps","overlayMotion","overlayPositioner","overlayScrim","overlaySurface","cn","headingVariants","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","size","leading","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 { overlayMotion, overlayPositioner, overlayScrim, overlaySurface } from '#lib/overlay'\nimport { cn } from '#lib/utils'\nimport { headingVariants } from '../typography'\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 (\n <KobalteAlertDialog.Title\n class={cn(headingVariants({ size: 'card', leading: 'none' }), local.class)}\n {...rest}\n />\n )\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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A,SAASgC,kBAAkBzC,OAA8D;CACvF,MAAM,CAACQ,OAAOC,QAAQhB,WAAWO,OAAO,CAAC,SAAS,YAAY,CAAC;CAC/D,MAAM,CAAC2C,SAASC,cAAcpD,aAA8B;CAE5DD,mBAAmB;EACjB,MAAMuD,OAAOH,QAAQ;EACrB,IAAI,CAACG,QAAQtC,MAAM,kBAAkBuC,KAAAA,GAAW;EAChDD,KAAKE,cAAc,QAAQ,CAAC,EAAEC,gBAAgB,YAAY;CAC5D,CAAC;CAED,cAAA;EAAA,IAAAC,QAAAC,QAAA;EAAAC,IACaR,YAAUM,KAAA;EAAAvB,OAAAuB,OAAAjD,gBAClBd,YAAmBuD,aAAWhC,WAAA,EAAA,KAAA,WAAA;GAAA,OAAQZ,GAAGU,MAAMG,KAAK;EAAC,EAAA,GAAMF,IAAI,CAAA,CAAA;EAAA,OAAAyC;CAAA,EAAA,CAAA;AAGtE;AAEA,SAAgBG,kBAAkBrD,OAA8D;CAC9F,OAAAC,gBAAQwC,mBAAsBzC,KAAK;AACrC;AAEA,SAAgBsD,kBAAkBtD,OAA8D;CAC9F,OAAAC,gBAAQwC,mBAAsBzC,KAAK;AACrC"}
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,YAAmBg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,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"}
@@ -0,0 +1,27 @@
1
+ .dev-annotation-surface {
2
+ touch-action: none;
3
+ cursor: crosshair;
4
+ background-image: repeating-linear-gradient(
5
+ 45deg,
6
+ color-mix(in oklch, var(--muted) 55%, transparent) 0 calc(var(--spacing) * 2),
7
+ transparent calc(var(--spacing) * 2) calc(var(--spacing) * 4)
8
+ );
9
+ }
10
+
11
+ .dev-annotation-surface[data-tool='point'] {
12
+ cursor: cell;
13
+ }
14
+
15
+ .dev-annotation-surface[data-dragging='true'] {
16
+ cursor: grabbing;
17
+ }
18
+
19
+ .dev-annotation-surface[aria-disabled='true'] {
20
+ touch-action: auto;
21
+ cursor: default;
22
+ }
23
+
24
+ .dev-annotation-surface__region,
25
+ .dev-annotation-surface__hint {
26
+ pointer-events: none;
27
+ }
@@ -0,0 +1,66 @@
1
+ import { type JSX } from 'solid-js';
2
+ import './annotation-surface.css';
3
+ import { type AnnotationSurfacePoint } from './geometry';
4
+ export type AnnotationSurfaceRegion = Readonly<{
5
+ x: number;
6
+ y: number;
7
+ width: number;
8
+ height: number;
9
+ }>;
10
+ export type AnnotationSurfaceDrag = Readonly<{
11
+ start: AnnotationSurfacePoint;
12
+ current: AnnotationSurfacePoint;
13
+ }>;
14
+ export type AnnotationSurfaceTool = 'region' | 'point';
15
+ export type AnnotationSurfaceDragPhase = 'start' | 'move' | 'end' | 'cancel' | 'keyboard';
16
+ export type AnnotationSurfacePointerEvent = PointerEvent & {
17
+ currentTarget: HTMLDivElement;
18
+ };
19
+ export type AnnotationSurfaceKeyboardEvent = KeyboardEvent & {
20
+ currentTarget: HTMLDivElement;
21
+ };
22
+ export type AnnotationSurfaceInputEvent = AnnotationSurfacePointerEvent | AnnotationSurfaceKeyboardEvent;
23
+ type SurfaceElementProps = Pick<JSX.HTMLAttributes<HTMLDivElement>, 'id' | 'aria-describedby'>;
24
+ export type AnnotationSurfaceProps = SurfaceElementProps & {
25
+ /** Accessible instructions for the keyboard-operated surface. */
26
+ label: string;
27
+ /** Region draws a captured drag; point reports a single placement point. */
28
+ tool: AnnotationSurfaceTool;
29
+ /** Normalized 0..1 geometry supplied by the host; absent means no region. */
30
+ region?: AnnotationSurfaceRegion;
31
+ /** Visible idle guidance. It is hidden while a region is present. */
32
+ hint?: JSX.Element;
33
+ /** Disable new drawing while the host is busy. Defaults to true. */
34
+ interactive?: boolean;
35
+ /** Changing this value cancels an in-flight drag owned by the host context. */
36
+ resetKey?: string | number;
37
+ /** Receives one normalized point in point mode. */
38
+ onPoint?: (point: AnnotationSurfacePoint, event: AnnotationSurfaceInputEvent) => void;
39
+ /** Receives drag phases; cancel has no drag and fires at most once per capture. */
40
+ onDragChange?: (drag: AnnotationSurfaceDrag | undefined, phase: AnnotationSurfaceDragPhase, event?: AnnotationSurfaceInputEvent) => void;
41
+ /** Domain keyboard policy stays with the host and receives the native event. */
42
+ onKeyDown?: (event: AnnotationSurfaceKeyboardEvent) => void;
43
+ /** Ref to the actual focusable and pointer-capturing HTMLDivElement. */
44
+ ref?: (element: HTMLDivElement) => void;
45
+ /** Layout only; appearance remains owned by the shared component. */
46
+ class?: string;
47
+ };
48
+ /**
49
+ * AnnotationSurface.
50
+ *
51
+ * A keyboard-focusable, viewport-shaped drawing surface for hosts that own an
52
+ * annotation domain. It renders normalized region geometry and idle guidance,
53
+ * captures region drags, and reports normalized points without reading or
54
+ * rendering screenshot pixels. The host keeps tool policy, domain geometry,
55
+ * persistence and capture commands.
56
+ *
57
+ * This bespoke application widget is necessary because a generic button or
58
+ * slider cannot represent a two-dimensional drawing viewport. Its keyboard
59
+ * behavior is supplied by the host and forwarded as a native key event. Space
60
+ * creates a centered region or places a point at the center; Escape is left to
61
+ * the host first, which can prevent the default gesture cancellation while it
62
+ * applies its own draft and mode rules.
63
+ */
64
+ export declare function AnnotationSurface(props: AnnotationSurfaceProps): JSX.Element;
65
+ export {};
66
+ //# sourceMappingURL=annotation-surface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"annotation-surface.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/annotation-surface/annotation-surface.tsx"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,GAAG,EACT,MAAM,UAAU,CAAA;AAEjB,OAAO,0BAA0B,CAAA;AACjC,OAAO,EAGL,KAAK,sBAAsB,EAC5B,MAAM,YAAY,CAAA;AAEnB,MAAM,MAAM,uBAAuB,GAAG,QAAQ,CAAC;IAC7C,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;IACT,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;CACf,CAAC,CAAA;AAEF,MAAM,MAAM,qBAAqB,GAAG,QAAQ,CAAC;IAC3C,KAAK,EAAE,sBAAsB,CAAA;IAC7B,OAAO,EAAE,sBAAsB,CAAA;CAChC,CAAC,CAAA;AAEF,MAAM,MAAM,qBAAqB,GAAG,QAAQ,GAAG,OAAO,CAAA;AACtD,MAAM,MAAM,0BAA0B,GAAG,OAAO,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,GAAG,UAAU,CAAA;AACzF,MAAM,MAAM,6BAA6B,GAAG,YAAY,GAAG;IAAE,aAAa,EAAE,cAAc,CAAA;CAAE,CAAA;AAC5F,MAAM,MAAM,8BAA8B,GAAG,aAAa,GAAG;IAAE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