@kitn.ai/ui 0.18.2 → 0.20.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/LICENSE +6 -0
- package/NOTICE +54 -0
- package/dist/components/audio-visualizer/audio-visualizer.voice-fixture.d.ts +59 -0
- package/dist/components/audio-visualizer/aurora.glsl.d.ts +114 -0
- package/dist/components/audio-visualizer/index.d.ts +155 -0
- package/dist/components/audio-visualizer/shader-canvas.d.ts +130 -0
- package/dist/components/audio-visualizer/sizes.d.ts +25 -0
- package/dist/components/audio-visualizer/variant-aurora.d.ts +89 -0
- package/dist/components/audio-visualizer/variant-bar.d.ts +46 -0
- package/dist/components/audio-visualizer/variant-custom.d.ts +73 -0
- package/dist/components/audio-visualizer/variant-grid.d.ts +22 -0
- package/dist/components/audio-visualizer/variant-radial.d.ts +13 -0
- package/dist/components/audio-visualizer/variant-wave.d.ts +11 -0
- package/dist/components/audio-visualizer/wave.glsl.d.ts +16 -0
- package/dist/components/thread.d.ts +54 -0
- package/dist/create-tween-hvpmSuwW.js +7 -0
- package/dist/custom-elements.json +477 -0
- 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.d.ts +1 -0
- package/dist/elements/audio-visualizer.js +1 -0
- package/dist/elements/autoloader.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-C2LTALdM.js → Icon-Tj58ES_d.js} +1 -1
- package/dist/elements/chunks/action-icons-ns1Fnedj.js +1 -0
- package/dist/elements/chunks/arrow-left-DQocUFvy.js +1 -0
- package/dist/elements/chunks/{attachments-DLJcWCDV.js → attachments-mCB5F1Fq.js} +1 -1
- package/dist/elements/chunks/audio-visualizer-BqNy7dfm.js +1 -0
- package/dist/elements/chunks/{badge-BTNZTODL.js → badge-B4Zuajl2.js} +1 -1
- package/dist/elements/chunks/{button-DBDZebGr.js → button-ZWNif3--.js} +1 -1
- package/dist/elements/chunks/{card-YfCyI4fH.js → card-BkHbp4BA.js} +1 -1
- package/dist/elements/chunks/chat-thread-CkRN6pZ7.js +1 -0
- package/dist/elements/chunks/check-B9-gn6SS.js +1 -0
- package/dist/elements/chunks/chevron-down-BNsxc2hk.js +1 -0
- package/dist/elements/chunks/chevron-right-Hv00StBO.js +1 -0
- package/dist/elements/chunks/circle-0e3KJTDr.js +1 -0
- package/dist/elements/chunks/circle-check-BNAS0JEy.js +1 -0
- package/dist/elements/chunks/{circle-x-pDtzlghQ.js → circle-x-B7faJFlY.js} +1 -1
- package/dist/elements/chunks/{code-block-DZ6mz6vs.js → code-block-BFUHn6Va.js} +1 -1
- package/dist/elements/chunks/collapsible-DM1Ckd4e.js +1 -0
- package/dist/elements/chunks/{composer-BZyPU6gD.js → composer-BguS0QL_.js} +7 -3
- package/dist/elements/chunks/{context-Cx6eQA_G.js → context-Cb7k4F-v.js} +1 -1
- package/dist/elements/chunks/{conversation-list-C4xTQSpT.js → conversation-list-CvoAkWhN.js} +1 -1
- package/dist/elements/chunks/create-tween-oVvAIG8r.js +7 -0
- package/dist/elements/chunks/{default-input-BZcwyKcP.js → default-input-Cqqilg9t.js} +1 -1
- package/dist/elements/chunks/define-D1din7Ld.js +1 -0
- package/dist/elements/chunks/{disclosure-BcBs--Jf.js → disclosure-CIZ5c8nO.js} +1 -1
- package/dist/elements/chunks/{download-BDQwcFav.js → download-Dsbg3ste.js} +1 -1
- package/dist/elements/chunks/{dropdown-wgs8xCJZ.js → dropdown-BDd1-Zgi.js} +1 -1
- package/dist/elements/chunks/{ellipsis-CUiEJ6R1.js → ellipsis-Dw6qrss-.js} +1 -1
- package/dist/elements/chunks/{external-link-DJUmC7g2.js → external-link-Vt74zAoL.js} +1 -1
- package/dist/elements/chunks/{file-text-DOYfYvrh.js → file-text-CZrZF6_v.js} +1 -1
- package/dist/elements/chunks/{file-tree-DQzNQrbr.js → file-tree-DF4okKyo.js} +1 -1
- package/dist/elements/chunks/{folder-DBDUBANz.js → folder-glP5rha4.js} +1 -1
- package/dist/elements/chunks/hover-card-Cmm6Q53m.js +1 -0
- package/dist/elements/chunks/icon-BLb8beoi.js +1 -0
- package/dist/elements/chunks/{info-DBQl-m6e.js → info-CIsv92JK.js} +1 -1
- package/dist/elements/chunks/{input-DZD67EvW.js → input-Dds1kFyt.js} +1 -1
- package/dist/elements/chunks/{kbd-DbyVrlnU.js → kbd-De_xbgi9.js} +1 -1
- package/dist/elements/chunks/{link-vko7AttA.js → link-i4r_k7z4.js} +1 -1
- package/dist/elements/chunks/{loader-Cg6rO8tQ.js → loader-BmQH4s3V.js} +1 -1
- package/dist/elements/chunks/{markdown-n3Xbj3PR.js → markdown-Zi21WhUz.js} +7 -7
- package/dist/elements/chunks/{message-CgKytiSB.js → message-BqyXDN3-.js} +1 -1
- package/dist/elements/chunks/{message-feedback-Ds3-US0e.js → message-feedback-Djr3z6Yb.js} +1 -1
- package/dist/elements/chunks/message-square-vFAgbDaX.js +1 -0
- package/dist/elements/chunks/{minimize-2-3kCdE0q3.js → minimize-2--ifeCGrl.js} +1 -1
- package/dist/elements/chunks/{model-switcher-BMtXGwLU.js → model-switcher-B94YAKsM.js} +1 -1
- package/dist/elements/chunks/{overlay-B1-MBI6h.js → overlay-kD8dwRv_.js} +1 -1
- package/dist/elements/chunks/{paperclip-DDEfmkHc.js → paperclip-q21dYOSK.js} +1 -1
- package/dist/elements/chunks/{progress-bar-Dwbiyv3s.js → progress-bar-BrAIIaaJ.js} +1 -1
- package/dist/elements/chunks/{prompt-suggestion-9lvgFcEa.js → prompt-suggestion-Bjn2K-fR.js} +1 -1
- package/dist/elements/chunks/{reasoning-DzHWsdAJ.js → reasoning-DTpCGtnY.js} +1 -1
- package/dist/elements/chunks/resizable-Dp4JExql.js +1 -0
- package/dist/elements/chunks/{rotate-cw-jpisOdOV.js → rotate-cw-CFWWkpj2.js} +1 -1
- package/dist/elements/chunks/{scroll-area-g5Ze3K6f.js → scroll-area-Bb0kHH1j.js} +1 -1
- package/dist/elements/chunks/scroll-button-B0cH5fXf.js +1 -0
- package/dist/elements/chunks/{separator-Bmjc5XyX.js → separator-9kRgr1X9.js} +1 -1
- package/dist/elements/chunks/{settings-Cz1bMJP9.js → settings-B8lmec4D.js} +1 -1
- package/dist/elements/chunks/{settings-group-9imY3kRA.js → settings-group-I0hEuXiN.js} +1 -1
- package/dist/elements/chunks/{share-BdenF0wQ.js → share-C3lTiYGt.js} +1 -1
- package/dist/elements/chunks/skeleton-DSXW5Yya.js +1 -0
- package/dist/elements/chunks/{slots-DkZ-Cmha.js → slots--V19HwUb.js} +1 -1
- package/dist/elements/chunks/{star-DY6z1UUH.js → star-CSJtGxgv.js} +1 -1
- package/dist/elements/chunks/{store-th4VyJXM.js → store-CHyW95TP.js} +1 -1
- package/dist/elements/chunks/{text-shimmer-CEi-tlXr.js → text-shimmer-Cn9TmNpI.js} +1 -1
- package/dist/elements/chunks/textarea-CUwqAX0G.js +1 -0
- package/dist/elements/chunks/{thumbs-up-BR33KLfA.js → thumbs-up-PNVVThEF.js} +1 -1
- package/dist/elements/chunks/{toast-store-BEMda0fv.js → toast-store-DKbQn3Wn.js} +1 -1
- package/dist/elements/chunks/{tool-TMued3WO.js → tool-DjTRpIpl.js} +1 -1
- package/dist/elements/chunks/tooltip-CgBZCVKp.js +1 -0
- package/dist/elements/chunks/{triangle-alert-B07fX3Q8.js → triangle-alert-DsHTHCPm.js} +1 -1
- package/dist/elements/chunks/use-card-resolution-BSu_XHjH.js +1 -0
- package/dist/elements/chunks/variant-aurora-Dc4nQUia.js +218 -0
- package/dist/elements/chunks/variant-custom-y_3kVQhS.js +1 -0
- package/dist/elements/chunks/variant-wave-D5OR1-9Z.js +116 -0
- package/dist/elements/chunks/{video-MKp3LmNT.js → video-B7vmenoC.js} +1 -1
- package/dist/elements/chunks/x-GRUeeQFT.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/define.d.ts +11 -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 +1 -1
- 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/slots.d.ts +15 -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.d.ts +1 -0
- package/dist/elements/thread.js +1 -0
- 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 +62 -0
- package/dist/index.js +3411 -3328
- package/dist/kai.es.js +1 -1
- package/dist/llms/llms-full.txt +70 -4
- package/dist/llms/llms.txt +3 -3
- package/dist/primitives/audio-bands.d.ts +106 -0
- package/dist/primitives/create-tween.d.ts +33 -0
- package/dist/primitives/use-audio-analysis.d.ts +149 -0
- package/dist/primitives/use-sequencer.d.ts +13 -0
- package/dist/primitives/use-voice-recorder.d.ts +1 -0
- package/dist/primitives/visualizer-sequences.d.ts +39 -0
- package/dist/react/index.d.ts +105 -0
- package/dist/react/use-voice-input.d.ts +15 -0
- package/dist/react.js +269 -240
- package/dist/register-impl-DQyejdfb.js +145 -0
- package/dist/test-utils/fake-clock.d.ts +45 -0
- package/dist/ui/resizable.d.ts +9 -3
- package/dist/variant-aurora-DVtGqVH6.js +218 -0
- package/dist/variant-custom-Dif-IV4u.js +1 -0
- package/dist/variant-wave-DbfNdvSi.js +116 -0
- package/frameworks/react/index.tsx +74 -1
- package/frameworks/react/use-voice-input.tsx +59 -0
- package/llms-full.txt +70 -4
- package/llms.txt +3 -3
- package/package.json +32 -7
- package/src/components/audio-visualizer/audio-visualizer.voice-fixture.ts +257 -0
- package/src/components/audio-visualizer/aurora.glsl.ts +330 -0
- package/src/components/audio-visualizer/index.tsx +442 -0
- package/src/components/audio-visualizer/shader-canvas.tsx +846 -0
- package/src/components/audio-visualizer/sizes.ts +54 -0
- package/src/components/audio-visualizer/variant-aurora.tsx +299 -0
- package/src/components/audio-visualizer/variant-bar.tsx +143 -0
- package/src/components/audio-visualizer/variant-custom.tsx +338 -0
- package/src/components/audio-visualizer/variant-grid.tsx +170 -0
- package/src/components/audio-visualizer/variant-radial.tsx +158 -0
- package/src/components/audio-visualizer/variant-wave.tsx +125 -0
- package/src/components/audio-visualizer/wave.glsl.ts +130 -0
- package/src/components/component-meta.json +34 -32
- package/src/components/composer.tsx +5 -0
- package/src/components/thread.tsx +177 -0
- package/src/elements/audio-visualizer.tsx +183 -0
- package/src/elements/chat-workspace.tsx +1 -1
- package/src/elements/compiled.css +1 -1
- package/src/elements/define.tsx +12 -1
- package/src/elements/element-manifest.json +8 -0
- package/src/elements/element-meta.json +287 -0
- package/src/elements/element-types.d.ts +62 -0
- package/src/elements/icon-names.json +2 -0
- package/src/elements/menu.tsx +7 -4
- package/src/elements/register-impl.ts +3 -0
- package/src/elements/resizable.tsx +78 -2
- package/src/elements/slots.ts +42 -0
- package/src/elements/thread.tsx +105 -0
- package/src/primitives/audio-bands.ts +174 -0
- package/src/primitives/create-tween.ts +214 -0
- package/src/primitives/use-audio-analysis.ts +321 -0
- package/src/primitives/use-sequencer.ts +53 -0
- package/src/primitives/use-voice-recorder.ts +16 -4
- package/src/primitives/visualizer-sequences.ts +350 -0
- package/src/test-utils/fake-clock.ts +88 -0
- package/src/ui/action-icons.ts +2 -1
- package/src/ui/icon.tsx +4 -0
- package/src/ui/overlay.tsx +8 -1
- package/src/ui/resizable.tsx +47 -9
- package/dist/elements/chunks/action-icons-Dtl8Ox5D.js +0 -1
- package/dist/elements/chunks/arrow-left-GbBceGBE.js +0 -1
- package/dist/elements/chunks/chat-thread-Dz2qbzvI.js +0 -1
- package/dist/elements/chunks/check-fhmRksq_.js +0 -1
- package/dist/elements/chunks/chevron-down-DcRg1aRU.js +0 -1
- package/dist/elements/chunks/chevron-right-ChzBcNJ-.js +0 -1
- package/dist/elements/chunks/circle-B4fTe9v6.js +0 -1
- package/dist/elements/chunks/circle-check-CJV-3Rem.js +0 -1
- package/dist/elements/chunks/collapsible-CWUAShMC.js +0 -1
- package/dist/elements/chunks/define-CNSKFZCd.js +0 -1
- package/dist/elements/chunks/hover-card-BQGdGAQ3.js +0 -1
- package/dist/elements/chunks/icon-CAyRqVrg.js +0 -1
- package/dist/elements/chunks/message-square-MmRkvc-M.js +0 -1
- package/dist/elements/chunks/resizable-Bq_eHxUm.js +0 -1
- package/dist/elements/chunks/skeleton-Pjc5jiaY.js +0 -1
- package/dist/elements/chunks/textarea-CboigarR.js +0 -1
- package/dist/elements/chunks/tooltip-Cft_Rxiw.js +0 -1
- package/dist/elements/chunks/use-card-resolution-M36zVciB.js +0 -1
- package/dist/elements/chunks/x-Ckwicf6g.js +0 -1
- package/dist/register-impl-DcjZDELj.js +0 -141
|
@@ -698,6 +698,288 @@
|
|
|
698
698
|
}
|
|
699
699
|
]
|
|
700
700
|
},
|
|
701
|
+
{
|
|
702
|
+
"kind": "class",
|
|
703
|
+
"customElement": true,
|
|
704
|
+
"tagName": "kai-audio-visualizer",
|
|
705
|
+
"name": "KaiAudioVisualizerElement",
|
|
706
|
+
"description": "",
|
|
707
|
+
"members": [
|
|
708
|
+
{
|
|
709
|
+
"kind": "field",
|
|
710
|
+
"name": "variant",
|
|
711
|
+
"type": {
|
|
712
|
+
"text": "undefined | string"
|
|
713
|
+
},
|
|
714
|
+
"description": "Look to render: `bar` (default), `grid`, `radial`, `wave`, `aurora`, `custom`. `aura` is accepted as a LiveKit-markup alias for `aurora`. Attribute: `variant`.",
|
|
715
|
+
"privacy": "public"
|
|
716
|
+
},
|
|
717
|
+
{
|
|
718
|
+
"kind": "field",
|
|
719
|
+
"name": "state",
|
|
720
|
+
"type": {
|
|
721
|
+
"text": "undefined | string"
|
|
722
|
+
},
|
|
723
|
+
"description": "`idle` (default), `connecting`, `listening`, `thinking`, `speaking`, `disconnected` (connection down: the dead, flat look). LiveKit's room-lifecycle state names are accepted as aliases. Attribute: `state`.",
|
|
724
|
+
"privacy": "public"
|
|
725
|
+
},
|
|
726
|
+
{
|
|
727
|
+
"kind": "field",
|
|
728
|
+
"name": "size",
|
|
729
|
+
"type": {
|
|
730
|
+
"text": "undefined | string"
|
|
731
|
+
},
|
|
732
|
+
"description": "`icon` | `sm` | `md` (default) | `lg` | `xl`. Attribute: `size`.",
|
|
733
|
+
"privacy": "public"
|
|
734
|
+
},
|
|
735
|
+
{
|
|
736
|
+
"kind": "field",
|
|
737
|
+
"name": "barCount",
|
|
738
|
+
"type": {
|
|
739
|
+
"text": "undefined | number"
|
|
740
|
+
},
|
|
741
|
+
"description": "Bars to draw. Bar and radial only. Attribute: `bar-count`.",
|
|
742
|
+
"privacy": "public"
|
|
743
|
+
},
|
|
744
|
+
{
|
|
745
|
+
"kind": "field",
|
|
746
|
+
"name": "count",
|
|
747
|
+
"type": {
|
|
748
|
+
"text": "undefined | number"
|
|
749
|
+
},
|
|
750
|
+
"description": "Grid only: rows and columns of the (always square) grid. Attribute: `count`.",
|
|
751
|
+
"privacy": "public"
|
|
752
|
+
},
|
|
753
|
+
{
|
|
754
|
+
"kind": "field",
|
|
755
|
+
"name": "radius",
|
|
756
|
+
"type": {
|
|
757
|
+
"text": "undefined | number"
|
|
758
|
+
},
|
|
759
|
+
"description": "Radial only: ring distance from center, in px. Attribute: `radius`.",
|
|
760
|
+
"privacy": "public"
|
|
761
|
+
},
|
|
762
|
+
{
|
|
763
|
+
"kind": "field",
|
|
764
|
+
"name": "spread",
|
|
765
|
+
"type": {
|
|
766
|
+
"text": "undefined | number"
|
|
767
|
+
},
|
|
768
|
+
"description": "Grid only: ring distance for the connecting animation, in cells. Attribute: `spread`.",
|
|
769
|
+
"privacy": "public"
|
|
770
|
+
},
|
|
771
|
+
{
|
|
772
|
+
"kind": "field",
|
|
773
|
+
"name": "interval",
|
|
774
|
+
"type": {
|
|
775
|
+
"text": "undefined | number"
|
|
776
|
+
},
|
|
777
|
+
"description": "Grid only: ms between scripted frames. Attribute: `interval`.",
|
|
778
|
+
"privacy": "public"
|
|
779
|
+
},
|
|
780
|
+
{
|
|
781
|
+
"kind": "field",
|
|
782
|
+
"name": "color",
|
|
783
|
+
"type": {
|
|
784
|
+
"text": "undefined | string"
|
|
785
|
+
},
|
|
786
|
+
"description": "CSS color for the geometry, overriding the inherited `currentColor`. Attribute: `color`.",
|
|
787
|
+
"privacy": "public"
|
|
788
|
+
},
|
|
789
|
+
{
|
|
790
|
+
"kind": "field",
|
|
791
|
+
"name": "complexity",
|
|
792
|
+
"type": {
|
|
793
|
+
"text": "undefined | number"
|
|
794
|
+
},
|
|
795
|
+
"description": "Shader variants only: pattern density, 0..1. Attribute: `complexity`.",
|
|
796
|
+
"privacy": "public"
|
|
797
|
+
},
|
|
798
|
+
{
|
|
799
|
+
"kind": "field",
|
|
800
|
+
"name": "label",
|
|
801
|
+
"type": {
|
|
802
|
+
"text": "undefined | string"
|
|
803
|
+
},
|
|
804
|
+
"description": "Setting this makes the element an announced image (`role=\"img\"`) instead of decorative (`aria-hidden`). Attribute: `label`.",
|
|
805
|
+
"privacy": "public"
|
|
806
|
+
},
|
|
807
|
+
{
|
|
808
|
+
"kind": "field",
|
|
809
|
+
"name": "stream",
|
|
810
|
+
"type": {
|
|
811
|
+
"text": "undefined | MediaStream"
|
|
812
|
+
},
|
|
813
|
+
"description": "Live microphone or WebRTC audio to analyze. JS property only.",
|
|
814
|
+
"privacy": "public"
|
|
815
|
+
},
|
|
816
|
+
{
|
|
817
|
+
"kind": "field",
|
|
818
|
+
"name": "audioElement",
|
|
819
|
+
"type": {
|
|
820
|
+
"text": "undefined | HTMLMediaElement"
|
|
821
|
+
},
|
|
822
|
+
"description": "An `<audio>` or `<video>` element to tap for its audio. JS property only.",
|
|
823
|
+
"privacy": "public"
|
|
824
|
+
},
|
|
825
|
+
{
|
|
826
|
+
"kind": "field",
|
|
827
|
+
"name": "bands",
|
|
828
|
+
"type": {
|
|
829
|
+
"text": "undefined | number[]"
|
|
830
|
+
},
|
|
831
|
+
"description": "Pre-computed levels, 0..1. Set this and no AudioContext is ever built, which is what keeps headless/SSR rendering and browser-speech-synthesis playback (which exposes no audio node) free of Web Audio entirely. JS property only. A new array reference is required for each update; mutating the existing array in place will not re-render.",
|
|
832
|
+
"privacy": "public"
|
|
833
|
+
},
|
|
834
|
+
{
|
|
835
|
+
"kind": "field",
|
|
836
|
+
"name": "shader",
|
|
837
|
+
"type": {
|
|
838
|
+
"text": "undefined | { fragment: string; uniforms?: undefined | Record<string, { type: \"1f\" | \"1i\" | \"1fv\" | \"2f\" | \"3f\" | \"3fv\" | \"4f\" | \"4fv\" | \"Matrix2fv\" | \"Matrix3fv\" | \"Matrix4fv\"; value: number | number[] }> }"
|
|
839
|
+
},
|
|
840
|
+
"description": "Custom fragment shader for `variant=\"custom\"`. JS property only.",
|
|
841
|
+
"privacy": "public"
|
|
842
|
+
},
|
|
843
|
+
{
|
|
844
|
+
"kind": "field",
|
|
845
|
+
"name": "animateWhenNotVisible",
|
|
846
|
+
"type": {
|
|
847
|
+
"text": "undefined | false | true"
|
|
848
|
+
},
|
|
849
|
+
"description": "Shader variants only: keep animating while scrolled off screen. Off by default, which stops drawing and releases the WebGL context until the element comes back (browsers ration contexts to roughly 16 a page). Does not override `prefers-reduced-motion`. Attribute: `animate-when-not-visible`.",
|
|
850
|
+
"privacy": "public"
|
|
851
|
+
}
|
|
852
|
+
],
|
|
853
|
+
"attributes": [
|
|
854
|
+
{
|
|
855
|
+
"name": "theme",
|
|
856
|
+
"type": {
|
|
857
|
+
"text": "'light' | 'dark' | 'auto'"
|
|
858
|
+
},
|
|
859
|
+
"description": "Color mode (auto follows prefers-color-scheme)."
|
|
860
|
+
},
|
|
861
|
+
{
|
|
862
|
+
"name": "variant",
|
|
863
|
+
"fieldName": "variant",
|
|
864
|
+
"type": {
|
|
865
|
+
"text": "undefined | string"
|
|
866
|
+
},
|
|
867
|
+
"description": "Look to render: `bar` (default), `grid`, `radial`, `wave`, `aurora`, `custom`. `aura` is accepted as a LiveKit-markup alias for `aurora`. Attribute: `variant`."
|
|
868
|
+
},
|
|
869
|
+
{
|
|
870
|
+
"name": "state",
|
|
871
|
+
"fieldName": "state",
|
|
872
|
+
"type": {
|
|
873
|
+
"text": "undefined | string"
|
|
874
|
+
},
|
|
875
|
+
"description": "`idle` (default), `connecting`, `listening`, `thinking`, `speaking`, `disconnected` (connection down: the dead, flat look). LiveKit's room-lifecycle state names are accepted as aliases. Attribute: `state`."
|
|
876
|
+
},
|
|
877
|
+
{
|
|
878
|
+
"name": "size",
|
|
879
|
+
"fieldName": "size",
|
|
880
|
+
"type": {
|
|
881
|
+
"text": "undefined | string"
|
|
882
|
+
},
|
|
883
|
+
"description": "`icon` | `sm` | `md` (default) | `lg` | `xl`. Attribute: `size`."
|
|
884
|
+
},
|
|
885
|
+
{
|
|
886
|
+
"name": "bar-count",
|
|
887
|
+
"fieldName": "barCount",
|
|
888
|
+
"type": {
|
|
889
|
+
"text": "undefined | number"
|
|
890
|
+
},
|
|
891
|
+
"description": "Bars to draw. Bar and radial only. Attribute: `bar-count`."
|
|
892
|
+
},
|
|
893
|
+
{
|
|
894
|
+
"name": "count",
|
|
895
|
+
"fieldName": "count",
|
|
896
|
+
"type": {
|
|
897
|
+
"text": "undefined | number"
|
|
898
|
+
},
|
|
899
|
+
"description": "Grid only: rows and columns of the (always square) grid. Attribute: `count`."
|
|
900
|
+
},
|
|
901
|
+
{
|
|
902
|
+
"name": "radius",
|
|
903
|
+
"fieldName": "radius",
|
|
904
|
+
"type": {
|
|
905
|
+
"text": "undefined | number"
|
|
906
|
+
},
|
|
907
|
+
"description": "Radial only: ring distance from center, in px. Attribute: `radius`."
|
|
908
|
+
},
|
|
909
|
+
{
|
|
910
|
+
"name": "spread",
|
|
911
|
+
"fieldName": "spread",
|
|
912
|
+
"type": {
|
|
913
|
+
"text": "undefined | number"
|
|
914
|
+
},
|
|
915
|
+
"description": "Grid only: ring distance for the connecting animation, in cells. Attribute: `spread`."
|
|
916
|
+
},
|
|
917
|
+
{
|
|
918
|
+
"name": "interval",
|
|
919
|
+
"fieldName": "interval",
|
|
920
|
+
"type": {
|
|
921
|
+
"text": "undefined | number"
|
|
922
|
+
},
|
|
923
|
+
"description": "Grid only: ms between scripted frames. Attribute: `interval`."
|
|
924
|
+
},
|
|
925
|
+
{
|
|
926
|
+
"name": "color",
|
|
927
|
+
"fieldName": "color",
|
|
928
|
+
"type": {
|
|
929
|
+
"text": "undefined | string"
|
|
930
|
+
},
|
|
931
|
+
"description": "CSS color for the geometry, overriding the inherited `currentColor`. Attribute: `color`."
|
|
932
|
+
},
|
|
933
|
+
{
|
|
934
|
+
"name": "complexity",
|
|
935
|
+
"fieldName": "complexity",
|
|
936
|
+
"type": {
|
|
937
|
+
"text": "undefined | number"
|
|
938
|
+
},
|
|
939
|
+
"description": "Shader variants only: pattern density, 0..1. Attribute: `complexity`."
|
|
940
|
+
},
|
|
941
|
+
{
|
|
942
|
+
"name": "label",
|
|
943
|
+
"fieldName": "label",
|
|
944
|
+
"type": {
|
|
945
|
+
"text": "undefined | string"
|
|
946
|
+
},
|
|
947
|
+
"description": "Setting this makes the element an announced image (`role=\"img\"`) instead of decorative (`aria-hidden`). Attribute: `label`."
|
|
948
|
+
},
|
|
949
|
+
{
|
|
950
|
+
"name": "animate-when-not-visible",
|
|
951
|
+
"fieldName": "animateWhenNotVisible",
|
|
952
|
+
"type": {
|
|
953
|
+
"text": "undefined | false | true"
|
|
954
|
+
},
|
|
955
|
+
"description": "Shader variants only: keep animating while scrolled off screen. Off by default, which stops drawing and releases the WebGL context until the element comes back (browsers ration contexts to roughly 16 a page). Does not override `prefers-reduced-motion`. Attribute: `animate-when-not-visible`."
|
|
956
|
+
}
|
|
957
|
+
],
|
|
958
|
+
"events": [],
|
|
959
|
+
"cssProperties": [],
|
|
960
|
+
"cssParts": [
|
|
961
|
+
{
|
|
962
|
+
"name": "bar",
|
|
963
|
+
"description": "A single bar in the `bar` variant, or a single spoke in the `radial` variant. Also carries `data-kai-index` and `data-kai-highlighted` (\"true\"/\"false\") for use inside the shadow root; to style the lit state from OUTSIDE, combine with the `highlighted` part below rather than an attribute selector.",
|
|
964
|
+
"recipe": "kai-audio-visualizer::part(bar) { border-radius: 2px }\nkai-audio-visualizer::part(bar highlighted) { background: var(--brand) }"
|
|
965
|
+
},
|
|
966
|
+
{
|
|
967
|
+
"name": "cell",
|
|
968
|
+
"description": "A single dot in the `grid` variant. Also carries `data-kai-index` and `data-kai-highlighted` (\"true\"/\"false\") for use inside the shadow root; to style the lit state from OUTSIDE, combine with the `highlighted` part below rather than an attribute selector.",
|
|
969
|
+
"recipe": "kai-audio-visualizer::part(cell) { border-radius: 9999px }\nkai-audio-visualizer::part(cell highlighted) { background: var(--brand) }"
|
|
970
|
+
},
|
|
971
|
+
{
|
|
972
|
+
"name": "highlighted",
|
|
973
|
+
"description": "A second part TOKEN present on a `bar` or `cell` exactly when the sequencer or live audio has it lit, not a standalone styleable element. Combine it in the same `::part()` argument: `::part(bar highlighted)` or `::part(cell highlighted)`. This is the external equivalent of the internal `data-kai-highlighted=\"true\"` attribute, which a `::part()` selector cannot reach (an attribute selector cannot follow a pseudo-element).",
|
|
974
|
+
"recipe": "kai-audio-visualizer::part(bar highlighted) { background: var(--brand) }\nkai-audio-visualizer::part(cell highlighted) { background: var(--brand) }"
|
|
975
|
+
},
|
|
976
|
+
{
|
|
977
|
+
"name": "canvas",
|
|
978
|
+
"description": "The WebGL canvas backing the `wave` and `aurora` variants. Restyle its size or radius, or layer a mask/filter, from outside.",
|
|
979
|
+
"recipe": "kai-audio-visualizer::part(canvas) { border-radius: 0.75rem }"
|
|
980
|
+
}
|
|
981
|
+
]
|
|
982
|
+
},
|
|
701
983
|
{
|
|
702
984
|
"kind": "class",
|
|
703
985
|
"customElement": true,
|
|
@@ -7771,6 +8053,15 @@
|
|
|
7771
8053
|
},
|
|
7772
8054
|
"description": "Which item index is maximized (null = none). Declarative source of truth.",
|
|
7773
8055
|
"privacy": "public"
|
|
8056
|
+
},
|
|
8057
|
+
{
|
|
8058
|
+
"kind": "field",
|
|
8059
|
+
"name": "handle",
|
|
8060
|
+
"type": {
|
|
8061
|
+
"text": "undefined | \"none\" | \"line\" | \"grip\""
|
|
8062
|
+
},
|
|
8063
|
+
"description": "Divider affordance drawn inside each draggable handle's 8px grab zone: - `line` (default) — a 1px hairline, transparent at rest, tinting on hover/drag. - `grip` — a dotted grip handle. - `none` — no visible divider, just the invisible hit-area. The full grab zone and keyboard/ARIA behavior are identical for all three.",
|
|
8064
|
+
"privacy": "public"
|
|
7774
8065
|
}
|
|
7775
8066
|
],
|
|
7776
8067
|
"attributes": [
|
|
@@ -7788,6 +8079,14 @@
|
|
|
7788
8079
|
"text": "undefined | \"vertical\" | \"horizontal\""
|
|
7789
8080
|
},
|
|
7790
8081
|
"description": "Layout axis: `horizontal` (row, default) or `vertical` (column)."
|
|
8082
|
+
},
|
|
8083
|
+
{
|
|
8084
|
+
"name": "handle",
|
|
8085
|
+
"fieldName": "handle",
|
|
8086
|
+
"type": {
|
|
8087
|
+
"text": "undefined | \"none\" | \"line\" | \"grip\""
|
|
8088
|
+
},
|
|
8089
|
+
"description": "Divider affordance drawn inside each draggable handle's 8px grab zone: - `line` (default) — a 1px hairline, transparent at rest, tinting on hover/drag. - `grip` — a dotted grip handle. - `none` — no visible divider, just the invisible hit-area. The full grab zone and keyboard/ARIA behavior are identical for all three."
|
|
7791
8090
|
}
|
|
7792
8091
|
],
|
|
7793
8092
|
"events": [
|
|
@@ -10153,6 +10452,184 @@
|
|
|
10153
10452
|
],
|
|
10154
10453
|
"cssProperties": []
|
|
10155
10454
|
},
|
|
10455
|
+
{
|
|
10456
|
+
"kind": "class",
|
|
10457
|
+
"customElement": true,
|
|
10458
|
+
"tagName": "kai-thread",
|
|
10459
|
+
"name": "KaiThreadElement",
|
|
10460
|
+
"description": "",
|
|
10461
|
+
"members": [
|
|
10462
|
+
{
|
|
10463
|
+
"kind": "field",
|
|
10464
|
+
"name": "messages",
|
|
10465
|
+
"type": {
|
|
10466
|
+
"text": "undefined | { id: string; role: \"user\" | \"assistant\"; content: string; reasoning?: undefined | { text: string; label?: undefined | string }; tools?: undefined | { type: string; state: \"input-streaming\" | \"input-available\" | \"output-available\" | \"output-error\"; input?: undefined | Record<string, unknown>; output?: undefined | Record<string, unknown>; toolCallId?: undefined | string; errorText?: undefined | string }[]; attachments?: undefined | { id: string; type: \"file\" | \"source-document\"; filename?: undefined | string; mediaType?: undefined | string; url?: undefined | string; title?: undefined | string }[]; actions?: undefined | (\"copy\" | \"like\" | \"dislike\" | \"regenerate\" | \"edit\" | { id: string; label: string; icon?: undefined | string; tooltip?: undefined | string })[]; avatar?: undefined | { src?: undefined | string; fallback?: undefined | string; alt?: undefined | string }; feedback?: undefined | \"like\" | \"dislike\" }[]"
|
|
10467
|
+
},
|
|
10468
|
+
"description": "The full message thread to render, newest last. Each entry carries its role, content, and optional reasoning/tools/attachments/actions/avatar. Set as a JS property (`el.messages = [...]`); a NEW array reference per streaming chunk re-renders (mutating in place does not).",
|
|
10469
|
+
"privacy": "public"
|
|
10470
|
+
},
|
|
10471
|
+
{
|
|
10472
|
+
"kind": "field",
|
|
10473
|
+
"name": "loading",
|
|
10474
|
+
"type": {
|
|
10475
|
+
"text": "undefined | false | true"
|
|
10476
|
+
},
|
|
10477
|
+
"description": "Show a typing indicator on the pending assistant turn — set while awaiting the assistant's reply.",
|
|
10478
|
+
"privacy": "public"
|
|
10479
|
+
},
|
|
10480
|
+
{
|
|
10481
|
+
"kind": "field",
|
|
10482
|
+
"name": "proseSize",
|
|
10483
|
+
"type": {
|
|
10484
|
+
"text": "undefined | \"sm\" | \"lg\" | \"xs\" | \"base\""
|
|
10485
|
+
},
|
|
10486
|
+
"description": "Body/prose font scale for rendered markdown (`'xs' | 'sm' | 'base' | 'lg'`). Defaults to `'sm'`.",
|
|
10487
|
+
"privacy": "public"
|
|
10488
|
+
},
|
|
10489
|
+
{
|
|
10490
|
+
"kind": "field",
|
|
10491
|
+
"name": "codeTheme",
|
|
10492
|
+
"type": {
|
|
10493
|
+
"text": "undefined | string"
|
|
10494
|
+
},
|
|
10495
|
+
"description": "Shiki theme name for syntax-highlighted code blocks (e.g. `'github-dark-dimmed'`).",
|
|
10496
|
+
"privacy": "public"
|
|
10497
|
+
},
|
|
10498
|
+
{
|
|
10499
|
+
"kind": "field",
|
|
10500
|
+
"name": "codeHighlight",
|
|
10501
|
+
"type": {
|
|
10502
|
+
"text": "undefined | false | true"
|
|
10503
|
+
},
|
|
10504
|
+
"description": "Enable Shiki syntax highlighting in code blocks. Turn off to render plain `<pre>` blocks (lighter, no highlighter load). Default true.",
|
|
10505
|
+
"privacy": "public"
|
|
10506
|
+
},
|
|
10507
|
+
{
|
|
10508
|
+
"kind": "field",
|
|
10509
|
+
"name": "actionsReveal",
|
|
10510
|
+
"type": {
|
|
10511
|
+
"text": "undefined | \"always\" | \"hover\""
|
|
10512
|
+
},
|
|
10513
|
+
"description": "Whether each message's action bar is always visible (`'always'`, default) or only revealed on hover of that message row (`'hover'`).",
|
|
10514
|
+
"privacy": "public"
|
|
10515
|
+
},
|
|
10516
|
+
{
|
|
10517
|
+
"kind": "field",
|
|
10518
|
+
"name": "scrollButton",
|
|
10519
|
+
"type": {
|
|
10520
|
+
"text": "undefined | false | true"
|
|
10521
|
+
},
|
|
10522
|
+
"description": "Show the scroll-to-bottom button inside the scroll area. Default true.",
|
|
10523
|
+
"privacy": "public"
|
|
10524
|
+
},
|
|
10525
|
+
{
|
|
10526
|
+
"kind": "field",
|
|
10527
|
+
"name": "class",
|
|
10528
|
+
"type": {
|
|
10529
|
+
"text": "undefined | string"
|
|
10530
|
+
},
|
|
10531
|
+
"description": "Extra classes applied to the thread's inner root.",
|
|
10532
|
+
"privacy": "public"
|
|
10533
|
+
},
|
|
10534
|
+
{
|
|
10535
|
+
"kind": "method",
|
|
10536
|
+
"name": "scrollToBottom",
|
|
10537
|
+
"parameters": [
|
|
10538
|
+
{
|
|
10539
|
+
"name": "behavior?: ScrollBehavior"
|
|
10540
|
+
}
|
|
10541
|
+
],
|
|
10542
|
+
"return": {
|
|
10543
|
+
"type": {
|
|
10544
|
+
"text": "void"
|
|
10545
|
+
}
|
|
10546
|
+
},
|
|
10547
|
+
"description": "Scroll the message list to the bottom (default `'smooth'`).",
|
|
10548
|
+
"privacy": "public"
|
|
10549
|
+
}
|
|
10550
|
+
],
|
|
10551
|
+
"attributes": [
|
|
10552
|
+
{
|
|
10553
|
+
"name": "theme",
|
|
10554
|
+
"type": {
|
|
10555
|
+
"text": "'light' | 'dark' | 'auto'"
|
|
10556
|
+
},
|
|
10557
|
+
"description": "Color mode (auto follows prefers-color-scheme)."
|
|
10558
|
+
},
|
|
10559
|
+
{
|
|
10560
|
+
"name": "loading",
|
|
10561
|
+
"fieldName": "loading",
|
|
10562
|
+
"type": {
|
|
10563
|
+
"text": "undefined | false | true"
|
|
10564
|
+
},
|
|
10565
|
+
"description": "Show a typing indicator on the pending assistant turn — set while awaiting the assistant's reply."
|
|
10566
|
+
},
|
|
10567
|
+
{
|
|
10568
|
+
"name": "prose-size",
|
|
10569
|
+
"fieldName": "proseSize",
|
|
10570
|
+
"type": {
|
|
10571
|
+
"text": "undefined | \"sm\" | \"lg\" | \"xs\" | \"base\""
|
|
10572
|
+
},
|
|
10573
|
+
"description": "Body/prose font scale for rendered markdown (`'xs' | 'sm' | 'base' | 'lg'`). Defaults to `'sm'`."
|
|
10574
|
+
},
|
|
10575
|
+
{
|
|
10576
|
+
"name": "code-theme",
|
|
10577
|
+
"fieldName": "codeTheme",
|
|
10578
|
+
"type": {
|
|
10579
|
+
"text": "undefined | string"
|
|
10580
|
+
},
|
|
10581
|
+
"description": "Shiki theme name for syntax-highlighted code blocks (e.g. `'github-dark-dimmed'`)."
|
|
10582
|
+
},
|
|
10583
|
+
{
|
|
10584
|
+
"name": "code-highlight",
|
|
10585
|
+
"fieldName": "codeHighlight",
|
|
10586
|
+
"type": {
|
|
10587
|
+
"text": "undefined | false | true"
|
|
10588
|
+
},
|
|
10589
|
+
"description": "Enable Shiki syntax highlighting in code blocks. Turn off to render plain `<pre>` blocks (lighter, no highlighter load). Default true."
|
|
10590
|
+
},
|
|
10591
|
+
{
|
|
10592
|
+
"name": "actions-reveal",
|
|
10593
|
+
"fieldName": "actionsReveal",
|
|
10594
|
+
"type": {
|
|
10595
|
+
"text": "undefined | \"always\" | \"hover\""
|
|
10596
|
+
},
|
|
10597
|
+
"description": "Whether each message's action bar is always visible (`'always'`, default) or only revealed on hover of that message row (`'hover'`)."
|
|
10598
|
+
},
|
|
10599
|
+
{
|
|
10600
|
+
"name": "scroll-button",
|
|
10601
|
+
"fieldName": "scrollButton",
|
|
10602
|
+
"type": {
|
|
10603
|
+
"text": "undefined | false | true"
|
|
10604
|
+
},
|
|
10605
|
+
"description": "Show the scroll-to-bottom button inside the scroll area. Default true."
|
|
10606
|
+
},
|
|
10607
|
+
{
|
|
10608
|
+
"name": "class",
|
|
10609
|
+
"fieldName": "class",
|
|
10610
|
+
"type": {
|
|
10611
|
+
"text": "undefined | string"
|
|
10612
|
+
},
|
|
10613
|
+
"description": "Extra classes applied to the thread's inner root."
|
|
10614
|
+
}
|
|
10615
|
+
],
|
|
10616
|
+
"events": [
|
|
10617
|
+
{
|
|
10618
|
+
"name": "kai-message-action",
|
|
10619
|
+
"type": {
|
|
10620
|
+
"text": "CustomEvent<{ messageId: string; action: string; state?: undefined | \"on\" | \"off\" }>"
|
|
10621
|
+
},
|
|
10622
|
+
"description": "A message's action button was clicked. `action` is the built-in name (`copy` / `like` / `dislike` / `regenerate` / `edit`) or a custom id. `state` is present only for the toggleable feedback votes: `'on'` when a like/dislike is set, `'off'` when re-tapped to clear."
|
|
10623
|
+
}
|
|
10624
|
+
],
|
|
10625
|
+
"cssProperties": [],
|
|
10626
|
+
"slots": [
|
|
10627
|
+
{
|
|
10628
|
+
"name": "empty",
|
|
10629
|
+
"description": "Custom zero-state rendered in the message area while the thread is empty; replaces the built-in default."
|
|
10630
|
+
}
|
|
10631
|
+
]
|
|
10632
|
+
},
|
|
10156
10633
|
{
|
|
10157
10634
|
"kind": "class",
|
|
10158
10635
|
"customElement": true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as r,m as S,s as q,i,a as f,b as d,S as v,d as m,t as b,e as B,f as I}from"./chunks/define-
|
|
1
|
+
import{c as r,m as S,s as q,i,a as f,b as d,S as v,d as m,t as b,e as B,f as I}from"./chunks/define-D1din7Ld.js";import{c as u}from"./chunks/cn-CU7UAWzk.js";import{I as N}from"./chunks/Icon-Tj58ES_d.js";import{e as j}from"./chunks/ellipsis-Dw6qrss-.js";var D=[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]],E=l=>r(N,S(l,{name:"Bell",iconNode:D})),H=E,L=b("<span aria-hidden=true>"),P=b("<span>"),W=b('<span class="inline-flex items-center gap-1 rounded-full bg-tool-amber/15 px-2 py-0.5 text-[11px] font-medium text-tool-amber">Needs you'),O=b("<button type=button part=menu aria-label=More>"),R=b('<div><span class="inline-flex shrink-0 items-center gap-1.5"role=status><span class="relative inline-flex"><span aria-hidden=true part=status></span></span></span><button type=button><span class="block truncate text-sm font-medium leading-tight text-foreground"></span></button><span class="flex shrink-0 items-center gap-2">');const M={working:"bg-tool-blue",idle:"bg-muted-foreground",done:"bg-tool-green",error:"bg-tool-red",blocked:"bg-tool-amber"},T={working:"text-tool-blue",idle:"text-muted-foreground",done:"text-tool-green",error:"text-tool-red",blocked:"text-tool-amber"},X={working:"Working",idle:"Idle",done:"Done",error:"Error",blocked:"Blocked"};function _(l){const[t]=q(l,["name","status","needsAttention","active","onActivate","onClick","onMenu","class","leading","subtitle","lastLine"]),o=()=>t.status.tone,z=()=>{var n,a;(n=t.onActivate)==null||n.call(t),(a=t.onClick)==null||a.call(t)};return(()=>{var n=R(),a=n.firstChild,p=a.firstChild,h=p.firstChild,c=a.nextSibling,$=c.firstChild,x=c.nextSibling;return i(p,r(v,{get when(){return t.status.pulse},get children(){var e=L();return f(()=>d(e,u("absolute inline-flex h-full w-full animate-ping rounded-full opacity-75 motion-reduce:hidden",M[o()]))),e}}),h),i(a,r(v,{get when(){return t.status.label},get children(){var e=P();return i(e,()=>t.status.label),f(()=>d(e,u("text-[11px] font-medium leading-none",T[o()]))),e}}),null),c.$$click=z,i($,()=>t.name),i(x,r(v,{get when(){return t.needsAttention},get children(){var e=W(),s=e.firstChild;return i(e,r(H,{class:"size-3","aria-hidden":"true"}),s),e}}),null),i(x,r(v,{get when(){return t.onMenu},get children(){var e=O();return e.$$click=s=>{var g;s.stopPropagation(),(g=t.onMenu)==null||g.call(t,s)},i(e,r(j,{class:"size-4","aria-hidden":"true"})),f(()=>d(e,u("relative z-10 inline-flex size-7 shrink-0 items-center justify-center rounded-md","text-muted-foreground outline-none transition-colors","hover:bg-surface-sunken hover:text-foreground","focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring"))),e}}),null),f(e=>{var s=t.active?"":void 0,g=t.needsAttention?"":void 0,k=u("group relative flex w-full cursor-pointer items-center gap-3 rounded-lg border px-3 py-2.5 text-left","transition-[background-color,border-color,box-shadow]",t.active?"border-primary bg-accent":"border-border bg-surface hover:bg-accent",t.needsAttention&&"border-tool-amber/50 ring-2 ring-inset ring-tool-amber/60",t.class),w=t.status.label??X[o()],y=u("relative inline-block size-2 rounded-full",M[o()]),A=t.active?"true":void 0,C=u("min-w-0 flex-1 text-left outline-none","before:absolute before:inset-0 before:rounded-lg before:content-['']","focus-visible:before:ring-2 focus-visible:before:ring-inset focus-visible:before:ring-ring");return s!==e.e&&m(n,"data-active",e.e=s),g!==e.t&&m(n,"data-needs-attention",e.t=g),k!==e.a&&d(n,e.a=k),w!==e.o&&m(a,"aria-label",e.o=w),y!==e.i&&d(h,e.i=y),A!==e.n&&m(c,"aria-current",e.n=A),C!==e.s&&d(c,e.s=C),e},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0}),n})()}B(["click"]),I("kai-agent-card",{name:void 0,active:void 0,needsAttention:void 0,status:void 0},(l,{dispatch:t,flag:o})=>r(_,{get name(){return l.name??""},get active(){return o("active")},get needsAttention(){return o("needsAttention")},get status(){return l.status??{tone:"idle"}},onActivate:()=>t("kai-activate"),onMenu:()=>t("kai-menu")}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as a,m as P,s as ce,g as k,h as F,j as C,o as j,k as he,i as f,S as b,t as v,d as p,a as y,b as Z,l as J,u as Q,n as ge,p as X,e as fe,f as be}from"./chunks/define-CNSKFZCd.js";import{c as E}from"./chunks/cn-CU7UAWzk.js";import{B as z}from"./chunks/button-DBDZebGr.js";import{C as me,a as ve}from"./chunks/code-block-DZ6mz6vs.js";import{F as pe}from"./chunks/file-tree-DQzNQrbr.js";import{L as we}from"./chunks/loader-Cg6rO8tQ.js";import{a as xe}from"./chunks/arrow-left-GbBceGBE.js";import{I as Y}from"./chunks/Icon-C2LTALdM.js";import{r as ke,h as ye,c as ze}from"./chunks/rotate-cw-jpisOdOV.js";import{d as Te}from"./chunks/download-BDQwcFav.js";import{e as ee}from"./chunks/external-link-DJUmC7g2.js";import{f as Fe}from"./chunks/file-text-DOYfYvrh.js";import{m as Ce,a as Pe}from"./chunks/minimize-2-3kCdE0q3.js";var Re=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Se=r=>a(Y,P(r,{name:"ArrowRight",iconNode:Re})),Oe=Se,Ne=[["path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z",key:"rwhkz3"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Ie=r=>a(Y,P(r,{name:"Eye",iconNode:Ne})),je=Ie;const Ee="6.0.227",re=`https://cdn.jsdelivr.net/npm/pdfjs-dist@${Ee}/build`,He=()=>import(`${re}/pdf.min.mjs`),Me=`${re}/pdf.worker.min.mjs`;let Ue=He,Le=Me,H=null;function $e(){if(!H){const r=Ue;H=(async()=>{const n=await r(),e=n.default??n;return e.GlobalWorkerOptions.workerSrc=Le,e})()}return H}async function Be(r,n,e){const l=await(await $e()).getDocument({url:r}).promise;n.replaceChildren();const s=typeof window<"u"&&window.devicePixelRatio?window.devicePixelRatio:1;for(let d=1;d<=l.numPages;d++){const c=await l.getPage(d),i=c.getViewport({scale:1}),h=i.width>0?e/i.width:1,u=c.getViewport({scale:h*s}),g=document.createElement("canvas");g.width=Math.max(1,Math.floor(u.width)),g.height=Math.max(1,Math.floor(u.height)),g.setAttribute("role","img"),g.setAttribute("aria-label",`Page ${d}`),g.style.width="100%",g.style.height="auto",g.style.display="block";const w=g.getContext("2d");n.appendChild(g),await c.render({canvasContext:w,viewport:u}).promise}return{pages:l.numPages}}var De=v('<div><div class="relative min-h-0 flex-1">'),Ae=v('<form class="min-w-0 flex-1"><label class=sr-only for=kai-artifact-path>Address</label><input id=kai-artifact-path name=kai-artifact-path type=text autocomplete=off placeholder="Enter a path or URL\u2026">'),Ve=v("<div class=flex-1 aria-hidden=true>"),We=v('<div role=tablist aria-label=View class="flex shrink-0 items-center gap-0.5 rounded-md bg-muted p-0.5">'),qe=v('<div data-artifact-toolbar class="flex shrink-0 items-center gap-1.5 border-b border-border bg-surface px-2 py-1.5">'),Ke=v("<button type=button role=tab>"),_e=v('<iframe class="absolute inset-0 h-full w-full border-0 bg-white">'),Ge=v('<div class="absolute inset-0 flex"><div class="w-56 shrink-0 overflow-auto border-r border-border bg-surface-sunken py-1.5 scrollbar-thin"></div><div class="min-w-0 flex-1 overflow-auto scrollbar-thin">'),Ze=v('<div class="flex h-full items-center justify-center p-6 text-sm text-muted-foreground">Select a file to view its source.'),Je=v('<div class="flex h-full items-center justify-center p-6 text-sm text-muted-foreground">No source \u2014 this file (<!>) has no code view.'),Qe=v(`<div role=region aria-label="PDF preview unavailable"class="absolute inset-0 flex flex-col items-center justify-center gap-3 bg-card p-6 text-center"><div class="text-sm font-medium text-foreground"></div><div class="text-xs text-muted-foreground">Can't preview this PDF inline.</div><div class="flex flex-wrap items-center justify-center gap-2"><a class="inline-flex h-8 items-center gap-1.5 rounded-md border border-border bg-background px-3 text-xs font-medium text-foreground transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"target=_blank rel="noopener noreferrer">Open in new tab</a><a class="inline-flex h-8 items-center gap-1.5 rounded-md border border-border bg-background px-3 text-xs font-medium text-foreground transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"download>Download`),Xe=v('<div class="pointer-events-none absolute inset-0 flex items-center justify-center">'),Ye=v('<div class="absolute inset-0"><div role=region aria-label="PDF preview"tabindex=0 class="absolute inset-0 flex flex-col items-center gap-3 overflow-auto bg-surface-sunken p-3 scrollbar-thin focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset">');const er="allow-scripts allow-forms";function rr(r,n){if(r.url)return r.url;if(!n)return r.path;try{return new URL(r.path,n).href}catch{return r.path}}function tr(r,n){if(!r)return!1;const e=n.find(s=>s.url===r||s.path===r);if(e?.type==="pdf")return!0;const l=r.split(/[?#]/)[0];return/\.pdf$/i.test(l)}function nr(r){const n=P({files:[],defaultTab:"preview",sandbox:er,showNav:!0,showReload:!0,showHome:!0,showPathField:!0,showTabs:!0,expandable:!1,openInTab:!1,standalone:!1,readonlyPath:!1,maximized:!1},r),[e,l]=ce(n,["src","files","tab","defaultTab","activeFile","sandbox","iframeTitle","onNavigate","onTabChange","onFileSelect","maximized","onMaximizeChange","showNav","showReload","showHome","showPathField","showTabs","expandable","openInTab","standalone","readonlyPath","displayUrl","controllerRef","class"]),[s,d]=k(e.src?[e.src]:[]),[c,i]=k(e.src?0:-1),h=()=>s()[c()]??"",u=()=>c()>0,g=()=>c()<s().length-1,[w,M]=k(e.tab??e.defaultTab),[U,L]=k(e.activeFile),[ne,ae]=k(0),[R,S]=k(e.maximized??!1);F(()=>S(e.maximized??!1));const ie=()=>{var t;const o=!R();S(o),(t=e.onMaximizeChange)==null||t.call(e,o)},$=C(()=>{const t=h();return!!t&&t!=="about:blank"}),B=()=>{$()&&window.open(h(),"_blank","noopener,noreferrer")},D=C(()=>e.expandable&&!e.standalone),le=C(()=>e.showNav||e.showReload||e.showHome||e.showPathField||e.showTabs||D()||e.openInTab);let x;F(()=>{e.tab!==void 0&&M(e.tab)}),F(()=>L(e.activeFile)),F(J(()=>e.src,t=>{t&&t!==h()&&T(t)},{defer:!0}));const A=t=>t===void 0?void 0:e.files.find(o=>o.path===t),V=C(()=>A(U())),oe=C(()=>{const t=V();return!!t&&t.type!=="image"&&t.type!=="pdf"&&typeof t.code=="string"});function T(t){if(t===h()){N();return}d(o=>[...o.slice(0,c()+1),t]),i(o=>o+1),O()}function O(){var t;const o=h();x&&(x.src=o||"about:blank"),(t=e.onNavigate)==null||t.call(e,o)}function se(t){var o;t!==w()&&(M(t),(o=e.onTabChange)==null||o.call(e,t))}function W(t,o){var m;L(t),(m=e.onFileSelect)==null||m.call(e,t),T(rr(o,e.src))}const q=()=>{u()&&(i(t=>t-1),O())},K=()=>{g()&&(i(t=>t+1),O())};function N(){var t;const o=h();x&&(x.src="about:blank",x.src=o||"about:blank"),ae(m=>m+1),(t=e.onNavigate)==null||t.call(e,o)}const _=()=>{e.src&&T(e.src)},G=t=>{var o;R()!==t&&(S(t),(o=e.onMaximizeChange)==null||o.call(e,t))};j(()=>{var t;(t=e.controllerRef)==null||t.call(e,{back:()=>q(),forward:()=>K(),reload:()=>N(),home:()=>_(),navigate:o=>T(o),selectFile:o=>{const m=A(o);m&&W(o,m)},openExternal:()=>B(),maximize:()=>G(!0),restore:()=>G(!1)})});const de=()=>{var t,o;try{const m=(t=x?.contentWindow)==null?void 0:t.location.href;m&&m!=="about:blank"&&m!==h()&&(d(I=>[...I.slice(0,c()+1),m]),i(I=>I+1),(o=e.onNavigate)==null||o.call(e,m))}catch{}},ue=t=>{t.preventDefault();const o=t.currentTarget.elements.namedItem("kai-artifact-path");if(e.readonlyPath||e.displayUrl!=null){o&&(o.value=e.displayUrl??h());return}o&&o.value&&T(o.value)};return(()=>{var t=De(),o=t.firstChild;return he(t,P({get class(){return E("flex h-full w-full flex-col overflow-hidden bg-card text-card-foreground",e.standalone&&"rounded-xl border border-border",e.class)}},l),!1,!0),f(t,a(b,{get when(){return le()},get children(){return a(ar,{url:()=>e.displayUrl??h(),tab:w,canBack:u,canForward:g,canHome:()=>!!e.src,onBack:q,onForward:K,onReload:N,onHome:_,onSubmitPath:ue,onTab:se,showNav:()=>e.showNav,showReload:()=>e.showReload,showHome:()=>e.showHome,showPathField:()=>e.showPathField,showTabs:()=>e.showTabs,showExpand:D,showOpenInTab:()=>e.openInTab,maximized:R,onToggleMaximize:ie,canOpenInTab:$,onOpenInTab:B,readonlyPath:()=>e.readonlyPath||e.displayUrl!=null})}}),o),f(o,a(b,{get when(){return w()==="preview"},get fallback(){return a(lr,{get files(){return e.files},activeFile:U,activeFileObj:V,hasSource:oe,onSelect:W})},get children(){return a(b,{get when(){return tr(h(),e.files)},get fallback(){return a(ir,{ref:m=>x=m,src:h,get sandbox(){return e.sandbox},get title(){return e.iframeTitle??"Artifact preview"},onLoad:de})},get children(){return a(sr,{get url(){return h()},get reloadKey(){return ne()}})}})}})),t})()}function ar(r){return(()=>{var n=qe();return f(n,a(b,{get when(){return r.showNav()},get children(){return[a(z,{variant:"ghost",size:"icon-sm","aria-label":"Back",get disabled(){return!r.canBack()},onClick:()=>r.onBack(),get children(){return a(xe,{size:16,"aria-hidden":"true"})}}),a(z,{variant:"ghost",size:"icon-sm","aria-label":"Forward",get disabled(){return!r.canForward()},onClick:()=>r.onForward(),get children(){return a(Oe,{size:16,"aria-hidden":"true"})}})]}}),null),f(n,a(b,{get when(){return r.showReload()},get children(){return a(z,{variant:"ghost",size:"icon-sm","aria-label":"Reload",onClick:()=>r.onReload(),get children(){return a(ke,{size:15,"aria-hidden":"true"})}})}}),null),f(n,a(b,{get when(){return r.showHome()},get children(){return a(z,{variant:"ghost",size:"icon-sm","aria-label":"Home",get disabled(){return!r.canHome()},onClick:()=>r.onHome(),get children(){return a(ye,{size:15,"aria-hidden":"true"})}})}}),null),f(n,a(b,{get when(){return r.showPathField()},get children(){var e=Ae(),l=e.firstChild,s=l.nextSibling;return e.addEventListener("submit",d=>r.onSubmitPath(d)),p(s,"spellcheck",!1),y(d=>{var c=r.readonlyPath()||void 0,i=r.readonlyPath()?"true":void 0,h=E("h-7 w-full rounded-md border border-border px-2.5 text-xs text-foreground font-mono outline-none",r.readonlyPath()?"bg-muted/40 cursor-default":"bg-background focus-visible:ring-2 focus-visible:ring-ring");return c!==d.e&&(s.readOnly=d.e=c),i!==d.t&&p(s,"aria-readonly",d.t=i),h!==d.a&&Z(s,d.a=h),d},{e:void 0,t:void 0,a:void 0}),y(()=>s.value=r.url()),e}}),null),f(n,a(b,{get when(){return!r.showPathField()},get children(){return Ve()}}),null),f(n,a(b,{get when(){return r.showExpand()},get children(){return a(z,{variant:"ghost",size:"icon-sm",get"aria-label"(){return r.maximized()?"Collapse":"Expand"},get"aria-expanded"(){return r.maximized()},onClick:()=>r.onToggleMaximize(),get children(){return a(b,{get when(){return r.maximized()},get fallback(){return a(Pe,{size:15,"aria-hidden":"true"})},get children(){return a(Ce,{size:15,"aria-hidden":"true"})}})}})}}),null),f(n,a(b,{get when(){return r.showOpenInTab()},get children(){return a(z,{variant:"ghost",size:"icon-sm","aria-label":"Open in new tab",get disabled(){return!r.canOpenInTab()},onClick:()=>r.onOpenInTab(),get children(){return a(ee,{size:15,"aria-hidden":"true"})}})}}),null),f(n,a(b,{get when(){return r.showTabs()},get children(){var e=We();return f(e,a(te,{label:"Preview",get icon(){return a(je,{size:14,"aria-hidden":"true"})},get selected(){return r.tab()==="preview"},onClick:()=>r.onTab("preview")}),null),f(e,a(te,{label:"Code",get icon(){return a(ze,{size:14,"aria-hidden":"true"})},get selected(){return r.tab()==="code"},onClick:()=>r.onTab("code")}),null),e}}),null),n})()}function te(r){return(()=>{var n=Ke();return n.$$click=()=>r.onClick(),f(n,()=>r.icon,null),f(n,()=>r.label,null),y(e=>{var l=r.selected,s=E("inline-flex h-6 items-center gap-1.5 rounded px-2 text-xs font-medium transition-colors outline-none","focus-visible:ring-2 focus-visible:ring-ring",r.selected?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground");return l!==e.e&&p(n,"aria-selected",e.e=l),s!==e.t&&Z(n,e.t=s),e},{e:void 0,t:void 0}),n})()}function ir(r){return(()=>{var n=_e();n.addEventListener("load",()=>r.onLoad());var e=r.ref;return typeof e=="function"?Q(e,n):r.ref=n,y(l=>{var s=r.src()||"about:blank",d=r.sandbox,c=r.title;return s!==l.e&&p(n,"src",l.e=s),d!==l.t&&p(n,"sandbox",l.t=d),c!==l.a&&p(n,"title",l.a=c),l},{e:void 0,t:void 0,a:void 0}),n})()}function lr(r){return(()=>{var n=Ge(),e=n.firstChild,l=e.nextSibling;return f(e,a(pe,{get files(){return r.files},get activeFile(){return r.activeFile()},onSelect:(s,d)=>r.onSelect(s,d)})),f(l,a(b,{get when(){return r.activeFileObj()},get fallback(){return Ze()},get children(){return a(b,{get when(){return r.hasSource()},get fallback(){return(()=>{var s=Je(),d=s.firstChild,c=d.nextSibling;return c.nextSibling,f(s,()=>r.activeFileObj().type??"binary",c),s})()},get children(){return a(me,{class:"h-full rounded-none border-0",get children(){return a(ve,{get code(){return r.activeFileObj().code??""},get language(){return r.activeFileObj().language}})}})}})}})),n})()}function or(r){const n=()=>{const e=r.url.split(/[?#]/)[0];return e.slice(e.lastIndexOf("/")+1)||"document.pdf"};return(()=>{var e=Qe(),l=e.firstChild,s=l.nextSibling,d=s.nextSibling,c=d.firstChild;c.firstChild;var i=c.nextSibling,h=i.firstChild;return f(e,a(Fe,{size:40,class:"text-muted-foreground","aria-hidden":"true"}),l),f(l,n),f(c,a(ee,{size:13,"aria-hidden":"true"}),null),f(i,a(Te,{size:13,"aria-hidden":"true"}),h),y(u=>{var g=r.url,w=r.url;return g!==u.e&&p(c,"href",u.e=g),w!==u.t&&p(i,"href",u.t=w),u},{e:void 0,t:void 0}),e})()}function sr(r){const[n,e]=k("loading");let l,s=0,d;const c=async()=>{if(!l){e("error");return}const i=++s;e("loading");try{const h=l.clientWidth||600;await Be(r.url,l,h),i===s&&e("success")}catch{i===s&&e("error")}};return F(J(()=>[r.url,r.reloadKey],()=>{c()})),j(()=>{if(!l||typeof ResizeObserver>"u")return;const i=new ResizeObserver(()=>{n()==="success"&&(clearTimeout(d),d=setTimeout(()=>{c()},200))});i.observe(l),X(()=>{i.disconnect(),clearTimeout(d),s++})}),(()=>{var i=Ye(),h=i.firstChild;return Q(u=>l=u,h),f(i,a(b,{get when(){return ge(()=>!0)()&&n()==="loading"},get children(){var u=Xe();return f(u,a(we,{variant:"circular",size:"md"})),u}}),null),f(i,a(b,{get when(){return n()==="error"},get children(){return a(or,{get url(){return r.url}})}}),null),y(()=>p(h,"aria-busy",n()==="loading")),i})()}fe(["click"]);var dr=v("<style>:host{display:block;height:100%;min-height:0}"),ur=v('<div style="display:grid;grid-template-rows:minmax(0, 1fr);grid-template-columns:minmax(0, 1fr);height:100%;min-height:0">');be("kai-artifact",{src:void 0,files:[],tab:void 0,defaultTab:void 0,activeFile:void 0,sandbox:"allow-scripts allow-forms",iframeTitle:void 0,maximized:!1,expandable:!1,openInTab:!1,noNav:!1,noReload:!1,noHome:!1,noPathField:!1,noTabs:!1,standalone:!1,readonlyPath:!1,displayUrl:void 0},(r,{element:n,dispatch:e,flag:l,expose:s})=>{const[d,c]=k(l("maximized"));let i;s({back:()=>i?.back(),forward:()=>i?.forward(),reload:()=>i?.reload(),home:()=>i?.home(),navigate:u=>i?.navigate(u),selectFile:u=>i?.selectFile(u),openExternal:()=>i?.openExternal(),maximize:()=>i?.maximize(),restore:()=>i?.restore()});const h=u=>{c(u),n.dispatchEvent(new CustomEvent("kai-maximize-intent",{detail:{requested:u},bubbles:!0,composed:!0})),e("kai-maximize-change",{maximized:u})};return j(()=>{const u=g=>c(g.detail.maximized);n.addEventListener("kai-maximize-state",u),X(()=>n.removeEventListener("kai-maximize-state",u))}),[dr(),(()=>{var u=ur();return f(u,a(nr,{get src(){return r.src},get files(){return r.files},get tab(){return r.tab},get defaultTab(){return r.defaultTab},get activeFile(){return r.activeFile},get sandbox(){return r.sandbox},get iframeTitle(){return r.iframeTitle},get maximized(){return d()},get expandable(){return l("expandable")},get openInTab(){return l("openInTab")},get showNav(){return!l("noNav")},get showReload(){return!l("noReload")},get showHome(){return!l("noHome")},get showPathField(){return!l("noPathField")},get showTabs(){return!l("noTabs")},get standalone(){return l("standalone")},get readonlyPath(){return l("readonlyPath")},get displayUrl(){return r.displayUrl},onMaximizeChange:h,onNavigate:g=>e("kai-navigate",{url:g}),onTabChange:g=>e("kai-tab-change",{tab:g}),onFileSelect:g=>e("kai-file-select",{path:g}),controllerRef:g=>i=g})),u})()]});
|
|
1
|
+
import{c as a,m as P,s as ce,g as k,h as F,j as C,o as Z,k as j,l as he,i as f,S as b,t as v,d as p,a as y,b as J,u as Q,n as ge,p as X,e as fe,f as be}from"./chunks/define-D1din7Ld.js";import{c as E}from"./chunks/cn-CU7UAWzk.js";import{B as z}from"./chunks/button-ZWNif3--.js";import{C as me,a as ve}from"./chunks/code-block-BFUHn6Va.js";import{F as pe}from"./chunks/file-tree-DF4okKyo.js";import{L as we}from"./chunks/loader-BmQH4s3V.js";import{a as xe}from"./chunks/arrow-left-DQocUFvy.js";import{I as Y}from"./chunks/Icon-Tj58ES_d.js";import{r as ke,h as ye,c as ze}from"./chunks/rotate-cw-CFWWkpj2.js";import{d as Te}from"./chunks/download-Dsbg3ste.js";import{e as ee}from"./chunks/external-link-Vt74zAoL.js";import{f as Fe}from"./chunks/file-text-CZrZF6_v.js";import{m as Ce,a as Pe}from"./chunks/minimize-2--ifeCGrl.js";var Re=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Se=r=>a(Y,P(r,{name:"ArrowRight",iconNode:Re})),Oe=Se,Ne=[["path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z",key:"rwhkz3"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Ie=r=>a(Y,P(r,{name:"Eye",iconNode:Ne})),je=Ie;const Ee="6.0.227",re=`https://cdn.jsdelivr.net/npm/pdfjs-dist@${Ee}/build`,He=()=>import(/*@vite-ignore*/`${re}/pdf.min.mjs`),Me=`${re}/pdf.worker.min.mjs`;let Ue=He,Le=Me,H=null;function $e(){if(!H){const r=Ue;H=(async()=>{const n=await r(),e=n.default??n;return e.GlobalWorkerOptions.workerSrc=Le,e})()}return H}async function Be(r,n,e){const l=await(await $e()).getDocument({url:r}).promise;n.replaceChildren();const s=typeof window<"u"&&window.devicePixelRatio?window.devicePixelRatio:1;for(let d=1;d<=l.numPages;d++){const c=await l.getPage(d),i=c.getViewport({scale:1}),h=i.width>0?e/i.width:1,u=c.getViewport({scale:h*s}),g=document.createElement("canvas");g.width=Math.max(1,Math.floor(u.width)),g.height=Math.max(1,Math.floor(u.height)),g.setAttribute("role","img"),g.setAttribute("aria-label",`Page ${d}`),g.style.width="100%",g.style.height="auto",g.style.display="block";const w=g.getContext("2d");n.appendChild(g),await c.render({canvasContext:w,viewport:u}).promise}return{pages:l.numPages}}var De=v('<div><div class="relative min-h-0 flex-1">'),Ae=v('<form class="min-w-0 flex-1"><label class=sr-only for=kai-artifact-path>Address</label><input id=kai-artifact-path name=kai-artifact-path type=text autocomplete=off placeholder="Enter a path or URL\u2026">'),Ve=v("<div class=flex-1 aria-hidden=true>"),We=v('<div role=tablist aria-label=View class="flex shrink-0 items-center gap-0.5 rounded-md bg-muted p-0.5">'),qe=v('<div data-artifact-toolbar class="flex shrink-0 items-center gap-1.5 border-b border-border bg-surface px-2 py-1.5">'),Ke=v("<button type=button role=tab>"),_e=v('<iframe class="absolute inset-0 h-full w-full border-0 bg-white">'),Ge=v('<div class="absolute inset-0 flex"><div class="w-56 shrink-0 overflow-auto border-r border-border bg-surface-sunken py-1.5 scrollbar-thin"></div><div class="min-w-0 flex-1 overflow-auto scrollbar-thin">'),Ze=v('<div class="flex h-full items-center justify-center p-6 text-sm text-muted-foreground">Select a file to view its source.'),Je=v('<div class="flex h-full items-center justify-center p-6 text-sm text-muted-foreground">No source \u2014 this file (<!>) has no code view.'),Qe=v(`<div role=region aria-label="PDF preview unavailable"class="absolute inset-0 flex flex-col items-center justify-center gap-3 bg-card p-6 text-center"><div class="text-sm font-medium text-foreground"></div><div class="text-xs text-muted-foreground">Can't preview this PDF inline.</div><div class="flex flex-wrap items-center justify-center gap-2"><a class="inline-flex h-8 items-center gap-1.5 rounded-md border border-border bg-background px-3 text-xs font-medium text-foreground transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"target=_blank rel="noopener noreferrer">Open in new tab</a><a class="inline-flex h-8 items-center gap-1.5 rounded-md border border-border bg-background px-3 text-xs font-medium text-foreground transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"download>Download`),Xe=v('<div class="pointer-events-none absolute inset-0 flex items-center justify-center">'),Ye=v('<div class="absolute inset-0"><div role=region aria-label="PDF preview"tabindex=0 class="absolute inset-0 flex flex-col items-center gap-3 overflow-auto bg-surface-sunken p-3 scrollbar-thin focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset">');const er="allow-scripts allow-forms";function rr(r,n){if(r.url)return r.url;if(!n)return r.path;try{return new URL(r.path,n).href}catch{return r.path}}function tr(r,n){if(!r)return!1;const e=n.find(s=>s.url===r||s.path===r);if(e?.type==="pdf")return!0;const l=r.split(/[?#]/)[0];return/\.pdf$/i.test(l)}function nr(r){const n=P({files:[],defaultTab:"preview",sandbox:er,showNav:!0,showReload:!0,showHome:!0,showPathField:!0,showTabs:!0,expandable:!1,openInTab:!1,standalone:!1,readonlyPath:!1,maximized:!1},r),[e,l]=ce(n,["src","files","tab","defaultTab","activeFile","sandbox","iframeTitle","onNavigate","onTabChange","onFileSelect","maximized","onMaximizeChange","showNav","showReload","showHome","showPathField","showTabs","expandable","openInTab","standalone","readonlyPath","displayUrl","controllerRef","class"]),[s,d]=k(e.src?[e.src]:[]),[c,i]=k(e.src?0:-1),h=()=>s()[c()]??"",u=()=>c()>0,g=()=>c()<s().length-1,[w,M]=k(e.tab??e.defaultTab),[U,L]=k(e.activeFile),[ne,ae]=k(0),[R,S]=k(e.maximized??!1);F(()=>S(e.maximized??!1));const ie=()=>{var t;const o=!R();S(o),(t=e.onMaximizeChange)==null||t.call(e,o)},$=C(()=>{const t=h();return!!t&&t!=="about:blank"}),B=()=>{$()&&window.open(h(),"_blank","noopener,noreferrer")},D=C(()=>e.expandable&&!e.standalone),le=C(()=>e.showNav||e.showReload||e.showHome||e.showPathField||e.showTabs||D()||e.openInTab);let x;F(()=>{e.tab!==void 0&&M(e.tab)}),F(()=>L(e.activeFile)),F(Z(()=>e.src,t=>{t&&t!==h()&&T(t)},{defer:!0}));const A=t=>t===void 0?void 0:e.files.find(o=>o.path===t),V=C(()=>A(U())),oe=C(()=>{const t=V();return!!t&&t.type!=="image"&&t.type!=="pdf"&&typeof t.code=="string"});function T(t){if(t===h()){N();return}d(o=>[...o.slice(0,c()+1),t]),i(o=>o+1),O()}function O(){var t;const o=h();x&&(x.src=o||"about:blank"),(t=e.onNavigate)==null||t.call(e,o)}function se(t){var o;t!==w()&&(M(t),(o=e.onTabChange)==null||o.call(e,t))}function W(t,o){var m;L(t),(m=e.onFileSelect)==null||m.call(e,t),T(rr(o,e.src))}const q=()=>{u()&&(i(t=>t-1),O())},K=()=>{g()&&(i(t=>t+1),O())};function N(){var t;const o=h();x&&(x.src="about:blank",x.src=o||"about:blank"),ae(m=>m+1),(t=e.onNavigate)==null||t.call(e,o)}const _=()=>{e.src&&T(e.src)},G=t=>{var o;R()!==t&&(S(t),(o=e.onMaximizeChange)==null||o.call(e,t))};j(()=>{var t;(t=e.controllerRef)==null||t.call(e,{back:()=>q(),forward:()=>K(),reload:()=>N(),home:()=>_(),navigate:o=>T(o),selectFile:o=>{const m=A(o);m&&W(o,m)},openExternal:()=>B(),maximize:()=>G(!0),restore:()=>G(!1)})});const de=()=>{var t,o;try{const m=(t=x?.contentWindow)==null?void 0:t.location.href;m&&m!=="about:blank"&&m!==h()&&(d(I=>[...I.slice(0,c()+1),m]),i(I=>I+1),(o=e.onNavigate)==null||o.call(e,m))}catch{}},ue=t=>{t.preventDefault();const o=t.currentTarget.elements.namedItem("kai-artifact-path");if(e.readonlyPath||e.displayUrl!=null){o&&(o.value=e.displayUrl??h());return}o&&o.value&&T(o.value)};return(()=>{var t=De(),o=t.firstChild;return he(t,P({get class(){return E("flex h-full w-full flex-col overflow-hidden bg-card text-card-foreground",e.standalone&&"rounded-xl border border-border",e.class)}},l),!1,!0),f(t,a(b,{get when(){return le()},get children(){return a(ar,{url:()=>e.displayUrl??h(),tab:w,canBack:u,canForward:g,canHome:()=>!!e.src,onBack:q,onForward:K,onReload:N,onHome:_,onSubmitPath:ue,onTab:se,showNav:()=>e.showNav,showReload:()=>e.showReload,showHome:()=>e.showHome,showPathField:()=>e.showPathField,showTabs:()=>e.showTabs,showExpand:D,showOpenInTab:()=>e.openInTab,maximized:R,onToggleMaximize:ie,canOpenInTab:$,onOpenInTab:B,readonlyPath:()=>e.readonlyPath||e.displayUrl!=null})}}),o),f(o,a(b,{get when(){return w()==="preview"},get fallback(){return a(lr,{get files(){return e.files},activeFile:U,activeFileObj:V,hasSource:oe,onSelect:W})},get children(){return a(b,{get when(){return tr(h(),e.files)},get fallback(){return a(ir,{ref:m=>x=m,src:h,get sandbox(){return e.sandbox},get title(){return e.iframeTitle??"Artifact preview"},onLoad:de})},get children(){return a(sr,{get url(){return h()},get reloadKey(){return ne()}})}})}})),t})()}function ar(r){return(()=>{var n=qe();return f(n,a(b,{get when(){return r.showNav()},get children(){return[a(z,{variant:"ghost",size:"icon-sm","aria-label":"Back",get disabled(){return!r.canBack()},onClick:()=>r.onBack(),get children(){return a(xe,{size:16,"aria-hidden":"true"})}}),a(z,{variant:"ghost",size:"icon-sm","aria-label":"Forward",get disabled(){return!r.canForward()},onClick:()=>r.onForward(),get children(){return a(Oe,{size:16,"aria-hidden":"true"})}})]}}),null),f(n,a(b,{get when(){return r.showReload()},get children(){return a(z,{variant:"ghost",size:"icon-sm","aria-label":"Reload",onClick:()=>r.onReload(),get children(){return a(ke,{size:15,"aria-hidden":"true"})}})}}),null),f(n,a(b,{get when(){return r.showHome()},get children(){return a(z,{variant:"ghost",size:"icon-sm","aria-label":"Home",get disabled(){return!r.canHome()},onClick:()=>r.onHome(),get children(){return a(ye,{size:15,"aria-hidden":"true"})}})}}),null),f(n,a(b,{get when(){return r.showPathField()},get children(){var e=Ae(),l=e.firstChild,s=l.nextSibling;return e.addEventListener("submit",d=>r.onSubmitPath(d)),p(s,"spellcheck",!1),y(d=>{var c=r.readonlyPath()||void 0,i=r.readonlyPath()?"true":void 0,h=E("h-7 w-full rounded-md border border-border px-2.5 text-xs text-foreground font-mono outline-none",r.readonlyPath()?"bg-muted/40 cursor-default":"bg-background focus-visible:ring-2 focus-visible:ring-ring");return c!==d.e&&(s.readOnly=d.e=c),i!==d.t&&p(s,"aria-readonly",d.t=i),h!==d.a&&J(s,d.a=h),d},{e:void 0,t:void 0,a:void 0}),y(()=>s.value=r.url()),e}}),null),f(n,a(b,{get when(){return!r.showPathField()},get children(){return Ve()}}),null),f(n,a(b,{get when(){return r.showExpand()},get children(){return a(z,{variant:"ghost",size:"icon-sm",get"aria-label"(){return r.maximized()?"Collapse":"Expand"},get"aria-expanded"(){return r.maximized()},onClick:()=>r.onToggleMaximize(),get children(){return a(b,{get when(){return r.maximized()},get fallback(){return a(Pe,{size:15,"aria-hidden":"true"})},get children(){return a(Ce,{size:15,"aria-hidden":"true"})}})}})}}),null),f(n,a(b,{get when(){return r.showOpenInTab()},get children(){return a(z,{variant:"ghost",size:"icon-sm","aria-label":"Open in new tab",get disabled(){return!r.canOpenInTab()},onClick:()=>r.onOpenInTab(),get children(){return a(ee,{size:15,"aria-hidden":"true"})}})}}),null),f(n,a(b,{get when(){return r.showTabs()},get children(){var e=We();return f(e,a(te,{label:"Preview",get icon(){return a(je,{size:14,"aria-hidden":"true"})},get selected(){return r.tab()==="preview"},onClick:()=>r.onTab("preview")}),null),f(e,a(te,{label:"Code",get icon(){return a(ze,{size:14,"aria-hidden":"true"})},get selected(){return r.tab()==="code"},onClick:()=>r.onTab("code")}),null),e}}),null),n})()}function te(r){return(()=>{var n=Ke();return n.$$click=()=>r.onClick(),f(n,()=>r.icon,null),f(n,()=>r.label,null),y(e=>{var l=r.selected,s=E("inline-flex h-6 items-center gap-1.5 rounded px-2 text-xs font-medium transition-colors outline-none","focus-visible:ring-2 focus-visible:ring-ring",r.selected?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground");return l!==e.e&&p(n,"aria-selected",e.e=l),s!==e.t&&J(n,e.t=s),e},{e:void 0,t:void 0}),n})()}function ir(r){return(()=>{var n=_e();n.addEventListener("load",()=>r.onLoad());var e=r.ref;return typeof e=="function"?Q(e,n):r.ref=n,y(l=>{var s=r.src()||"about:blank",d=r.sandbox,c=r.title;return s!==l.e&&p(n,"src",l.e=s),d!==l.t&&p(n,"sandbox",l.t=d),c!==l.a&&p(n,"title",l.a=c),l},{e:void 0,t:void 0,a:void 0}),n})()}function lr(r){return(()=>{var n=Ge(),e=n.firstChild,l=e.nextSibling;return f(e,a(pe,{get files(){return r.files},get activeFile(){return r.activeFile()},onSelect:(s,d)=>r.onSelect(s,d)})),f(l,a(b,{get when(){return r.activeFileObj()},get fallback(){return Ze()},get children(){return a(b,{get when(){return r.hasSource()},get fallback(){return(()=>{var s=Je(),d=s.firstChild,c=d.nextSibling;return c.nextSibling,f(s,()=>r.activeFileObj().type??"binary",c),s})()},get children(){return a(me,{class:"h-full rounded-none border-0",get children(){return a(ve,{get code(){return r.activeFileObj().code??""},get language(){return r.activeFileObj().language}})}})}})}})),n})()}function or(r){const n=()=>{const e=r.url.split(/[?#]/)[0];return e.slice(e.lastIndexOf("/")+1)||"document.pdf"};return(()=>{var e=Qe(),l=e.firstChild,s=l.nextSibling,d=s.nextSibling,c=d.firstChild;c.firstChild;var i=c.nextSibling,h=i.firstChild;return f(e,a(Fe,{size:40,class:"text-muted-foreground","aria-hidden":"true"}),l),f(l,n),f(c,a(ee,{size:13,"aria-hidden":"true"}),null),f(i,a(Te,{size:13,"aria-hidden":"true"}),h),y(u=>{var g=r.url,w=r.url;return g!==u.e&&p(c,"href",u.e=g),w!==u.t&&p(i,"href",u.t=w),u},{e:void 0,t:void 0}),e})()}function sr(r){const[n,e]=k("loading");let l,s=0,d;const c=async()=>{if(!l){e("error");return}const i=++s;e("loading");try{const h=l.clientWidth||600;await Be(r.url,l,h),i===s&&e("success")}catch{i===s&&e("error")}};return F(Z(()=>[r.url,r.reloadKey],()=>{c()})),j(()=>{if(!l||typeof ResizeObserver>"u")return;const i=new ResizeObserver(()=>{n()==="success"&&(clearTimeout(d),d=setTimeout(()=>{c()},200))});i.observe(l),X(()=>{i.disconnect(),clearTimeout(d),s++})}),(()=>{var i=Ye(),h=i.firstChild;return Q(u=>l=u,h),f(i,a(b,{get when(){return ge(()=>!0)()&&n()==="loading"},get children(){var u=Xe();return f(u,a(we,{variant:"circular",size:"md"})),u}}),null),f(i,a(b,{get when(){return n()==="error"},get children(){return a(or,{get url(){return r.url}})}}),null),y(()=>p(h,"aria-busy",n()==="loading")),i})()}fe(["click"]);var dr=v("<style>:host{display:block;height:100%;min-height:0}"),ur=v('<div style="display:grid;grid-template-rows:minmax(0, 1fr);grid-template-columns:minmax(0, 1fr);height:100%;min-height:0">');be("kai-artifact",{src:void 0,files:[],tab:void 0,defaultTab:void 0,activeFile:void 0,sandbox:"allow-scripts allow-forms",iframeTitle:void 0,maximized:!1,expandable:!1,openInTab:!1,noNav:!1,noReload:!1,noHome:!1,noPathField:!1,noTabs:!1,standalone:!1,readonlyPath:!1,displayUrl:void 0},(r,{element:n,dispatch:e,flag:l,expose:s})=>{const[d,c]=k(l("maximized"));let i;s({back:()=>i?.back(),forward:()=>i?.forward(),reload:()=>i?.reload(),home:()=>i?.home(),navigate:u=>i?.navigate(u),selectFile:u=>i?.selectFile(u),openExternal:()=>i?.openExternal(),maximize:()=>i?.maximize(),restore:()=>i?.restore()});const h=u=>{c(u),n.dispatchEvent(new CustomEvent("kai-maximize-intent",{detail:{requested:u},bubbles:!0,composed:!0})),e("kai-maximize-change",{maximized:u})};return j(()=>{const u=g=>c(g.detail.maximized);n.addEventListener("kai-maximize-state",u),X(()=>n.removeEventListener("kai-maximize-state",u))}),[dr(),(()=>{var u=ur();return f(u,a(nr,{get src(){return r.src},get files(){return r.files},get tab(){return r.tab},get defaultTab(){return r.defaultTab},get activeFile(){return r.activeFile},get sandbox(){return r.sandbox},get iframeTitle(){return r.iframeTitle},get maximized(){return d()},get expandable(){return l("expandable")},get openInTab(){return l("openInTab")},get showNav(){return!l("noNav")},get showReload(){return!l("noReload")},get showHome(){return!l("noHome")},get showPathField(){return!l("noPathField")},get showTabs(){return!l("noTabs")},get standalone(){return l("standalone")},get readonlyPath(){return l("readonlyPath")},get displayUrl(){return r.displayUrl},onMaximizeChange:h,onNavigate:g=>e("kai-navigate",{url:g}),onTabChange:g=>e("kai-tab-change",{tab:g}),onFileSelect:g=>e("kai-file-select",{path:g}),controllerRef:g=>i=g})),u})()]});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as b,c as e,F as T,S as a,n as c,a as k,d as o,i as m,t as d}from"./chunks/define-
|
|
1
|
+
import{f as b,c as e,F as T,S as a,n as c,a as k,d as o,i as m,t as d}from"./chunks/define-D1din7Ld.js";import{A as M,a as C,b as j,c as A,d as v,e as p,f as F,g as f,h as R,i as S,j as $}from"./chunks/attachments-mCB5F1Fq.js";var z=d('<img part=preview class="block max-h-64 max-w-xs rounded object-contain">'),E=d('<div class="text-body font-medium">'),H=d('<div class="text-muted-foreground text-caption">');b("kai-attachments",{items:[],variant:"grid",hoverCard:!1,removable:!1,showMediaType:!1,emptyText:void 0},(n,{dispatch:w,flag:g})=>{const i=()=>n.variant??"grid",y=()=>g("hoverCard"),x=()=>g("removable"),l=()=>g("showMediaType");return e(a,{get when(){return n.items.length},get fallback(){return e(a,{get when(){return n.emptyText},get children(){return e($,{get children(){return n.emptyText}})}})},get children(){return e(M,{get variant(){return i()},get children(){return e(T,{get each(){return n.items},children:r=>e(C,{data:r,get onRemove(){return x()?()=>w("kai-remove",{id:r.id}):void 0},get children(){return[e(a,{get when(){return y()},get fallback(){return[e(v,{}),e(a,{get when(){return i()!=="grid"},get children(){return e(p,{get showMediaType(){return l()}})}})]},get children(){return e(j,{get children(){return[e(A,{get class(){return c(()=>i()==="grid")()?"block size-full":`flex items-center gap-1.5${i()==="list"?" w-full":""}`},get children(){return[e(v,{}),e(a,{get when(){return i()!=="grid"},get children(){return e(p,{get showMediaType(){return l()}})}})]}}),e(F,{get children(){return e(a,{get when(){return c(()=>R(r)==="image"&&r.type==="file")()&&r.url},get fallback(){return[(()=>{var t=E();return m(t,()=>f(r)),t})(),e(a,{get when(){return r.mediaType},get children(){var t=H();return m(t,()=>r.mediaType),t}})]},get children(){var t=z();return k(s=>{var u=r.url,h=f(r);return u!==s.e&&o(t,"src",s.e=u),h!==s.t&&o(t,"alt",s.t=h),s},{e:void 0,t:void 0}),t}})}})]}})}}),e(S,{})]}})})}})}})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{A as a,n as r}from"./chunks/audio-visualizer-BqNy7dfm.js";import"./chunks/define-D1din7Ld.js";export{a as AudioVisualizerFacade,r as num};
|