@ctrl-ui/react 0.8.2 → 0.8.5
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/audio-visualizer.js +1 -1
- 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/extensions/mention.js +4 -0
- 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 +17 -21
- package/dist/chat-layout.js +72 -86
- package/dist/chat-message.d.ts +19 -15
- package/dist/chat-message.js +19 -2
- package/dist/context-model.d.ts +7 -8
- package/dist/context.d.ts +21 -22
- package/dist/context.js +0 -2
- 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-brand.d.ts +60 -0
- package/dist/email/email-brand.js +101 -0
- package/dist/email/email-code.d.ts +18 -0
- package/dist/email/email-code.js +172 -0
- package/dist/email/email-footer.d.ts +63 -0
- package/dist/email/email-footer.js +98 -0
- package/dist/email/email.d.ts +62 -14
- package/dist/email/email.js +155 -24
- package/dist/email/length.d.ts +2 -3
- package/dist/email/templates.d.ts +56 -12
- package/dist/email/templates.js +314 -116
- package/dist/email/theme.d.ts +15 -8
- package/dist/email/theme.js +30 -8
- 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 +8 -8
- package/dist/hooks/use-chat-message.js +1 -0
- package/dist/hooks/use-chat-thread-scroll.d.ts +8 -0
- package/dist/hooks/use-chat-thread-scroll.js +66 -0
- 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 +11 -10
- package/dist/hooks/use-user-ask.js +56 -17
- package/dist/inline-attachment.d.ts +16 -17
- package/dist/inline-attachment.js +1 -1
- 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/action-bar-knobs.js +1 -1
- package/dist/knob-contracts/activity-knobs.d.ts +3 -4
- package/dist/knob-contracts/activity-knobs.js +2 -1
- 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/audio-visualizer-knobs.js +1 -0
- 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 +5 -1
- package/dist/knob-contracts/chat-composer-knobs.d.ts +3 -4
- package/dist/knob-contracts/chat-composer-knobs.js +2 -0
- package/dist/knob-contracts/chat-layout-knobs.d.ts +3 -4
- package/dist/knob-contracts/chat-layout-knobs.js +2 -2
- package/dist/knob-contracts/chat-message-knobs.d.ts +3 -4
- package/dist/knob-contracts/chat-message-knobs.js +3 -1
- 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/context-knobs.js +3 -0
- 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 +6 -1
- package/dist/knob-contracts/inline-citation-knobs.d.ts +3 -4
- package/dist/knob-contracts/inline-citation-knobs.js +4 -1
- 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/page-layout-knobs.d.ts +4 -0
- package/dist/knob-contracts/page-layout-knobs.js +15 -0
- 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 +5 -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 +5 -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-number.d.ts +8 -9
- package/dist/lib/trigger-detect.d.ts +4 -5
- package/dist/markdown-block.d.ts +11 -12
- package/dist/markdown-block.js +1 -1
- 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 +3 -5
- package/dist/styles/recipes/accordion.css +8 -2
- package/dist/styles/recipes/action-bar.css +40 -5
- package/dist/styles/recipes/activity.css +36 -3
- package/dist/styles/recipes/alert.css +97 -16
- package/dist/styles/recipes/audio-visualizer.css +8 -1
- package/dist/styles/recipes/avatar.css +17 -1
- package/dist/styles/recipes/badge.css +0 -1
- package/dist/styles/recipes/button-group.css +8 -0
- package/dist/styles/recipes/button.css +49 -8
- package/dist/styles/recipes/calendar.css +21 -6
- package/dist/styles/recipes/card.css +2 -0
- package/dist/styles/recipes/chat-composer-attachment.css +83 -54
- package/dist/styles/recipes/chat-composer.css +41 -22
- package/dist/styles/recipes/chat-layout.css +37 -54
- package/dist/styles/recipes/chat-message.css +78 -5
- package/dist/styles/recipes/choice.css +21 -2
- package/dist/styles/recipes/code-diff.css +9 -1
- package/dist/styles/recipes/code.css +64 -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/context.css +30 -18
- package/dist/styles/recipes/dockable-panel.css +8 -1
- package/dist/styles/recipes/dropzone.css +9 -2
- package/dist/styles/recipes/dynamic-notification-input.css +6 -0
- package/dist/styles/recipes/dynamic-notification.css +1 -0
- package/dist/styles/recipes/empty.css +118 -17
- package/dist/styles/recipes/environment-variables.css +9 -1
- package/dist/styles/recipes/field-parts.css +3 -6
- package/dist/styles/recipes/field.css +15 -5
- package/dist/styles/recipes/gradient-editor.css +33 -5
- package/dist/styles/recipes/inline-attachment.css +68 -20
- package/dist/styles/recipes/inline-citation.css +52 -10
- package/dist/styles/recipes/item.css +4 -2
- package/dist/styles/recipes/kbd.css +8 -0
- package/dist/styles/recipes/markdown-block.css +17 -2
- package/dist/styles/recipes/markdown.css +19 -0
- package/dist/styles/recipes/morphing-panel.css +1 -1
- package/dist/styles/recipes/page-layout.css +203 -0
- package/dist/styles/recipes/pagination.css +16 -4
- package/dist/styles/recipes/phone-input.css +8 -4
- package/dist/styles/recipes/popup-drawer.css +3 -1
- package/dist/styles/recipes/popup-lists.css +11 -0
- package/dist/styles/recipes/popup-toast.css +3 -29
- package/dist/styles/recipes/popup.css +10 -14
- package/dist/styles/recipes/progressive-blur.css +28 -7
- package/dist/styles/recipes/range.css +74 -3
- package/dist/styles/recipes/resizable.css +8 -10
- package/dist/styles/recipes/rich-tooltip.css +1 -4
- package/dist/styles/recipes/scroll-area.css +8 -2
- package/dist/styles/recipes/sidebar-menu.css +0 -6
- package/dist/styles/recipes/sidebar.css +56 -17
- package/dist/styles/recipes/skeleton.css +85 -3
- package/dist/styles/recipes/source-badge.css +20 -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 +35 -2
- package/dist/styles/recipes/task-list.css +68 -9
- package/dist/styles/recipes/thread-rail.css +19 -17
- package/dist/styles/recipes/toolbar.css +39 -4
- package/dist/styles/recipes/track-highlight.css +63 -5
- package/dist/styles/recipes/transcript-divider.css +1 -0
- package/dist/styles/recipes/tree.css +2 -0
- package/dist/styles/recipes/user-ask.css +65 -18
- package/dist/styles/theme.css +164 -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/thread-rail.js +1 -1
- 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 +9 -7
- 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 +6 -4
- 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 +8 -6
- package/dist/ui/combobox-disabled-selection.d.ts +3 -4
- package/dist/ui/combobox.d.ts +19 -20
- package/dist/ui/combobox.js +6 -4
- package/dist/ui/command.d.ts +22 -19
- package/dist/ui/command.js +63 -13
- package/dist/ui/context-menu.d.ts +30 -31
- package/dist/ui/context-menu.js +10 -7
- package/dist/ui/dialog.d.ts +13 -13
- package/dist/ui/dialog.js +11 -9
- 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 +9 -8
- package/dist/ui/dropdown-menu.d.ts +32 -33
- package/dist/ui/dropdown-menu.js +6 -4
- package/dist/ui/dropzone.d.ts +24 -24
- package/dist/ui/dropzone.js +4 -1
- 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/gradient-editor.js +2 -2
- package/dist/ui/hover-card.d.ts +6 -7
- package/dist/ui/hover-card.js +6 -4
- package/dist/ui/infinite-canvas.d.ts +11 -12
- package/dist/ui/infinite-canvas.js +1 -0
- 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 +10 -7
- 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 +6 -4
- package/dist/ui/number-field.d.ts +15 -16
- package/dist/ui/number-field.js +1 -1
- package/dist/ui/page-layout.d.ts +44 -0
- package/dist/ui/page-layout.js +108 -0
- package/dist/ui/pagination.d.ts +10 -11
- package/dist/ui/phone-input.d.ts +5 -6
- package/dist/ui/phone-input.js +39 -36
- package/dist/ui/popover.d.ts +11 -12
- package/dist/ui/popover.js +6 -4
- 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/resizable.js +1 -1
- 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 +6 -6
- 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 +8 -5
- package/dist/ui/separator.d.ts +2 -3
- package/dist/ui/sheet.d.ts +8 -9
- package/dist/ui/sheet.js +9 -7
- package/dist/ui/sidebar-menu.d.ts +18 -19
- package/dist/ui/sidebar-menu.js +4 -3
- 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 +19 -13
- package/dist/ui/sidebar.js +120 -55
- 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 +23 -16
- 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 +8 -9
- 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 +6 -4
- 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 +28 -27
- package/dist/user-ask.js +38 -13
- package/package.json +17 -16
- 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
package/dist/email/email.js
CHANGED
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Body, Button, Container, Head, Heading, Html, Link, Preview, Tailwind, Text, pixelBasedPreset } from "react-email";
|
|
2
|
+
import { Body, Button, Column, Container, Head, Heading, Hr, Html, Link, Preview, Row, Section, Tailwind, Text, pixelBasedPreset } from "react-email";
|
|
3
3
|
//#region src/email/email.tsx
|
|
4
|
-
function
|
|
4
|
+
function surfaceColors(theme, variant) {
|
|
5
|
+
if (variant === "contained") return theme.colors;
|
|
6
|
+
return {
|
|
7
|
+
...theme.colors,
|
|
8
|
+
card: theme.colors.background,
|
|
9
|
+
"card-foreground": theme.colors.foreground
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
function tailwindTheme(theme, variant) {
|
|
5
13
|
return {
|
|
6
14
|
presets: [pixelBasedPreset],
|
|
7
15
|
theme: { extend: {
|
|
8
|
-
colors: theme
|
|
16
|
+
colors: surfaceColors(theme, variant),
|
|
9
17
|
borderRadius: theme.radii,
|
|
10
18
|
minHeight: { control: theme.button.height },
|
|
11
19
|
padding: {
|
|
@@ -14,7 +22,8 @@ function tailwindTheme(theme) {
|
|
|
14
22
|
},
|
|
15
23
|
fontFamily: {
|
|
16
24
|
body: theme.fonts.body,
|
|
17
|
-
display: theme.fonts.display
|
|
25
|
+
display: theme.fonts.display,
|
|
26
|
+
mono: theme.fonts.mono
|
|
18
27
|
},
|
|
19
28
|
fontSize: {
|
|
20
29
|
...Object.fromEntries(Object.entries(theme.text).map(([name, { fontSize, ...options }]) => [name, [fontSize, options]])),
|
|
@@ -23,36 +32,78 @@ function tailwindTheme(theme) {
|
|
|
23
32
|
} }
|
|
24
33
|
};
|
|
25
34
|
}
|
|
26
|
-
function EmailLayout({ theme, preview, children, head, lang = "en", dir = "ltr" }) {
|
|
35
|
+
function EmailLayout({ theme, preview, children, footer, footerPlacement = "inside", head, lang = "en", dir = "ltr", variant = "contained" }) {
|
|
36
|
+
const contained = variant === "contained";
|
|
37
|
+
const outside = contained && footerPlacement === "outside";
|
|
38
|
+
const backdrop = theme.colorScheme === "light" ? "bg-muted" : "bg-background";
|
|
27
39
|
return /* @__PURE__ */ jsx(Html, {
|
|
28
40
|
lang,
|
|
29
41
|
dir,
|
|
30
42
|
children: /* @__PURE__ */ jsxs(Tailwind, {
|
|
31
|
-
config: tailwindTheme(theme),
|
|
32
|
-
children: [/* @__PURE__ */
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
43
|
+
config: tailwindTheme(theme, variant),
|
|
44
|
+
children: [/* @__PURE__ */ jsxs(Head, { children: [
|
|
45
|
+
/* @__PURE__ */ jsx("meta", {
|
|
46
|
+
name: "color-scheme",
|
|
47
|
+
content: theme.colorScheme
|
|
48
|
+
}),
|
|
49
|
+
/* @__PURE__ */ jsx("meta", {
|
|
50
|
+
name: "supported-color-schemes",
|
|
51
|
+
content: theme.colorScheme
|
|
52
|
+
}),
|
|
53
|
+
head
|
|
54
|
+
] }), /* @__PURE__ */ jsxs(Body, {
|
|
55
|
+
className: `m-0 font-body text-body text-foreground ${contained ? `${backdrop} px-4 py-8` : "bg-background p-0"}`,
|
|
56
|
+
children: [
|
|
57
|
+
/* @__PURE__ */ jsx(Preview, { children: preview }),
|
|
58
|
+
/* @__PURE__ */ jsxs(Container, {
|
|
59
|
+
className: `mx-auto w-full max-w-[600px] bg-card text-card-foreground ${contained ? "rounded-panel border border-border border-solid p-6" : "px-6 py-8"}`,
|
|
60
|
+
children: [children, outside ? null : footer]
|
|
61
|
+
}),
|
|
62
|
+
outside ? /* @__PURE__ */ jsx(Container, {
|
|
63
|
+
className: "mx-auto w-full max-w-[600px] px-6",
|
|
64
|
+
children: footer
|
|
65
|
+
}) : null
|
|
66
|
+
]
|
|
38
67
|
})]
|
|
39
68
|
})
|
|
40
69
|
});
|
|
41
70
|
}
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
71
|
+
const alignClasses = {
|
|
72
|
+
left: "text-left",
|
|
73
|
+
center: "text-center",
|
|
74
|
+
right: "text-right"
|
|
75
|
+
};
|
|
76
|
+
function alignClass(align) {
|
|
77
|
+
return align ? alignClasses[align] : "";
|
|
78
|
+
}
|
|
79
|
+
const headingSizeClasses = {
|
|
80
|
+
display: "text-display",
|
|
81
|
+
"heading-1": "text-heading-1",
|
|
82
|
+
"heading-2": "text-heading-2",
|
|
83
|
+
"heading-3": "text-heading-3",
|
|
84
|
+
"heading-4": "text-heading-4"
|
|
85
|
+
};
|
|
86
|
+
const headingSizeForTag = {
|
|
87
|
+
h1: "heading-1",
|
|
88
|
+
h2: "heading-2",
|
|
89
|
+
h3: "heading-3",
|
|
90
|
+
h4: "heading-4"
|
|
47
91
|
};
|
|
48
|
-
function EmailHeading({ as = "h1", className = "", ...props }) {
|
|
92
|
+
function EmailHeading({ as = "h1", size, align, className = "", ...props }) {
|
|
93
|
+
const sizeClass = headingSizeClasses[size ?? headingSizeForTag[as]];
|
|
49
94
|
return /* @__PURE__ */ jsx(Heading, {
|
|
50
95
|
...props,
|
|
51
96
|
as,
|
|
52
|
-
className: `mb-4 mt-0 font-display text-card-foreground ${
|
|
97
|
+
className: `mb-4 mt-0 font-display text-card-foreground ${sizeClass} ${alignClass(align)} ${className}`
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
function EmailSection({ align, className = "", ...props }) {
|
|
101
|
+
return /* @__PURE__ */ jsx(Section, {
|
|
102
|
+
...props,
|
|
103
|
+
className: `${alignClass(align)} ${className}`
|
|
53
104
|
});
|
|
54
105
|
}
|
|
55
|
-
function EmailText({ tone = "default", className = "", style, ...props }) {
|
|
106
|
+
function EmailText({ tone = "default", align, className = "", style, ...props }) {
|
|
56
107
|
const textColor = tone === "muted" ? "text-muted-foreground" : "text-card-foreground";
|
|
57
108
|
return /* @__PURE__ */ jsx(Text, {
|
|
58
109
|
...props,
|
|
@@ -60,13 +111,14 @@ function EmailText({ tone = "default", className = "", style, ...props }) {
|
|
|
60
111
|
overflowWrap: "break-word",
|
|
61
112
|
...style
|
|
62
113
|
},
|
|
63
|
-
className: `mb-4 mt-0 font-body text-body ${textColor} ${className}`
|
|
114
|
+
className: `mb-4 mt-0 font-body text-body ${textColor} ${alignClass(align)} ${className}`
|
|
64
115
|
});
|
|
65
116
|
}
|
|
66
|
-
function EmailButton({ className = "", ...props }) {
|
|
117
|
+
function EmailButton({ width = "auto", className = "", ...props }) {
|
|
118
|
+
const widthClass = width === "full" ? "block w-full" : "inline-block";
|
|
67
119
|
return /* @__PURE__ */ jsx(Button, {
|
|
68
120
|
...props,
|
|
69
|
-
className: `box-border min-h-control rounded-control bg-primary px-control-x py-control-y text-center font-body text-control font-medium text-primary-foreground no-underline ${className}`
|
|
121
|
+
className: `box-border min-h-control rounded-control bg-primary px-control-x py-control-y text-center font-body text-control font-medium text-primary-foreground no-underline ${widthClass} ${className}`
|
|
70
122
|
});
|
|
71
123
|
}
|
|
72
124
|
function EmailLink({ className = "", ...props }) {
|
|
@@ -75,5 +127,84 @@ function EmailLink({ className = "", ...props }) {
|
|
|
75
127
|
className: `font-body text-primary-text underline ${className}`
|
|
76
128
|
});
|
|
77
129
|
}
|
|
130
|
+
function EmailCaption({ className = "", ...props }) {
|
|
131
|
+
return /* @__PURE__ */ jsx(EmailText, {
|
|
132
|
+
tone: "muted",
|
|
133
|
+
...props,
|
|
134
|
+
className: `text-caption ${className}`
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
function EmailMutedLink({ className = "", ...props }) {
|
|
138
|
+
return /* @__PURE__ */ jsx(EmailLink, {
|
|
139
|
+
...props,
|
|
140
|
+
className: `text-caption text-muted-foreground ${className}`
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
function EmailDivider({ className = "", ...props }) {
|
|
144
|
+
return /* @__PURE__ */ jsx(Hr, {
|
|
145
|
+
...props,
|
|
146
|
+
className: `my-6 border-0 border-t border-solid border-t-border ${className}`
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
function EmailPanel({ className = "", ...props }) {
|
|
150
|
+
return /* @__PURE__ */ jsx(Section, {
|
|
151
|
+
...props,
|
|
152
|
+
className: `my-6 rounded-panel bg-muted p-5 ${className}`
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
function EmailOneTimeCode({ children, className = "" }) {
|
|
156
|
+
return /* @__PURE__ */ jsx(EmailPanel, {
|
|
157
|
+
className: `text-center ${className}`,
|
|
158
|
+
children: /* @__PURE__ */ jsx(EmailText, {
|
|
159
|
+
className: "mb-0 text-center font-mono text-heading-2 font-semibold tracking-[0.25em]",
|
|
160
|
+
children
|
|
161
|
+
})
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
function EmailBulletList({ items, className = "" }) {
|
|
165
|
+
if (items.length === 0) return null;
|
|
166
|
+
return /* @__PURE__ */ jsx("ul", {
|
|
167
|
+
className: `mb-4 mt-0 list-disc pl-5 font-body text-body text-card-foreground ${className}`,
|
|
168
|
+
children: items.map((item, index) => /* @__PURE__ */ jsx("li", {
|
|
169
|
+
className: "mb-1 font-body text-body text-card-foreground",
|
|
170
|
+
children: item
|
|
171
|
+
}, index))
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
function EmailColumns({ children, widths, gap = 20, verticalAlign = "top", className = "" }) {
|
|
175
|
+
if (children.length === 0) return null;
|
|
176
|
+
const evenWidth = `${(100 / children.length).toFixed(4)}%`;
|
|
177
|
+
return /* @__PURE__ */ jsx(Row, {
|
|
178
|
+
className: `mb-6 table-fixed ${className}`,
|
|
179
|
+
children: children.map((child, index) => /* @__PURE__ */ jsx(Column, {
|
|
180
|
+
width: widths?.[index] ?? evenWidth,
|
|
181
|
+
className: `max-[480px]:block max-[480px]:w-full max-[480px]:pl-0 ${index === 0 ? "" : `max-[480px]:pt-[${gap}px]`}`,
|
|
182
|
+
style: {
|
|
183
|
+
verticalAlign,
|
|
184
|
+
paddingLeft: index === 0 ? 0 : gap
|
|
185
|
+
},
|
|
186
|
+
children: child
|
|
187
|
+
}, index))
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
function EmailDetailRow({ label, value, emphasis = false }) {
|
|
191
|
+
return /* @__PURE__ */ jsxs(Row, {
|
|
192
|
+
className: "table-fixed",
|
|
193
|
+
children: [/* @__PURE__ */ jsx(Column, {
|
|
194
|
+
className: "align-top",
|
|
195
|
+
children: /* @__PURE__ */ jsx(EmailText, {
|
|
196
|
+
className: "mb-2",
|
|
197
|
+
children: label
|
|
198
|
+
})
|
|
199
|
+
}), /* @__PURE__ */ jsx(Column, {
|
|
200
|
+
align: "right",
|
|
201
|
+
className: "align-top",
|
|
202
|
+
children: /* @__PURE__ */ jsx(EmailText, {
|
|
203
|
+
className: `mb-2 ${emphasis ? "font-semibold" : ""}`,
|
|
204
|
+
children: value
|
|
205
|
+
})
|
|
206
|
+
})]
|
|
207
|
+
});
|
|
208
|
+
}
|
|
78
209
|
//#endregion
|
|
79
|
-
export { EmailButton, EmailHeading, EmailLayout, EmailLink, EmailText };
|
|
210
|
+
export { EmailBulletList, EmailButton, EmailCaption, EmailColumns, EmailDetailRow, EmailDivider, EmailHeading, EmailLayout, EmailLink, EmailMutedLink, EmailOneTimeCode, EmailPanel, EmailSection, EmailText, surfaceColors };
|
package/dist/email/length.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
//#region src/email/length.d.ts
|
|
2
|
-
declare function emailLengthPixels(name: string, value: string, rootFontSize: number, allowZero?: boolean): number;
|
|
3
|
-
//#endregion
|
|
4
|
-
export { emailLengthPixels };
|
|
2
|
+
export declare function emailLengthPixels(name: string, value: string, rootFontSize: number, allowZero?: boolean): number;
|
|
3
|
+
//#endregion
|
|
@@ -1,41 +1,54 @@
|
|
|
1
1
|
import { EmailTheme } from "./theme.js";
|
|
2
|
+
import { EmailVariant } from "./email.js";
|
|
3
|
+
import { EmailBrand, EmailFooterContent } from "./email-brand.js";
|
|
4
|
+
import { ReactNode } from "react";
|
|
5
|
+
import { PrismLanguage } from "react-email";
|
|
2
6
|
//#region src/email/templates.d.ts
|
|
3
|
-
type
|
|
7
|
+
type EmailMessageProps = {
|
|
4
8
|
theme: EmailTheme;
|
|
5
|
-
brand:
|
|
6
|
-
footer:
|
|
9
|
+
brand: EmailBrand;
|
|
10
|
+
footer: EmailFooterContent;
|
|
11
|
+
variant?: EmailVariant;
|
|
12
|
+
head?: ReactNode;
|
|
7
13
|
};
|
|
8
|
-
|
|
14
|
+
type EmailBrandProps = EmailMessageProps & {
|
|
15
|
+
browserUrl?: string;
|
|
16
|
+
};
|
|
17
|
+
export type EmailHighlight = {
|
|
18
|
+
title: string;
|
|
19
|
+
description: string;
|
|
20
|
+
};
|
|
21
|
+
export declare function InvitationEmail({ theme, variant, head, brand, browserUrl, footer, inviter, workspace, inviteUrl }: EmailBrandProps & {
|
|
9
22
|
inviter: string;
|
|
10
23
|
workspace: string;
|
|
11
24
|
inviteUrl: string;
|
|
12
25
|
}): import("react").JSX.Element;
|
|
13
|
-
declare function ProductEmail({ theme, brand, footer, title, description, imageUrl, imageAlt, actionUrl }: EmailBrandProps & {
|
|
26
|
+
export declare function ProductEmail({ theme, variant, head, brand, browserUrl, footer, title, description, imageUrl, imageAlt, highlights, actionUrl }: EmailBrandProps & {
|
|
14
27
|
title: string;
|
|
15
28
|
description: string;
|
|
16
29
|
imageUrl: string;
|
|
17
30
|
imageAlt: string;
|
|
31
|
+
highlights?: EmailHighlight[];
|
|
18
32
|
actionUrl: string;
|
|
19
33
|
}): import("react").JSX.Element;
|
|
20
|
-
declare function EditorialEmail({ theme, brand, footer, title, description, imageUrl, imageAlt, articleUrl }: EmailBrandProps & {
|
|
34
|
+
export declare function EditorialEmail({ theme, variant, head, brand, browserUrl, footer, title, description, imageUrl, imageAlt, articleUrl }: EmailBrandProps & {
|
|
21
35
|
title: string;
|
|
22
36
|
description: string;
|
|
23
37
|
imageUrl: string;
|
|
24
38
|
imageAlt: string;
|
|
25
39
|
articleUrl: string;
|
|
26
40
|
}): import("react").JSX.Element;
|
|
27
|
-
type EmailArticle = {
|
|
41
|
+
export type EmailArticle = {
|
|
28
42
|
title: string;
|
|
29
43
|
description: string;
|
|
30
44
|
href: string;
|
|
31
45
|
imageUrl: string;
|
|
32
46
|
imageAlt: string;
|
|
33
47
|
};
|
|
34
|
-
declare function NewsletterEmail({ theme, brand, footer, articles
|
|
48
|
+
export declare function NewsletterEmail({ theme, variant, head, brand, browserUrl, footer, articles }: EmailBrandProps & {
|
|
35
49
|
articles: EmailArticle[];
|
|
36
|
-
unsubscribeUrl: string;
|
|
37
50
|
}): import("react").JSX.Element;
|
|
38
|
-
declare function SummaryEmail({ theme, brand, footer, period, metrics, details, dashboardUrl }: EmailBrandProps & {
|
|
51
|
+
export declare function SummaryEmail({ theme, variant, head, brand, browserUrl, footer, period, metrics, details, dashboardUrl }: EmailBrandProps & {
|
|
39
52
|
period: string;
|
|
40
53
|
metrics: {
|
|
41
54
|
label: string;
|
|
@@ -47,5 +60,36 @@ declare function SummaryEmail({ theme, brand, footer, period, metrics, details,
|
|
|
47
60
|
}[];
|
|
48
61
|
dashboardUrl: string;
|
|
49
62
|
}): import("react").JSX.Element;
|
|
50
|
-
|
|
51
|
-
|
|
63
|
+
export declare function VerificationEmail({ theme, variant, head, brand, footer, code, expiresInMinutes, supportUrl }: EmailMessageProps & {
|
|
64
|
+
code: string;
|
|
65
|
+
expiresInMinutes: number;
|
|
66
|
+
supportUrl: string;
|
|
67
|
+
}): import("react").JSX.Element;
|
|
68
|
+
export type EmailReceiptLine = {
|
|
69
|
+
label: string;
|
|
70
|
+
value: string;
|
|
71
|
+
};
|
|
72
|
+
export declare function ReceiptEmail({ theme, variant, head, brand, footer, orderNumber, orderDate, lines, total, paymentMethod, invoiceUrl }: EmailMessageProps & {
|
|
73
|
+
orderNumber: string;
|
|
74
|
+
orderDate: string;
|
|
75
|
+
lines: EmailReceiptLine[];
|
|
76
|
+
total: string;
|
|
77
|
+
paymentMethod: string;
|
|
78
|
+
invoiceUrl: string;
|
|
79
|
+
}): import("react").JSX.Element;
|
|
80
|
+
export type EmailReleaseSection = {
|
|
81
|
+
title: string;
|
|
82
|
+
changes: string[];
|
|
83
|
+
};
|
|
84
|
+
export declare function ReleaseNotesEmail({ theme, variant, head, brand, browserUrl, footer, version, summary, sections, migration, changelogUrl }: EmailBrandProps & {
|
|
85
|
+
version: string;
|
|
86
|
+
summary: string;
|
|
87
|
+
sections: EmailReleaseSection[];
|
|
88
|
+
migration?: {
|
|
89
|
+
notes: string;
|
|
90
|
+
language: PrismLanguage;
|
|
91
|
+
code: string;
|
|
92
|
+
};
|
|
93
|
+
changelogUrl: string;
|
|
94
|
+
}): import("react").JSX.Element;
|
|
95
|
+
//#endregion
|