@adea-ai/ui 0.151.0 → 0.151.7

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 (47) hide show
  1. package/README.md +5 -0
  2. package/dist/components/composites/action-button/action-button.d.ts.map +1 -1
  3. package/dist/components/composites/action-button/action-button.js +8 -2
  4. package/dist/components/composites/action-button/action-button.js.map +1 -1
  5. package/dist/components/composites/inline-citation/inline-citation.d.ts.map +1 -1
  6. package/dist/components/composites/inline-citation/inline-citation.js +39 -36
  7. package/dist/components/composites/inline-citation/inline-citation.js.map +1 -1
  8. package/dist/components/conversation/internal/chat-composer-shell.d.ts.map +1 -1
  9. package/dist/components/conversation/internal/chat-composer-shell.js +28 -4
  10. package/dist/components/conversation/internal/chat-composer-shell.js.map +1 -1
  11. package/dist/components/conversation/paste-token-editor.d.ts.map +1 -1
  12. package/dist/components/conversation/paste-token-editor.js +127 -37
  13. package/dist/components/conversation/paste-token-editor.js.map +1 -1
  14. package/dist/components/conversation/scroll-follow-core.d.ts +13 -0
  15. package/dist/components/conversation/scroll-follow-core.d.ts.map +1 -1
  16. package/dist/components/conversation/scroll-follow-core.js +12 -1
  17. package/dist/components/conversation/scroll-follow-core.js.map +1 -1
  18. package/dist/components/conversation/scroll-follow.d.ts.map +1 -1
  19. package/dist/components/conversation/scroll-follow.js +52 -21
  20. package/dist/components/conversation/scroll-follow.js.map +1 -1
  21. package/dist/components/ui/calendar/calendar.d.ts.map +1 -1
  22. package/dist/components/ui/calendar/calendar.js +109 -115
  23. package/dist/components/ui/calendar/calendar.js.map +1 -1
  24. package/dist/index.d.ts +1 -0
  25. package/dist/index.d.ts.map +1 -1
  26. package/dist/index.js +2 -1
  27. package/dist/r/appearance-editor.json +1 -1
  28. package/dist/r/lib.json +1 -1
  29. package/dist/r/registry.json +3 -3
  30. package/dist/r/src/components/composites/action-button/action-button.tsx +11 -1
  31. package/dist/r/src/components/composites/inline-citation/inline-citation.tsx +112 -105
  32. package/dist/r/src/components/conversation/internal/chat-composer-shell.tsx +36 -2
  33. package/dist/r/src/components/conversation/paste-token-editor.tsx +191 -49
  34. package/dist/r/src/components/conversation/scroll-follow-core.ts +23 -0
  35. package/dist/r/src/components/conversation/scroll-follow.ts +69 -17
  36. package/dist/r/src/components/ui/calendar/calendar.tsx +99 -104
  37. package/dist/r/theming.json +1 -1
  38. package/package.json +9 -3
  39. package/registry.json +3 -3
  40. package/src/components/composites/action-button/action-button.tsx +11 -1
  41. package/src/components/composites/inline-citation/inline-citation.tsx +112 -105
  42. package/src/components/conversation/internal/chat-composer-shell.tsx +36 -2
  43. package/src/components/conversation/paste-token-editor.tsx +191 -49
  44. package/src/components/conversation/scroll-follow-core.ts +23 -0
  45. package/src/components/conversation/scroll-follow.ts +69 -17
  46. package/src/components/ui/calendar/calendar.tsx +99 -104
  47. package/src/index.ts +1 -0
