@ctrl-ui/react 0.8.6 → 0.8.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/action-bar.d.ts +15 -7
- package/dist/action-bar.js +39 -19
- package/dist/activity.js +7 -15
- package/dist/audio-recorder.d.ts +14 -4
- package/dist/audio-recorder.js +82 -29
- package/dist/audio-visualizer.js +1 -1
- package/dist/blocks/coding-agent.js +54 -57
- package/dist/blocks/design-canvas-data.d.ts +32 -0
- package/dist/blocks/design-canvas-data.js +100 -0
- package/dist/blocks/design-canvas-inspector.d.ts +8 -0
- package/dist/blocks/design-canvas-inspector.js +238 -0
- package/dist/blocks/design-canvas.d.ts +21 -0
- package/dist/blocks/design-canvas.js +452 -0
- package/dist/blocks/discussion.d.ts +28 -0
- package/dist/blocks/discussion.js +67 -0
- package/dist/blocks/file-explorer-data.d.ts +1 -0
- package/dist/blocks/file-explorer-data.js +4 -1
- package/dist/blocks/file-explorer.d.ts +9 -1
- package/dist/blocks/file-explorer.js +461 -192
- package/dist/blocks/settings.d.ts +2 -1
- package/dist/blocks/settings.js +101 -79
- package/dist/blocks/team-chat.d.ts +12 -0
- package/dist/blocks/team-chat.js +26 -0
- package/dist/blocks/theme-toggle.js +23 -31
- package/dist/chat-composer-attachment.d.ts +12 -3
- package/dist/chat-composer-attachment.js +61 -19
- package/dist/chat-composer-editor/extensions/mention.d.ts +5 -1
- package/dist/chat-composer-editor/extensions/mention.js +58 -27
- package/dist/chat-composer-editor/ghost.js +2 -4
- package/dist/chat-composer-editor/types.d.ts +5 -0
- package/dist/chat-composer-editor.d.ts +1 -1
- package/dist/chat-composer-editor.js +71 -28
- package/dist/chat-composer.d.ts +13 -32
- package/dist/chat-composer.js +54 -13
- package/dist/chat-layout.d.ts +19 -0
- package/dist/chat-layout.js +96 -32
- package/dist/chat-message/social.d.ts +26 -0
- package/dist/chat-message/social.js +122 -0
- package/dist/chat-message.d.ts +28 -29
- package/dist/chat-message.js +106 -25
- package/dist/context.d.ts +2 -2
- package/dist/context.js +38 -23
- package/dist/dynamic-notification-canvas-loop.d.ts +24 -0
- package/dist/dynamic-notification-canvas-loop.js +113 -0
- package/dist/dynamic-notification-glass.js +23 -114
- package/dist/dynamic-notification-liquid.js +14 -118
- package/dist/dynamic-notification.d.ts +16 -8
- package/dist/dynamic-notification.js +85 -22
- package/dist/email/email-brand.d.ts +7 -4
- package/dist/email/email-brand.js +9 -6
- package/dist/email/email-code.d.ts +3 -2
- package/dist/email/email-code.js +11 -9
- package/dist/email/email-footer.d.ts +5 -3
- package/dist/email/email-footer.js +11 -5
- package/dist/email/email.d.ts +31 -9
- package/dist/email/email.js +50 -26
- package/dist/email/templates.d.ts +10 -9
- package/dist/email/templates.js +102 -38
- package/dist/email/theme.js +1 -1
- package/dist/environment-variables.d.ts +4 -2
- package/dist/environment-variables.js +52 -32
- package/dist/filter-bar/context.d.ts +32 -0
- package/dist/filter-bar/context.js +11 -0
- package/dist/filter-bar/editor.d.ts +14 -0
- package/dist/filter-bar/editor.js +216 -0
- package/dist/filter-bar/model.d.ts +10 -0
- package/dist/filter-bar/model.js +57 -0
- package/dist/filter-bar/motion.d.ts +10 -0
- package/dist/filter-bar/motion.js +84 -0
- package/dist/filter-bar/parts.d.ts +19 -0
- package/dist/filter-bar/parts.js +244 -0
- package/dist/filter-bar/types.d.ts +54 -0
- package/dist/filter-bar/types.js +0 -0
- package/dist/filter-bar.d.ts +27 -0
- package/dist/filter-bar.js +310 -0
- package/dist/hooks/use-audio-recorder.js +12 -6
- package/dist/hooks/use-chat-composer.d.ts +21 -7
- package/dist/hooks/use-chat-composer.js +32 -5
- package/dist/hooks/use-chat-message.d.ts +28 -2
- package/dist/hooks/use-chat-message.js +41 -10
- package/dist/hooks/use-chat-thread-scroll.js +43 -7
- package/dist/hooks/use-color-area.d.ts +3 -3
- package/dist/hooks/use-color-area.js +13 -12
- package/dist/hooks/use-copy-to-clipboard.d.ts +2 -1
- package/dist/hooks/use-copy-to-clipboard.js +20 -20
- package/dist/hooks/use-dropzone.d.ts +7 -4
- package/dist/hooks/use-dropzone.js +34 -3
- package/dist/hooks/use-dynamic-notification.d.ts +6 -2
- package/dist/hooks/use-dynamic-notification.js +26 -10
- package/dist/hooks/use-mobile.d.ts +3 -2
- package/dist/hooks/use-mobile.js +8 -4
- package/dist/hooks/use-textarea-trigger-menu.js +2 -1
- package/dist/hooks/use-trigger-menu.d.ts +54 -0
- package/dist/hooks/use-trigger-menu.js +102 -47
- package/dist/hooks/use-user-ask.d.ts +2 -0
- package/dist/hooks/use-user-ask.js +35 -41
- package/dist/inline-attachment.d.ts +6 -2
- package/dist/inline-attachment.js +44 -29
- package/dist/inline-citation.d.ts +12 -5
- package/dist/inline-citation.js +25 -16
- package/dist/knob-contracts/audio-recorder-knobs.d.ts +1 -1
- package/dist/knob-contracts/audio-recorder-knobs.js +2 -1
- package/dist/knob-contracts/audio-visualizer-knobs.d.ts +1 -1
- package/dist/knob-contracts/audio-visualizer-knobs.js +2 -1
- package/dist/knob-contracts/avatar-knobs.d.ts +1 -1
- package/dist/knob-contracts/avatar-knobs.js +6 -1
- package/dist/knob-contracts/badge-knobs.d.ts +1 -1
- package/dist/knob-contracts/badge-knobs.js +2 -1
- package/dist/knob-contracts/breadcrumb-knobs.d.ts +4 -0
- package/dist/knob-contracts/breadcrumb-knobs.js +8 -0
- package/dist/knob-contracts/button-knobs.d.ts +1 -1
- package/dist/knob-contracts/button-knobs.js +1 -0
- package/dist/knob-contracts/chat-layout-knobs.d.ts +1 -1
- package/dist/knob-contracts/chat-layout-knobs.js +2 -1
- package/dist/knob-contracts/chat-message-knobs.d.ts +1 -1
- package/dist/knob-contracts/chat-message-knobs.js +8 -1
- package/dist/knob-contracts/choice-knobs.d.ts +1 -1
- package/dist/knob-contracts/choice-knobs.js +1 -0
- package/dist/knob-contracts/code-diff-knobs.d.ts +1 -1
- package/dist/knob-contracts/code-diff-knobs.js +2 -0
- package/dist/knob-contracts/code-knobs.d.ts +1 -1
- package/dist/knob-contracts/code-knobs.js +2 -1
- package/dist/knob-contracts/collapsible-knobs.d.ts +1 -1
- package/dist/knob-contracts/collapsible-knobs.js +1 -1
- package/dist/knob-contracts/dynamic-notification-knobs.d.ts +1 -1
- package/dist/knob-contracts/dynamic-notification-knobs.js +2 -0
- package/dist/knob-contracts/emoji-picker-knobs.d.ts +4 -0
- package/dist/knob-contracts/emoji-picker-knobs.js +10 -0
- package/dist/knob-contracts/field-knobs.d.ts +1 -1
- package/dist/knob-contracts/field-knobs.js +5 -1
- package/dist/knob-contracts/filter-bar-knobs.d.ts +4 -0
- package/dist/knob-contracts/filter-bar-knobs.js +15 -0
- package/dist/knob-contracts/infinite-canvas-knobs.d.ts +1 -1
- package/dist/knob-contracts/infinite-canvas-knobs.js +3 -0
- package/dist/knob-contracts/markdown-knobs.d.ts +1 -1
- package/dist/knob-contracts/markdown-knobs.js +3 -1
- package/dist/knob-contracts/page-layout-knobs.d.ts +1 -1
- package/dist/knob-contracts/page-layout-knobs.js +4 -1
- package/dist/knob-contracts/popup-knobs.d.ts +1 -1
- package/dist/knob-contracts/popup-knobs.js +28 -0
- package/dist/knob-contracts/range-knobs.d.ts +1 -1
- package/dist/knob-contracts/range-knobs.js +1 -0
- package/dist/knob-contracts/rich-tooltip-knobs.d.ts +1 -1
- package/dist/knob-contracts/rich-tooltip-knobs.js +2 -1
- package/dist/knob-contracts/sidebar-knobs.d.ts +1 -1
- package/dist/knob-contracts/sidebar-knobs.js +27 -2
- package/dist/knob-contracts/spinner-knobs.d.ts +1 -1
- package/dist/knob-contracts/spinner-knobs.js +1 -1
- package/dist/knob-contracts/stepper-knobs.d.ts +1 -1
- package/dist/knob-contracts/stepper-knobs.js +4 -1
- package/dist/knob-contracts/switch-knobs.d.ts +1 -1
- package/dist/knob-contracts/switch-knobs.js +5 -0
- package/dist/knob-contracts/table-of-contents-knobs.d.ts +1 -1
- package/dist/knob-contracts/table-of-contents-knobs.js +4 -5
- package/dist/knob-contracts/tabs-knobs.d.ts +1 -1
- package/dist/knob-contracts/tabs-knobs.js +1 -0
- package/dist/knob-contracts/tree-knobs.d.ts +1 -1
- package/dist/knob-contracts/tree-knobs.js +2 -1
- package/dist/lib/cn.js +0 -4
- package/dist/lib/contrast.d.ts +1 -0
- package/dist/lib/contrast.js +17 -5
- package/dist/lib/dropzone-validation.js +41 -28
- package/dist/lib/env-file.d.ts +1 -1
- package/dist/lib/env-file.js +5 -5
- package/dist/lib/motion.d.ts +4 -0
- package/dist/lib/motion.js +15 -0
- package/dist/lib/trigger-detect.js +6 -8
- package/dist/markdown-block.js +13 -8
- package/dist/popup-parts.d.ts +8 -0
- package/dist/popup-parts.js +43 -0
- package/dist/scripts/contrast-eval.js +5 -4
- package/dist/source-badge.js +3 -1
- package/dist/styles/code.css +0 -2
- package/dist/styles/effects.css +6 -32
- package/dist/styles/index.css +14 -8
- package/dist/styles/recipes/accordion.css +9 -6
- package/dist/styles/recipes/action-bar.css +0 -15
- package/dist/styles/recipes/activity.css +5 -11
- package/dist/styles/recipes/alert.css +4 -4
- package/dist/styles/recipes/audio-recorder.css +15 -3
- package/dist/styles/recipes/audio-visualizer.css +13 -2
- package/dist/styles/recipes/avatar.css +78 -1
- package/dist/styles/recipes/badge.css +14 -4
- package/dist/styles/recipes/breadcrumb.css +77 -0
- package/dist/styles/recipes/button-group.css +6 -8
- package/dist/styles/recipes/button-states.css +66 -0
- package/dist/styles/recipes/button.css +26 -85
- package/dist/styles/recipes/calendar.css +17 -23
- package/dist/styles/recipes/card.css +2 -2
- package/dist/styles/recipes/chat-composer-attachment.css +9 -3
- package/dist/styles/recipes/chat-composer.css +21 -16
- package/dist/styles/recipes/chat-layout.css +64 -2
- package/dist/styles/recipes/chat-message-social.css +123 -0
- package/dist/styles/recipes/chat-message.css +157 -37
- package/dist/styles/recipes/choice.css +25 -21
- package/dist/styles/recipes/code-diff.css +51 -26
- package/dist/styles/recipes/code.css +44 -18
- package/dist/styles/recipes/collapsible.css +43 -1
- package/dist/styles/recipes/color-picker-details.css +3 -4
- package/dist/styles/recipes/color-picker-values.css +9 -8
- package/dist/styles/recipes/color-picker.css +23 -4
- package/dist/styles/recipes/context.css +3 -3
- package/dist/styles/recipes/dockable-panel.css +18 -7
- package/dist/styles/recipes/dropzone.css +7 -8
- package/dist/styles/recipes/dynamic-notification-input.css +8 -5
- package/dist/styles/recipes/dynamic-notification-motion.css +12 -21
- package/dist/styles/recipes/dynamic-notification.css +40 -26
- package/dist/styles/recipes/emoji-picker.css +132 -0
- package/dist/styles/recipes/empty.css +5 -4
- package/dist/styles/recipes/environment-variables.css +4 -15
- package/dist/styles/recipes/field-parts.css +89 -21
- package/dist/styles/recipes/field.css +83 -26
- package/dist/styles/recipes/filter-bar.css +161 -0
- package/dist/styles/recipes/gradient-editor.css +18 -7
- package/dist/styles/recipes/infinite-canvas.css +51 -4
- package/dist/styles/recipes/inline-attachment.css +9 -4
- package/dist/styles/recipes/inline-citation.css +10 -4
- package/dist/styles/recipes/item.css +23 -9
- package/dist/styles/recipes/markdown-block.css +5 -4
- package/dist/styles/recipes/markdown.css +68 -26
- package/dist/styles/recipes/morphing-panel.css +8 -8
- package/dist/styles/recipes/page-layout.css +36 -10
- package/dist/styles/recipes/pagination.css +5 -6
- package/dist/styles/recipes/phone-input.css +12 -8
- package/dist/styles/recipes/popup-controls.css +175 -26
- package/dist/styles/recipes/popup-drawer.css +35 -44
- package/dist/styles/recipes/popup-lists.css +139 -29
- package/dist/styles/recipes/popup-motion.css +4 -45
- package/dist/styles/recipes/popup-toast.css +55 -26
- package/dist/styles/recipes/popup.css +149 -153
- package/dist/styles/recipes/range.css +55 -19
- package/dist/styles/recipes/resizable.css +36 -7
- package/dist/styles/recipes/rich-tooltip.css +24 -34
- package/dist/styles/recipes/scroll-area.css +8 -1
- package/dist/styles/recipes/sidebar-menu.css +149 -34
- package/dist/styles/recipes/sidebar-parts.css +154 -0
- package/dist/styles/recipes/sidebar.css +187 -128
- package/dist/styles/recipes/source-badge.css +1 -1
- package/dist/styles/recipes/spinner.css +12 -1
- package/dist/styles/recipes/stepper.css +31 -13
- package/dist/styles/recipes/switch.css +68 -23
- package/dist/styles/recipes/table-of-contents.css +49 -41
- package/dist/styles/recipes/table.css +14 -10
- package/dist/styles/recipes/tabs.css +38 -12
- package/dist/styles/recipes/task-list.css +7 -14
- package/dist/styles/recipes/thread-rail.css +42 -19
- package/dist/styles/recipes/timeline.css +2 -0
- package/dist/styles/recipes/toolbar.css +27 -25
- package/dist/styles/recipes/track-highlight.css +12 -8
- package/dist/styles/recipes/transcript-divider.css +2 -2
- package/dist/styles/recipes/tree.css +31 -4
- package/dist/styles/recipes/user-ask-details.css +0 -1
- package/dist/styles/recipes/user-ask.css +4 -4
- package/dist/styles/theme.css +287 -107
- package/dist/task-list.d.ts +4 -1
- package/dist/task-list.js +24 -8
- package/dist/thread-rail.d.ts +1 -1
- package/dist/thread-rail.js +61 -19
- package/dist/transcript-divider.js +2 -1
- package/dist/ui/alert.d.ts +3 -1
- package/dist/ui/alert.js +14 -8
- package/dist/ui/autocomplete.js +7 -1
- package/dist/ui/avatar.d.ts +8 -0
- package/dist/ui/avatar.js +23 -3
- package/dist/ui/badge.js +1 -1
- package/dist/ui/breadcrumb.d.ts +27 -0
- package/dist/ui/breadcrumb.js +88 -0
- package/dist/ui/button.d.ts +2 -1
- package/dist/ui/button.js +1 -1
- package/dist/ui/calendar.js +2 -2
- package/dist/ui/card.d.ts +3 -1
- package/dist/ui/card.js +12 -7
- package/dist/ui/checkbox-group.js +1 -1
- package/dist/ui/checkbox.d.ts +2 -0
- package/dist/ui/code-diff.d.ts +1 -1
- package/dist/ui/code-diff.js +71 -27
- package/dist/ui/code.d.ts +5 -3
- package/dist/ui/code.js +27 -28
- package/dist/ui/color-picker.d.ts +5 -2
- package/dist/ui/color-picker.js +84 -36
- package/dist/ui/combobox-disabled-selection.d.ts +1 -2
- package/dist/ui/combobox-disabled-selection.js +7 -8
- package/dist/ui/combobox.d.ts +5 -23
- package/dist/ui/combobox.js +36 -16
- package/dist/ui/command.d.ts +8 -2
- package/dist/ui/command.js +39 -15
- package/dist/ui/context-menu.js +3 -0
- package/dist/ui/dialog.d.ts +2 -1
- package/dist/ui/dialog.js +3 -22
- package/dist/ui/dockable-panel-geometry.d.ts +1 -0
- package/dist/ui/dockable-panel-geometry.js +7 -1
- package/dist/ui/dockable-panel.d.ts +9 -6
- package/dist/ui/dockable-panel.js +81 -33
- package/dist/ui/drawer.d.ts +7 -4
- package/dist/ui/drawer.js +35 -22
- package/dist/ui/dropdown-menu.js +4 -3
- package/dist/ui/dropzone.d.ts +5 -3
- package/dist/ui/dropzone.js +78 -17
- package/dist/ui/emoji-picker.d.ts +18 -0
- package/dist/ui/emoji-picker.js +136 -0
- package/dist/ui/empty.d.ts +3 -1
- package/dist/ui/empty.js +12 -7
- package/dist/ui/field.js +1 -1
- package/dist/ui/gradient-editor.d.ts +1 -1
- package/dist/ui/gradient-editor.js +37 -21
- package/dist/ui/infinite-canvas.d.ts +13 -1
- package/dist/ui/infinite-canvas.js +139 -20
- package/dist/ui/input-group.d.ts +2 -4
- package/dist/ui/input-group.js +13 -14
- package/dist/ui/input-otp.d.ts +1 -1
- package/dist/ui/input-otp.js +32 -15
- package/dist/ui/input.js +11 -2
- package/dist/ui/item.d.ts +2 -1
- package/dist/ui/item.js +11 -7
- package/dist/ui/live-status.d.ts +7 -0
- package/dist/ui/live-status.js +17 -0
- package/dist/ui/markdown-elements.d.ts +6 -0
- package/dist/ui/markdown-elements.js +42 -9
- package/dist/ui/menubar.js +2 -2
- package/dist/ui/morphing-panel.js +2 -1
- package/dist/ui/native-select.d.ts +1 -1
- package/dist/ui/native-select.js +24 -11
- package/dist/ui/number-field.d.ts +1 -1
- package/dist/ui/number-field.js +13 -2
- package/dist/ui/page-layout.d.ts +2 -2
- package/dist/ui/page-layout.js +2 -4
- package/dist/ui/pagination.d.ts +7 -5
- package/dist/ui/pagination.js +19 -13
- package/dist/ui/phone-input.d.ts +1 -0
- package/dist/ui/phone-input.js +56 -58
- package/dist/ui/radio-group.d.ts +3 -0
- package/dist/ui/radio-group.js +11 -1
- package/dist/ui/resizable.d.ts +20 -2
- package/dist/ui/resizable.js +130 -8
- package/dist/ui/responsive-dialog.d.ts +1 -1
- package/dist/ui/responsive-dialog.js +9 -23
- package/dist/ui/rich-tooltip.d.ts +10 -4
- package/dist/ui/rich-tooltip.js +81 -33
- package/dist/ui/scroll-area.d.ts +4 -1
- package/dist/ui/scroll-area.js +44 -28
- package/dist/ui/select.d.ts +2 -1
- package/dist/ui/select.js +57 -32
- package/dist/ui/sidebar-menu.d.ts +5 -1
- package/dist/ui/sidebar-menu.js +31 -33
- package/dist/ui/sidebar-provider.d.ts +10 -1
- package/dist/ui/sidebar-provider.js +38 -13
- package/dist/ui/sidebar-resize-rail.js +7 -3
- package/dist/ui/sidebar.d.ts +11 -6
- package/dist/ui/sidebar.js +46 -23
- package/dist/ui/slider.js +31 -22
- package/dist/ui/spinner.d.ts +3 -2
- package/dist/ui/spinner.js +3 -2
- package/dist/ui/stepper.d.ts +8 -1
- package/dist/ui/stepper.js +74 -25
- package/dist/ui/switch.d.ts +1 -0
- package/dist/ui/table-of-contents.d.ts +5 -4
- package/dist/ui/table-of-contents.js +143 -52
- package/dist/ui/table.js +15 -9
- package/dist/ui/textarea.d.ts +1 -1
- package/dist/ui/textarea.js +20 -9
- package/dist/ui/timeline.d.ts +3 -1
- package/dist/ui/timeline.js +17 -9
- package/dist/ui/toast.d.ts +11 -5
- package/dist/ui/toast.js +100 -54
- package/dist/ui/toggle.d.ts +1 -1
- package/dist/ui/toggle.js +2 -1
- package/dist/ui/toolbar.d.ts +3 -2
- package/dist/ui/toolbar.js +4 -2
- package/dist/ui/tooltip.js +3 -20
- package/dist/ui/tree.js +120 -80
- package/dist/ui/trigger-menu.js +7 -2
- package/dist/user-ask.d.ts +10 -5
- package/dist/user-ask.js +31 -11
- package/package.json +5 -1
- package/dist/hooks/use-keyboard-navigation.d.ts +0 -3
- package/dist/hooks/use-keyboard-navigation.js +0 -22
|
@@ -5,13 +5,17 @@ export type InlineAttachmentState = "ready" | "pending" | "error";
|
|
|
5
5
|
type InlineAttachmentStyleProps<Props, Style> = Omit<Props, "style"> & {
|
|
6
6
|
style?: CSSProperties & Style;
|
|
7
7
|
};
|
|
8
|
+
type AttachmentLabel = (name: string) => string;
|
|
8
9
|
export type InlineAttachmentProps = InlineAttachmentStyleProps<ComponentProps<"button">, InlineAttachmentKnobStyle> & {
|
|
9
10
|
name: string;
|
|
10
11
|
state?: InlineAttachmentState;
|
|
11
12
|
/** Width-to-height ratio of the reserved box — generated media knows its ratio before its pixels, so arrival never reflows the turn. */
|
|
12
13
|
aspect?: number;
|
|
14
|
+
openLabel?: AttachmentLabel;
|
|
15
|
+
pendingLabel?: AttachmentLabel;
|
|
16
|
+
errorLabel?: AttachmentLabel;
|
|
13
17
|
};
|
|
14
|
-
export declare function InlineAttachment({ name, state, aspect, disabled, className, children, style, "aria-label": ariaLabel, ...props }: InlineAttachmentProps): import("react").JSX.Element;
|
|
18
|
+
export declare function InlineAttachment({ name, state, aspect, disabled, openLabel, pendingLabel, errorLabel, onClick, className, children, style, "aria-label": ariaLabel, ...props }: InlineAttachmentProps): import("react").JSX.Element;
|
|
15
19
|
export type InlineAttachmentMediaProps = ComponentProps<"div"> & {
|
|
16
20
|
src?: string;
|
|
17
21
|
alt?: string;
|
|
@@ -26,7 +30,7 @@ export type InlineAttachmentTitleProps = ComponentProps<"div"> & {
|
|
|
26
30
|
};
|
|
27
31
|
export declare function InlineAttachmentTitle({ children, className, ...props }: InlineAttachmentTitleProps): import("react").JSX.Element;
|
|
28
32
|
export type InlineAttachmentDescriptionProps = InlineAttachmentStyleProps<ComponentProps<"div">, InlineAttachmentKnobStyle>;
|
|
29
|
-
export declare function InlineAttachmentDescription({ className, ...props }: InlineAttachmentDescriptionProps): import("react").JSX.Element;
|
|
33
|
+
export declare function InlineAttachmentDescription({ className, children, ...props }: InlineAttachmentDescriptionProps): import("react").JSX.Element;
|
|
30
34
|
export type InlineAttachmentActionsProps = ComponentProps<"div"> & {
|
|
31
35
|
style?: CSSProperties & InlineAttachmentKnobStyle;
|
|
32
36
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "./lib/cn.js";
|
|
3
|
-
import { createContext, useContext } from "react";
|
|
3
|
+
import { createContext, useContext, useId } from "react";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
//#region src/inline-attachment.tsx
|
|
6
6
|
const InlineAttachmentContext = createContext(null);
|
|
@@ -9,32 +9,47 @@ function useInlineAttachmentContext() {
|
|
|
9
9
|
if (!context) throw new Error("InlineAttachment compound components must be rendered inside <InlineAttachment>.");
|
|
10
10
|
return context;
|
|
11
11
|
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
function InlineAttachment({ name, state = "ready", aspect = 1.26, disabled, className, children, style, "aria-label": ariaLabel, ...props }) {
|
|
12
|
+
const defaultOpenLabel = (name) => `Open attachment: ${name}`;
|
|
13
|
+
const defaultPendingLabel = (name) => `Generating ${name}`;
|
|
14
|
+
const defaultErrorLabel = (name) => `${name} couldn't load. Try again.`;
|
|
15
|
+
function InlineAttachment({ name, state = "ready", aspect = 1.26, disabled, openLabel = defaultOpenLabel, pendingLabel = defaultPendingLabel, errorLabel = defaultErrorLabel, onClick, className, children, style, "aria-label": ariaLabel, ...props }) {
|
|
18
16
|
const attachmentStyle = {
|
|
19
17
|
aspectRatio: aspect,
|
|
20
18
|
...style
|
|
21
19
|
};
|
|
20
|
+
const descriptionId = useId();
|
|
21
|
+
const pending = state === "pending";
|
|
22
|
+
const defaultLabel = {
|
|
23
|
+
ready: openLabel,
|
|
24
|
+
pending: pendingLabel,
|
|
25
|
+
error: errorLabel
|
|
26
|
+
}[state](name);
|
|
22
27
|
return /* @__PURE__ */ jsx(InlineAttachmentContext.Provider, {
|
|
23
28
|
value: {
|
|
24
29
|
name,
|
|
25
|
-
state
|
|
30
|
+
state,
|
|
31
|
+
descriptionId
|
|
26
32
|
},
|
|
27
33
|
children: /* @__PURE__ */ jsx("button", {
|
|
28
34
|
type: "button",
|
|
29
|
-
"aria-label": ariaLabel ?? defaultLabel
|
|
30
|
-
"aria-
|
|
31
|
-
|
|
35
|
+
"aria-label": ariaLabel ?? defaultLabel,
|
|
36
|
+
"aria-describedby": descriptionId,
|
|
37
|
+
"aria-busy": pending || void 0,
|
|
38
|
+
"aria-disabled": pending || void 0,
|
|
39
|
+
disabled,
|
|
40
|
+
onClick: (event) => {
|
|
41
|
+
if (pending) {
|
|
42
|
+
event.preventDefault();
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
onClick?.(event);
|
|
46
|
+
},
|
|
32
47
|
"data-control-ui": "inline-attachment",
|
|
33
48
|
"data-control-family": "inline-attachment",
|
|
34
49
|
"data-slot": "root",
|
|
35
50
|
"data-surface": "panel",
|
|
36
51
|
"data-state": state,
|
|
37
|
-
className: cn("group relative w-full max-w-72 cursor-pointer overflow-hidden disabled:cursor-default", className),
|
|
52
|
+
className: cn("group relative w-full max-w-72 cursor-pointer overflow-hidden disabled:cursor-default aria-disabled:cursor-default", className),
|
|
38
53
|
style: attachmentStyle,
|
|
39
54
|
...props,
|
|
40
55
|
children
|
|
@@ -47,7 +62,7 @@ function GeneratingPlaceholder() {
|
|
|
47
62
|
"data-control-ui": "inline-attachment",
|
|
48
63
|
"data-control-family": "inline-attachment",
|
|
49
64
|
"data-slot": "placeholder",
|
|
50
|
-
className:
|
|
65
|
+
className: "size-full halftone"
|
|
51
66
|
});
|
|
52
67
|
}
|
|
53
68
|
function DocumentPlaceholder() {
|
|
@@ -65,8 +80,7 @@ function DocumentPlaceholder() {
|
|
|
65
80
|
/* @__PURE__ */ jsx("div", {
|
|
66
81
|
"data-control-ui": "inline-attachment",
|
|
67
82
|
"data-control-family": "inline-attachment",
|
|
68
|
-
"data-slot": "document-heading"
|
|
69
|
-
className: ""
|
|
83
|
+
"data-slot": "document-heading"
|
|
70
84
|
}),
|
|
71
85
|
/* @__PURE__ */ jsxs("div", {
|
|
72
86
|
className: "grid",
|
|
@@ -75,37 +89,32 @@ function DocumentPlaceholder() {
|
|
|
75
89
|
"data-control-ui": "inline-attachment",
|
|
76
90
|
"data-control-family": "inline-attachment",
|
|
77
91
|
"data-slot": "document-line",
|
|
78
|
-
"data-width": "long"
|
|
79
|
-
className: ""
|
|
92
|
+
"data-width": "long"
|
|
80
93
|
}),
|
|
81
94
|
/* @__PURE__ */ jsx("div", {
|
|
82
95
|
"data-control-ui": "inline-attachment",
|
|
83
96
|
"data-control-family": "inline-attachment",
|
|
84
97
|
"data-slot": "document-line",
|
|
85
|
-
"data-width": "medium"
|
|
86
|
-
className: ""
|
|
98
|
+
"data-width": "medium"
|
|
87
99
|
}),
|
|
88
100
|
/* @__PURE__ */ jsx("div", {
|
|
89
101
|
"data-control-ui": "inline-attachment",
|
|
90
102
|
"data-control-family": "inline-attachment",
|
|
91
103
|
"data-slot": "document-line",
|
|
92
|
-
"data-width": "longest"
|
|
93
|
-
className: ""
|
|
104
|
+
"data-width": "longest"
|
|
94
105
|
}),
|
|
95
106
|
/* @__PURE__ */ jsx("div", {
|
|
96
107
|
"data-control-ui": "inline-attachment",
|
|
97
108
|
"data-control-family": "inline-attachment",
|
|
98
109
|
"data-slot": "document-line",
|
|
99
|
-
"data-width": "short"
|
|
100
|
-
className: ""
|
|
110
|
+
"data-width": "short"
|
|
101
111
|
})
|
|
102
112
|
]
|
|
103
113
|
}),
|
|
104
114
|
/* @__PURE__ */ jsx("div", {
|
|
105
115
|
"data-control-ui": "inline-attachment",
|
|
106
116
|
"data-control-family": "inline-attachment",
|
|
107
|
-
"data-slot": "document-stamp"
|
|
108
|
-
className: ""
|
|
117
|
+
"data-slot": "document-stamp"
|
|
109
118
|
})
|
|
110
119
|
]
|
|
111
120
|
})
|
|
@@ -152,22 +161,28 @@ function InlineAttachmentContent({ className, ...props }) {
|
|
|
152
161
|
}
|
|
153
162
|
function InlineAttachmentTitle({ children, className, ...props }) {
|
|
154
163
|
const { name } = useInlineAttachmentContext();
|
|
164
|
+
const label = children ?? name;
|
|
155
165
|
return /* @__PURE__ */ jsx("div", {
|
|
156
166
|
"data-control-ui": "inline-attachment",
|
|
157
167
|
"data-control-family": "inline-attachment",
|
|
158
168
|
"data-slot": "title",
|
|
169
|
+
title: typeof label === "string" ? label : void 0,
|
|
159
170
|
className: cn("truncate", className),
|
|
160
171
|
...props,
|
|
161
|
-
children:
|
|
172
|
+
children: label
|
|
162
173
|
});
|
|
163
174
|
}
|
|
164
|
-
function InlineAttachmentDescription({ className, ...props }) {
|
|
175
|
+
function InlineAttachmentDescription({ className, children, ...props }) {
|
|
176
|
+
const { descriptionId } = useInlineAttachmentContext();
|
|
165
177
|
return /* @__PURE__ */ jsx("div", {
|
|
178
|
+
id: descriptionId,
|
|
166
179
|
"data-control-ui": "inline-attachment",
|
|
167
180
|
"data-control-family": "inline-attachment",
|
|
168
181
|
"data-slot": "description",
|
|
182
|
+
title: typeof children === "string" ? children : void 0,
|
|
169
183
|
className: cn("truncate", className),
|
|
170
|
-
...props
|
|
184
|
+
...props,
|
|
185
|
+
children
|
|
171
186
|
});
|
|
172
187
|
}
|
|
173
188
|
function InlineAttachmentActions({ className, ...props }) {
|
|
@@ -184,7 +199,7 @@ function InlineAttachmentAction({ className, ...props }) {
|
|
|
184
199
|
"data-control-ui": "inline-attachment",
|
|
185
200
|
"data-control-family": "inline-attachment",
|
|
186
201
|
"data-slot": "action",
|
|
187
|
-
className
|
|
202
|
+
className,
|
|
188
203
|
...props
|
|
189
204
|
});
|
|
190
205
|
}
|
|
@@ -13,26 +13,33 @@ export type SourceReference = {
|
|
|
13
13
|
type InlineCitationStyleProps<Props, Style> = Omit<Props, "style"> & {
|
|
14
14
|
style?: CSSProperties & Style;
|
|
15
15
|
};
|
|
16
|
+
export type CitationLabelTemplates = {
|
|
17
|
+
emptyLabel?: string;
|
|
18
|
+
viewSourcesLabel?: (count: number) => string;
|
|
19
|
+
positionLabel?: (position: number, count: number) => string;
|
|
20
|
+
};
|
|
21
|
+
export declare function citationLabel(sources: readonly SourceReference[], emptyLabel?: string): string;
|
|
16
22
|
type PopoverRootProps = ComponentProps<typeof Popover>;
|
|
17
23
|
export type InlineCitationProps = ComponentProps<"span"> & {
|
|
18
24
|
sources: readonly SourceReference[];
|
|
19
25
|
open?: PopoverRootProps["open"];
|
|
20
26
|
defaultOpen?: PopoverRootProps["defaultOpen"];
|
|
21
27
|
onOpenChange?: PopoverRootProps["onOpenChange"];
|
|
28
|
+
positionLabel?: CitationLabelTemplates["positionLabel"];
|
|
22
29
|
} & {
|
|
23
30
|
style?: CSSProperties & InlineCitationKnobStyle;
|
|
24
31
|
};
|
|
25
|
-
export declare function InlineCitation({ sources, open, defaultOpen, onOpenChange, className, children, ...props }: InlineCitationProps): import("react").JSX.Element;
|
|
26
|
-
export type InlineCitationTriggerProps = InlineCitationStyleProps<ComponentProps<typeof PopoverTrigger>, InlineCitationKnobStyle>;
|
|
27
|
-
export declare function InlineCitationTrigger({ "aria-label": ariaLabel, className, children, disabled, render, ...props }: InlineCitationTriggerProps): import("react").JSX.Element;
|
|
32
|
+
export declare function InlineCitation({ sources, open, defaultOpen, onOpenChange, positionLabel, className, children, ...props }: InlineCitationProps): import("react").JSX.Element;
|
|
33
|
+
export type InlineCitationTriggerProps = InlineCitationStyleProps<ComponentProps<typeof PopoverTrigger>, InlineCitationKnobStyle> & Pick<CitationLabelTemplates, "emptyLabel" | "viewSourcesLabel">;
|
|
34
|
+
export declare function InlineCitationTrigger({ "aria-label": ariaLabel, emptyLabel, viewSourcesLabel, className, children, disabled, render, ...props }: InlineCitationTriggerProps): import("react").JSX.Element;
|
|
28
35
|
export type InlineCitationFaviconsProps = InlineCitationStyleProps<ComponentProps<"span">, InlineCitationKnobStyle> & {
|
|
29
36
|
limit?: number;
|
|
30
37
|
};
|
|
31
38
|
export declare function InlineCitationFavicons({ limit, className, ...props }: InlineCitationFaviconsProps): import("react").JSX.Element;
|
|
32
|
-
export type InlineCitationLabelProps = ComponentProps<"span"> & {
|
|
39
|
+
export type InlineCitationLabelProps = ComponentProps<"span"> & Pick<CitationLabelTemplates, "emptyLabel"> & {
|
|
33
40
|
style?: CSSProperties & InlineCitationKnobStyle;
|
|
34
41
|
};
|
|
35
|
-
export declare function InlineCitationLabel({ className, children, ...props }: InlineCitationLabelProps): import("react").JSX.Element;
|
|
42
|
+
export declare function InlineCitationLabel({ emptyLabel, className, children, ...props }: InlineCitationLabelProps): import("react").JSX.Element;
|
|
36
43
|
export type InlineCitationContentProps = ComponentProps<typeof PopoverContent>;
|
|
37
44
|
export declare function InlineCitationContent({ className, children, align, padding, ...props }: InlineCitationContentProps): import("react").JSX.Element;
|
|
38
45
|
export type InlineCitationNavigationProps = InlineCitationStyleProps<ComponentProps<"div">, InlineCitationKnobStyle>;
|
package/dist/inline-citation.js
CHANGED
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "./lib/cn.js";
|
|
3
3
|
import { Button } from "./ui/button.js";
|
|
4
|
+
import { LiveStatus } from "./ui/live-status.js";
|
|
4
5
|
import { Popover, PopoverContent, PopoverTrigger } from "./ui/popover.js";
|
|
5
6
|
import { SourceFavicon, sourceHostname } from "./source-badge.js";
|
|
6
7
|
import { createContext, useContext, useRef, useState } from "react";
|
|
7
8
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
8
9
|
import { ArrowLeft, ArrowRight, ExternalLink } from "lucide-react";
|
|
9
10
|
//#region src/inline-citation.tsx
|
|
11
|
+
const defaultViewSourcesLabel = (count) => count === 1 ? "view 1 source" : `view ${count} sources`;
|
|
12
|
+
const defaultPositionLabel = (position, count) => `Source ${position} of ${count}`;
|
|
13
|
+
function citationLabel(sources, emptyLabel = "No sources") {
|
|
14
|
+
const firstSource = sources[0];
|
|
15
|
+
if (!firstSource) return emptyLabel;
|
|
16
|
+
const additional = sources.length - 1;
|
|
17
|
+
return `${sourceHostname(firstSource.href)}${additional > 0 ? ` +${additional}` : ""}`;
|
|
18
|
+
}
|
|
10
19
|
const InlineCitationContext = createContext(null);
|
|
11
20
|
function useInlineCitation() {
|
|
12
21
|
const context = useContext(InlineCitationContext);
|
|
@@ -16,10 +25,11 @@ function useInlineCitation() {
|
|
|
16
25
|
function supportsCrossSlide() {
|
|
17
26
|
return typeof CSS !== "undefined" && CSS.supports("(anchor-name: --aui-slide-panel) and (anchor-scope: --aui-slide-panel)");
|
|
18
27
|
}
|
|
19
|
-
function InlineCitation({ sources, open, defaultOpen, onOpenChange, className, children, ...props }) {
|
|
28
|
+
function InlineCitation({ sources, open, defaultOpen, onOpenChange, positionLabel = defaultPositionLabel, className, children, ...props }) {
|
|
20
29
|
const [selectedIndex, setSelectedIndex] = useState(0);
|
|
21
30
|
const [entering, setEntering] = useState(null);
|
|
22
31
|
const [exiting, setExiting] = useState(null);
|
|
32
|
+
const [announcement, setAnnouncement] = useState("");
|
|
23
33
|
const sourceRef = useRef(null);
|
|
24
34
|
const exitCount = useRef(0);
|
|
25
35
|
const clearEntering = useRef(0);
|
|
@@ -34,6 +44,7 @@ function InlineCitation({ sources, open, defaultOpen, onOpenChange, className, c
|
|
|
34
44
|
const direction = step > 0 ? "right" : "left";
|
|
35
45
|
const leaving = sources[currentIndex];
|
|
36
46
|
setSelectedIndex(nextIndex);
|
|
47
|
+
setAnnouncement(positionLabel(nextIndex + 1, sources.length));
|
|
37
48
|
setEntering({
|
|
38
49
|
direction,
|
|
39
50
|
previousHeight: sourceRef.current?.getBoundingClientRect().height
|
|
@@ -56,10 +67,12 @@ function InlineCitation({ sources, open, defaultOpen, onOpenChange, className, c
|
|
|
56
67
|
if (!nextOpen) {
|
|
57
68
|
setEntering(null);
|
|
58
69
|
setExiting(null);
|
|
70
|
+
setAnnouncement("");
|
|
59
71
|
}
|
|
60
72
|
onOpenChange?.(...args);
|
|
61
73
|
};
|
|
62
74
|
const context = {
|
|
75
|
+
announcement,
|
|
63
76
|
currentIndex,
|
|
64
77
|
currentSource,
|
|
65
78
|
entering,
|
|
@@ -89,11 +102,10 @@ function InlineCitation({ sources, open, defaultOpen, onOpenChange, className, c
|
|
|
89
102
|
})
|
|
90
103
|
});
|
|
91
104
|
}
|
|
92
|
-
function InlineCitationTrigger({ "aria-label": ariaLabel, className, children, disabled, render, ...props }) {
|
|
105
|
+
function InlineCitationTrigger({ "aria-label": ariaLabel, emptyLabel, viewSourcesLabel = defaultViewSourcesLabel, className, children, disabled, render, ...props }) {
|
|
93
106
|
const { sources } = useInlineCitation();
|
|
94
107
|
const firstSource = sources[0];
|
|
95
|
-
const
|
|
96
|
-
const accessibleLabel = sourceCount === 1 ? "View 1 source" : `View ${sourceCount} sources`;
|
|
108
|
+
const accessibleLabel = `${citationLabel(sources, emptyLabel)}, ${viewSourcesLabel(sources.length)}`;
|
|
97
109
|
return /* @__PURE__ */ jsx(PopoverTrigger, {
|
|
98
110
|
render: render ?? /* @__PURE__ */ jsx("button", { type: "button" }),
|
|
99
111
|
"aria-label": ariaLabel ?? accessibleLabel,
|
|
@@ -103,7 +115,7 @@ function InlineCitationTrigger({ "aria-label": ariaLabel, className, children, d
|
|
|
103
115
|
"data-control-family": "inline-citation",
|
|
104
116
|
"data-slot": "trigger",
|
|
105
117
|
className: cn("inline-flex items-center align-baseline", className),
|
|
106
|
-
children: children ?? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(InlineCitationFavicons, {}), /* @__PURE__ */ jsx(InlineCitationLabel, {})] })
|
|
118
|
+
children: children ?? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(InlineCitationFavicons, {}), /* @__PURE__ */ jsx(InlineCitationLabel, { emptyLabel })] })
|
|
107
119
|
});
|
|
108
120
|
}
|
|
109
121
|
function InlineCitationFavicons({ limit = 3, className, ...props }) {
|
|
@@ -123,17 +135,17 @@ function InlineCitationFavicons({ limit = 3, className, ...props }) {
|
|
|
123
135
|
}, source.href))
|
|
124
136
|
});
|
|
125
137
|
}
|
|
126
|
-
function InlineCitationLabel({ className, children, ...props }) {
|
|
138
|
+
function InlineCitationLabel({ emptyLabel, className, children, ...props }) {
|
|
127
139
|
const { sources } = useInlineCitation();
|
|
128
|
-
const
|
|
129
|
-
const additionalSourceCount = Math.max(0, sources.length - 1);
|
|
140
|
+
const label = citationLabel(sources, emptyLabel);
|
|
130
141
|
return /* @__PURE__ */ jsx("span", {
|
|
131
142
|
"data-control-ui": "inline-citation",
|
|
132
143
|
"data-control-family": "inline-citation",
|
|
133
144
|
"data-slot": "label",
|
|
145
|
+
title: children === void 0 ? label : void 0,
|
|
134
146
|
...props,
|
|
135
147
|
className: cn("min-w-0 truncate", className),
|
|
136
|
-
children: children ??
|
|
148
|
+
children: children ?? label
|
|
137
149
|
});
|
|
138
150
|
}
|
|
139
151
|
function InlineCitationContent({ className, children, align = "start", padding = "none", ...props }) {
|
|
@@ -201,18 +213,15 @@ function InlineCitationNext({ className, children, disabled, onClick, ...props }
|
|
|
201
213
|
});
|
|
202
214
|
}
|
|
203
215
|
function InlineCitationPosition({ className, children, ...props }) {
|
|
204
|
-
const { currentIndex, sources } = useInlineCitation();
|
|
205
|
-
return /* @__PURE__ */ jsx("span", {
|
|
206
|
-
role: "status",
|
|
207
|
-
"aria-live": "polite",
|
|
208
|
-
"aria-atomic": "true",
|
|
216
|
+
const { announcement, currentIndex, sources } = useInlineCitation();
|
|
217
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("span", {
|
|
209
218
|
"data-control-ui": "inline-citation",
|
|
210
219
|
"data-control-family": "inline-citation",
|
|
211
220
|
"data-slot": "position",
|
|
212
221
|
...props,
|
|
213
222
|
className: cn(className),
|
|
214
223
|
children: children ?? `${sources.length === 0 ? 0 : currentIndex + 1}/${sources.length}`
|
|
215
|
-
});
|
|
224
|
+
}), /* @__PURE__ */ jsx(LiveStatus, { message: announcement })] });
|
|
216
225
|
}
|
|
217
226
|
function InlineCitationSourceDetails({ source }) {
|
|
218
227
|
const hostname = sourceHostname(source.href);
|
|
@@ -316,4 +325,4 @@ function InlineCitationSource({ source: sourceProp, className, children, style,
|
|
|
316
325
|
}, `exit-${exiting.id}`) : null] });
|
|
317
326
|
}
|
|
318
327
|
//#endregion
|
|
319
|
-
export { InlineCitation, InlineCitationContent, InlineCitationFavicons, InlineCitationLabel, InlineCitationNavigation, InlineCitationNext, InlineCitationPosition, InlineCitationPrevious, InlineCitationSource, InlineCitationTrigger };
|
|
328
|
+
export { InlineCitation, InlineCitationContent, InlineCitationFavicons, InlineCitationLabel, InlineCitationNavigation, InlineCitationNext, InlineCitationPosition, InlineCitationPrevious, InlineCitationSource, InlineCitationTrigger, citationLabel };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
//#region src/knob-contracts/audio-recorder-knobs.d.ts
|
|
2
|
-
export declare const audioRecorderKnobs: readonly ["--cui-audio-recorder-foreground", "--cui-audio-recorder-active-foreground", "--cui-audio-recorder-recording-ring-color", "--cui-audio-recorder-error-foreground"];
|
|
2
|
+
export declare const audioRecorderKnobs: readonly ["--cui-audio-recorder-foreground", "--cui-audio-recorder-active-foreground", "--cui-audio-recorder-recording-ring-color", "--cui-audio-recorder-error-foreground", "--cui-audio-recorder-meta-foreground"];
|
|
3
3
|
export type AudioRecorderKnobStyle = Partial<Record<(typeof audioRecorderKnobs)[number], string>>;
|
|
4
4
|
//#endregion
|
|
@@ -3,7 +3,8 @@ const audioRecorderKnobs = [
|
|
|
3
3
|
"--cui-audio-recorder-foreground",
|
|
4
4
|
"--cui-audio-recorder-active-foreground",
|
|
5
5
|
"--cui-audio-recorder-recording-ring-color",
|
|
6
|
-
"--cui-audio-recorder-error-foreground"
|
|
6
|
+
"--cui-audio-recorder-error-foreground",
|
|
7
|
+
"--cui-audio-recorder-meta-foreground"
|
|
7
8
|
];
|
|
8
9
|
//#endregion
|
|
9
10
|
export { audioRecorderKnobs };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
//#region src/knob-contracts/audio-visualizer-knobs.d.ts
|
|
2
|
-
export declare const audioVisualizerKnobs: readonly ["--cui-audio-visualizer-radius", "--cui-audio-visualizer-bar-radius", "--cui-audio-visualizer-bar-background", "--cui-audio-visualizer-line-fill", "--cui-audio-visualizer-line-stroke"];
|
|
2
|
+
export declare const audioVisualizerKnobs: readonly ["--cui-audio-visualizer-radius", "--cui-audio-visualizer-bar-radius", "--cui-audio-visualizer-bar-background", "--cui-audio-visualizer-line-fill", "--cui-audio-visualizer-line-stroke", "--cui-audio-visualizer-baseline-stroke"];
|
|
3
3
|
export type AudioVisualizerKnobStyle = Partial<Record<(typeof audioVisualizerKnobs)[number], string>>;
|
|
4
4
|
//#endregion
|
|
@@ -4,7 +4,8 @@ const audioVisualizerKnobs = [
|
|
|
4
4
|
"--cui-audio-visualizer-bar-radius",
|
|
5
5
|
"--cui-audio-visualizer-bar-background",
|
|
6
6
|
"--cui-audio-visualizer-line-fill",
|
|
7
|
-
"--cui-audio-visualizer-line-stroke"
|
|
7
|
+
"--cui-audio-visualizer-line-stroke",
|
|
8
|
+
"--cui-audio-visualizer-baseline-stroke"
|
|
8
9
|
];
|
|
9
10
|
//#endregion
|
|
10
11
|
export { audioVisualizerKnobs };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
//#region src/knob-contracts/avatar-knobs.d.ts
|
|
2
|
-
export declare const avatarKnobs: readonly ["--cui-avatar-radius", "--cui-avatar-group-ring-color", "--cui-avatar-fallback-background", "--cui-avatar-fallback-foreground", "--cui-avatar-image-outline-color"];
|
|
2
|
+
export declare const avatarKnobs: readonly ["--cui-avatar-radius", "--cui-avatar-group-ring-color", "--cui-avatar-fallback-background", "--cui-avatar-fallback-foreground", "--cui-avatar-image-outline-color", "--cui-avatar-badge-size", "--cui-avatar-badge-ring-size", "--cui-avatar-badge-ring-color", "--cui-avatar-badge-background", "--cui-avatar-badge-foreground"];
|
|
3
3
|
export type AvatarKnobStyle = Partial<Record<(typeof avatarKnobs)[number], string>>;
|
|
4
4
|
//#endregion
|
|
@@ -4,7 +4,12 @@ const avatarKnobs = [
|
|
|
4
4
|
"--cui-avatar-group-ring-color",
|
|
5
5
|
"--cui-avatar-fallback-background",
|
|
6
6
|
"--cui-avatar-fallback-foreground",
|
|
7
|
-
"--cui-avatar-image-outline-color"
|
|
7
|
+
"--cui-avatar-image-outline-color",
|
|
8
|
+
"--cui-avatar-badge-size",
|
|
9
|
+
"--cui-avatar-badge-ring-size",
|
|
10
|
+
"--cui-avatar-badge-ring-color",
|
|
11
|
+
"--cui-avatar-badge-background",
|
|
12
|
+
"--cui-avatar-badge-foreground"
|
|
8
13
|
];
|
|
9
14
|
//#endregion
|
|
10
15
|
export { avatarKnobs };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
//#region src/knob-contracts/badge-knobs.d.ts
|
|
2
|
-
export declare const badgeKnobs: readonly ["--cui-badge-radius", "--cui-badge-background", "--cui-badge-foreground", "--cui-badge-border-color"];
|
|
2
|
+
export declare const badgeKnobs: readonly ["--cui-badge-radius", "--cui-badge-background", "--cui-badge-foreground", "--cui-badge-border-color", "--cui-badge-font-size"];
|
|
3
3
|
export type BadgeKnobStyle = Partial<Record<(typeof badgeKnobs)[number], string>>;
|
|
4
4
|
//#endregion
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
//#region src/knob-contracts/breadcrumb-knobs.d.ts
|
|
2
|
+
export declare const breadcrumbKnobs: readonly ["--cui-breadcrumb-list-foreground", "--cui-breadcrumb-page-foreground", "--cui-breadcrumb-link-hover-foreground"];
|
|
3
|
+
export type BreadcrumbKnobStyle = Partial<Record<(typeof breadcrumbKnobs)[number], string>>;
|
|
4
|
+
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
//#region src/knob-contracts/button-knobs.d.ts
|
|
2
|
-
export declare const buttonKnobs: readonly ["--cui-button-radius", "--cui-button-gap", "--cui-button-icon", "--cui-button-height", "--cui-button-padding-inline", "--cui-button-icon-padding-inline", "--cui-button-font-size", "--cui-button-background", "--cui-button-background-image", "--cui-button-foreground", "--cui-button-hover-background", "--cui-button-hover-foreground", "--cui-button-press-background", "--cui-button-press-scale", "--cui-button-active-background", "--cui-button-active-foreground", "--cui-button-active-hover-background", "--cui-button-shadow", "--cui-button-hover-shadow", "--cui-button-press-shadow", "--cui-button-active-shadow", "--cui-button-open-background", "--cui-button-open-foreground", "--cui-button-open-shadow"];
|
|
2
|
+
export declare const buttonKnobs: readonly ["--cui-button-radius", "--cui-button-gap", "--cui-button-icon", "--cui-button-height", "--cui-button-padding-inline", "--cui-button-icon-padding-inline", "--cui-button-font-size", "--cui-button-background", "--cui-button-background-image", "--cui-button-hover-background-image", "--cui-button-foreground", "--cui-button-hover-background", "--cui-button-hover-foreground", "--cui-button-press-background", "--cui-button-press-scale", "--cui-button-active-background", "--cui-button-active-foreground", "--cui-button-active-hover-background", "--cui-button-shadow", "--cui-button-hover-shadow", "--cui-button-press-shadow", "--cui-button-active-shadow", "--cui-button-open-background", "--cui-button-open-foreground", "--cui-button-open-shadow"];
|
|
3
3
|
export type ButtonKnobStyle = Partial<Record<(typeof buttonKnobs)[number], string>>;
|
|
4
4
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
//#region src/knob-contracts/chat-layout-knobs.d.ts
|
|
2
|
-
export declare const chatLayoutKnobs: readonly ["--cui-chat-layout-radius", "--cui-chat-layout-background", "--cui-chat-layout-border-color", "--cui-chat-layout-border-width", "--cui-chat-layout-shadow", "--cui-chat-layout-scroll-button-gap"];
|
|
2
|
+
export declare const chatLayoutKnobs: readonly ["--cui-chat-layout-radius", "--cui-chat-layout-background", "--cui-chat-layout-border-color", "--cui-chat-layout-border-width", "--cui-chat-layout-shadow", "--cui-chat-layout-scroll-button-gap", "--cui-chat-layout-turn-gap"];
|
|
3
3
|
export type ChatLayoutKnobStyle = Partial<Record<(typeof chatLayoutKnobs)[number], string>>;
|
|
4
4
|
//#endregion
|
|
@@ -5,7 +5,8 @@ const chatLayoutKnobs = [
|
|
|
5
5
|
"--cui-chat-layout-border-color",
|
|
6
6
|
"--cui-chat-layout-border-width",
|
|
7
7
|
"--cui-chat-layout-shadow",
|
|
8
|
-
"--cui-chat-layout-scroll-button-gap"
|
|
8
|
+
"--cui-chat-layout-scroll-button-gap",
|
|
9
|
+
"--cui-chat-layout-turn-gap"
|
|
9
10
|
];
|
|
10
11
|
//#endregion
|
|
11
12
|
export { chatLayoutKnobs };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
//#region src/knob-contracts/chat-message-knobs.d.ts
|
|
2
|
-
export declare const chatMessageKnobs: readonly ["--cui-chat-message-avatar-radius", "--cui-chat-message-avatar-background", "--cui-chat-message-avatar-border-color", "--cui-chat-message-avatar-border-width", "--cui-chat-message-radius", "--cui-chat-message-corner-radius", "--cui-chat-message-background", "--cui-chat-message-background-image", "--cui-chat-message-foreground", "--cui-chat-message-border-color", "--cui-chat-message-border-width", "--cui-chat-message-shadow", "--cui-chat-message-pending-dot-color", "--cui-chat-message-pending-dot-size"];
|
|
2
|
+
export declare const chatMessageKnobs: readonly ["--cui-chat-message-avatar-radius", "--cui-chat-message-avatar-background", "--cui-chat-message-avatar-border-color", "--cui-chat-message-avatar-border-width", "--cui-chat-message-radius", "--cui-chat-message-corner-radius", "--cui-chat-message-background", "--cui-chat-message-background-image", "--cui-chat-message-foreground", "--cui-chat-message-border-color", "--cui-chat-message-border-width", "--cui-chat-message-shadow", "--cui-chat-message-pending-dot-color", "--cui-chat-message-pending-dot-size", "--cui-chat-message-row-hover-background", "--cui-chat-message-reaction-radius", "--cui-chat-message-reaction-background", "--cui-chat-message-reaction-border-color", "--cui-chat-message-reaction-border-width", "--cui-chat-message-reaction-pressed-background", "--cui-chat-message-reaction-pressed-border-color"];
|
|
3
3
|
export type ChatMessageKnobStyle = Partial<Record<(typeof chatMessageKnobs)[number], string>>;
|
|
4
4
|
//#endregion
|
|
@@ -13,7 +13,14 @@ const chatMessageKnobs = [
|
|
|
13
13
|
"--cui-chat-message-border-width",
|
|
14
14
|
"--cui-chat-message-shadow",
|
|
15
15
|
"--cui-chat-message-pending-dot-color",
|
|
16
|
-
"--cui-chat-message-pending-dot-size"
|
|
16
|
+
"--cui-chat-message-pending-dot-size",
|
|
17
|
+
"--cui-chat-message-row-hover-background",
|
|
18
|
+
"--cui-chat-message-reaction-radius",
|
|
19
|
+
"--cui-chat-message-reaction-background",
|
|
20
|
+
"--cui-chat-message-reaction-border-color",
|
|
21
|
+
"--cui-chat-message-reaction-border-width",
|
|
22
|
+
"--cui-chat-message-reaction-pressed-background",
|
|
23
|
+
"--cui-chat-message-reaction-pressed-border-color"
|
|
17
24
|
];
|
|
18
25
|
//#endregion
|
|
19
26
|
export { chatMessageKnobs };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
//#region src/knob-contracts/choice-knobs.d.ts
|
|
2
|
-
export declare const choiceKnobs: readonly ["--cui-choice-radius", "--cui-choice-border-color", "--cui-choice-checked-background", "--cui-choice-checked-border-color", "--cui-choice-shadow"];
|
|
2
|
+
export declare const choiceKnobs: readonly ["--cui-choice-radius", "--cui-choice-border-color", "--cui-choice-border-width", "--cui-choice-checked-background", "--cui-choice-checked-border-color", "--cui-choice-shadow"];
|
|
3
3
|
export type ChoiceKnobStyle = Partial<Record<(typeof choiceKnobs)[number], string>>;
|
|
4
4
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
//#region src/knob-contracts/code-diff-knobs.d.ts
|
|
2
|
-
export declare const codeDiffKnobs: readonly ["--cui-code-diff-radius", "--cui-code-diff-shadow", "--cui-code-diff-background", "--cui-code-diff-border-color", "--cui-code-diff-border-width", "--cui-code-diff-foreground", "--cui-code-diff-add-background", "--cui-code-diff-del-background", "--cui-code-diff-expand-button-radius", "--cui-code-diff-expand-button-background", "--cui-code-diff-expand-button-foreground", "--cui-code-diff-expand-button-shadow", "--cui-code-diff-expand-button-hover-background", "--cui-code-diff-expand-button-hover-foreground"];
|
|
2
|
+
export declare const codeDiffKnobs: readonly ["--cui-code-diff-radius", "--cui-code-diff-shadow", "--cui-code-diff-background", "--cui-code-diff-border-color", "--cui-code-diff-border-width", "--cui-code-diff-header-background", "--cui-code-diff-header-border-color", "--cui-code-diff-foreground", "--cui-code-diff-add-background", "--cui-code-diff-del-background", "--cui-code-diff-expand-button-radius", "--cui-code-diff-expand-button-background", "--cui-code-diff-expand-button-foreground", "--cui-code-diff-expand-button-shadow", "--cui-code-diff-expand-button-hover-background", "--cui-code-diff-expand-button-hover-foreground"];
|
|
3
3
|
export type CodeDiffKnobStyle = Partial<Record<(typeof codeDiffKnobs)[number], string>>;
|
|
4
4
|
//#endregion
|
|
@@ -5,6 +5,8 @@ const codeDiffKnobs = [
|
|
|
5
5
|
"--cui-code-diff-background",
|
|
6
6
|
"--cui-code-diff-border-color",
|
|
7
7
|
"--cui-code-diff-border-width",
|
|
8
|
+
"--cui-code-diff-header-background",
|
|
9
|
+
"--cui-code-diff-header-border-color",
|
|
8
10
|
"--cui-code-diff-foreground",
|
|
9
11
|
"--cui-code-diff-add-background",
|
|
10
12
|
"--cui-code-diff-del-background",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
//#region src/knob-contracts/code-knobs.d.ts
|
|
2
|
-
export declare const codeKnobs: readonly ["--cui-code-radius", "--cui-code-background", "--cui-code-border-color", "--cui-code-border-width", "--cui-code-shadow", "--cui-code-title-foreground", "--cui-code-text-foreground", "--cui-code-line-highlight-background"];
|
|
2
|
+
export declare const codeKnobs: readonly ["--cui-code-radius", "--cui-code-background", "--cui-code-border-color", "--cui-code-border-width", "--cui-code-shadow", "--cui-code-title-foreground", "--cui-code-text-foreground", "--cui-code-line-highlight-background", "--cui-code-header-background"];
|
|
3
3
|
export type CodeKnobStyle = Partial<Record<(typeof codeKnobs)[number], string>>;
|
|
4
4
|
//#endregion
|
|
@@ -7,7 +7,8 @@ const codeKnobs = [
|
|
|
7
7
|
"--cui-code-shadow",
|
|
8
8
|
"--cui-code-title-foreground",
|
|
9
9
|
"--cui-code-text-foreground",
|
|
10
|
-
"--cui-code-line-highlight-background"
|
|
10
|
+
"--cui-code-line-highlight-background",
|
|
11
|
+
"--cui-code-header-background"
|
|
11
12
|
];
|
|
12
13
|
//#endregion
|
|
13
14
|
export { codeKnobs };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
//#region src/knob-contracts/collapsible-knobs.d.ts
|
|
2
|
-
export declare const collapsibleKnobs: readonly [];
|
|
2
|
+
export declare const collapsibleKnobs: readonly ["--cui-collapsible-trigger-radius", "--cui-collapsible-trigger-hover-background"];
|
|
3
3
|
export type CollapsibleKnobStyle = Partial<Record<(typeof collapsibleKnobs)[number], string>>;
|
|
4
4
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
//#region src/knob-contracts/dynamic-notification-knobs.d.ts
|
|
2
|
-
export declare const dynamicNotificationKnobs: readonly ["--cui-dynamic-notification-content-easing", "--cui-dynamic-notification-expanded-radius", "--cui-dynamic-notification-morph-easing", "--cui-dynamic-notification-glass-foreground", "--cui-dynamic-notification-glass-ring-color", "--cui-dynamic-notification-liquid-foreground", "--cui-dynamic-notification-surface-background", "--cui-dynamic-notification-surface-foreground", "--cui-dynamic-notification-surface-ring-color", "--cui-dynamic-notification-surface-shadow", "--cui-dynamic-notification-indicator-end", "--cui-dynamic-notification-indicator-middle", "--cui-dynamic-notification-indicator-start"];
|
|
2
|
+
export declare const dynamicNotificationKnobs: readonly ["--cui-dynamic-notification-content-easing", "--cui-dynamic-notification-expanded-radius", "--cui-dynamic-notification-morph-easing", "--cui-dynamic-notification-glass-foreground", "--cui-dynamic-notification-glass-ring-color", "--cui-dynamic-notification-liquid-foreground", "--cui-dynamic-notification-liquid-text-shadow", "--cui-dynamic-notification-surface-background", "--cui-dynamic-notification-title-foreground", "--cui-dynamic-notification-surface-foreground", "--cui-dynamic-notification-surface-ring-color", "--cui-dynamic-notification-surface-shadow", "--cui-dynamic-notification-indicator-end", "--cui-dynamic-notification-indicator-middle", "--cui-dynamic-notification-indicator-start"];
|
|
3
3
|
export type DynamicNotificationKnobStyle = Partial<Record<(typeof dynamicNotificationKnobs)[number], string>>;
|
|
4
4
|
//#endregion
|
|
@@ -6,7 +6,9 @@ const dynamicNotificationKnobs = [
|
|
|
6
6
|
"--cui-dynamic-notification-glass-foreground",
|
|
7
7
|
"--cui-dynamic-notification-glass-ring-color",
|
|
8
8
|
"--cui-dynamic-notification-liquid-foreground",
|
|
9
|
+
"--cui-dynamic-notification-liquid-text-shadow",
|
|
9
10
|
"--cui-dynamic-notification-surface-background",
|
|
11
|
+
"--cui-dynamic-notification-title-foreground",
|
|
10
12
|
"--cui-dynamic-notification-surface-foreground",
|
|
11
13
|
"--cui-dynamic-notification-surface-ring-color",
|
|
12
14
|
"--cui-dynamic-notification-surface-shadow",
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
//#region src/knob-contracts/emoji-picker-knobs.d.ts
|
|
2
|
+
export declare const emojiPickerKnobs: readonly ["--cui-emoji-picker-cell-size", "--cui-emoji-picker-cell-radius", "--cui-emoji-picker-active-background", "--cui-emoji-picker-header-background", "--cui-emoji-picker-header-foreground"];
|
|
3
|
+
export type EmojiPickerKnobStyle = Partial<Record<(typeof emojiPickerKnobs)[number], string>>;
|
|
4
|
+
//#endregion
|