@ctrl-ui/react 0.8.1 → 0.8.4
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 +32 -23
- package/dist/action-bar.d.ts +11 -12
- package/dist/activity.d.ts +24 -25
- package/dist/audio-recorder.d.ts +16 -16
- package/dist/audio-visualizer.d.ts +3 -4
- package/dist/blocks/chat.d.ts +3 -4
- package/dist/blocks/chat.js +6 -3
- package/dist/blocks/coding-agent.d.ts +11 -12
- package/dist/blocks/coding-agent.js +10 -9
- package/dist/blocks/file-explorer-data.d.ts +11 -12
- package/dist/blocks/file-explorer.d.ts +3 -3
- package/dist/blocks/settings-data.d.ts +8 -9
- package/dist/blocks/settings.d.ts +4 -4
- package/dist/blocks/theme-toggle.d.ts +11 -12
- package/dist/blocks/theme-toggle.js +14 -4
- package/dist/chat-composer-attachment.d.ts +20 -21
- package/dist/chat-composer-attachment.js +24 -20
- package/dist/chat-composer-editor/extensions/mention.d.ts +5 -6
- package/dist/chat-composer-editor/ghost.d.ts +3 -4
- package/dist/chat-composer-editor/schema.d.ts +2 -3
- package/dist/chat-composer-editor/serialize.d.ts +3 -4
- package/dist/chat-composer-editor/types.d.ts +5 -6
- package/dist/chat-composer-editor.d.ts +2 -3
- package/dist/chat-composer-editor.js +18 -4
- package/dist/chat-composer.d.ts +17 -18
- package/dist/chat-composer.js +14 -8
- package/dist/chat-layout.d.ts +12 -21
- package/dist/chat-layout.js +28 -83
- package/dist/chat-message.d.ts +14 -15
- package/dist/context-model.d.ts +7 -8
- package/dist/context.d.ts +21 -22
- package/dist/control-props.d.ts +10 -11
- package/dist/control-variants.d.ts +6 -7
- package/dist/dynamic-notification-glass.d.ts +3 -4
- package/dist/dynamic-notification-liquid.d.ts +3 -4
- package/dist/dynamic-notification-siri-wave.d.ts +2 -3
- package/dist/dynamic-notification.d.ts +28 -29
- package/dist/email/email.d.ts +6 -7
- package/dist/email/email.js +12 -3
- package/dist/email/length.d.ts +3 -0
- package/dist/email/length.js +34 -0
- package/dist/email/templates.d.ts +7 -8
- package/dist/email/templates.js +5 -5
- package/dist/email/theme.d.ts +16 -5
- package/dist/email/theme.js +21 -6
- package/dist/environment-variables.d.ts +35 -36
- package/dist/extensions/create-track-highlight.d.ts +3 -4
- package/dist/extensions/supports-anchor-transitions.d.ts +2 -3
- package/dist/extensions/track-highlight.d.ts +3 -4
- package/dist/hooks/use-audio-recorder.d.ts +14 -15
- package/dist/hooks/use-chat-composer.d.ts +5 -6
- package/dist/hooks/use-chat-message.d.ts +7 -8
- package/dist/hooks/use-color-area.d.ts +5 -6
- package/dist/hooks/use-copy-to-clipboard.d.ts +7 -8
- package/dist/hooks/use-dropzone.d.ts +11 -12
- package/dist/hooks/use-dynamic-notification.d.ts +6 -7
- package/dist/hooks/use-environment-variables.d.ts +9 -10
- package/dist/hooks/use-keyboard-navigation.d.ts +3 -0
- package/dist/hooks/use-keyboard-navigation.js +22 -0
- package/dist/hooks/use-mobile.d.ts +2 -3
- package/dist/hooks/use-textarea-trigger-menu.d.ts +2 -3
- package/dist/hooks/use-trigger-menu.d.ts +7 -8
- package/dist/hooks/use-user-ask.d.ts +6 -7
- package/dist/inline-attachment.d.ts +16 -17
- package/dist/inline-citation.d.ts +22 -23
- package/dist/knob-contracts/accordion-knobs.d.ts +3 -4
- package/dist/knob-contracts/accordion-knobs.js +1 -0
- package/dist/knob-contracts/action-bar-knobs.d.ts +3 -4
- package/dist/knob-contracts/activity-knobs.d.ts +3 -4
- package/dist/knob-contracts/alert-knobs.d.ts +3 -4
- package/dist/knob-contracts/alert-knobs.js +12 -1
- package/dist/knob-contracts/audio-recorder-knobs.d.ts +3 -4
- package/dist/knob-contracts/audio-visualizer-knobs.d.ts +3 -4
- package/dist/knob-contracts/avatar-knobs.d.ts +3 -4
- package/dist/knob-contracts/avatar-knobs.js +2 -1
- package/dist/knob-contracts/badge-knobs.d.ts +3 -4
- package/dist/knob-contracts/button-group-knobs.d.ts +3 -4
- package/dist/knob-contracts/button-knobs.d.ts +3 -4
- package/dist/knob-contracts/button-knobs.js +1 -0
- package/dist/knob-contracts/calendar-knobs.d.ts +3 -4
- package/dist/knob-contracts/card-knobs.d.ts +3 -4
- package/dist/knob-contracts/chat-composer-attachment-knobs.d.ts +3 -4
- package/dist/knob-contracts/chat-composer-attachment-knobs.js +3 -1
- package/dist/knob-contracts/chat-composer-knobs.d.ts +3 -4
- package/dist/knob-contracts/chat-composer-knobs.js +1 -0
- package/dist/knob-contracts/chat-layout-knobs.d.ts +3 -4
- package/dist/knob-contracts/chat-layout-knobs.js +2 -3
- package/dist/knob-contracts/chat-message-knobs.d.ts +3 -4
- package/dist/knob-contracts/choice-knobs.d.ts +3 -4
- package/dist/knob-contracts/choice-knobs.js +2 -1
- package/dist/knob-contracts/code-diff-knobs.d.ts +3 -4
- package/dist/knob-contracts/code-diff-knobs.js +1 -0
- package/dist/knob-contracts/code-knobs.d.ts +3 -4
- package/dist/knob-contracts/code-knobs.js +3 -1
- package/dist/knob-contracts/collapsible-knobs.d.ts +3 -4
- package/dist/knob-contracts/color-picker-knobs.d.ts +3 -4
- package/dist/knob-contracts/context-knobs.d.ts +3 -4
- package/dist/knob-contracts/dockable-panel-knobs.d.ts +3 -4
- package/dist/knob-contracts/dockable-panel-knobs.js +1 -0
- package/dist/knob-contracts/dropzone-knobs.d.ts +3 -4
- package/dist/knob-contracts/dropzone-knobs.js +1 -0
- package/dist/knob-contracts/dynamic-notification-knobs.d.ts +3 -4
- package/dist/knob-contracts/empty-knobs.d.ts +3 -4
- package/dist/knob-contracts/empty-knobs.js +14 -1
- package/dist/knob-contracts/environment-variables-knobs.d.ts +3 -4
- package/dist/knob-contracts/environment-variables-knobs.js +2 -1
- package/dist/knob-contracts/field-knobs.d.ts +3 -4
- package/dist/knob-contracts/gradient-editor-knobs.d.ts +3 -4
- package/dist/knob-contracts/gradient-editor-knobs.js +3 -1
- package/dist/knob-contracts/infinite-canvas-knobs.d.ts +3 -4
- package/dist/knob-contracts/inline-attachment-knobs.d.ts +3 -4
- package/dist/knob-contracts/inline-attachment-knobs.js +2 -1
- package/dist/knob-contracts/inline-citation-knobs.d.ts +3 -4
- package/dist/knob-contracts/inline-citation-knobs.js +1 -0
- package/dist/knob-contracts/item-knobs.d.ts +3 -4
- package/dist/knob-contracts/kbd-knobs.d.ts +3 -4
- package/dist/knob-contracts/markdown-block-knobs.d.ts +3 -4
- package/dist/knob-contracts/markdown-block-knobs.js +2 -0
- package/dist/knob-contracts/markdown-knobs.d.ts +3 -4
- package/dist/knob-contracts/markdown-knobs.js +1 -0
- package/dist/knob-contracts/morphing-panel-knobs.d.ts +3 -4
- package/dist/knob-contracts/pagination-knobs.d.ts +3 -4
- package/dist/knob-contracts/phone-input-knobs.d.ts +3 -4
- package/dist/knob-contracts/phone-input-knobs.js +1 -0
- package/dist/knob-contracts/popup-knobs.d.ts +3 -4
- package/dist/knob-contracts/progressive-blur-knobs.d.ts +3 -4
- package/dist/knob-contracts/progressive-blur-knobs.js +1 -0
- package/dist/knob-contracts/range-knobs.d.ts +3 -4
- package/dist/knob-contracts/resizable-knobs.d.ts +3 -4
- package/dist/knob-contracts/resizable-knobs.js +1 -0
- package/dist/knob-contracts/rich-tooltip-knobs.d.ts +3 -4
- package/dist/knob-contracts/scroll-area-knobs.d.ts +3 -4
- package/dist/knob-contracts/separator-knobs.d.ts +3 -4
- package/dist/knob-contracts/sidebar-knobs.d.ts +3 -4
- package/dist/knob-contracts/sidebar-knobs.js +1 -0
- package/dist/knob-contracts/skeleton-knobs.d.ts +3 -4
- package/dist/knob-contracts/skeleton-knobs.js +9 -1
- package/dist/knob-contracts/source-badge-knobs.d.ts +3 -4
- package/dist/knob-contracts/spinner-knobs.d.ts +3 -4
- package/dist/knob-contracts/stepper-knobs.d.ts +3 -4
- package/dist/knob-contracts/stepper-knobs.js +1 -0
- package/dist/knob-contracts/switch-knobs.d.ts +3 -4
- package/dist/knob-contracts/switch-knobs.js +7 -1
- package/dist/knob-contracts/table-knobs.d.ts +3 -4
- package/dist/knob-contracts/table-of-contents-knobs.d.ts +3 -4
- package/dist/knob-contracts/table-of-contents-knobs.js +25 -0
- package/dist/knob-contracts/tabs-knobs.d.ts +3 -4
- package/dist/knob-contracts/tabs-knobs.js +2 -1
- package/dist/knob-contracts/task-list-knobs.d.ts +3 -4
- package/dist/knob-contracts/task-list-knobs.js +1 -0
- package/dist/knob-contracts/thread-rail-knobs.d.ts +3 -4
- package/dist/knob-contracts/timeline-knobs.d.ts +3 -4
- package/dist/knob-contracts/toolbar-knobs.d.ts +3 -4
- package/dist/knob-contracts/toolbar-knobs.js +1 -0
- package/dist/knob-contracts/track-highlight-knobs.d.ts +3 -4
- package/dist/knob-contracts/transcript-divider-knobs.d.ts +3 -4
- package/dist/knob-contracts/tree-knobs.d.ts +3 -4
- package/dist/knob-contracts/user-ask-knobs.d.ts +3 -4
- package/dist/knob-contracts/user-ask-knobs.js +1 -0
- package/dist/lib/cn.d.ts +2 -3
- package/dist/lib/code-tokens.d.ts +12 -13
- package/dist/lib/color.d.ts +26 -27
- package/dist/lib/contrast.d.ts +12 -13
- package/dist/lib/diff.d.ts +14 -15
- package/dist/lib/dropzone-validation.d.ts +25 -26
- package/dist/lib/env-file.d.ts +12 -13
- package/dist/lib/format-audio-recorder-duration.d.ts +2 -3
- package/dist/lib/liquid-glass-optics.d.ts +2 -3
- package/dist/lib/phone-input-format.d.ts +3 -4
- package/dist/lib/phone-input-format.js +1 -1
- package/dist/lib/phone-number.d.ts +8 -9
- package/dist/lib/trigger-detect.d.ts +4 -5
- package/dist/markdown-block.d.ts +11 -12
- package/dist/scripts/contrast-eval.d.ts +16 -17
- package/dist/scripts/contrast-eval.js +13 -7
- package/dist/skin-provider.d.ts +14 -0
- package/dist/skin-provider.js +21 -0
- package/dist/skin.d.ts +14 -33
- package/dist/skin.js +3 -46
- package/dist/source-badge.d.ts +7 -8
- package/dist/styles/index.css +2 -4
- package/dist/styles/recipes/accordion.css +8 -2
- package/dist/styles/recipes/action-bar.css +5 -2
- package/dist/styles/recipes/alert.css +95 -16
- package/dist/styles/recipes/avatar.css +17 -1
- package/dist/styles/recipes/badge.css +0 -1
- package/dist/styles/recipes/button.css +34 -8
- package/dist/styles/recipes/calendar.css +0 -6
- package/dist/styles/recipes/chat-composer-attachment.css +51 -53
- package/dist/styles/recipes/chat-composer.css +26 -21
- package/dist/styles/recipes/chat-layout.css +21 -62
- package/dist/styles/recipes/chat-message.css +11 -5
- package/dist/styles/recipes/choice.css +9 -2
- package/dist/styles/recipes/code-diff.css +8 -1
- package/dist/styles/recipes/code.css +39 -17
- package/dist/styles/recipes/collapsible.css +0 -3
- package/dist/styles/recipes/color-picker-details.css +1 -2
- package/dist/styles/recipes/color-picker-values.css +0 -4
- package/dist/styles/recipes/dockable-panel.css +8 -1
- package/dist/styles/recipes/dropzone.css +9 -2
- package/dist/styles/recipes/empty.css +118 -17
- package/dist/styles/recipes/environment-variables.css +8 -1
- package/dist/styles/recipes/field-parts.css +1 -6
- package/dist/styles/recipes/field.css +9 -5
- package/dist/styles/recipes/gradient-editor.css +16 -5
- package/dist/styles/recipes/inline-attachment.css +13 -8
- package/dist/styles/recipes/inline-citation.css +8 -4
- package/dist/styles/recipes/item.css +1 -1
- package/dist/styles/recipes/kbd.css +8 -0
- package/dist/styles/recipes/markdown-block.css +16 -2
- package/dist/styles/recipes/markdown.css +12 -0
- package/dist/styles/recipes/morphing-panel.css +1 -1
- package/dist/styles/recipes/pagination.css +0 -4
- package/dist/styles/recipes/phone-input.css +8 -4
- package/dist/styles/recipes/popup-lists.css +11 -0
- package/dist/styles/recipes/popup-toast.css +1 -29
- package/dist/styles/recipes/popup.css +2 -2
- package/dist/styles/recipes/progressive-blur.css +28 -7
- package/dist/styles/recipes/range.css +50 -1
- package/dist/styles/recipes/resizable.css +8 -10
- package/dist/styles/recipes/rich-tooltip.css +0 -4
- package/dist/styles/recipes/scroll-area.css +8 -2
- package/dist/styles/recipes/sidebar-menu.css +150 -0
- package/dist/styles/recipes/sidebar.css +56 -110
- package/dist/styles/recipes/skeleton.css +85 -3
- package/dist/styles/recipes/source-badge.css +0 -3
- package/dist/styles/recipes/stepper.css +8 -1
- package/dist/styles/recipes/switch.css +89 -17
- package/dist/styles/recipes/table-of-contents.css +211 -45
- package/dist/styles/recipes/table.css +0 -1
- package/dist/styles/recipes/tabs.css +19 -2
- package/dist/styles/recipes/task-list.css +8 -2
- package/dist/styles/recipes/thread-rail.css +0 -4
- package/dist/styles/recipes/toolbar.css +18 -4
- package/dist/styles/recipes/track-highlight.css +63 -5
- package/dist/styles/recipes/tree.css +2 -0
- package/dist/styles/recipes/user-ask.css +8 -4
- package/dist/styles/theme.css +130 -138
- package/dist/surface-variants.d.ts +4 -5
- package/dist/task-list.d.ts +16 -17
- package/dist/thread-rail.d.ts +21 -22
- package/dist/transcript-divider.d.ts +6 -7
- package/dist/ui/accordion.d.ts +10 -11
- package/dist/ui/alert-dialog.d.ts +11 -12
- package/dist/ui/alert-dialog.js +8 -6
- package/dist/ui/alert.d.ts +9 -10
- package/dist/ui/alert.js +3 -3
- package/dist/ui/aspect-ratio.d.ts +3 -4
- package/dist/ui/autocomplete.d.ts +19 -20
- package/dist/ui/autocomplete.js +5 -3
- package/dist/ui/avatar.d.ts +9 -10
- package/dist/ui/badge.d.ts +9 -10
- package/dist/ui/button-group.d.ts +7 -8
- package/dist/ui/button-group.js +3 -2
- package/dist/ui/button.d.ts +17 -18
- package/dist/ui/button.js +20 -5
- package/dist/ui/calendar.d.ts +3 -4
- package/dist/ui/card.d.ts +16 -17
- package/dist/ui/checkbox-group.d.ts +4 -5
- package/dist/ui/checkbox-group.js +3 -2
- package/dist/ui/checkbox.d.ts +3 -4
- package/dist/ui/code-diff.d.ts +8 -9
- package/dist/ui/code.d.ts +32 -23
- package/dist/ui/code.js +41 -20
- package/dist/ui/collapsible.d.ts +7 -8
- package/dist/ui/color-picker.d.ts +40 -41
- package/dist/ui/color-picker.js +5 -3
- package/dist/ui/combobox-disabled-selection.d.ts +3 -4
- package/dist/ui/combobox.d.ts +21 -20
- package/dist/ui/combobox.js +5 -3
- package/dist/ui/command.d.ts +19 -18
- package/dist/ui/command.js +38 -12
- package/dist/ui/context-menu.d.ts +30 -31
- package/dist/ui/context-menu.js +8 -5
- package/dist/ui/dialog.d.ts +13 -13
- package/dist/ui/dialog.js +10 -8
- package/dist/ui/dockable-panel-geometry.d.ts +7 -8
- package/dist/ui/dockable-panel.d.ts +21 -22
- package/dist/ui/drawer.d.ts +17 -18
- package/dist/ui/drawer.js +7 -6
- package/dist/ui/dropdown-menu.d.ts +36 -29
- package/dist/ui/dropdown-menu.js +116 -9
- package/dist/ui/dropzone.d.ts +24 -24
- package/dist/ui/empty.d.ts +14 -14
- package/dist/ui/empty.js +3 -3
- package/dist/ui/field.d.ts +26 -27
- package/dist/ui/form.d.ts +4 -5
- package/dist/ui/gradient-editor.d.ts +16 -17
- package/dist/ui/hover-card.d.ts +6 -7
- package/dist/ui/hover-card.js +5 -3
- package/dist/ui/infinite-canvas.d.ts +11 -12
- package/dist/ui/input-group.d.ts +6 -7
- package/dist/ui/input-otp.d.ts +7 -8
- package/dist/ui/input.d.ts +3 -4
- package/dist/ui/item.d.ts +20 -21
- package/dist/ui/kbd.d.ts +7 -5
- package/dist/ui/kbd.js +4 -2
- package/dist/ui/markdown-elements.d.ts +20 -21
- package/dist/ui/markdown.d.ts +5 -6
- package/dist/ui/menubar.d.ts +25 -26
- package/dist/ui/menubar.js +8 -5
- package/dist/ui/meter.d.ts +11 -12
- package/dist/ui/morphing-panel.d.ts +8 -9
- package/dist/ui/native-select.d.ts +3 -4
- package/dist/ui/native-select.js +1 -1
- package/dist/ui/navigation-menu.d.ts +17 -18
- package/dist/ui/navigation-menu.js +5 -3
- package/dist/ui/number-field.d.ts +15 -16
- package/dist/ui/pagination.d.ts +10 -11
- package/dist/ui/phone-input.d.ts +5 -6
- package/dist/ui/phone-input.js +40 -37
- package/dist/ui/popover.d.ts +11 -12
- package/dist/ui/popover.js +5 -3
- package/dist/ui/progress.d.ts +11 -12
- package/dist/ui/progressive-blur.d.ts +4 -5
- package/dist/ui/radio-group.d.ts +5 -6
- package/dist/ui/resizable.d.ts +12 -13
- package/dist/ui/responsive-dialog.d.ts +11 -12
- package/dist/ui/rich-tooltip-tour.d.ts +5 -6
- package/dist/ui/rich-tooltip.d.ts +21 -23
- package/dist/ui/rich-tooltip.js +5 -5
- package/dist/ui/scroll-area.d.ts +7 -8
- package/dist/ui/scroll-area.js +9 -6
- package/dist/ui/select.d.ts +21 -14
- package/dist/ui/select.js +7 -4
- package/dist/ui/separator.d.ts +2 -3
- package/dist/ui/sheet.d.ts +8 -9
- package/dist/ui/sheet.js +7 -5
- package/dist/ui/sidebar-menu.d.ts +24 -15
- package/dist/ui/sidebar-menu.js +30 -4
- package/dist/ui/sidebar-provider.d.ts +32 -7
- package/dist/ui/sidebar-provider.js +82 -22
- package/dist/ui/sidebar-resize-rail.d.ts +8 -0
- package/dist/ui/sidebar-resize-rail.js +192 -0
- package/dist/ui/sidebar.d.ts +20 -14
- package/dist/ui/sidebar.js +122 -57
- package/dist/ui/skeleton.d.ts +7 -4
- package/dist/ui/skeleton.js +9 -2
- package/dist/ui/slider.d.ts +6 -5
- package/dist/ui/slider.js +16 -13
- package/dist/ui/spinner.d.ts +3 -4
- package/dist/ui/stepper.d.ts +22 -23
- package/dist/ui/switch.d.ts +3 -4
- package/dist/ui/switch.js +12 -1
- package/dist/ui/table-of-contents.d.ts +7 -8
- package/dist/ui/table-of-contents.js +4 -2
- package/dist/ui/table.d.ts +17 -18
- package/dist/ui/tabs.d.ts +14 -11
- package/dist/ui/textarea.d.ts +3 -4
- package/dist/ui/timeline.d.ts +18 -19
- package/dist/ui/toast.d.ts +9 -9
- package/dist/ui/toast.js +21 -14
- package/dist/ui/toggle.d.ts +5 -6
- package/dist/ui/toggle.js +3 -2
- package/dist/ui/toolbar.d.ts +15 -16
- package/dist/ui/toolbar.js +15 -4
- package/dist/ui/tooltip.d.ts +6 -13
- package/dist/ui/tooltip.js +7 -8
- package/dist/ui/tree.d.ts +18 -19
- package/dist/ui/tree.js +3 -2
- package/dist/ui/trigger-menu.d.ts +15 -16
- package/dist/ui/trigger-menu.js +5 -3
- package/dist/ui/use-switch-drag.d.ts +7 -0
- package/dist/ui/use-switch-drag.js +104 -0
- package/dist/user-ask.d.ts +24 -25
- package/package.json +15 -15
- package/dist/code-block-editor.d.ts +0 -59
- package/dist/code-block-editor.js +0 -250
- package/dist/knob-contracts/code-block-editor-knobs.d.ts +0 -5
- package/dist/knob-contracts/code-block-editor-knobs.js +0 -11
- package/dist/lib/code-block-shiki.d.ts +0 -9
- package/dist/lib/code-block-shiki.js +0 -6
- package/dist/skin.config.d.ts +0 -5
- package/dist/skin.config.js +0 -12
- package/dist/styles/recipes/code-block-editor.css +0 -136
- package/dist/styles/skin-theme.css +0 -137
- package/dist/styles/skin.css +0 -143
|
@@ -1,5 +1,4 @@
|
|
|
1
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 };
|
|
2
|
+
export 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", "--cui-switch-inline-size", "--cui-switch-height", "--cui-switch-padding", "--cui-switch-thumb-inline-size", "--cui-switch-thumb-press-scale", "--cui-switch-thumb-backdrop-filter"];
|
|
3
|
+
export type SwitchKnobStyle = Partial<Record<(typeof switchKnobs)[number], string>>;
|
|
4
|
+
//#endregion
|
|
@@ -6,7 +6,13 @@ const switchKnobs = [
|
|
|
6
6
|
"--cui-switch-checked-background",
|
|
7
7
|
"--cui-switch-checked-hover-background",
|
|
8
8
|
"--cui-switch-thumb-radius",
|
|
9
|
-
"--cui-switch-thumb-background"
|
|
9
|
+
"--cui-switch-thumb-background",
|
|
10
|
+
"--cui-switch-inline-size",
|
|
11
|
+
"--cui-switch-height",
|
|
12
|
+
"--cui-switch-padding",
|
|
13
|
+
"--cui-switch-thumb-inline-size",
|
|
14
|
+
"--cui-switch-thumb-press-scale",
|
|
15
|
+
"--cui-switch-thumb-backdrop-filter"
|
|
10
16
|
];
|
|
11
17
|
//#endregion
|
|
12
18
|
export { switchKnobs };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
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 };
|
|
2
|
+
export 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
|
+
export type TableKnobStyle = Partial<Record<(typeof tableKnobs)[number], string>>;
|
|
4
|
+
//#endregion
|
|
@@ -1,5 +1,4 @@
|
|
|
1
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 };
|
|
2
|
+
export declare const tableOfContentsKnobs: readonly ["--cui-table-of-contents-background", "--cui-table-of-contents-border-color", "--cui-table-of-contents-border-width", "--cui-table-of-contents-radius", "--cui-table-of-contents-shadow", "--cui-table-of-contents-backdrop-filter", "--cui-table-of-contents-padding", "--cui-table-of-contents-label-foreground", "--cui-table-of-contents-label-font-size", "--cui-table-of-contents-label-font-weight", "--cui-table-of-contents-label-gap", "--cui-table-of-contents-item-foreground", "--cui-table-of-contents-item-hover-foreground", "--cui-table-of-contents-item-active-foreground", "--cui-table-of-contents-item-font-size", "--cui-table-of-contents-item-line-height", "--cui-table-of-contents-item-font-weight", "--cui-table-of-contents-item-root-font-weight", "--cui-table-of-contents-item-padding-block", "--cui-table-of-contents-item-padding-inline", "--cui-table-of-contents-item-indent", "--cui-table-of-contents-rail-background", "--cui-table-of-contents-rail-width", "--cui-table-of-contents-trail-background", "--cui-table-of-contents-trail-width", "--cui-table-of-contents-trail-radius", "--cui-table-of-contents-highlight-radius", "--cui-table-of-contents-highlight-background"];
|
|
3
|
+
export type TableOfContentsKnobStyle = Partial<Record<(typeof tableOfContentsKnobs)[number], string>>;
|
|
4
|
+
//#endregion
|
|
@@ -1,6 +1,31 @@
|
|
|
1
1
|
//#region src/knob-contracts/table-of-contents-knobs.ts
|
|
2
2
|
const tableOfContentsKnobs = [
|
|
3
|
+
"--cui-table-of-contents-background",
|
|
4
|
+
"--cui-table-of-contents-border-color",
|
|
5
|
+
"--cui-table-of-contents-border-width",
|
|
6
|
+
"--cui-table-of-contents-radius",
|
|
7
|
+
"--cui-table-of-contents-shadow",
|
|
8
|
+
"--cui-table-of-contents-backdrop-filter",
|
|
9
|
+
"--cui-table-of-contents-padding",
|
|
10
|
+
"--cui-table-of-contents-label-foreground",
|
|
11
|
+
"--cui-table-of-contents-label-font-size",
|
|
12
|
+
"--cui-table-of-contents-label-font-weight",
|
|
13
|
+
"--cui-table-of-contents-label-gap",
|
|
14
|
+
"--cui-table-of-contents-item-foreground",
|
|
15
|
+
"--cui-table-of-contents-item-hover-foreground",
|
|
16
|
+
"--cui-table-of-contents-item-active-foreground",
|
|
17
|
+
"--cui-table-of-contents-item-font-size",
|
|
18
|
+
"--cui-table-of-contents-item-line-height",
|
|
19
|
+
"--cui-table-of-contents-item-font-weight",
|
|
20
|
+
"--cui-table-of-contents-item-root-font-weight",
|
|
21
|
+
"--cui-table-of-contents-item-padding-block",
|
|
22
|
+
"--cui-table-of-contents-item-padding-inline",
|
|
23
|
+
"--cui-table-of-contents-item-indent",
|
|
3
24
|
"--cui-table-of-contents-rail-background",
|
|
25
|
+
"--cui-table-of-contents-rail-width",
|
|
26
|
+
"--cui-table-of-contents-trail-background",
|
|
27
|
+
"--cui-table-of-contents-trail-width",
|
|
28
|
+
"--cui-table-of-contents-trail-radius",
|
|
4
29
|
"--cui-table-of-contents-highlight-radius",
|
|
5
30
|
"--cui-table-of-contents-highlight-background"
|
|
6
31
|
];
|
|
@@ -1,5 +1,4 @@
|
|
|
1
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 };
|
|
2
|
+
export 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", "--cui-tabs-border-width"];
|
|
3
|
+
export type TabsKnobStyle = Partial<Record<(typeof tabsKnobs)[number], string>>;
|
|
4
|
+
//#endregion
|
|
@@ -1,5 +1,4 @@
|
|
|
1
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 };
|
|
2
|
+
export declare const taskListKnobs: readonly ["--cui-task-list-radius", "--cui-task-list-background", "--cui-task-list-foreground", "--cui-task-list-border-color", "--cui-task-list-border-width", "--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
|
+
export type TaskListKnobStyle = Partial<Record<(typeof taskListKnobs)[number], string>>;
|
|
4
|
+
//#endregion
|
|
@@ -1,5 +1,4 @@
|
|
|
1
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 };
|
|
2
|
+
export 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
|
+
export type ThreadRailKnobStyle = Partial<Record<(typeof threadRailKnobs)[number], string>>;
|
|
4
|
+
//#endregion
|
|
@@ -1,5 +1,4 @@
|
|
|
1
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 };
|
|
2
|
+
export 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
|
+
export type TimelineKnobStyle = Partial<Record<(typeof timelineKnobs)[number], string>>;
|
|
4
|
+
//#endregion
|
|
@@ -1,5 +1,4 @@
|
|
|
1
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 };
|
|
2
|
+
export declare const toolbarKnobs: readonly ["--cui-toolbar-radius", "--cui-toolbar-padding", "--cui-toolbar-background", "--cui-toolbar-foreground", "--cui-toolbar-border-color", "--cui-toolbar-border-width", "--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
|
+
export type ToolbarKnobStyle = Partial<Record<(typeof toolbarKnobs)[number], string>>;
|
|
4
|
+
//#endregion
|
|
@@ -1,5 +1,4 @@
|
|
|
1
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 };
|
|
2
|
+
export 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
|
+
export type TrackHighlightKnobStyle = Partial<Record<(typeof trackHighlightKnobs)[number], string>>;
|
|
4
|
+
//#endregion
|
|
@@ -1,5 +1,4 @@
|
|
|
1
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 };
|
|
2
|
+
export 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
|
+
export type TranscriptDividerKnobStyle = Partial<Record<(typeof transcriptDividerKnobs)[number], string>>;
|
|
4
|
+
//#endregion
|
|
@@ -1,5 +1,4 @@
|
|
|
1
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 };
|
|
2
|
+
export 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
|
+
export type TreeKnobStyle = Partial<Record<(typeof treeKnobs)[number], string>>;
|
|
4
|
+
//#endregion
|
|
@@ -1,5 +1,4 @@
|
|
|
1
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 };
|
|
2
|
+
export declare const userAskKnobs: readonly ["--cui-user-ask-radius", "--cui-user-ask-background", "--cui-user-ask-foreground", "--cui-user-ask-border-color", "--cui-user-ask-border-width", "--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
|
+
export type UserAskKnobStyle = Partial<Record<(typeof userAskKnobs)[number], string>>;
|
|
4
|
+
//#endregion
|
package/dist/lib/cn.d.ts
CHANGED
|
@@ -1,28 +1,27 @@
|
|
|
1
1
|
//#region src/lib/code-tokens.d.ts
|
|
2
|
-
type CodeTokenStyle = {
|
|
2
|
+
export type CodeTokenStyle = {
|
|
3
3
|
color?: string;
|
|
4
4
|
fontStyle?: "italic" | "normal";
|
|
5
5
|
fontWeight?: "bold" | "normal";
|
|
6
6
|
textDecoration?: "underline";
|
|
7
7
|
};
|
|
8
|
-
type CodeToken = {
|
|
8
|
+
export type CodeToken = {
|
|
9
9
|
content: string;
|
|
10
10
|
style?: CodeTokenStyle;
|
|
11
11
|
};
|
|
12
|
-
type CodeTokenLine = CodeToken[];
|
|
13
|
-
type CodeTokenLines = CodeTokenLine[];
|
|
14
|
-
type CodeEmphasisSegment = {
|
|
12
|
+
export type CodeTokenLine = CodeToken[];
|
|
13
|
+
export type CodeTokenLines = CodeTokenLine[];
|
|
14
|
+
export type CodeEmphasisSegment = {
|
|
15
15
|
text: string;
|
|
16
16
|
emphasis: boolean;
|
|
17
17
|
};
|
|
18
|
-
type CodeTokenEmphasisRun = CodeToken & {
|
|
18
|
+
export type CodeTokenEmphasisRun = CodeToken & {
|
|
19
19
|
emphasis: boolean;
|
|
20
20
|
start: number;
|
|
21
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 };
|
|
22
|
+
export declare const CODE_THEME_NAME = "agent-code";
|
|
23
|
+
export declare const CODE_VARIABLE_PREFIX = "--code-";
|
|
24
|
+
export declare function normalizeLanguage(language?: string | null): string | undefined;
|
|
25
|
+
export declare function mergeCodeTokenLineWithEmphasis(plain: string, tokens: CodeTokenLine | null, segments: readonly CodeEmphasisSegment[] | undefined): CodeTokenEmphasisRun[];
|
|
26
|
+
export declare function highlightToTokens(code: string, language?: string | null): Promise<CodeTokenLines | null>;
|
|
27
|
+
//#endregion
|
package/dist/lib/color.d.ts
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
//#region src/lib/color.d.ts
|
|
2
|
-
type Hsva = {
|
|
2
|
+
export type Hsva = {
|
|
3
3
|
h: number;
|
|
4
4
|
s: number;
|
|
5
5
|
v: number;
|
|
6
6
|
a: number;
|
|
7
7
|
};
|
|
8
|
-
type Rgba = {
|
|
8
|
+
export type Rgba = {
|
|
9
9
|
r: number;
|
|
10
10
|
g: number;
|
|
11
11
|
b: number;
|
|
12
12
|
a: number;
|
|
13
13
|
};
|
|
14
|
-
type Hsla = {
|
|
14
|
+
export type Hsla = {
|
|
15
15
|
h: number;
|
|
16
16
|
s: number;
|
|
17
17
|
l: number;
|
|
18
18
|
a: number;
|
|
19
19
|
};
|
|
20
|
-
type Oklcha = {
|
|
20
|
+
export type Oklcha = {
|
|
21
21
|
L: number;
|
|
22
22
|
C: number;
|
|
23
23
|
H: number;
|
|
24
24
|
a: number;
|
|
25
25
|
};
|
|
26
|
-
type ColorFormat = "hex" | "rgb" | "hsl" | "oklch";
|
|
27
|
-
type ChannelId = "r" | "g" | "b" | "h" | "s" | "l" | "okl" | "okc" | "okh" | "a";
|
|
28
|
-
type ChannelSpec = {
|
|
26
|
+
export type ColorFormat = "hex" | "rgb" | "hsl" | "oklch";
|
|
27
|
+
export type ChannelId = "r" | "g" | "b" | "h" | "s" | "l" | "okl" | "okc" | "okh" | "a";
|
|
28
|
+
export type ChannelSpec = {
|
|
29
29
|
id: ChannelId;
|
|
30
30
|
label: string;
|
|
31
31
|
value: number;
|
|
@@ -33,40 +33,39 @@ type ChannelSpec = {
|
|
|
33
33
|
max: number;
|
|
34
34
|
step: number;
|
|
35
35
|
};
|
|
36
|
-
declare function hsvaToRgba({ h, s, v, a }: Hsva): Rgba;
|
|
37
|
-
declare function rgbaToHsva({ r, g, b, a }: Rgba): Hsva;
|
|
38
|
-
declare function hsvaToHsla({ h, s, v, a }: Hsva): Hsla;
|
|
39
|
-
declare function hslaToHsva({ h, s, l, a }: Hsla): Hsva;
|
|
40
|
-
declare function rgbaToHsla(rgba: Rgba): Hsla;
|
|
41
|
-
declare function hslaToRgba(hsla: Hsla): Rgba;
|
|
42
|
-
declare function hsvaToOklcha(hsva: Hsva): Oklcha;
|
|
43
|
-
declare function oklchaToHsva({ L, C, H, a }: Oklcha): Hsva;
|
|
44
|
-
declare function hexToRgba(input: string): Rgba | null;
|
|
45
|
-
declare function rgbaToHex(rgba: Rgba, withAlpha?: boolean): string;
|
|
46
|
-
declare function formatColor(hsva: Hsva, format: ColorFormat, opts?: {
|
|
36
|
+
export declare function hsvaToRgba({ h, s, v, a }: Hsva): Rgba;
|
|
37
|
+
export declare function rgbaToHsva({ r, g, b, a }: Rgba): Hsva;
|
|
38
|
+
export declare function hsvaToHsla({ h, s, v, a }: Hsva): Hsla;
|
|
39
|
+
export declare function hslaToHsva({ h, s, l, a }: Hsla): Hsva;
|
|
40
|
+
export declare function rgbaToHsla(rgba: Rgba): Hsla;
|
|
41
|
+
export declare function hslaToRgba(hsla: Hsla): Rgba;
|
|
42
|
+
export declare function hsvaToOklcha(hsva: Hsva): Oklcha;
|
|
43
|
+
export declare function oklchaToHsva({ L, C, H, a }: Oklcha): Hsva;
|
|
44
|
+
export declare function hexToRgba(input: string): Rgba | null;
|
|
45
|
+
export declare function rgbaToHex(rgba: Rgba, withAlpha?: boolean): string;
|
|
46
|
+
export declare function formatColor(hsva: Hsva, format: ColorFormat, opts?: {
|
|
47
47
|
alpha?: boolean;
|
|
48
48
|
}): string;
|
|
49
|
-
declare function parseColor(input: string): Hsva | null;
|
|
50
|
-
declare function getChannels(hsva: Hsva, format: ColorFormat): ChannelSpec[];
|
|
51
|
-
declare function setChannel(hsva: Hsva, id: ChannelId, value: number): Hsva;
|
|
52
|
-
declare function pointToSaturationValue(rect: {
|
|
49
|
+
export declare function parseColor(input: string): Hsva | null;
|
|
50
|
+
export declare function getChannels(hsva: Hsva, format: ColorFormat): ChannelSpec[];
|
|
51
|
+
export declare function setChannel(hsva: Hsva, id: ChannelId, value: number): Hsva;
|
|
52
|
+
export declare function pointToSaturationValue(rect: {
|
|
53
53
|
width: number;
|
|
54
54
|
height: number;
|
|
55
55
|
}, offsetX: number, offsetY: number): {
|
|
56
56
|
s: number;
|
|
57
57
|
v: number;
|
|
58
58
|
};
|
|
59
|
-
type GradientKind = "linear" | "radial" | "conic";
|
|
60
|
-
declare function formatGradient(stops: {
|
|
59
|
+
export type GradientKind = "linear" | "radial" | "conic";
|
|
60
|
+
export declare function formatGradient(stops: {
|
|
61
61
|
position: number;
|
|
62
62
|
color: string;
|
|
63
63
|
}[], type: GradientKind, angle: number): string;
|
|
64
|
-
declare function pointToHueSat(rect: {
|
|
64
|
+
export declare function pointToHueSat(rect: {
|
|
65
65
|
width: number;
|
|
66
66
|
height: number;
|
|
67
67
|
}, offsetX: number, offsetY: number): {
|
|
68
68
|
h: number;
|
|
69
69
|
s: number;
|
|
70
70
|
};
|
|
71
|
-
//#endregion
|
|
72
|
-
export { ChannelId, ChannelSpec, ColorFormat, GradientKind, Hsla, Hsva, Oklcha, Rgba, formatColor, formatGradient, getChannels, hexToRgba, hslaToHsva, hslaToRgba, hsvaToHsla, hsvaToOklcha, hsvaToRgba, oklchaToHsva, parseColor, pointToHueSat, pointToSaturationValue, rgbaToHex, rgbaToHsla, rgbaToHsva, setChannel };
|
|
71
|
+
//#endregion
|
package/dist/lib/contrast.d.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { Hsva, Rgba } from "./color.js";
|
|
2
2
|
//#region src/lib/contrast.d.ts
|
|
3
|
-
type WcagLevel = "AA" | "AAA";
|
|
4
|
-
type WcagLevels = {
|
|
3
|
+
export type WcagLevel = "AA" | "AAA";
|
|
4
|
+
export type WcagLevels = {
|
|
5
5
|
AA: boolean;
|
|
6
6
|
AAA: boolean;
|
|
7
7
|
};
|
|
8
|
-
declare const AA_RATIO = 4.5;
|
|
9
|
-
declare const AAA_RATIO = 7;
|
|
10
|
-
declare const TARGET_RATIO: Record<WcagLevel, number>;
|
|
11
|
-
declare function luminanceFromRgb({ r, g, b }: {
|
|
8
|
+
export declare const AA_RATIO = 4.5;
|
|
9
|
+
export declare const AAA_RATIO = 7;
|
|
10
|
+
export declare const TARGET_RATIO: Record<WcagLevel, number>;
|
|
11
|
+
export declare function luminanceFromRgb({ r, g, b }: {
|
|
12
12
|
r: number;
|
|
13
13
|
g: number;
|
|
14
14
|
b: number;
|
|
15
15
|
}): number;
|
|
16
|
-
declare function contrastRatio(a: {
|
|
16
|
+
export declare function contrastRatio(a: {
|
|
17
17
|
r: number;
|
|
18
18
|
g: number;
|
|
19
19
|
b: number;
|
|
@@ -22,9 +22,8 @@ declare function contrastRatio(a: {
|
|
|
22
22
|
g: number;
|
|
23
23
|
b: number;
|
|
24
24
|
}): number;
|
|
25
|
-
declare function wcagLevels(ratio: number): WcagLevels;
|
|
26
|
-
declare function nextFixLevel(levels: WcagLevels): WcagLevel | null;
|
|
27
|
-
declare function contrastOf(color: Hsva, background: Rgba): number;
|
|
28
|
-
declare function fixColorForContrast(color: Hsva, background: Rgba, target?: number): Hsva | null;
|
|
29
|
-
//#endregion
|
|
30
|
-
export { AAA_RATIO, AA_RATIO, TARGET_RATIO, WcagLevel, WcagLevels, contrastOf, contrastRatio, fixColorForContrast, luminanceFromRgb, nextFixLevel, wcagLevels };
|
|
25
|
+
export declare function wcagLevels(ratio: number): WcagLevels;
|
|
26
|
+
export declare function nextFixLevel(levels: WcagLevels): WcagLevel | null;
|
|
27
|
+
export declare function contrastOf(color: Hsva, background: Rgba): number;
|
|
28
|
+
export declare function fixColorForContrast(color: Hsva, background: Rgba, target?: number): Hsva | null;
|
|
29
|
+
//#endregion
|
package/dist/lib/diff.d.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
//#region src/lib/diff.d.ts
|
|
2
|
-
type CodeDiffLineType = "add" | "del" | "context";
|
|
3
|
-
type CodeLineType = CodeDiffLineType;
|
|
4
|
-
type LineDiffType = "word" | "char" | "none";
|
|
5
|
-
type DiffFileType = "change" | "new" | "deleted" | "rename";
|
|
6
|
-
type DiffSegment = {
|
|
2
|
+
export type CodeDiffLineType = "add" | "del" | "context";
|
|
3
|
+
export type CodeLineType = CodeDiffLineType;
|
|
4
|
+
export type LineDiffType = "word" | "char" | "none";
|
|
5
|
+
export type DiffFileType = "change" | "new" | "deleted" | "rename";
|
|
6
|
+
export type DiffSegment = {
|
|
7
7
|
text: string;
|
|
8
8
|
emphasis: boolean;
|
|
9
9
|
};
|
|
10
|
-
type DiffLine = {
|
|
10
|
+
export type DiffLine = {
|
|
11
11
|
type: CodeLineType;
|
|
12
12
|
oldNo?: number;
|
|
13
13
|
newNo?: number;
|
|
14
14
|
text: string;
|
|
15
15
|
segments?: DiffSegment[];
|
|
16
16
|
};
|
|
17
|
-
type DiffHunk = {
|
|
17
|
+
export type DiffHunk = {
|
|
18
18
|
header?: string;
|
|
19
19
|
oldStart: number;
|
|
20
20
|
oldCount: number;
|
|
@@ -23,7 +23,7 @@ type DiffHunk = {
|
|
|
23
23
|
lines: DiffLine[];
|
|
24
24
|
collapsedBefore: number;
|
|
25
25
|
};
|
|
26
|
-
type DiffFile = {
|
|
26
|
+
export type DiffFile = {
|
|
27
27
|
name: string;
|
|
28
28
|
oldName?: string;
|
|
29
29
|
type: DiffFileType;
|
|
@@ -35,16 +35,15 @@ type DiffFile = {
|
|
|
35
35
|
additions: number;
|
|
36
36
|
deletions: number;
|
|
37
37
|
};
|
|
38
|
-
type BuildDiffOptions = {
|
|
38
|
+
export type BuildDiffOptions = {
|
|
39
39
|
name?: string;
|
|
40
40
|
lang?: string;
|
|
41
41
|
context?: number;
|
|
42
42
|
lineDiffType?: LineDiffType;
|
|
43
43
|
maxLineDiffLength?: number;
|
|
44
44
|
};
|
|
45
|
-
declare function computeWordDiff(oldText: string, newText: string, kind: LineDiffType, maxLength: number): [DiffSegment[] | undefined, DiffSegment[] | undefined];
|
|
46
|
-
declare function diffRunEnd(lines: readonly DiffLine[], start: number, type: DiffLine["type"]): number;
|
|
47
|
-
declare function buildDiffFromFiles(oldText: string, newText: string, options?: BuildDiffOptions): DiffFile;
|
|
48
|
-
declare function buildDiffFromPatch(patchText: string, options?: BuildDiffOptions): DiffFile[];
|
|
49
|
-
//#endregion
|
|
50
|
-
export { BuildDiffOptions, CodeDiffLineType, CodeLineType, DiffFile, DiffFileType, DiffHunk, DiffLine, DiffSegment, LineDiffType, buildDiffFromFiles, buildDiffFromPatch, computeWordDiff, diffRunEnd };
|
|
45
|
+
export declare function computeWordDiff(oldText: string, newText: string, kind: LineDiffType, maxLength: number): [DiffSegment[] | undefined, DiffSegment[] | undefined];
|
|
46
|
+
export declare function diffRunEnd(lines: readonly DiffLine[], start: number, type: DiffLine["type"]): number;
|
|
47
|
+
export declare function buildDiffFromFiles(oldText: string, newText: string, options?: BuildDiffOptions): DiffFile;
|
|
48
|
+
export declare function buildDiffFromPatch(patchText: string, options?: BuildDiffOptions): DiffFile[];
|
|
49
|
+
//#endregion
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { DropzoneVisualState } from "../hooks/use-dropzone.js";
|
|
2
2
|
//#region src/lib/dropzone-validation.d.ts
|
|
3
|
-
type DropzoneSelectionMode = "append" | "replace";
|
|
4
|
-
declare const DropzoneErrorCode: {
|
|
3
|
+
export type DropzoneSelectionMode = "append" | "replace";
|
|
4
|
+
export declare const DropzoneErrorCode: {
|
|
5
5
|
readonly FileInvalidType: "file-invalid-type";
|
|
6
6
|
readonly FileTooLarge: "file-too-large";
|
|
7
7
|
readonly FileTooSmall: "file-too-small";
|
|
8
8
|
readonly TooManyFiles: "too-many-files";
|
|
9
9
|
readonly FileAlreadySelected: "file-already-selected";
|
|
10
10
|
};
|
|
11
|
-
type DropzoneErrorCodeValue = (typeof DropzoneErrorCode)[keyof typeof DropzoneErrorCode];
|
|
12
|
-
type DropzoneAccept = Readonly<Record<string, readonly string[]>>;
|
|
13
|
-
type DropzoneFileError = {
|
|
11
|
+
export type DropzoneErrorCodeValue = (typeof DropzoneErrorCode)[keyof typeof DropzoneErrorCode];
|
|
12
|
+
export type DropzoneAccept = Readonly<Record<string, readonly string[]>>;
|
|
13
|
+
export type DropzoneFileError = {
|
|
14
14
|
code: DropzoneErrorCodeValue | string;
|
|
15
15
|
message: string;
|
|
16
16
|
};
|
|
17
|
-
type DropzoneFileRejection = {
|
|
17
|
+
export type DropzoneFileRejection = {
|
|
18
18
|
file: File;
|
|
19
19
|
errors: readonly DropzoneFileError[];
|
|
20
20
|
};
|
|
21
|
-
type DropzoneValidatorResult = DropzoneFileError | readonly DropzoneFileError[] | null;
|
|
22
|
-
type DropzoneValidator = (file: File, signal: AbortSignal) => DropzoneValidatorResult | Promise<DropzoneValidatorResult>;
|
|
23
|
-
type DropzonePolicy = {
|
|
21
|
+
export type DropzoneValidatorResult = DropzoneFileError | readonly DropzoneFileError[] | null;
|
|
22
|
+
export type DropzoneValidator = (file: File, signal: AbortSignal) => DropzoneValidatorResult | Promise<DropzoneValidatorResult>;
|
|
23
|
+
export type DropzonePolicy = {
|
|
24
24
|
accept?: DropzoneAccept;
|
|
25
25
|
minSize?: number;
|
|
26
26
|
maxSize?: number;
|
|
@@ -30,37 +30,36 @@ type DropzonePolicy = {
|
|
|
30
30
|
allowDuplicates?: boolean;
|
|
31
31
|
validator?: DropzoneValidator;
|
|
32
32
|
};
|
|
33
|
-
type DropzoneFileMetadata = {
|
|
33
|
+
export type DropzoneFileMetadata = {
|
|
34
34
|
name?: string;
|
|
35
35
|
size?: number;
|
|
36
36
|
type?: string;
|
|
37
37
|
lastModified?: number;
|
|
38
38
|
webkitRelativePath?: string;
|
|
39
39
|
};
|
|
40
|
-
type DropzoneProcessResult = {
|
|
40
|
+
export type DropzoneProcessResult = {
|
|
41
41
|
acceptedFiles: readonly File[];
|
|
42
42
|
fileRejections: readonly DropzoneFileRejection[];
|
|
43
43
|
value: readonly File[];
|
|
44
44
|
removedFiles: readonly File[];
|
|
45
45
|
};
|
|
46
|
-
type DropzoneDragVerdictOptions = {
|
|
46
|
+
export type DropzoneDragVerdictOptions = {
|
|
47
47
|
customExtraction?: boolean;
|
|
48
48
|
};
|
|
49
49
|
type NormalizedAcceptEntry = {
|
|
50
50
|
mime: string;
|
|
51
51
|
extensions: readonly string[];
|
|
52
52
|
};
|
|
53
|
-
declare function normalizeDropzoneAccept(accept: DropzoneAccept | undefined): readonly NormalizedAcceptEntry[];
|
|
54
|
-
declare function compileDropzoneAccept(accept: DropzoneAccept | undefined): string | undefined;
|
|
55
|
-
declare function isDropzoneFileAccepted(file: Pick<File, "name" | "type">, accept: DropzoneAccept | undefined): boolean;
|
|
56
|
-
declare function normalizeDropzoneMaxFiles(maxFiles: number | undefined): number;
|
|
57
|
-
declare function getDropzoneSelectionMode(policy: DropzonePolicy | undefined): DropzoneSelectionMode;
|
|
58
|
-
declare function getDropzoneCapacity(policy: DropzonePolicy | undefined): number;
|
|
59
|
-
declare function getDropzoneFileIdentity(file: DropzoneFileMetadata): string;
|
|
60
|
-
declare function toDropzoneError(value: unknown): Error;
|
|
61
|
-
declare function validateDropzoneFile(file: File, policy: DropzonePolicy | undefined, signal: AbortSignal): Promise<readonly DropzoneFileError[]>;
|
|
62
|
-
declare function processDropzoneFiles(files: readonly File[], currentValue: readonly File[], policy: DropzonePolicy | undefined, signal: AbortSignal): Promise<DropzoneProcessResult>;
|
|
63
|
-
declare function getDropzoneDragVerdict(files: readonly DropzoneFileMetadata[] | null, currentValue: readonly File[], policy: DropzonePolicy | undefined, options?: DropzoneDragVerdictOptions): Exclude<DropzoneVisualState, "idle" | "processing">;
|
|
64
|
-
declare function formatDropzoneFileSize(size: number): string;
|
|
65
|
-
//#endregion
|
|
66
|
-
export { DropzoneAccept, DropzoneDragVerdictOptions, DropzoneErrorCode, DropzoneErrorCodeValue, DropzoneFileError, DropzoneFileMetadata, DropzoneFileRejection, DropzonePolicy, DropzoneProcessResult, DropzoneSelectionMode, DropzoneValidator, DropzoneValidatorResult, compileDropzoneAccept, formatDropzoneFileSize, getDropzoneCapacity, getDropzoneDragVerdict, getDropzoneFileIdentity, getDropzoneSelectionMode, isDropzoneFileAccepted, normalizeDropzoneAccept, normalizeDropzoneMaxFiles, processDropzoneFiles, toDropzoneError, validateDropzoneFile };
|
|
53
|
+
export declare function normalizeDropzoneAccept(accept: DropzoneAccept | undefined): readonly NormalizedAcceptEntry[];
|
|
54
|
+
export declare function compileDropzoneAccept(accept: DropzoneAccept | undefined): string | undefined;
|
|
55
|
+
export declare function isDropzoneFileAccepted(file: Pick<File, "name" | "type">, accept: DropzoneAccept | undefined): boolean;
|
|
56
|
+
export declare function normalizeDropzoneMaxFiles(maxFiles: number | undefined): number;
|
|
57
|
+
export declare function getDropzoneSelectionMode(policy: DropzonePolicy | undefined): DropzoneSelectionMode;
|
|
58
|
+
export declare function getDropzoneCapacity(policy: DropzonePolicy | undefined): number;
|
|
59
|
+
export declare function getDropzoneFileIdentity(file: DropzoneFileMetadata): string;
|
|
60
|
+
export declare function toDropzoneError(value: unknown): Error;
|
|
61
|
+
export declare function validateDropzoneFile(file: File, policy: DropzonePolicy | undefined, signal: AbortSignal): Promise<readonly DropzoneFileError[]>;
|
|
62
|
+
export declare function processDropzoneFiles(files: readonly File[], currentValue: readonly File[], policy: DropzonePolicy | undefined, signal: AbortSignal): Promise<DropzoneProcessResult>;
|
|
63
|
+
export declare function getDropzoneDragVerdict(files: readonly DropzoneFileMetadata[] | null, currentValue: readonly File[], policy: DropzonePolicy | undefined, options?: DropzoneDragVerdictOptions): Exclude<DropzoneVisualState, "idle" | "processing">;
|
|
64
|
+
export declare function formatDropzoneFileSize(size: number): string;
|
|
65
|
+
//#endregion
|
package/dist/lib/env-file.d.ts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
//#region src/lib/env-file.d.ts
|
|
2
|
-
interface EnvironmentVariableEntry {
|
|
2
|
+
export interface EnvironmentVariableEntry {
|
|
3
3
|
key: string;
|
|
4
4
|
value: string;
|
|
5
5
|
}
|
|
6
|
-
declare const ENV_FILE_MAX_SIZE: number;
|
|
7
|
-
declare const DUPLICATE_ENVIRONMENT_VARIABLE_MESSAGE = "Environment variable keys must be unique";
|
|
8
|
-
declare class DuplicateEnvironmentVariableKeyError extends Error {
|
|
6
|
+
export declare const ENV_FILE_MAX_SIZE: number;
|
|
7
|
+
export declare const DUPLICATE_ENVIRONMENT_VARIABLE_MESSAGE = "Environment variable keys must be unique";
|
|
8
|
+
export declare class DuplicateEnvironmentVariableKeyError extends Error {
|
|
9
9
|
readonly key: string;
|
|
10
10
|
constructor(key: string);
|
|
11
11
|
}
|
|
12
|
-
declare function createEmptyEnvironmentVariableEntry(): EnvironmentVariableEntry;
|
|
13
|
-
declare function rowsFromEnvironmentVariables(envVars: Record<string, unknown> | undefined): EnvironmentVariableEntry[];
|
|
14
|
-
declare function getDuplicateEnvironmentVariableKeys(rows: readonly EnvironmentVariableEntry[]): Set<string>;
|
|
15
|
-
declare function collectEnvironmentVariables(rows: readonly EnvironmentVariableEntry[]): Record<string, string>;
|
|
16
|
-
declare function parseEnvFileText(text: string): EnvironmentVariableEntry[];
|
|
17
|
-
declare function rowsToEnvFileText(rows: readonly EnvironmentVariableEntry[]): string;
|
|
18
|
-
declare function readEnvFile(file: File, options?: {
|
|
12
|
+
export declare function createEmptyEnvironmentVariableEntry(): EnvironmentVariableEntry;
|
|
13
|
+
export declare function rowsFromEnvironmentVariables(envVars: Record<string, unknown> | undefined): EnvironmentVariableEntry[];
|
|
14
|
+
export declare function getDuplicateEnvironmentVariableKeys(rows: readonly EnvironmentVariableEntry[]): Set<string>;
|
|
15
|
+
export declare function collectEnvironmentVariables(rows: readonly EnvironmentVariableEntry[]): Record<string, string>;
|
|
16
|
+
export declare function parseEnvFileText(text: string): EnvironmentVariableEntry[];
|
|
17
|
+
export declare function rowsToEnvFileText(rows: readonly EnvironmentVariableEntry[]): string;
|
|
18
|
+
export declare function readEnvFile(file: File, options?: {
|
|
19
19
|
maxSize?: number;
|
|
20
20
|
}): Promise<{
|
|
21
21
|
ok: true;
|
|
@@ -24,5 +24,4 @@ declare function readEnvFile(file: File, options?: {
|
|
|
24
24
|
ok: false;
|
|
25
25
|
error: string;
|
|
26
26
|
}>;
|
|
27
|
-
//#endregion
|
|
28
|
-
export { DUPLICATE_ENVIRONMENT_VARIABLE_MESSAGE, DuplicateEnvironmentVariableKeyError, ENV_FILE_MAX_SIZE, EnvironmentVariableEntry, collectEnvironmentVariables, createEmptyEnvironmentVariableEntry, getDuplicateEnvironmentVariableKeys, parseEnvFileText, readEnvFile, rowsFromEnvironmentVariables, rowsToEnvFileText };
|
|
27
|
+
//#endregion
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
//#region src/lib/format-audio-recorder-duration.d.ts
|
|
2
|
-
declare function formatAudioRecorderDuration(durationMs: number): string;
|
|
3
|
-
//#endregion
|
|
4
|
-
export { formatAudioRecorderDuration };
|
|
2
|
+
export declare function formatAudioRecorderDuration(durationMs: number): string;
|
|
3
|
+
//#endregion
|