@@ -1 +1 @@
1
- {"version":3,"file":"scroll-follow.js","names":[],"sources":["../../../src/components/conversation/scroll-follow.ts"],"sourcesContent":["/*\n * Substantially translated from KiroCrew website/src/app-sdk/useChatScrollFollow.ts,\n * pinned at 283e136c0f902e965a535a7c9548c57c7504fed0.\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * This product includes software developed at Amazon.com, Inc. (https://www.amazon.com/).\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy at http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software distributed\n * under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations under the License.\n * Solid owner effects replace React refs/effects; native geometry and the\n * content/viewport observer contract are retained. No session store is copied.\n */\nimport { createEffect, createSignal, onCleanup, untrack } from 'solid-js'\nimport type { ConversationReadingPosition } from './conversation-surface'\nimport {\n atBottomEpsilon,\n bottomTarget,\n computeAtBottom,\n distanceFromBottom,\n evaluateAutoPin,\n isScrollUpIntent,\n isSelfScroll,\n resolveUserScrollStick,\n SELF_SCROLL_EPSILON,\n type ReaderInput,\n} from './scroll-follow-core'\n\nconst geometry = (element: HTMLDivElement) => ({\n scrollTop: element.scrollTop,\n scrollHeight: element.scrollHeight,\n clientHeight: element.clientHeight,\n})\nconst noop = () => {}\n\n/** Opens a hold on the follow position (see `createScrollFollow`); the function it returns closes it. */\nexport type ScrollFollowHold = () => () => void\n\n/** Internal plain-scroller binding; host-owned restoration can disable follow. */\nexport function createScrollFollow(options: {\n enabled: () => boolean\n resetKey: () => string | undefined\n threshold: () => number\n initialPosition?: () => ConversationReadingPosition | undefined\n onPositionChange?: (position: ConversationReadingPosition) => void\n}) {\n const [atBottom, setAtBottom] = createSignal(true)\n let scroller: HTMLDivElement | undefined\n let content: HTMLDivElement | undefined\n let stick = true\n let lastWriteTop = -1\n let lastWriteClientHeight = -1\n let previousTop = -1\n let lastScrollClientHeight = 0\n let pendingRestore: { frame: number; fromTop: number; target: number } | undefined\n let pendingRestoreUserIntent = false\n let removeRestoreIntentListeners = noop\n // A hold is the caller saying it is positioning the view (see `hold`): while one is\n // open and the reader was following, the content's moves are not read as the reader's.\n let holds = 0\n let holdFollowing = false\n let holdIntent = false\n let holdTop = -1\n // Bumped on every identity change, so a hold opened for the previous conversation can\n // neither pin the next one nor close over its state.\n let holdGeneration = 0\n const holding = () => holds > 0 && holdFollowing && !holdIntent\n // Is the view still where the hold left it? The content can move the offset only by\n // clamping it to the end it has now; anything else moved it from outside (a reveal, a\n // search jump), and that is the caller's to keep, so the hold gives way.\n const holdsPosition = (element: HTMLDivElement) => {\n if (!holding()) return false\n const maxTop = Math.max(0, element.scrollHeight - element.clientHeight)\n if (Math.abs(element.scrollTop - Math.min(holdTop, maxTop)) <= SELF_SCROLL_EPSILON) return true\n holdIntent = true\n return false\n }\n const reportPosition = () => {\n if (scroller)\n untrack(() =>\n options.onPositionChange?.({\n top: scroller!.scrollTop,\n following: options.enabled() && stick,\n })\n )\n }\n onCleanup(reportPosition)\n\n const writePin = (element: HTMLDivElement, target: number) => {\n // Instant writes keep the self-scroll reference synchronized. A smooth\n // animation would produce intermediate positions that resemble user input.\n element.scrollTop = target\n lastWriteTop = element.scrollTop\n lastWriteClientHeight = element.clientHeight\n previousTop = element.scrollTop\n }\n const pinHeld = (element: HTMLDivElement) => {\n const geom = geometry(element)\n stick = true\n if (distanceFromBottom(geom) > atBottomEpsilon()) writePin(element, bottomTarget(geom))\n // An end the engine already clamped to is accepted as it stands, and is the reference\n // from here on: the write before it is further down than the content now reaches.\n else {\n lastWriteTop = element.scrollTop\n lastWriteClientHeight = element.clientHeight\n previousTop = element.scrollTop\n }\n holdTop = element.scrollTop\n setAtBottom(computeAtBottom(geometry(element), options.threshold()))\n reportPosition()\n }\n const pinAuto = () => {\n if (!scroller || !options.enabled() || pendingRestore) return\n if (holdsPosition(scroller)) return pinHeld(scroller)\n const geom = geometry(scroller)\n const result = evaluateAutoPin({\n stick,\n geom,\n lastWriteTop,\n viewportShrink: lastWriteClientHeight >= 0 ? lastWriteClientHeight - geom.clientHeight : 0,\n })\n stick = result.stick\n if (result.pin) writePin(scroller, result.target)\n else if (result.stick) {\n lastWriteTop = result.target\n lastWriteClientHeight = geom.clientHeight\n }\n setAtBottom(computeAtBottom(geometry(scroller), options.threshold()))\n reportPosition()\n }\n const onScroll = () => {\n if (!scroller) return\n if (pendingRestore) {\n // A reset can clamp the outgoing offset while the incoming rows are\n // shorter. That notification is layout, not reader intent, and must not\n // cancel the snapshot waiting for the new rows to commit.\n const maxTop = Math.max(0, scroller.scrollHeight - scroller.clientHeight)\n const clampedFromTop = Math.min(pendingRestore.fromTop, maxTop)\n if (\n pendingRestore.fromTop - clampedFromTop > 1 &&\n Math.abs(scroller.scrollTop - clampedFromTop) <= 1\n )\n return\n // An unexplained offset change can also be a browser clamp. Only actual\n // user scroll intent followed by a non-clamp movement cancels restoration.\n if (!pendingRestoreUserIntent) return\n cancelAnimationFrame(pendingRestore.frame)\n pendingRestore = undefined\n pendingRestoreUserIntent = false\n removeRestoreIntentListeners()\n removeRestoreIntentListeners = noop\n }\n if (!options.enabled()) {\n reportPosition()\n return\n }\n if (holdsPosition(scroller)) return pinHeld(scroller)\n const geom = geometry(scroller)\n setAtBottom(computeAtBottom(geom, options.threshold()))\n if (!isSelfScroll(geom.scrollTop, lastWriteTop)) {\n stick = resolveUserScrollStick({\n stick,\n followOutput: true,\n scrollTop: geom.scrollTop,\n prevScrollTop: previousTop,\n geom,\n viewportGrowth: lastScrollClientHeight > 0 ? geom.clientHeight - lastScrollClientHeight : 0,\n })\n if (!stick) {\n lastWriteTop = -1\n lastWriteClientHeight = -1\n }\n }\n previousTop = geom.scrollTop\n // This baseline belongs only to scroll events, not observer callbacks.\n // Advancing it during resize would erase the viewport-clamp evidence.\n lastScrollClientHeight = geom.clientHeight\n reportPosition()\n }\n const jump = () => {\n if (!scroller || !options.enabled()) return\n stick = true\n writePin(scroller, bottomTarget(geometry(scroller)))\n setAtBottom(true)\n reportPosition()\n // The jump control disappears at the bottom. Return its keyboard focus to\n // the transcript instead of leaving the reader on a detached button.\n scroller.focus({ preventScroll: true })\n }\n\n // Open while the caller moves content under a reader who is following, so a clamp or an\n // insert it causes is not mistaken for the reader leaving the end. It gives way to the\n // reader's own scroll-up (`isScrollUpIntent`) and to anything else that moves the view\n // from outside (a reveal, a search jump); closing it puts a reader who is still following\n // back at the end. A change of conversation invalidates it, so the next conversation's\n // saved position is its own. A reveal or search jump outside a hold is never affected.\n const hold = () => {\n if (holds === 0) {\n holdFollowing = options.enabled() && stick && scroller !== undefined\n holdIntent = false\n holdTop = scroller ? scroller.scrollTop : -1\n }\n holds += 1\n const generation = holdGeneration\n let open = true\n return () => {\n if (!open || generation !== holdGeneration) return\n open = false\n // Asked while this hold still counts: `holdsPosition` is false once none is open.\n const last = holds === 1\n const resume = last && scroller !== undefined && holdsPosition(scroller)\n holds -= 1\n if (!last) return\n holdFollowing = false\n holdIntent = false\n if (resume && scroller && options.enabled() && !pendingRestore) pinHeld(scroller)\n }\n }\n const noteHoldInput = (event: Event) => {\n if (holds === 0 || holdIntent) return\n let input: ReaderInput | undefined\n if (event instanceof WheelEvent) input = { kind: 'wheel', deltaY: event.deltaY }\n else if (event instanceof KeyboardEvent)\n input = { kind: 'key', key: event.key, shiftKey: event.shiftKey }\n else if (event.type === 'touchmove') input = { kind: 'touchmove' }\n else if (event.type === 'pointerdown')\n input = { kind: 'pointerdown', onScroller: event.target === scroller }\n if (input && isScrollUpIntent(input)) holdIntent = true\n }\n\n createEffect(() => {\n options.resetKey()\n const enabled = options.enabled()\n // Capture before any reporting callback can replace the host snapshot.\n const candidate = untrack(() => options.initialPosition?.())\n const initial =\n candidate && Number.isFinite(candidate.top) && candidate.top >= 0 ? candidate : undefined\n let scheduledRestore: typeof pendingRestore\n let observer: ResizeObserver | undefined\n onCleanup(() => {\n if (scheduledRestore) {\n cancelAnimationFrame(scheduledRestore.frame)\n if (pendingRestore === scheduledRestore) pendingRestore = undefined\n }\n pendingRestoreUserIntent = false\n removeRestoreIntentListeners()\n removeRestoreIntentListeners = noop\n observer?.disconnect()\n })\n stick = true\n holdGeneration += 1\n holds = 0\n holdFollowing = false\n holdIntent = false\n lastWriteTop = -1\n lastWriteClientHeight = -1\n previousTop = -1\n lastScrollClientHeight = 0\n setAtBottom(true)\n if (!enabled || !scroller) return\n // Snapshot updates must not become another positioning owner. Consume the\n // host's snapshot only at entry/reset, then native reader intent owns follow.\n if (initial) {\n stick = enabled && initial.following\n }\n\n const observe = () => {\n if (!enabled || typeof ResizeObserver === 'undefined') return\n observer = new ResizeObserver(pinAuto)\n observer.observe(scroller!)\n if (content) observer.observe(content)\n }\n\n const watchRestoreIntent = () => {\n const element = scroller\n if (!element) return\n const markIntent = (event: Event) => {\n if (!pendingRestore) return\n if (event.type === 'pointerdown' && event.target !== element) return\n if (event.type === 'keydown') {\n if (event.target !== element) return\n const key = (event as KeyboardEvent).key\n if (!['ArrowDown', 'ArrowUp', 'PageDown', 'PageUp', 'Home', 'End', ' '].includes(key))\n return\n }\n pendingRestoreUserIntent = true\n }\n element.addEventListener('wheel', markIntent, { passive: true })\n element.addEventListener('pointerdown', markIntent)\n element.addEventListener('keydown', markIntent)\n removeRestoreIntentListeners = () => {\n element.removeEventListener('wheel', markIntent)\n element.removeEventListener('pointerdown', markIntent)\n element.removeEventListener('keydown', markIntent)\n }\n }\n\n if (initial && !stick) {\n // The identity effect can run before Solid has inserted the new rows. A\n // synchronous write is clamped by the outgoing short transcript, so defer\n // restoration until the browser has committed the new content and layout.\n const restore = {\n frame: 0,\n fromTop: scroller.scrollTop,\n target: initial.top,\n }\n scheduledRestore = restore\n pendingRestore = restore\n pendingRestoreUserIntent = false\n watchRestoreIntent()\n // Keep resize observation alive during the pending frame. Its callback is\n // guarded above, and remains active if user input cancels restoration.\n observe()\n restore.frame = requestAnimationFrame(() => {\n if (pendingRestore !== restore || !scroller) return\n pendingRestore = undefined\n pendingRestoreUserIntent = false\n removeRestoreIntentListeners()\n removeRestoreIntentListeners = noop\n writePin(scroller, restore.target)\n setAtBottom(computeAtBottom(geometry(scroller), options.threshold()))\n reportPosition()\n })\n return\n }\n\n if (!initial && enabled) writePin(scroller, bottomTarget(geometry(scroller)))\n else if (initial && stick) writePin(scroller, bottomTarget(geometry(scroller)))\n setAtBottom(computeAtBottom(geometry(scroller), options.threshold()))\n reportPosition()\n observe()\n })\n\n return {\n atBottom,\n onScroll,\n jump,\n hold,\n bindScroller: (element: HTMLDivElement) => {\n scroller = element\n for (const type of ['wheel', 'touchmove', 'pointerdown', 'keydown'])\n element.addEventListener(type, noteHoldInput, { passive: true })\n },\n bindContent: (element: HTMLDivElement) => {\n content = element\n },\n }\n}\n"],"mappings":";;;AA8BA,IAAM,YAAY,aAA6B;CAC7C,WAAW,QAAQ;CACnB,cAAc,QAAQ;CACtB,cAAc,QAAQ;AACxB;AACA,IAAM,aAAa,CAAC;;AAMpB,SAAgB,mBAAmB,SAMhC;CACD,M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,UAAU;GAC9C,qCAAqC;IACnC,QAAQ,oBAAoB,SAAS,UAAU;IAC/C,QAAQ,oBAAoB,eAAe,UAAU;IACrD,QAAQ,oBAAoB,WAAW,UAAU;GACnD;EACF;EAEA,IAAI,WAAW,CAAC,OAAO;GAIrB,MAAM,UAAU;IACd,OAAO;IACP,SAAS,SAAS;IAClB,QAAQ,QAAQ;GAClB;GACA,mBAAmB;GACnB,iBAAiB;GACjB,2BAA2B;GAC3B,mBAAmB;GAGnB,QAAQ;GACR,QAAQ,QAAQ,4BAA4B;IAC1C,IAAI,mBAAmB,WAAW,CAAC,UAAU;IAC7C,iBAAiB,KAAA;IACjB,2BAA2B;IAC3B,6BAA6B;IAC7B,+BAA+B;IAC/B,SAAS,UAAU,QAAQ,MAAM;IACjC,YAAY,gBAAgB,SAAS,QAAQ,GAAG,QAAQ,UAAU,CAAC,CAAC;IACpE,eAAe;GACjB,CAAC;GACD;EACF;EAEA,IAAI,CAAC,WAAW,SAAS,SAAS,UAAU,aAAa,SAAS,QAAQ,CAAC,CAAC;OACvE,IAAI,WAAW,OAAO,SAAS,UAAU,aAAa,SAAS,QAAQ,CAAC,CAAC;EAC9E,YAAY,gBAAgB,SAAS,QAAQ,GAAG,QAAQ,UAAU,CAAC,CAAC;EACpE,eAAe;EACf,QAAQ;CACV,CAAC;CAED,OAAO;EACL;EACA;EACA;EACA;EACA,eAAe,YAA4B;GACzC,WAAW;GACX,KAAK,MAAM,QAAQ;IAAC;IAAS;IAAa;IAAe;GAAS,GAChE,QAAQ,iBAAiB,MAAM,eAAe,EAAE,SAAS,KAAK,CAAC;EACnE;EACA,cAAc,YAA4B;GACxC,UAAU;EACZ;CACF;AACF"}
1
+ {"version":3,"file":"scroll-follow.js","names":[],"sources":["../../../src/components/conversation/scroll-follow.ts"],"sourcesContent":["/*\n * Substantially translated from KiroCrew website/src/app-sdk/useChatScrollFollow.ts,\n * pinned at 283e136c0f902e965a535a7c9548c57c7504fed0.\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * This product includes software developed at Amazon.com, Inc. (https://www.amazon.com/).\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy at http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software distributed\n * under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations under the License.\n * Solid owner effects replace React refs/effects; native geometry and the\n * content/viewport observer contract are retained. No session store is copied.\n */\nimport { createEffect, createSignal, onCleanup, untrack } from 'solid-js'\nimport type { ConversationReadingPosition } from './conversation-surface'\nimport {\n atBottomEpsilon,\n bottomTarget,\n computeAtBottom,\n distanceFromBottom,\n evaluateAutoPin,\n isScrollUpIntent,\n isSelfScroll,\n isViewportGrowthClamp,\n resolveUserScrollStick,\n SELF_SCROLL_EPSILON,\n type ReaderInput,\n} from './scroll-follow-core'\n\nconst geometry = (element: HTMLDivElement) => ({\n scrollTop: element.scrollTop,\n scrollHeight: element.scrollHeight,\n clientHeight: element.clientHeight,\n})\nconst noop = () => {}\n\n/** Opens a hold on the follow position (see `createScrollFollow`); the function it returns closes it. */\nexport type ScrollFollowHold = () => () => void\n\n/** Internal plain-scroller binding; host-owned restoration can disable follow. */\nexport function createScrollFollow(options: {\n enabled: () => boolean\n resetKey: () => string | undefined\n threshold: () => number\n initialPosition?: () => ConversationReadingPosition | undefined\n onPositionChange?: (position: ConversationReadingPosition) => void\n}) {\n const [atBottom, setAtBottom] = createSignal(true)\n let scroller: HTMLDivElement | undefined\n let content: HTMLDivElement | undefined\n let stick = true\n let lastWriteTop = -1\n let lastWriteClientHeight = -1\n let readerMovedSinceWrite = false\n let previousTop = -1\n let lastScrollClientHeight = 0\n let pendingRestore: { frame: number; fromTop: number; target: number } | undefined\n let pendingRestoreUserIntent = false\n let removeRestoreIntentListeners = noop\n // A hold is the caller saying it is positioning the view (see `hold`): while one is\n // open and the reader was following, the content's moves are not read as the reader's.\n let holds = 0\n let holdFollowing = false\n let holdIntent = false\n let holdTop = -1\n // Bumped on every identity change, so a hold opened for the previous conversation can\n // neither pin the next one nor close over its state.\n let holdGeneration = 0\n const holding = () => holds > 0 && holdFollowing && !holdIntent\n // Is the view still where the hold left it? The content can move the offset only by\n // clamping it to the end it has now; anything else moved it from outside (a reveal, a\n // search jump), and that is the caller's to keep, so the hold gives way.\n const holdsPosition = (element: HTMLDivElement) => {\n if (!holding()) return false\n const maxTop = Math.max(0, element.scrollHeight - element.clientHeight)\n if (Math.abs(element.scrollTop - Math.min(holdTop, maxTop)) <= SELF_SCROLL_EPSILON) return true\n holdIntent = true\n return false\n }\n const reportPosition = () => {\n if (scroller)\n untrack(() =>\n options.onPositionChange?.({\n top: scroller!.scrollTop,\n following: options.enabled() && stick,\n })\n )\n }\n onCleanup(reportPosition)\n\n const rememberPosition = (element: HTMLDivElement) => {\n lastWriteTop = element.scrollTop\n lastWriteClientHeight = element.clientHeight\n previousTop = element.scrollTop\n readerMovedSinceWrite = false\n }\n const writePin = (element: HTMLDivElement, target: number) => {\n // Instant writes keep the self-scroll reference synchronized. A smooth\n // animation would produce intermediate positions that resemble user input.\n element.scrollTop = target\n rememberPosition(element)\n }\n const acceptViewportClamp = (element: HTMLDivElement) => {\n if (\n stick &&\n isViewportGrowthClamp({\n geom: geometry(element),\n lastWriteTop,\n lastWriteClientHeight,\n readerMovedSinceWrite,\n })\n )\n rememberPosition(element)\n }\n const pinHeld = (element: HTMLDivElement) => {\n const geom = geometry(element)\n stick = true\n if (distanceFromBottom(geom) > atBottomEpsilon()) writePin(element, bottomTarget(geom))\n // An end the engine already clamped to is accepted as it stands, and is the reference\n // from here on: the write before it is further down than the content now reaches.\n else rememberPosition(element)\n holdTop = element.scrollTop\n setAtBottom(computeAtBottom(geometry(element), options.threshold()))\n reportPosition()\n }\n const pinAuto = () => {\n if (!scroller || !options.enabled() || pendingRestore) return\n if (holdsPosition(scroller)) return pinHeld(scroller)\n acceptViewportClamp(scroller)\n const geom = geometry(scroller)\n const result = evaluateAutoPin({\n stick,\n geom,\n lastWriteTop,\n viewportShrink: lastWriteClientHeight >= 0 ? lastWriteClientHeight - geom.clientHeight : 0,\n })\n stick = result.stick\n if (result.pin) writePin(scroller, result.target)\n else if (result.stick) rememberPosition(scroller)\n setAtBottom(computeAtBottom(geometry(scroller), options.threshold()))\n reportPosition()\n }\n const onScroll = () => {\n if (!scroller) return\n if (pendingRestore) {\n // A reset can clamp the outgoing offset while the incoming rows are\n // shorter. That notification is layout, not reader intent, and must not\n // cancel the snapshot waiting for the new rows to commit.\n const maxTop = Math.max(0, scroller.scrollHeight - scroller.clientHeight)\n const clampedFromTop = Math.min(pendingRestore.fromTop, maxTop)\n if (\n pendingRestore.fromTop - clampedFromTop > 1 &&\n Math.abs(scroller.scrollTop - clampedFromTop) <= 1\n )\n return\n // An unexplained offset change can also be a browser clamp. Only actual\n // user scroll intent followed by a non-clamp movement cancels restoration.\n if (!pendingRestoreUserIntent) return\n cancelAnimationFrame(pendingRestore.frame)\n pendingRestore = undefined\n pendingRestoreUserIntent = false\n removeRestoreIntentListeners()\n removeRestoreIntentListeners = noop\n }\n if (!options.enabled()) {\n reportPosition()\n return\n }\n if (holdsPosition(scroller)) return pinHeld(scroller)\n acceptViewportClamp(scroller)\n const geom = geometry(scroller)\n setAtBottom(computeAtBottom(geom, options.threshold()))\n if (!isSelfScroll(geom.scrollTop, lastWriteTop)) {\n stick = resolveUserScrollStick({\n stick,\n followOutput: true,\n scrollTop: geom.scrollTop,\n prevScrollTop: previousTop,\n geom,\n viewportGrowth: lastScrollClientHeight > 0 ? geom.clientHeight - lastScrollClientHeight : 0,\n })\n if (!stick) {\n lastWriteTop = -1\n lastWriteClientHeight = -1\n }\n }\n // A content-collapse clamp can arrive before ResizeObserver. Keep its new\n // bottom as our reference if viewport growth and more output follow next.\n if (stick && distanceFromBottom(geom) <= atBottomEpsilon()) rememberPosition(scroller)\n previousTop = geom.scrollTop\n // This baseline belongs only to scroll events, not observer callbacks.\n // Advancing it during resize would erase the viewport-clamp evidence.\n lastScrollClientHeight = geom.clientHeight\n reportPosition()\n }\n const jump = () => {\n if (!scroller || !options.enabled()) return\n stick = true\n writePin(scroller, bottomTarget(geometry(scroller)))\n setAtBottom(true)\n reportPosition()\n // The jump control disappears at the bottom. Return its keyboard focus to\n // the transcript instead of leaving the reader on a detached button.\n scroller.focus({ preventScroll: true })\n }\n\n // Open while the caller moves content under a reader who is following, so a clamp or an\n // insert it causes is not mistaken for the reader leaving the end. It gives way to the\n // reader's own scroll-up (`isScrollUpIntent`) and to anything else that moves the view\n // from outside (a reveal, a search jump); closing it puts a reader who is still following\n // back at the end. A change of conversation invalidates it, so the next conversation's\n // saved position is its own. A reveal or search jump outside a hold is never affected.\n const hold = () => {\n if (holds === 0) {\n holdFollowing = options.enabled() && stick && scroller !== undefined\n holdIntent = false\n holdTop = scroller ? scroller.scrollTop : -1\n }\n holds += 1\n const generation = holdGeneration\n let open = true\n return () => {\n if (!open || generation !== holdGeneration) return\n open = false\n // Asked while this hold still counts: `holdsPosition` is false once none is open.\n const last = holds === 1\n const resume = last && scroller !== undefined && holdsPosition(scroller)\n holds -= 1\n if (!last) return\n holdFollowing = false\n holdIntent = false\n if (resume && scroller && options.enabled() && !pendingRestore) pinHeld(scroller)\n }\n }\n const noteHoldInput = (event: Event) => {\n let input: ReaderInput | undefined\n if (event instanceof WheelEvent) input = { kind: 'wheel', deltaY: event.deltaY }\n else if (event instanceof KeyboardEvent) {\n // Descendant controls own their keys; only the focused transcript can\n // signal native keyboard scrolling, just as for snapshot restoration.\n if (event.target !== scroller) return\n input = { kind: 'key', key: event.key, shiftKey: event.shiftKey }\n } else if (event.type === 'touchmove') input = { kind: 'touchmove' }\n else if (event.type === 'pointerdown')\n input = { kind: 'pointerdown', onScroller: event.target === scroller }\n if (input && isScrollUpIntent(input)) {\n readerMovedSinceWrite = true\n if (holds > 0) holdIntent = true\n }\n }\n\n createEffect(() => {\n options.resetKey()\n const enabled = options.enabled()\n // Capture before any reporting callback can replace the host snapshot.\n const candidate = untrack(() => options.initialPosition?.())\n const initial =\n candidate && Number.isFinite(candidate.top) && candidate.top >= 0 ? candidate : undefined\n let scheduledRestore: typeof pendingRestore\n let observer: ResizeObserver | undefined\n let contentObserver: MutationObserver | undefined\n onCleanup(() => {\n if (scheduledRestore) {\n cancelAnimationFrame(scheduledRestore.frame)\n if (pendingRestore === scheduledRestore) pendingRestore = undefined\n }\n pendingRestoreUserIntent = false\n removeRestoreIntentListeners()\n removeRestoreIntentListeners = noop\n observer?.disconnect()\n contentObserver?.disconnect()\n })\n stick = true\n holdGeneration += 1\n holds = 0\n holdFollowing = false\n holdIntent = false\n lastWriteTop = -1\n lastWriteClientHeight = -1\n readerMovedSinceWrite = false\n previousTop = -1\n lastScrollClientHeight = 0\n setAtBottom(true)\n if (!enabled || !scroller) return\n // Snapshot updates must not become another positioning owner. Consume the\n // host's snapshot only at entry/reset, then native reader intent owns follow.\n if (initial) {\n stick = enabled && initial.following\n }\n\n const observe = () => {\n if (!enabled || typeof ResizeObserver === 'undefined') return\n observer = new ResizeObserver(pinAuto)\n observer.observe(scroller!)\n if (content) {\n observer.observe(content)\n if (typeof MutationObserver !== 'undefined') {\n contentObserver = new MutationObserver(() => {\n // A collapsed turn can clamp the offset before any scroll/resize\n // callback. Remember that bottom at the mutation boundary, before\n // a later task grows the viewport or streams more content. This is\n // bookkeeping only: never pin, re-arm, or compete with another owner.\n if (\n !scroller ||\n !options.enabled() ||\n pendingRestore ||\n holds > 0 ||\n !stick ||\n readerMovedSinceWrite ||\n lastWriteTop < 0\n )\n return\n // Read the offset once per mutation batch. This can flush pending\n // layout, but deferring it loses a collapse clamp before a later task\n // grows the viewport/output. Ordinary growth needs no other geometry.\n const top = scroller.scrollTop\n if (top >= lastWriteTop - SELF_SCROLL_EPSILON) return\n if (scroller.scrollHeight - top - scroller.clientHeight <= atBottomEpsilon())\n rememberPosition(scroller)\n })\n contentObserver.observe(content, { childList: true, characterData: true, subtree: true })\n }\n }\n }\n\n const watchRestoreIntent = () => {\n const element = scroller\n if (!element) return\n const markIntent = (event: Event) => {\n if (!pendingRestore) return\n if (event.type === 'pointerdown' && event.target !== element) return\n if (event.type === 'keydown') {\n if (event.target !== element) return\n const key = (event as KeyboardEvent).key\n if (!['ArrowDown', 'ArrowUp', 'PageDown', 'PageUp', 'Home', 'End', ' '].includes(key))\n return\n }\n pendingRestoreUserIntent = true\n }\n element.addEventListener('wheel', markIntent, { passive: true })\n element.addEventListener('pointerdown', markIntent)\n element.addEventListener('keydown', markIntent)\n removeRestoreIntentListeners = () => {\n element.removeEventListener('wheel', markIntent)\n element.removeEventListener('pointerdown', markIntent)\n element.removeEventListener('keydown', markIntent)\n }\n }\n\n if (initial && !stick) {\n // The identity effect can run before Solid has inserted the new rows. A\n // synchronous write is clamped by the outgoing short transcript, so defer\n // restoration until the browser has committed the new content and layout.\n const restore = {\n frame: 0,\n fromTop: scroller.scrollTop,\n target: initial.top,\n }\n scheduledRestore = restore\n pendingRestore = restore\n pendingRestoreUserIntent = false\n watchRestoreIntent()\n // Keep resize observation alive during the pending frame. Its callback is\n // guarded above, and remains active if user input cancels restoration.\n observe()\n restore.frame = requestAnimationFrame(() => {\n if (pendingRestore !== restore || !scroller) return\n pendingRestore = undefined\n pendingRestoreUserIntent = false\n removeRestoreIntentListeners()\n removeRestoreIntentListeners = noop\n writePin(scroller, restore.target)\n setAtBottom(computeAtBottom(geometry(scroller), options.threshold()))\n reportPosition()\n })\n return\n }\n\n if (!initial && enabled) writePin(scroller, bottomTarget(geometry(scroller)))\n else if (initial && stick) writePin(scroller, bottomTarget(geometry(scroller)))\n setAtBottom(computeAtBottom(geometry(scroller), options.threshold()))\n reportPosition()\n observe()\n })\n\n return {\n atBottom,\n onScroll,\n jump,\n hold,\n bindScroller: (element: HTMLDivElement) => {\n scroller = element\n for (const type of ['wheel', 'touchmove', 'pointerdown', 'keydown'])\n element.add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,EAAE,GAAG,CAAC,OAAO,CAAA;CACrB,CAAA;AAEH;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,eAmBhD;AAED,yDAAyD;AACzD,YAAY,EAAE,aAAa,IAAI,kBAAkB,EAAE,CAAA;AACnD,OAAO,EAAE,QAAQ,IAAI,YAAY,EAAE,CAAA;AACnC,MAAM,MAAM,oBAAoB,GAAG,cAAc,CAAC,KAAK,CAAC,CAAA"}
@@ -2,7 +2,7 @@ import { cn } from "../../../lib/utils.js";
2
2
  import { Button } from "../button/button.js";
3
3
  import { className, createComponent, effect, insert, mergeProps, template } from "solid-js/web";
4
4
  import { ChevronLeft, ChevronRight } from "lucide-solid";
5
- import { For, Show, splitProps } from "solid-js";
5
+ import { For, Show, createMemo, splitProps } from "solid-js";
6
6
  import Calendar from "@corvu/calendar";
7
7
  // src/components/ui/calendar/calendar.tsx
8
8
  var _tmpl$ = /*#__PURE__*/ template(`<thead><tr>`);
@@ -25,20 +25,6 @@ var MONTH_FORMAT = {
25
25
  month: "long",
26
26
  year: "numeric"
27
27
  };
28
- function monthLabel(month, format) {
29
- return format ? format(month) : new Intl.DateTimeFormat(void 0, MONTH_FORMAT).format(month);
30
- }
31
- /**
32
- * A day's accessible name: the full date, because the visible number is only
33
- * meaningful next to its column heading.
34
- */
35
- function dayLabel(day) {
36
- return new Intl.DateTimeFormat(void 0, {
37
- day: "numeric",
38
- month: "long",
39
- year: "numeric"
40
- }).format(day);
41
- }
42
28
  /** The locale's short weekday names, Sunday first — which is the order corvu's `weeks` use. */
43
29
  function defaultWeekdays() {
44
30
  const format = new Intl.DateTimeFormat(void 0, { weekday: "short" });
@@ -51,110 +37,118 @@ function defaultWeekdays() {
51
37
  */
52
38
  function CalendarGrid(props) {
53
39
  const context = Calendar.useContext();
54
- const weekdays = () => props.weekdayLabels ?? defaultWeekdays();
55
40
  return createComponent(For, {
56
41
  get each() {
57
42
  return context.months();
58
43
  },
59
- children: (month, index) => (() => {
60
- var _el$ = _tmpl$3(), _el$2 = _el$.firstChild;
61
- insert(_el$2, createComponent(Calendar.Nav, {
62
- action: "prev-month",
63
- as: Button,
64
- variant: "ghost",
65
- size: "icon-sm",
66
- get ["aria-label"]() {
67
- return props.previousLabel;
68
- },
69
- get children() {
70
- return createComponent(ChevronLeft, { "aria-hidden": "true" });
71
- }
72
- }), null);
73
- insert(_el$2, createComponent(Calendar.Label, {
74
- get index() {
75
- return index();
76
- },
77
- "class": "text-sm font-semibold text-foreground",
78
- get children() {
79
- return monthLabel(month.month, props.formatMonth);
80
- }
81
- }), null);
82
- insert(_el$2, createComponent(Calendar.Nav, {
83
- action: "next-month",
84
- as: Button,
85
- variant: "ghost",
86
- size: "icon-sm",
87
- get ["aria-label"]() {
88
- return props.nextLabel;
89
- },
90
- get children() {
91
- return createComponent(ChevronRight, { "aria-hidden": "true" });
92
- }
93
- }), null);
94
- insert(_el$, createComponent(Calendar.Table, {
95
- "class": "w-full border-collapse",
96
- get children() {
97
- return [(() => {
98
- var _el$3 = _tmpl$(), _el$4 = _el$3.firstChild;
99
- insert(_el$4, createComponent(For, {
100
- get each() {
101
- return weekdays();
102
- },
103
- children: (label) => createComponent(Calendar.HeadCell, {
104
- as: "th",
105
- scope: "col",
106
- "class": "pb-1 text-2xs font-medium text-muted-foreground",
107
- children: label
108
- })
109
- }));
110
- return _el$3;
111
- })(), (() => {
112
- var _el$5 = _tmpl$2();
113
- insert(_el$5, createComponent(For, {
114
- get each() {
115
- return month.weeks;
116
- },
117
- children: (week) => (() => {
118
- var _el$6 = _tmpl$4();
119
- insert(_el$6, createComponent(For, {
120
- each: week,
121
- children: (day) => createComponent(Calendar.Cell, {
122
- as: "td",
123
- "class": "p-0.5 text-center",
124
- get children() {
125
- return createComponent(Calendar.CellTrigger, {
126
- as: "button",
127
- day,
128
- get month() {
129
- return month.month;
130
- },
131
- get ["class"]() {
132
- return cn("w-full rounded-md text-xs text-foreground transition-colors", "min-h-control-xs", "hover:bg-muted focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none", "data-selected:bg-primary data-selected:text-primary-foreground", "data-in-range:bg-primary-subtle data-in-range:text-foreground", "data-range-start:bg-primary data-range-start:text-primary-foreground", "data-range-end:bg-primary data-range-end:text-primary-foreground", "data-range-start:rounded-r-none data-range-end:rounded-l-none", "data-today:ring-1 data-today:ring-ring", "data-disabled:text-muted-foreground data-disabled:line-through", "data-disabled:hover:bg-transparent");
133
- },
134
- get children() {
135
- return [(() => {
136
- var _el$7 = _tmpl$5();
137
- insert(_el$7, () => day.getDate());
138
- return _el$7;
139
- })(), (() => {
140
- var _el$8 = _tmpl$6();
141
- insert(_el$8, () => dayLabel(day));
142
- return _el$8;
143
- })()];
144
- }
145
- });
146
- }
147
- })
148
- }));
149
- return _el$6;
150
- })()
151
- }));
152
- return _el$5;
153
- })()];
154
- }
155
- }), null);
156
- return _el$;
157
- })()
44
+ children: (month, index) => {
45
+ const weekdays = createMemo(() => props.weekdayLabels ?? defaultWeekdays());
46
+ const dayFormatter = new Intl.DateTimeFormat(void 0, {
47
+ day: "numeric",
48
+ month: "long",
49
+ year: "numeric"
50
+ });
51
+ const monthLabel = (date) => props.formatMonth ? props.formatMonth(date) : new Intl.DateTimeFormat(void 0, MONTH_FORMAT).format(date);
52
+ return (() => {
53
+ var _el$ = _tmpl$3(), _el$2 = _el$.firstChild;
54
+ insert(_el$2, createComponent(Calendar.Nav, {
55
+ action: "prev-month",
56
+ as: Button,
57
+ variant: "ghost",
58
+ size: "icon-sm",
59
+ get ["aria-label"]() {
60
+ return props.previousLabel;
61
+ },
62
+ get children() {
63
+ return createComponent(ChevronLeft, { "aria-hidden": "true" });
64
+ }
65
+ }), null);
66
+ insert(_el$2, createComponent(Calendar.Label, {
67
+ get index() {
68
+ return index();
69
+ },
70
+ "class": "text-sm font-semibold text-foreground",
71
+ get children() {
72
+ return monthLabel(month.month);
73
+ }
74
+ }), null);
75
+ insert(_el$2, createComponent(Calendar.Nav, {
76
+ action: "next-month",
77
+ as: Button,
78
+ variant: "ghost",
79
+ size: "icon-sm",
80
+ get ["aria-label"]() {
81
+ return props.nextLabel;
82
+ },
83
+ get children() {
84
+ return createComponent(ChevronRight, { "aria-hidden": "true" });
85
+ }
86
+ }), null);
87
+ insert(_el$, createComponent(Calendar.Table, {
88
+ "class": "w-full border-collapse",
89
+ get children() {
90
+ return [(() => {
91
+ var _el$3 = _tmpl$(), _el$4 = _el$3.firstChild;
92
+ insert(_el$4, createComponent(For, {
93
+ get each() {
94
+ return weekdays();
95
+ },
96
+ children: (label) => createComponent(Calendar.HeadCell, {
97
+ as: "th",
98
+ scope: "col",
99
+ "class": "pb-1 text-2xs font-medium text-muted-foreground",
100
+ children: label
101
+ })
102
+ }));
103
+ return _el$3;
104
+ })(), (() => {
105
+ var _el$5 = _tmpl$2();
106
+ insert(_el$5, createComponent(For, {
107
+ get each() {
108
+ return month.weeks;
109
+ },
110
+ children: (week) => (() => {
111
+ var _el$6 = _tmpl$4();
112
+ insert(_el$6, createComponent(For, {
113
+ each: week,
114
+ children: (day) => createComponent(Calendar.Cell, {
115
+ as: "td",
116
+ "class": "p-0.5 text-center",
117
+ get children() {
118
+ return createComponent(Calendar.CellTrigger, {
119
+ as: "button",
120
+ day,
121
+ get month() {
122
+ return month.month;
123
+ },
124
+ get ["class"]() {
125
+ return cn("w-full rounded-md text-xs text-foreground transition-colors", "min-h-control-xs", "hover:bg-muted focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none", "data-selected:bg-primary data-selected:text-primary-foreground", "data-in-range:bg-primary-subtle data-in-range:text-foreground", "data-range-start:bg-primary data-range-start:text-primary-foreground", "data-range-end:bg-primary data-range-end:text-primary-foreground", "data-range-start:rounded-r-none data-range-end:rounded-l-none", "data-today:ring-1 data-today:ring-ring", "data-disabled:text-muted-foreground data-disabled:line-through", "data-disabled:hover:bg-transparent");
126
+ },
127
+ get children() {
128
+ return [(() => {
129
+ var _el$7 = _tmpl$5();
130
+ insert(_el$7, () => day.getDate());
131
+ return _el$7;
132
+ })(), (() => {
133
+ var _el$8 = _tmpl$6();
134
+ insert(_el$8, () => dayFormatter.format(day));
135
+ return _el$8;
136
+ })()];
137
+ }
138
+ });
139
+ }
140
+ })
141
+ }));
142
+ return _el$6;
143
+ })()
144
+ }));
145
+ return _el$5;
146
+ })()];
147
+ }
148
+ }), null);
149
+ return _el$;
150
+ })();
151
+ }
158
152
  });
159
153
  }
160
154
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"calendar.js","names":["For","Show","splitProps","ComponentProps","JSX","Calendar","RootProps","CorvuCalendarProps","RootSingleProps","CalendarMode","ChevronLeft","ChevronRight","cn","Button","CalendarExtras","weekdayLabels","previousLabel","nextLabel","formatMonth","month","Date","class","DistributiveOmit","PropertyKey","T","Omit","K","CalendarProps","EXTRAS","const","MONTH_FORMAT","Intl","DateTimeFormatOptions","year","monthLabel","format","DateTimeFormat","undefined","dayLabel","day","defaultWeekdays","weekday","Array","from","length","_","index","CalendarGrid","props","context","useContext","weekdays","_$createComponent","each","months","children","_el$","_tmpl$3","_el$2","firstChild","_$insert","Nav","action","as","variant","size","aria-label","Label","Table","_el$3","_tmpl$","_el$4","label","HeadCell","scope","_el$5","_tmpl$2","weeks","week","_el$6","_tmpl$4","Cell","CellTrigger","_el$7","_tmpl$5","getDate","_el$8","_tmpl$6","CalendarSurface","mode","M","local","rest","_el$9","_tmpl$7","_$mergeProps","Extract","_$effect","_$className","DatePickerProps","footer","Element","DatePicker","_el$0","when","_el$1","_tmpl$8","value","onValueChange","_el$10","_tmpl$9","CalendarRoot","CalendarElementProps","_$createComponent","_$mergeProps","_$className"],"sources":["../../../../src/components/ui/calendar/calendar.tsx"],"sourcesContent":["import { For, Show, splitProps, type ComponentProps, type JSX } from 'solid-js'\nimport Calendar, {\n type RootProps as CorvuCalendarProps,\n type RootSingleProps,\n} from '@corvu/calendar'\n\n/** The three modes corvu's calendar is a union over. */\nexport type CalendarMode = 'single' | 'multiple' | 'range'\nimport { ChevronLeft, ChevronRight } from 'lucide-solid'\nimport { cn } from '#lib/utils'\nimport { Button } from '../button'\n\n/**\n * Calendar.\n *\n * A month grid, over `@corvu/calendar`. The primitive owns the hard part — the\n * roving `tabindex` that makes a grid of days one tab stop rather than 42, the\n * arrow-key navigation, the `aria-selected`/`aria-disabled` bookkeeping, and the\n * `data-*` attributes that carry the states.\n *\n * What this component owns is the *presentation* of those states, and it is worth\n * saying why they are styled from `data-*` rather than from props: a day is today,\n * selected, in range, at a range end, and disabled independently, and a range\n * start that is also today has to read as both. Boolean props cannot express that\n * without a combinatorial explosion; the data attributes can.\n *\n * `mode` is the primitive's discriminated union — `single`, `multiple`, `range` —\n * so `value` and `onValueChange` change type with it. That is why this forwards\n * the props rather than normalising them: a normalised `Date[]` would lose what a\n * range needs to know which end moved.\n *\n * Three things the primitive leaves open, and this closes:\n *\n * 1. **The month caption is a heading**, wired to the grid's `aria-labelledby`, so\n * the grid has a name and a screen reader user can hear which month they are in.\n * 2. **The nav buttons have accessible names.** A bare chevron is not a name.\n * 3. **Today is a ring, not a fill.** A fill would be indistinguishable from\n * selected, and today is often also selected.\n *\n * The sub-components come off the default export as statics (`Calendar.Cell`,\n * `Calendar.CellTrigger`, …) — corvu's shape, and the reason this file does not\n * import seven names.\n */\n\n/**\n * The props this wrapper adds on top of the primitive's own. They are separate so\n * `splitProps` has a fixed list to pull out, and so the mode-specific props stay\n * the primitive's to define.\n */\ntype CalendarExtras = {\n /** Weekday header labels, Sunday first. Defaults to the locale's short names. */\n weekdayLabels?: readonly string[]\n /** Accessible names for the month navigation. Override for a non-English app. */\n previousLabel?: string\n nextLabel?: string\n /** Format a month for the caption. Defaults to `Intl.DateTimeFormat`. */\n formatMonth?: (month: Date) => string\n class?: string\n}\n\n/**\n * `Omit` distributes over a union, which would collapse the three modes into one\n * shape and lose the discriminant. This keeps them apart. `children` is dropped\n * because the surface supplies the grid itself — the caller's job is the value,\n * not the layout.\n */\ntype DistributiveOmit<T, K extends PropertyKey> = T extends unknown ? Omit<T, K> : never\n\n/** The props of any of the three modes. `mode` decides the shape of `value`. */\nexport type CalendarProps = DistributiveOmit<CorvuCalendarProps, 'children'> & CalendarExtras\n\nconst EXTRAS = ['weekdayLabels', 'previousLabel', 'nextLabel', 'formatMonth', 'class'] as const\n\nconst MONTH_FORMAT: Intl.DateTimeFormatOptions = { month: 'long', year: 'numeric' }\n\nfunction monthLabel(month: Date, format?: (month: Date) => string): string {\n return format ? format(month) : new Intl.DateTimeFormat(undefined, MONTH_FORMAT).format(month)\n}\n\n/**\n * A day's accessible name: the full date, because the visible number is only\n * meaningful next to its column heading.\n */\nfunction dayLabel(day: Date): string {\n return new Intl.DateTimeFormat(undefined, {\n day: 'numeric',\n month: 'long',\n year: 'numeric',\n }).format(day)\n}\n\n/** The locale's short weekday names, Sunday first — which is the order corvu's `weeks` use. */\nfunction defaultWeekdays(): string[] {\n const format = new Intl.DateTimeFormat(undefined, { weekday: 'short' })\n // 2024-01-07 is a Sunday, so index 0 is Sunday without arithmetic.\n return Array.from({ length: 7 }, (_, index) => format.format(new Date(2024, 0, 7 + index)))\n}\n\n/**\n * The grid, inside the root's context. A separate component because\n * `Calendar.useContext` is only available to a descendant, and reading `months()`\n * in the same component that provides it renders one month behind.\n */\nfunction CalendarGrid(props: {\n weekdayLabels?: readonly string[]\n previousLabel: string\n nextLabel: string\n formatMonth?: (month: Date) => string\n}) {\n const context = Calendar.useContext()\n const weekdays = () => props.weekdayLabels ?? defaultWeekdays()\n\n return (\n <For each={context.months()}>\n {(month, index) => (\n <div class=\"flex flex-col gap-2\">\n <div class=\"flex items-center justify-between gap-2\">\n <Calendar.Nav\n action=\"prev-month\"\n as={Button}\n variant=\"ghost\"\n size=\"icon-sm\"\n aria-label={props.previousLabel}\n >\n <ChevronLeft aria-hidden=\"true\" />\n </Calendar.Nav>\n <Calendar.Label index={index()} class=\"text-sm font-semibold text-foreground\">\n {monthLabel(month.month, props.formatMonth)}\n </Calendar.Label>\n <Calendar.Nav\n action=\"next-month\"\n as={Button}\n variant=\"ghost\"\n size=\"icon-sm\"\n aria-label={props.nextLabel}\n >\n <ChevronRight aria-hidden=\"true\" />\n </Calendar.Nav>\n </div>\n <Calendar.Table class=\"w-full border-collapse\">\n <thead>\n <tr>\n <For each={weekdays()}>\n {(label) => (\n <Calendar.HeadCell\n as=\"th\"\n scope=\"col\"\n class=\"pb-1 text-2xs font-medium text-muted-foreground\"\n >\n {label}\n </Calendar.HeadCell>\n )}\n </For>\n </tr>\n </thead>\n <tbody>\n <For each={month.weeks}>\n {(week) => (\n <tr>\n <For each={week}>\n {(day) => (\n <Calendar.Cell as=\"td\" class=\"p-0.5 text-center\">\n <Calendar.CellTrigger\n as=\"button\"\n day={day}\n month={month.month}\n class={cn(\n 'w-full rounded-md text-xs text-foreground transition-colors',\n 'min-h-control-xs',\n 'hover:bg-muted focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none',\n // Styled from data states, so a day can be a range\n // end and today at once without a prop per pair.\n 'data-selected:bg-primary data-selected:text-primary-foreground',\n // corvu marks every day of a range selected, so the\n // span between the ends steps back to the subtle\n // fill and the ends take the solid one again.\n 'data-in-range:bg-primary-subtle data-in-range:text-foreground',\n 'data-range-start:bg-primary data-range-start:text-primary-foreground',\n 'data-range-end:bg-primary data-range-end:text-primary-foreground',\n 'data-range-start:rounded-r-none data-range-end:rounded-l-none',\n 'data-today:ring-1 data-today:ring-ring',\n 'data-disabled:text-muted-foreground data-disabled:line-through',\n 'data-disabled:hover:bg-transparent'\n )}\n >\n {/*\n The trigger renders no children of its own, so the\n day number is the caller's — without it every cell\n is an unnamed button (`button-name`).\n\n The number is what a sighted reader needs and the\n full date is what a screen reader user needs: \"25\"\n alone is meaningless out of context. So the number\n is hidden from the accessibility tree and the date\n supplies the name.\n */}\n <span aria-hidden=\"true\">{day.getDate()}</span>\n <span class=\"visually-hidden\">{dayLabel(day)}</span>\n </Calendar.CellTrigger>\n </Calendar.Cell>\n )}\n </For>\n </tr>\n )}\n </For>\n </tbody>\n </Calendar.Table>\n </div>\n )}\n </For>\n )\n}\n\n/**\n * Generic over the mode on purpose. `splitProps` cannot carry a discriminant\n * through destructuring — the rest object widens to `mode: 'single' | 'multiple' |\n * 'range'`, which is assignable to no single member of the primitive's union. A\n * type parameter keeps `mode` a literal, so `Extract` resolves the right member\n * and the forwarding stays checked rather than cast.\n */\nexport function CalendarSurface<M extends CalendarMode>(props: CalendarProps & { mode: M }) {\n const [local, rest] = splitProps(props as CalendarProps, [...EXTRAS])\n\n return (\n <div class={cn('w-fit rounded-lg border border-border bg-card p-3', local.class)}>\n <Calendar {...(rest as Extract<CorvuCalendarProps, { mode: M }>)}>\n <CalendarGrid\n weekdayLabels={local.weekdayLabels}\n previousLabel={local.previousLabel ?? 'Previous month'}\n nextLabel={local.nextLabel ?? 'Next month'}\n formatMonth={local.formatMonth}\n />\n </Calendar>\n </div>\n )\n}\n\n/**\n * Built from the primitive's *single* props rather than from `CalendarProps` with\n * `mode` omitted. Omitting a discriminant leaves the other members of the union\n * behind — `value` stays `Date | Date[] | {from,to}` — and the picker would then\n * have to cast to prove what its own name already says.\n */\nexport type DatePickerProps = Omit<RootSingleProps, 'mode' | 'children'> &\n CalendarExtras & {\n /** A labelled heading above the grid. */\n label?: string\n /** A footer slot: the confirm and cancel row a picker usually has. */\n footer?: JSX.Element\n }\n\n/**\n * A single-day picker: the calendar with a name and a footer. Split from\n * `CalendarSurface` because a bare calendar is a control inside a form the caller\n * already owns, while a picker is a thing the caller drops in — and the two want\n * different surroundings.\n */\nexport function DatePicker(props: DatePickerProps) {\n const [local, rest] = splitProps(props, ['value', 'onValueChange', 'label', 'footer', 'class'])\n\n return (\n <div class={cn('grid w-fit gap-2', local.class)}>\n <Show when={local.label}>\n <p class=\"text-xs font-semibold text-foreground\">{local.label}</p>\n </Show>\n <CalendarSurface\n {...rest}\n mode=\"single\"\n value={local.value}\n onValueChange={local.onValueChange}\n />\n <Show when={local.footer}>\n <div class=\"flex justify-end gap-2\">{local.footer}</div>\n </Show>\n </div>\n )\n}\n\n/** Re-exported so a caller can type a value it holds. */\nexport type { CalendarProps as CorvuCalendarProps }\nexport { Calendar as CalendarRoot }\nexport type CalendarElementProps = ComponentProps<'div'>\n"],"mappings":";;;;;;;;;;;;;;;;AAuEA,IAAM4B,SAAS;CAAC;CAAiB;CAAiB;CAAa;CAAe;AAAO;AAErF,IAAME,eAA2C;CAAEX,OAAO;CAAQc,MAAM;AAAU;AAElF,SAASC,WAAWf,OAAagB,QAA0C;CACzE,OAAOA,SAASA,OAAOhB,KAAK,IAAI,IAAIY,KAAKK,eAAeC,KAAAA,GAAWP,YAAY,CAAC,CAACK,OAAOhB,KAAK;AAC/F;;;;;AAMA,SAASmB,SAASC,KAAmB;CACnC,OAAO,IAAIR,KAAKK,eAAeC,KAAAA,GAAW;EACxCE,KAAK;EACLpB,OAAO;EACPc,MAAM;CACR,CAAC,CAAC,CAACE,OAAOI,GAAG;AACf;;AAGA,SAASC,kBAA4B;CACnC,MAAML,SAAS,IAAIJ,KAAKK,eAAeC,KAAAA,GAAW,EAAEI,SAAS,QAAQ,CAAC;CAEtE,OAAOC,MAAMC,KAAK,EAAEC,QAAQ,EAAE,IAAIC,GAAGC,UAAUX,OAAOA,OAAO,IAAIf,KAAK,MAAM,GAAG,IAAI0B,KAAK,CAAC,CAAC;AAC5F;;;;;;AAOA,SAASC,aAAaC,OAKnB;CACD,MAAMC,UAAU5C,SAAS6C,WAAW;CACpC,MAAMC,iBAAiBH,MAAMjC,iBAAiByB,gBAAgB;CAE9D,OAAAY,gBACGpD,KAAG;EAAA,IAACqD,OAAI;GAAA,OAAEJ,QAAQK,OAAO;EAAC;EAAAC,WACvBpC,OAAO2B,iBAAK;GAAA,IAAAU,OAAAC,QAAA,GAAAC,QAAAF,KAAAG;GAAAC,OAAAF,OAAAN,gBAGP/C,SAASwD,KAAG;IACXC,QAAM;IACNC,IAAIlD;IACJmD,SAAO;IACPC,MAAI;IAAA,KAAA,gBAAA;KAAA,OACQjB,MAAMh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;EAAA,EAAA,CAAA,CAAA,CAAA;EAAA+E,aAAAC,UAAAL,OANxBjF,GAAG,qDAAqD+E,MAAMtE,KAAK,CAAC,CAAA;EAAA,OAAAwE;CAAA,EAAA,CAAA;AAWpF;;;;;;;AAsBA,SAAgBS,WAAWtD,OAAwB;CACjD,MAAM,CAAC2C,OAAOC,QAAQ1F,WAAW8C,OAAO;EAAC;EAAS;EAAiB;EAAS;EAAU;CAAO,CAAC;CAE9F,cAAA;EAAA,IAAAuD,QAAAT,QAAA;EAAAlC,OAAA2C,OAAAnD,gBAEKnD,MAAI;GAAA,IAACuG,OAAI;IAAA,OAAEb,MAAMnB;GAAK;GAAA,IAAAjB,WAAA;IAAA,IAAAkD,QAAAC,QAAA;IAAA9C,OAAA6C,aAC6Bd,MAAMnB,KAAK;IAAA,OAAAiC;GAAA;EAAA,CAAA,GAAA,IAAA;EAAA7C,OAAA2C,OAAAnD,gBAE9DoC,iBAAeO,WACVH,MAAI;GACRH,MAAI;GAAA,IACJkB,QAAK;IAAA,OAAEhB,MAAMgB;GAAK;GAAA,IAClBC,gBAAa;IAAA,OAAEjB,MAAMiB;GAAa;EAAA,CAAA,CAAA,GAAA,IAAA;EAAAhD,OAAA2C,OAAAnD,gBAEnCnD,MAAI;GAAA,IAACuG,OAAI;IAAA,OAAEb,MAAMS;GAAM;GAAA,IAAA7C,WAAA;IAAA,IAAAsD,SAAAC,QAAA;IAAAlD,OAAAiD,cACelB,MAAMS,MAAM;IAAA,OAAAS;GAAA;EAAA,CAAA,GAAA,IAAA;EAAAZ,aAAAC,UAAAK,OAXzC3F,GAAG,oBAAoB+E,MAAMtE,KAAK,CAAC,CAAA;EAAA,OAAAkF;CAAA,EAAA,CAAA;AAenD"}
1
+ {"version":3,"file":"calendar.js","names":["createMemo","For","Show","splitProps","ComponentProps","JSX","Calendar","RootProps","CorvuCalendarProps","RootSingleProps","CalendarMode","ChevronLeft","ChevronRight","cn","Button","CalendarExtras","weekdayLabels","previousLabel","nextLabel","formatMonth","month","Date","class","DistributiveOmit","PropertyKey","T","Omit","K","CalendarProps","EXTRAS","const","MONTH_FORMAT","Intl","DateTimeFormatOptions","year","defaultWeekdays","format","DateTimeFormat","undefined","weekday","Array","from","length","_","index","CalendarGrid","props","context","useContext","_$createComponent","each","months","children","weekdays","dayFormatter","day","monthLabel","date","_el$","_tmpl$3","_el$2","firstChild","_$insert","Nav","action","as","variant","size","aria-label","Label","Table","_el$3","_tmpl$","_el$4","label","HeadCell","scope","_el$5","_tmpl$2","weeks","week","_el$6","_tmpl$4","Cell","CellTrigger","_el$7","_tmpl$5","getDate","_el$8","_tmpl$6","CalendarSurface","mode","M","local","rest","_el$9","_tmpl$7","_$mergeProps","Extract","_$effect","_$className","DatePickerProps","footer","Element","DatePicker","_el$0","when","_el$1","_tmpl$8","value","onValueChange","_el$10","_tmpl$9","CalendarRoot","CalendarElementProps","_$createComponent","_$mergeProps","_$className"],"sources":["../../../../src/components/ui/calendar/calendar.tsx"],"sourcesContent":["import { createMemo, For, Show, splitProps, type ComponentProps, type JSX } from 'solid-js'\nimport Calendar, {\n type RootProps as CorvuCalendarProps,\n type RootSingleProps,\n} from '@corvu/calendar'\n\n/** The three modes corvu's calendar is a union over. */\nexport type CalendarMode = 'single' | 'multiple' | 'range'\nimport { ChevronLeft, ChevronRight } from 'lucide-solid'\nimport { cn } from '#lib/utils'\nimport { Button } from '../button'\n\n/**\n * Calendar.\n *\n * A month grid, over `@corvu/calendar`. The primitive owns the hard part — the\n * roving `tabindex` that makes a grid of days one tab stop rather than 42, the\n * arrow-key navigation, the `aria-selected`/`aria-disabled` bookkeeping, and the\n * `data-*` attributes that carry the states.\n *\n * What this component owns is the *presentation* of those states, and it is worth\n * saying why they are styled from `data-*` rather than from props: a day is today,\n * selected, in range, at a range end, and disabled independently, and a range\n * start that is also today has to read as both. Boolean props cannot express that\n * without a combinatorial explosion; the data attributes can.\n *\n * `mode` is the primitive's discriminated union — `single`, `multiple`, `range` —\n * so `value` and `onValueChange` change type with it. That is why this forwards\n * the props rather than normalising them: a normalised `Date[]` would lose what a\n * range needs to know which end moved.\n *\n * Three things the primitive leaves open, and this closes:\n *\n * 1. **The month caption is a heading**, wired to the grid's `aria-labelledby`, so\n * the grid has a name and a screen reader user can hear which month they are in.\n * 2. **The nav buttons have accessible names.** A bare chevron is not a name.\n * 3. **Today is a ring, not a fill.** A fill would be indistinguishable from\n * selected, and today is often also selected.\n *\n * The sub-components come off the default export as statics (`Calendar.Cell`,\n * `Calendar.CellTrigger`, …) — corvu's shape, and the reason this file does not\n * import seven names.\n */\n\n/**\n * The props this wrapper adds on top of the primitive's own. They are separate so\n * `splitProps` has a fixed list to pull out, and so the mode-specific props stay\n * the primitive's to define.\n */\ntype CalendarExtras = {\n /** Weekday header labels, Sunday first. Defaults to the locale's short names. */\n weekdayLabels?: readonly string[]\n /** Accessible names for the month navigation. Override for a non-English app. */\n previousLabel?: string\n nextLabel?: string\n /** Format a month for the caption. Defaults to `Intl.DateTimeFormat`. */\n formatMonth?: (month: Date) => string\n class?: string\n}\n\n/**\n * `Omit` distributes over a union, which would collapse the three modes into one\n * shape and lose the discriminant. This keeps them apart. `children` is dropped\n * because the surface supplies the grid itself — the caller's job is the value,\n * not the layout.\n */\ntype DistributiveOmit<T, K extends PropertyKey> = T extends unknown ? Omit<T, K> : never\n\n/** The props of any of the three modes. `mode` decides the shape of `value`. */\nexport type CalendarProps = DistributiveOmit<CorvuCalendarProps, 'children'> & CalendarExtras\n\nconst EXTRAS = ['weekdayLabels', 'previousLabel', 'nextLabel', 'formatMonth', 'class'] as const\n\nconst MONTH_FORMAT: Intl.DateTimeFormatOptions = { month: 'long', year: 'numeric' }\n\n/** The locale's short weekday names, Sunday first — which is the order corvu's `weeks` use. */\nfunction defaultWeekdays(): string[] {\n const format = new Intl.DateTimeFormat(undefined, { weekday: 'short' })\n // 2024-01-07 is a Sunday, so index 0 is Sunday without arithmetic.\n return Array.from({ length: 7 }, (_, index) => format.format(new Date(2024, 0, 7 + index)))\n}\n\n/**\n * The grid, inside the root's context. A separate component because\n * `Calendar.useContext` is only available to a descendant, and reading `months()`\n * in the same component that provides it renders one month behind.\n */\nfunction CalendarGrid(props: {\n weekdayLabels?: readonly string[]\n previousLabel: string\n nextLabel: string\n formatMonth?: (month: Date) => string\n}) {\n const context = Calendar.useContext()\n return (\n <For each={context.months()}>\n {(month, index) => {\n const weekdays = createMemo(() => props.weekdayLabels ?? defaultWeekdays())\n // Recreate per month so navigation picks up changed locale and time-zone defaults.\n const dayFormatter = new Intl.DateTimeFormat(undefined, {\n day: 'numeric',\n month: 'long',\n year: 'numeric',\n })\n const monthLabel = (date: Date) =>\n props.formatMonth\n ? props.formatMonth(date)\n : new Intl.DateTimeFormat(undefined, MONTH_FORMAT).format(date)\n return (\n <div class=\"flex flex-col gap-2\">\n <div class=\"flex items-center justify-between gap-2\">\n <Calendar.Nav\n action=\"prev-month\"\n as={Button}\n variant=\"ghost\"\n size=\"icon-sm\"\n aria-label={props.previousLabel}\n >\n <ChevronLeft aria-hidden=\"true\" />\n </Calendar.Nav>\n <Calendar.Label index={index()} class=\"text-sm font-semibold text-foreground\">\n {monthLabel(month.month)}\n </Calendar.Label>\n <Calendar.Nav\n action=\"next-month\"\n as={Button}\n variant=\"ghost\"\n size=\"icon-sm\"\n aria-label={props.nextLabel}\n >\n <ChevronRight aria-hidden=\"true\" />\n </Calendar.Nav>\n </div>\n <Calendar.Table class=\"w-full border-collapse\">\n <thead>\n <tr>\n <For each={weekdays()}>\n {(label) => (\n <Calendar.HeadCell\n as=\"th\"\n scope=\"col\"\n class=\"pb-1 text-2xs font-medium text-muted-foreground\"\n >\n {label}\n </Calendar.HeadCell>\n )}\n </For>\n </tr>\n </thead>\n <tbody>\n <For each={month.weeks}>\n {(week) => (\n <tr>\n <For each={week}>\n {(day) => (\n <Calendar.Cell as=\"td\" class=\"p-0.5 text-center\">\n <Calendar.CellTrigger\n as=\"button\"\n day={day}\n month={month.month}\n class={cn(\n 'w-full rounded-md text-xs text-foreground transition-colors',\n 'min-h-control-xs',\n 'hover:bg-muted focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none',\n // Styled from data states, so a day can be a range\n // end and today at once without a prop per pair.\n 'data-selected:bg-primary data-selected:text-primary-foreground',\n // corvu marks every day of a range selected, so the\n // span between the ends steps back to the subtle\n // fill and the ends take the solid one again.\n 'data-in-range:bg-primary-subtle data-in-range:text-foreground',\n 'data-range-start:bg-primary data-range-start:text-primary-foreground',\n 'data-range-end:bg-primary data-range-end:text-primary-foreground',\n 'data-range-start:rounded-r-none data-range-end:rounded-l-none',\n 'data-today:ring-1 data-today:ring-ring',\n 'data-disabled:text-muted-foreground data-disabled:line-through',\n 'data-disabled:hover:bg-transparent'\n )}\n >\n {/*\n The trigger renders no children of its own, so the\n day number is the caller's — without it every cell\n is an unnamed button (`button-name`).\n\n The number is what a sighted reader needs and the\n full date is what a screen reader user needs: \"25\"\n alone is meaningless out of context. So the number\n is hidden from the accessibility tree and the date\n supplies the name.\n */}\n <span aria-hidden=\"true\">{day.getDate()}</span>\n <span class=\"visually-hidden\">{dayFormatter.format(day)}</span>\n </Calendar.CellTrigger>\n </Calendar.Cell>\n )}\n </For>\n </tr>\n )}\n </For>\n </tbody>\n </Calendar.Table>\n </div>\n )\n }}\n </For>\n )\n}\n\n/**\n * Generic over the mode on purpose. `splitProps` cannot carry a discriminant\n * through destructuring — the rest object widens to `mode: 'single' | 'multiple' |\n * 'range'`, which is assignable to no single member of the primitive's union. A\n * type parameter keeps `mode` a literal, so `Extract` resolves the right member\n * and the forwarding stays checked rather than cast.\n */\nexport function CalendarSurface<M extends CalendarMode>(props: CalendarProps & { mode: M }) {\n const [local, rest] = splitProps(props as CalendarProps, [...EXTRAS])\n\n return (\n <div class={cn('w-fit rounded-lg border border-border bg-card p-3', local.class)}>\n <Calendar {...(rest as Extract<CorvuCalendarProps, { mode: M }>)}>\n <CalendarGrid\n weekdayLabels={local.weekdayLabels}\n previousLabel={local.previousLabel ?? 'Previous month'}\n nextLabel={local.nextLabel ?? 'Next month'}\n formatMonth={local.formatMonth}\n />\n </Calendar>\n </div>\n )\n}\n\n/**\n * Built from the primitive's *single* props rather than from `CalendarProps` with\n * `mode` omitted. Omitting a discriminant leaves the other members of the union\n * behind — `value` stays `Date | Date[] | {from,to}` — and the picker would then\n * have to cast to prove what its own name already says.\n */\nexport type DatePickerProps = Omit<RootSingleProps, 'mode' | 'children'> &\n CalendarExtras & {\n /** A labelled heading above the grid. */\n label?: string\n /** A footer slot: the confirm and cancel row a picker usually has. */\n footer?: JSX.Element\n }\n\n/**\n * A single-day picker: the calendar with a name and a footer. Split from\n * `CalendarSurface` because a bare calendar is a control inside a form the caller\n * already owns, while a picker is a thing the caller drops in — and the two want\n * different surroundings.\n */\nexport function DatePicker(props: DatePickerProps) {\n const [local, rest] = splitProps(props, ['value', 'onValueChange', 'label', 'footer', 'class'])\n\n return (\n <div class={cn('grid w-fit gap-2', local.class)}>\n <Show when={local.label}>\n <p class=\"text-xs font-semibold text-foreground\">{local.label}</p>\n </Show>\n <CalendarSurface\n {...rest}\n mode=\"single\"\n value={local.value}\n onValueChange={local.onValueChange}\n />\n <Show when={local.footer}>\n <div class=\"flex justify-end gap-2\">{local.footer}</div>\n </Show>\n </div>\n )\n}\n\n/** Re-exported so a caller can type a value it holds. */\nexport type { CalendarProps as CorvuCalendarProps }\nexport { Calendar as CalendarRoot }\nexport type CalendarElementProps = ComponentProps<'div'>\n"],"mappings":";;;;;;;;;;;;;;;;AAuEA,IAAM6B,SAAS;CAAC;CAAiB;CAAiB;CAAa;CAAe;AAAO;AAErF,IAAME,eAA2C;CAAEX,OAAO;CAAQc,MAAM;AAAU;;AAGlF,SAASC,kBAA4B;CACnC,MAAMC,SAAS,IAAIJ,KAAKK,eAAeC,KAAAA,GAAW,EAAEC,SAAS,QAAQ,CAAC;CAEtE,OAAOC,MAAMC,KAAK,EAAEC,QAAQ,EAAE,IAAIC,GAAGC,UAAUR,OAAOA,OAAO,IAAIf,KA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IAAA,OAAAiC;GAAA;EAAA,CAAA,GAAA,IAAA;EAAA7C,OAAA2C,OAAAxD,gBAE9DyC,iBAAeO,WACVH,MAAI;GACRH,MAAI;GAAA,IACJkB,QAAK;IAAA,OAAEhB,MAAMgB;GAAK;GAAA,IAClBC,gBAAa;IAAA,OAAEjB,MAAMiB;GAAa;EAAA,CAAA,CAAA,GAAA,IAAA;EAAAhD,OAAA2C,OAAAxD,gBAEnC/C,MAAI;GAAA,IAACwG,OAAI;IAAA,OAAEb,MAAMS;GAAM;GAAA,IAAAlD,WAAA;IAAA,IAAA2D,SAAAC,QAAA;IAAAlD,OAAAiD,cACelB,MAAMS,MAAM;IAAA,OAAAS;GAAA;EAAA,CAAA,GAAA,IAAA;EAAAZ,aAAAC,UAAAK,OAXzC5F,GAAG,oBAAoBgF,MAAMvE,KAAK,CAAC,CAAA;EAAA,OAAAmF;CAAA,EAAA,CAAA;AAenD"}
package/dist/index.d.ts CHANGED
@@ -89,6 +89,7 @@ export * from './components/layout/virtual-window';
89
89
  export * from './components/layout/app-shell';
90
90
  export * from './components/layout/page';
91
91
  export * from './components/layout/panel';
92
+ export * from './components/layout/pixel-pane';
92
93
  export * from './components/layout/side-rail';
93
94
  export * from './components/layout/sidebar-nav';
94
95
  export * from './components/layout/contextual-sidebar';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,cAAc,2BAA2B,CAAA;AACzC,cAAc,uBAAuB,CAAA;AACrC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,oCAAoC,CAAA;AAClD,cAAc,8BAA8B,CAAA;AAC5C,cAAc,wBAAwB,CAAA;AACtC,cAAc,uBAAuB,CAAA;AACrC,cAAc,wBAAwB,CAAA;AACtC,cAAc,uBAAuB,CAAA;AACrC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,wBAAwB,CAAA;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EACrB,iBAAiB,EACjB,UAAU,EACV,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,uBAAuB,EAC5B,KAAK,kBAAkB,EACvB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,YAAY,GAClB,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAChG,OAAO,EACL,0BAA0B,EAC1B,gBAAgB,EAChB,cAAc,EACd,mBAAmB,EACnB,YAAY,EACZ,aAAa,EACb,KAAK,kBAAkB,EACvB,KAAK,YAAY,GAClB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EACL,wBAAwB,EACxB,gBAAgB,EAChB,eAAe,EACf,mBAAmB,EACnB,gBAAgB,EAChB,cAAc,EACd,oBAAoB,EACpB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,qBAAqB,GAC3B,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EAAE,SAAS,EAAE,KAAK,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AACpD,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAC3F,OAAO,EACL,aAAa,EACb,SAAS,EACT,WAAW,EACX,aAAa,EACb,YAAY,EACZ,eAAe,EACf,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,gBAAgB,EAChB,wBAAwB,EACxB,YAAY,EACZ,KAAK,YAAY,EACjB,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,KAAK,SAAS,GACf,MAAM,cAAc,CAAA"}
package/dist/index.js CHANGED
@@ -91,6 +91,7 @@ import { AppShell, AppShellBody, AppShellContent, AppShellMain } from "./compone
91
91
  import { SkipLink } from "./components/layout/app-shell/skip-link.js";
92
92
  import { Page, PageHeader, PageHeaderActions, PageHeaderContent, PageHeaderDescription, PageHeaderTitle, PageSection } from "./components/layout/page/page.js";
93
93
  import { Panel, PanelActions, PanelBody, PanelCard, PanelDescription, PanelFooter, PanelHeader, PanelPlaceholder, PanelTitle, PanelToolbar } from "./components/layout/panel/panel.js";
94
+ import { PixelPane } from "./components/layout/pixel-pane/pixel-pane.js";
94
95
  import { useSideRail } from "./components/layout/side-rail/side-rail-context.js";
95
96
  import { SideRail, SideRailButton, SideRailContent, SideRailFooter, SideRailHeader, SideRailItem, SideRailSection } from "./components/layout/side-rail/side-rail.js";
96
97
  import { SidebarNav, SidebarNavButton, SidebarNavContent, SidebarNavFooter, SidebarNavHeader, SidebarNavItem, SidebarNavLabel, SidebarNavRow, SidebarNavSection, SidebarNavTitle, sidebarNavItemClass, sidebarNavItemStateClass } from "./components/layout/sidebar-nav/sidebar-nav.js";
@@ -197,4 +198,4 @@ import { MARK_IMAGE_MAX_DATA_URL_LENGTH, MARK_IMAGE_MAX_SOURCE_BYTES, MARK_IMAGE
197
198
  import { isShellIconKey, resolveShellIcon, shellIconEntries, shellIconLabel } from "./components/composites/icon-picker/shell-icons.js";
198
199
  import { IconPicker, IconPickerDropdown } from "./components/composites/icon-picker/icon-picker.js";
199
200
  import { AccentPicker } from "./components/composites/accent-picker/accent-picker.js";
200
- export { ANSI_MAX_LINE_LENGTH, ANSI_RETAIN_LINES, APPEARANCE_EDITOR_FONT_AXES, APPEARANCE_EDITOR_FONT_SIZE_MAX, APPEARANCE_EDITOR_FONT_SIZE_MIN, AboutDialog, AccentPicker, Accordion, AccordionContent, AccordionItem, AccordionTrigger, AccountMenu, ActionButton, Alert, AlertAction, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AnnotationSurface, AppShell, AppShellBody, AppShellContent, AppShellMain, AppearanceEditor, AppearanceEditorActions, AppearanceFontSettingsGroup, AppearancePanel, AppearancePopover, SettingsRow as AppearanceSettingsRow, AspectRatio, Attachment, AttachmentCard, AttachmentList, Avatar, AvatarFallback, AvatarImage, Badge, Board, BoardCardBody, BoardCardTitle, BoardCardTrigger, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Bubble, BusySendButton, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, CHAIN_OF_THOUGHT_STATUS_LABELS, CODE_BLOCK_LINE_LIMIT, CalendarSurface, Callout, CalloutTitle, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CatalogBrowser, CatalogDetail, CatalogDetailSection, ChainOfThought, ChainOfThoughtResult, ChainOfThoughtResults, ChainOfThoughtStep, Chat, ChatComposer, ChatEmpty, ChatHeader, ChatNotice, Checkbox, CheckboxDescription, CheckboxLabel, Checkpoint, CodeBlock, Collapsible, CollapsibleContent, CollapsibleTrigger, Combobox, ComboboxClear, ComboboxContent, ComboboxControl, ComboboxInput, ComboboxItem, ComboboxSection, ComboboxTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandHint, CommandInput, CommandItem, CommandList, CommandLoading, CommandSeparator, CommandShortcut, CommandStatus, ComposerAttachmentButton, ComposerHint, ComposerMenu, ComposerMenuItem, Confirmation, Context, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, ContextualSidebar, ConversationAvatar, ConversationPane, ConversationSurface, DEFAULT_APPEARANCE_EDITOR_FONT_SETTINGS, DatePicker, DetailPanel, DetailPanelBody, DetailPanelField, DetailPanelHeader, DetailPanelSection, Dialog, DialogClose, DialogCloseButton, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DiffBlock, DiffSummary, Drawer, DrawerBody, DrawerCloseButton, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyState, EmptyTitle, EntityIcon, FILE_CHANGE_LABELS, FILE_TREE_AUTO_EXPAND_LIMIT, FILE_TREE_MAX_DEPTH, FILE_TREE_MAX_ROWS, FLOATING_PREVIEW_CORNER_RADIUS, FLOATING_PREVIEW_EDGE_GAP, Field, FieldDescription, FieldError, FieldGroup, FieldInput, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTextArea, FileTree, FloatingPreview, FormField, Heading, HelpCenter, HoverCard, HoverCardContent, HoverCardTrigger, IconPicker, IconPickerDropdown, InlineCitation, InlineCode, Input, InputControl, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputOtp, InputOtpCaret, Item, ItemDescription, ItemEmpty, ItemGroup, ItemGroupEntry, ItemTitle, Kbd, KbdChord, KbdGroup, Label, ListGroup, ListRow, ListRowControl, MARK_IMAGE_MAX_DATA_URL_LENGTH, MARK_IMAGE_MAX_SOURCE_BYTES, MARK_IMAGE_SIZE, MAX_LAYOUT_DEPTH, MAX_LAYOUT_LEAVES, MAX_SPLIT_RATIO, MIN_SPLIT_RATIO, MODEL_SEARCH_THRESHOLD, MarkImageError, Marker, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Message, MessageActions, MessageBody, MessageComposer, MessageContent, MessageDayDivider, MessageFooter, MessageGroup, MessageHeader, MessageRow, MessageScroller, MessageText, ModalDialog, ModelSelector, Motion, NO_FLOATING_PREVIEW_OBSTACLES, NO_PREVIEW_MINI_PLAYER_OBSTACLES, NativeSelect, NavigationMenu, NavigationMenuContent, NavigationMenuGroup, NavigationMenuGroupLabel, NavigationMenuItem, NavigationMenuMenu, NavigationMenuSeparator, NavigationMenuTrigger, NavigationMenuViewport, NumberField, OrbitItem, OrbitLayout, PASTE_THRESHOLD_CHARS, PASTE_THRESHOLD_LINES, PASTE_TOKEN_REGEX, PREVIEW_MINI_PLAYER_CORNER_RADIUS, PREVIEW_MINI_PLAYER_EDGE_GAP, Page, PageHeader, PageHeaderActions, PageHeaderContent, PageHeaderDescription, PageHeaderTitle, PageSection, Pagination, PaginationEllipsis, PaginationItem, PaginationNext, PaginationPrevious, PalettePreview, Panel, PanelActions, PanelBody, PanelCard, PanelDescription, PanelFooter, PanelHeader, PanelPlaceholder, PanelTitle, PanelToolbar, PixelResizeHandle, Plan, Popover, PopoverAnchor, PopoverCloseButton, PopoverContent, PopoverDescription, PopoverTitle, PopoverTrigger, Presence, Progress, PropertyList, PropertyRow, PropertyTerm, PropertyValue, Questionnaire, Queue, QueueFollowUps, REDUCED_TRANSPARENCY_QUERY, RadioGroup, RadioGroupItem, Reasoning, ResizableHandle, ResizablePanel, ResizablePanelGroup, SOURCE_SNIPPET_LIMIT, SOURCE_TITLE_LIMIT, STACK_MAX_LINES, STACK_TRACE_MAX_BLOCKS, SceneControls, ScrollArea, SecretInputGroup, Select, SelectChevronsUpDown, SelectContent, SelectItem, SelectLabel, SelectSection, SelectTrigger, SelectValue, Separator, SettingsField, SettingsLayout, SettingsNavigation, SettingsPage, SettingsRow$1 as SettingsRow, SettingsSection, Sheet, SheetBody, SheetCloseButton, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, ShellRail, ShellTopBar, SideRail, SideRailButton, SideRailContent, SideRailFooter, SideRailHeader, SideRailItem, SideRailSection, SidebarNav, SidebarNavButton, SidebarNavContent, SidebarNavFooter, SidebarNavHeader, SidebarNavItem, SidebarNavLabel, SidebarNavResizeHandle, SidebarNavRow, SidebarNavSection, SidebarNavTitle, Skeleton, SkipLink, Slider, Sources, Spinner, SplitLayout, StackTrace, Stat, StatGroup, StatusBar, StatusBarItem, StatusBarSpacer, StatusChip, StatusList, Subagent, Suggestion, Suggestions, Switch, SwitchDescription, SwitchLabel, TALL_CODE_BLOCK_PX, TASK_ITEM_STATUS_LABELS, TERMINAL_MAX_LINES, TEST_RESULTS_LIST_LIMIT, TOOL_STATUS_LABELS, TOOL_VALUE_MAX_CHARS, TRACE_STATUS_LABELS, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableNumericCell, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Task, TaskItemList, TaskItemRow, Terminal, TestResults, Text, TextLink, Textarea, ThemeMiniature, ThemeMiniatureSplit, ThemeModeToggle, ThemePicker, ThemePreview, ThemeProvider, ThemeSwatch, ThemeToggle, ThreadPanel, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tool, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TopBar, TopBarBreadcrumb, TopBarPill, TopBarSearch, TopBarSection, TopBarTitle, Trace, TraceDetail, TraceLine, TranscriptComposition, Tree, TreeRow, TreeRowActions, UpdateChannelControl, UpdateDialog, ValueCombobox, VirtualWindow, WorkspaceMark, WorkspaceReorderDialog, WorkspaceSwitcher, accentPresets, alertVariants, allTokens, ansi256ToColor, ansiLineText, appearancePreviewThemes, applyAppearanceFontSettings, badgeVariants, boardCardTitleVariants, boundText, breakdownRows, bubbleVariants, buildFileTree, builtinThemes, buttonVariants, calloutVariants, captureAnchor, cardVariants, centredSquare, chatNoticeVariants, checkMarkImageFile, checkpointLabel, checkpointStatus, citationLabel, citationName, clampFloatingPreviewPosition, clampPreviewMiniPlayerPosition, clampWindow, classifyFrame, closePane, cn, colorTokens, computeLayoutFrames, confirmationOutcome, contextLabel, contextLevel, contextLevelWord, contextPercent, contextShort, contrastRatio, controlInteractive, controlSize, controlSizeIcon, controlSizes, countChanges, countLeaves, countLines, createAnsiParser, createAppMenuItems, createLayoutState, createVersionedPersistence, cva, decisionReason, dedentLines, defaultDarkThemeId, defaultLightThemeId, defaultPreferenceStorage, defaultThemeSelection, densityTokens, describeChanges, describeCount, describeFrameGroup, designTokens, diffLineVariants, diffStats, diffTargetPath, editorPaletteFor, elevationTokens, entityIconVariants, expandAll, findModel, findTokenRanges, firstFailureKey, flattenFileTree, focusPane, fontOptions, fontSettingsBootstrapScript, fontZoomShortcut, formatAttachmentSize, formatBytes, formatCost, formatDuration, formatExact, formatReleaseDate, formatDuration$1 as formatTestDuration, formatToken, formatTokens, formatToolValue, frameLocation, groupModels, groupStackEntries, hasContextFigures, headingElement, headingVariants, indexFileTree, initialExpanded, initialsFrom, inlineScriptLiteral, isAwaitingAnswer, isCustomAccent, isFailedExit, isFigure, isMarkImageDataUrl, isPasteBlock, isPlainStyle, isQuestionAnswered, isShellIconKey, isThemeAccentId, itemVariants, kbdChordKeys, kbdGroupVariants, kbdVariants, keyedRows, layoutDepth, listLeaves, listedCounts, localStoragePersistence, markImageFromFile, markImageProblemCopy, markerVariants, messageCitations, modelSearchValue, monogram, motionTokens, movePane, moveTarget, moveWorkspace, nearestAnsiColor, needsSearch, neighborLeaf, nextCitationMode, nextSeq, normalizeAppearanceEditorFontSettings, normalizeAppearanceEditorFontSize, normalizeCustomAccent, normalizeEfforts, normalizeLayout, normalizePath, normalizeSurface, paintAccentRoles, parseAnsi, parseDiff, parseInline, parseMessageText, parseStackTrace, partitionQueue, placeCitationMarkers, plainTextFromMarkdown, platformModifierKey, pruneBlocks, quarantineRecord, radiusTokens, readLegacyValue, readVersionedRecord, reasoningTitle, recollapsePastes, reconcileCounts, recoveryEnvelope, recoveryKeyFor, remapCarriedBlocks, resizeFloatingPreview, resizePreviewMiniPlayer, resizeSplit, resolveAccentPreset, resolveAccentRoles, resolveColors, resolveEffort, resolveFloatingPreviewFrame, resolvePreviewMiniPlayerFrame, resolveShellIcon, resolveSurface, resolveSurfaceState, resolveVariant, resolvedDensity, restoreAnchor, restoreControl, restoreDialogCopy, revealInWindow, safeHref, safePreviewSrc, safeSourceUrl, searchShortcutKeyshortcuts, searchShortcutLabel, settleDecision, sheetVariants, shellIconEntries, shellIconLabel, shouldCollapse, sidebarNavItemClass, sidebarNavItemStateClass, sourceHost, sourceTitle, sourcesLabel, splitLocation, splitPane, splitPaneBalanced, statusDotVariants, stepAppearanceFontSizes, stepCountLabel, stripTrailingBlankLines, suiteKey, suiteState, surfaceAlpha, surfaceInteractive, swapPanes, taskProgress, taskProgressLabel, terminalCssVariables, terminalStatusLabel, testKey, textElement, textVariants, textareaVariants, themeAccentsFor, themeById, themeCssVariables, themeFamilies, themeRecordById, themeRecords, themeScript, themeSurfaces, themesForAppearance, toast, toaster, toggleVariants, tokenRangeAt, tokensAsHex, transcriptDisclosureKey, typeaheadIndex, typographyTokens, undoClosePane, undocumentedTokenAliases, useOptionalTheme, useSideRail, useTheme, validateTheme, validateThemeRegistry, variantFromRecord, withAccent, wrapIndex, writeClipboardText, writeVersionedRecord, zIndexTokens };
201
+ export { ANSI_MAX_LINE_LENGTH, ANSI_RETAIN_LINES, APPEARANCE_EDITOR_FONT_AXES, APPEARANCE_EDITOR_FONT_SIZE_MAX, APPEARANCE_EDITOR_FONT_SIZE_MIN, AboutDialog, AccentPicker, Accordion, AccordionContent, AccordionItem, AccordionTrigger, AccountMenu, ActionButton, Alert, AlertAction, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AnnotationSurface, AppShell, AppShellBody, AppShellContent, AppShellMain, AppearanceEditor, AppearanceEditorActions, AppearanceFontSettingsGroup, AppearancePanel, AppearancePopover, SettingsRow as AppearanceSettingsRow, AspectRatio, Attachment, AttachmentCard, AttachmentList, Avatar, AvatarFallback, AvatarImage, Badge, Board, BoardCardBody, BoardCardTitle, BoardCardTrigger, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Bubble, BusySendButton, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, CHAIN_OF_THOUGHT_STATUS_LABELS, CODE_BLOCK_LINE_LIMIT, CalendarSurface, Callout, CalloutTitle, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CatalogBrowser, CatalogDetail, CatalogDetailSection, ChainOfThought, ChainOfThoughtResult, ChainOfThoughtResults, ChainOfThoughtStep, Chat, ChatComposer, ChatEmpty, ChatHeader, ChatNotice, Checkbox, CheckboxDescription, CheckboxLabel, Checkpoint, CodeBlock, Collapsible, CollapsibleContent, CollapsibleTrigger, Combobox, ComboboxClear, ComboboxContent, ComboboxControl, ComboboxInput, ComboboxItem, ComboboxSection, ComboboxTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandHint, CommandInput, CommandItem, CommandList, CommandLoading, CommandSeparator, CommandShortcut, CommandStatus, ComposerAttachmentButton, ComposerHint, ComposerMenu, ComposerMenuItem, Confirmation, Context, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, ContextualSidebar, ConversationAvatar, ConversationPane, ConversationSurface, DEFAULT_APPEARANCE_EDITOR_FONT_SETTINGS, DatePicker, DetailPanel, DetailPanelBody, DetailPanelField, DetailPanelHeader, DetailPanelSection, Dialog, DialogClose, DialogCloseButton, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DiffBlock, DiffSummary, Drawer, DrawerBody, DrawerCloseButton, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyState, EmptyTitle, EntityIcon, FILE_CHANGE_LABELS, FILE_TREE_AUTO_EXPAND_LIMIT, FILE_TREE_MAX_DEPTH, FILE_TREE_MAX_ROWS, FLOATING_PREVIEW_CORNER_RADIUS, FLOATING_PREVIEW_EDGE_GAP, Field, FieldDescription, FieldError, FieldGroup, FieldInput, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTextArea, FileTree, FloatingPreview, FormField, Heading, HelpCenter, HoverCard, HoverCardContent, HoverCardTrigger, IconPicker, IconPickerDropdown, InlineCitation, InlineCode, Input, InputControl, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputOtp, InputOtpCaret, Item, ItemDescription, ItemEmpty, ItemGroup, ItemGroupEntry, ItemTitle, Kbd, KbdChord, KbdGroup, Label, ListGroup, ListRow, ListRowControl, MARK_IMAGE_MAX_DATA_URL_LENGTH, MARK_IMAGE_MAX_SOURCE_BYTES, MARK_IMAGE_SIZE, MAX_LAYOUT_DEPTH, MAX_LAYOUT_LEAVES, MAX_SPLIT_RATIO, MIN_SPLIT_RATIO, MODEL_SEARCH_THRESHOLD, MarkImageError, Marker, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Message, MessageActions, MessageBody, MessageComposer, MessageContent, MessageDayDivider, MessageFooter, MessageGroup, MessageHeader, MessageRow, MessageScroller, MessageText, ModalDialog, ModelSelector, Motion, NO_FLOATING_PREVIEW_OBSTACLES, NO_PREVIEW_MINI_PLAYER_OBSTACLES, NativeSelect, NavigationMenu, NavigationMenuContent, NavigationMenuGroup, NavigationMenuGroupLabel, NavigationMenuItem, NavigationMenuMenu, NavigationMenuSeparator, NavigationMenuTrigger, NavigationMenuViewport, NumberField, OrbitItem, OrbitLayout, PASTE_THRESHOLD_CHARS, PASTE_THRESHOLD_LINES, PASTE_TOKEN_REGEX, PREVIEW_MINI_PLAYER_CORNER_RADIUS, PREVIEW_MINI_PLAYER_EDGE_GAP, Page, PageHeader, PageHeaderActions, PageHeaderContent, PageHeaderDescription, PageHeaderTitle, PageSection, Pagination, PaginationEllipsis, PaginationItem, PaginationNext, PaginationPrevious, PalettePreview, Panel, PanelActions, PanelBody, PanelCard, PanelDescription, PanelFooter, PanelHeader, PanelPlaceholder, PanelTitle, PanelToolbar, PixelPane, PixelResizeHandle, Plan, Popover, PopoverAnchor, PopoverCloseButton, PopoverContent, PopoverDescription, PopoverTitle, PopoverTrigger, Presence, Progress, PropertyList, PropertyRow, PropertyTerm, PropertyValue, Questionnaire, Queue, QueueFollowUps, REDUCED_TRANSPARENCY_QUERY, RadioGroup, RadioGroupItem, Reasoning, ResizableHandle, ResizablePanel, ResizablePanelGroup, SOURCE_SNIPPET_LIMIT, SOURCE_TITLE_LIMIT, STACK_MAX_LINES, STACK_TRACE_MAX_BLOCKS, SceneControls, ScrollArea, SecretInputGroup, Select, SelectChevronsUpDown, SelectContent, SelectItem, SelectLabel, SelectSection, SelectTrigger, SelectValue, Separator, SettingsField, SettingsLayout, SettingsNavigation, SettingsPage, SettingsRow$1 as SettingsRow, SettingsSection, Sheet, SheetBody, SheetCloseButton, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, ShellRail, ShellTopBar, SideRail, SideRailButton, SideRailContent, SideRailFooter, SideRailHeader, SideRailItem, SideRailSection, SidebarNav, SidebarNavButton, SidebarNavContent, SidebarNavFooter, SidebarNavHeader, SidebarNavItem, SidebarNavLabel, SidebarNavResizeHandle, SidebarNavRow, SidebarNavSection, SidebarNavTitle, Skeleton, SkipLink, Slider, Sources, Spinner, SplitLayout, StackTrace, Stat, StatGroup, StatusBar, StatusBarItem, StatusBarSpacer, StatusChip, StatusList, Subagent, Suggestion, Suggestions, Switch, SwitchDescription, SwitchLabel, TALL_CODE_BLOCK_PX, TASK_ITEM_STATUS_LABELS, TERMINAL_MAX_LINES, TEST_RESULTS_LIST_LIMIT, TOOL_STATUS_LABELS, TOOL_VALUE_MAX_CHARS, TRACE_STATUS_LABELS, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableNumericCell, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Task, TaskItemList, TaskItemRow, Terminal, TestResults, Text, TextLink, Textarea, ThemeMiniature, ThemeMiniatureSplit, ThemeModeToggle, ThemePicker, ThemePreview, ThemeProvider, ThemeSwatch, ThemeToggle, ThreadPanel, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tool, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TopBar, TopBarBreadcrumb, TopBarPill, TopBarSearch, TopBarSection, TopBarTitle, Trace, TraceDetail, TraceLine, TranscriptComposition, Tree, TreeRow, TreeRowActions, UpdateChannelControl, UpdateDialog, ValueCombobox, VirtualWindow, WorkspaceMark, WorkspaceReorderDialog, WorkspaceSwitcher, accentPresets, alertVariants, allTokens, ansi256ToColor, ansiLineText, appearancePreviewThemes, applyAppearanceFontSettings, badgeVariants, boardCardTitleVariants, boundText, breakdownRows, bubbleVariants, buildFileTree, builtinThemes, buttonVariants, calloutVariants, captureAnchor, cardVariants, centredSquare, chatNoticeVariants, checkMarkImageFile, checkpointLabel, checkpointStatus, citationLabel, citationName, clampFloatingPreviewPosition, clampPreviewMiniPlayerPosition, clampWindow, classifyFrame, closePane, cn, colorTokens, computeLayoutFrames, confirmationOutcome, contextLabel, contextLevel, contextLevelWord, contextPercent, contextShort, contrastRatio, controlInteractive, controlSize, controlSizeIcon, controlSizes, countChanges, countLeaves, countLines, createAnsiParser, createAppMenuItems, createLayoutState, createVersionedPersistence, cva, decisionReason, dedentLines, defaultDarkThemeId, defaultLightThemeId, defaultPreferenceStorage, defaultThemeSelection, densityTokens, describeChanges, describeCount, describeFrameGroup, designTokens, diffLineVariants, diffStats, diffTargetPath, editorPaletteFor, elevationTokens, entityIconVariants, expandAll, findModel, findTokenRanges, firstFailureKey, flattenFileTree, focusPane, fontOptions, fontSettingsBootstrapScript, fontZoomShortcut, formatAttachmentSize, formatBytes, formatCost, formatDuration, formatExact, formatReleaseDate, formatDuration$1 as formatTestDuration, formatToken, formatTokens, formatToolValue, frameLocation, groupModels, groupStackEntries, hasContextFigures, headingElement, headingVariants, indexFileTree, initialExpanded, initialsFrom, inlineScriptLiteral, isAwaitingAnswer, isCustomAccent, isFailedExit, isFigure, isMarkImageDataUrl, isPasteBlock, isPlainStyle, isQuestionAnswered, isShellIconKey, isThemeAccentId, itemVariants, kbdChordKeys, kbdGroupVariants, kbdVariants, keyedRows, layoutDepth, listLeaves, listedCounts, localStoragePersistence, markImageFromFile, markImageProblemCopy, markerVariants, messageCitations, modelSearchValue, monogram, motionTokens, movePane, moveTarget, moveWorkspace, nearestAnsiColor, needsSearch, neighborLeaf, nextCitationMode, nextSeq, normalizeAppearanceEditorFontSettings, normalizeAppearanceEditorFontSize, normalizeCustomAccent, normalizeEfforts, normalizeLayout, normalizePath, normalizeSurface, paintAccentRoles, parseAnsi, parseDiff, parseInline, parseMessageText, parseStackTrace, partitionQueue, placeCitationMarkers, plainTextFromMarkdown, platformModifierKey, pruneBlocks, quarantineRecord, radiusTokens, readLegacyValue, readVersionedRecord, reasoningTitle, recollapsePastes, reconcileCounts, recoveryEnvelope, recoveryKeyFor, remapCarriedBlocks, resizeFloatingPreview, resizePreviewMiniPlayer, resizeSplit, resolveAccentPreset, resolveAccentRoles, resolveColors, resolveEffort, resolveFloatingPreviewFrame, resolvePreviewMiniPlayerFrame, resolveShellIcon, resolveSurface, resolveSurfaceState, resolveVariant, resolvedDensity, restoreAnchor, restoreControl, restoreDialogCopy, revealInWindow, safeHref, safePreviewSrc, safeSourceUrl, searchShortcutKeyshortcuts, searchShortcutLabel, settleDecision, sheetVariants, shellIconEntries, shellIconLabel, shouldCollapse, sidebarNavItemClass, sidebarNavItemStateClass, sourceHost, sourceTitle, sourcesLabel, splitLocation, splitPane, splitPaneBalanced, statusDotVariants, stepAppearanceFontSizes, stepCountLabel, stripTrailingBlankLines, suiteKey, suiteState, surfaceAlpha, surfaceInteractive, swapPanes, taskProgress, taskProgressLabel, terminalCssVariables, terminalStatusLabel, testKey, textElement, textVariants, textareaVariants, themeAccentsFor, themeById, themeCssVariables, themeFamilies, themeRecordById, themeRecords, themeScript, themeSurfaces, themesForAppearance, toast, toaster, toggleVariants, tokenRangeAt, tokensAsHex, transcriptDisclosureKey, typeaheadIndex, typographyTokens, undoClosePane, undocumentedTokenAliases, useOptionalTheme, useSideRail, useTheme, validateTheme, validateThemeRegistry, variantFromRecord, withAccent, wrapIndex, writeClipboardText, writeVersionedRecord, zIndexTokens };
@@ -4,7 +4,7 @@
4
4
  "title": "Appearance Editor",
5
5
  "description": "",
6
6
  "dependencies": [
7
- "@adea-ai/themes@^0.11.6",
7
+ "@adea-ai/themes@^0.11.7",
8
8
  "@kobalte/core@^0.13.14",
9
9
  "lucide-solid@^1.65.0"
10
10
  ],
package/dist/r/lib.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "title": "Class-name and token helpers",
5
5
  "description": "The private helpers the components import: the class-name merge, the variant recipes, the token manifest and the theme bridge. Installed automatically as a peer of any component that needs it.",
6
6
  "dependencies": [
7
- "@adea-ai/themes@^0.11.6",
7
+ "@adea-ai/themes@^0.11.7",
8
8
  "class-variance-authority@^0.7.1",
9
9
  "cn@^0.5.1"
10
10
  ],
@@ -2298,7 +2298,7 @@
2298
2298
  "title": "Appearance Editor",
2299
2299
  "description": "",
2300
2300
  "dependencies": [
2301
- "@adea-ai/themes@^0.11.6",
2301
+ "@adea-ai/themes@^0.11.7",
2302
2302
  "@kobalte/core@^0.13.14",
2303
2303
  "lucide-solid@^1.65.0"
2304
2304
  ],
@@ -3458,7 +3458,7 @@
3458
3458
  "title": "Theming",
3459
3459
  "description": "",
3460
3460
  "dependencies": [
3461
- "@adea-ai/themes@^0.11.6",
3461
+ "@adea-ai/themes@^0.11.7",
3462
3462
  "@kobalte/core@^0.13.14",
3463
3463
  "lucide-solid@^1.65.0"
3464
3464
  ],
@@ -3643,7 +3643,7 @@
3643
3643
  "title": "Class-name and token helpers",
3644
3644
  "description": "The private helpers the components import: the class-name merge, the variant recipes, the token manifest and the theme bridge. Installed automatically as a peer of any component that needs it.",
3645
3645
  "dependencies": [
3646
- "@adea-ai/themes@^0.11.6",
3646
+ "@adea-ai/themes@^0.11.7",
3647
3647
  "class-variance-authority@^0.7.1",
3648
3648
  "cn@^0.5.1"
3649
3649
  ],