@adea-ai/ui 0.155.0 → 0.156.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/NOTICE +27 -0
- package/dist/components/composites/model-selector/model-selector.js +45 -53
- package/dist/components/composites/model-selector/model-selector.js.map +1 -1
- package/dist/components/composites/prompt-input/index.d.ts +2 -0
- package/dist/components/composites/prompt-input/index.d.ts.map +1 -0
- package/dist/components/composites/prompt-input/index.js +1 -0
- package/dist/components/composites/prompt-input/prompt-input.d.ts +71 -0
- package/dist/components/composites/prompt-input/prompt-input.d.ts.map +1 -0
- package/dist/components/composites/prompt-input/prompt-input.js +247 -0
- package/dist/components/composites/prompt-input/prompt-input.js.map +1 -0
- package/dist/components/conversation/chat-composer.d.ts.map +1 -1
- package/dist/components/conversation/chat-composer.js +43 -29
- package/dist/components/conversation/chat-composer.js.map +1 -1
- package/dist/components/conversation/internal/chat-composer-shell.d.ts.map +1 -1
- package/dist/components/conversation/internal/chat-composer-shell.js +155 -163
- package/dist/components/conversation/internal/chat-composer-shell.js.map +1 -1
- package/dist/components/conversation/message-composer.d.ts.map +1 -1
- package/dist/components/conversation/message-composer.js +186 -192
- package/dist/components/conversation/message-composer.js.map +1 -1
- package/dist/components/conversation/paste-token-editor.js +2 -2
- package/dist/components/conversation/paste-token-editor.js.map +1 -1
- package/dist/components/theme/theme-provider-value.d.ts.map +1 -1
- package/dist/components/theme/theme-provider-value.js +9 -1
- package/dist/components/theme/theme-provider-value.js.map +1 -1
- package/dist/components/ui/badge/badge.js +1 -1
- package/dist/components/ui/badge/badge.js.map +1 -1
- package/dist/components/ui/input-group/index.d.ts +1 -1
- package/dist/components/ui/input-group/index.d.ts.map +1 -1
- package/dist/components/ui/input-group/index.js +2 -2
- package/dist/components/ui/input-group/input-group.d.ts +34 -9
- package/dist/components/ui/input-group/input-group.d.ts.map +1 -1
- package/dist/components/ui/input-group/input-group.js +101 -28
- package/dist/components/ui/input-group/input-group.js.map +1 -1
- package/dist/components/ui/kbd/kbd.d.ts.map +1 -1
- package/dist/components/ui/kbd/kbd.js +6 -1
- package/dist/components/ui/kbd/kbd.js.map +1 -1
- package/dist/components/ui/message/index.d.ts +1 -1
- package/dist/components/ui/message/index.d.ts.map +1 -1
- package/dist/components/ui/message/index.js +2 -2
- package/dist/components/ui/message/message.d.ts +16 -0
- package/dist/components/ui/message/message.d.ts.map +1 -1
- package/dist/components/ui/message/message.js +52 -1
- package/dist/components/ui/message/message.js.map +1 -1
- package/dist/components/ui/tooltip/tooltip.js +1 -1
- package/dist/components/ui/tooltip/tooltip.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -3
- package/dist/lib/overlay.d.ts +5 -5
- package/dist/lib/overlay.d.ts.map +1 -1
- package/dist/lib/overlay.js +5 -5
- package/dist/lib/overlay.js.map +1 -1
- package/dist/r/conversation.json +1 -2
- package/dist/r/input-group.json +1 -0
- package/dist/r/message.json +4 -1
- package/dist/r/model-selector.json +1 -1
- package/dist/r/prompt-input.json +28 -0
- package/dist/r/registry.json +35 -4
- package/dist/r/src/components/composites/model-selector/model-selector.tsx +19 -25
- package/dist/r/src/components/composites/prompt-input/index.ts +15 -0
- package/dist/r/src/components/composites/prompt-input/prompt-input.tsx +267 -0
- package/dist/r/src/components/conversation/chat-composer.tsx +4 -2
- package/dist/r/src/components/conversation/internal/chat-composer-shell.tsx +27 -38
- package/dist/r/src/components/conversation/message-composer.tsx +93 -97
- package/dist/r/src/components/conversation/paste-token-editor.tsx +2 -2
- package/dist/r/src/components/theme/theme-provider-value.ts +7 -4
- package/dist/r/src/components/ui/badge/badge.tsx +1 -1
- package/dist/r/src/components/ui/input-group/index.ts +3 -0
- package/dist/r/src/components/ui/input-group/input-group.tsx +121 -29
- package/dist/r/src/components/ui/kbd/kbd.tsx +3 -0
- package/dist/r/src/components/ui/message/index.ts +3 -0
- package/dist/r/src/components/ui/message/message.tsx +56 -0
- package/dist/r/src/components/ui/tooltip/tooltip.tsx +1 -1
- package/dist/r/src/lib/overlay.ts +5 -6
- package/package.json +1 -1
- package/registry.json +35 -4
- package/src/components/composites/model-selector/model-selector.tsx +19 -25
- package/src/components/composites/prompt-input/index.ts +15 -0
- package/src/components/composites/prompt-input/prompt-input.tsx +267 -0
- package/src/components/conversation/chat-composer.tsx +4 -2
- package/src/components/conversation/internal/chat-composer-shell.tsx +27 -38
- package/src/components/conversation/message-composer.tsx +93 -97
- package/src/components/conversation/paste-token-editor.tsx +2 -2
- package/src/components/theme/theme-provider-value.ts +7 -4
- package/src/components/ui/badge/badge.tsx +1 -1
- package/src/components/ui/input-group/index.ts +3 -0
- package/src/components/ui/input-group/input-group.tsx +121 -29
- package/src/components/ui/kbd/kbd.tsx +3 -0
- package/src/components/ui/message/index.ts +3 -0
- package/src/components/ui/message/message.tsx +56 -0
- package/src/components/ui/tooltip/tooltip.tsx +1 -1
- package/src/index.ts +1 -0
- package/src/lib/overlay.ts +5 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.js","names":["Tooltip","KobalteTooltip","useTooltipContext","children","resolveChildren","createContext","createEffect","createSignal","createUniqueId","onCleanup","Show","splitProps","useContext","isServer","callHandler","tooltipMotion","tooltipTip","topLayerProps","acquireTooltipFocusGate","releaseTooltipFocusGate","cn","openDelay","closeDelay","skipDelayDuration","tooltipDefaults","TooltipTimingContext","POINTER_CLOSE_INTENT_SLACK_MS","TooltipEscapeTargetContext","element","dismiss","event","ESCAPE_LAYER_SELECTOR","id","trigger","setTrigger","isOpen","isDisabled","isTriggerFocused","markOpenIntent","clearOpenIntent","requestCloseFromAnotherTooltip","markPointerCloseIntent","clearPointerCloseIntent","markCloseIntent","TooltipInteractionContext","openTooltipInteractions","Set","pendingTooltipOpenId","tooltipScrollListenerAttached","clearPendingTooltipOpen","undefined","tooltipScrollContainsTrigger","target","window","Node","contains","handleTooltipScroll","interaction","handleTooltipPointerMove","setTooltipInteractionOpen","open","has","add","addEventListener","document","delete","size","removeEventListener","registerTooltipInteraction","TooltipProvider","props","_$createComponent","Provider","value","timing","local","rest","controlled","uncontrolledOpen","setUncontrolledOpen","defaultOpen","closeIntent","ignoreDuplicateClose","onOpenChange","next","source","pointerCloseIntentUntil","pointerCloseIntentTimeout","setTimeout","clearTimeout","intentWindow","Date","now","queueMicrotask","disabled","Boolean","activeElement","openInteraction","focusedTrigger","anotherTooltipOpening","handleKeyDown","key","_$mergeProps","TooltipTrigger","Trigger","ref","onFocus","defaultPrevented","onBlur","onPointerEnter","onPointerLeave","onClick","Content","icon","TooltipContent","context","escapeTarget","Portal","class","style","_$memo","onEscapeKeyDown","layer","closest","onPointerDownOutside","when","iconSlot","_el$","_tmpl$","_$insert"],"sources":["../../../../src/components/ui/tooltip/tooltip.tsx"],"sourcesContent":["import { Tooltip as KobalteTooltip, useTooltipContext } from '@kobalte/core/tooltip'\nimport type { Accessor, ComponentProps, JSX } from 'solid-js'\nimport {\n children as resolveChildren,\n createContext,\n createEffect,\n createSignal,\n createUniqueId,\n onCleanup,\n Show,\n splitProps,\n useContext,\n} from 'solid-js'\nimport { isServer } from 'solid-js/web'\nimport { callHandler } from '#lib/events'\nimport { tooltipMotion, tooltipTip, topLayerProps } from '#lib/overlay'\nimport { acquireTooltipFocusGate, releaseTooltipFocusGate } from '#lib/tooltip-focus-gate'\nimport { cn } from '#lib/utils'\n\n/**\n * The provider sets the *timing* defaults for every tooltip below it.\n *\n * Timing is the part of a tooltip that has to agree across an app: one that\n * opens in 200ms in a toolbar and 700ms in a sidebar reads as a bug. The\n * provider is where that agreement lives. It is optional — a tooltip outside a\n * provider falls back to the same defaults — so a consumer can drop it in\n * without restructuring anything.\n */\ntype TooltipTiming = {\n openDelay: number\n closeDelay: number\n skipDelayDuration: number\n}\n\nconst tooltipDefaults: TooltipTiming = {\n /** Long enough that a pointer crossing a toolbar does not strobe tooltips. */\n openDelay: 400,\n /** Short, because the pointer has already left the control. */\n closeDelay: 80,\n /**\n * After a tooltip has been seen, the next one opens immediately for this\n * long. This is what makes moving along a row of icons feel like one\n * gesture instead of four separate waits.\n */\n skipDelayDuration: 500,\n}\n\nconst TooltipTimingContext = createContext<TooltipTiming>(tooltipDefaults)\n\n/**\n * How long after a pointer leaves a keyboard-focused trigger its close request\n * still counts as the pointer's: Kobalte reports that close one `closeDelay`\n * later, plus a frame of slack for the timer to fire.\n */\nconst POINTER_CLOSE_INTENT_SLACK_MS = 50\n\n/**\n * The layer a tooltip sits in, when that layer closes on Escape.\n *\n * Kobalte stacks a tooltip's content as the top-most dismissable layer, and\n * only the top-most layer receives Escape — so a tip shown on a focused\n * control inside a dialog took the key the dialog needed, and stayed the top\n * layer for its exit animation. A tip is never a stop for Escape: when it\n * receives the key it closes and passes it on to this layer, provided focus is\n * still inside that layer and in no menu, listbox or popover stacked between\n * them. The layer's own Escape handler runs first and can still keep it open.\n * Dialog-shaped overlays provide it; nothing else needs to.\n */\nexport const TooltipEscapeTargetContext = createContext<{\n element: Accessor<HTMLElement | undefined>\n dismiss: (event: KeyboardEvent) => void\n}>()\n\n/** The layers that take Escape before the dialog-shaped one around them. */\nconst ESCAPE_LAYER_SELECTOR = '[role$=dialog],[role=menu],[role=listbox]'\n\ntype TooltipInteraction = {\n id: string\n trigger: () => HTMLElement | undefined\n setTrigger: (element: HTMLElement) => void\n isOpen: () => boolean\n isDisabled: () => boolean\n isTriggerFocused: () => boolean\n markOpenIntent: () => void\n clearOpenIntent: () => void\n requestCloseFromAnotherTooltip: () => void\n markPointerCloseIntent: () => void\n clearPointerCloseIntent: () => void\n markCloseIntent: () => void\n}\n\nconst TooltipInteractionContext = createContext<TooltipInteraction>()\nconst openTooltipInteractions = new Set<TooltipInteraction>()\nlet pendingTooltipOpenId: string | undefined\nlet tooltipScrollListenerAttached = false\n\nfunction clearPendingTooltipOpen(id: string) {\n if (pendingTooltipOpenId === id) pendingTooltipOpenId = undefined\n}\n\nfunction tooltipScrollContainsTrigger(event: Event, trigger: HTMLElement) {\n const target = event.target\n return target === window || (target instanceof Node && target.contains(trigger))\n}\n\nfunction handleTooltipScroll(event: Event) {\n for (const interaction of openTooltipInteractions) {\n const trigger = interaction.trigger()\n if (interaction.isOpen() && trigger && tooltipScrollContainsTrigger(event, trigger)) {\n interaction.markCloseIntent()\n }\n }\n}\n\nfunction handleTooltipPointerMove(event: PointerEvent) {\n for (const interaction of openTooltipInteractions) {\n const trigger = interaction.trigger()\n const target = event.target\n if (\n interaction.isOpen() &&\n interaction.isTriggerFocused() &&\n trigger &&\n !(target instanceof Node && trigger.contains(target))\n ) {\n interaction.markPointerCloseIntent()\n }\n }\n}\n\nfunction setTooltipInteractionOpen(interaction: TooltipInteraction, open: boolean) {\n if (isServer) return\n\n if (open) {\n if (openTooltipInteractions.has(interaction)) return\n openTooltipInteractions.add(interaction)\n if (!tooltipScrollListenerAttached) {\n tooltipScrollListenerAttached = true\n // Register before Kobalte's global listeners so intentional scroll\n // dismissal can be distinguished from its delayed pointer dismissal.\n window.addEventListener('scroll', handleTooltipScroll, true)\n document.addEventListener('pointermove', handleTooltipPointerMove, true)\n }\n } else {\n openTooltipInteractions.delete(interaction)\n if (openTooltipInteractions.size === 0 && tooltipScrollListenerAttached) {\n tooltipScrollListenerAttached = false\n window.removeEventListener('scroll', handleTooltipScroll, true)\n document.removeEventListener('pointermove', handleTooltipPointerMove, true)\n }\n }\n}\n\nfunction registerTooltipInteraction(interaction: TooltipInteraction) {\n onCleanup(() => {\n setTooltipInteractionOpen(interaction, false)\n clearPendingTooltipOpen(interaction.id)\n })\n}\n\nexport type TooltipProviderProps = {\n children?: ComponentProps<'div'>['children']\n openDelay?: number\n closeDelay?: number\n skipDelayDuration?: number\n}\n\nexport function TooltipProvider(props: TooltipProviderProps) {\n return (\n <TooltipTimingContext.Provider\n value={{\n openDelay: props.openDelay ?? tooltipDefaults.openDelay,\n closeDelay: props.closeDelay ?? tooltipDefaults.closeDelay,\n skipDelayDuration: props.skipDelayDuration ?? tooltipDefaults.skipDelayDuration,\n }}\n >\n {props.children}\n </TooltipTimingContext.Provider>\n )\n}\n\nexport type TooltipRootProps = ComponentProps<typeof KobalteTooltip>\n\nexport function Tooltip(props: TooltipRootProps) {\n // One document-level focus gate for every tooltip in the document: the first\n // tooltip acquires it, the last to unmount releases it. This is what keeps a\n // dialog's autofocus and an overlay's focus restoration from opening a tip —\n // see #lib/tooltip-focus-gate for the contract and the two over-reach traps\n // (pointer gestures and separator resize grips) it must not swallow.\n if (!isServer) {\n acquireTooltipFocusGate()\n onCleanup(releaseTooltipFocusGate)\n }\n const timing = useContext(TooltipTimingContext)\n const [local, rest] = splitProps(props, ['open', 'defaultOpen', 'onOpenChange', 'disabled'])\n const id = createUniqueId()\n const controlled = () => local.open !== undefined\n const [uncontrolledOpen, setUncontrolledOpen] = createSignal(local.defaultOpen ?? false)\n const isOpen = () => (controlled() ? (local.open ?? false) : uncontrolledOpen())\n const [trigger, setTrigger] = createSignal<HTMLElement>()\n let closeIntent = false\n let ignoreDuplicateClose = false\n let onOpenChange: (next: boolean, source?: 'handoff') => void\n let pointerCloseIntentUntil = 0\n let pointerCloseIntentTimeout: ReturnType<typeof setTimeout> | undefined\n const clearPointerCloseIntent = () => {\n pointerCloseIntentUntil = 0\n if (pointerCloseIntentTimeout) clearTimeout(pointerCloseIntentTimeout)\n pointerCloseIntentTimeout = undefined\n }\n const markPointerCloseIntent = () => {\n if (!isOpen()) return\n clearPointerCloseIntent()\n const intentWindow = (props.closeDelay ?? timing.closeDelay) + POINTER_CLOSE_INTENT_SLACK_MS\n pointerCloseIntentUntil = Date.now() + intentWindow\n pointerCloseIntentTimeout = setTimeout(clearPointerCloseIntent, intentWindow)\n }\n const markCloseIntent = () => {\n closeIntent = true\n clearPointerCloseIntent()\n queueMicrotask(() => {\n closeIntent = false\n })\n }\n const requestCloseFromAnotherTooltip = () => {\n if (!isOpen()) return\n\n // Another trigger is an explicit handoff, even when a focused tooltip has\n // a pending pointer-close intent that would otherwise suppress Kobalte's\n // close callback. Route the request through the same controlled/uncontrolled\n // state contract as Kobalte and ignore its duplicate callback for this turn.\n ignoreDuplicateClose = true\n queueMicrotask(() => {\n ignoreDuplicateClose = false\n })\n onOpenChange(false, 'handoff')\n }\n const interaction: TooltipInteraction = {\n id,\n trigger,\n setTrigger,\n isOpen,\n isDisabled: () => local.disabled ?? false,\n isTriggerFocused: () =>\n Boolean(trigger() && typeof document !== 'undefined' && trigger() === document.activeElement),\n markOpenIntent: () => {\n clearPointerCloseIntent()\n pendingTooltipOpenId = id\n // A focused tooltip ignores ordinary pointer movement, but entering or\n // focusing another tooltip is an explicit transfer.\n for (const openInteraction of openTooltipInteractions) {\n if (openInteraction.id !== id) openInteraction.requestCloseFromAnotherTooltip()\n }\n },\n clearOpenIntent: () => clearPendingTooltipOpen(id),\n requestCloseFromAnotherTooltip,\n markPointerCloseIntent,\n clearPointerCloseIntent,\n markCloseIntent,\n }\n registerTooltipInteraction(interaction)\n onCleanup(() => {\n clearPointerCloseIntent()\n ignoreDuplicateClose = false\n })\n if (isOpen()) setTooltipInteractionOpen(interaction, true)\n createEffect(() => setTooltipInteractionOpen(interaction, isOpen()))\n onOpenChange = (next: boolean, source) => {\n if (!next && source !== 'handoff' && ignoreDuplicateClose) return\n\n if (next) {\n clearPendingTooltipOpen(id)\n clearPointerCloseIntent()\n // Install this capture listener before Kobalte's open-state effect adds\n // its scroll listener later in the same update.\n setTooltipInteractionOpen(interaction, true)\n } else {\n const focusedTrigger = interaction.isTriggerFocused()\n const anotherTooltipOpening =\n pendingTooltipOpenId !== undefined && pendingTooltipOpenId !== id\n const pointerClosePending = Date.now() <= pointerCloseIntentUntil\n if (\n source !== 'handoff' &&\n focusedTrigger &&\n pointerClosePending &&\n !closeIntent &&\n !anotherTooltipOpening\n ) {\n clearPointerCloseIntent()\n return\n }\n closeIntent = false\n clearPointerCloseIntent()\n clearPendingTooltipOpen(id)\n }\n\n if (!controlled()) setUncontrolledOpen(next)\n local.onOpenChange?.(next)\n if (next) {\n // A controlled parent can reject the open request without changing its\n // signal, so the effect above would not rerun to release this listener.\n queueMicrotask(() => {\n if (!isOpen()) setTooltipInteractionOpen(interaction, false)\n })\n }\n }\n\n // Kobalte dismisses on Escape only when its content owns the top-most\n // layer, and a handoff keeps the previous tooltip's content mounted while\n // it exits — swallowing the key for the tooltip that just took over.\n // Listening on document (capture) closes this tooltip first; the layer's\n // own handler still runs for anything stacked above it.\n const handleKeyDown = (event: KeyboardEvent) => {\n if (event.key !== 'Escape') return\n markCloseIntent()\n onOpenChange(false)\n }\n createEffect(() => {\n if (isServer || !isOpen()) return\n document.addEventListener('keydown', handleKeyDown, true)\n onCleanup(() => document.removeEventListener('keydown', handleKeyDown, true))\n })\n\n return (\n <TooltipInteractionContext.Provider value={interaction}>\n <KobalteTooltip\n open={isOpen()}\n onOpenChange={onOpenChange}\n disabled={local.disabled}\n openDelay={props.openDelay ?? timing.openDelay}\n closeDelay={props.closeDelay ?? timing.closeDelay}\n skipDelayDuration={props.skipDelayDuration ?? timing.skipDelayDuration}\n {...rest}\n />\n </TooltipInteractionContext.Provider>\n )\n}\n\nexport function TooltipTrigger(props: ComponentProps<typeof KobalteTooltip.Trigger>) {\n const interaction = useContext(TooltipInteractionContext)\n const [local, rest] = splitProps(props, [\n 'ref',\n 'onFocus',\n 'onBlur',\n 'onPointerEnter',\n 'onPointerLeave',\n 'onClick',\n ])\n\n return (\n <KobalteTooltip.Trigger\n {...rest}\n ref={(element) => {\n interaction?.setTrigger(element)\n if (typeof local.ref === 'function') local.ref(element)\n }}\n onFocus={(event) => {\n callHandler(local.onFocus, event)\n if (!event.defaultPrevented && !interaction?.isDisabled()) interaction?.markOpenIntent()\n }}\n onBlur={(event) => {\n callHandler(local.onBlur, event)\n interaction?.clearOpenIntent()\n interaction?.markCloseIntent()\n }}\n onPointerEnter={(event) => {\n callHandler(local.onPointerEnter, event)\n if (!event.defaultPrevented && !interaction?.isDisabled()) interaction?.markOpenIntent()\n }}\n onPointerLeave={(event) => {\n callHandler(local.onPointerLeave, event)\n interaction?.clearOpenIntent()\n interaction?.markPointerCloseIntent()\n }}\n onClick={(event) => {\n callHandler(local.onClick, event)\n interaction?.markCloseIntent()\n }}\n />\n )\n}\n\nexport type TooltipContentProps = ComponentProps<typeof KobalteTooltip.Content> & {\n /**\n * A leading icon, repeating the trigger's glyph inside the tip — the side\n * rail's icon+label treatment, offered so a toolbar or rail tooltip does not\n * have to hand-roll it. Decorative by contract: the tip is `aria-hidden`\n * while closed and never the accessible name, so the icon must not be the\n * only carrier of meaning. Size it by leaving the svg bare; the slot fixes\n * it to the system's control size.\n */\n icon?: JSX.Element\n}\n\nexport function TooltipContent(props: TooltipContentProps) {\n const interaction = useContext(TooltipInteractionContext)\n const [local, rest] = splitProps(props, [\n 'class',\n 'children',\n 'icon',\n 'aria-hidden',\n 'onEscapeKeyDown',\n 'onPointerDownOutside',\n ])\n const context = useTooltipContext()\n const escapeTarget = useContext(TooltipEscapeTargetContext)\n\n // Kobalte keeps force-mounted and exiting content present after close. Hide\n // that retained tooltip from assistive technology until it opens again.\n const icon = resolveChildren(() => local.icon)\n return (\n <KobalteTooltip.Portal>\n <KobalteTooltip.Content\n /* The slot is what base.css's pointer-transparency rule keys on; every\n tip carries it, so no consumer has to remember to pass it. */\n data-slot=\"tooltip-content\"\n class={cn(\n tooltipTip,\n // The max width is a token, not a fixed measure: it has to fall\n // behind the viewport at large root font sizes or the tip — which\n // Kobalte can shift but never shrink — forces a horizontal scroll.\n 'z-(--z-tooltip) w-fit max-w-(--tooltip-max-width) px-2 py-1',\n 'origin-(--kb-tooltip-content-transform-origin) text-balance',\n tooltipMotion,\n // An icon+label tip is one row that reads as a unit, so the label\n // never wraps under the glyph.\n { 'flex items-center gap-2 whitespace-nowrap': !!icon() },\n local.class\n )}\n // A tooltip is never interactive: the content is plain text, and the\n // placement draws the tip below its action — where a hit-testing tip\n // would hold the next control hostage, open or departing. Kobalte\n // inlines pointer-events auto, so this is forced after its merge; the\n // pointer belongs to the control underneath.\n style={{ 'pointer-events': 'none' }}\n aria-hidden={context.isOpen() ? local['aria-hidden'] : true}\n onEscapeKeyDown={(event) => {\n local.onEscapeKeyDown?.(event)\n if (event.defaultPrevented) return\n interaction?.markCloseIntent()\n const layer = escapeTarget?.element()\n if (layer && document.activeElement?.closest(ESCAPE_LAYER_SELECTOR) === layer)\n escapeTarget?.dismiss(event)\n }}\n onPointerDownOutside={(event) => {\n local.onPointerDownOutside?.(event)\n if (!event.defaultPrevented) interaction?.markCloseIntent()\n }}\n // A tooltip opened from inside a modal dialog is part of that dialog's\n // surface, so it carries the same top-layer exemption as a menu or a\n // popover — without it the dialog's hide-outside observer aria-hides\n // the tip while it is on screen.\n {...topLayerProps}\n {...rest}\n >\n <Show when={icon()}>\n {(iconSlot) => (\n <span\n data-slot=\"tooltip-icon\"\n aria-hidden=\"true\"\n class=\"flex size-4 shrink-0 items-center justify-center [&_svg]:size-4\"\n >\n {iconSlot()}\n </span>\n )}\n </Show>\n {local.children}\n </KobalteTooltip.Content>\n </KobalteTooltip.Portal>\n )\n}\n"],"mappings":";;;;;;;;;AAkCA,IAAMwB,kBAAiC;;CAErCH,WAAW;;CAEXC,YAAY;;;;;;CAMZC,mBAAmB;AACrB;AAEA,IAAME,uBAAuBpB,cAA6BmB,eAAe;;;;;;AAOzE,IAAME,gCAAgC;;;;;;;;;;;;;AActC,IAAaC,6BAA6BtB,cAGvC;;AAGH,IAAM0B,wBAAwB;AAiB9B,IAAMa,4BAA4BvC,cAAkC;AACpE,IAAMwC,0CAA0B,IAAIC,IAAwB;AAC5D,IAAIC;AACJ,IAAIC,gCAAgC;AAEpC,SAASC,wBAAwBjB,IAAY;CAC3C,IAAIe,yBAAyBf,IAAIe,uBAAuBG,KAAAA;AAC1D;AAEA,SAASC,6BAA6BrB,OAAcG,SAAsB;CACxE,MAAMmB,SAAStB,MAAMsB;CACrB,OAAOA,WAAWC,UAAWD,kBAAkBE,QAAQF,OAAOG,SAAStB,OAAO;AAChF;AAEA,SAASuB,o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,CAAA,CAAA,IAAGwC,MAAM,iBAAiB;GAAI;GAC3D8C,kBAAkB3F,UAAU;IAC1B6C,MAAM8C,kBAAkB3F,KAAK;IAC7B,IAAIA,MAAM6E,kBAAkB;IAC5BlD,aAAad,gBAAgB;IAC7B,MAAM+E,QAAQN,cAAcxF,QAAQ;IACpC,IAAI8F,SAAS1D,SAASgC,eAAe2B,QAAQ5F,qBAAqB,MAAM2F,OACtEN,cAAcvF,QAAQC,KAAK;GAC/B;GACA8F,uBAAuB9F,UAAU;IAC/B6C,MAAMiD,uBAAuB9F,KAAK;IAClC,IAAI,CAACA,MAAM6E,kBAAkBlD,aAAad,gBAAgB;GAC5D;EAAC,GAKG1B,eACA2D,MAAI,EAAA,IAAAzE,WAAA;GAAA,OAAA,CAAAoE,gBAEP7D,MAAI;IAAA,IAACmH,OAAI;KAAA,OAAEZ,KAAK;IAAC;IAAA9G,WACd2H,oBAAQ;KAAA,IAAAC,OAAAC,OAAA;KAAAC,OAAAF,MAMLD,QAAQ;KAAA,OAAAC;IAAA,EAAA,CAAA;GAEZ,CAAA,GAAAP,WAEF7C,MAAMxE,QAAQ,CAAA;EAAA,EAAA,CAAA,CAAA;CAAA,EAAA,CAAA;AAIvB"}
|
|
1
|
+
{"version":3,"file":"tooltip.js","names":["Tooltip","KobalteTooltip","useTooltipContext","children","resolveChildren","createContext","createEffect","createSignal","createUniqueId","onCleanup","Show","splitProps","useContext","isServer","callHandler","tooltipMotion","tooltipTip","topLayerProps","acquireTooltipFocusGate","releaseTooltipFocusGate","cn","openDelay","closeDelay","skipDelayDuration","tooltipDefaults","TooltipTimingContext","POINTER_CLOSE_INTENT_SLACK_MS","TooltipEscapeTargetContext","element","dismiss","event","ESCAPE_LAYER_SELECTOR","id","trigger","setTrigger","isOpen","isDisabled","isTriggerFocused","markOpenIntent","clearOpenIntent","requestCloseFromAnotherTooltip","markPointerCloseIntent","clearPointerCloseIntent","markCloseIntent","TooltipInteractionContext","openTooltipInteractions","Set","pendingTooltipOpenId","tooltipScrollListenerAttached","clearPendingTooltipOpen","undefined","tooltipScrollContainsTrigger","target","window","Node","contains","handleTooltipScroll","interaction","handleTooltipPointerMove","setTooltipInteractionOpen","open","has","add","addEventListener","document","delete","size","removeEventListener","registerTooltipInteraction","TooltipProvider","props","_$createComponent","Provider","value","timing","local","rest","controlled","uncontrolledOpen","setUncontrolledOpen","defaultOpen","closeIntent","ignoreDuplicateClose","onOpenChange","next","source","pointerCloseIntentUntil","pointerCloseIntentTimeout","setTimeout","clearTimeout","intentWindow","Date","now","queueMicrotask","disabled","Boolean","activeElement","openInteraction","focusedTrigger","anotherTooltipOpening","handleKeyDown","key","_$mergeProps","TooltipTrigger","Trigger","ref","onFocus","defaultPrevented","onBlur","onPointerEnter","onPointerLeave","onClick","Content","icon","TooltipContent","context","escapeTarget","Portal","class","style","_$memo","onEscapeKeyDown","layer","closest","onPointerDownOutside","when","iconSlot","_el$","_tmpl$","_$insert"],"sources":["../../../../src/components/ui/tooltip/tooltip.tsx"],"sourcesContent":["import { Tooltip as KobalteTooltip, useTooltipContext } from '@kobalte/core/tooltip'\nimport type { Accessor, ComponentProps, JSX } from 'solid-js'\nimport {\n children as resolveChildren,\n createContext,\n createEffect,\n createSignal,\n createUniqueId,\n onCleanup,\n Show,\n splitProps,\n useContext,\n} from 'solid-js'\nimport { isServer } from 'solid-js/web'\nimport { callHandler } from '#lib/events'\nimport { tooltipMotion, tooltipTip, topLayerProps } from '#lib/overlay'\nimport { acquireTooltipFocusGate, releaseTooltipFocusGate } from '#lib/tooltip-focus-gate'\nimport { cn } from '#lib/utils'\n\n/**\n * The provider sets the *timing* defaults for every tooltip below it.\n *\n * Timing is the part of a tooltip that has to agree across an app: one that\n * opens in 200ms in a toolbar and 700ms in a sidebar reads as a bug. The\n * provider is where that agreement lives. It is optional — a tooltip outside a\n * provider falls back to the same defaults — so a consumer can drop it in\n * without restructuring anything.\n */\ntype TooltipTiming = {\n openDelay: number\n closeDelay: number\n skipDelayDuration: number\n}\n\nconst tooltipDefaults: TooltipTiming = {\n /** Long enough that a pointer crossing a toolbar does not strobe tooltips. */\n openDelay: 400,\n /** Short, because the pointer has already left the control. */\n closeDelay: 80,\n /**\n * After a tooltip has been seen, the next one opens immediately for this\n * long. This is what makes moving along a row of icons feel like one\n * gesture instead of four separate waits.\n */\n skipDelayDuration: 500,\n}\n\nconst TooltipTimingContext = createContext<TooltipTiming>(tooltipDefaults)\n\n/**\n * How long after a pointer leaves a keyboard-focused trigger its close request\n * still counts as the pointer's: Kobalte reports that close one `closeDelay`\n * later, plus a frame of slack for the timer to fire.\n */\nconst POINTER_CLOSE_INTENT_SLACK_MS = 50\n\n/**\n * The layer a tooltip sits in, when that layer closes on Escape.\n *\n * Kobalte stacks a tooltip's content as the top-most dismissable layer, and\n * only the top-most layer receives Escape — so a tip shown on a focused\n * control inside a dialog took the key the dialog needed, and stayed the top\n * layer for its exit animation. A tip is never a stop for Escape: when it\n * receives the key it closes and passes it on to this layer, provided focus is\n * still inside that layer and in no menu, listbox or popover stacked between\n * them. The layer's own Escape handler runs first and can still keep it open.\n * Dialog-shaped overlays provide it; nothing else needs to.\n */\nexport const TooltipEscapeTargetContext = createContext<{\n element: Accessor<HTMLElement | undefined>\n dismiss: (event: KeyboardEvent) => void\n}>()\n\n/** The layers that take Escape before the dialog-shaped one around them. */\nconst ESCAPE_LAYER_SELECTOR = '[role$=dialog],[role=menu],[role=listbox]'\n\ntype TooltipInteraction = {\n id: string\n trigger: () => HTMLElement | undefined\n setTrigger: (element: HTMLElement) => void\n isOpen: () => boolean\n isDisabled: () => boolean\n isTriggerFocused: () => boolean\n markOpenIntent: () => void\n clearOpenIntent: () => void\n requestCloseFromAnotherTooltip: () => void\n markPointerCloseIntent: () => void\n clearPointerCloseIntent: () => void\n markCloseIntent: () => void\n}\n\nconst TooltipInteractionContext = createContext<TooltipInteraction>()\nconst openTooltipInteractions = new Set<TooltipInteraction>()\nlet pendingTooltipOpenId: string | undefined\nlet tooltipScrollListenerAttached = false\n\nfunction clearPendingTooltipOpen(id: string) {\n if (pendingTooltipOpenId === id) pendingTooltipOpenId = undefined\n}\n\nfunction tooltipScrollContainsTrigger(event: Event, trigger: HTMLElement) {\n const target = event.target\n return target === window || (target instanceof Node && target.contains(trigger))\n}\n\nfunction handleTooltipScroll(event: Event) {\n for (const interaction of openTooltipInteractions) {\n const trigger = interaction.trigger()\n if (interaction.isOpen() && trigger && tooltipScrollContainsTrigger(event, trigger)) {\n interaction.markCloseIntent()\n }\n }\n}\n\nfunction handleTooltipPointerMove(event: PointerEvent) {\n for (const interaction of openTooltipInteractions) {\n const trigger = interaction.trigger()\n const target = event.target\n if (\n interaction.isOpen() &&\n interaction.isTriggerFocused() &&\n trigger &&\n !(target instanceof Node && trigger.contains(target))\n ) {\n interaction.markPointerCloseIntent()\n }\n }\n}\n\nfunction setTooltipInteractionOpen(interaction: TooltipInteraction, open: boolean) {\n if (isServer) return\n\n if (open) {\n if (openTooltipInteractions.has(interaction)) return\n openTooltipInteractions.add(interaction)\n if (!tooltipScrollListenerAttached) {\n tooltipScrollListenerAttached = true\n // Register before Kobalte's global listeners so intentional scroll\n // dismissal can be distinguished from its delayed pointer dismissal.\n window.addEventListener('scroll', handleTooltipScroll, true)\n document.addEventListener('pointermove', handleTooltipPointerMove, true)\n }\n } else {\n openTooltipInteractions.delete(interaction)\n if (openTooltipInteractions.size === 0 && tooltipScrollListenerAttached) {\n tooltipScrollListenerAttached = false\n window.removeEventListener('scroll', handleTooltipScroll, true)\n document.removeEventListener('pointermove', handleTooltipPointerMove, true)\n }\n }\n}\n\nfunction registerTooltipInteraction(interaction: TooltipInteraction) {\n onCleanup(() => {\n setTooltipInteractionOpen(interaction, false)\n clearPendingTooltipOpen(interaction.id)\n })\n}\n\nexport type TooltipProviderProps = {\n children?: ComponentProps<'div'>['children']\n openDelay?: number\n closeDelay?: number\n skipDelayDuration?: number\n}\n\nexport function TooltipProvider(props: TooltipProviderProps) {\n return (\n <TooltipTimingContext.Provider\n value={{\n openDelay: props.openDelay ?? tooltipDefaults.openDelay,\n closeDelay: props.closeDelay ?? tooltipDefaults.closeDelay,\n skipDelayDuration: props.skipDelayDuration ?? tooltipDefaults.skipDelayDuration,\n }}\n >\n {props.children}\n </TooltipTimingContext.Provider>\n )\n}\n\nexport type TooltipRootProps = ComponentProps<typeof KobalteTooltip>\n\nexport function Tooltip(props: TooltipRootProps) {\n // One document-level focus gate for every tooltip in the document: the first\n // tooltip acquires it, the last to unmount releases it. This is what keeps a\n // dialog's autofocus and an overlay's focus restoration from opening a tip —\n // see #lib/tooltip-focus-gate for the contract and the two over-reach traps\n // (pointer gestures and separator resize grips) it must not swallow.\n if (!isServer) {\n acquireTooltipFocusGate()\n onCleanup(releaseTooltipFocusGate)\n }\n const timing = useContext(TooltipTimingContext)\n const [local, rest] = splitProps(props, ['open', 'defaultOpen', 'onOpenChange', 'disabled'])\n const id = createUniqueId()\n const controlled = () => local.open !== undefined\n const [uncontrolledOpen, setUncontrolledOpen] = createSignal(local.defaultOpen ?? false)\n const isOpen = () => (controlled() ? (local.open ?? false) : uncontrolledOpen())\n const [trigger, setTrigger] = createSignal<HTMLElement>()\n let closeIntent = false\n let ignoreDuplicateClose = false\n let onOpenChange: (next: boolean, source?: 'handoff') => void\n let pointerCloseIntentUntil = 0\n let pointerCloseIntentTimeout: ReturnType<typeof setTimeout> | undefined\n const clearPointerCloseIntent = () => {\n pointerCloseIntentUntil = 0\n if (pointerCloseIntentTimeout) clearTimeout(pointerCloseIntentTimeout)\n pointerCloseIntentTimeout = undefined\n }\n const markPointerCloseIntent = () => {\n if (!isOpen()) return\n clearPointerCloseIntent()\n const intentWindow = (props.closeDelay ?? timing.closeDelay) + POINTER_CLOSE_INTENT_SLACK_MS\n pointerCloseIntentUntil = Date.now() + intentWindow\n pointerCloseIntentTimeout = setTimeout(clearPointerCloseIntent, intentWindow)\n }\n const markCloseIntent = () => {\n closeIntent = true\n clearPointerCloseIntent()\n queueMicrotask(() => {\n closeIntent = false\n })\n }\n const requestCloseFromAnotherTooltip = () => {\n if (!isOpen()) return\n\n // Another trigger is an explicit handoff, even when a focused tooltip has\n // a pending pointer-close intent that would otherwise suppress Kobalte's\n // close callback. Route the request through the same controlled/uncontrolled\n // state contract as Kobalte and ignore its duplicate callback for this turn.\n ignoreDuplicateClose = true\n queueMicrotask(() => {\n ignoreDuplicateClose = false\n })\n onOpenChange(false, 'handoff')\n }\n const interaction: TooltipInteraction = {\n id,\n trigger,\n setTrigger,\n isOpen,\n isDisabled: () => local.disabled ?? false,\n isTriggerFocused: () =>\n Boolean(trigger() && typeof document !== 'undefined' && trigger() === document.activeElement),\n markOpenIntent: () => {\n clearPointerCloseIntent()\n pendingTooltipOpenId = id\n // A focused tooltip ignores ordinary pointer movement, but entering or\n // focusing another tooltip is an explicit transfer.\n for (const openInteraction of openTooltipInteractions) {\n if (openInteraction.id !== id) openInteraction.requestCloseFromAnotherTooltip()\n }\n },\n clearOpenIntent: () => clearPendingTooltipOpen(id),\n requestCloseFromAnotherTooltip,\n markPointerCloseIntent,\n clearPointerCloseIntent,\n markCloseIntent,\n }\n registerTooltipInteraction(interaction)\n onCleanup(() => {\n clearPointerCloseIntent()\n ignoreDuplicateClose = false\n })\n if (isOpen()) setTooltipInteractionOpen(interaction, true)\n createEffect(() => setTooltipInteractionOpen(interaction, isOpen()))\n onOpenChange = (next: boolean, source) => {\n if (!next && source !== 'handoff' && ignoreDuplicateClose) return\n\n if (next) {\n clearPendingTooltipOpen(id)\n clearPointerCloseIntent()\n // Install this capture listener before Kobalte's open-state effect adds\n // its scroll listener later in the same update.\n setTooltipInteractionOpen(interaction, true)\n } else {\n const focusedTrigger = interaction.isTriggerFocused()\n const anotherTooltipOpening =\n pendingTooltipOpenId !== undefined && pendingTooltipOpenId !== id\n const pointerClosePending = Date.now() <= pointerCloseIntentUntil\n if (\n source !== 'handoff' &&\n focusedTrigger &&\n pointerClosePending &&\n !closeIntent &&\n !anotherTooltipOpening\n ) {\n clearPointerCloseIntent()\n return\n }\n closeIntent = false\n clearPointerCloseIntent()\n clearPendingTooltipOpen(id)\n }\n\n if (!controlled()) setUncontrolledOpen(next)\n local.onOpenChange?.(next)\n if (next) {\n // A controlled parent can reject the open request without changing its\n // signal, so the effect above would not rerun to release this listener.\n queueMicrotask(() => {\n if (!isOpen()) setTooltipInteractionOpen(interaction, false)\n })\n }\n }\n\n // Kobalte dismisses on Escape only when its content owns the top-most\n // layer, and a handoff keeps the previous tooltip's content mounted while\n // it exits — swallowing the key for the tooltip that just took over.\n // Listening on document (capture) closes this tooltip first; the layer's\n // own handler still runs for anything stacked above it.\n const handleKeyDown = (event: KeyboardEvent) => {\n if (event.key !== 'Escape') return\n markCloseIntent()\n onOpenChange(false)\n }\n createEffect(() => {\n if (isServer || !isOpen()) return\n document.addEventListener('keydown', handleKeyDown, true)\n onCleanup(() => document.removeEventListener('keydown', handleKeyDown, true))\n })\n\n return (\n <TooltipInteractionContext.Provider value={interaction}>\n <KobalteTooltip\n open={isOpen()}\n onOpenChange={onOpenChange}\n disabled={local.disabled}\n openDelay={props.openDelay ?? timing.openDelay}\n closeDelay={props.closeDelay ?? timing.closeDelay}\n skipDelayDuration={props.skipDelayDuration ?? timing.skipDelayDuration}\n {...rest}\n />\n </TooltipInteractionContext.Provider>\n )\n}\n\nexport function TooltipTrigger(props: ComponentProps<typeof KobalteTooltip.Trigger>) {\n const interaction = useContext(TooltipInteractionContext)\n const [local, rest] = splitProps(props, [\n 'ref',\n 'onFocus',\n 'onBlur',\n 'onPointerEnter',\n 'onPointerLeave',\n 'onClick',\n ])\n\n return (\n <KobalteTooltip.Trigger\n {...rest}\n ref={(element) => {\n interaction?.setTrigger(element)\n if (typeof local.ref === 'function') local.ref(element)\n }}\n onFocus={(event) => {\n callHandler(local.onFocus, event)\n if (!event.defaultPrevented && !interaction?.isDisabled()) interaction?.markOpenIntent()\n }}\n onBlur={(event) => {\n callHandler(local.onBlur, event)\n interaction?.clearOpenIntent()\n interaction?.markCloseIntent()\n }}\n onPointerEnter={(event) => {\n callHandler(local.onPointerEnter, event)\n if (!event.defaultPrevented && !interaction?.isDisabled()) interaction?.markOpenIntent()\n }}\n onPointerLeave={(event) => {\n callHandler(local.onPointerLeave, event)\n interaction?.clearOpenIntent()\n interaction?.markPointerCloseIntent()\n }}\n onClick={(event) => {\n callHandler(local.onClick, event)\n interaction?.markCloseIntent()\n }}\n />\n )\n}\n\nexport type TooltipContentProps = ComponentProps<typeof KobalteTooltip.Content> & {\n /**\n * A leading icon, repeating the trigger's glyph inside the tip — the side\n * rail's icon+label treatment, offered so a toolbar or rail tooltip does not\n * have to hand-roll it. Decorative by contract: the tip is `aria-hidden`\n * while closed and never the accessible name, so the icon must not be the\n * only carrier of meaning. Size it by leaving the svg bare; the slot fixes\n * it to the system's control size.\n */\n icon?: JSX.Element\n}\n\nexport function TooltipContent(props: TooltipContentProps) {\n const interaction = useContext(TooltipInteractionContext)\n const [local, rest] = splitProps(props, [\n 'class',\n 'children',\n 'icon',\n 'aria-hidden',\n 'onEscapeKeyDown',\n 'onPointerDownOutside',\n ])\n const context = useTooltipContext()\n const escapeTarget = useContext(TooltipEscapeTargetContext)\n\n // Kobalte keeps force-mounted and exiting content present after close. Hide\n // that retained tooltip from assistive technology until it opens again.\n const icon = resolveChildren(() => local.icon)\n return (\n <KobalteTooltip.Portal>\n <KobalteTooltip.Content\n /* The slot is what base.css's pointer-transparency rule keys on; every\n tip carries it, so no consumer has to remember to pass it. */\n data-slot=\"tooltip-content\"\n class={cn(\n tooltipTip,\n // The max width is a token, not a fixed measure: it has to fall\n // behind the viewport at large root font sizes or the tip — which\n // Kobalte can shift but never shrink — forces a horizontal scroll.\n 'z-(--z-tooltip) w-fit max-w-(--tooltip-max-width) px-3 py-1.5',\n 'origin-(--kb-tooltip-content-transform-origin) text-balance',\n tooltipMotion,\n // An icon+label tip is one row that reads as a unit, so the label\n // never wraps under the glyph.\n { 'flex items-center gap-2 whitespace-nowrap': !!icon() },\n local.class\n )}\n // A tooltip is never interactive: the content is plain text, and the\n // placement draws the tip below its action — where a hit-testing tip\n // would hold the next control hostage, open or departing. Kobalte\n // inlines pointer-events auto, so this is forced after its merge; the\n // pointer belongs to the control underneath.\n style={{ 'pointer-events': 'none' }}\n aria-hidden={context.isOpen() ? local['aria-hidden'] : true}\n onEscapeKeyDown={(event) => {\n local.onEscapeKeyDown?.(event)\n if (event.defaultPrevented) return\n interaction?.markCloseIntent()\n const layer = escapeTarget?.element()\n if (layer && document.activeElement?.closest(ESCAPE_LAYER_SELECTOR) === layer)\n escapeTarget?.dismiss(event)\n }}\n onPointerDownOutside={(event) => {\n local.onPointerDownOutside?.(event)\n if (!event.defaultPrevented) interaction?.markCloseIntent()\n }}\n // A tooltip opened from inside a modal dialog is part of that dialog's\n // surface, so it carries the same top-layer exemption as a menu or a\n // popover — without it the dialog's hide-outside observer aria-hides\n // the tip while it is on screen.\n {...topLayerProps}\n {...rest}\n >\n <Show when={icon()}>\n {(iconSlot) => (\n <span\n data-slot=\"tooltip-icon\"\n aria-hidden=\"true\"\n class=\"flex size-4 shrink-0 items-center justify-center [&_svg]:size-4\"\n >\n {iconSlot()}\n </span>\n )}\n </Show>\n {local.children}\n </KobalteTooltip.Content>\n </KobalteTooltip.Portal>\n )\n}\n"],"mappings":";;;;;;;;;AAkCA,IAAMwB,kBAAiC;;CAErCH,WAAW;;CAEXC,YAAY;;;;;;CAMZC,mBAAmB;AACrB;AAEA,IAAME,uBAAuBpB,cAA6BmB,eAAe;;;;;;AAOzE,IAAME,gCAAgC;;;;;;;;;;;;;AActC,IAAaC,6BAA6BtB,cAGvC;;AAGH,IAAM0B,wBAAwB;AAiB9B,IAAMa,4BAA4BvC,cAAkC;AACpE,IAAMwC,0CAA0B,IAAIC,IAAwB;AAC5D,IAAIC;AACJ,IAAIC,gCAAgC;AAEpC,SAASC,wBAAwBjB,IAAY;CAC3C,IAAIe,yBAAyBf,IAAIe,uBAAuBG,KAAAA;AAC1D;AAEA,SAASC,6BAA6BrB,OAAcG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MAAM2C,KACR;GAAC;GAMDC,OAAO,EAAE,kBAAkB,OAAO;GAAC,KAAA,iBAAA;IAAA,OACtBC,WAAA,CAAA,CAAAL,QAAQhF,OAAO,CAAC,CAAA,CAAA,IAAGwC,MAAM,iBAAiB;GAAI;GAC3D8C,kBAAkB3F,UAAU;IAC1B6C,MAAM8C,kBAAkB3F,KAAK;IAC7B,IAAIA,MAAM6E,kBAAkB;IAC5BlD,aAAad,gBAAgB;IAC7B,MAAM+E,QAAQN,cAAcxF,QAAQ;IACpC,IAAI8F,SAAS1D,SAASgC,eAAe2B,QAAQ5F,qBAAqB,MAAM2F,OACtEN,cAAcvF,QAAQC,KAAK;GAC/B;GACA8F,uBAAuB9F,UAAU;IAC/B6C,MAAMiD,uBAAuB9F,KAAK;IAClC,IAAI,CAACA,MAAM6E,kBAAkBlD,aAAad,gBAAgB;GAC5D;EAAC,GAKG1B,eACA2D,MAAI,EAAA,IAAAzE,WAAA;GAAA,OAAA,CAAAoE,gBAEP7D,MAAI;IAAA,IAACmH,OAAI;KAAA,OAAEZ,KAAK;IAAC;IAAA9G,WACd2H,oBAAQ;KAAA,IAAAC,OAAAC,OAAA;KAAAC,OAAAF,MAMLD,QAAQ;KAAA,OAAAC;IAAA,EAAA,CAAA;GAEZ,CAAA,GAAAP,WAEF7C,MAAMxE,QAAQ,CAAA;EAAA,EAAA,CAAA,CAAA;CAAA,EAAA,CAAA;AAIvB"}
|
package/dist/index.d.ts
CHANGED
|
@@ -113,6 +113,7 @@ export * from './components/composites/file-tree';
|
|
|
113
113
|
export * from './components/composites/inline-citation';
|
|
114
114
|
export * from './components/composites/model-selector';
|
|
115
115
|
export * from './components/composites/plan';
|
|
116
|
+
export * from './components/composites/prompt-input';
|
|
116
117
|
export * from './components/composites/queue';
|
|
117
118
|
export * from './components/composites/reasoning';
|
|
118
119
|
export * from './components/composites/sources';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts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AC/B,OAAO,EAAE,SAAS,EAAE,KAAK,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAC3D,OAAO,EAAE,UAAU,EAAE,KAAK,IAAI,EAAE,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAC3E,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
|
@@ -47,7 +47,7 @@ import { Input } from "./components/ui/input/input.js";
|
|
|
47
47
|
import { NumberField } from "./components/ui/field/number-field.js";
|
|
48
48
|
import { HoverCard, HoverCardContent, HoverCardTrigger } from "./components/ui/hover-card/hover-card.js";
|
|
49
49
|
import { Item, ItemDescription, ItemEmpty, ItemGroup, ItemGroupEntry, ItemTitle, itemVariants } from "./components/ui/item/item.js";
|
|
50
|
-
import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText } from "./components/ui/input-group/input-group.js";
|
|
50
|
+
import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea } from "./components/ui/input-group/input-group.js";
|
|
51
51
|
import { SecretInputGroup } from "./components/ui/input-group/secret-input-group.js";
|
|
52
52
|
import { InputOtp, InputOtpCaret } from "./components/ui/input-otp/input-otp.js";
|
|
53
53
|
import { Kbd, KbdChord, KbdGroup, kbdChordKeys, kbdGroupVariants, kbdVariants } from "./components/ui/kbd/kbd.js";
|
|
@@ -55,7 +55,7 @@ import { platformModifierKey, searchShortcutKeyshortcuts, searchShortcutLabel }
|
|
|
55
55
|
import { Marker, markerVariants } from "./components/ui/marker/marker.js";
|
|
56
56
|
import { Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger } from "./components/ui/menubar/menubar.js";
|
|
57
57
|
import { parseInline, parseMessageText, parseMessageTextIncremental } from "./components/ui/message/parse-message-text.js";
|
|
58
|
-
import { Message, MessageActions, MessageContent, MessageFooter, MessageHeader, MessageText } from "./components/ui/message/message.js";
|
|
58
|
+
import { Message, MessageAction, MessageActions, MessageContent, MessageCopyAction, MessageFooter, MessageHeader, MessageText } from "./components/ui/message/message.js";
|
|
59
59
|
import { placeCitationMarkers } from "./components/ui/message/cite-ranges.js";
|
|
60
60
|
import { ModalDialog } from "./components/ui/modal-dialog/modal-dialog.js";
|
|
61
61
|
import { NavigationMenu, NavigationMenuContent, NavigationMenuGroup, NavigationMenuGroupLabel, NavigationMenuItem, NavigationMenuMenu, NavigationMenuSeparator, NavigationMenuTrigger, NavigationMenuViewport } from "./components/ui/navigation-menu/navigation-menu.js";
|
|
@@ -107,6 +107,7 @@ import { StatusBar, StatusBarItem, StatusBarSpacer } from "./components/layout/s
|
|
|
107
107
|
import { TopBar, TopBarBreadcrumb, TopBarPill, TopBarSearch, TopBarSection, TopBarTitle } from "./components/layout/top-bar/top-bar.js";
|
|
108
108
|
import { ShellTopBar } from "./components/layout/shell-top-bar/shell-top-bar.js";
|
|
109
109
|
import { ShellRail } from "./components/layout/shell-rail/shell-rail.js";
|
|
110
|
+
import { PromptInput, PromptInputBody, PromptInputButton, PromptInputControl, PromptInputFooter, PromptInputHeader, PromptInputSubmit, PromptInputTextarea, PromptInputTools } from "./components/composites/prompt-input/prompt-input.js";
|
|
110
111
|
import { BusySendButton } from "./components/conversation/busy-send-button.js";
|
|
111
112
|
import { ChatComposer } from "./components/conversation/chat-composer.js";
|
|
112
113
|
import { ConversationAvatar } from "./components/conversation/conversation-avatar.js";
|
|
@@ -207,4 +208,4 @@ import { isShellIconKey, resolveShellIcon, shellIconEntries, shellIconLabel } fr
|
|
|
207
208
|
import { IconPicker, IconPickerDropdown } from "./components/composites/icon-picker/icon-picker.js";
|
|
208
209
|
import { formatBytes, formatReleaseDate, plainTextFromMarkdown } from "./lib/version-notes.js";
|
|
209
210
|
import { allTokens, colorTokens, densityTokens, designTokens, elevationTokens, motionTokens, radiusTokens, typographyTokens, undocumentedTokenAliases, zIndexTokens } from "./lib/tokens.js";
|
|
210
|
-
export { ANSI_MAX_LINE_LENGTH, ANSI_RETAIN_LINES, APPEARANCE_EDITOR_FONT_AXES, APPEARANCE_EDITOR_FONT_SIZE_MAX, APPEARANCE_EDITOR_FONT_SIZE_MIN, AboutDialog, AccentPicker, AccentSwatchGroups, 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, LazyTooltip, 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, NativeSelect, NavigationMenu, NavigationMenuContent, NavigationMenuGroup, NavigationMenuGroupLabel, NavigationMenuItem, NavigationMenuMenu, NavigationMenuSeparator, NavigationMenuTrigger, NavigationMenuViewport, NumberField, OrbitItem, OrbitLayout, PASTE_THRESHOLD_CHARS, PASTE_THRESHOLD_LINES, PASTE_TOKEN_REGEX, 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, TraceError, TraceLine, TraceMark, TranscriptComposition, Tree, TreeRow, TreeRowActions, TreeStickyHeader, UpdateChannelControl, UpdateDialog, ValueCombobox, VirtualWindow, WORK_STATUS_LABELS, WORK_TRACE_STATUS, 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, clampSplitRatio, clampWindow, classifyFrame, closePane, cn, colorTokens, computeLayoutFrames, confirmationOutcome, contextLabel, contextLevel, contextLevelWord, contextPercent, contextShort, contrastRatio, controlInteractive, controlSize, controlSizeIcon, controlSizes, countChanges, countLeaves, countLines, createAnsiParser, createAppMenuItems, createDeferredTooltip, createLayoutState, createPoll, 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, safeScriptStringLiteral as inlineScriptLiteral, isAwaitingAnswer, isCustomAccent, isCustomAccentValue, 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, parseMessageTextIncremental, parseStackTrace, partitionQueue, placeCitationMarkers, plainTextFromMarkdown, platformModifierKey, pruneBlocks, quarantineRecord, radiusTokens, readLegacyValue, readVersionedRecord, reasoningTitle, recollapsePastes, reconcileCounts, recoveryEnvelope, recoveryKeyFor, remapCarriedBlocks, resizeFloatingPreview, resizeSplit, resolveAccentPreset, resolveAccentRoles, resolveColors, resolveEffort, resolveFloatingPreviewFrame, 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, treeStickyAncestors, typeaheadIndex, typographyTokens, undoClosePane, undocumentedTokenAliases, useOptionalTheme, useSideRail, useTheme, validateTheme, validateThemeRegistry, variantFromRecord, withAccent, wrapIndex, writeClipboardText, writeVersionedRecord, zIndexTokens };
|
|
211
|
+
export { ANSI_MAX_LINE_LENGTH, ANSI_RETAIN_LINES, APPEARANCE_EDITOR_FONT_AXES, APPEARANCE_EDITOR_FONT_SIZE_MAX, APPEARANCE_EDITOR_FONT_SIZE_MIN, AboutDialog, AccentPicker, AccentSwatchGroups, 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, InputGroupTextarea, InputOtp, InputOtpCaret, Item, ItemDescription, ItemEmpty, ItemGroup, ItemGroupEntry, ItemTitle, Kbd, KbdChord, KbdGroup, Label, LazyTooltip, 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, MessageAction, MessageActions, MessageBody, MessageComposer, MessageContent, MessageCopyAction, MessageDayDivider, MessageFooter, MessageGroup, MessageHeader, MessageRow, MessageScroller, MessageText, ModalDialog, ModelSelector, Motion, NativeSelect, NavigationMenu, NavigationMenuContent, NavigationMenuGroup, NavigationMenuGroupLabel, NavigationMenuItem, NavigationMenuMenu, NavigationMenuSeparator, NavigationMenuTrigger, NavigationMenuViewport, NumberField, OrbitItem, OrbitLayout, PASTE_THRESHOLD_CHARS, PASTE_THRESHOLD_LINES, PASTE_TOKEN_REGEX, 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, PromptInput, PromptInputBody, PromptInputButton, PromptInputControl, PromptInputFooter, PromptInputHeader, PromptInputSubmit, PromptInputTextarea, PromptInputTools, 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, TraceError, TraceLine, TraceMark, TranscriptComposition, Tree, TreeRow, TreeRowActions, TreeStickyHeader, UpdateChannelControl, UpdateDialog, ValueCombobox, VirtualWindow, WORK_STATUS_LABELS, WORK_TRACE_STATUS, 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, clampSplitRatio, clampWindow, classifyFrame, closePane, cn, colorTokens, computeLayoutFrames, confirmationOutcome, contextLabel, contextLevel, contextLevelWord, contextPercent, contextShort, contrastRatio, controlInteractive, controlSize, controlSizeIcon, controlSizes, countChanges, countLeaves, countLines, createAnsiParser, createAppMenuItems, createDeferredTooltip, createLayoutState, createPoll, 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, safeScriptStringLiteral as inlineScriptLiteral, isAwaitingAnswer, isCustomAccent, isCustomAccentValue, 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, parseMessageTextIncremental, parseStackTrace, partitionQueue, placeCitationMarkers, plainTextFromMarkdown, platformModifierKey, pruneBlocks, quarantineRecord, radiusTokens, readLegacyValue, readVersionedRecord, reasoningTitle, recollapsePastes, reconcileCounts, recoveryEnvelope, recoveryKeyFor, remapCarriedBlocks, resizeFloatingPreview, resizeSplit, resolveAccentPreset, resolveAccentRoles, resolveColors, resolveEffort, resolveFloatingPreviewFrame, 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, treeStickyAncestors, typeaheadIndex, typographyTokens, undoClosePane, undocumentedTokenAliases, useOptionalTheme, useSideRail, useTheme, validateTheme, validateThemeRegistry, variantFromRecord, withAccent, wrapIndex, writeClipboardText, writeVersionedRecord, zIndexTokens };
|
package/dist/lib/overlay.d.ts
CHANGED
|
@@ -47,12 +47,12 @@ export declare const overlayDescription = "text-muted-foreground text-sm";
|
|
|
47
47
|
/** The icon-only close in a dialog or sheet's top-end corner. */
|
|
48
48
|
export declare const overlayCornerClose: string;
|
|
49
49
|
/**
|
|
50
|
-
* The tip:
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
* languages.
|
|
50
|
+
* The tip: shadcn's inverted chip, foreground on background, so an explanation
|
|
51
|
+
* never reads as a popover that could hold controls. The side rail draws it
|
|
52
|
+
* flush to a collapsed row and every floating tooltip composes the same fill
|
|
53
|
+
* and type, so a control never explains itself in two visual languages.
|
|
54
54
|
*/
|
|
55
|
-
export declare const tooltipTip = "bg-
|
|
55
|
+
export declare const tooltipTip = "bg-foreground text-background rounded-md text-xs font-medium";
|
|
56
56
|
/**
|
|
57
57
|
* Entrance and exit motion, expressed as data-state classes.
|
|
58
58
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"overlay.d.ts","sourceRoot":"","sources":["../../src/lib/overlay.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,eAAe,CAAA;AAEtD;+EAC+E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AAkC,CAAA;AAEjE,iEAAiE;AACjE,eAAO,MAAM,kBAAkB,QAGkE,CAAA;AAEjG;;;;;GAKG;AACH,eAAO,MAAM,UAAU,iEAAiE,CAAA;AAExF;;;;;;;;GAQG;AACH,eAAO,MAAM,WAAW,QAEkD,CAAA;AAE1E,yDAAyD;AACzD,eAAO,MAAM,aAAa,yMAAuE,CAAA;AAEjG,sEAAsE;AACtE,eAAO,MAAM,aAAa,yMAAuE,CAAA;AAEjG;qCACqC;AACrC,eAAO,MAAM,aAAa,QAE6B,CAAA;AAEvD,+DAA+D;AAC/D,eAAO,MAAM,YAAY,+BAA+B,CAAA;AAExD;;;;;;;;;GASG;AACH,eAAO,MAAM,QAAQ,QAO+D,CAAA;AAEpF,qFAAqF;AACrF,eAAO,MAAM,mBAAmB,kGACiE,CAAA;AAEjG,4CAA4C;AAC5C,eAAO,MAAM,SAAS,mFAC4D,CAAA;AAElF,+EAA+E;AAC/E,eAAO,MAAM,YAAY,0DAA0D,CAAA;AAEnF,oCAAoC;AACpC,eAAO,MAAM,aAAa,8BAA8B,CAAA;AAExD;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc;;8EAYzB,CAAA;AAEF,8CAA8C;AAC9C,MAAM,MAAM,cAAc,GAAG,WAAW,CAAC,YAAY,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;AAErF,iDAAiD;AACjD,eAAO,MAAM,kBAAkB,QAAQ,CAAA;AAEvC;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,aAAa;aAAK,mBAAmB,EAAE,EAAE;CAAW,CAAA;AAEjE;;;;;;;;;;GAUG;AACH,eAAO,MAAM,kBAAkB,8BAA8B,CAAA"}
|
package/dist/lib/overlay.js
CHANGED
|
@@ -48,12 +48,12 @@ var overlayDescription = "text-muted-foreground text-sm";
|
|
|
48
48
|
/** The icon-only close in a dialog or sheet's top-end corner. */
|
|
49
49
|
var overlayCornerClose = "absolute top-3.5 end-3.5 rounded-md p-1 text-muted-foreground transition-colors ease-out hover:bg-surface-hover hover:text-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle outline-none";
|
|
50
50
|
/**
|
|
51
|
-
* The tip:
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
* languages.
|
|
51
|
+
* The tip: shadcn's inverted chip, foreground on background, so an explanation
|
|
52
|
+
* never reads as a popover that could hold controls. The side rail draws it
|
|
53
|
+
* flush to a collapsed row and every floating tooltip composes the same fill
|
|
54
|
+
* and type, so a control never explains itself in two visual languages.
|
|
55
55
|
*/
|
|
56
|
-
var tooltipTip = "bg-
|
|
56
|
+
var tooltipTip = "bg-foreground text-background rounded-md text-xs font-medium";
|
|
57
57
|
/**
|
|
58
58
|
* Entrance and exit motion, expressed as data-state classes.
|
|
59
59
|
*
|
package/dist/lib/overlay.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"overlay.js","names":[],"sources":["../../src/lib/overlay.ts"],"sourcesContent":["/**\n * Shared strings for the overlay layer: dialogs, sheets, menus, popovers,\n * tooltips and the command palette.\n *\n * These live here rather than in each component because the overlay family is\n * where consistency is most visible and least likely to survive duplication.\n * A dialog, a sheet and a dropdown that disagree about their border, radius,\n * motion or shadow read as three different apps, and an app that adopts this\n * library would inherit all three. Declaring the surface once is what makes\n * \"an overlay looks like this\" a fact rather than a convention.\n */\n\nimport { cva, type VariantProps } from '#lib/variants'\n\n/** The panel itself: fill, hairline edge, radius, elevation. Menus, popovers\n * and the command palette float on the elevated overlay rung (`--popover`). */\nexport const overlaySurface =\n 'bg-popover text-popover-foreground rounded-xl border border-border shadow-lg'\n\n/**\n * The modal panel: the same hairline edge, radius and elevation, painted on the\n * *neutral* theme surface instead of the elevated overlay rung.\n *\n * `--popover` is the catalogue's `surfaceElevated`, whose derivation amplifies\n * the canvas hue's chroma on the elevated step. On the dark default's violet\n * canvas that makes the dialog the most chromatic surface in the ladder,\n * `oklch(0.2406 0.0088 300.91)`, red above green in sRGB, and on a full dialog\n * panel that cast reads as a warm tint the canvas never has. shadcn's own\n * convention already splits the two: a Dialog paints `bg-background`, menus and\n * popovers paint `bg-popover`. The veil, the hairline and the elevation shadow\n * carry the separation the lighter fill no longer provides.\n */\nexport const dialogSurface =\n 'bg-background text-foreground rounded-xl border border-border shadow-lg'\n\n/**\n * Overlay titles have one fixed typography role. Keep this small recipe shared\n * without loading the configurable Heading component into every dialog.\n */\nexport const overlayTitle = 'font-semibold text-base tracking-tight leading-none'\n\n/** The span of the portal wrapper that centres a dialog-like overlay. */\nexport const overlayPositioner = 'fixed inset-0 z-(--z-dialog) grid place-items-center p-4'\n\n/** The dimming layer behind a modal overlay. */\nexport const overlayScrim =\n 'fixed inset-0 z-(--z-dialog) bg-scrim/50 supports-[backdrop-filter]:backdrop-blur-xs'\n\n/** The scrim fades; it never zooms with the panel above it. */\nexport const overlayScrimMotion =\n 'data-expanded:animate-in data-expanded:fade-in-0 data-closed:animate-out data-closed:fade-out-0'\n\n/** The title block of a dialog-shaped panel. */\nexport const overlayHeader = 'flex flex-col gap-1.5 text-start'\n\n/** The action row of a dialog-shaped panel: stacked on a phone, trailing on a wider window. */\nexport const overlayFooter = 'flex flex-col-reverse gap-2 sm:flex-row sm:justify-end'\n\n/** The sentence under an overlay title. */\nexport const overlayDescription = 'text-muted-foreground text-sm'\n\n/** The icon-only close in a dialog or sheet's top-end corner. */\nexport const overlayCornerClose =\n 'absolute top-3.5 end-3.5 rounded-md p-1 text-muted-foreground ' +\n 'transition-colors ease-out hover:bg-surface-hover hover:text-foreground ' +\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle outline-none'\n\n/**\n * The tip: the card-toned bubble an explanation shows in. The side rail draws\n * it flush to a collapsed row and every floating tooltip composes the same\n * fill, edge, and type, so a control never explains itself in two visual\n * languages.\n */\nexport const tooltipTip =\n 'bg-card text-card-foreground rounded-md border border-border text-sm font-medium shadow-lg'\n\n/**\n * Entrance and exit motion, expressed as data-state classes.\n *\n * `data-expanded` / `data-closed` are Kobalte's; `data-side-*` come from its\n * popper positioning and let a menu slide in from the edge it is anchored to,\n * which is what makes a dropdown feel attached to its trigger rather than\n * dropped on the screen. Exit motion is shorter than entry, because a\n * dismissal should feel immediate while an arrival benefits from being seen.\n */\nexport const overlayZoom =\n 'data-expanded:animate-in data-expanded:fade-in-0 data-expanded:zoom-in-95 ' +\n 'data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95'\n\n/** `overlayZoom` at the panel's pace: menus, dialogs. */\nexport const overlayMotion = `${overlayZoom} data-expanded:duration-200 data-closed:duration-150`\n\n/** `overlayZoom` at a hint's pace: the tooltip and the hover card. */\nexport const tooltipMotion = `${overlayZoom} data-expanded:duration-150 data-closed:duration-100`\n\n/** Popover-style motion: no zoom, so a panel anchored to a control does not\n * appear to breathe away from it. */\nexport const popoverMotion =\n 'data-expanded:animate-in data-expanded:fade-in-0 data-closed:animate-out data-closed:fade-out-0 ' +\n 'data-expanded:duration-150 data-closed:duration-100'\n\n/** The popper arrow. Sized in the component; coloured here. */\nexport const popoverArrow = 'fill-popover stroke-border'\n\n/**\n * A menu row: the shared height, radius, hover fill and focus treatment for\n * every item inside a menu, listbox or command list.\n *\n * The row sizes and dims the icons a caller puts in it, but not the glyph of\n * its selection indicator (any `[data-slot$=-indicator]`): a descendant `svg`\n * rule outranks a single utility on the glyph, so without the exclusion a\n * radio item's `size-2` dot drew as a 16px muted disc and every check lost the\n * indicator's accent.\n */\nexport const menuItem =\n 'relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none select-none ' +\n 'transition-colors ease-out ' +\n 'data-[highlighted]:bg-surface-hover data-[highlighted]:text-foreground ' +\n 'data-[disabled]:pointer-events-none data-[disabled]:text-muted-foreground ' +\n '[&_svg]:pointer-events-none [&_svg]:shrink-0 ' +\n '[&_svg:not([data-slot$=-indicator]_*)]:size-4 ' +\n '[&_svg:not([class*=text-]):not([data-slot$=-indicator]_*)]:text-muted-foreground'\n\n/** A destructive action keeps readable text and marks its row with a status edge. */\nexport const destructiveMenuItem =\n 'border-s-2 border-destructive ps-1.5 text-foreground data-[highlighted]:bg-destructive-subtle'\n\n/** The label above a group of menu rows. */\nexport const menuLabel =\n 'px-2 py-1.5 text-2xs font-medium tracking-wide text-muted-foreground uppercase'\n\n/** The chord drawn at a row's trailing edge: menus and the command palette. */\nexport const menuShortcut = 'text-muted-foreground ms-auto text-xs tracking-widest'\n\n/** The rule between menu groups. */\nexport const menuSeparator = 'bg-border -mx-1 my-1 h-px'\n\n/**\n * A leading colour swatch on a menu or select row: the sanctioned way to carry\n * a card-tone colour into a list of options. The tones are the system's accent\n * and status roles, the vocabulary a Badge already speaks, so the colour an\n * option shows in a menu is the colour its badge carries on a card, and a\n * caller never passes a raw colour into a list. The dot is `aria-hidden`; the\n * label carries the meaning, so a tone is never the only signal.\n */\nexport const menuSwatchTone = cva('size-2 shrink-0 rounded-full', {\n variants: {\n tone: {\n neutral: 'bg-muted-foreground',\n primary: 'bg-primary',\n success: 'bg-success',\n warning: 'bg-warning',\n destructive: 'bg-destructive',\n info: 'bg-info',\n },\n },\n defaultVariants: { tone: 'neutral' },\n})\n\n/** The tones a menu row's swatch can take. */\nexport type MenuSwatchTone = NonNullable<VariantProps<typeof menuSwatchTone>['tone']>\n\n/** Padding shared by every menu-list surface. */\nexport const menuContentPadding = 'p-1'\n\n/**\n * Marks a floating layer, a menu, a listbox, a popover, as part of the top\n * layer.\n *\n * A modal dialog hides everything outside itself from assistive technology\n * (`aria-hidden` on its siblings) and keeps watching `<body>` for new nodes.\n * A menu or select opened from inside the dialog portals to `<body>`, so the\n * dialog hid it too: the list was on screen, focused, and invisible to a\n * screen reader, and an outside-click check could treat a click on it as a\n * click away from the dialog. Kobalte exempts nodes carrying this attribute\n * from both, so every floating layer carries it.\n */\nexport const topLayerProps = { 'data-kb-top-layer': '' } as const\n\n/**\n * Marks a portal mounted while another modal layer is already open as a layer\n * of its own rather than background.\n *\n * Kobalte's hide-outside observer walks body children added after its layer\n * opened and aria-hides them a frame later, so a non-modal dialog portaled in\n * during that window would land outside the accessibility tree. That observer\n * exempts added nodes carrying the React Aria spelling it ported;\n * `data-kb-top-layer` (`topLayerProps`) is only honoured by a newer layer's\n * initial walk, which must still hide this portal.\n */\nexport const lateLayerAttribute = 'data-react-aria-top-layer'\n"],"mappings":";;;;;;;;;;;;;;;AAgBA,IAAa,iBACX;;;;;;;;;;;;;;AAeF,IAAa,gBACX;;;;;AAMF,IAAa,eAAe;;AAG5B,IAAa,oBAAoB;;AAGjC,IAAa,eACX;;AAGF,IAAa,qBACX;;AAGF,IAAa,gBAAgB;;AAG7B,IAAa,gBAAgB;;AAG7B,IAAa,qBAAqB;;AAGlC,IAAa,qBACX;;;;;;;AAUF,IAAa,aACX;;;;;;;;;;AAWF,IAAa,cACX;;AAIF,IAAa,gBAAgB,GAAG,YAAY;;AAG5C,IAAa,gBAAgB,GAAG,YAAY;;;AAI5C,IAAa,gBACX;;AAIF,IAAa,eAAe;;;;;;;;;;;AAY5B,IAAa,WACX;;AASF,IAAa,sBACX;;AAGF,IAAa,YACX;;AAGF,IAAa,eAAe;;AAG5B,IAAa,gBAAgB;;;;;;;;;AAU7B,IAAa,iBAAiB,IAAI,gCAAgC;CAChE,UAAU,EACR,MAAM;EACJ,SAAS;EACT,SAAS;EACT,SAAS;EACT,SAAS;EACT,aAAa;EACb,MAAM;CACR,EACF;CACA,iBAAiB,EAAE,MAAM,UAAU;AACrC,CAAC;;AAMD,IAAa,qBAAqB;;;;;;;;;;;;;AAclC,IAAa,gBAAgB,EAAE,qBAAqB,GAAG;;;;;;;;;;;;AAavD,IAAa,qBAAqB"}
|
|
1
|
+
{"version":3,"file":"overlay.js","names":[],"sources":["../../src/lib/overlay.ts"],"sourcesContent":["/**\n * Shared strings for the overlay layer: dialogs, sheets, menus, popovers,\n * tooltips and the command palette.\n *\n * These live here rather than in each component because the overlay family is\n * where consistency is most visible and least likely to survive duplication.\n * A dialog, a sheet and a dropdown that disagree about their border, radius,\n * motion or shadow read as three different apps, and an app that adopts this\n * library would inherit all three. Declaring the surface once is what makes\n * \"an overlay looks like this\" a fact rather than a convention.\n */\n\nimport { cva, type VariantProps } from '#lib/variants'\n\n/** The panel itself: fill, hairline edge, radius, elevation. Menus, popovers\n * and the command palette float on the elevated overlay rung (`--popover`). */\nexport const overlaySurface =\n 'bg-popover text-popover-foreground rounded-xl border border-border shadow-lg'\n\n/**\n * The modal panel: the same hairline edge, radius and elevation, painted on the\n * *neutral* theme surface instead of the elevated overlay rung.\n *\n * `--popover` is the catalogue's `surfaceElevated`, whose derivation amplifies\n * the canvas hue's chroma on the elevated step. On the dark default's violet\n * canvas that makes the dialog the most chromatic surface in the ladder,\n * `oklch(0.2406 0.0088 300.91)`, red above green in sRGB, and on a full dialog\n * panel that cast reads as a warm tint the canvas never has. shadcn's own\n * convention already splits the two: a Dialog paints `bg-background`, menus and\n * popovers paint `bg-popover`. The veil, the hairline and the elevation shadow\n * carry the separation the lighter fill no longer provides.\n */\nexport const dialogSurface =\n 'bg-background text-foreground rounded-xl border border-border shadow-lg'\n\n/**\n * Overlay titles have one fixed typography role. Keep this small recipe shared\n * without loading the configurable Heading component into every dialog.\n */\nexport const overlayTitle = 'font-semibold text-base tracking-tight leading-none'\n\n/** The span of the portal wrapper that centres a dialog-like overlay. */\nexport const overlayPositioner = 'fixed inset-0 z-(--z-dialog) grid place-items-center p-4'\n\n/** The dimming layer behind a modal overlay. */\nexport const overlayScrim =\n 'fixed inset-0 z-(--z-dialog) bg-scrim/50 supports-[backdrop-filter]:backdrop-blur-xs'\n\n/** The scrim fades; it never zooms with the panel above it. */\nexport const overlayScrimMotion =\n 'data-expanded:animate-in data-expanded:fade-in-0 data-closed:animate-out data-closed:fade-out-0'\n\n/** The title block of a dialog-shaped panel. */\nexport const overlayHeader = 'flex flex-col gap-1.5 text-start'\n\n/** The action row of a dialog-shaped panel: stacked on a phone, trailing on a wider window. */\nexport const overlayFooter = 'flex flex-col-reverse gap-2 sm:flex-row sm:justify-end'\n\n/** The sentence under an overlay title. */\nexport const overlayDescription = 'text-muted-foreground text-sm'\n\n/** The icon-only close in a dialog or sheet's top-end corner. */\nexport const overlayCornerClose =\n 'absolute top-3.5 end-3.5 rounded-md p-1 text-muted-foreground ' +\n 'transition-colors ease-out hover:bg-surface-hover hover:text-foreground ' +\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle outline-none'\n\n/**\n * The tip: shadcn's inverted chip, foreground on background, so an explanation\n * never reads as a popover that could hold controls. The side rail draws it\n * flush to a collapsed row and every floating tooltip composes the same fill\n * and type, so a control never explains itself in two visual languages.\n */\nexport const tooltipTip = 'bg-foreground text-background rounded-md text-xs font-medium'\n\n/**\n * Entrance and exit motion, expressed as data-state classes.\n *\n * `data-expanded` / `data-closed` are Kobalte's; `data-side-*` come from its\n * popper positioning and let a menu slide in from the edge it is anchored to,\n * which is what makes a dropdown feel attached to its trigger rather than\n * dropped on the screen. Exit motion is shorter than entry, because a\n * dismissal should feel immediate while an arrival benefits from being seen.\n */\nexport const overlayZoom =\n 'data-expanded:animate-in data-expanded:fade-in-0 data-expanded:zoom-in-95 ' +\n 'data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95'\n\n/** `overlayZoom` at the panel's pace: menus, dialogs. */\nexport const overlayMotion = `${overlayZoom} data-expanded:duration-200 data-closed:duration-150`\n\n/** `overlayZoom` at a hint's pace: the tooltip and the hover card. */\nexport const tooltipMotion = `${overlayZoom} data-expanded:duration-150 data-closed:duration-100`\n\n/** Popover-style motion: no zoom, so a panel anchored to a control does not\n * appear to breathe away from it. */\nexport const popoverMotion =\n 'data-expanded:animate-in data-expanded:fade-in-0 data-closed:animate-out data-closed:fade-out-0 ' +\n 'data-expanded:duration-150 data-closed:duration-100'\n\n/** The popper arrow. Sized in the component; coloured here. */\nexport const popoverArrow = 'fill-popover stroke-border'\n\n/**\n * A menu row: the shared height, radius, hover fill and focus treatment for\n * every item inside a menu, listbox or command list.\n *\n * The row sizes and dims the icons a caller puts in it, but not the glyph of\n * its selection indicator (any `[data-slot$=-indicator]`): a descendant `svg`\n * rule outranks a single utility on the glyph, so without the exclusion a\n * radio item's `size-2` dot drew as a 16px muted disc and every check lost the\n * indicator's accent.\n */\nexport const menuItem =\n 'relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none select-none ' +\n 'transition-colors ease-out ' +\n 'data-[highlighted]:bg-surface-hover data-[highlighted]:text-foreground ' +\n 'data-[disabled]:pointer-events-none data-[disabled]:text-muted-foreground ' +\n '[&_svg]:pointer-events-none [&_svg]:shrink-0 ' +\n '[&_svg:not([data-slot$=-indicator]_*)]:size-4 ' +\n '[&_svg:not([class*=text-]):not([data-slot$=-indicator]_*)]:text-muted-foreground'\n\n/** A destructive action keeps readable text and marks its row with a status edge. */\nexport const destructiveMenuItem =\n 'border-s-2 border-destructive ps-1.5 text-foreground data-[highlighted]:bg-destructive-subtle'\n\n/** The label above a group of menu rows. */\nexport const menuLabel =\n 'px-2 py-1.5 text-2xs font-medium tracking-wide text-muted-foreground uppercase'\n\n/** The chord drawn at a row's trailing edge: menus and the command palette. */\nexport const menuShortcut = 'text-muted-foreground ms-auto text-xs tracking-widest'\n\n/** The rule between menu groups. */\nexport const menuSeparator = 'bg-border -mx-1 my-1 h-px'\n\n/**\n * A leading colour swatch on a menu or select row: the sanctioned way to carry\n * a card-tone colour into a list of options. The tones are the system's accent\n * and status roles, the vocabulary a Badge already speaks, so the colour an\n * option shows in a menu is the colour its badge carries on a card, and a\n * caller never passes a raw colour into a list. The dot is `aria-hidden`; the\n * label carries the meaning, so a tone is never the only signal.\n */\nexport const menuSwatchTone = cva('size-2 shrink-0 rounded-full', {\n variants: {\n tone: {\n neutral: 'bg-muted-foreground',\n primary: 'bg-primary',\n success: 'bg-success',\n warning: 'bg-warning',\n destructive: 'bg-destructive',\n info: 'bg-info',\n },\n },\n defaultVariants: { tone: 'neutral' },\n})\n\n/** The tones a menu row's swatch can take. */\nexport type MenuSwatchTone = NonNullable<VariantProps<typeof menuSwatchTone>['tone']>\n\n/** Padding shared by every menu-list surface. */\nexport const menuContentPadding = 'p-1'\n\n/**\n * Marks a floating layer, a menu, a listbox, a popover, as part of the top\n * layer.\n *\n * A modal dialog hides everything outside itself from assistive technology\n * (`aria-hidden` on its siblings) and keeps watching `<body>` for new nodes.\n * A menu or select opened from inside the dialog portals to `<body>`, so the\n * dialog hid it too: the list was on screen, focused, and invisible to a\n * screen reader, and an outside-click check could treat a click on it as a\n * click away from the dialog. Kobalte exempts nodes carrying this attribute\n * from both, so every floating layer carries it.\n */\nexport const topLayerProps = { 'data-kb-top-layer': '' } as const\n\n/**\n * Marks a portal mounted while another modal layer is already open as a layer\n * of its own rather than background.\n *\n * Kobalte's hide-outside observer walks body children added after its layer\n * opened and aria-hides them a frame later, so a non-modal dialog portaled in\n * during that window would land outside the accessibility tree. That observer\n * exempts added nodes carrying the React Aria spelling it ported;\n * `data-kb-top-layer` (`topLayerProps`) is only honoured by a newer layer's\n * initial walk, which must still hide this portal.\n */\nexport const lateLayerAttribute = 'data-react-aria-top-layer'\n"],"mappings":";;;;;;;;;;;;;;;AAgBA,IAAa,iBACX;;;;;;;;;;;;;;AAeF,IAAa,gBACX;;;;;AAMF,IAAa,eAAe;;AAG5B,IAAa,oBAAoB;;AAGjC,IAAa,eACX;;AAGF,IAAa,qBACX;;AAGF,IAAa,gBAAgB;;AAG7B,IAAa,gBAAgB;;AAG7B,IAAa,qBAAqB;;AAGlC,IAAa,qBACX;;;;;;;AAUF,IAAa,aAAa;;;;;;;;;;AAW1B,IAAa,cACX;;AAIF,IAAa,gBAAgB,GAAG,YAAY;;AAG5C,IAAa,gBAAgB,GAAG,YAAY;;;AAI5C,IAAa,gBACX;;AAIF,IAAa,eAAe;;;;;;;;;;;AAY5B,IAAa,WACX;;AASF,IAAa,sBACX;;AAGF,IAAa,YACX;;AAGF,IAAa,eAAe;;AAG5B,IAAa,gBAAgB;;;;;;;;;AAU7B,IAAa,iBAAiB,IAAI,gCAAgC;CAChE,UAAU,EACR,MAAM;EACJ,SAAS;EACT,SAAS;EACT,SAAS;EACT,SAAS;EACT,aAAa;EACb,MAAM;CACR,EACF;CACA,iBAAiB,EAAE,MAAM,UAAU;AACrC,CAAC;;AAMD,IAAa,qBAAqB;;;;;;;;;;;;;AAclC,IAAa,gBAAgB,EAAE,qBAAqB,GAAG;;;;;;;;;;;;AAavD,IAAa,qBAAqB"}
|
package/dist/r/conversation.json
CHANGED
package/dist/r/input-group.json
CHANGED
package/dist/r/message.json
CHANGED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "prompt-input",
|
|
3
|
+
"type": "registry:ui",
|
|
4
|
+
"title": "Prompt Input",
|
|
5
|
+
"description": "",
|
|
6
|
+
"dependencies": [
|
|
7
|
+
"lucide-solid@^1.71.0"
|
|
8
|
+
],
|
|
9
|
+
"registryDependencies": [
|
|
10
|
+
"@adea-ai/ui/action-button",
|
|
11
|
+
"@adea-ai/ui/button",
|
|
12
|
+
"@adea-ai/ui/input-group",
|
|
13
|
+
"@adea-ai/ui/spinner",
|
|
14
|
+
"lib"
|
|
15
|
+
],
|
|
16
|
+
"files": [
|
|
17
|
+
{
|
|
18
|
+
"path": "src/components/composites/prompt-input/index.ts",
|
|
19
|
+
"type": "registry:ui",
|
|
20
|
+
"target": "components/composites/prompt-input/index.ts"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"path": "src/components/composites/prompt-input/prompt-input.tsx",
|
|
24
|
+
"type": "registry:ui",
|
|
25
|
+
"target": "components/composites/prompt-input/prompt-input.tsx"
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
}
|
package/dist/r/registry.json
CHANGED
|
@@ -880,6 +880,7 @@
|
|
|
880
880
|
"dependencies": [],
|
|
881
881
|
"registryDependencies": [
|
|
882
882
|
"@adea-ai/ui/action-button",
|
|
883
|
+
"@adea-ai/ui/button",
|
|
883
884
|
"lib"
|
|
884
885
|
],
|
|
885
886
|
"files": [
|
|
@@ -1047,8 +1048,11 @@
|
|
|
1047
1048
|
"type": "registry:ui",
|
|
1048
1049
|
"title": "Message",
|
|
1049
1050
|
"description": "",
|
|
1050
|
-
"dependencies": [
|
|
1051
|
+
"dependencies": [
|
|
1052
|
+
"lucide-solid@^1.71.0"
|
|
1053
|
+
],
|
|
1051
1054
|
"registryDependencies": [
|
|
1055
|
+
"@adea-ai/ui/action-button",
|
|
1052
1056
|
"@adea-ai/ui/code-block",
|
|
1053
1057
|
"lib"
|
|
1054
1058
|
],
|
|
@@ -2807,10 +2811,10 @@
|
|
|
2807
2811
|
"lucide-solid@^1.71.0"
|
|
2808
2812
|
],
|
|
2809
2813
|
"registryDependencies": [
|
|
2810
|
-
"@adea-ai/ui/button",
|
|
2811
2814
|
"@adea-ai/ui/command",
|
|
2812
2815
|
"@adea-ai/ui/dropdown-menu",
|
|
2813
2816
|
"@adea-ai/ui/popover",
|
|
2817
|
+
"@adea-ai/ui/prompt-input",
|
|
2814
2818
|
"@adea-ai/ui/tabs",
|
|
2815
2819
|
"lib"
|
|
2816
2820
|
],
|
|
@@ -2859,6 +2863,34 @@
|
|
|
2859
2863
|
}
|
|
2860
2864
|
]
|
|
2861
2865
|
},
|
|
2866
|
+
{
|
|
2867
|
+
"name": "prompt-input",
|
|
2868
|
+
"type": "registry:ui",
|
|
2869
|
+
"title": "Prompt Input",
|
|
2870
|
+
"description": "",
|
|
2871
|
+
"dependencies": [
|
|
2872
|
+
"lucide-solid@^1.71.0"
|
|
2873
|
+
],
|
|
2874
|
+
"registryDependencies": [
|
|
2875
|
+
"@adea-ai/ui/action-button",
|
|
2876
|
+
"@adea-ai/ui/button",
|
|
2877
|
+
"@adea-ai/ui/input-group",
|
|
2878
|
+
"@adea-ai/ui/spinner",
|
|
2879
|
+
"lib"
|
|
2880
|
+
],
|
|
2881
|
+
"files": [
|
|
2882
|
+
{
|
|
2883
|
+
"path": "src/components/composites/prompt-input/index.ts",
|
|
2884
|
+
"type": "registry:ui",
|
|
2885
|
+
"target": "components/composites/prompt-input/index.ts"
|
|
2886
|
+
},
|
|
2887
|
+
{
|
|
2888
|
+
"path": "src/components/composites/prompt-input/prompt-input.tsx",
|
|
2889
|
+
"type": "registry:ui",
|
|
2890
|
+
"target": "components/composites/prompt-input/prompt-input.tsx"
|
|
2891
|
+
}
|
|
2892
|
+
]
|
|
2893
|
+
},
|
|
2862
2894
|
{
|
|
2863
2895
|
"name": "queue",
|
|
2864
2896
|
"type": "registry:ui",
|
|
@@ -3392,8 +3424,7 @@
|
|
|
3392
3424
|
"@adea-ai/ui/dropdown-menu",
|
|
3393
3425
|
"@adea-ai/ui/kbd",
|
|
3394
3426
|
"@adea-ai/ui/message",
|
|
3395
|
-
"@adea-ai/ui/
|
|
3396
|
-
"@adea-ai/ui/textarea",
|
|
3427
|
+
"@adea-ai/ui/prompt-input",
|
|
3397
3428
|
"@adea-ai/ui/tooltip",
|
|
3398
3429
|
"lib"
|
|
3399
3430
|
],
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
type JSX,
|
|
15
15
|
} from 'solid-js'
|
|
16
16
|
import { cn } from '../../../lib/utils'
|
|
17
|
-
import {
|
|
17
|
+
import { PromptInputControl } from '../prompt-input'
|
|
18
18
|
import {
|
|
19
19
|
Command,
|
|
20
20
|
CommandEmpty,
|
|
@@ -236,19 +236,21 @@ function triggerText(props: { selected?: ModelOption; value?: string }): string
|
|
|
236
236
|
}
|
|
237
237
|
|
|
238
238
|
function ModelOptionBody(props: { model: ModelOption }) {
|
|
239
|
+
// One line per row: the name, then the reason it is unavailable or its
|
|
240
|
+
// description, muted and truncated; the full text is the row's title.
|
|
241
|
+
const secondary = () => props.model.disabledReason ?? props.model.description
|
|
239
242
|
return (
|
|
240
|
-
<span class="flex min-w-0
|
|
241
|
-
<span class="
|
|
242
|
-
<Show when={
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
</span>
|
|
243
|
+
<span class="flex min-w-0 items-baseline gap-2" title={secondary()}>
|
|
244
|
+
<span class="shrink-0 truncate">{boundText(props.model.label, 60)}</span>
|
|
245
|
+
<Show when={secondary()}>
|
|
246
|
+
{(text) => (
|
|
247
|
+
<span class="min-w-0 truncate text-xs text-muted-foreground">
|
|
248
|
+
<Show when={props.model.disabledReason}>
|
|
249
|
+
<span class="visually-hidden">Unavailable: </span>
|
|
250
|
+
</Show>
|
|
251
|
+
{boundText(text(), 160)}
|
|
252
|
+
</span>
|
|
253
|
+
)}
|
|
252
254
|
</Show>
|
|
253
255
|
</span>
|
|
254
256
|
)
|
|
@@ -291,9 +293,7 @@ function ModelMenu(props: PickerProps) {
|
|
|
291
293
|
gutter={6}
|
|
292
294
|
>
|
|
293
295
|
<DropdownMenuTrigger
|
|
294
|
-
as={
|
|
295
|
-
variant="ghost"
|
|
296
|
-
size="sm"
|
|
296
|
+
as={PromptInputControl}
|
|
297
297
|
aria-label={`Model: ${props.models.length === 0 ? 'No models available' : triggerText(props)}`}
|
|
298
298
|
aria-disabled={inert() || undefined}
|
|
299
299
|
aria-describedby={props.describedBy}
|
|
@@ -354,9 +354,7 @@ function ModelSearch(props: PickerProps) {
|
|
|
354
354
|
gutter={6}
|
|
355
355
|
>
|
|
356
356
|
<PopoverTrigger
|
|
357
|
-
as={
|
|
358
|
-
variant="ghost"
|
|
359
|
-
size="sm"
|
|
357
|
+
as={PromptInputControl}
|
|
360
358
|
aria-label={`Model: ${triggerText(props)}`}
|
|
361
359
|
aria-disabled={props.blocked || undefined}
|
|
362
360
|
aria-describedby={props.describedBy}
|
|
@@ -456,9 +454,7 @@ function ModelTabs(props: PickerProps & { providerIcon?: (provider: string) => J
|
|
|
456
454
|
gutter={6}
|
|
457
455
|
>
|
|
458
456
|
<PopoverTrigger
|
|
459
|
-
as={
|
|
460
|
-
variant="ghost"
|
|
461
|
-
size="sm"
|
|
457
|
+
as={PromptInputControl}
|
|
462
458
|
aria-label={`Model: ${props.models.length === 0 ? 'No models available' : triggerText(props)}`}
|
|
463
459
|
aria-disabled={inert() || undefined}
|
|
464
460
|
aria-describedby={props.describedBy}
|
|
@@ -569,9 +565,7 @@ function EffortMenu(props: {
|
|
|
569
565
|
gutter={6}
|
|
570
566
|
>
|
|
571
567
|
<DropdownMenuTrigger
|
|
572
|
-
as={
|
|
573
|
-
variant="ghost"
|
|
574
|
-
size="sm"
|
|
568
|
+
as={PromptInputControl}
|
|
575
569
|
aria-label={`Thinking effort: ${label() ?? 'not set'}`}
|
|
576
570
|
aria-disabled={props.blocked || undefined}
|
|
577
571
|
aria-describedby={props.describedBy}
|