@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
package/dist/lib/env-file.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//#region src/lib/env-file.ts
|
|
2
2
|
const ENV_FILE_MAX_SIZE = 65536;
|
|
3
|
-
const DUPLICATE_ENVIRONMENT_VARIABLE_MESSAGE = "
|
|
3
|
+
const DUPLICATE_ENVIRONMENT_VARIABLE_MESSAGE = "Rename or remove the duplicate key.";
|
|
4
4
|
var DuplicateEnvironmentVariableKeyError = class extends Error {
|
|
5
5
|
key;
|
|
6
6
|
constructor(key) {
|
|
@@ -175,7 +175,7 @@ async function readEnvFile(file, options = {}) {
|
|
|
175
175
|
const maxSize = options.maxSize ?? 65536;
|
|
176
176
|
if (file.size > maxSize) return {
|
|
177
177
|
ok: false,
|
|
178
|
-
error: `
|
|
178
|
+
error: `That file is over ${Math.ceil(maxSize / 1024)} KB. Choose a smaller .env file.`
|
|
179
179
|
};
|
|
180
180
|
let text;
|
|
181
181
|
try {
|
|
@@ -183,17 +183,17 @@ async function readEnvFile(file, options = {}) {
|
|
|
183
183
|
} catch {
|
|
184
184
|
return {
|
|
185
185
|
ok: false,
|
|
186
|
-
error: "
|
|
186
|
+
error: "Couldn't read that file. Try selecting it again."
|
|
187
187
|
};
|
|
188
188
|
}
|
|
189
189
|
if (text.includes("\0")) return {
|
|
190
190
|
ok: false,
|
|
191
|
-
error: "
|
|
191
|
+
error: "That file isn't plain text. Choose a .env text file."
|
|
192
192
|
};
|
|
193
193
|
const entries = parseEnvFileText(text);
|
|
194
194
|
if (entries.length === 0) return {
|
|
195
195
|
ok: false,
|
|
196
|
-
error: "No
|
|
196
|
+
error: "No variables found. Use one KEY=value per line."
|
|
197
197
|
};
|
|
198
198
|
return {
|
|
199
199
|
ok: true,
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
//#region src/lib/motion.ts
|
|
2
|
+
const REDUCED_MOTION_QUERY = "(prefers-reduced-motion: reduce)";
|
|
3
|
+
function prefersReducedMotion(node) {
|
|
4
|
+
return globalThis.matchMedia?.(REDUCED_MOTION_QUERY).matches === true || node?.closest("[data-motion=\"reduced\"]") != null;
|
|
5
|
+
}
|
|
6
|
+
function readDurationMs(element, token) {
|
|
7
|
+
const value = getComputedStyle(element).getPropertyValue(token).trim();
|
|
8
|
+
const amount = Number.parseFloat(value);
|
|
9
|
+
if (!Number.isFinite(amount)) return 0;
|
|
10
|
+
if (value.endsWith("ms")) return amount;
|
|
11
|
+
if (value.endsWith("s")) return amount * 1e3;
|
|
12
|
+
return amount;
|
|
13
|
+
}
|
|
14
|
+
//#endregion
|
|
15
|
+
export { prefersReducedMotion, readDurationMs };
|
|
@@ -1,19 +1,14 @@
|
|
|
1
1
|
//#region src/lib/trigger-detect.ts
|
|
2
|
-
const WHITESPACE =
|
|
3
|
-
" ",
|
|
4
|
-
"\n",
|
|
5
|
-
" ",
|
|
6
|
-
"\xA0"
|
|
7
|
-
]);
|
|
2
|
+
const WHITESPACE = /\s/u;
|
|
8
3
|
function detectTrigger(textBeforeCaret, triggerChars) {
|
|
9
4
|
const triggerSet = new Set(triggerChars);
|
|
10
5
|
for (let i = textBeforeCaret.length - 1; i >= 0; i -= 1) {
|
|
11
6
|
const char = textBeforeCaret.at(i);
|
|
12
7
|
if (char === void 0) return null;
|
|
13
|
-
if (WHITESPACE.
|
|
8
|
+
if (WHITESPACE.test(char)) return null;
|
|
14
9
|
if (triggerSet.has(char)) {
|
|
15
10
|
const preceding = i === 0 ? "" : textBeforeCaret.at(i - 1) ?? "";
|
|
16
|
-
if (preceding === "" || WHITESPACE.
|
|
11
|
+
if (preceding === "" || WHITESPACE.test(preceding)) return {
|
|
17
12
|
char,
|
|
18
13
|
query: textBeforeCaret.slice(i + 1),
|
|
19
14
|
start: i,
|
|
@@ -25,6 +20,8 @@ function detectTrigger(textBeforeCaret, triggerChars) {
|
|
|
25
20
|
return null;
|
|
26
21
|
}
|
|
27
22
|
const MIRROR_PROPERTIES = [
|
|
23
|
+
"direction",
|
|
24
|
+
"writing-mode",
|
|
28
25
|
"box-sizing",
|
|
29
26
|
"width",
|
|
30
27
|
"font-family",
|
|
@@ -33,6 +30,7 @@ const MIRROR_PROPERTIES = [
|
|
|
33
30
|
"font-style",
|
|
34
31
|
"font-variant",
|
|
35
32
|
"letter-spacing",
|
|
33
|
+
"word-spacing",
|
|
36
34
|
"text-transform",
|
|
37
35
|
"text-indent",
|
|
38
36
|
"line-height",
|
package/dist/markdown-block.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "./lib/cn.js";
|
|
3
|
+
import { ScrollArea } from "./ui/scroll-area.js";
|
|
3
4
|
import { CodeCopy } from "./ui/code.js";
|
|
4
5
|
import { Markdown } from "./ui/markdown.js";
|
|
5
6
|
import { createContext, useContext } from "react";
|
|
@@ -30,7 +31,7 @@ function MarkdownBlockHeader({ className, ...props }) {
|
|
|
30
31
|
"data-control-ui": "markdown-block",
|
|
31
32
|
"data-control-family": "markdown-block",
|
|
32
33
|
"data-slot": "header",
|
|
33
|
-
className: cn("
|
|
34
|
+
className: cn("flex items-center justify-between", className),
|
|
34
35
|
...props
|
|
35
36
|
});
|
|
36
37
|
}
|
|
@@ -50,6 +51,7 @@ function MarkdownBlockTitle({ children = "Markdown", className, ...props }) {
|
|
|
50
51
|
children: "MD"
|
|
51
52
|
}), /* @__PURE__ */ jsx("span", {
|
|
52
53
|
className: "truncate",
|
|
54
|
+
title: typeof children === "string" ? children : void 0,
|
|
53
55
|
children
|
|
54
56
|
})]
|
|
55
57
|
});
|
|
@@ -64,13 +66,16 @@ function MarkdownBlockCopy({ "aria-label": ariaLabel = "Copy markdown", ...props
|
|
|
64
66
|
}
|
|
65
67
|
function MarkdownBlockContent({ children, className, ...props }) {
|
|
66
68
|
const code = useMarkdownBlockContext();
|
|
67
|
-
return /* @__PURE__ */ jsx(
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
69
|
+
return /* @__PURE__ */ jsx(ScrollArea, {
|
|
70
|
+
maxHeight: "420px",
|
|
71
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
72
|
+
"data-control-ui": "markdown-block",
|
|
73
|
+
"data-control-family": "markdown-block",
|
|
74
|
+
"data-slot": "content",
|
|
75
|
+
className,
|
|
76
|
+
...props,
|
|
77
|
+
children: children ?? /* @__PURE__ */ jsx(Markdown, { content: code })
|
|
78
|
+
})
|
|
74
79
|
});
|
|
75
80
|
}
|
|
76
81
|
//#endregion
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ButtonProps } from "./ui/button.js";
|
|
2
|
+
//#region src/popup-parts.d.ts
|
|
3
|
+
export type PopupCloseButtonProps = Omit<ButtonProps, "children" | "iconOnly"> & {
|
|
4
|
+
label: string;
|
|
5
|
+
};
|
|
6
|
+
export declare function PopupCloseButton({ label, variant, size, ...props }: PopupCloseButtonProps): import("react").JSX.Element;
|
|
7
|
+
export declare function PopupArrowShape(): import("react").JSX.Element;
|
|
8
|
+
//#endregion
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Button } from "./ui/button.js";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
//#region src/popup-parts.tsx
|
|
5
|
+
function PopupCloseButton({ label, variant = "ghost", size = "xs", ...props }) {
|
|
6
|
+
return /* @__PURE__ */ jsxs(Button, {
|
|
7
|
+
"data-popup-part": "close",
|
|
8
|
+
variant,
|
|
9
|
+
size,
|
|
10
|
+
iconOnly: true,
|
|
11
|
+
...props,
|
|
12
|
+
children: [/* @__PURE__ */ jsx("svg", {
|
|
13
|
+
viewBox: "0 0 16 16",
|
|
14
|
+
"aria-hidden": "true",
|
|
15
|
+
fill: "none",
|
|
16
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
17
|
+
d: "M4 4 12 12M12 4 4 12",
|
|
18
|
+
stroke: "currentColor",
|
|
19
|
+
strokeWidth: "1.4",
|
|
20
|
+
strokeLinecap: "round"
|
|
21
|
+
})
|
|
22
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
23
|
+
className: "sr-only",
|
|
24
|
+
children: label
|
|
25
|
+
})]
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
function PopupArrowShape() {
|
|
29
|
+
return /* @__PURE__ */ jsx("svg", {
|
|
30
|
+
"aria-hidden": "true",
|
|
31
|
+
focusable: "false",
|
|
32
|
+
width: "12",
|
|
33
|
+
height: "8",
|
|
34
|
+
viewBox: "0 0 12 8",
|
|
35
|
+
overflow: "visible",
|
|
36
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
37
|
+
d: "M0 7L4 2Q6 0 8 2L12 7L12 8L0 8Z",
|
|
38
|
+
fill: "currentColor"
|
|
39
|
+
})
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
//#endregion
|
|
43
|
+
export { PopupArrowShape, PopupCloseButton };
|
|
@@ -169,13 +169,13 @@ function splitTopLevel(text) {
|
|
|
169
169
|
}
|
|
170
170
|
const unresolved = (reason) => ({ unresolved: reason });
|
|
171
171
|
const isUnresolved = (result) => Boolean(result?.unresolved);
|
|
172
|
-
function evaluateCalc(expression, base, tokens, seen, depth) {
|
|
172
|
+
function evaluateCalc(expression, keyword, base, tokens, seen, depth) {
|
|
173
173
|
const inner = expression.slice(5, -1).trim();
|
|
174
174
|
const match = /^(\S+)\s*([+\-*])\s*(\S+)$/.exec(inner);
|
|
175
175
|
if (!match) return null;
|
|
176
176
|
const [, leftText, operator, rightText] = match;
|
|
177
177
|
const operand = (text) => {
|
|
178
|
-
if (text ===
|
|
178
|
+
if (text === keyword) return base;
|
|
179
179
|
const number = scalar(text);
|
|
180
180
|
if (number !== null) return number;
|
|
181
181
|
const nested = resolveScalar(text, tokens, seen, depth + 1);
|
|
@@ -204,10 +204,11 @@ function resolveScalar(value, tokens, seen, depth) {
|
|
|
204
204
|
const literalChannel = (text, allowPercent) => allowPercent || !text.endsWith("%") ? scalar(text) : null;
|
|
205
205
|
const channelValue = (text, keyword, base, tokens, seen, depth) => {
|
|
206
206
|
if (text === keyword) return base;
|
|
207
|
-
if (text.startsWith("calc(")) return evaluateCalc(text, base, tokens, seen, depth);
|
|
207
|
+
if (text.startsWith("calc(")) return evaluateCalc(text, keyword, base, tokens, seen, depth);
|
|
208
|
+
if (text.startsWith("var(")) return resolveScalar(text, tokens, seen, depth);
|
|
208
209
|
return literalChannel(text, keyword === "l");
|
|
209
210
|
};
|
|
210
|
-
const alphaValue = (text, base, tokens, seen, depth) => text.startsWith("calc(") ? evaluateCalc(text, base, tokens, seen, depth) : resolveScalar(text, tokens, seen, depth);
|
|
211
|
+
const alphaValue = (text, base, tokens, seen, depth) => text.startsWith("calc(") ? evaluateCalc(text, "alpha", base, tokens, seen, depth) : resolveScalar(text, tokens, seen, depth);
|
|
211
212
|
const CHANNEL_KEYWORDS = [
|
|
212
213
|
"l",
|
|
213
214
|
"c",
|
package/dist/source-badge.js
CHANGED
|
@@ -45,6 +45,7 @@ function SourceFavicon({ faviconSrc, href, imageProps, fallbackProps, className,
|
|
|
45
45
|
}
|
|
46
46
|
function SourceBadge({ faviconSrc, href, children, className, rel, target, ...props }) {
|
|
47
47
|
const hostname = sourceHostname(href);
|
|
48
|
+
const label = children ?? hostname;
|
|
48
49
|
return /* @__PURE__ */ jsxs(Badge, {
|
|
49
50
|
variant: "outline",
|
|
50
51
|
render: /* @__PURE__ */ jsx("a", {
|
|
@@ -63,8 +64,9 @@ function SourceBadge({ faviconSrc, href, children, className, rel, target, ...pr
|
|
|
63
64
|
}), /* @__PURE__ */ jsx("span", {
|
|
64
65
|
"data-control-ui": "source-badge",
|
|
65
66
|
"data-slot": "label",
|
|
67
|
+
title: typeof label === "string" ? label : void 0,
|
|
66
68
|
className: "truncate",
|
|
67
|
-
children:
|
|
69
|
+
children: label
|
|
68
70
|
})]
|
|
69
71
|
});
|
|
70
72
|
}
|
package/dist/styles/code.css
CHANGED
|
@@ -26,7 +26,6 @@
|
|
|
26
26
|
--diff-del-emphasis: oklch(0.87 0.12 22 / 0.8);
|
|
27
27
|
--diff-del-gutter: oklch(0.92 0.07 22);
|
|
28
28
|
--diff-del-fg: oklch(0.53 0.16 22);
|
|
29
|
-
--diff-context-fg: var(--muted-foreground);
|
|
30
29
|
--diff-gutter-bg: oklch(from var(--muted) l c h / 0.5);
|
|
31
30
|
}
|
|
32
31
|
|
|
@@ -52,6 +51,5 @@
|
|
|
52
51
|
--diff-del-emphasis: oklch(0.62 0.18 22 / 0.36);
|
|
53
52
|
--diff-del-gutter: oklch(0.55 0.14 22 / 0.3);
|
|
54
53
|
--diff-del-fg: oklch(0.78 0.15 22);
|
|
55
|
-
--diff-context-fg: var(--muted-foreground);
|
|
56
54
|
--diff-gutter-bg: oklch(from var(--muted) l c h / 0.4);
|
|
57
55
|
}
|
package/dist/styles/effects.css
CHANGED
|
@@ -5,14 +5,6 @@
|
|
|
5
5
|
background-image: linear-gradient(100deg, var(--muted) 30%, oklch(from var(--muted-foreground) l c h / 0.25) 50%, var(--muted) 70%);
|
|
6
6
|
background-size: 220% 100%;
|
|
7
7
|
animation: shimmer calc(var(--duration-slow) * 5) var(--ease-standard) infinite;
|
|
8
|
-
|
|
9
|
-
/* Reduced motion: hold resting gradient (infinite animation ignores 0ms collapse, must still explicitly) under OS pref + motion kill-switch attribute. */
|
|
10
|
-
@media (prefers-reduced-motion: reduce) {
|
|
11
|
-
animation: none;
|
|
12
|
-
}
|
|
13
|
-
:where([data-motion="reduced"]) & {
|
|
14
|
-
animation: none;
|
|
15
|
-
}
|
|
16
8
|
}
|
|
17
9
|
|
|
18
10
|
/* shimmer-text — same sweep clipped to text ("AI is generating" treatment); subtle --muted-foreground↔--foreground stops keep it readable. */
|
|
@@ -24,14 +16,6 @@
|
|
|
24
16
|
-webkit-text-fill-color: transparent;
|
|
25
17
|
color: transparent;
|
|
26
18
|
animation: shimmer calc(var(--duration-slow) * 6) var(--ease-standard) infinite;
|
|
27
|
-
|
|
28
|
-
/* Reduced motion: static muted-foreground text, no sweep — stilled under OS pref + motion kill-switch (infinite animation ignores 0ms tempo). */
|
|
29
|
-
@media (prefers-reduced-motion: reduce) {
|
|
30
|
-
animation: none;
|
|
31
|
-
}
|
|
32
|
-
:where([data-motion="reduced"]) & {
|
|
33
|
-
animation: none;
|
|
34
|
-
}
|
|
35
19
|
}
|
|
36
20
|
|
|
37
21
|
@keyframes shimmer {
|
|
@@ -69,14 +53,6 @@
|
|
|
69
53
|
-webkit-mask-repeat: no-repeat;
|
|
70
54
|
mask-repeat: no-repeat;
|
|
71
55
|
animation: aui-halftone calc(var(--duration-slow) * 6) var(--ease-standard) infinite;
|
|
72
|
-
|
|
73
|
-
/* Reduced motion: dots hold at their resting radius — still a legible placeholder, just no breathing. */
|
|
74
|
-
@media (prefers-reduced-motion: reduce) {
|
|
75
|
-
animation: none;
|
|
76
|
-
}
|
|
77
|
-
:where([data-motion="reduced"]) & {
|
|
78
|
-
animation: none;
|
|
79
|
-
}
|
|
80
56
|
}
|
|
81
57
|
|
|
82
58
|
@keyframes aui-halftone {
|
|
@@ -106,14 +82,6 @@
|
|
|
106
82
|
color: transparent;
|
|
107
83
|
text-shadow: none;
|
|
108
84
|
animation: aui-progress-sweep calc(var(--duration-slow) * 12) linear infinite;
|
|
109
|
-
|
|
110
|
-
/* Reduced motion: static blocks, no march — stilled under OS pref + motion kill-switch (infinite animation ignores 0ms tempo). */
|
|
111
|
-
@media (prefers-reduced-motion: reduce) {
|
|
112
|
-
animation: none;
|
|
113
|
-
}
|
|
114
|
-
:where([data-motion="reduced"]) & {
|
|
115
|
-
animation: none;
|
|
116
|
-
}
|
|
117
85
|
}
|
|
118
86
|
|
|
119
87
|
@keyframes aui-progress-sweep {
|
|
@@ -124,3 +92,9 @@
|
|
|
124
92
|
background-position: -200% 0;
|
|
125
93
|
}
|
|
126
94
|
}
|
|
95
|
+
|
|
96
|
+
@keyframes cui-spin {
|
|
97
|
+
to {
|
|
98
|
+
rotate: 360deg;
|
|
99
|
+
}
|
|
100
|
+
}
|
package/dist/styles/index.css
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
@import "./theme.css";
|
|
2
2
|
@import "./recipes/accordion.css";
|
|
3
3
|
@import "./recipes/button.css";
|
|
4
|
+
@import "./recipes/button-states.css";
|
|
4
5
|
@import "./recipes/action-bar.css";
|
|
5
6
|
@import "./recipes/collapsible.css";
|
|
7
|
+
@import "./effects.css";
|
|
6
8
|
@import "./recipes/progressive-blur.css";
|
|
7
9
|
@import "./recipes/scroll-area.css";
|
|
8
10
|
@import "./recipes/activity.css";
|
|
@@ -17,16 +19,17 @@
|
|
|
17
19
|
@import "./recipes/field-parts.css";
|
|
18
20
|
@import "./recipes/avatar.css";
|
|
19
21
|
@import "./recipes/badge.css";
|
|
22
|
+
@import "./recipes/breadcrumb.css";
|
|
20
23
|
@import "./recipes/track-highlight.css";
|
|
21
24
|
@import "./recipes/button-group.css";
|
|
22
25
|
@import "./recipes/calendar.css";
|
|
23
26
|
@import "./recipes/card.css";
|
|
24
|
-
@import "./recipes/chat-layout.css";
|
|
25
|
-
@import "./effects.css";
|
|
26
27
|
@import "./recipes/chat-message.css";
|
|
28
|
+
@import "./recipes/chat-message-social.css";
|
|
29
|
+
@import "./recipes/chat-layout.css";
|
|
30
|
+
@import "./recipes/spinner.css";
|
|
27
31
|
@import "./recipes/chat-composer.css";
|
|
28
32
|
@import "./chat-composer-editor.css";
|
|
29
|
-
@import "./recipes/spinner.css";
|
|
30
33
|
@import "./recipes/chat-composer-attachment.css";
|
|
31
34
|
@import "./recipes/choice.css";
|
|
32
35
|
@import "./code.css";
|
|
@@ -34,27 +37,31 @@
|
|
|
34
37
|
@import "./recipes/code-diff.css";
|
|
35
38
|
@import "./recipes/sidebar.css";
|
|
36
39
|
@import "./recipes/sidebar-menu.css";
|
|
40
|
+
@import "./recipes/sidebar-parts.css";
|
|
37
41
|
@import "./recipes/color-picker.css";
|
|
38
42
|
@import "./recipes/color-picker-details.css";
|
|
39
43
|
@import "./recipes/color-picker-values.css";
|
|
40
44
|
@import "./recipes/empty.css";
|
|
41
45
|
@import "./recipes/context.css";
|
|
42
46
|
@import "./recipes/popup-drawer.css";
|
|
43
|
-
@import "./recipes/
|
|
47
|
+
@import "./recipes/infinite-canvas.css";
|
|
48
|
+
@import "./recipes/resizable.css";
|
|
44
49
|
@import "./recipes/separator.css";
|
|
50
|
+
@import "./recipes/toolbar.css";
|
|
51
|
+
@import "./recipes/kbd.css";
|
|
52
|
+
@import "./recipes/dockable-panel.css";
|
|
45
53
|
@import "./recipes/item.css";
|
|
46
54
|
@import "./recipes/dropzone.css";
|
|
47
55
|
@import "./recipes/dynamic-notification.css";
|
|
48
56
|
@import "./recipes/dynamic-notification-input.css";
|
|
49
57
|
@import "./recipes/dynamic-notification-motion.css";
|
|
58
|
+
@import "./recipes/emoji-picker.css";
|
|
50
59
|
@import "./recipes/environment-variables.css";
|
|
51
|
-
@import "./recipes/
|
|
60
|
+
@import "./recipes/filter-bar.css";
|
|
52
61
|
@import "./recipes/gradient-editor.css";
|
|
53
|
-
@import "./recipes/infinite-canvas.css";
|
|
54
62
|
@import "./recipes/inline-attachment.css";
|
|
55
63
|
@import "./recipes/source-badge.css";
|
|
56
64
|
@import "./recipes/inline-citation.css";
|
|
57
|
-
@import "./recipes/kbd.css";
|
|
58
65
|
@import "./recipes/markdown.css";
|
|
59
66
|
@import "./recipes/markdown-block.css";
|
|
60
67
|
@import "./recipes/range.css";
|
|
@@ -73,7 +80,6 @@
|
|
|
73
80
|
@import "./recipes/thread-rail.css";
|
|
74
81
|
@import "./recipes/timeline.css";
|
|
75
82
|
@import "./recipes/popup-toast.css";
|
|
76
|
-
@import "./recipes/toolbar.css";
|
|
77
83
|
@import "./recipes/transcript-divider.css";
|
|
78
84
|
@import "./recipes/tree.css";
|
|
79
85
|
@import "./type-scale.css";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
@layer components {
|
|
2
2
|
:where([data-control-family="accordion"][data-slot="root"]) {
|
|
3
3
|
--cui-accordion-item-border-color: var(--border);
|
|
4
|
-
--cui-accordion-item-border-width:
|
|
4
|
+
--cui-accordion-item-border-width: var(--control-rim-width);
|
|
5
5
|
--cui-accordion-trigger-foreground: var(--foreground);
|
|
6
6
|
--cui-accordion-trigger-hover-foreground: oklch(from var(--foreground) l c h / 0.8);
|
|
7
7
|
--cui-accordion-icon-foreground: var(--muted-foreground);
|
|
@@ -19,18 +19,20 @@
|
|
|
19
19
|
padding-block: calc(var(--spacing) * 3);
|
|
20
20
|
color: var(--cui-accordion-trigger-foreground);
|
|
21
21
|
font-size: var(--text-body);
|
|
22
|
-
|
|
23
|
-
text-
|
|
22
|
+
text-align: start;
|
|
23
|
+
text-wrap: balance;
|
|
24
24
|
font-weight: var(--font-weight-medium);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
@media (hover: hover) {
|
|
28
|
+
:where([data-control-family="accordion"][data-slot="trigger"]:not([data-disabled]):hover) {
|
|
29
|
+
color: var(--cui-accordion-trigger-hover-foreground);
|
|
30
|
+
}
|
|
29
31
|
}
|
|
30
32
|
|
|
31
33
|
:where([data-control-family="accordion"][data-slot="trigger"][data-disabled]) {
|
|
32
34
|
cursor: not-allowed;
|
|
33
|
-
opacity:
|
|
35
|
+
opacity: var(--disabled-opacity);
|
|
34
36
|
}
|
|
35
37
|
|
|
36
38
|
:where([data-control-family="accordion"][data-slot="icon"]) {
|
|
@@ -51,6 +53,7 @@
|
|
|
51
53
|
:where([data-control-family="accordion"][data-slot="panel"]) {
|
|
52
54
|
color: var(--muted-foreground);
|
|
53
55
|
font-size: var(--text-body);
|
|
56
|
+
text-wrap: pretty;
|
|
54
57
|
height: var(--accordion-panel-height);
|
|
55
58
|
overflow: hidden;
|
|
56
59
|
transition: height var(--duration-base) var(--ease-emphasized);
|
|
@@ -24,21 +24,6 @@
|
|
|
24
24
|
:where([data-control-family="chat-layout"][data-slot="turn"]:focus-within [data-control-family="action-bar"][data-slot="root"]) {
|
|
25
25
|
opacity: var(--cui-action-bar-visible-opacity);
|
|
26
26
|
}
|
|
27
|
-
|
|
28
|
-
@media (pointer: coarse) {
|
|
29
|
-
:where([data-control-family="action-bar"][data-slot="root"] [data-control-family="button"]) {
|
|
30
|
-
position: relative;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
:where([data-control-family="action-bar"][data-slot="root"] [data-control-family="button"])::after {
|
|
34
|
-
content: "";
|
|
35
|
-
position: absolute;
|
|
36
|
-
inset: 50% 50%;
|
|
37
|
-
translate: -50% -50%;
|
|
38
|
-
inline-size: 100%;
|
|
39
|
-
block-size: max(100%, 44px);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
27
|
}
|
|
43
28
|
|
|
44
29
|
@property --cui-action-bar-hidden-opacity {
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
:where([data-control-family="activity"][data-slot="root"][data-activity-state="running"] [data-slot="icon"][data-status-icon] svg) {
|
|
68
|
-
animation:
|
|
68
|
+
animation: cui-spin var(--duration-loop) linear infinite;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
:where([data-control-family="activity"][data-slot="root"][data-activity-state="error"] [data-slot="icon"]) {
|
|
@@ -117,20 +117,14 @@
|
|
|
117
117
|
:where([data-control-family="activity"][data-slot="trigger"])::after {
|
|
118
118
|
content: "";
|
|
119
119
|
position: absolute;
|
|
120
|
-
inset:
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
block-size: max(100%,
|
|
120
|
+
inset-inline: 0;
|
|
121
|
+
inset-block-start: 50%;
|
|
122
|
+
translate: 0 -50%;
|
|
123
|
+
block-size: max(100%, var(--touch-target));
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
-
@keyframes activity-spin {
|
|
129
|
-
to {
|
|
130
|
-
rotate: 360deg;
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
|
|
134
128
|
@property --cui-activity-row-foreground {
|
|
135
129
|
syntax: "<color>";
|
|
136
130
|
inherits: true;
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
--cui-alert-shadow: none;
|
|
7
7
|
--cui-alert-foreground: var(--card-foreground);
|
|
8
8
|
--cui-alert-description-foreground: var(--muted-foreground);
|
|
9
|
-
--cui-alert-border-width:
|
|
9
|
+
--cui-alert-border-width: var(--control-rim-width);
|
|
10
10
|
--cui-alert-padding: calc(var(--spacing) * 3);
|
|
11
11
|
--cui-alert-padding-inline: calc(var(--spacing) * 4);
|
|
12
12
|
--cui-alert-gap: calc(var(--spacing) * 0.5);
|
|
13
13
|
--cui-alert-icon-gap: calc(var(--spacing) * 3);
|
|
14
14
|
--cui-alert-icon-size: calc(var(--spacing) * 4);
|
|
15
|
-
--cui-alert-font-size: var(--text-
|
|
15
|
+
--cui-alert-font-size: var(--text-body);
|
|
16
16
|
--cui-alert-title-font-weight: var(--font-weight-medium);
|
|
17
17
|
--cui-alert-description-gap: var(--spacing);
|
|
18
18
|
grid-template-columns: 0 minmax(0, 1fr);
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
box-shadow: var(--cui-alert-shadow);
|
|
25
25
|
color: var(--cui-alert-foreground);
|
|
26
26
|
font-size: var(--cui-alert-font-size);
|
|
27
|
-
line-height: var(--
|
|
27
|
+
line-height: var(--leading-normal);
|
|
28
28
|
overflow-wrap: anywhere;
|
|
29
29
|
}
|
|
30
30
|
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
gap: var(--cui-alert-description-gap);
|
|
44
44
|
color: var(--cui-alert-description-foreground);
|
|
45
45
|
font-size: var(--cui-alert-font-size);
|
|
46
|
-
line-height: var(--
|
|
46
|
+
line-height: var(--leading-normal);
|
|
47
47
|
text-wrap: pretty;
|
|
48
48
|
}
|
|
49
49
|
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
--cui-audio-recorder-foreground: var(--muted-foreground);
|
|
5
5
|
--cui-audio-recorder-recording-ring-color: oklch(from var(--destructive) l c h / 0.25);
|
|
6
6
|
--cui-audio-recorder-error-foreground: var(--destructive-text);
|
|
7
|
+
--cui-audio-recorder-meta-foreground: var(--muted-foreground);
|
|
7
8
|
min-block-size: calc(var(--spacing) * 8);
|
|
8
9
|
gap: calc(var(--spacing) * 2);
|
|
9
10
|
padding-inline-end: calc(var(--spacing) * 1);
|
|
@@ -36,7 +37,8 @@
|
|
|
36
37
|
--_audio-recorder-content-visible-scale: 100%;
|
|
37
38
|
opacity: 0;
|
|
38
39
|
filter: blur(var(--blur-xs));
|
|
39
|
-
|
|
40
|
+
--_audio-recorder-inline-sign: 1;
|
|
41
|
+
translate: calc(var(--spacing) * var(--_audio-recorder-inline-sign)) 0;
|
|
40
42
|
scale: var(--_audio-recorder-content-hidden-scale);
|
|
41
43
|
visibility: hidden;
|
|
42
44
|
transition-property: opacity, filter, translate, scale, visibility;
|
|
@@ -45,6 +47,10 @@
|
|
|
45
47
|
transition-behavior: allow-discrete;
|
|
46
48
|
}
|
|
47
49
|
|
|
50
|
+
:where([data-control-ui="audio-recorder"]:dir(rtl)) {
|
|
51
|
+
--_audio-recorder-inline-sign: -1;
|
|
52
|
+
}
|
|
53
|
+
|
|
48
54
|
:where([data-control-ui="audio-recorder"]:is([data-slot="cancel"], [data-slot="submit"])) {
|
|
49
55
|
--_audio-recorder-content-hidden-scale: 95%;
|
|
50
56
|
}
|
|
@@ -62,7 +68,7 @@
|
|
|
62
68
|
}
|
|
63
69
|
|
|
64
70
|
:where([data-control-ui="audio-recorder"]:is([data-slot="status"], [data-slot="duration"])) {
|
|
65
|
-
color: var(--
|
|
71
|
+
color: var(--cui-audio-recorder-meta-foreground);
|
|
66
72
|
font-size: var(--text-caption);
|
|
67
73
|
}
|
|
68
74
|
|
|
@@ -72,7 +78,7 @@
|
|
|
72
78
|
|
|
73
79
|
:where([data-control-ui="audio-recorder"][data-slot="duration"]) {
|
|
74
80
|
inline-size: calc(var(--spacing) * 10);
|
|
75
|
-
text-align:
|
|
81
|
+
text-align: end;
|
|
76
82
|
font-variant-numeric: tabular-nums;
|
|
77
83
|
}
|
|
78
84
|
}
|
|
@@ -100,3 +106,9 @@
|
|
|
100
106
|
inherits: true;
|
|
101
107
|
initial-value: transparent;
|
|
102
108
|
}
|
|
109
|
+
|
|
110
|
+
@property --cui-audio-recorder-meta-foreground {
|
|
111
|
+
syntax: "<color>";
|
|
112
|
+
inherits: true;
|
|
113
|
+
initial-value: transparent;
|
|
114
|
+
}
|
|
@@ -5,6 +5,11 @@
|
|
|
5
5
|
--cui-audio-visualizer-bar-radius: var(--radius-control);
|
|
6
6
|
--cui-audio-visualizer-line-fill: oklch(from var(--primary) l c h / 0.18);
|
|
7
7
|
--cui-audio-visualizer-line-stroke: oklch(from var(--primary) l c h / 0.8);
|
|
8
|
+
--cui-audio-visualizer-baseline-stroke: oklch(from var(--border) l c h / 0.55);
|
|
9
|
+
--_audio-visualizer-inline-sign: 1;
|
|
10
|
+
}
|
|
11
|
+
:where([data-control-family="audio-visualizer"][data-variant]:dir(rtl)) {
|
|
12
|
+
--_audio-visualizer-inline-sign: -1;
|
|
8
13
|
}
|
|
9
14
|
:where([data-control-family="audio-visualizer"][data-slot="root"][data-variant]) {
|
|
10
15
|
block-size: calc(var(--spacing) * 7);
|
|
@@ -42,7 +47,7 @@
|
|
|
42
47
|
opacity: 0;
|
|
43
48
|
--_audio-visualizer-bar-track-filter: blur(var(--blur-xs));
|
|
44
49
|
filter: var(--_audio-visualizer-bar-track-filter);
|
|
45
|
-
translate: var(--spacing) 0;
|
|
50
|
+
translate: calc(var(--spacing) * var(--_audio-visualizer-inline-sign)) 0;
|
|
46
51
|
}
|
|
47
52
|
}
|
|
48
53
|
|
|
@@ -56,7 +61,7 @@
|
|
|
56
61
|
}
|
|
57
62
|
|
|
58
63
|
:where([data-control-family="audio-visualizer"][data-slot="baseline"]) {
|
|
59
|
-
stroke:
|
|
64
|
+
stroke: var(--cui-audio-visualizer-baseline-stroke);
|
|
60
65
|
}
|
|
61
66
|
|
|
62
67
|
:where([data-control-family="audio-visualizer"][data-slot="waveform"]) {
|
|
@@ -95,3 +100,9 @@
|
|
|
95
100
|
inherits: true;
|
|
96
101
|
initial-value: transparent;
|
|
97
102
|
}
|
|
103
|
+
|
|
104
|
+
@property --cui-audio-visualizer-baseline-stroke {
|
|
105
|
+
syntax: "<color>";
|
|
106
|
+
inherits: true;
|
|
107
|
+
initial-value: transparent;
|
|
108
|
+
}
|