@ctrl-ui/react 0.8.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/README.md +70 -0
- package/dist/action-bar.d.ts +44 -0
- package/dist/action-bar.js +89 -0
- package/dist/activity.d.ts +53 -0
- package/dist/activity.js +188 -0
- package/dist/audio-recorder.d.ts +32 -0
- package/dist/audio-recorder.js +235 -0
- package/dist/audio-visualizer.d.ts +12 -0
- package/dist/audio-visualizer.js +58 -0
- package/dist/blocks/chat.d.ts +10 -0
- package/dist/blocks/chat.js +12 -0
- package/dist/blocks/coding-agent.d.ts +61 -0
- package/dist/blocks/coding-agent.js +255 -0
- package/dist/blocks/file-explorer-data.d.ts +57 -0
- package/dist/blocks/file-explorer-data.js +74 -0
- package/dist/blocks/file-explorer.d.ts +24 -0
- package/dist/blocks/file-explorer.js +427 -0
- package/dist/blocks/settings-data.d.ts +36 -0
- package/dist/blocks/settings-data.js +66 -0
- package/dist/blocks/settings.d.ts +19 -0
- package/dist/blocks/settings.js +282 -0
- package/dist/blocks/theme-toggle.d.ts +43 -0
- package/dist/blocks/theme-toggle.js +180 -0
- package/dist/chat-composer-attachment.d.ts +55 -0
- package/dist/chat-composer-attachment.js +267 -0
- package/dist/chat-composer-editor/extensions/mention.d.ts +14 -0
- package/dist/chat-composer-editor/extensions/mention.js +278 -0
- package/dist/chat-composer-editor/ghost.d.ts +5 -0
- package/dist/chat-composer-editor/ghost.js +55 -0
- package/dist/chat-composer-editor/schema.d.ts +6 -0
- package/dist/chat-composer-editor/schema.js +25 -0
- package/dist/chat-composer-editor/serialize.d.ts +6 -0
- package/dist/chat-composer-editor/serialize.js +16 -0
- package/dist/chat-composer-editor/types.d.ts +29 -0
- package/dist/chat-composer-editor/types.js +0 -0
- package/dist/chat-composer-editor.d.ts +9 -0
- package/dist/chat-composer-editor.js +154 -0
- package/dist/chat-composer.d.ts +60 -0
- package/dist/chat-composer.js +134 -0
- package/dist/chat-layout.d.ts +27 -0
- package/dist/chat-layout.js +114 -0
- package/dist/chat-message.d.ts +31 -0
- package/dist/chat-message.js +95 -0
- package/dist/code-block-editor.d.ts +59 -0
- package/dist/code-block-editor.js +250 -0
- package/dist/context-model.d.ts +33 -0
- package/dist/context-model.js +52 -0
- package/dist/context.d.ts +47 -0
- package/dist/context.js +335 -0
- package/dist/control-props.d.ts +28 -0
- package/dist/control-props.js +4 -0
- package/dist/control-variants.d.ts +8 -0
- package/dist/control-variants.js +14 -0
- package/dist/dynamic-notification-glass.d.ts +10 -0
- package/dist/dynamic-notification-glass.js +311 -0
- package/dist/dynamic-notification-liquid.d.ts +24 -0
- package/dist/dynamic-notification-liquid.js +682 -0
- package/dist/dynamic-notification-siri-wave.d.ts +4 -0
- package/dist/dynamic-notification-siri-wave.js +82 -0
- package/dist/dynamic-notification.d.ts +74 -0
- package/dist/dynamic-notification.js +342 -0
- package/dist/environment-variables.d.ts +124 -0
- package/dist/environment-variables.js +492 -0
- package/dist/extensions/create-track-highlight.d.ts +12 -0
- package/dist/extensions/create-track-highlight.js +147 -0
- package/dist/extensions/track-highlight.d.ts +22 -0
- package/dist/extensions/track-highlight.js +52 -0
- package/dist/hooks/use-audio-recorder.d.ts +107 -0
- package/dist/hooks/use-audio-recorder.js +577 -0
- package/dist/hooks/use-chat-composer.d.ts +56 -0
- package/dist/hooks/use-chat-composer.js +63 -0
- package/dist/hooks/use-chat-message.d.ts +28 -0
- package/dist/hooks/use-chat-message.js +24 -0
- package/dist/hooks/use-color-area.d.ts +18 -0
- package/dist/hooks/use-color-area.js +60 -0
- package/dist/hooks/use-copy-to-clipboard.d.ts +22 -0
- package/dist/hooks/use-copy-to-clipboard.js +90 -0
- package/dist/hooks/use-dropzone.d.ts +59 -0
- package/dist/hooks/use-dropzone.js +372 -0
- package/dist/hooks/use-dynamic-notification.d.ts +37 -0
- package/dist/hooks/use-dynamic-notification.js +87 -0
- package/dist/hooks/use-environment-variables.d.ts +51 -0
- package/dist/hooks/use-environment-variables.js +188 -0
- package/dist/hooks/use-mobile.d.ts +5 -0
- package/dist/hooks/use-mobile.js +29 -0
- package/dist/hooks/use-textarea-trigger-menu.d.ts +8 -0
- package/dist/hooks/use-textarea-trigger-menu.js +69 -0
- package/dist/hooks/use-trigger-menu.d.ts +49 -0
- package/dist/hooks/use-trigger-menu.js +102 -0
- package/dist/hooks/use-user-ask.d.ts +48 -0
- package/dist/hooks/use-user-ask.js +167 -0
- package/dist/inline-attachment.d.ts +37 -0
- package/dist/inline-attachment.js +192 -0
- package/dist/inline-citation.d.ts +56 -0
- package/dist/inline-citation.js +319 -0
- package/dist/knob-contracts/accordion-knobs.d.ts +5 -0
- package/dist/knob-contracts/accordion-knobs.js +9 -0
- package/dist/knob-contracts/action-bar-knobs.d.ts +5 -0
- package/dist/knob-contracts/action-bar-knobs.js +4 -0
- package/dist/knob-contracts/activity-knobs.d.ts +5 -0
- package/dist/knob-contracts/activity-knobs.js +9 -0
- package/dist/knob-contracts/alert-knobs.d.ts +5 -0
- package/dist/knob-contracts/alert-knobs.js +9 -0
- package/dist/knob-contracts/audio-recorder-knobs.d.ts +5 -0
- package/dist/knob-contracts/audio-recorder-knobs.js +9 -0
- package/dist/knob-contracts/audio-visualizer-knobs.d.ts +5 -0
- package/dist/knob-contracts/audio-visualizer-knobs.js +9 -0
- package/dist/knob-contracts/avatar-knobs.d.ts +5 -0
- package/dist/knob-contracts/avatar-knobs.js +9 -0
- package/dist/knob-contracts/badge-knobs.d.ts +5 -0
- package/dist/knob-contracts/badge-knobs.js +9 -0
- package/dist/knob-contracts/button-group-knobs.d.ts +5 -0
- package/dist/knob-contracts/button-group-knobs.js +9 -0
- package/dist/knob-contracts/button-knobs.d.ts +5 -0
- package/dist/knob-contracts/button-knobs.js +25 -0
- package/dist/knob-contracts/calendar-knobs.d.ts +5 -0
- package/dist/knob-contracts/calendar-knobs.js +10 -0
- package/dist/knob-contracts/card-knobs.d.ts +5 -0
- package/dist/knob-contracts/card-knobs.js +11 -0
- package/dist/knob-contracts/chat-composer-attachment-knobs.d.ts +5 -0
- package/dist/knob-contracts/chat-composer-attachment-knobs.js +11 -0
- package/dist/knob-contracts/chat-composer-knobs.d.ts +5 -0
- package/dist/knob-contracts/chat-composer-knobs.js +18 -0
- package/dist/knob-contracts/chat-layout-knobs.d.ts +5 -0
- package/dist/knob-contracts/chat-layout-knobs.js +11 -0
- package/dist/knob-contracts/chat-message-knobs.d.ts +5 -0
- package/dist/knob-contracts/chat-message-knobs.js +17 -0
- package/dist/knob-contracts/choice-knobs.d.ts +5 -0
- package/dist/knob-contracts/choice-knobs.js +9 -0
- package/dist/knob-contracts/code-block-editor-knobs.d.ts +5 -0
- package/dist/knob-contracts/code-block-editor-knobs.js +11 -0
- package/dist/knob-contracts/code-diff-knobs.d.ts +5 -0
- package/dist/knob-contracts/code-diff-knobs.js +18 -0
- package/dist/knob-contracts/code-knobs.d.ts +5 -0
- package/dist/knob-contracts/code-knobs.js +11 -0
- package/dist/knob-contracts/collapsible-knobs.d.ts +5 -0
- package/dist/knob-contracts/collapsible-knobs.js +4 -0
- package/dist/knob-contracts/color-picker-knobs.d.ts +5 -0
- package/dist/knob-contracts/color-picker-knobs.js +12 -0
- package/dist/knob-contracts/context-knobs.d.ts +5 -0
- package/dist/knob-contracts/context-knobs.js +13 -0
- package/dist/knob-contracts/dockable-panel-knobs.d.ts +5 -0
- package/dist/knob-contracts/dockable-panel-knobs.js +12 -0
- package/dist/knob-contracts/dropzone-knobs.d.ts +5 -0
- package/dist/knob-contracts/dropzone-knobs.js +11 -0
- package/dist/knob-contracts/dynamic-notification-knobs.d.ts +5 -0
- package/dist/knob-contracts/dynamic-notification-knobs.js +18 -0
- package/dist/knob-contracts/empty-knobs.d.ts +5 -0
- package/dist/knob-contracts/empty-knobs.js +12 -0
- package/dist/knob-contracts/environment-variables-knobs.d.ts +5 -0
- package/dist/knob-contracts/environment-variables-knobs.js +11 -0
- package/dist/knob-contracts/field-knobs.d.ts +5 -0
- package/dist/knob-contracts/field-knobs.js +16 -0
- package/dist/knob-contracts/gradient-editor-knobs.d.ts +5 -0
- package/dist/knob-contracts/gradient-editor-knobs.js +13 -0
- package/dist/knob-contracts/infinite-canvas-knobs.d.ts +5 -0
- package/dist/knob-contracts/infinite-canvas-knobs.js +13 -0
- package/dist/knob-contracts/inline-attachment-knobs.d.ts +5 -0
- package/dist/knob-contracts/inline-attachment-knobs.js +14 -0
- package/dist/knob-contracts/inline-citation-knobs.d.ts +5 -0
- package/dist/knob-contracts/inline-citation-knobs.js +14 -0
- package/dist/knob-contracts/item-knobs.d.ts +5 -0
- package/dist/knob-contracts/item-knobs.js +10 -0
- package/dist/knob-contracts/kbd-knobs.d.ts +5 -0
- package/dist/knob-contracts/kbd-knobs.js +10 -0
- package/dist/knob-contracts/markdown-block-knobs.d.ts +5 -0
- package/dist/knob-contracts/markdown-block-knobs.js +11 -0
- package/dist/knob-contracts/markdown-knobs.d.ts +5 -0
- package/dist/knob-contracts/markdown-knobs.js +14 -0
- package/dist/knob-contracts/morphing-panel-knobs.d.ts +5 -0
- package/dist/knob-contracts/morphing-panel-knobs.js +11 -0
- package/dist/knob-contracts/pagination-knobs.d.ts +5 -0
- package/dist/knob-contracts/pagination-knobs.js +10 -0
- package/dist/knob-contracts/phone-input-knobs.d.ts +5 -0
- package/dist/knob-contracts/phone-input-knobs.js +10 -0
- package/dist/knob-contracts/popup-knobs.d.ts +5 -0
- package/dist/knob-contracts/popup-knobs.js +21 -0
- package/dist/knob-contracts/range-knobs.d.ts +5 -0
- package/dist/knob-contracts/range-knobs.js +13 -0
- package/dist/knob-contracts/resizable-knobs.d.ts +5 -0
- package/dist/knob-contracts/resizable-knobs.js +14 -0
- package/dist/knob-contracts/rich-tooltip-knobs.d.ts +5 -0
- package/dist/knob-contracts/rich-tooltip-knobs.js +13 -0
- package/dist/knob-contracts/scroll-area-knobs.d.ts +5 -0
- package/dist/knob-contracts/scroll-area-knobs.js +8 -0
- package/dist/knob-contracts/separator-knobs.d.ts +5 -0
- package/dist/knob-contracts/separator-knobs.js +4 -0
- package/dist/knob-contracts/sidebar-knobs.d.ts +5 -0
- package/dist/knob-contracts/sidebar-knobs.js +26 -0
- package/dist/knob-contracts/skeleton-knobs.d.ts +5 -0
- package/dist/knob-contracts/skeleton-knobs.js +4 -0
- package/dist/knob-contracts/source-badge-knobs.d.ts +5 -0
- package/dist/knob-contracts/source-badge-knobs.js +11 -0
- package/dist/knob-contracts/spinner-knobs.d.ts +5 -0
- package/dist/knob-contracts/spinner-knobs.js +4 -0
- package/dist/knob-contracts/stepper-knobs.d.ts +5 -0
- package/dist/knob-contracts/stepper-knobs.js +11 -0
- package/dist/knob-contracts/switch-knobs.d.ts +5 -0
- package/dist/knob-contracts/switch-knobs.js +12 -0
- package/dist/knob-contracts/table-knobs.d.ts +5 -0
- package/dist/knob-contracts/table-knobs.js +12 -0
- package/dist/knob-contracts/table-of-contents-knobs.d.ts +5 -0
- package/dist/knob-contracts/table-of-contents-knobs.js +8 -0
- package/dist/knob-contracts/tabs-knobs.d.ts +5 -0
- package/dist/knob-contracts/tabs-knobs.js +16 -0
- package/dist/knob-contracts/task-list-knobs.d.ts +5 -0
- package/dist/knob-contracts/task-list-knobs.js +14 -0
- package/dist/knob-contracts/thread-rail-knobs.d.ts +5 -0
- package/dist/knob-contracts/thread-rail-knobs.js +14 -0
- package/dist/knob-contracts/timeline-knobs.d.ts +5 -0
- package/dist/knob-contracts/timeline-knobs.js +12 -0
- package/dist/knob-contracts/toolbar-knobs.d.ts +5 -0
- package/dist/knob-contracts/toolbar-knobs.js +20 -0
- package/dist/knob-contracts/track-highlight-knobs.d.ts +5 -0
- package/dist/knob-contracts/track-highlight-knobs.js +11 -0
- package/dist/knob-contracts/transcript-divider-knobs.d.ts +5 -0
- package/dist/knob-contracts/transcript-divider-knobs.js +10 -0
- package/dist/knob-contracts/tree-knobs.d.ts +5 -0
- package/dist/knob-contracts/tree-knobs.js +13 -0
- package/dist/knob-contracts/user-ask-knobs.d.ts +5 -0
- package/dist/knob-contracts/user-ask-knobs.js +17 -0
- package/dist/lib/cn.d.ts +5 -0
- package/dist/lib/cn.js +34 -0
- package/dist/lib/code-block-shiki.d.ts +9 -0
- package/dist/lib/code-block-shiki.js +6 -0
- package/dist/lib/code-tokens.d.ts +28 -0
- package/dist/lib/code-tokens.js +160 -0
- package/dist/lib/color.d.ts +72 -0
- package/dist/lib/color.js +490 -0
- package/dist/lib/contrast.d.ts +30 -0
- package/dist/lib/contrast.js +64 -0
- package/dist/lib/diff.d.ts +50 -0
- package/dist/lib/diff.js +315 -0
- package/dist/lib/dropzone-validation.d.ts +66 -0
- package/dist/lib/dropzone-validation.js +228 -0
- package/dist/lib/env-file.d.ts +28 -0
- package/dist/lib/env-file.js +218 -0
- package/dist/lib/format-audio-recorder-duration.d.ts +4 -0
- package/dist/lib/format-audio-recorder-duration.js +7 -0
- package/dist/lib/liquid-glass-optics.d.ts +4 -0
- package/dist/lib/liquid-glass-optics.js +96 -0
- package/dist/lib/phone-input-format.d.ts +6 -0
- package/dist/lib/phone-input-format.js +26 -0
- package/dist/lib/phone-number.d.ts +18 -0
- package/dist/lib/phone-number.js +28 -0
- package/dist/lib/trigger-detect.d.ts +15 -0
- package/dist/lib/trigger-detect.js +77 -0
- package/dist/markdown-block.d.ts +25 -0
- package/dist/markdown-block.js +77 -0
- package/dist/skin.config.d.ts +5 -0
- package/dist/skin.config.js +4 -0
- package/dist/skin.d.ts +69 -0
- package/dist/skin.js +62 -0
- package/dist/source-badge.d.ts +23 -0
- package/dist/source-badge.js +72 -0
- package/dist/styles/chat-composer-editor.css +44 -0
- package/dist/styles/code.css +57 -0
- package/dist/styles/effects.css +126 -0
- package/dist/styles/index.css +81 -0
- package/dist/styles/recipes/accordion.css +87 -0
- package/dist/styles/recipes/action-bar.css +19 -0
- package/dist/styles/recipes/activity.css +129 -0
- package/dist/styles/recipes/alert.css +75 -0
- package/dist/styles/recipes/audio-recorder.css +102 -0
- package/dist/styles/recipes/audio-visualizer.css +90 -0
- package/dist/styles/recipes/avatar.css +52 -0
- package/dist/styles/recipes/badge.css +110 -0
- package/dist/styles/recipes/button-group.css +64 -0
- package/dist/styles/recipes/button.css +305 -0
- package/dist/styles/recipes/calendar.css +152 -0
- package/dist/styles/recipes/card.css +93 -0
- package/dist/styles/recipes/chat-composer-attachment.css +177 -0
- package/dist/styles/recipes/chat-composer.css +195 -0
- package/dist/styles/recipes/chat-layout.css +108 -0
- package/dist/styles/recipes/chat-message.css +160 -0
- package/dist/styles/recipes/choice.css +108 -0
- package/dist/styles/recipes/code-block-editor.css +136 -0
- package/dist/styles/recipes/code-diff.css +256 -0
- package/dist/styles/recipes/code.css +136 -0
- package/dist/styles/recipes/collapsible.css +27 -0
- package/dist/styles/recipes/color-picker-details.css +61 -0
- package/dist/styles/recipes/color-picker-values.css +117 -0
- package/dist/styles/recipes/color-picker.css +158 -0
- package/dist/styles/recipes/context.css +237 -0
- package/dist/styles/recipes/dockable-panel.css +106 -0
- package/dist/styles/recipes/dropzone.css +149 -0
- package/dist/styles/recipes/dynamic-notification-input.css +29 -0
- package/dist/styles/recipes/dynamic-notification-motion.css +298 -0
- package/dist/styles/recipes/dynamic-notification.css +241 -0
- package/dist/styles/recipes/empty.css +96 -0
- package/dist/styles/recipes/environment-variables.css +173 -0
- package/dist/styles/recipes/field-parts.css +148 -0
- package/dist/styles/recipes/field.css +234 -0
- package/dist/styles/recipes/gradient-editor.css +109 -0
- package/dist/styles/recipes/infinite-canvas.css +78 -0
- package/dist/styles/recipes/inline-attachment.css +182 -0
- package/dist/styles/recipes/inline-citation.css +174 -0
- package/dist/styles/recipes/item.css +107 -0
- package/dist/styles/recipes/kbd.css +55 -0
- package/dist/styles/recipes/markdown-block.css +75 -0
- package/dist/styles/recipes/markdown.css +204 -0
- package/dist/styles/recipes/morphing-panel.css +123 -0
- package/dist/styles/recipes/pagination.css +86 -0
- package/dist/styles/recipes/phone-input.css +105 -0
- package/dist/styles/recipes/popup-controls.css +59 -0
- package/dist/styles/recipes/popup-drawer.css +162 -0
- package/dist/styles/recipes/popup-lists.css +198 -0
- package/dist/styles/recipes/popup-motion.css +94 -0
- package/dist/styles/recipes/popup-toast.css +126 -0
- package/dist/styles/recipes/popup.css +396 -0
- package/dist/styles/recipes/range.css +259 -0
- package/dist/styles/recipes/resizable.css +170 -0
- package/dist/styles/recipes/rich-tooltip.css +272 -0
- package/dist/styles/recipes/scroll-area.css +59 -0
- package/dist/styles/recipes/separator.css +12 -0
- package/dist/styles/recipes/sidebar.css +345 -0
- package/dist/styles/recipes/skeleton.css +23 -0
- package/dist/styles/recipes/source-badge.css +77 -0
- package/dist/styles/recipes/spinner.css +33 -0
- package/dist/styles/recipes/stepper.css +178 -0
- package/dist/styles/recipes/switch.css +149 -0
- package/dist/styles/recipes/table-of-contents.css +107 -0
- package/dist/styles/recipes/table.css +124 -0
- package/dist/styles/recipes/tabs.css +235 -0
- package/dist/styles/recipes/task-list.css +146 -0
- package/dist/styles/recipes/thread-rail.css +247 -0
- package/dist/styles/recipes/timeline.css +107 -0
- package/dist/styles/recipes/toolbar.css +260 -0
- package/dist/styles/recipes/track-highlight.css +73 -0
- package/dist/styles/recipes/transcript-divider.css +64 -0
- package/dist/styles/recipes/tree.css +137 -0
- package/dist/styles/recipes/user-ask-details.css +45 -0
- package/dist/styles/recipes/user-ask.css +204 -0
- package/dist/styles/skin-theme.css +137 -0
- package/dist/styles/skin.css +143 -0
- package/dist/styles/theme.css +628 -0
- package/dist/styles/type-scale.css +45 -0
- package/dist/surface-variants.d.ts +6 -0
- package/dist/surface-variants.js +16 -0
- package/dist/task-list.d.ts +34 -0
- package/dist/task-list.js +177 -0
- package/dist/thread-rail.d.ts +52 -0
- package/dist/thread-rail.js +190 -0
- package/dist/transcript-divider.d.ts +15 -0
- package/dist/transcript-divider.js +25 -0
- package/dist/ui/accordion.d.ts +31 -0
- package/dist/ui/accordion.js +60 -0
- package/dist/ui/alert-dialog.d.ts +36 -0
- package/dist/ui/alert-dialog.js +100 -0
- package/dist/ui/alert.d.ts +21 -0
- package/dist/ui/alert.js +36 -0
- package/dist/ui/aspect-ratio.d.ts +8 -0
- package/dist/ui/aspect-ratio.js +17 -0
- package/dist/ui/autocomplete.d.ts +70 -0
- package/dist/ui/autocomplete.js +150 -0
- package/dist/ui/avatar.d.ts +24 -0
- package/dist/ui/avatar.js +44 -0
- package/dist/ui/badge.d.ts +20 -0
- package/dist/ui/badge.js +36 -0
- package/dist/ui/button-group.d.ts +24 -0
- package/dist/ui/button-group.js +45 -0
- package/dist/ui/button.d.ts +36 -0
- package/dist/ui/button.js +104 -0
- package/dist/ui/calendar.d.ts +11 -0
- package/dist/ui/calendar.js +160 -0
- package/dist/ui/card.d.ts +36 -0
- package/dist/ui/card.js +70 -0
- package/dist/ui/checkbox-group.d.ts +11 -0
- package/dist/ui/checkbox-group.js +16 -0
- package/dist/ui/checkbox.d.ts +23 -0
- package/dist/ui/checkbox.js +58 -0
- package/dist/ui/code-diff.d.ts +28 -0
- package/dist/ui/code-diff.js +561 -0
- package/dist/ui/code.d.ts +62 -0
- package/dist/ui/code.js +292 -0
- package/dist/ui/collapsible.d.ts +31 -0
- package/dist/ui/collapsible.js +72 -0
- package/dist/ui/color-picker.d.ts +137 -0
- package/dist/ui/color-picker.js +797 -0
- package/dist/ui/combobox-disabled-selection.d.ts +5 -0
- package/dist/ui/combobox-disabled-selection.js +11 -0
- package/dist/ui/combobox.d.ts +70 -0
- package/dist/ui/combobox.js +194 -0
- package/dist/ui/command.d.ts +44 -0
- package/dist/ui/command.js +166 -0
- package/dist/ui/context-menu.d.ts +86 -0
- package/dist/ui/context-menu.js +202 -0
- package/dist/ui/dialog.d.ts +38 -0
- package/dist/ui/dialog.js +124 -0
- package/dist/ui/dockable-panel-geometry.d.ts +18 -0
- package/dist/ui/dockable-panel-geometry.js +17 -0
- package/dist/ui/dockable-panel.d.ts +58 -0
- package/dist/ui/dockable-panel.js +366 -0
- package/dist/ui/drawer.d.ts +42 -0
- package/dist/ui/drawer.js +182 -0
- package/dist/ui/dropdown-menu.d.ts +46 -0
- package/dist/ui/dropdown-menu.js +89 -0
- package/dist/ui/dropzone.d.ts +66 -0
- package/dist/ui/dropzone.js +311 -0
- package/dist/ui/empty.d.ts +28 -0
- package/dist/ui/empty.js +59 -0
- package/dist/ui/field.d.ts +64 -0
- package/dist/ui/field.js +166 -0
- package/dist/ui/form.d.ts +10 -0
- package/dist/ui/form.js +17 -0
- package/dist/ui/gradient-editor.d.ts +47 -0
- package/dist/ui/gradient-editor.js +301 -0
- package/dist/ui/hover-card.d.ts +25 -0
- package/dist/ui/hover-card.js +46 -0
- package/dist/ui/infinite-canvas.d.ts +40 -0
- package/dist/ui/infinite-canvas.js +278 -0
- package/dist/ui/input-group.d.ts +21 -0
- package/dist/ui/input-group.js +44 -0
- package/dist/ui/input-otp.d.ts +38 -0
- package/dist/ui/input-otp.js +45 -0
- package/dist/ui/input.d.ts +12 -0
- package/dist/ui/input.js +18 -0
- package/dist/ui/item.d.ts +46 -0
- package/dist/ui/item.js +110 -0
- package/dist/ui/kbd.d.ts +12 -0
- package/dist/ui/kbd.js +23 -0
- package/dist/ui/markdown-elements.d.ts +52 -0
- package/dist/ui/markdown-elements.js +211 -0
- package/dist/ui/markdown.d.ts +14 -0
- package/dist/ui/markdown.js +31 -0
- package/dist/ui/menubar.d.ts +74 -0
- package/dist/ui/menubar.js +162 -0
- package/dist/ui/meter.d.ts +34 -0
- package/dist/ui/meter.js +57 -0
- package/dist/ui/morphing-panel.d.ts +24 -0
- package/dist/ui/morphing-panel.js +87 -0
- package/dist/ui/native-select.d.ts +12 -0
- package/dist/ui/native-select.js +41 -0
- package/dist/ui/navigation-menu.d.ts +51 -0
- package/dist/ui/navigation-menu.js +135 -0
- package/dist/ui/number-field.d.ts +72 -0
- package/dist/ui/number-field.js +124 -0
- package/dist/ui/pagination.d.ts +26 -0
- package/dist/ui/pagination.js +77 -0
- package/dist/ui/phone-input.d.ts +30 -0
- package/dist/ui/phone-input.js +263 -0
- package/dist/ui/popover.d.ts +34 -0
- package/dist/ui/popover.js +87 -0
- package/dist/ui/progress.d.ts +34 -0
- package/dist/ui/progress.js +57 -0
- package/dist/ui/radio-group.d.ts +29 -0
- package/dist/ui/radio-group.js +37 -0
- package/dist/ui/resizable.d.ts +56 -0
- package/dist/ui/resizable.js +82 -0
- package/dist/ui/responsive-dialog.d.ts +18 -0
- package/dist/ui/responsive-dialog.js +121 -0
- package/dist/ui/rich-tooltip-tour.d.ts +12 -0
- package/dist/ui/rich-tooltip-tour.js +20 -0
- package/dist/ui/rich-tooltip.d.ts +83 -0
- package/dist/ui/rich-tooltip.js +331 -0
- package/dist/ui/scroll-area.d.ts +25 -0
- package/dist/ui/scroll-area.js +93 -0
- package/dist/ui/select.d.ts +44 -0
- package/dist/ui/select.js +124 -0
- package/dist/ui/separator.d.ts +9 -0
- package/dist/ui/separator.js +16 -0
- package/dist/ui/sheet.d.ts +25 -0
- package/dist/ui/sheet.js +76 -0
- package/dist/ui/sidebar.d.ts +88 -0
- package/dist/ui/sidebar.js +362 -0
- package/dist/ui/skeleton.d.ts +8 -0
- package/dist/ui/skeleton.js +13 -0
- package/dist/ui/slider.d.ts +24 -0
- package/dist/ui/slider.js +114 -0
- package/dist/ui/spinner.d.ts +12 -0
- package/dist/ui/spinner.js +26 -0
- package/dist/ui/stepper.d.ts +58 -0
- package/dist/ui/stepper.js +232 -0
- package/dist/ui/switch.d.ts +26 -0
- package/dist/ui/switch.js +71 -0
- package/dist/ui/table-of-contents.d.ts +22 -0
- package/dist/ui/table-of-contents.js +181 -0
- package/dist/ui/table.d.ts +37 -0
- package/dist/ui/table.js +83 -0
- package/dist/ui/tabs.d.ts +36 -0
- package/dist/ui/tabs.js +127 -0
- package/dist/ui/textarea.d.ts +9 -0
- package/dist/ui/textarea.js +16 -0
- package/dist/ui/timeline.d.ts +40 -0
- package/dist/ui/timeline.js +80 -0
- package/dist/ui/toast.d.ts +28 -0
- package/dist/ui/toast.js +132 -0
- package/dist/ui/toggle.d.ts +20 -0
- package/dist/ui/toggle.js +71 -0
- package/dist/ui/toolbar.d.ts +40 -0
- package/dist/ui/toolbar.js +72 -0
- package/dist/ui/tooltip.d.ts +27 -0
- package/dist/ui/tooltip.js +93 -0
- package/dist/ui/tree.d.ts +56 -0
- package/dist/ui/tree.js +438 -0
- package/dist/ui/trigger-menu.d.ts +46 -0
- package/dist/ui/trigger-menu.js +116 -0
- package/dist/user-ask.d.ts +50 -0
- package/dist/user-ask.js +398 -0
- package/package.json +115 -0
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
//#region src/knob-contracts/separator-knobs.d.ts
|
|
2
|
+
declare const separatorKnobs: readonly ["--cui-separator-root-background"];
|
|
3
|
+
type SeparatorKnobStyle = Partial<Record<(typeof separatorKnobs)[number], string>>;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { SeparatorKnobStyle, separatorKnobs };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
//#region src/knob-contracts/sidebar-knobs.d.ts
|
|
2
|
+
declare const sidebarKnobs: readonly ["--cui-sidebar-rail-divider-background", "--cui-sidebar-wrapper-background", "--cui-sidebar-wrapper-background-image", "--cui-sidebar-menu-button-radius", "--cui-sidebar-inner-background", "--cui-sidebar-inner-border-color", "--cui-sidebar-inner-background-image", "--cui-sidebar-inner-border-width", "--cui-sidebar-inner-radius", "--cui-sidebar-inner-shadow", "--cui-sidebar-inset-background", "--cui-sidebar-inset-background-image", "--cui-sidebar-inset-shadow", "--cui-sidebar-group-label-foreground", "--cui-sidebar-menu-button-foreground", "--cui-sidebar-menu-button-hover-background", "--cui-sidebar-menu-button-hover-foreground", "--cui-sidebar-menu-button-hover-shadow", "--cui-sidebar-menu-button-active-background", "--cui-sidebar-menu-button-active-foreground", "--cui-sidebar-menu-button-active-shadow"];
|
|
3
|
+
type SidebarKnobStyle = Partial<Record<(typeof sidebarKnobs)[number], string>>;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { SidebarKnobStyle, sidebarKnobs };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
//#region src/knob-contracts/sidebar-knobs.ts
|
|
2
|
+
const sidebarKnobs = [
|
|
3
|
+
"--cui-sidebar-rail-divider-background",
|
|
4
|
+
"--cui-sidebar-wrapper-background",
|
|
5
|
+
"--cui-sidebar-wrapper-background-image",
|
|
6
|
+
"--cui-sidebar-menu-button-radius",
|
|
7
|
+
"--cui-sidebar-inner-background",
|
|
8
|
+
"--cui-sidebar-inner-border-color",
|
|
9
|
+
"--cui-sidebar-inner-background-image",
|
|
10
|
+
"--cui-sidebar-inner-border-width",
|
|
11
|
+
"--cui-sidebar-inner-radius",
|
|
12
|
+
"--cui-sidebar-inner-shadow",
|
|
13
|
+
"--cui-sidebar-inset-background",
|
|
14
|
+
"--cui-sidebar-inset-background-image",
|
|
15
|
+
"--cui-sidebar-inset-shadow",
|
|
16
|
+
"--cui-sidebar-group-label-foreground",
|
|
17
|
+
"--cui-sidebar-menu-button-foreground",
|
|
18
|
+
"--cui-sidebar-menu-button-hover-background",
|
|
19
|
+
"--cui-sidebar-menu-button-hover-foreground",
|
|
20
|
+
"--cui-sidebar-menu-button-hover-shadow",
|
|
21
|
+
"--cui-sidebar-menu-button-active-background",
|
|
22
|
+
"--cui-sidebar-menu-button-active-foreground",
|
|
23
|
+
"--cui-sidebar-menu-button-active-shadow"
|
|
24
|
+
];
|
|
25
|
+
//#endregion
|
|
26
|
+
export { sidebarKnobs };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
//#region src/knob-contracts/skeleton-knobs.d.ts
|
|
2
|
+
declare const skeletonKnobs: readonly ["--cui-skeleton-radius", "--cui-skeleton-background"];
|
|
3
|
+
type SkeletonKnobStyle = Partial<Record<(typeof skeletonKnobs)[number], string>>;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { SkeletonKnobStyle, skeletonKnobs };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
//#region src/knob-contracts/source-badge-knobs.d.ts
|
|
2
|
+
declare const sourceBadgeKnobs: readonly ["--cui-source-badge-background", "--cui-source-badge-foreground", "--cui-source-badge-hover-background", "--cui-source-badge-hover-foreground", "--cui-source-badge-favicon-background", "--cui-source-badge-favicon-radius"];
|
|
3
|
+
type SourceBadgeKnobStyle = Partial<Record<(typeof sourceBadgeKnobs)[number], string>>;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { SourceBadgeKnobStyle, sourceBadgeKnobs };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//#region src/knob-contracts/source-badge-knobs.ts
|
|
2
|
+
const sourceBadgeKnobs = [
|
|
3
|
+
"--cui-source-badge-background",
|
|
4
|
+
"--cui-source-badge-foreground",
|
|
5
|
+
"--cui-source-badge-hover-background",
|
|
6
|
+
"--cui-source-badge-hover-foreground",
|
|
7
|
+
"--cui-source-badge-favicon-background",
|
|
8
|
+
"--cui-source-badge-favicon-radius"
|
|
9
|
+
];
|
|
10
|
+
//#endregion
|
|
11
|
+
export { sourceBadgeKnobs };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
//#region src/knob-contracts/stepper-knobs.d.ts
|
|
2
|
+
declare const stepperKnobs: readonly ["--cui-stepper-indicator-radius", "--cui-stepper-indicator-background", "--cui-stepper-indicator-foreground", "--cui-stepper-indicator-border-color", "--cui-stepper-separator-background", "--cui-stepper-title-foreground"];
|
|
3
|
+
type StepperKnobStyle = Partial<Record<(typeof stepperKnobs)[number], string>>;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { StepperKnobStyle, stepperKnobs };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//#region src/knob-contracts/stepper-knobs.ts
|
|
2
|
+
const stepperKnobs = [
|
|
3
|
+
"--cui-stepper-indicator-radius",
|
|
4
|
+
"--cui-stepper-indicator-background",
|
|
5
|
+
"--cui-stepper-indicator-foreground",
|
|
6
|
+
"--cui-stepper-indicator-border-color",
|
|
7
|
+
"--cui-stepper-separator-background",
|
|
8
|
+
"--cui-stepper-title-foreground"
|
|
9
|
+
];
|
|
10
|
+
//#endregion
|
|
11
|
+
export { stepperKnobs };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
//#region src/knob-contracts/switch-knobs.d.ts
|
|
2
|
+
declare const switchKnobs: readonly ["--cui-switch-thumb-shadow", "--cui-switch-background", "--cui-switch-hover-background", "--cui-switch-checked-background", "--cui-switch-checked-hover-background", "--cui-switch-thumb-radius", "--cui-switch-thumb-background"];
|
|
3
|
+
type SwitchKnobStyle = Partial<Record<(typeof switchKnobs)[number], string>>;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { SwitchKnobStyle, switchKnobs };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
//#region src/knob-contracts/switch-knobs.ts
|
|
2
|
+
const switchKnobs = [
|
|
3
|
+
"--cui-switch-thumb-shadow",
|
|
4
|
+
"--cui-switch-background",
|
|
5
|
+
"--cui-switch-hover-background",
|
|
6
|
+
"--cui-switch-checked-background",
|
|
7
|
+
"--cui-switch-checked-hover-background",
|
|
8
|
+
"--cui-switch-thumb-radius",
|
|
9
|
+
"--cui-switch-thumb-background"
|
|
10
|
+
];
|
|
11
|
+
//#endregion
|
|
12
|
+
export { switchKnobs };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
//#region src/knob-contracts/table-knobs.d.ts
|
|
2
|
+
declare const tableKnobs: readonly ["--cui-table-background", "--cui-table-foreground", "--cui-table-border-color", "--cui-table-row-hover-background", "--cui-table-row-selected-background", "--cui-table-header-foreground", "--cui-table-footer-background"];
|
|
3
|
+
type TableKnobStyle = Partial<Record<(typeof tableKnobs)[number], string>>;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { TableKnobStyle, tableKnobs };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
//#region src/knob-contracts/table-knobs.ts
|
|
2
|
+
const tableKnobs = [
|
|
3
|
+
"--cui-table-background",
|
|
4
|
+
"--cui-table-foreground",
|
|
5
|
+
"--cui-table-border-color",
|
|
6
|
+
"--cui-table-row-hover-background",
|
|
7
|
+
"--cui-table-row-selected-background",
|
|
8
|
+
"--cui-table-header-foreground",
|
|
9
|
+
"--cui-table-footer-background"
|
|
10
|
+
];
|
|
11
|
+
//#endregion
|
|
12
|
+
export { tableKnobs };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
//#region src/knob-contracts/table-of-contents-knobs.d.ts
|
|
2
|
+
declare const tableOfContentsKnobs: readonly ["--cui-table-of-contents-rail-background", "--cui-table-of-contents-highlight-radius", "--cui-table-of-contents-highlight-background"];
|
|
3
|
+
type TableOfContentsKnobStyle = Partial<Record<(typeof tableOfContentsKnobs)[number], string>>;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { TableOfContentsKnobStyle, tableOfContentsKnobs };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
//#region src/knob-contracts/table-of-contents-knobs.ts
|
|
2
|
+
const tableOfContentsKnobs = [
|
|
3
|
+
"--cui-table-of-contents-rail-background",
|
|
4
|
+
"--cui-table-of-contents-highlight-radius",
|
|
5
|
+
"--cui-table-of-contents-highlight-background"
|
|
6
|
+
];
|
|
7
|
+
//#endregion
|
|
8
|
+
export { tableOfContentsKnobs };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
//#region src/knob-contracts/tabs-knobs.d.ts
|
|
2
|
+
declare const tabsKnobs: readonly ["--cui-tabs-trigger-radius", "--cui-tabs-list-padding", "--cui-tabs-list-radius", "--cui-tabs-list-background", "--cui-tabs-list-backdrop-filter", "--cui-tabs-indicator-background", "--cui-tabs-foreground", "--cui-tabs-active-foreground", "--cui-tabs-indicator-shadow", "--cui-tabs-list-shadow", "--cui-tabs-border-color"];
|
|
3
|
+
type TabsKnobStyle = Partial<Record<(typeof tabsKnobs)[number], string>>;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { TabsKnobStyle, tabsKnobs };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
//#region src/knob-contracts/tabs-knobs.ts
|
|
2
|
+
const tabsKnobs = [
|
|
3
|
+
"--cui-tabs-trigger-radius",
|
|
4
|
+
"--cui-tabs-list-padding",
|
|
5
|
+
"--cui-tabs-list-radius",
|
|
6
|
+
"--cui-tabs-list-background",
|
|
7
|
+
"--cui-tabs-list-backdrop-filter",
|
|
8
|
+
"--cui-tabs-indicator-background",
|
|
9
|
+
"--cui-tabs-foreground",
|
|
10
|
+
"--cui-tabs-active-foreground",
|
|
11
|
+
"--cui-tabs-indicator-shadow",
|
|
12
|
+
"--cui-tabs-list-shadow",
|
|
13
|
+
"--cui-tabs-border-color"
|
|
14
|
+
];
|
|
15
|
+
//#endregion
|
|
16
|
+
export { tabsKnobs };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
//#region src/knob-contracts/task-list-knobs.d.ts
|
|
2
|
+
declare const taskListKnobs: readonly ["--cui-task-list-radius", "--cui-task-list-background", "--cui-task-list-foreground", "--cui-task-list-border-color", "--cui-task-list-shadow", "--cui-task-list-item-foreground", "--cui-task-list-item-pending-foreground", "--cui-task-list-indicator-foreground", "--cui-task-list-indicator-active-foreground"];
|
|
3
|
+
type TaskListKnobStyle = Partial<Record<(typeof taskListKnobs)[number], string>>;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { TaskListKnobStyle, taskListKnobs };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//#region src/knob-contracts/task-list-knobs.ts
|
|
2
|
+
const taskListKnobs = [
|
|
3
|
+
"--cui-task-list-radius",
|
|
4
|
+
"--cui-task-list-background",
|
|
5
|
+
"--cui-task-list-foreground",
|
|
6
|
+
"--cui-task-list-border-color",
|
|
7
|
+
"--cui-task-list-shadow",
|
|
8
|
+
"--cui-task-list-item-foreground",
|
|
9
|
+
"--cui-task-list-item-pending-foreground",
|
|
10
|
+
"--cui-task-list-indicator-foreground",
|
|
11
|
+
"--cui-task-list-indicator-active-foreground"
|
|
12
|
+
];
|
|
13
|
+
//#endregion
|
|
14
|
+
export { taskListKnobs };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
//#region src/knob-contracts/thread-rail-knobs.d.ts
|
|
2
|
+
declare const threadRailKnobs: readonly ["--cui-thread-rail-item-radius", "--cui-thread-rail-item-background", "--cui-thread-rail-line-radius", "--cui-thread-rail-popover-radius", "--cui-thread-rail-popover-background", "--cui-thread-rail-popover-border-color", "--cui-thread-rail-popover-border-width", "--cui-thread-rail-popover-shadow", "--cui-thread-rail-popover-backdrop-blur"];
|
|
3
|
+
type ThreadRailKnobStyle = Partial<Record<(typeof threadRailKnobs)[number], string>>;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { ThreadRailKnobStyle, threadRailKnobs };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//#region src/knob-contracts/thread-rail-knobs.ts
|
|
2
|
+
const threadRailKnobs = [
|
|
3
|
+
"--cui-thread-rail-item-radius",
|
|
4
|
+
"--cui-thread-rail-item-background",
|
|
5
|
+
"--cui-thread-rail-line-radius",
|
|
6
|
+
"--cui-thread-rail-popover-radius",
|
|
7
|
+
"--cui-thread-rail-popover-background",
|
|
8
|
+
"--cui-thread-rail-popover-border-color",
|
|
9
|
+
"--cui-thread-rail-popover-border-width",
|
|
10
|
+
"--cui-thread-rail-popover-shadow",
|
|
11
|
+
"--cui-thread-rail-popover-backdrop-blur"
|
|
12
|
+
];
|
|
13
|
+
//#endregion
|
|
14
|
+
export { threadRailKnobs };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
//#region src/knob-contracts/timeline-knobs.d.ts
|
|
2
|
+
declare const timelineKnobs: readonly ["--cui-timeline-indicator-background", "--cui-timeline-indicator-foreground", "--cui-timeline-running-foreground", "--cui-timeline-success-foreground", "--cui-timeline-error-foreground", "--cui-timeline-separator-background", "--cui-timeline-title-foreground"];
|
|
3
|
+
type TimelineKnobStyle = Partial<Record<(typeof timelineKnobs)[number], string>>;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { TimelineKnobStyle, timelineKnobs };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
//#region src/knob-contracts/timeline-knobs.ts
|
|
2
|
+
const timelineKnobs = [
|
|
3
|
+
"--cui-timeline-indicator-background",
|
|
4
|
+
"--cui-timeline-indicator-foreground",
|
|
5
|
+
"--cui-timeline-running-foreground",
|
|
6
|
+
"--cui-timeline-success-foreground",
|
|
7
|
+
"--cui-timeline-error-foreground",
|
|
8
|
+
"--cui-timeline-separator-background",
|
|
9
|
+
"--cui-timeline-title-foreground"
|
|
10
|
+
];
|
|
11
|
+
//#endregion
|
|
12
|
+
export { timelineKnobs };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
//#region src/knob-contracts/toolbar-knobs.d.ts
|
|
2
|
+
declare const toolbarKnobs: readonly ["--cui-toolbar-radius", "--cui-toolbar-padding", "--cui-toolbar-background", "--cui-toolbar-foreground", "--cui-toolbar-border-color", "--cui-toolbar-shadow", "--cui-toolbar-item-radius", "--cui-toolbar-item-background", "--cui-toolbar-item-shadow", "--cui-toolbar-item-foreground", "--cui-toolbar-item-hover-background", "--cui-toolbar-item-hover-foreground", "--cui-toolbar-item-active-background", "--cui-toolbar-item-active-foreground", "--cui-toolbar-separator-background"];
|
|
3
|
+
type ToolbarKnobStyle = Partial<Record<(typeof toolbarKnobs)[number], string>>;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { ToolbarKnobStyle, toolbarKnobs };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
//#region src/knob-contracts/toolbar-knobs.ts
|
|
2
|
+
const toolbarKnobs = [
|
|
3
|
+
"--cui-toolbar-radius",
|
|
4
|
+
"--cui-toolbar-padding",
|
|
5
|
+
"--cui-toolbar-background",
|
|
6
|
+
"--cui-toolbar-foreground",
|
|
7
|
+
"--cui-toolbar-border-color",
|
|
8
|
+
"--cui-toolbar-shadow",
|
|
9
|
+
"--cui-toolbar-item-radius",
|
|
10
|
+
"--cui-toolbar-item-background",
|
|
11
|
+
"--cui-toolbar-item-shadow",
|
|
12
|
+
"--cui-toolbar-item-foreground",
|
|
13
|
+
"--cui-toolbar-item-hover-background",
|
|
14
|
+
"--cui-toolbar-item-hover-foreground",
|
|
15
|
+
"--cui-toolbar-item-active-background",
|
|
16
|
+
"--cui-toolbar-item-active-foreground",
|
|
17
|
+
"--cui-toolbar-separator-background"
|
|
18
|
+
];
|
|
19
|
+
//#endregion
|
|
20
|
+
export { toolbarKnobs };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
//#region src/knob-contracts/track-highlight-knobs.d.ts
|
|
2
|
+
declare const trackHighlightKnobs: readonly ["--cui-track-highlight-radius", "--cui-track-highlight-background", "--cui-track-highlight-hover-background", "--cui-track-highlight-ring-color", "--cui-track-highlight-shadow", "--cui-track-highlight-transition-duration"];
|
|
3
|
+
type TrackHighlightKnobStyle = Partial<Record<(typeof trackHighlightKnobs)[number], string>>;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { TrackHighlightKnobStyle, trackHighlightKnobs };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//#region src/knob-contracts/track-highlight-knobs.ts
|
|
2
|
+
const trackHighlightKnobs = [
|
|
3
|
+
"--cui-track-highlight-radius",
|
|
4
|
+
"--cui-track-highlight-background",
|
|
5
|
+
"--cui-track-highlight-hover-background",
|
|
6
|
+
"--cui-track-highlight-ring-color",
|
|
7
|
+
"--cui-track-highlight-shadow",
|
|
8
|
+
"--cui-track-highlight-transition-duration"
|
|
9
|
+
];
|
|
10
|
+
//#endregion
|
|
11
|
+
export { trackHighlightKnobs };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
//#region src/knob-contracts/transcript-divider-knobs.d.ts
|
|
2
|
+
declare const transcriptDividerKnobs: readonly ["--cui-transcript-divider-foreground", "--cui-transcript-divider-line-color", "--cui-transcript-divider-danger-foreground", "--cui-transcript-divider-success-foreground", "--cui-transcript-divider-warning-foreground"];
|
|
3
|
+
type TranscriptDividerKnobStyle = Partial<Record<(typeof transcriptDividerKnobs)[number], string>>;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { TranscriptDividerKnobStyle, transcriptDividerKnobs };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//#region src/knob-contracts/transcript-divider-knobs.ts
|
|
2
|
+
const transcriptDividerKnobs = [
|
|
3
|
+
"--cui-transcript-divider-foreground",
|
|
4
|
+
"--cui-transcript-divider-line-color",
|
|
5
|
+
"--cui-transcript-divider-danger-foreground",
|
|
6
|
+
"--cui-transcript-divider-success-foreground",
|
|
7
|
+
"--cui-transcript-divider-warning-foreground"
|
|
8
|
+
];
|
|
9
|
+
//#endregion
|
|
10
|
+
export { transcriptDividerKnobs };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
//#region src/knob-contracts/tree-knobs.d.ts
|
|
2
|
+
declare const treeKnobs: readonly ["--cui-tree-item-trigger-radius", "--cui-tree-item-trigger-foreground", "--cui-tree-item-trigger-hover-background", "--cui-tree-item-trigger-hover-foreground", "--cui-tree-item-trigger-selected-background", "--cui-tree-item-trigger-selected-foreground", "--cui-tree-item-trigger-font-size", "--cui-tree-item-trigger-selected-font-weight"];
|
|
3
|
+
type TreeKnobStyle = Partial<Record<(typeof treeKnobs)[number], string>>;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { TreeKnobStyle, treeKnobs };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//#region src/knob-contracts/tree-knobs.ts
|
|
2
|
+
const treeKnobs = [
|
|
3
|
+
"--cui-tree-item-trigger-radius",
|
|
4
|
+
"--cui-tree-item-trigger-foreground",
|
|
5
|
+
"--cui-tree-item-trigger-hover-background",
|
|
6
|
+
"--cui-tree-item-trigger-hover-foreground",
|
|
7
|
+
"--cui-tree-item-trigger-selected-background",
|
|
8
|
+
"--cui-tree-item-trigger-selected-foreground",
|
|
9
|
+
"--cui-tree-item-trigger-font-size",
|
|
10
|
+
"--cui-tree-item-trigger-selected-font-weight"
|
|
11
|
+
];
|
|
12
|
+
//#endregion
|
|
13
|
+
export { treeKnobs };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
//#region src/knob-contracts/user-ask-knobs.d.ts
|
|
2
|
+
declare const userAskKnobs: readonly ["--cui-user-ask-radius", "--cui-user-ask-background", "--cui-user-ask-foreground", "--cui-user-ask-border-color", "--cui-user-ask-shadow", "--cui-user-ask-option-radius", "--cui-user-ask-option-hover-background", "--cui-user-ask-option-selected-background", "--cui-user-ask-indicator-background", "--cui-user-ask-indicator-foreground", "--cui-user-ask-input-background", "--cui-user-ask-input-foreground"];
|
|
3
|
+
type UserAskKnobStyle = Partial<Record<(typeof userAskKnobs)[number], string>>;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { UserAskKnobStyle, userAskKnobs };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
//#region src/knob-contracts/user-ask-knobs.ts
|
|
2
|
+
const userAskKnobs = [
|
|
3
|
+
"--cui-user-ask-radius",
|
|
4
|
+
"--cui-user-ask-background",
|
|
5
|
+
"--cui-user-ask-foreground",
|
|
6
|
+
"--cui-user-ask-border-color",
|
|
7
|
+
"--cui-user-ask-shadow",
|
|
8
|
+
"--cui-user-ask-option-radius",
|
|
9
|
+
"--cui-user-ask-option-hover-background",
|
|
10
|
+
"--cui-user-ask-option-selected-background",
|
|
11
|
+
"--cui-user-ask-indicator-background",
|
|
12
|
+
"--cui-user-ask-indicator-foreground",
|
|
13
|
+
"--cui-user-ask-input-background",
|
|
14
|
+
"--cui-user-ask-input-foreground"
|
|
15
|
+
];
|
|
16
|
+
//#endregion
|
|
17
|
+
export { userAskKnobs };
|
package/dist/lib/cn.d.ts
ADDED
package/dist/lib/cn.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { clsx } from "clsx";
|
|
2
|
+
import { extendTailwindMerge } from "tailwind-merge";
|
|
3
|
+
//#region src/lib/cn.ts
|
|
4
|
+
const twMerge = extendTailwindMerge({
|
|
5
|
+
extend: { classGroups: {
|
|
6
|
+
"font-size": [{ text: [
|
|
7
|
+
"micro",
|
|
8
|
+
"caption",
|
|
9
|
+
"label",
|
|
10
|
+
"body",
|
|
11
|
+
"body-lg",
|
|
12
|
+
"heading-1",
|
|
13
|
+
"heading-2",
|
|
14
|
+
"heading-3",
|
|
15
|
+
"heading-4",
|
|
16
|
+
"meta",
|
|
17
|
+
"title-sm",
|
|
18
|
+
"title-md",
|
|
19
|
+
"title-lg",
|
|
20
|
+
"display"
|
|
21
|
+
] }],
|
|
22
|
+
shadow: [{ shadow: [
|
|
23
|
+
"pop",
|
|
24
|
+
"soft",
|
|
25
|
+
"modal"
|
|
26
|
+
] }]
|
|
27
|
+
} },
|
|
28
|
+
override: { conflictingClassGroups: { "font-size": [] } }
|
|
29
|
+
});
|
|
30
|
+
function cn(...inputs) {
|
|
31
|
+
return twMerge(clsx(inputs));
|
|
32
|
+
}
|
|
33
|
+
//#endregion
|
|
34
|
+
export { cn };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CodeToken, CodeTokenLines, CodeTokenStyle, highlightToTokens, normalizeLanguage as normalizeLanguage$1 } from "./code-tokens.js";
|
|
2
|
+
//#region src/lib/code-block-shiki.d.ts
|
|
3
|
+
type CodeBlockEditorToken = CodeToken;
|
|
4
|
+
type CodeBlockEditorTokenLines = CodeTokenLines;
|
|
5
|
+
type CodeBlockEditorTokenStyle = CodeTokenStyle;
|
|
6
|
+
declare const highlightCodeToTokens: typeof highlightToTokens;
|
|
7
|
+
declare const normalizeLanguage: typeof normalizeLanguage$1;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { CodeBlockEditorToken, CodeBlockEditorTokenLines, CodeBlockEditorTokenStyle, highlightCodeToTokens, normalizeLanguage };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { highlightToTokens, normalizeLanguage as normalizeLanguage$1 } from "./code-tokens.js";
|
|
2
|
+
//#region src/lib/code-block-shiki.ts
|
|
3
|
+
const highlightCodeToTokens = highlightToTokens;
|
|
4
|
+
const normalizeLanguage = normalizeLanguage$1;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { highlightCodeToTokens, normalizeLanguage };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
//#region src/lib/code-tokens.d.ts
|
|
2
|
+
type CodeTokenStyle = {
|
|
3
|
+
color?: string;
|
|
4
|
+
fontStyle?: "italic" | "normal";
|
|
5
|
+
fontWeight?: "bold" | "normal";
|
|
6
|
+
textDecoration?: "underline";
|
|
7
|
+
};
|
|
8
|
+
type CodeToken = {
|
|
9
|
+
content: string;
|
|
10
|
+
style?: CodeTokenStyle;
|
|
11
|
+
};
|
|
12
|
+
type CodeTokenLine = CodeToken[];
|
|
13
|
+
type CodeTokenLines = CodeTokenLine[];
|
|
14
|
+
type CodeEmphasisSegment = {
|
|
15
|
+
text: string;
|
|
16
|
+
emphasis: boolean;
|
|
17
|
+
};
|
|
18
|
+
type CodeTokenEmphasisRun = CodeToken & {
|
|
19
|
+
emphasis: boolean;
|
|
20
|
+
start: number;
|
|
21
|
+
};
|
|
22
|
+
declare const CODE_THEME_NAME = "agent-code";
|
|
23
|
+
declare const CODE_VARIABLE_PREFIX = "--code-";
|
|
24
|
+
declare function normalizeLanguage(language?: string | null): string | undefined;
|
|
25
|
+
declare function mergeCodeTokenLineWithEmphasis(plain: string, tokens: CodeTokenLine | null, segments: readonly CodeEmphasisSegment[] | undefined): CodeTokenEmphasisRun[];
|
|
26
|
+
declare function highlightToTokens(code: string, language?: string | null): Promise<CodeTokenLines | null>;
|
|
27
|
+
//#endregion
|
|
28
|
+
export { CODE_THEME_NAME, CODE_VARIABLE_PREFIX, CodeEmphasisSegment, CodeToken, CodeTokenEmphasisRun, CodeTokenLine, CodeTokenLines, CodeTokenStyle, highlightToTokens, mergeCodeTokenLineWithEmphasis, normalizeLanguage };
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
//#region src/lib/code-tokens.ts
|
|
2
|
+
const CODE_THEME_NAME = "agent-code";
|
|
3
|
+
const CODE_VARIABLE_PREFIX = "--code-";
|
|
4
|
+
const languageAliases = {
|
|
5
|
+
bash: "bash",
|
|
6
|
+
cjs: "javascript",
|
|
7
|
+
css: "css",
|
|
8
|
+
diff: "diff",
|
|
9
|
+
html: "html",
|
|
10
|
+
js: "javascript",
|
|
11
|
+
json: "json",
|
|
12
|
+
json5: "json",
|
|
13
|
+
jsx: "jsx",
|
|
14
|
+
markdown: "markdown",
|
|
15
|
+
md: "markdown",
|
|
16
|
+
mjs: "javascript",
|
|
17
|
+
node: "javascript",
|
|
18
|
+
py: "python",
|
|
19
|
+
python: "python",
|
|
20
|
+
sh: "bash",
|
|
21
|
+
shell: "bash",
|
|
22
|
+
ts: "typescript",
|
|
23
|
+
tsx: "tsx",
|
|
24
|
+
typescript: "typescript",
|
|
25
|
+
yaml: "yaml",
|
|
26
|
+
yml: "yaml",
|
|
27
|
+
zsh: "bash"
|
|
28
|
+
};
|
|
29
|
+
const FONT_STYLE_ITALIC = 1;
|
|
30
|
+
const FONT_STYLE_BOLD = 2;
|
|
31
|
+
const FONT_STYLE_UNDERLINE = 4;
|
|
32
|
+
let highlighterPromise = null;
|
|
33
|
+
function normalizeLanguage(language) {
|
|
34
|
+
if (!language) return void 0;
|
|
35
|
+
return languageAliases[language.toLowerCase()];
|
|
36
|
+
}
|
|
37
|
+
function getHighlighter() {
|
|
38
|
+
if (!highlighterPromise) highlighterPromise = (async () => {
|
|
39
|
+
const [{ createHighlighterCore, createCssVariablesTheme }, { createJavaScriptRegexEngine }] = await Promise.all([import("shiki/core"), import("shiki/engine/javascript")]);
|
|
40
|
+
return createHighlighterCore({
|
|
41
|
+
themes: [createCssVariablesTheme({
|
|
42
|
+
name: CODE_THEME_NAME,
|
|
43
|
+
variablePrefix: CODE_VARIABLE_PREFIX,
|
|
44
|
+
fontStyle: true
|
|
45
|
+
})],
|
|
46
|
+
langs: [
|
|
47
|
+
import("shiki/langs/javascript.mjs"),
|
|
48
|
+
import("shiki/langs/typescript.mjs"),
|
|
49
|
+
import("shiki/langs/tsx.mjs"),
|
|
50
|
+
import("shiki/langs/jsx.mjs"),
|
|
51
|
+
import("shiki/langs/json.mjs"),
|
|
52
|
+
import("shiki/langs/bash.mjs"),
|
|
53
|
+
import("shiki/langs/markdown.mjs"),
|
|
54
|
+
import("shiki/langs/python.mjs"),
|
|
55
|
+
import("shiki/langs/css.mjs"),
|
|
56
|
+
import("shiki/langs/html.mjs"),
|
|
57
|
+
import("shiki/langs/yaml.mjs"),
|
|
58
|
+
import("shiki/langs/diff.mjs")
|
|
59
|
+
],
|
|
60
|
+
engine: createJavaScriptRegexEngine()
|
|
61
|
+
});
|
|
62
|
+
})();
|
|
63
|
+
return highlighterPromise;
|
|
64
|
+
}
|
|
65
|
+
function tokenStyle(token) {
|
|
66
|
+
const style = {};
|
|
67
|
+
if (token.color) style.color = token.color;
|
|
68
|
+
const fontStyle = token.fontStyle ?? 0;
|
|
69
|
+
if (fontStyle > 0) {
|
|
70
|
+
if ((fontStyle & FONT_STYLE_ITALIC) !== 0) style.fontStyle = "italic";
|
|
71
|
+
if ((fontStyle & FONT_STYLE_BOLD) !== 0) style.fontWeight = "bold";
|
|
72
|
+
if ((fontStyle & FONT_STYLE_UNDERLINE) !== 0) style.textDecoration = "underline";
|
|
73
|
+
}
|
|
74
|
+
return style.color || style.fontStyle || style.fontWeight || style.textDecoration ? style : void 0;
|
|
75
|
+
}
|
|
76
|
+
const CACHE_LIMIT = 200;
|
|
77
|
+
const cache = /* @__PURE__ */ new Map();
|
|
78
|
+
function cacheGet(key) {
|
|
79
|
+
const value = cache.get(key);
|
|
80
|
+
if (value !== void 0) {
|
|
81
|
+
cache.delete(key);
|
|
82
|
+
cache.set(key, value);
|
|
83
|
+
}
|
|
84
|
+
return value;
|
|
85
|
+
}
|
|
86
|
+
function cacheSet(key, value) {
|
|
87
|
+
cache.set(key, value);
|
|
88
|
+
if (cache.size > CACHE_LIMIT) {
|
|
89
|
+
const oldest = cache.keys().next().value;
|
|
90
|
+
if (oldest !== void 0) cache.delete(oldest);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
function reconstructs(value, parts) {
|
|
94
|
+
return parts.join("") === value;
|
|
95
|
+
}
|
|
96
|
+
function coveringTokens(plain, tokens) {
|
|
97
|
+
const parts = tokens?.filter((token) => token.content.length > 0) ?? [];
|
|
98
|
+
return reconstructs(plain, parts.map((token) => token.content)) ? parts : [{ content: plain }];
|
|
99
|
+
}
|
|
100
|
+
function coveringSegments(plain, segments) {
|
|
101
|
+
const parts = segments?.filter((segment) => segment.text.length > 0) ?? [];
|
|
102
|
+
return reconstructs(plain, parts.map((segment) => segment.text)) ? parts : [{
|
|
103
|
+
text: plain,
|
|
104
|
+
emphasis: false
|
|
105
|
+
}];
|
|
106
|
+
}
|
|
107
|
+
function mergeCodeTokenLineWithEmphasis(plain, tokens, segments) {
|
|
108
|
+
const validTokens = coveringTokens(plain, tokens);
|
|
109
|
+
const validSegments = coveringSegments(plain, segments);
|
|
110
|
+
if (plain.length === 0) return [];
|
|
111
|
+
const runs = [];
|
|
112
|
+
let tokenIndex = 0;
|
|
113
|
+
let segmentIndex = 0;
|
|
114
|
+
let tokenOffset = 0;
|
|
115
|
+
let segmentOffset = 0;
|
|
116
|
+
let runStart = 0;
|
|
117
|
+
while (tokenIndex < validTokens.length && segmentIndex < validSegments.length) {
|
|
118
|
+
const token = validTokens[tokenIndex];
|
|
119
|
+
const segment = validSegments[segmentIndex];
|
|
120
|
+
if (!token || !segment) break;
|
|
121
|
+
const length = Math.min(token.content.length - tokenOffset, segment.text.length - segmentOffset);
|
|
122
|
+
runs.push({
|
|
123
|
+
start: runStart,
|
|
124
|
+
content: token.content.slice(tokenOffset, tokenOffset + length),
|
|
125
|
+
...token.style ? { style: token.style } : {},
|
|
126
|
+
emphasis: segment.emphasis
|
|
127
|
+
});
|
|
128
|
+
runStart += length;
|
|
129
|
+
tokenOffset += length;
|
|
130
|
+
segmentOffset += length;
|
|
131
|
+
if (tokenOffset === token.content.length) {
|
|
132
|
+
tokenIndex += 1;
|
|
133
|
+
tokenOffset = 0;
|
|
134
|
+
}
|
|
135
|
+
if (segmentOffset === segment.text.length) {
|
|
136
|
+
segmentIndex += 1;
|
|
137
|
+
segmentOffset = 0;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
return runs;
|
|
141
|
+
}
|
|
142
|
+
async function highlightToTokens(code, language) {
|
|
143
|
+
const lang = normalizeLanguage(language);
|
|
144
|
+
if (!lang) return null;
|
|
145
|
+
const key = `${lang}\n${code}`;
|
|
146
|
+
const cached = cacheGet(key);
|
|
147
|
+
if (cached !== void 0) return cached;
|
|
148
|
+
const { tokens } = (await getHighlighter()).codeToTokens(code, {
|
|
149
|
+
lang,
|
|
150
|
+
theme: CODE_THEME_NAME
|
|
151
|
+
});
|
|
152
|
+
const lines = tokens.map((line) => line.map((token) => ({
|
|
153
|
+
content: token.content,
|
|
154
|
+
style: tokenStyle(token)
|
|
155
|
+
})));
|
|
156
|
+
cacheSet(key, lines);
|
|
157
|
+
return lines;
|
|
158
|
+
}
|
|
159
|
+
//#endregion
|
|
160
|
+
export { CODE_THEME_NAME, CODE_VARIABLE_PREFIX, highlightToTokens, mergeCodeTokenLineWithEmphasis, normalizeLanguage };
|