@kitn.ai/ui 0.21.0 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/chat-thread.d.ts +9 -0
- package/dist/{create-tween-D3Y5qiij.js → create-tween-COnPwAQN.js} +1 -1
- package/dist/{create-tween-DGKY1FDY.js → create-tween-DmTUaXWE.js} +1 -1
- package/dist/{create-tween-paho5Rh-.js → create-tween-qs-jjvNA.js} +1 -1
- package/dist/custom-elements.json +43 -7
- package/dist/elements/agent-card.js +1 -1
- package/dist/elements/artifact.js +1 -1
- package/dist/elements/attachments.js +1 -1
- package/dist/elements/audio-visualizer.js +1 -1
- package/dist/elements/avatar.js +1 -1
- package/dist/elements/badge.js +1 -1
- package/dist/elements/button.js +1 -1
- package/dist/elements/card.js +1 -1
- package/dist/elements/cards.js +1 -1
- package/dist/elements/chain-of-thought.js +1 -1
- package/dist/elements/chat-scope-picker.js +1 -1
- package/dist/elements/chat-workspace.js +1 -1
- package/dist/elements/chat.js +1 -1
- package/dist/elements/checkpoint.js +1 -1
- package/dist/elements/choice.js +1 -1
- package/dist/elements/chunks/{Icon-C-2LvGDG.js → Icon-CHG5z5L7.js} +1 -1
- package/dist/elements/chunks/{action-icons-CaYoImEk.js → action-icons-BAtCEEgg.js} +1 -1
- package/dist/elements/chunks/arrow-left-CFPTeL1Y.js +1 -0
- package/dist/elements/chunks/{artifact-BBIscOxJ.js → artifact-fBZOE4SO.js} +1 -1
- package/dist/elements/chunks/{attachments-BB56zoji.js → attachments-DpYMe5VQ.js} +1 -1
- package/dist/elements/chunks/{audio-visualizer-BxOx4THz.js → audio-visualizer-DFwzAcuL.js} +1 -1
- package/dist/elements/chunks/{badge-SxLSZ19R.js → badge-D6zodm6E.js} +1 -1
- package/dist/elements/chunks/{button-CmkUkz6c.js → button-C42vrGvO.js} +1 -1
- package/dist/elements/chunks/{card-renderer-Db4ffkWv.js → card-renderer-DMZsSuvU.js} +1 -1
- package/dist/elements/chunks/{chat-thread-B3Ks-cKr.js → chat-thread-CNNEhol-.js} +1 -1
- package/dist/elements/chunks/check-7Q3K-iXE.js +1 -0
- package/dist/elements/chunks/chevron-down-CpNYLn7E.js +1 -0
- package/dist/elements/chunks/chevron-right-DrH85Fha.js +1 -0
- package/dist/elements/chunks/{choice-card-Q9cYYDyM.js → choice-card-YoWjpsFV.js} +1 -1
- package/dist/elements/chunks/circle-C9KRjKYv.js +1 -0
- package/dist/elements/chunks/circle-check-Dmi7Y4zw.js +1 -0
- package/dist/elements/chunks/{circle-x-D0MEfxOM.js → circle-x-QIxXda6k.js} +1 -1
- package/dist/elements/chunks/{code-block-C8VzAraE.js → code-block-CqeugReY.js} +1 -1
- package/dist/elements/chunks/{collapsible-Cvj61obE.js → collapsible-sTv-_5lF.js} +1 -1
- package/dist/elements/chunks/{composer-D86ztyL0.js → composer-ldQyeVEB.js} +1 -1
- package/dist/elements/chunks/{confirm-card-BdyDAGLw.js → confirm-card-C0RNOwfn.js} +1 -1
- package/dist/elements/chunks/context-5qgypNHC.js +1 -0
- package/dist/elements/chunks/conversation-list-DLzOacXz.js +1 -0
- package/dist/elements/chunks/{create-tween-C_A_B638.js → create-tween-V4TXZ93X.js} +1 -1
- package/dist/elements/chunks/default-input-DeeRSDHc.js +1 -0
- package/dist/elements/chunks/{define-BzPnNsXg.js → define-lE-QvQFn.js} +1 -1
- package/dist/elements/chunks/{disclosure-DVKsoc1F.js → disclosure-DZSa9jog.js} +1 -1
- package/dist/elements/chunks/{download-BjA54IMJ.js → download-B2ZmnGqW.js} +1 -1
- package/dist/elements/chunks/{dropdown-BjVVHWXH.js → dropdown-R3B7cSRE.js} +1 -1
- package/dist/elements/chunks/{ellipsis-BNedmqfi.js → ellipsis-BmxceY4l.js} +1 -1
- package/dist/elements/chunks/{embed-DQsl4XEq.js → embed-BVrtTZPo.js} +1 -1
- package/dist/elements/chunks/{external-link-Di-dw2CU.js → external-link-BbdR7YO7.js} +1 -1
- package/dist/elements/chunks/{file-text-B3sAODCV.js → file-text-D7dijo1A.js} +1 -1
- package/dist/elements/chunks/{file-tree-Dgto-bMn.js → file-tree-0upJ5jeb.js} +1 -1
- package/dist/elements/chunks/{folder-D6rMadFV.js → folder-D8z58t7B.js} +1 -1
- package/dist/elements/chunks/{form-CILxvhQ7.js → form-p5BKJNw5.js} +1 -1
- package/dist/elements/chunks/{hover-card-BtiF4XiU.js → hover-card-CN9s2md5.js} +1 -1
- package/dist/elements/chunks/{icon-DKkmze3y.js → icon-CNiKP37E.js} +1 -1
- package/dist/elements/chunks/{info-CWRjZkuy.js → info-BSnuJiHI.js} +1 -1
- package/dist/elements/chunks/{input--QJBK6BA.js → input-BauDmzxX.js} +1 -1
- package/dist/elements/chunks/{kbd-C3zuKh8R.js → kbd-BlHJaP9b.js} +1 -1
- package/dist/elements/chunks/{link-BL5JA7Q0.js → link-DEi5iUWC.js} +1 -1
- package/dist/elements/chunks/{link-preview-CU37bbXh.js → link-preview-BaHyM6W4.js} +1 -1
- package/dist/elements/chunks/{loader-XmpyxyRH.js → loader-CmJG_Fkq.js} +1 -1
- package/dist/elements/chunks/{markdown-3Gv5UZ_o.js → markdown-D2jaMpCN.js} +1 -1
- package/dist/elements/chunks/{message-X5NZbq-W.js → message-C5UfXZ2Z.js} +1 -1
- package/dist/elements/chunks/{message-CnBA2OUt.js → message-CXWLmmLn.js} +1 -1
- package/dist/elements/chunks/message-square-hXylwsy0.js +1 -0
- package/dist/elements/chunks/{minimize-2-DwyrUTcM.js → minimize-2-C9ytZFMU.js} +1 -1
- package/dist/elements/chunks/model-switcher-CivGfD7-.js +1 -0
- package/dist/elements/chunks/{overlay-Cepd-KcS.js → overlay-DJL_sbOm.js} +1 -1
- package/dist/elements/chunks/{paperclip-CdwKjrlu.js → paperclip-CFaB8naM.js} +1 -1
- package/dist/elements/chunks/{progress-bar-DMVXBD3b.js → progress-bar-Br5SksfR.js} +1 -1
- package/dist/elements/chunks/{prompt-suggestion-Di_WZE_5.js → prompt-suggestion-CMIvtAhU.js} +1 -1
- package/dist/elements/chunks/{reasoning-D0jMch5u.js → reasoning-DpZcNzLq.js} +1 -1
- package/dist/elements/chunks/{resizable-1znbL1Gv.js → resizable-Q8i3T9a_.js} +1 -1
- package/dist/elements/chunks/{rotate-cw-DVhhgx8n.js → rotate-cw-B5IHCBFV.js} +1 -1
- package/dist/elements/chunks/{scroll-area-Bs4bFS1P.js → scroll-area-eLeydBje.js} +1 -1
- package/dist/elements/chunks/{scroll-button-Bet5NLc4.js → scroll-button-DWbz0yA1.js} +1 -1
- package/dist/elements/chunks/{separator-C5Gh8qGC.js → separator-Xic78AD_.js} +1 -1
- package/dist/elements/chunks/{settings-5vmEFg0K.js → settings-B8H51pAx.js} +1 -1
- package/dist/elements/chunks/{settings-group-BWLB38kz.js → settings-group-CsG9eYLe.js} +1 -1
- package/dist/elements/chunks/{share-BZ3G_DaB.js → share-CNTx0z__.js} +1 -1
- package/dist/elements/chunks/{skeleton-DafPJQTp.js → skeleton-CLlHTcMI.js} +1 -1
- package/dist/elements/chunks/{source-D_qj_6uJ.js → source-BoVcU5ok.js} +1 -1
- package/dist/elements/chunks/{star-Cuv7j2IE.js → star-CxQVTVhI.js} +1 -1
- package/dist/elements/chunks/{store-C1StPHfW.js → store-CLtS5CUG.js} +1 -1
- package/dist/elements/chunks/{tasks-card-EyoBZfpA.js → tasks-card-CzlkLmUt.js} +1 -1
- package/dist/elements/chunks/{text-shimmer-D9gRSh34.js → text-shimmer-D5NhpIQ1.js} +1 -1
- package/dist/elements/chunks/{textarea-DuhtHfcm.js → textarea-x5Uxsmtm.js} +1 -1
- package/dist/elements/chunks/{thumbs-up-B9hwv43w.js → thumbs-up-UobcJnx9.js} +1 -1
- package/dist/elements/chunks/{toast-store-Bm3DUEDe.js → toast-store-BOfs9eXq.js} +1 -1
- package/dist/elements/chunks/{tool-CDtW7L0z.js → tool-Be6Dh_dt.js} +1 -1
- package/dist/elements/chunks/{tooltip-eB226mGK.js → tooltip-RxMxyCLF.js} +1 -1
- package/dist/elements/chunks/{triangle-alert-C1SNzTqK.js → triangle-alert-C4yxH2XN.js} +1 -1
- package/dist/elements/chunks/{use-card-resolution-YZh2MvI5.js → use-card-resolution-jva9ehH6.js} +1 -1
- package/dist/elements/chunks/{variant-aurora-Cj1F7D0l.js → variant-aurora-Dx4VRcjS.js} +1 -1
- package/dist/elements/chunks/{variant-custom-T9gpt7QE.js → variant-custom-Y1ZTWgEa.js} +1 -1
- package/dist/elements/chunks/{variant-wave-CxU9z-TE.js → variant-wave-B9gml9Cg.js} +1 -1
- package/dist/elements/chunks/{video-CK4R7Rus.js → video-CrPHsytT.js} +1 -1
- package/dist/elements/chunks/x-_-OPHept.js +1 -0
- package/dist/elements/coachmark.js +1 -1
- package/dist/elements/code-block.js +1 -1
- package/dist/elements/command.js +1 -1
- package/dist/elements/compare.js +1 -1
- package/dist/elements/composer.js +1 -1
- package/dist/elements/confirm-card.js +1 -1
- package/dist/elements/context-meter.js +1 -1
- package/dist/elements/conversation-list.js +1 -1
- package/dist/elements/default-input.d.ts +27 -0
- package/dist/elements/dialog.js +1 -1
- package/dist/elements/editable-label.js +1 -1
- package/dist/elements/embed.js +1 -1
- package/dist/elements/empty.js +1 -1
- package/dist/elements/feedback-bar.js +1 -1
- package/dist/elements/file-tree.js +1 -1
- package/dist/elements/file-upload.js +1 -1
- package/dist/elements/form.js +1 -1
- package/dist/elements/hover-card.js +1 -1
- package/dist/elements/icon.js +1 -1
- package/dist/elements/image.js +1 -1
- package/dist/elements/input.js +1 -1
- package/dist/elements/kbd.js +1 -1
- package/dist/elements/link-preview.js +1 -1
- package/dist/elements/loader.js +1 -1
- package/dist/elements/markdown.js +1 -1
- package/dist/elements/menu.js +1 -1
- package/dist/elements/message-skills.js +1 -1
- package/dist/elements/message.js +1 -1
- package/dist/elements/model-switcher.js +1 -1
- package/dist/elements/nav.js +1 -1
- package/dist/elements/notice.js +1 -1
- package/dist/elements/pane-group.js +1 -1
- package/dist/elements/pane.js +1 -1
- package/dist/elements/popover.js +1 -1
- package/dist/elements/progress-bar.js +1 -1
- package/dist/elements/prompt-dock.js +1 -1
- package/dist/elements/prompt-input.js +1 -1
- package/dist/elements/prompt-suggestions.js +1 -1
- package/dist/elements/reasoning.js +1 -1
- package/dist/elements/remote.js +1 -1
- package/dist/elements/resizable.js +1 -1
- package/dist/elements/response-stream.js +2 -2
- package/dist/elements/screen.js +1 -1
- package/dist/elements/scroll-area.js +1 -1
- package/dist/elements/scroll-button.js +1 -1
- package/dist/elements/search.js +1 -1
- package/dist/elements/segmented.js +1 -1
- package/dist/elements/separator.js +1 -1
- package/dist/elements/setting-item.js +1 -1
- package/dist/elements/settings-group.js +1 -1
- package/dist/elements/skeleton.js +1 -1
- package/dist/elements/slot-text.d.ts +51 -0
- package/dist/elements/slots.d.ts +5 -0
- package/dist/elements/source.js +1 -1
- package/dist/elements/status.js +1 -1
- package/dist/elements/switch.js +1 -1
- package/dist/elements/tabs.js +1 -1
- package/dist/elements/tasks.js +1 -1
- package/dist/elements/text-shimmer.js +1 -1
- package/dist/elements/thinking-bar.js +1 -1
- package/dist/elements/thread.js +1 -1
- package/dist/elements/toast.js +1 -1
- package/dist/elements/tool.js +1 -1
- package/dist/elements/tooltip.js +1 -1
- package/dist/elements/voice-input.js +1 -1
- package/dist/elements/voice-output.js +1 -1
- package/dist/elements.d.ts +12 -6
- package/dist/index.js +1535 -1487
- package/dist/index.server.js +2330 -2296
- package/dist/kai.es.js +1 -1
- package/dist/llms/llms-full.txt +12 -3
- package/dist/mcp.es.js +809 -75
- package/dist/react/index.d.ts +13 -3
- package/dist/react.js +14 -14
- package/dist/register-impl-AxIlqjo7.js +145 -0
- package/dist/{solid-BCJUQqwS.js → solid-BGYSJyHG.js} +4901 -4691
- package/dist/{solid-BdENBcEq.js → solid-Dt2nEwfl.js} +4406 -4320
- package/dist/solid.js +1 -1
- package/dist/solid.server.js +1 -1
- package/dist/{variant-aurora-DOb_o4pC.js → variant-aurora-B44X69AG.js} +1 -1
- package/dist/{variant-aurora-BKHHiOgL.js → variant-aurora-BRhV8Flk.js} +2 -2
- package/dist/{variant-aurora-1wMcXRUS.js → variant-aurora-Ds5ou9BH.js} +2 -2
- package/dist/{variant-custom-DWSSgmd2.js → variant-custom-B20FhtYj.js} +2 -2
- package/dist/{variant-custom-CJGB0Kbw.js → variant-custom-BvA1Schl.js} +1 -1
- package/dist/{variant-custom-Co0CkXJF.js → variant-custom-D6Rtvneb.js} +2 -2
- package/dist/{variant-wave-CEODq-9q.js → variant-wave-BUQtkryq.js} +1 -1
- package/dist/{variant-wave-C3-45cL6.js → variant-wave-BVYnqy9L.js} +2 -2
- package/dist/{variant-wave-jdXBnCUZ.js → variant-wave-DXC6_LcH.js} +2 -2
- package/dist/wire/encode.d.ts +79 -6
- package/dist/wire/files.d.ts +116 -0
- package/dist/wire/index.d.ts +3 -1
- package/dist/wire/media-types.d.ts +106 -0
- package/dist/wire.js +596 -368
- package/frameworks/react/index.tsx +9 -5
- package/llms-full.txt +12 -3
- package/package.json +2 -1
- package/src/agent-tooling/archetypes.ts +43 -12
- package/src/agent-tooling/integrations/anthropic.ts +29 -5
- package/src/agent-tooling/integrations/cloudflare.ts +5 -0
- package/src/agent-tooling/integrations/langgraph.ts +13 -0
- package/src/agent-tooling/integrations/mastra.ts +46 -5
- package/src/agent-tooling/integrations/mock.ts +4 -0
- package/src/agent-tooling/integrations/ollama.ts +7 -0
- package/src/agent-tooling/integrations/openai.ts +2 -0
- package/src/agent-tooling/integrations/openrouter.ts +2 -0
- package/src/agent-tooling/integrations/pi.ts +26 -1
- package/src/agent-tooling/integrations/pydantic-ai.ts +37 -3
- package/src/agent-tooling/integrations/vercel-ai-sdk.ts +42 -6
- package/src/agent-tooling/mcp/tools/scaffold.ts +853 -32
- package/src/agent-tooling/registry.ts +57 -0
- package/src/agent-tooling/types.ts +132 -0
- package/src/components/chat-thread.tsx +10 -1
- package/src/components/context.tsx +18 -12
- package/src/components/conversation-item.tsx +6 -0
- package/src/components/model-switcher.tsx +38 -8
- package/src/components/toast.tsx +6 -1
- package/src/elements/button.tsx +26 -3
- package/src/elements/chat.tsx +28 -2
- package/src/elements/default-input.tsx +128 -5
- package/src/elements/element-meta.json +30 -4
- package/src/elements/element-types.d.ts +12 -6
- package/src/elements/menu.tsx +30 -3
- package/src/elements/slot-text.ts +73 -0
- package/src/elements/slots.ts +10 -0
- package/src/index.ts +9 -5
- package/src/wire/encode.ts +229 -14
- package/src/wire/files.ts +342 -0
- package/src/wire/index.ts +21 -0
- package/src/wire/media-types.ts +344 -0
- package/dist/elements/chunks/arrow-left-Bb46H7w9.js +0 -1
- package/dist/elements/chunks/check-C8desc_h.js +0 -1
- package/dist/elements/chunks/chevron-down-DKtc2HNB.js +0 -1
- package/dist/elements/chunks/chevron-right-Dw4GPhwL.js +0 -1
- package/dist/elements/chunks/circle-BeokBsvB.js +0 -1
- package/dist/elements/chunks/circle-check-wJSqt859.js +0 -1
- package/dist/elements/chunks/context-WHDl-xSx.js +0 -1
- package/dist/elements/chunks/conversation-list-CdR14_Y4.js +0 -1
- package/dist/elements/chunks/default-input-CSZqUM81.js +0 -1
- package/dist/elements/chunks/message-square-CnpAm_P0.js +0 -1
- package/dist/elements/chunks/model-switcher-CclaJEHt.js +0 -1
- package/dist/elements/chunks/x-D1qx0aLd.js +0 -1
- package/dist/register-impl-bzrZ44ft.js +0 -145
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { Accessor } from 'solid-js';
|
|
2
|
+
/**
|
|
3
|
+
* Track whether a `<slot>` is projecting VISIBLE TEXT, so a facade can tell
|
|
4
|
+
* "this control shows its own name" from "this control is icon-only and needs
|
|
5
|
+
* one".
|
|
6
|
+
*
|
|
7
|
+
* WHY IT EXISTS. Slotted light-DOM text is part of the flattened tree, so it
|
|
8
|
+
* names the shadow `<button>` all by itself — measured, not assumed:
|
|
9
|
+
* `scripts/probe-button-accessible-name.mjs` reads chromium's AX tree and
|
|
10
|
+
* `<kai-button>Save</kai-button>` computes the name "Save" from `contents`,
|
|
11
|
+
* with no `aria-label` anywhere. An `aria-label` on top of that does not add a
|
|
12
|
+
* name, it REPLACES one, and a replacement that disagrees with the visible text
|
|
13
|
+
* is a WCAG 2.5.3 (Label in Name) failure: speech-input users say what they
|
|
14
|
+
* see, so a button reading "Save" whose accessible name is "Submit" cannot be
|
|
15
|
+
* activated by voice at all. `kai-checkpoint` already resolved this the same
|
|
16
|
+
* way; this is the reusable form of that decision.
|
|
17
|
+
*
|
|
18
|
+
* WHY A SIGNAL AND NOT A ONE-OFF READ. The facade renders while the HTML parser
|
|
19
|
+
* is still inside the element's own tag, so the light DOM is usually EMPTY at
|
|
20
|
+
* that moment and any synchronous read of `element.childNodes` reports "no text"
|
|
21
|
+
* for the most common case there is. `slotchange` is the event that tells the
|
|
22
|
+
* truth, and it fires on the initial assignment too.
|
|
23
|
+
*
|
|
24
|
+
* The initial value is therefore `false`, meaning "assume icon-only", which
|
|
25
|
+
* makes the pre-`slotchange` frame emit the `aria-label`. That direction is
|
|
26
|
+
* deliberate: an overridden name is a defect, an ABSENT name is a worse one, so
|
|
27
|
+
* the transient state is the named one. `slotchange` is queued as a mutation
|
|
28
|
+
* observer microtask, so it lands before paint and no assistive technology
|
|
29
|
+
* observes the transient.
|
|
30
|
+
*/
|
|
31
|
+
export declare function createSlotText(options?: {
|
|
32
|
+
/**
|
|
33
|
+
* Follow `assignedNodes({ flatten: true })`, which descends into nested
|
|
34
|
+
* light-DOM `<slot>` elements (a consumer wrapping the element in their OWN
|
|
35
|
+
* component and forwarding a slot) — and, when nothing is assigned, returns
|
|
36
|
+
* the slot's FALLBACK content.
|
|
37
|
+
*
|
|
38
|
+
* Only safe on a slot whose fallback is exactly the visible label. Do NOT set
|
|
39
|
+
* it on a slot whose fallback can render a non-name (an icon that happens to
|
|
40
|
+
* be plain text, say): the fallback would count as visible text and suppress
|
|
41
|
+
* the very `aria-label` that names the control. `kai-button`'s default slot
|
|
42
|
+
* has no fallback at all, so flatten there only buys the nested case;
|
|
43
|
+
* `kai-menu`'s trigger slot falls back to an icon, so it must not use it.
|
|
44
|
+
*/
|
|
45
|
+
flatten?: boolean;
|
|
46
|
+
}): {
|
|
47
|
+
/** Whether the slot is currently showing text. */
|
|
48
|
+
hasText: Accessor<boolean>;
|
|
49
|
+
/** `ref` for the `<slot>`. Re-reads on every `slotchange`. */
|
|
50
|
+
ref: (slot: HTMLSlotElement) => void;
|
|
51
|
+
};
|
package/dist/elements/slots.d.ts
CHANGED
|
@@ -111,6 +111,11 @@ export declare const COACHMARK_SLOTS: SlotDef[];
|
|
|
111
111
|
export declare const COACHMARK_PARTS: PartDef[];
|
|
112
112
|
/** Styleable `::part`s of `<kai-progress-bar>`. */
|
|
113
113
|
export declare const PROGRESS_BAR_PARTS: PartDef[];
|
|
114
|
+
/** Styleable `::part`s of `<kai-context>`. The usage meter is the same shared
|
|
115
|
+
* ProgressBar `<kai-progress-bar>` renders, mounted inside this element's own
|
|
116
|
+
* shadow root, so `kai-context` exposes the same two names. Both sit inside the
|
|
117
|
+
* hover-card breakdown and are in the DOM only while that card is open. */
|
|
118
|
+
export declare const CONTEXT_PARTS: PartDef[];
|
|
114
119
|
/** Styleable `::part`s of `<kai-file-tree>` — the changed-files / diff bits, shown
|
|
115
120
|
* only when a file carries diff metadata (or the `summary` attribute is set). */
|
|
116
121
|
export declare const FILE_TREE_PARTS: PartDef[];
|
package/dist/elements/source.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as o,c as t,S as v,g as p,o as w,h as m,F,j as A,t as S}from"./chunks/define-
|
|
1
|
+
import{f as o,c as t,S as v,g as p,o as w,h as m,F,j as A,t as S}from"./chunks/define-lE-QvQFn.js";import{a,b as c,c as l,S as k}from"./chunks/source-BoVcU5ok.js";var y=S("<style>:host{display:inline-flex}");o("kai-source",{href:"",label:void 0,headline:"",description:"",showFavicon:!1},(e,{flag:n})=>[y(),t(v,{get when(){return e.href},get children(){return t(a,{get href(){return e.href},get children(){return[t(c,{get label(){return e.label},get showFavicon(){return n("showFavicon")}}),t(l,{get title(){return e.headline??""},get description(){return e.description??""}})]}})}})]);function u(e){return{href:e.getAttribute("href")??"",label:e.getAttribute("label")??void 0,title:e.getAttribute("headline")??void 0,description:e.getAttribute("description")??void 0,showFavicon:e.hasAttribute("show-favicon")&&e.getAttribute("show-favicon")!=="false"}}o("kai-sources",{sources:[],showFavicon:!1,numbered:!1},(e,{element:n,flag:s})=>{const[h,d]=p([]);w(()=>{const r=()=>{const f=[...n.querySelectorAll("kai-source")];d(f.map(u))};r();const i=new MutationObserver(r);i.observe(n,{childList:!0,attributes:!0,subtree:!0}),m(()=>i.disconnect())});const g=()=>[...e.sources??[],...h()],b=()=>s("numbered");return t(k,{get children(){return t(F,{get each(){return g()},children:(r,i)=>t(a,{get href(){return r.href},get children(){return[t(c,{get label(){return A(()=>!!b())()?i()+1:r.label},get showFavicon(){return r.showFavicon??s("showFavicon")}}),t(l,{get title(){return r.title??""},get description(){return r.description??""}})]}})})}})});export{u as parseKaiSourceElement};
|
package/dist/elements/status.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as h,i as w,c as g,a as m,b as p,S as z,q as y,m as x,d as l,t as r,f as k}from"./chunks/define-
|
|
1
|
+
import{s as h,i as w,c as g,a as m,b as p,S as z,q as y,m as x,d as l,t as r,f as k}from"./chunks/define-lE-QvQFn.js";import{c as i}from"./chunks/cn-CU7UAWzk.js";var C=r("<span aria-hidden=true>"),S=r("<span><span>");const v={new:"bg-tool-blue",online:"bg-tool-green",busy:"bg-tool-red",away:"bg-tool-amber",offline:"bg-muted-foreground"},q={sm:"size-2",md:"size-2.5"};function A(t){const[s,c]=h(t,["status","size","pulse","label","class"]),n=()=>s.status??"new";return(()=>{var a=S(),o=a.firstChild;return w(a,g(z,{get when(){return s.pulse},get children(){var e=C();return m(()=>p(e,i("absolute inline-flex h-full w-full animate-ping rounded-full opacity-75 motion-reduce:hidden",v[n()]))),e}}),o),y(o,x(c,{get class(){return i("relative inline-block rounded-full",v[n()],q[s.size??"sm"])}}),!1,!1),m(e=>{var u=i("relative inline-flex",s.class),d=s.label?"status":void 0,b=s.label,f=s.label?void 0:"true";return u!==e.e&&p(a,e.e=u),d!==e.t&&l(a,"role",e.t=d),b!==e.a&&l(a,"aria-label",e.a=b),f!==e.o&&l(a,"aria-hidden",e.o=f),e},{e:void 0,t:void 0,a:void 0,o:void 0}),a})()}var _=r("<style>:host{display:inline-flex}");k("kai-status",{status:"new",pulse:!1,label:void 0,size:"sm"},(t,{flag:s})=>[_(),g(A,{get status(){return t.status??"new"},get size(){return t.size??"sm"},get pulse(){return s("pulse")},get label(){return t.label},part:"dot"})]);
|
package/dist/elements/switch.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as p,j as m,a as b,d as v,
|
|
1
|
+
import{g as p,j as m,a as b,d as v,v as C,b as w,t as y,e as A,f as $,B as f,k as R,c as j}from"./chunks/define-lE-QvQFn.js";import{c as x}from"./chunks/cn-CU7UAWzk.js";var E=y("<button type=button role=switch><span>"),q=y('<input type=checkbox aria-hidden=true tabindex=-1 style="position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap">');function O(i){const[h,d]=p(i.defaultChecked??!1),c=()=>i.checked!==void 0,n=()=>c()?!!i.checked:h(),u=()=>{var e;if(i.disabled)return;const o=!n();c()||d(o),(e=i.onChange)==null||e.call(i,o)};return[m(()=>m(()=>i.name!=null)()&&(()=>{var e=q();return e.addEventListener("change",()=>{}),b(o=>{var l=i.name,t=i.disabled;return l!==o.e&&v(e,"name",o.e=l),t!==o.t&&(e.disabled=o.t=t),o},{e:void 0,t:void 0}),b(()=>e.value=i.value??"on"),b(()=>e.checked=n()),e})()),(()=>{var e=E(),o=e.firstChild;e.$$keydown=t=>{(t.key===" "||t.key==="Enter")&&(t.preventDefault(),u())},e.$$click=u;var l=i.buttonRef;return typeof l=="function"?C(l,e):i.buttonRef=e,b(t=>{var r=n(),a=i.label,s=i.disabled,g=x("relative inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","disabled:cursor-not-allowed disabled:opacity-50",n()?"bg-primary":"bg-muted",i.class),k=x("inline-block h-4 w-4 rounded-full shadow transition-transform",n()?"translate-x-[1.125rem] bg-primary-foreground":"translate-x-0.5 bg-white");return r!==t.e&&v(e,"aria-checked",t.e=r),a!==t.t&&v(e,"aria-label",t.t=a),s!==t.a&&(e.disabled=t.a=s),g!==t.o&&w(e,t.o=g),k!==t.i&&w(o,t.i=k),t},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),e})()]}A(["click","keydown"]),$("kai-switch",{checked:void 0,defaultChecked:void 0,disabled:void 0,label:void 0,name:void 0,value:void 0},(i,h)=>{const{element:d,dispatch:c,flag:n,expose:u}=h,[e,o]=p(n("defaultChecked")||n("checked")),l=r=>r===!0?!0:r===!1?!1:d.hasAttribute("checked")&&d.getAttribute("checked")!=="false",t=r=>{n("disabled")||f(e)!==r&&(o(r),c("kai-change",{checked:r}))};return Object.defineProperty(d,"checked",{get:()=>e(),set:r=>{const a=l(r);f(e)!==a&&o(a)},configurable:!0,enumerable:!0}),R(()=>{const r=e();r!==d.hasAttribute("checked")&&d.toggleAttribute("checked",r)}),u({toggle:()=>t(!f(e)),focus:r=>{var a,s;return(s=(a=d.shadowRoot)==null?void 0:a.querySelector('button[role="switch"]'))==null?void 0:s.focus(r)}}),j(O,{get checked(){return e()},get disabled(){return n("disabled")},get label(){return i.label},get name(){return i.name},get value(){return i.value},onChange:r=>t(r)})});
|
package/dist/elements/tabs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as E,
|
|
1
|
+
import{s as E,v as C,q as V,m as j,i as k,c as D,a as z,d as x,b as F,F as H,t as q,e as I,f as L,g as R}from"./chunks/define-lE-QvQFn.js";import{r as S}from"./chunks/icon-CNiKP37E.js";import{c as h}from"./chunks/cn-CU7UAWzk.js";var B=q("<div>"),K=q("<button type=button part=tab role=tab>");const N={segmented:"inline-flex items-center gap-1 rounded-lg bg-muted p-1",underline:"inline-flex items-center gap-1 border-b border-border"};function P(l,a){const s="inline-flex items-center gap-1.5 whitespace-nowrap text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50";return l==="underline"?h(s,"border-b-2 px-3 py-2 -mb-px",a?"border-primary text-foreground":"border-transparent text-muted-foreground hover:text-foreground"):h(s,"rounded-md px-3 py-1.5",a?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground")}function T(l){const[a,s]=E(l,["items","value","variant","block","disabled","onChange","ref","class"]),b=()=>a.items??[],v=()=>a.variant??"segmented",f={},u=()=>b().filter(t=>!t.disabled),o=()=>a.value,c=()=>{var t;return o()!==void 0&&u().some(r=>r.id===o())?o():(t=u()[0])==null?void 0:t.id},n=t=>{var r;a.disabled||t.disabled||t.id!==a.value&&((r=a.onChange)==null||r.call(a,t.id))},g=t=>{const r=f[t];r&&r.focus()},m=(t,r)=>{const i=u();if(i.length===0)return;const d=i.findIndex(p=>p.id===r.id);let e;switch(t.key){case"ArrowRight":case"ArrowDown":e=i[(d+1)%i.length];break;case"ArrowLeft":case"ArrowUp":e=i[(d-1+i.length)%i.length];break;case"Home":e=i[0];break;case"End":e=i[i.length-1];break;case"Enter":case" ":t.preventDefault(),n(r);return;default:return}e&&(t.preventDefault(),n(e),g(e.id))};return(()=>{var t=B();return C(r=>{var i;return(i=a.ref)==null?void 0:i.call(a,r)},t),V(t,j(s,{role:"tablist",part:"tablist",get"aria-disabled"(){return a.disabled?"true":void 0},get class(){return h(N[v()],a.block&&"flex w-full",a.class)}}),!1,!0),k(t,D(H,{get each(){return b()},children:r=>{const i=()=>r.id===o();return(()=>{var d=K();return d.$$keydown=e=>m(e,r),d.$$click=()=>n(r),C(e=>{f[r.id]=e},d),k(d,()=>S(r.icon,{class:"size-4 shrink-0"}),null),k(d,()=>r.label,null),z(e=>{var p=i()?"":void 0,w=i()?"true":"false",y=r.id===c()?0:-1,A=a.disabled||r.disabled,$=h(P(v(),i()),a.block&&"flex-1 justify-center");return p!==e.e&&x(d,"data-active",e.e=p),w!==e.t&&x(d,"aria-selected",e.t=w),y!==e.a&&x(d,"tabindex",e.a=y),A!==e.o&&(d.disabled=e.o=A),$!==e.i&&F(d,e.i=$),e},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),d})()}})),t})()}I(["click","keydown"]),L("kai-tabs",{items:void 0,value:void 0,defaultValue:void 0,variant:"segmented",block:void 0,disabled:void 0},(l,{dispatch:a,flag:s,expose:b})=>{const[v,f]=R(l.defaultValue),u=()=>l.value??v(),o=n=>{f(n),a("kai-tab-change",{value:n})};let c;return b({select:n=>{var g;const m=(g=l.items)==null?void 0:g.find(t=>t.id===n);!m||m.disabled||s("disabled")||o(n)},focus:()=>{var n;(n=c?.querySelector('[role="tab"][tabindex="0"]:not([disabled])'))==null||n.focus()}}),D(T,{get items(){return l.items},get value(){return u()},get variant(){return l.variant??"segmented"},get block(){return s("block")},get disabled(){return s("disabled")},onChange:o,ref:n=>c=n})});
|
package/dist/elements/tasks.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as i,c as u}from"./chunks/define-
|
|
1
|
+
import{f as i,c as u}from"./chunks/define-lE-QvQFn.js";import{T as s}from"./chunks/tasks-card-CzlkLmUt.js";i("kai-tasks",{data:void 0,cardId:void 0,heading:void 0,resolution:void 0,value:void 0,defaultValue:void 0,disabled:!1,readonly:!1},(a,{element:t,dispatch:o,flag:d,expose:r})=>{let e;return r({select:l=>e?.select(l),toggle:(l,n)=>e?.toggle(l,n),send:()=>e?.send(),focus:l=>e?.focus(l),dismiss:()=>e?.dismiss(),reopen:()=>e?.reopen()}),u(s,{get data(){return a.data},get cardId(){return a.cardId??(t.id||"kai-tasks")},get heading(){return a.heading},get resolution(){return a.resolution},get value(){return a.value},get defaultValue(){return a.defaultValue},get disabled(){return d("disabled")},get readonly(){return d("readonly")},onValueChange:l=>o("kai-value-change",l),controllerRef:l=>e=l,hostElement:t})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as r,c as a}from"./chunks/define-
|
|
1
|
+
import{f as r,c as a}from"./chunks/define-lE-QvQFn.js";import{T as e}from"./chunks/text-shimmer-D5NhpIQ1.js";r("kai-text-shimmer",{text:"",as:"span",duration:4,spread:20},t=>a(e,{get as(){return t.as},get duration(){return t.duration},get spread(){return t.spread},class:"text-body",get children(){return t.text}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as p,i as o,c as r,H as i,S as u,a as m,b,t as l,e as f,f as g}from"./chunks/define-
|
|
1
|
+
import{s as p,i as o,c as r,H as i,S as u,a as m,b,t as l,e as f,f as g}from"./chunks/define-lE-QvQFn.js";import{c as x}from"./chunks/cn-CU7UAWzk.js";import{T as c}from"./chunks/text-shimmer-D5NhpIQ1.js";import{c as h}from"./chunks/chevron-right-DrH85Fha.js";var k=l('<button type=button class="flex items-center gap-1 text-sm transition-opacity hover:opacity-80">'),v=l('<button type=button class="text-muted-foreground hover:text-foreground border-muted-foreground/50 hover:border-foreground border-b border-dotted text-sm transition-colors">'),w=l("<div>");function y(n){const[t]=p(n,["class","text","onStop","stopLabel","onClick"]),s=()=>t.text??"Thinking",d=()=>t.stopLabel??"Answer now";return(()=>{var a=w();return o(a,r(u,{get when(){return t.onClick},get fallback(){return r(c,{class:"cursor-default text-sm font-medium",get children(){return s()}})},get children(){var e=k();return i(e,"click",t.onClick,!0),o(e,r(c,{class:"text-sm font-medium",get children(){return s()}}),null),o(e,r(h,{class:"text-muted-foreground size-4"}),null),e}}),null),o(a,r(u,{get when(){return t.onStop},get children(){var e=v();return i(e,"click",t.onStop,!0),o(e,d),e}}),null),m(()=>b(a,x("flex w-full items-center justify-between",t.class))),a})()}f(["click"]),g("kai-thinking-bar",{text:"Thinking",stoppable:!1,stopLabel:"Answer now"},(n,{dispatch:t,flag:s})=>r(y,{get text(){return n.text},get stopLabel(){return n.stopLabel},get onStop(){return s("stoppable")?()=>t("kai-stop"):void 0}}));
|
package/dist/elements/thread.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{y as B,l as M,o as w,c as r,
|
|
1
|
+
import{y as B,l as M,o as w,c as r,v as R,i as h,S as o,F as H,a as T,b as k,C as z,t as c,f as $,g as A,h as j,j as C,u as F}from"./chunks/define-lE-QvQFn.js";import{r as L,T as q}from"./chunks/slots-CIw9RlAe.js";import{C as N,a as O,b as U,S as _}from"./chunks/scroll-button-DWbz0yA1.js";import{M as D,a as x,b as E}from"./chunks/message-C5UfXZ2Z.js";import{b as G,c as I,a as J}from"./chunks/message-CXWLmmLn.js";import{L as K}from"./chunks/loader-CmJG_Fkq.js";var P=c('<div class="flex min-h-[10rem] flex-1 flex-col items-center justify-center gap-1 py-12 text-center"><p class="text-sm font-medium text-foreground">No messages yet</p><p class="text-xs text-muted-foreground">Messages will appear here as the conversation starts.'),Q=c('<div class="rounded-lg px-1 py-2">'),V=c('<div class="absolute bottom-4 left-1/2 flex w-full max-w-3xl -translate-x-1/2 justify-center px-5">'),S=c("<div>");function W(){return P()}function X(e){const d=B(),m=()=>e.actionsReveal==="hover"?"hover":"always";let n;const i=G({emit:a=>{var t;return(t=e.onMessageAction)==null?void 0:t.call(e,a)},target:()=>n}),g=()=>e.scrollButton!==!1,p=()=>e.messages.length===0&&!e.loading,v=M(()=>e.messages.map(a=>a.id));return w(()=>{var a;(a=e.controllerRef)==null||a.call(e,{scrollToBottom:t=>{const l=n?.querySelector(".overflow-y-auto");l?.scrollTo({top:l.scrollHeight,behavior:t??"smooth"})}})}),r(z,{get proseSize(){return e.proseSize},get codeTheme(){return e.codeTheme},get codeHighlight(){return e.codeHighlight!==!1},get portalMount(){return d.portalMount()},get children(){var a=S();return R(t=>n=t,a),h(a,r(N,{class:"h-full px-4 py-3",get children(){return[r(O,{class:"mx-auto w-full max-w-3xl space-y-4",get children(){return[r(o,{get when(){return p()},get children(){return r(o,{get when(){return e.empty},get fallback(){return r(W,{})},get children(){return e.empty}})}}),r(H,{get each(){return v()},children:(t,l)=>r(o,{get when(){return e.messages[l()]},children:s=>{const y=r(D,{get parts(){return s().parts},get cardTypes(){return e.cardTypes},get cardSchemas(){return e.cardSchemas},get isUser(){return s().role==="user"},get markdown(){return s().role==="assistant"},get actions(){return s().actions},get actionsReveal(){return m()},get activeFeedback(){return i.resolveFeedback(s())},get copied(){return i.isCopied(s().id)},onAction:u=>i.handleAction(s(),u)}),b=()=>m()==="hover"?"group ":"";return r(o,{get when(){return s().avatar},get fallback(){return r(x,{get role(){return s().role},get class(){return`${b()}${s().role==="user"?"flex-col items-end":"flex-col items-start"}`},children:y})},children:u=>r(x,{get role(){return s().role},get class(){return b()},get children(){return[r(E,{get src(){return u().src??""},get alt(){return u().alt??""},get fallback(){return u().fallback}}),(()=>{var f=S();return h(f,y),T(()=>k(f,`flex min-w-0 flex-1 flex-col ${s().role==="user"?"items-end":"items-start"}`)),f})()]}})})}})}),r(o,{get when(){return e.loading},get children(){return r(x,{class:"flex-col items-start",get children(){var t=Q();return h(t,r(K,{variant:"typing"})),t}})}}),r(U,{})]}}),r(o,{get when(){return g()},get children(){var t=V();return h(t,r(_,{class:"shadow-sm"})),t}})]}})),T(()=>k(a,`relative flex h-full min-h-0 flex-col bg-background ${e.class??""}`)),a}})}var Y=c("<style>:host{display:block;height:100%}"),Z=c("<slot name=empty>");$("kai-thread",{messages:void 0,loading:!1,proseSize:"sm",codeTheme:"github-dark-dimmed",codeHighlight:!0,actionsReveal:"always",scrollButton:!0,class:void 0,cardTypes:void 0,cardSchemas:void 0},(e,{element:d,dispatch:m,flag:n,expose:i})=>{let g;const p=J("kai-thread"),[v,a]=A({});return w(()=>{const t=()=>a(L(d,q));t();const l=new MutationObserver(t);l.observe(d,{childList:!0}),j(()=>l.disconnect())}),i({scrollToBottom:t=>g?.scrollToBottom(t)}),[Y(),r(X,{get class(){return e.class},get messages(){return p(e.messages)},get loading(){return n("loading")},get proseSize(){return e.proseSize},get codeTheme(){return e.codeTheme},get codeHighlight(){return n("codeHighlight")},get actionsReveal(){return e.actionsReveal},get scrollButton(){return e.scrollButton!==!1},get cardTypes(){return I(e.cardTypes,e.theme)},get cardSchemas(){return e.cardSchemas},get empty(){return C(()=>!!v().empty)()?(()=>{var t=Z();return t._$owner=F(),t})():void 0},onMessageAction:t=>m("kai-message-action",t),controllerRef:t=>g=t})]});
|
package/dist/elements/toast.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as z,l as Q,k as H,h as I,c as i,i as h,F as U,x as V,a as L,d as C,b as E,n as J,p as Z,S as b,t as $,w as _,e as ie,f as ae}from"./chunks/define-BzPnNsXg.js";import{c as g}from"./chunks/cn-CU7UAWzk.js";import{c as se}from"./chunks/overlay-Cepd-KcS.js";import{r as ee,t as de}from"./chunks/toast-store-Bm3DUEDe.js";import{c as le}from"./chunks/check-C8desc_h.js";import{c as ce}from"./chunks/circle-x-D0MEfxOM.js";import{i as ue}from"./chunks/info-CWRjZkuy.js";import{t as me}from"./chunks/triangle-alert-C1SNzTqK.js";import{x as pe}from"./chunks/x-D1qx0aLd.js";var ve=$("<button type=button>"),fe=$("<button type=button aria-label=Dismiss>"),te=$("<div>"),ge=$('<div class="min-w-0 flex-1"><div class="font-medium leading-snug">'),he=$("<div role=status>"),xe=$('<span class="min-w-0 flex-1 truncate">'),be=$('<div role=region aria-label=Notifications aria-live=polite data-stack=collapsed><div class="pointer-events-auto relative transition-[height] duration-200 ease-out"style="min-width:16rem;max-width:min(30rem, calc(100vw - 2rem))">'),we=$("<div role=region aria-label=Notifications aria-live=polite data-stack=expanded>");function ke(){var t,c;const[u,f]=z(typeof window<"u"&&((t=window.matchMedia)==null?void 0:t.call(window,"(prefers-reduced-motion: reduce)").matches)===!0);if(typeof window<"u"&&window.matchMedia){const m=window.matchMedia("(prefers-reduced-motion: reduce)"),l=()=>f(m.matches);(c=m.addEventListener)==null||c.call(m,"change",l),I(()=>{var d;return(d=m.removeEventListener)==null?void 0:d.call(m,"change",l)})}return u}function re(t){const[c,u]=z(!0),f=se(c),m=()=>t.item.variant??"neutral",l=()=>t.item.dismissible!==!1,d=()=>t.item.appearance??t.appearance??"pill",v=()=>t.item.inverse??t.inverse??!1,B=()=>v()?"bg-foreground text-background border-transparent":"bg-popover text-popover-foreground border-border",W=()=>v()?"text-background/70":"text-muted-foreground",D=()=>v()?"text-background hover:text-background/80":"text-primary hover:text-primary/80",Y=()=>v()?"text-background/70 hover:text-background":"text-muted-foreground hover:text-foreground";let A=ee(t.item),S=0,k,y="timeout";const w=()=>{k!==void 0&&(clearTimeout(k),k=void 0)},R=()=>{w(),!(A<=0)&&(S=Date.now(),k=setTimeout(()=>{y="timeout",u(!1)},A))},G=()=>{k!==void 0&&(w(),A-=Date.now()-S)},[P,T]=z(!1),X=()=>t.paused===!0||P();H(_(()=>ee(t.item),e=>{A=e,X()?w():R()})),H(_(X,e=>{e?G():R()},{defer:!0})),I(w),H(()=>{!f.present()&&!c()&&t.onDismiss(y)});const q=()=>{w(),y="close",u(!1)},M=()=>{var e;const o=t.item.action;o&&((e=t.onAction)==null||e.call(t,o.label),o.onAction()===!1||(w(),y="action",u(!1)))},x=()=>d()==="card"?"mt-0.5":void 0,F=()=>[i(b,{get when(){return m()==="success"},get children(){return i(le,{get class(){return g("size-4 shrink-0 text-emerald-500",x())}})}}),i(b,{get when(){return m()==="warning"},get children(){return i(me,{get class(){return g("size-4 shrink-0 text-warning",x())}})}}),i(b,{get when(){return m()==="error"},get children(){return i(ce,{get class(){return g("size-4 shrink-0 text-destructive",x())}})}}),i(b,{get when(){return m()==="info"},get children(){return i(ue,{get class(){return g("size-4 shrink-0 text-info",x())}})}})],n=e=>i(b,{get when(){return t.item.action},children:o=>(()=>{var r=ve();return r.$$click=M,h(r,()=>o().label),L(()=>E(r,g(d()==="card"?g("inline-flex shrink-0 items-center rounded-md border px-2.5 py-1 text-xs font-medium transition-colors",v()?"border-background/30 text-background hover:bg-background/10":"border-border text-foreground hover:bg-accent"):g("shrink-0 rounded-md text-sm font-medium underline-offset-2 hover:underline",D()),e.class))),r})()}),a=()=>i(b,{get when(){return l()},get children(){var e=fe();return e.$$click=q,h(e,i(pe,{class:"size-3.5"})),L(()=>E(e,g("-mr-1 flex size-5 shrink-0 items-center justify-center rounded-md transition-colors",Y()))),e}});return i(b,{get when(){return f.present()},get children(){var e=he();e.addEventListener("pointerleave",()=>T(!1)),e.addEventListener("pointerenter",()=>T(!0));var o=f.setRef;return typeof o=="function"?V(o,e):f.setRef=e,h(e,i(F,{}),null),h(e,i(b,{get when(){return d()==="card"},get fallback(){return[(()=>{var r=xe();return h(r,()=>t.item.message),r})(),i(n,{}),i(a,{})]},get children(){return[(()=>{var r=ge(),s=r.firstChild;return h(s,()=>t.item.message),h(r,i(b,{get when(){return t.item.description},get children(){var p=te();return h(p,()=>t.item.description),L(()=>E(p,g("mt-1 line-clamp-2 text-xs leading-snug",W()))),p}}),null),h(r,i(n,{class:"mt-2"}),null),r})(),i(a,{})]}}),null),L(r=>{var s=d(),p=v()?"":void 0,N=f.state()==="closed"?"":void 0,j=g("pointer-events-auto border text-sm shadow-lg",B(),"animate-in fade-in-0 slide-in-from-top-4","data-[closed]:animate-out data-[closed]:fade-out-0 data-[closed]:slide-out-to-top-2",d()==="card"?"flex min-w-[24rem] items-start gap-3 rounded-xl p-4 shadow-xl":"flex items-center gap-3 rounded-full px-4 py-2.5");return s!==r.e&&C(e,"data-appearance",r.e=s),p!==r.t&&C(e,"data-inverse",r.t=p),N!==r.a&&C(e,"data-closed",r.a=N),j!==r.o&&E(e,r.o=j),r},{e:void 0,t:void 0,a:void 0,o:void 0}),e}})}const ne={"top-center":"top-4 left-1/2 -translate-x-1/2 items-center","top-right":"top-4 right-4 items-end","top-left":"top-4 left-4 items-start","bottom-center":"bottom-4 left-1/2 -translate-x-1/2 items-center flex-col-reverse","bottom-right":"bottom-4 right-4 items-end flex-col-reverse","bottom-left":"bottom-4 left-4 items-start flex-col-reverse"},$e={"top-center":"items-center","top-left":"items-start","top-right":"items-end","bottom-center":"items-center flex-col-reverse","bottom-left":"items-start flex-col-reverse","bottom-right":"items-end flex-col-reverse"},O=12;function oe(t,c){const u=c.left+c.width/2,f=c.top+O,m=c.bottom-O,l=c.left+O,d=c.right-O,v=`${Math.max(0,c.width-O*2)}px`;switch(t){case"top-left":return{top:`${f}px`,left:`${l}px`,transform:"none","max-width":v};case"top-right":return{top:`${f}px`,left:`${d}px`,transform:"translateX(-100%)","max-width":v};case"bottom-center":return{top:`${m}px`,left:`${u}px`,transform:"translate(-50%, -100%)","max-width":v};case"bottom-left":return{top:`${m}px`,left:`${l}px`,transform:"translateY(-100%)","max-width":v};case"bottom-right":return{top:`${m}px`,left:`${d}px`,transform:"translate(-100%, -100%)","max-width":v};default:return{top:`${f}px`,left:`${u}px`,transform:"translateX(-50%)","max-width":v}}}function ye(t){const c=()=>t.max??3,u=()=>t.position??"top-center",f=()=>t.stack??"expanded",m=ke(),l=()=>f()==="collapsed"&&!m(),[d,v]=z(!1),[B,W]=z(!1),D=()=>d()||B(),Y=20,A=.05,S=48,k=8,y=()=>u().startsWith("bottom"),w=()=>y()?-1:1,[R,G]=z(S),P=n=>{if(!n||typeof window>"u")return;const a=()=>{const o=n.offsetHeight;o&&G(o)};if(a(),typeof ResizeObserver>"u")return;const e=new ResizeObserver(a);e.observe(n),I(()=>e.disconnect())},T=n=>D()?`translateY(${w()*(R()+k)*n}px) scale(1)`:`translateY(${w()*Y*n}px) scale(${1-A*n})`,X=()=>{const n=M().length;return n?D()?n*R()+(n-1)*k:R()+(n-1)*Y:0},q=Q(()=>[...(t.toasts??[]).filter(n=>(n.target??void 0)===t.target)].reverse()),M=Q(()=>q().slice(0,c())),[x,F]=z(null);return H(()=>{const n=t.target;if(!n||typeof window>"u"){F(null);return}const a=window,e=()=>{const r=n.getBoundingClientRect();F({top:r.top,left:r.left,right:r.right,bottom:r.bottom,width:r.width})};e();const o=new ResizeObserver(e);o.observe(n),a.addEventListener("scroll",e,!0),a.addEventListener("resize",e),I(()=>{o.disconnect(),a.removeEventListener("scroll",e,!0),a.removeEventListener("resize",e)})}),i(b,{get when(){return l()},get fallback(){return(()=>{var n=we();return h(n,i(U,{get each(){return M()},children:a=>i(re,{item:a,get appearance(){return t.appearance},get inverse(){return t.inverse},onDismiss:e=>{var o;return(o=t.onDismiss)==null?void 0:o.call(t,a.id,e)},onAction:e=>{var o;return(o=t.onAction)==null?void 0:o.call(t,a.id,e)}})})),L(a=>{var e=g("pointer-events-none fixed z-[100] flex flex-col gap-2",x()?$e[u()]:g("max-w-[min(30rem,calc(100vw-2rem))]",ne[u()])),o=x()?oe(u(),x()):void 0;return e!==a.e&&E(n,a.e=e),a.t=Z(n,o,a.t),a},{e:void 0,t:void 0}),n})()},get children(){var n=be(),a=n.firstChild;return n.$$focusout=()=>W(!1),n.$$focusin=()=>W(!0),n.addEventListener("pointerleave",()=>v(!1)),n.addEventListener("pointerenter",()=>v(!0)),h(a,i(U,{get each(){return M()},children:(e,o)=>(()=>{var r=te();return V(s=>{o()===0&&P(s)},r),h(r,i(re,{item:e,get paused(){return D()},get appearance(){return t.appearance},get inverse(){return t.inverse},onDismiss:s=>{var p;return(p=t.onDismiss)==null?void 0:p.call(t,e.id,s)},onAction:s=>{var p;return(p=t.onAction)==null?void 0:p.call(t,e.id,s)}})),L(s=>{var p=o(),N=g("absolute inset-x-0 flex transition-[transform,opacity] duration-200 ease-out",y()?"bottom-0 origin-bottom":"top-0 origin-top",u().endsWith("right")?"justify-end":u().endsWith("left")?"justify-start":"justify-center"),j=String(c()-o()),K=T(o());return p!==s.e&&C(r,"data-depth",s.e=p),N!==s.t&&E(r,s.t=N),j!==s.a&&J(r,"z-index",s.a=j),K!==s.o&&J(r,"transform",s.o=K),s},{e:void 0,t:void 0,a:void 0,o:void 0}),r})()})),L(e=>{var o=D()?"":void 0,r=g("pointer-events-none fixed z-[100]",!x()&&ne[u()]),s=x()?oe(u(),x()):void 0,p=`${X()}px`;return o!==e.e&&C(n,"data-expanded",e.e=o),r!==e.t&&E(n,e.t=r),e.a=Z(n,s,e.a),p!==e.o&&J(a,"height",e.o=p),e},{e:void 0,t:void 0,a:void 0,o:void 0}),n}})}ie(["click","focusin","focusout"]),ae("kai-toast-region",{toasts:[],position:"top-center",max:3,stack:"expanded",appearance:"pill",inverse:!1,target:void 0},(t,{dispatch:c,flag:u})=>{const f=()=>{const l=t.max,d=typeof l=="string"?parseInt(l,10):l;return typeof d=="number"&&!Number.isNaN(d)?d:3},m=l=>{de.dismiss(l)};return i(ye,{get toasts(){return t.toasts??[]},get position(){return t.position},get max(){return f()},get stack(){return t.stack},get appearance(){return t.appearance},get inverse(){return u("inverse")},get target(){return t.target},onDismiss:(l,d)=>{m(l),c("kai-dismiss",{id:l,reason:d})},onAction:(l,d)=>c("kai-action",{id:l,label:d})})});
|
|
1
|
+
import{g as y,l as Q,k as G,h as H,c as i,i as h,F as U,v as V,a as z,d as R,b as L,n as q,p as Z,S as b,t as D,x as ee,e as ie,f as ae}from"./chunks/define-lE-QvQFn.js";import{c as g}from"./chunks/cn-CU7UAWzk.js";import{c as se}from"./chunks/overlay-DJL_sbOm.js";import{r as te,t as de}from"./chunks/toast-store-BOfs9eXq.js";import{c as le}from"./chunks/check-7Q3K-iXE.js";import{c as ce}from"./chunks/circle-x-QIxXda6k.js";import{i as ue}from"./chunks/info-BSnuJiHI.js";import{t as me}from"./chunks/triangle-alert-C4yxH2XN.js";import{x as pe}from"./chunks/x-_-OPHept.js";var ve=D("<button type=button>"),fe=D("<button type=button aria-label=Dismiss>"),J=D("<div>"),ge=D('<div class="min-w-0 flex-1"><div class="font-medium leading-snug">'),he=D('<span class="min-w-0 flex-1 truncate">'),xe=D('<div role=region aria-label=Notifications aria-live=polite data-stack=collapsed><div class="pointer-events-auto relative transition-[height] duration-200 ease-out"style="min-width:16rem;max-width:min(30rem, calc(100vw - 2rem))">'),be=D("<div role=region aria-label=Notifications aria-live=polite data-stack=expanded>");function we(){var t,c;const[u,f]=y(typeof window<"u"&&((t=window.matchMedia)==null?void 0:t.call(window,"(prefers-reduced-motion: reduce)").matches)===!0);if(typeof window<"u"&&window.matchMedia){const m=window.matchMedia("(prefers-reduced-motion: reduce)"),l=()=>f(m.matches);(c=m.addEventListener)==null||c.call(m,"change",l),H(()=>{var d;return(d=m.removeEventListener)==null?void 0:d.call(m,"change",l)})}return u}function re(t){const[c,u]=y(!0),f=se(c),m=()=>t.item.variant??"neutral",l=()=>t.item.dismissible!==!1,d=()=>t.item.appearance??t.appearance??"pill",v=()=>t.item.inverse??t.inverse??!1,I=()=>v()?"bg-foreground text-background border-transparent":"bg-popover text-popover-foreground border-border",C=()=>v()?"text-background/70":"text-muted-foreground",E=()=>v()?"text-background hover:text-background/80":"text-primary hover:text-primary/80",S=()=>v()?"text-background/70 hover:text-background":"text-muted-foreground hover:text-foreground";let A=te(t.item),T=0,k,$="timeout";const w=()=>{k!==void 0&&(clearTimeout(k),k=void 0)},N=()=>{w(),!(A<=0)&&(T=Date.now(),k=setTimeout(()=>{$="timeout",u(!1)},A))},K=()=>{k!==void 0&&(w(),A-=Date.now()-T)},[P,X]=y(!1),B=()=>t.paused===!0||P();G(ee(()=>te(t.item),e=>{A=e,B()?w():N()})),G(ee(B,e=>{e?K():N()},{defer:!0})),H(w),G(()=>{!f.present()&&!c()&&t.onDismiss($)});const _=()=>{w(),$="close",u(!1)},M=()=>{var e;const o=t.item.action;o&&((e=t.onAction)==null||e.call(t,o.label),o.onAction()===!1||(w(),$="action",u(!1)))},x=()=>d()==="card"?"mt-0.5":void 0,F=()=>[i(b,{get when(){return m()==="success"},get children(){return i(le,{get class(){return g("size-4 shrink-0 text-emerald-500",x())}})}}),i(b,{get when(){return m()==="warning"},get children(){return i(me,{get class(){return g("size-4 shrink-0 text-warning",x())}})}}),i(b,{get when(){return m()==="error"},get children(){return i(ce,{get class(){return g("size-4 shrink-0 text-destructive",x())}})}}),i(b,{get when(){return m()==="info"},get children(){return i(ue,{get class(){return g("size-4 shrink-0 text-info",x())}})}})],n=e=>i(b,{get when(){return t.item.action},children:o=>(()=>{var r=ve();return r.$$click=M,h(r,()=>o().label),z(()=>L(r,g(d()==="card"?g("inline-flex shrink-0 items-center rounded-md border px-2.5 py-1 text-xs font-medium transition-colors",v()?"border-background/30 text-background hover:bg-background/10":"border-border text-foreground hover:bg-accent"):g("shrink-0 rounded-md text-sm font-medium underline-offset-2 hover:underline",E()),e.class))),r})()}),a=()=>i(b,{get when(){return l()},get children(){var e=fe();return e.$$click=_,h(e,i(pe,{class:"size-3.5"})),z(()=>L(e,g("-mr-1 flex size-5 shrink-0 items-center justify-center rounded-md transition-colors",S()))),e}});return i(b,{get when(){return f.present()},get children(){var e=J();e.addEventListener("pointerleave",()=>X(!1)),e.addEventListener("pointerenter",()=>X(!0));var o=f.setRef;return typeof o=="function"?V(o,e):f.setRef=e,h(e,i(F,{}),null),h(e,i(b,{get when(){return d()==="card"},get fallback(){return[(()=>{var r=he();return h(r,()=>t.item.message),r})(),i(n,{}),i(a,{})]},get children(){return[(()=>{var r=ge(),s=r.firstChild;return h(s,()=>t.item.message),h(r,i(b,{get when(){return t.item.description},get children(){var p=J();return h(p,()=>t.item.description),z(()=>L(p,g("mt-1 line-clamp-2 text-xs leading-snug",C()))),p}}),null),h(r,i(n,{class:"mt-2"}),null),r})(),i(a,{})]}}),null),z(r=>{var s=m()==="error"?"alert":"status",p=d(),j=v()?"":void 0,O=f.state()==="closed"?"":void 0,W=g("pointer-events-auto border text-sm shadow-lg",I(),"animate-in fade-in-0 slide-in-from-top-4","data-[closed]:animate-out data-[closed]:fade-out-0 data-[closed]:slide-out-to-top-2",d()==="card"?"flex min-w-[24rem] items-start gap-3 rounded-xl p-4 shadow-xl":"flex items-center gap-3 rounded-full px-4 py-2.5");return s!==r.e&&R(e,"role",r.e=s),p!==r.t&&R(e,"data-appearance",r.t=p),j!==r.a&&R(e,"data-inverse",r.a=j),O!==r.o&&R(e,"data-closed",r.o=O),W!==r.i&&L(e,r.i=W),r},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),e}})}const ne={"top-center":"top-4 left-1/2 -translate-x-1/2 items-center","top-right":"top-4 right-4 items-end","top-left":"top-4 left-4 items-start","bottom-center":"bottom-4 left-1/2 -translate-x-1/2 items-center flex-col-reverse","bottom-right":"bottom-4 right-4 items-end flex-col-reverse","bottom-left":"bottom-4 left-4 items-start flex-col-reverse"},ke={"top-center":"items-center","top-left":"items-start","top-right":"items-end","bottom-center":"items-center flex-col-reverse","bottom-left":"items-start flex-col-reverse","bottom-right":"items-end flex-col-reverse"},Y=12;function oe(t,c){const u=c.left+c.width/2,f=c.top+Y,m=c.bottom-Y,l=c.left+Y,d=c.right-Y,v=`${Math.max(0,c.width-Y*2)}px`;switch(t){case"top-left":return{top:`${f}px`,left:`${l}px`,transform:"none","max-width":v};case"top-right":return{top:`${f}px`,left:`${d}px`,transform:"translateX(-100%)","max-width":v};case"bottom-center":return{top:`${m}px`,left:`${u}px`,transform:"translate(-50%, -100%)","max-width":v};case"bottom-left":return{top:`${m}px`,left:`${l}px`,transform:"translateY(-100%)","max-width":v};case"bottom-right":return{top:`${m}px`,left:`${d}px`,transform:"translate(-100%, -100%)","max-width":v};default:return{top:`${f}px`,left:`${u}px`,transform:"translateX(-50%)","max-width":v}}}function $e(t){const c=()=>t.max??3,u=()=>t.position??"top-center",f=()=>t.stack??"expanded",m=we(),l=()=>f()==="collapsed"&&!m(),[d,v]=y(!1),[I,C]=y(!1),E=()=>d()||I(),S=20,A=.05,T=48,k=8,$=()=>u().startsWith("bottom"),w=()=>$()?-1:1,[N,K]=y(T),P=n=>{if(!n||typeof window>"u")return;const a=()=>{const o=n.offsetHeight;o&&K(o)};if(a(),typeof ResizeObserver>"u")return;const e=new ResizeObserver(a);e.observe(n),H(()=>e.disconnect())},X=n=>E()?`translateY(${w()*(N()+k)*n}px) scale(1)`:`translateY(${w()*S*n}px) scale(${1-A*n})`,B=()=>{const n=M().length;return n?E()?n*N()+(n-1)*k:N()+(n-1)*S:0},_=Q(()=>[...(t.toasts??[]).filter(n=>(n.target??void 0)===t.target)].reverse()),M=Q(()=>_().slice(0,c())),[x,F]=y(null);return G(()=>{const n=t.target;if(!n||typeof window>"u"){F(null);return}const a=window,e=()=>{const r=n.getBoundingClientRect();F({top:r.top,left:r.left,right:r.right,bottom:r.bottom,width:r.width})};e();const o=new ResizeObserver(e);o.observe(n),a.addEventListener("scroll",e,!0),a.addEventListener("resize",e),H(()=>{o.disconnect(),a.removeEventListener("scroll",e,!0),a.removeEventListener("resize",e)})}),i(b,{get when(){return l()},get fallback(){return(()=>{var n=be();return h(n,i(U,{get each(){return M()},children:a=>i(re,{item:a,get appearance(){return t.appearance},get inverse(){return t.inverse},onDismiss:e=>{var o;return(o=t.onDismiss)==null?void 0:o.call(t,a.id,e)},onAction:e=>{var o;return(o=t.onAction)==null?void 0:o.call(t,a.id,e)}})})),z(a=>{var e=g("pointer-events-none fixed z-[100] flex flex-col gap-2",x()?ke[u()]:g("max-w-[min(30rem,calc(100vw-2rem))]",ne[u()])),o=x()?oe(u(),x()):void 0;return e!==a.e&&L(n,a.e=e),a.t=Z(n,o,a.t),a},{e:void 0,t:void 0}),n})()},get children(){var n=xe(),a=n.firstChild;return n.$$focusout=()=>C(!1),n.$$focusin=()=>C(!0),n.addEventListener("pointerleave",()=>v(!1)),n.addEventListener("pointerenter",()=>v(!0)),h(a,i(U,{get each(){return M()},children:(e,o)=>(()=>{var r=J();return V(s=>{o()===0&&P(s)},r),h(r,i(re,{item:e,get paused(){return E()},get appearance(){return t.appearance},get inverse(){return t.inverse},onDismiss:s=>{var p;return(p=t.onDismiss)==null?void 0:p.call(t,e.id,s)},onAction:s=>{var p;return(p=t.onAction)==null?void 0:p.call(t,e.id,s)}})),z(s=>{var p=o(),j=g("absolute inset-x-0 flex transition-[transform,opacity] duration-200 ease-out",$()?"bottom-0 origin-bottom":"top-0 origin-top",u().endsWith("right")?"justify-end":u().endsWith("left")?"justify-start":"justify-center"),O=String(c()-o()),W=X(o());return p!==s.e&&R(r,"data-depth",s.e=p),j!==s.t&&L(r,s.t=j),O!==s.a&&q(r,"z-index",s.a=O),W!==s.o&&q(r,"transform",s.o=W),s},{e:void 0,t:void 0,a:void 0,o:void 0}),r})()})),z(e=>{var o=E()?"":void 0,r=g("pointer-events-none fixed z-[100]",!x()&&ne[u()]),s=x()?oe(u(),x()):void 0,p=`${B()}px`;return o!==e.e&&R(n,"data-expanded",e.e=o),r!==e.t&&L(n,e.t=r),e.a=Z(n,s,e.a),p!==e.o&&q(a,"height",e.o=p),e},{e:void 0,t:void 0,a:void 0,o:void 0}),n}})}ie(["click","focusin","focusout"]),ae("kai-toast-region",{toasts:[],position:"top-center",max:3,stack:"expanded",appearance:"pill",inverse:!1,target:void 0},(t,{dispatch:c,flag:u})=>{const f=()=>{const l=t.max,d=typeof l=="string"?parseInt(l,10):l;return typeof d=="number"&&!Number.isNaN(d)?d:3},m=l=>{de.dismiss(l)};return i($e,{get toasts(){return t.toasts??[]},get position(){return t.position},get max(){return f()},get stack(){return t.stack},get appearance(){return t.appearance},get inverse(){return u("inverse")},get target(){return t.target},onDismiss:(l,d)=>{m(l),c("kai-dismiss",{id:l,reason:d})},onAction:(l,d)=>c("kai-action",{id:l,label:d})})});
|
package/dist/elements/tool.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as a,c as l,S as d}from"./chunks/define-
|
|
1
|
+
import{f as a,c as l,S as d}from"./chunks/define-lE-QvQFn.js";import{T as i}from"./chunks/tool-Be6Dh_dt.js";import{w as f}from"./chunks/disclosure-DZSa9jog.js";a("kai-tool",{tool:void 0,open:void 0,defaultOpen:void 0,disabled:void 0},(t,e)=>{const{flag:o}=e;let r;return f(e,()=>r,()=>t.open),l(d,{get when(){return t.tool},get children(){return l(i,{get toolPart(){return t.tool},get defaultOpen(){return o("defaultOpen")},get disabled(){return o("disabled")},controllerRef:n=>r=n})}})});
|
package/dist/elements/tooltip.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as i,c as d,u as s,j as r,t as a}from"./chunks/define-
|
|
1
|
+
import{f as i,c as d,u as s,j as r,t as a}from"./chunks/define-lE-QvQFn.js";import{T as p}from"./chunks/tooltip-RxMxyCLF.js";import{w as u}from"./chunks/disclosure-DZSa9jog.js";var c=a("<style>:host{display:inline-flex}"),m=a("<slot>");i("kai-tooltip",{content:"",openDelay:void 0,closeDelay:void 0,placement:void 0,open:void 0,defaultOpen:void 0,disabled:void 0},(e,o)=>{const{flag:l}=o;let n;return u(o,()=>n,()=>e.open),[c(),d(p,{get content(){return e.content??""},get openDelay(){return r(()=>e.openDelay!=null)()?Number(e.openDelay):void 0},get closeDelay(){return r(()=>e.closeDelay!=null)()?Number(e.closeDelay):void 0},get placement(){return e.placement??void 0},get defaultOpen(){return l("defaultOpen")},get disabled(){return l("disabled")},controllerRef:t=>n=t,get children(){var t=m();return t._$owner=s(),t}})]});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as
|
|
1
|
+
import{g as b,h as C,s as z,k as L,x as P,i as I,c as g,F,n as V,S,j as M,a as D,b as U,t as x,f as $}from"./chunks/define-lE-QvQFn.js";import{c as B}from"./chunks/cn-CU7UAWzk.js";import{B as q}from"./chunks/button-C42vrGvO.js";import{T as A}from"./chunks/tooltip-RxMxyCLF.js";function G(n={}){const l=n.mimeType??"audio/webm;codecs=opus",[s,p]=b(!1),[c,e]=b(null),[r,u]=b();let i,m=[],v;async function o(){e(null),m=[];try{const t=await navigator.mediaDevices.getUserMedia({audio:!0});return u(t),i=new MediaRecorder(t,{mimeType:l}),i.ondataavailable=a=>{a.data.size>0&&m.push(a.data)},i.onstop=()=>{const a=new Blob(m,{type:l});t.getTracks().forEach(h=>h.stop()),u(void 0),p(!1),v?.(a)},i.start(),p(!0),new Promise(a=>{v=a})}catch(t){const a=r();throw a&&(a.getTracks().forEach(h=>h.stop()),u(void 0)),e(t instanceof Error?t.message:"Microphone access denied"),p(!1),t}}function w(){i&&i.state==="recording"&&i.stop()}return C(()=>w()),{isRecording:s,error:c,stream:r,start:o,stop:w}}function E(){if(typeof window>"u")return;const n=window;return n.SpeechRecognition??n.webkitSpeechRecognition}function H(n={}){const[l,s]=b(!1),[p,c]=b(null),e=E()!==void 0;let r,u,i="";function m(o={}){c(null),i="";const w=E();if(!w){const t="SpeechRecognition is not supported in this browser";return c(t),Promise.reject(new Error(t))}try{return r=new w,o.lang&&(r.lang=o.lang),r.interimResults=n.interim===!0,r.continuous=!1,r.onresult=t=>{var a;let h="";for(let y=t.resultIndex;y<t.results.length;y++){const T=t.results[y],R=((a=T[0])==null?void 0:a.transcript)??"";T.isFinal?i+=R:h+=R}h&&o.onInterim&&o.onInterim(h)},r.onerror=t=>{c(t.error??"Speech recognition error")},r.onend=()=>{s(!1),u?.(i),r=void 0},r.start(),s(!0),new Promise(t=>{u=t})}catch(t){throw c(t instanceof Error?t.message:"Speech recognition failed to start"),s(!1),t}}function v(){r&&l()&&r.stop()}return C(()=>{r&&r.abort()}),{isSupported:e,isListening:l,error:p,start:m,stop:v}}var J=x('<svg width=16 height=16 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round><path d="M12 1a3 3 0 00-3 3v8a3 3 0 006 0V4a3 3 0 00-3-3z"></path><path d="M19 10v2a7 7 0 01-14 0v-2"></path><line x1=12 y1=19 x2=12 y2=23></line><line x1=8 y1=23 x2=16 y2=23>'),K=x('<svg width=14 height=14 viewBox="0 0 24 24"fill=currentColor><rect x=4 y=4 width=16 height=16 rx=2>'),N=x('<svg width=16 height=16 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 class=animate-spin><path d="M21 12a9 9 0 11-6.219-8.56">'),O=x("<div>"),W=x('<div class="absolute inset-0 animate-ping rounded-full border-2 border-red-400/30"style=animation-duration:2s>');function _(n){var l;const[s]=z(n,["onTranscribe","onTranscription","disabled","class"]),{isRecording:p,start:c,stop:e}=G(),r=H({interim:n.interim}),[u,i]=b(!1),m=()=>!n.hasTranscribe&&r.isSupported,v=()=>u()?"Transcribing...":o()?"Stop recording":"Voice input",o=()=>m()?r.isListening():p();async function w(){try{const d=await r.start({lang:n.lang,onInterim:n.interim?f=>{var k;return(k=n.onInterim)==null?void 0:k.call(n,f)}:void 0});d.trim()&&s.onTranscription(d.trim())}catch{}}async function t(){try{const d=await c();i(!0);try{const f=await s.onTranscribe(d);f.trim()&&s.onTranscription(f.trim())}finally{i(!1)}}catch{i(!1)}}function a(){m()?w():t()}function h(){m()?r.stop():e()}async function y(){o()?h():a()}L(P(o,d=>{var f;(f=n.onRecordingChange)==null||f.call(n,d)},{defer:!0})),(l=n.controllerRef)==null||l.call(n,{start:()=>{o()||a()},stop:()=>h()});const T=()=>J(),R=()=>K(),j=()=>N();return(()=>{var d=O();return I(d,g(S,{get when(){return o()},get children(){return g(F,{each:[0,1,2],children:f=>(()=>{var k=W();return V(k,"animation-delay",`${f*.3}s`),k})()})}}),null),I(d,g(A,{get content(){return v()},get children(){return g(q,{variant:"ghost",size:"icon-sm",get"aria-label"(){return v()},onClick:y,get disabled(){return s.disabled||u()},get class(){return B("relative z-10 rounded-full transition-all duration-300",o()&&"bg-destructive text-white hover:bg-destructive/80")},get children(){return[g(S,{get when(){return u()},get children(){return g(j,{})}}),g(S,{get when(){return M(()=>!u())()&&o()},get children(){return g(R,{})}}),g(S,{get when(){return M(()=>!u())()&&!o()},get children(){return g(T,{})}})]}})}}),null),D(()=>U(d,B("relative inline-flex items-center justify-center",s.class))),d})()}$("kai-voice-input",{transcribe:void 0,disabled:!1,recognitionLang:void 0,interim:!1},(n,{dispatch:l,flag:s,expose:p})=>{let c;return p({start:()=>c?.start(),stop:()=>c?.stop()}),g(_,{get disabled(){return s("disabled")},get hasTranscribe(){return typeof n.transcribe=="function"},get lang(){return n.recognitionLang},get interim(){return s("interim")},onTranscribe:async e=>(l("kai-audio-captured",{blob:e}),n.transcribe?n.transcribe(e):""),onTranscription:e=>l("kai-transcription",{text:e}),onInterim:e=>l("kai-transcript-interim",{text:e}),onRecordingChange:e=>l("kai-recording-change",{recording:e}),controllerRef:e=>c=e})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as A,g as k,k as
|
|
1
|
+
import{s as A,g as k,k as x,x as z,h as q,i as D,c as o,S as w,j as m,a as E,b as F,t as p,f as G}from"./chunks/define-lE-QvQFn.js";import{c as b}from"./chunks/cn-CU7UAWzk.js";import{B as I}from"./chunks/button-C42vrGvO.js";import{T as N}from"./chunks/tooltip-RxMxyCLF.js";var P=p('<svg width=16 height=16 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round><polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon><path d="M19.07 4.93a10 10 0 010 14.14M15.54 8.46a5 5 0 010 7.07">'),V=p('<svg width=14 height=14 viewBox="0 0 24 24"fill=currentColor><rect x=4 y=4 width=16 height=16 rx=2>'),W=p('<svg width=16 height=16 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 class=animate-spin><path d="M21 12a9 9 0 11-6.219-8.56">'),_=p("<div>");function h(){return typeof window<"u"&&"speechSynthesis"in window}function $(e){var l;const[r]=A(e,["text","disabled","class"]),[a,t]=k(!1),[n,f]=k(!1);let i,u,d;const R=()=>!!e.onSynthesize||h(),v=()=>n()?"Synthesizing...":a()?"Stop":"Read aloud";function S(){u&&(URL.revokeObjectURL(u),u=void 0)}function C(){!h()||!r.text||(window.speechSynthesis.cancel(),d=new SpeechSynthesisUtterance(r.text),d.onend=()=>t(!1),d.onerror=()=>t(!1),t(!0),window.speechSynthesis.speak(d))}async function j(){var s;if(!(!e.onSynthesize||!r.text)){f(!0);try{const c=await e.onSynthesize(r.text);(s=e.onSynthesized)==null||s.call(e,c),S(),u=URL.createObjectURL(c),i??(i=new Audio),i.src=u,i.onended=()=>t(!1),i.onerror=()=>t(!1),t(!0),await i.play()}catch{t(!1)}finally{f(!1)}}}function g(){e.onSynthesize?j():C()}function y(){e.onSynthesize?i&&(i.pause(),i.currentTime=0):h()&&window.speechSynthesis.cancel(),t(!1)}function U(){e.onSynthesize?i?.pause():h()&&window.speechSynthesis.pause()}function B(){e.onSynthesize?i?.play():h()&&window.speechSynthesis.resume()}function L(){a()?y():g()}x(z(a,s=>{var c;(c=e.onSpeakingChange)==null||c.call(e,s)},{defer:!0})),x(z(()=>r.text,s=>{e.autoplay&&s&&g()},{defer:!0})),(l=e.controllerRef)==null||l.call(e,{speak:g,pause:U,resume:B,stop:y}),q(()=>{y(),S()});const M=()=>P(),O=()=>V(),T=()=>W();return(()=>{var s=_();return D(s,o(N,{get content(){return v()},get children(){return o(I,{part:"button",variant:"ghost",size:"icon-sm",get"aria-label"(){return v()},get"aria-pressed"(){return a()},onClick:L,get disabled(){return r.disabled||!R()||n()},get class(){return b("relative z-10 rounded-full transition-all duration-300")},get children(){return[o(w,{get when(){return n()},get children(){return o(T,{})}}),o(w,{get when(){return m(()=>!n())()&&a()},get children(){return o(O,{})}}),o(w,{get when(){return m(()=>!n())()&&!a()},get children(){return o(M,{})}})]}})}})),E(()=>F(s,b("relative inline-flex items-center justify-center",r.class))),s})()}G("kai-voice-output",{text:"",autoplay:!1,synthesize:void 0,disabled:!1},(e,{dispatch:l,flag:r,expose:a})=>{let t;return a({speak:()=>t?.speak(),pause:()=>t?.pause(),resume:()=>t?.resume(),stop:()=>t?.stop()}),o($,{get text(){return e.text??""},get autoplay(){return r("autoplay")},get disabled(){return r("disabled")},get onSynthesize(){return e.synthesize?n=>e.synthesize(n):void 0},onSpeakingChange:n=>l("kai-speaking-change",{speaking:n}),onSynthesized:n=>l("kai-synthesized",{blob:n}),controllerRef:n=>t=n})});
|
package/dist/elements.d.ts
CHANGED
|
@@ -387,7 +387,7 @@ export interface KaiButtonElement extends HTMLElement {
|
|
|
387
387
|
icon?: string;
|
|
388
388
|
/** Trailing icon, after the label (e.g. `"chevron-down"` for a menu affordance). */
|
|
389
389
|
iconTrailing?: string;
|
|
390
|
-
/** Accessible name. REQUIRED for icon-only buttons (no visible text); ignored when you slot visible text, which already names the button. */
|
|
390
|
+
/** Accessible name. REQUIRED for icon-only buttons (no visible text); ignored when you slot visible text, which already names the button. An `aria-label` on top of visible text REPLACES that name rather than adding to it, so a button reading "Save" that answers to "Submit" is unusable by speech input (WCAG 2.5.3, Label in Name). The visible text wins. An `icon` / `icon-sm` size hides the slot, which makes the button icon-only whatever you slotted, so `label` is what names it there. */
|
|
391
391
|
label?: string;
|
|
392
392
|
/** Disable the button (non-interactive, dimmed). */
|
|
393
393
|
disabled?: boolean;
|
|
@@ -525,6 +525,8 @@ export interface KaiChatElement extends HTMLElement {
|
|
|
525
525
|
kindIcons?: Record<string, string>;
|
|
526
526
|
/** Whether each message's action bar is always visible (`'always'`, default) or only revealed on hover of that message row (`'hover'`). */
|
|
527
527
|
actionsReveal?: "always" | "hover";
|
|
528
|
+
/** Which attachment media types the user may stage, in HTML `accept` syntax: `<kai-chat accept="image/*,application/pdf">`. A plain string, so unlike `messages` it DOES work as an attribute. Omitted means no filter. MEDIA TYPES ONLY -- exact (`image/png`) or subtype wildcard (`text/*`). HTML allows a file extension here and this does not: `accept=".py"` THROWS with the entry named, rather than silently resolving to a picker that accepts nothing. It can only NARROW what the kit can already encode: `accept="image/*"` resolves to the four image formats both APIs take, not to every image type the OS offers. Pass the SAME string to `toOpenAIMessages(msgs, { accept })` and the picker and the wire cannot disagree -- both resolve it through `resolveMediaPolicy` against one declaration. That declaration is readable as `encodableMediaTypes()` from `@kitn.ai/ui/wire`, if you would rather build your own picker than use this prop. */
|
|
529
|
+
accept?: string;
|
|
528
530
|
/** The full message thread to render, newest last. Each entry carries its role, ordered `parts`, and optional actions/avatar/feedback. Set as a JS property (`el.messages = [...]`); a NEW array reference per streaming chunk re-renders (mutating in place does not). Omit for an empty thread. Re-declared here (rather than inherited from `ChatThreadProps`) because the ELEMENT registers a `[]` default and renders the empty state without it, while the SolidJS `<ChatThread>` component still requires it. The facade hands it a validated array either way. Matches `<kai-thread>`. */
|
|
529
531
|
messages: { id: string; role: "user" | "assistant"; parts: ({ type: "text"; text: string; raw?: { source: string; payload: unknown } } | { type: "reasoning"; text: string; label?: string; index?: number; streamId?: string; signature?: string; raw?: { source: string; payload: unknown } } | { type: "tool"; tool: { type: string; kind?: "command" | "file-change" | "search" | "fetch" | "mcp" | "image" | "generic"; state: "input-streaming" | "input-available" | "output-available" | "output-error"; input?: Record<string, unknown>; rawInput?: string; output?: Record<string, unknown>; toolCallId?: string; errorText?: string; raw?: { source: string; payload: unknown } }; raw?: { source: string; payload: unknown } } | { type: "card"; envelope: { type: string; id: string; data: unknown; title?: string; resolution?: { kind: "action"; action: string; payload?: unknown; at?: string } | { kind: "submit"; data: unknown; at?: string } | { kind: "dismissed"; at?: string } | { kind: "expired"; reason?: string; at?: string } }; raw?: { source: string; payload: unknown } } | { type: "source"; source: { id?: string; url?: string; title?: string; snippet?: string; index?: number }; raw?: { source: string; payload: unknown } } | { type: "file"; attachment: { id: string; type: "file" | "source-document"; filename?: string; mediaType?: string; url?: string; title?: string }; raw?: { source: string; payload: unknown } })[]; actions?: ("copy" | "like" | "dislike" | "regenerate" | "edit" | { id: string; label: string; icon?: string; tooltip?: string })[]; avatar?: { src?: string; fallback?: string; alt?: string }; feedback?: "like" | "dislike" }[];
|
|
530
532
|
/** Optional card type -> custom-element tag overrides/additions for `card` parts (merged over the built-ins). Property: `el.cardTypes`. Typed as a plain string map (not the `CardTagMap` alias) so the generated React wrapper inlines it instead of emitting an unresolved named type. */
|
|
@@ -1026,11 +1028,11 @@ export interface KaiMenuElement extends HTMLElement {
|
|
|
1026
1028
|
placement?: string;
|
|
1027
1029
|
/** Built-in trigger: leading icon (a named icon like `"plus"`, an image URL/data-URI, or text). Use this instead of slotting `slot="trigger"` for the common case; a slotted trigger overrides it. */
|
|
1028
1030
|
triggerIcon?: string;
|
|
1029
|
-
/** Built-in trigger: a text label (e.g. `"High"`). */
|
|
1031
|
+
/** Built-in trigger: a text label (e.g. `"High"`). This is the trigger's VISIBLE text, so it is also its accessible name, and `label` does not override it: an accessible name that does not contain the visible text is unreachable by speech input, which is what WCAG 2.5.3 (Label in Name) exists for. A slotted `slot="trigger"` replaces this built-in trigger entirely and is named differently; see `label`. */
|
|
1030
1032
|
triggerLabel?: string;
|
|
1031
1033
|
/** Built-in trigger: a trailing icon (e.g. `"chevron-down"` for a select look). */
|
|
1032
1034
|
triggerIconTrailing?: string;
|
|
1033
|
-
/** Accessible name for
|
|
1035
|
+
/** Accessible name for a trigger with no visible label. Ignored when `triggerLabel` is set, which is already the visible name. It DOES name a slotted `slot="trigger"`, and that is a difference in what the two slots MEAN, not a limitation. `<kai-button>`'s slot IS the button's label, so text slotted there is the name and `label` steps aside. This slot is VISUAL content, a `+` or an `<svg>`, with the name supplied separately: decoration beside a name, never a second name competing with one. So `label` names the trigger here by design. Slotting a real WORD rather than a glyph makes that word a visible label, and an accessible name has to contain the visible text. Then either drop `label` or make it contain the word you slotted. */
|
|
1034
1036
|
label?: string;
|
|
1035
1037
|
/** Drive/observe open state (Shoelace-style: settable + reflected to the `open` attribute, the menu still self-manages on click/keyboard). Set `el.open = true`, or `<kai-menu open>`; listen for `kai-open-change`. */
|
|
1036
1038
|
open?: boolean;
|
|
@@ -2138,7 +2140,7 @@ export interface KaiButtonElementProps {
|
|
|
2138
2140
|
icon?: string;
|
|
2139
2141
|
/** Trailing icon, after the label (e.g. `"chevron-down"` for a menu affordance). */
|
|
2140
2142
|
iconTrailing?: string;
|
|
2141
|
-
/** Accessible name. REQUIRED for icon-only buttons (no visible text); ignored when you slot visible text, which already names the button. */
|
|
2143
|
+
/** Accessible name. REQUIRED for icon-only buttons (no visible text); ignored when you slot visible text, which already names the button. An `aria-label` on top of visible text REPLACES that name rather than adding to it, so a button reading "Save" that answers to "Submit" is unusable by speech input (WCAG 2.5.3, Label in Name). The visible text wins. An `icon` / `icon-sm` size hides the slot, which makes the button icon-only whatever you slotted, so `label` is what names it there. */
|
|
2142
2144
|
label?: string;
|
|
2143
2145
|
/** Disable the button (non-interactive, dimmed). */
|
|
2144
2146
|
disabled?: boolean;
|
|
@@ -2258,6 +2260,8 @@ export interface KaiChatElementProps {
|
|
|
2258
2260
|
kindIcons?: Record<string, string>;
|
|
2259
2261
|
/** Whether each message's action bar is always visible (`'always'`, default) or only revealed on hover of that message row (`'hover'`). */
|
|
2260
2262
|
actionsReveal?: "always" | "hover";
|
|
2263
|
+
/** Which attachment media types the user may stage, in HTML `accept` syntax: `<kai-chat accept="image/*,application/pdf">`. A plain string, so unlike `messages` it DOES work as an attribute. Omitted means no filter. MEDIA TYPES ONLY -- exact (`image/png`) or subtype wildcard (`text/*`). HTML allows a file extension here and this does not: `accept=".py"` THROWS with the entry named, rather than silently resolving to a picker that accepts nothing. It can only NARROW what the kit can already encode: `accept="image/*"` resolves to the four image formats both APIs take, not to every image type the OS offers. Pass the SAME string to `toOpenAIMessages(msgs, { accept })` and the picker and the wire cannot disagree -- both resolve it through `resolveMediaPolicy` against one declaration. That declaration is readable as `encodableMediaTypes()` from `@kitn.ai/ui/wire`, if you would rather build your own picker than use this prop. */
|
|
2264
|
+
accept?: string;
|
|
2261
2265
|
/** The full message thread to render, newest last. Each entry carries its role, ordered `parts`, and optional actions/avatar/feedback. Set as a JS property (`el.messages = [...]`); a NEW array reference per streaming chunk re-renders (mutating in place does not). Omit for an empty thread. Re-declared here (rather than inherited from `ChatThreadProps`) because the ELEMENT registers a `[]` default and renders the empty state without it, while the SolidJS `<ChatThread>` component still requires it. The facade hands it a validated array either way. Matches `<kai-thread>`. */
|
|
2262
2266
|
messages?: { id: string; role: "user" | "assistant"; parts: ({ type: "text"; text: string; raw?: { source: string; payload: unknown } } | { type: "reasoning"; text: string; label?: string; index?: number; streamId?: string; signature?: string; raw?: { source: string; payload: unknown } } | { type: "tool"; tool: { type: string; kind?: "command" | "file-change" | "search" | "fetch" | "mcp" | "image" | "generic"; state: "input-streaming" | "input-available" | "output-available" | "output-error"; input?: Record<string, unknown>; rawInput?: string; output?: Record<string, unknown>; toolCallId?: string; errorText?: string; raw?: { source: string; payload: unknown } }; raw?: { source: string; payload: unknown } } | { type: "card"; envelope: { type: string; id: string; data: unknown; title?: string; resolution?: { kind: "action"; action: string; payload?: unknown; at?: string } | { kind: "submit"; data: unknown; at?: string } | { kind: "dismissed"; at?: string } | { kind: "expired"; reason?: string; at?: string } }; raw?: { source: string; payload: unknown } } | { type: "source"; source: { id?: string; url?: string; title?: string; snippet?: string; index?: number }; raw?: { source: string; payload: unknown } } | { type: "file"; attachment: { id: string; type: "file" | "source-document"; filename?: string; mediaType?: string; url?: string; title?: string }; raw?: { source: string; payload: unknown } })[]; actions?: ("copy" | "like" | "dislike" | "regenerate" | "edit" | { id: string; label: string; icon?: string; tooltip?: string })[]; avatar?: { src?: string; fallback?: string; alt?: string }; feedback?: "like" | "dislike" }[];
|
|
2263
2267
|
/** Optional card type -> custom-element tag overrides/additions for `card` parts (merged over the built-ins). Property: `el.cardTypes`. Typed as a plain string map (not the `CardTagMap` alias) so the generated React wrapper inlines it instead of emitting an unresolved named type. */
|
|
@@ -2655,11 +2659,11 @@ export interface KaiMenuElementProps {
|
|
|
2655
2659
|
placement?: string;
|
|
2656
2660
|
/** Built-in trigger: leading icon (a named icon like `"plus"`, an image URL/data-URI, or text). Use this instead of slotting `slot="trigger"` for the common case; a slotted trigger overrides it. */
|
|
2657
2661
|
triggerIcon?: string;
|
|
2658
|
-
/** Built-in trigger: a text label (e.g. `"High"`). */
|
|
2662
|
+
/** Built-in trigger: a text label (e.g. `"High"`). This is the trigger's VISIBLE text, so it is also its accessible name, and `label` does not override it: an accessible name that does not contain the visible text is unreachable by speech input, which is what WCAG 2.5.3 (Label in Name) exists for. A slotted `slot="trigger"` replaces this built-in trigger entirely and is named differently; see `label`. */
|
|
2659
2663
|
triggerLabel?: string;
|
|
2660
2664
|
/** Built-in trigger: a trailing icon (e.g. `"chevron-down"` for a select look). */
|
|
2661
2665
|
triggerIconTrailing?: string;
|
|
2662
|
-
/** Accessible name for
|
|
2666
|
+
/** Accessible name for a trigger with no visible label. Ignored when `triggerLabel` is set, which is already the visible name. It DOES name a slotted `slot="trigger"`, and that is a difference in what the two slots MEAN, not a limitation. `<kai-button>`'s slot IS the button's label, so text slotted there is the name and `label` steps aside. This slot is VISUAL content, a `+` or an `<svg>`, with the name supplied separately: decoration beside a name, never a second name competing with one. So `label` names the trigger here by design. Slotting a real WORD rather than a glyph makes that word a visible label, and an accessible name has to contain the visible text. Then either drop `label` or make it contain the word you slotted. */
|
|
2663
2667
|
label?: string;
|
|
2664
2668
|
/** Drive/observe open state (Shoelace-style: settable + reflected to the `open` attribute, the menu still self-manages on click/keyboard). Set `el.open = true`, or `<kai-menu open>`; listen for `kai-open-change`. */
|
|
2665
2669
|
open?: boolean;
|
|
@@ -3384,6 +3388,8 @@ export interface KaiChainOfThoughtElementEvents {
|
|
|
3384
3388
|
export interface KaiChatElementEvents {
|
|
3385
3389
|
/** The staged attachments changed (file added or removed). Carries the full current list so a consumer can react in real time. */
|
|
3386
3390
|
onKaiAttachmentsChange?: (event: CustomEvent<{ attachments: { id: string; type: "file" | "source-document"; filename?: undefined | string; mediaType?: undefined | string; url?: undefined | string; title?: undefined | string }[] }>) => void;
|
|
3391
|
+
/** One or more picked files were refused because `accept` excluded them. The element renders NO message of its own: it reports the facts (name, media type, whether the kit could have sent it) and what the user should see is the application's call. Only ever fires when `accept` is set. */
|
|
3392
|
+
onKaiAttachmentsRejected?: (event: CustomEvent<{ rejected: { filename: string; mediaType: string; reason: "filtered" | "unsupported" }[] }>) => void;
|
|
3387
3393
|
/** An action button on a message was clicked. `action` is the built-in name or custom id. `state` is present only for the toggleable feedback votes: `'on'` when a like/dislike is set, `'off'` when re-tapped to clear. */
|
|
3388
3394
|
onKaiMessageAction?: (event: CustomEvent<{ messageId: string; action: string; state?: undefined | "on" | "off" }>) => void;
|
|
3389
3395
|
/** The header model switcher changed. */
|