@ctrl-ui/react 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +70 -0
- package/dist/action-bar.d.ts +44 -0
- package/dist/action-bar.js +89 -0
- package/dist/activity.d.ts +53 -0
- package/dist/activity.js +188 -0
- package/dist/audio-recorder.d.ts +32 -0
- package/dist/audio-recorder.js +235 -0
- package/dist/audio-visualizer.d.ts +12 -0
- package/dist/audio-visualizer.js +58 -0
- package/dist/blocks/chat.d.ts +10 -0
- package/dist/blocks/chat.js +12 -0
- package/dist/blocks/coding-agent.d.ts +61 -0
- package/dist/blocks/coding-agent.js +255 -0
- package/dist/blocks/file-explorer-data.d.ts +57 -0
- package/dist/blocks/file-explorer-data.js +74 -0
- package/dist/blocks/file-explorer.d.ts +24 -0
- package/dist/blocks/file-explorer.js +427 -0
- package/dist/blocks/settings-data.d.ts +36 -0
- package/dist/blocks/settings-data.js +66 -0
- package/dist/blocks/settings.d.ts +19 -0
- package/dist/blocks/settings.js +282 -0
- package/dist/blocks/theme-toggle.d.ts +43 -0
- package/dist/blocks/theme-toggle.js +180 -0
- package/dist/chat-composer-attachment.d.ts +55 -0
- package/dist/chat-composer-attachment.js +267 -0
- package/dist/chat-composer-editor/extensions/mention.d.ts +14 -0
- package/dist/chat-composer-editor/extensions/mention.js +278 -0
- package/dist/chat-composer-editor/ghost.d.ts +5 -0
- package/dist/chat-composer-editor/ghost.js +55 -0
- package/dist/chat-composer-editor/schema.d.ts +6 -0
- package/dist/chat-composer-editor/schema.js +25 -0
- package/dist/chat-composer-editor/serialize.d.ts +6 -0
- package/dist/chat-composer-editor/serialize.js +16 -0
- package/dist/chat-composer-editor/types.d.ts +29 -0
- package/dist/chat-composer-editor/types.js +0 -0
- package/dist/chat-composer-editor.d.ts +9 -0
- package/dist/chat-composer-editor.js +154 -0
- package/dist/chat-composer.d.ts +60 -0
- package/dist/chat-composer.js +134 -0
- package/dist/chat-layout.d.ts +27 -0
- package/dist/chat-layout.js +114 -0
- package/dist/chat-message.d.ts +31 -0
- package/dist/chat-message.js +95 -0
- package/dist/code-block-editor.d.ts +59 -0
- package/dist/code-block-editor.js +250 -0
- package/dist/context-model.d.ts +33 -0
- package/dist/context-model.js +52 -0
- package/dist/context.d.ts +47 -0
- package/dist/context.js +335 -0
- package/dist/control-props.d.ts +28 -0
- package/dist/control-props.js +4 -0
- package/dist/control-variants.d.ts +8 -0
- package/dist/control-variants.js +14 -0
- package/dist/dynamic-notification-glass.d.ts +10 -0
- package/dist/dynamic-notification-glass.js +311 -0
- package/dist/dynamic-notification-liquid.d.ts +24 -0
- package/dist/dynamic-notification-liquid.js +682 -0
- package/dist/dynamic-notification-siri-wave.d.ts +4 -0
- package/dist/dynamic-notification-siri-wave.js +82 -0
- package/dist/dynamic-notification.d.ts +74 -0
- package/dist/dynamic-notification.js +342 -0
- package/dist/environment-variables.d.ts +124 -0
- package/dist/environment-variables.js +492 -0
- package/dist/extensions/create-track-highlight.d.ts +12 -0
- package/dist/extensions/create-track-highlight.js +147 -0
- package/dist/extensions/track-highlight.d.ts +22 -0
- package/dist/extensions/track-highlight.js +52 -0
- package/dist/hooks/use-audio-recorder.d.ts +107 -0
- package/dist/hooks/use-audio-recorder.js +577 -0
- package/dist/hooks/use-chat-composer.d.ts +56 -0
- package/dist/hooks/use-chat-composer.js +63 -0
- package/dist/hooks/use-chat-message.d.ts +28 -0
- package/dist/hooks/use-chat-message.js +24 -0
- package/dist/hooks/use-color-area.d.ts +18 -0
- package/dist/hooks/use-color-area.js +60 -0
- package/dist/hooks/use-copy-to-clipboard.d.ts +22 -0
- package/dist/hooks/use-copy-to-clipboard.js +90 -0
- package/dist/hooks/use-dropzone.d.ts +59 -0
- package/dist/hooks/use-dropzone.js +372 -0
- package/dist/hooks/use-dynamic-notification.d.ts +37 -0
- package/dist/hooks/use-dynamic-notification.js +87 -0
- package/dist/hooks/use-environment-variables.d.ts +51 -0
- package/dist/hooks/use-environment-variables.js +188 -0
- package/dist/hooks/use-mobile.d.ts +5 -0
- package/dist/hooks/use-mobile.js +29 -0
- package/dist/hooks/use-textarea-trigger-menu.d.ts +8 -0
- package/dist/hooks/use-textarea-trigger-menu.js +69 -0
- package/dist/hooks/use-trigger-menu.d.ts +49 -0
- package/dist/hooks/use-trigger-menu.js +102 -0
- package/dist/hooks/use-user-ask.d.ts +48 -0
- package/dist/hooks/use-user-ask.js +167 -0
- package/dist/inline-attachment.d.ts +37 -0
- package/dist/inline-attachment.js +192 -0
- package/dist/inline-citation.d.ts +56 -0
- package/dist/inline-citation.js +319 -0
- package/dist/knob-contracts/accordion-knobs.d.ts +5 -0
- package/dist/knob-contracts/accordion-knobs.js +9 -0
- package/dist/knob-contracts/action-bar-knobs.d.ts +5 -0
- package/dist/knob-contracts/action-bar-knobs.js +4 -0
- package/dist/knob-contracts/activity-knobs.d.ts +5 -0
- package/dist/knob-contracts/activity-knobs.js +9 -0
- package/dist/knob-contracts/alert-knobs.d.ts +5 -0
- package/dist/knob-contracts/alert-knobs.js +9 -0
- package/dist/knob-contracts/audio-recorder-knobs.d.ts +5 -0
- package/dist/knob-contracts/audio-recorder-knobs.js +9 -0
- package/dist/knob-contracts/audio-visualizer-knobs.d.ts +5 -0
- package/dist/knob-contracts/audio-visualizer-knobs.js +9 -0
- package/dist/knob-contracts/avatar-knobs.d.ts +5 -0
- package/dist/knob-contracts/avatar-knobs.js +9 -0
- package/dist/knob-contracts/badge-knobs.d.ts +5 -0
- package/dist/knob-contracts/badge-knobs.js +9 -0
- package/dist/knob-contracts/button-group-knobs.d.ts +5 -0
- package/dist/knob-contracts/button-group-knobs.js +9 -0
- package/dist/knob-contracts/button-knobs.d.ts +5 -0
- package/dist/knob-contracts/button-knobs.js +25 -0
- package/dist/knob-contracts/calendar-knobs.d.ts +5 -0
- package/dist/knob-contracts/calendar-knobs.js +10 -0
- package/dist/knob-contracts/card-knobs.d.ts +5 -0
- package/dist/knob-contracts/card-knobs.js +11 -0
- package/dist/knob-contracts/chat-composer-attachment-knobs.d.ts +5 -0
- package/dist/knob-contracts/chat-composer-attachment-knobs.js +11 -0
- package/dist/knob-contracts/chat-composer-knobs.d.ts +5 -0
- package/dist/knob-contracts/chat-composer-knobs.js +18 -0
- package/dist/knob-contracts/chat-layout-knobs.d.ts +5 -0
- package/dist/knob-contracts/chat-layout-knobs.js +11 -0
- package/dist/knob-contracts/chat-message-knobs.d.ts +5 -0
- package/dist/knob-contracts/chat-message-knobs.js +17 -0
- package/dist/knob-contracts/choice-knobs.d.ts +5 -0
- package/dist/knob-contracts/choice-knobs.js +9 -0
- package/dist/knob-contracts/code-block-editor-knobs.d.ts +5 -0
- package/dist/knob-contracts/code-block-editor-knobs.js +11 -0
- package/dist/knob-contracts/code-diff-knobs.d.ts +5 -0
- package/dist/knob-contracts/code-diff-knobs.js +18 -0
- package/dist/knob-contracts/code-knobs.d.ts +5 -0
- package/dist/knob-contracts/code-knobs.js +11 -0
- package/dist/knob-contracts/collapsible-knobs.d.ts +5 -0
- package/dist/knob-contracts/collapsible-knobs.js +4 -0
- package/dist/knob-contracts/color-picker-knobs.d.ts +5 -0
- package/dist/knob-contracts/color-picker-knobs.js +12 -0
- package/dist/knob-contracts/context-knobs.d.ts +5 -0
- package/dist/knob-contracts/context-knobs.js +13 -0
- package/dist/knob-contracts/dockable-panel-knobs.d.ts +5 -0
- package/dist/knob-contracts/dockable-panel-knobs.js +12 -0
- package/dist/knob-contracts/dropzone-knobs.d.ts +5 -0
- package/dist/knob-contracts/dropzone-knobs.js +11 -0
- package/dist/knob-contracts/dynamic-notification-knobs.d.ts +5 -0
- package/dist/knob-contracts/dynamic-notification-knobs.js +18 -0
- package/dist/knob-contracts/empty-knobs.d.ts +5 -0
- package/dist/knob-contracts/empty-knobs.js +12 -0
- package/dist/knob-contracts/environment-variables-knobs.d.ts +5 -0
- package/dist/knob-contracts/environment-variables-knobs.js +11 -0
- package/dist/knob-contracts/field-knobs.d.ts +5 -0
- package/dist/knob-contracts/field-knobs.js +16 -0
- package/dist/knob-contracts/gradient-editor-knobs.d.ts +5 -0
- package/dist/knob-contracts/gradient-editor-knobs.js +13 -0
- package/dist/knob-contracts/infinite-canvas-knobs.d.ts +5 -0
- package/dist/knob-contracts/infinite-canvas-knobs.js +13 -0
- package/dist/knob-contracts/inline-attachment-knobs.d.ts +5 -0
- package/dist/knob-contracts/inline-attachment-knobs.js +14 -0
- package/dist/knob-contracts/inline-citation-knobs.d.ts +5 -0
- package/dist/knob-contracts/inline-citation-knobs.js +14 -0
- package/dist/knob-contracts/item-knobs.d.ts +5 -0
- package/dist/knob-contracts/item-knobs.js +10 -0
- package/dist/knob-contracts/kbd-knobs.d.ts +5 -0
- package/dist/knob-contracts/kbd-knobs.js +10 -0
- package/dist/knob-contracts/markdown-block-knobs.d.ts +5 -0
- package/dist/knob-contracts/markdown-block-knobs.js +11 -0
- package/dist/knob-contracts/markdown-knobs.d.ts +5 -0
- package/dist/knob-contracts/markdown-knobs.js +14 -0
- package/dist/knob-contracts/morphing-panel-knobs.d.ts +5 -0
- package/dist/knob-contracts/morphing-panel-knobs.js +11 -0
- package/dist/knob-contracts/pagination-knobs.d.ts +5 -0
- package/dist/knob-contracts/pagination-knobs.js +10 -0
- package/dist/knob-contracts/phone-input-knobs.d.ts +5 -0
- package/dist/knob-contracts/phone-input-knobs.js +10 -0
- package/dist/knob-contracts/popup-knobs.d.ts +5 -0
- package/dist/knob-contracts/popup-knobs.js +21 -0
- package/dist/knob-contracts/range-knobs.d.ts +5 -0
- package/dist/knob-contracts/range-knobs.js +13 -0
- package/dist/knob-contracts/resizable-knobs.d.ts +5 -0
- package/dist/knob-contracts/resizable-knobs.js +14 -0
- package/dist/knob-contracts/rich-tooltip-knobs.d.ts +5 -0
- package/dist/knob-contracts/rich-tooltip-knobs.js +13 -0
- package/dist/knob-contracts/scroll-area-knobs.d.ts +5 -0
- package/dist/knob-contracts/scroll-area-knobs.js +8 -0
- package/dist/knob-contracts/separator-knobs.d.ts +5 -0
- package/dist/knob-contracts/separator-knobs.js +4 -0
- package/dist/knob-contracts/sidebar-knobs.d.ts +5 -0
- package/dist/knob-contracts/sidebar-knobs.js +26 -0
- package/dist/knob-contracts/skeleton-knobs.d.ts +5 -0
- package/dist/knob-contracts/skeleton-knobs.js +4 -0
- package/dist/knob-contracts/source-badge-knobs.d.ts +5 -0
- package/dist/knob-contracts/source-badge-knobs.js +11 -0
- package/dist/knob-contracts/spinner-knobs.d.ts +5 -0
- package/dist/knob-contracts/spinner-knobs.js +4 -0
- package/dist/knob-contracts/stepper-knobs.d.ts +5 -0
- package/dist/knob-contracts/stepper-knobs.js +11 -0
- package/dist/knob-contracts/switch-knobs.d.ts +5 -0
- package/dist/knob-contracts/switch-knobs.js +12 -0
- package/dist/knob-contracts/table-knobs.d.ts +5 -0
- package/dist/knob-contracts/table-knobs.js +12 -0
- package/dist/knob-contracts/table-of-contents-knobs.d.ts +5 -0
- package/dist/knob-contracts/table-of-contents-knobs.js +8 -0
- package/dist/knob-contracts/tabs-knobs.d.ts +5 -0
- package/dist/knob-contracts/tabs-knobs.js +16 -0
- package/dist/knob-contracts/task-list-knobs.d.ts +5 -0
- package/dist/knob-contracts/task-list-knobs.js +14 -0
- package/dist/knob-contracts/thread-rail-knobs.d.ts +5 -0
- package/dist/knob-contracts/thread-rail-knobs.js +14 -0
- package/dist/knob-contracts/timeline-knobs.d.ts +5 -0
- package/dist/knob-contracts/timeline-knobs.js +12 -0
- package/dist/knob-contracts/toolbar-knobs.d.ts +5 -0
- package/dist/knob-contracts/toolbar-knobs.js +20 -0
- package/dist/knob-contracts/track-highlight-knobs.d.ts +5 -0
- package/dist/knob-contracts/track-highlight-knobs.js +11 -0
- package/dist/knob-contracts/transcript-divider-knobs.d.ts +5 -0
- package/dist/knob-contracts/transcript-divider-knobs.js +10 -0
- package/dist/knob-contracts/tree-knobs.d.ts +5 -0
- package/dist/knob-contracts/tree-knobs.js +13 -0
- package/dist/knob-contracts/user-ask-knobs.d.ts +5 -0
- package/dist/knob-contracts/user-ask-knobs.js +17 -0
- package/dist/lib/cn.d.ts +5 -0
- package/dist/lib/cn.js +34 -0
- package/dist/lib/code-block-shiki.d.ts +9 -0
- package/dist/lib/code-block-shiki.js +6 -0
- package/dist/lib/code-tokens.d.ts +28 -0
- package/dist/lib/code-tokens.js +160 -0
- package/dist/lib/color.d.ts +72 -0
- package/dist/lib/color.js +490 -0
- package/dist/lib/contrast.d.ts +30 -0
- package/dist/lib/contrast.js +64 -0
- package/dist/lib/diff.d.ts +50 -0
- package/dist/lib/diff.js +315 -0
- package/dist/lib/dropzone-validation.d.ts +66 -0
- package/dist/lib/dropzone-validation.js +228 -0
- package/dist/lib/env-file.d.ts +28 -0
- package/dist/lib/env-file.js +218 -0
- package/dist/lib/format-audio-recorder-duration.d.ts +4 -0
- package/dist/lib/format-audio-recorder-duration.js +7 -0
- package/dist/lib/liquid-glass-optics.d.ts +4 -0
- package/dist/lib/liquid-glass-optics.js +96 -0
- package/dist/lib/phone-input-format.d.ts +6 -0
- package/dist/lib/phone-input-format.js +26 -0
- package/dist/lib/phone-number.d.ts +18 -0
- package/dist/lib/phone-number.js +28 -0
- package/dist/lib/trigger-detect.d.ts +15 -0
- package/dist/lib/trigger-detect.js +77 -0
- package/dist/markdown-block.d.ts +25 -0
- package/dist/markdown-block.js +77 -0
- package/dist/skin.config.d.ts +5 -0
- package/dist/skin.config.js +4 -0
- package/dist/skin.d.ts +69 -0
- package/dist/skin.js +62 -0
- package/dist/source-badge.d.ts +23 -0
- package/dist/source-badge.js +72 -0
- package/dist/styles/chat-composer-editor.css +44 -0
- package/dist/styles/code.css +57 -0
- package/dist/styles/effects.css +126 -0
- package/dist/styles/index.css +81 -0
- package/dist/styles/recipes/accordion.css +87 -0
- package/dist/styles/recipes/action-bar.css +19 -0
- package/dist/styles/recipes/activity.css +129 -0
- package/dist/styles/recipes/alert.css +75 -0
- package/dist/styles/recipes/audio-recorder.css +102 -0
- package/dist/styles/recipes/audio-visualizer.css +90 -0
- package/dist/styles/recipes/avatar.css +52 -0
- package/dist/styles/recipes/badge.css +110 -0
- package/dist/styles/recipes/button-group.css +64 -0
- package/dist/styles/recipes/button.css +305 -0
- package/dist/styles/recipes/calendar.css +152 -0
- package/dist/styles/recipes/card.css +93 -0
- package/dist/styles/recipes/chat-composer-attachment.css +177 -0
- package/dist/styles/recipes/chat-composer.css +195 -0
- package/dist/styles/recipes/chat-layout.css +108 -0
- package/dist/styles/recipes/chat-message.css +160 -0
- package/dist/styles/recipes/choice.css +108 -0
- package/dist/styles/recipes/code-block-editor.css +136 -0
- package/dist/styles/recipes/code-diff.css +256 -0
- package/dist/styles/recipes/code.css +136 -0
- package/dist/styles/recipes/collapsible.css +27 -0
- package/dist/styles/recipes/color-picker-details.css +61 -0
- package/dist/styles/recipes/color-picker-values.css +117 -0
- package/dist/styles/recipes/color-picker.css +158 -0
- package/dist/styles/recipes/context.css +237 -0
- package/dist/styles/recipes/dockable-panel.css +106 -0
- package/dist/styles/recipes/dropzone.css +149 -0
- package/dist/styles/recipes/dynamic-notification-input.css +29 -0
- package/dist/styles/recipes/dynamic-notification-motion.css +298 -0
- package/dist/styles/recipes/dynamic-notification.css +241 -0
- package/dist/styles/recipes/empty.css +96 -0
- package/dist/styles/recipes/environment-variables.css +173 -0
- package/dist/styles/recipes/field-parts.css +148 -0
- package/dist/styles/recipes/field.css +234 -0
- package/dist/styles/recipes/gradient-editor.css +109 -0
- package/dist/styles/recipes/infinite-canvas.css +78 -0
- package/dist/styles/recipes/inline-attachment.css +182 -0
- package/dist/styles/recipes/inline-citation.css +174 -0
- package/dist/styles/recipes/item.css +107 -0
- package/dist/styles/recipes/kbd.css +55 -0
- package/dist/styles/recipes/markdown-block.css +75 -0
- package/dist/styles/recipes/markdown.css +204 -0
- package/dist/styles/recipes/morphing-panel.css +123 -0
- package/dist/styles/recipes/pagination.css +86 -0
- package/dist/styles/recipes/phone-input.css +105 -0
- package/dist/styles/recipes/popup-controls.css +59 -0
- package/dist/styles/recipes/popup-drawer.css +162 -0
- package/dist/styles/recipes/popup-lists.css +198 -0
- package/dist/styles/recipes/popup-motion.css +94 -0
- package/dist/styles/recipes/popup-toast.css +126 -0
- package/dist/styles/recipes/popup.css +396 -0
- package/dist/styles/recipes/range.css +259 -0
- package/dist/styles/recipes/resizable.css +170 -0
- package/dist/styles/recipes/rich-tooltip.css +272 -0
- package/dist/styles/recipes/scroll-area.css +59 -0
- package/dist/styles/recipes/separator.css +12 -0
- package/dist/styles/recipes/sidebar.css +345 -0
- package/dist/styles/recipes/skeleton.css +23 -0
- package/dist/styles/recipes/source-badge.css +77 -0
- package/dist/styles/recipes/spinner.css +33 -0
- package/dist/styles/recipes/stepper.css +178 -0
- package/dist/styles/recipes/switch.css +149 -0
- package/dist/styles/recipes/table-of-contents.css +107 -0
- package/dist/styles/recipes/table.css +124 -0
- package/dist/styles/recipes/tabs.css +235 -0
- package/dist/styles/recipes/task-list.css +146 -0
- package/dist/styles/recipes/thread-rail.css +247 -0
- package/dist/styles/recipes/timeline.css +107 -0
- package/dist/styles/recipes/toolbar.css +260 -0
- package/dist/styles/recipes/track-highlight.css +73 -0
- package/dist/styles/recipes/transcript-divider.css +64 -0
- package/dist/styles/recipes/tree.css +137 -0
- package/dist/styles/recipes/user-ask-details.css +45 -0
- package/dist/styles/recipes/user-ask.css +204 -0
- package/dist/styles/skin-theme.css +137 -0
- package/dist/styles/skin.css +143 -0
- package/dist/styles/theme.css +628 -0
- package/dist/styles/type-scale.css +45 -0
- package/dist/surface-variants.d.ts +6 -0
- package/dist/surface-variants.js +16 -0
- package/dist/task-list.d.ts +34 -0
- package/dist/task-list.js +177 -0
- package/dist/thread-rail.d.ts +52 -0
- package/dist/thread-rail.js +190 -0
- package/dist/transcript-divider.d.ts +15 -0
- package/dist/transcript-divider.js +25 -0
- package/dist/ui/accordion.d.ts +31 -0
- package/dist/ui/accordion.js +60 -0
- package/dist/ui/alert-dialog.d.ts +36 -0
- package/dist/ui/alert-dialog.js +100 -0
- package/dist/ui/alert.d.ts +21 -0
- package/dist/ui/alert.js +36 -0
- package/dist/ui/aspect-ratio.d.ts +8 -0
- package/dist/ui/aspect-ratio.js +17 -0
- package/dist/ui/autocomplete.d.ts +70 -0
- package/dist/ui/autocomplete.js +150 -0
- package/dist/ui/avatar.d.ts +24 -0
- package/dist/ui/avatar.js +44 -0
- package/dist/ui/badge.d.ts +20 -0
- package/dist/ui/badge.js +36 -0
- package/dist/ui/button-group.d.ts +24 -0
- package/dist/ui/button-group.js +45 -0
- package/dist/ui/button.d.ts +36 -0
- package/dist/ui/button.js +104 -0
- package/dist/ui/calendar.d.ts +11 -0
- package/dist/ui/calendar.js +160 -0
- package/dist/ui/card.d.ts +36 -0
- package/dist/ui/card.js +70 -0
- package/dist/ui/checkbox-group.d.ts +11 -0
- package/dist/ui/checkbox-group.js +16 -0
- package/dist/ui/checkbox.d.ts +23 -0
- package/dist/ui/checkbox.js +58 -0
- package/dist/ui/code-diff.d.ts +28 -0
- package/dist/ui/code-diff.js +561 -0
- package/dist/ui/code.d.ts +62 -0
- package/dist/ui/code.js +292 -0
- package/dist/ui/collapsible.d.ts +31 -0
- package/dist/ui/collapsible.js +72 -0
- package/dist/ui/color-picker.d.ts +137 -0
- package/dist/ui/color-picker.js +797 -0
- package/dist/ui/combobox-disabled-selection.d.ts +5 -0
- package/dist/ui/combobox-disabled-selection.js +11 -0
- package/dist/ui/combobox.d.ts +70 -0
- package/dist/ui/combobox.js +194 -0
- package/dist/ui/command.d.ts +44 -0
- package/dist/ui/command.js +166 -0
- package/dist/ui/context-menu.d.ts +86 -0
- package/dist/ui/context-menu.js +202 -0
- package/dist/ui/dialog.d.ts +38 -0
- package/dist/ui/dialog.js +124 -0
- package/dist/ui/dockable-panel-geometry.d.ts +18 -0
- package/dist/ui/dockable-panel-geometry.js +17 -0
- package/dist/ui/dockable-panel.d.ts +58 -0
- package/dist/ui/dockable-panel.js +366 -0
- package/dist/ui/drawer.d.ts +42 -0
- package/dist/ui/drawer.js +182 -0
- package/dist/ui/dropdown-menu.d.ts +46 -0
- package/dist/ui/dropdown-menu.js +89 -0
- package/dist/ui/dropzone.d.ts +66 -0
- package/dist/ui/dropzone.js +311 -0
- package/dist/ui/empty.d.ts +28 -0
- package/dist/ui/empty.js +59 -0
- package/dist/ui/field.d.ts +64 -0
- package/dist/ui/field.js +166 -0
- package/dist/ui/form.d.ts +10 -0
- package/dist/ui/form.js +17 -0
- package/dist/ui/gradient-editor.d.ts +47 -0
- package/dist/ui/gradient-editor.js +301 -0
- package/dist/ui/hover-card.d.ts +25 -0
- package/dist/ui/hover-card.js +46 -0
- package/dist/ui/infinite-canvas.d.ts +40 -0
- package/dist/ui/infinite-canvas.js +278 -0
- package/dist/ui/input-group.d.ts +21 -0
- package/dist/ui/input-group.js +44 -0
- package/dist/ui/input-otp.d.ts +38 -0
- package/dist/ui/input-otp.js +45 -0
- package/dist/ui/input.d.ts +12 -0
- package/dist/ui/input.js +18 -0
- package/dist/ui/item.d.ts +46 -0
- package/dist/ui/item.js +110 -0
- package/dist/ui/kbd.d.ts +12 -0
- package/dist/ui/kbd.js +23 -0
- package/dist/ui/markdown-elements.d.ts +52 -0
- package/dist/ui/markdown-elements.js +211 -0
- package/dist/ui/markdown.d.ts +14 -0
- package/dist/ui/markdown.js +31 -0
- package/dist/ui/menubar.d.ts +74 -0
- package/dist/ui/menubar.js +162 -0
- package/dist/ui/meter.d.ts +34 -0
- package/dist/ui/meter.js +57 -0
- package/dist/ui/morphing-panel.d.ts +24 -0
- package/dist/ui/morphing-panel.js +87 -0
- package/dist/ui/native-select.d.ts +12 -0
- package/dist/ui/native-select.js +41 -0
- package/dist/ui/navigation-menu.d.ts +51 -0
- package/dist/ui/navigation-menu.js +135 -0
- package/dist/ui/number-field.d.ts +72 -0
- package/dist/ui/number-field.js +124 -0
- package/dist/ui/pagination.d.ts +26 -0
- package/dist/ui/pagination.js +77 -0
- package/dist/ui/phone-input.d.ts +30 -0
- package/dist/ui/phone-input.js +263 -0
- package/dist/ui/popover.d.ts +34 -0
- package/dist/ui/popover.js +87 -0
- package/dist/ui/progress.d.ts +34 -0
- package/dist/ui/progress.js +57 -0
- package/dist/ui/radio-group.d.ts +29 -0
- package/dist/ui/radio-group.js +37 -0
- package/dist/ui/resizable.d.ts +56 -0
- package/dist/ui/resizable.js +82 -0
- package/dist/ui/responsive-dialog.d.ts +18 -0
- package/dist/ui/responsive-dialog.js +121 -0
- package/dist/ui/rich-tooltip-tour.d.ts +12 -0
- package/dist/ui/rich-tooltip-tour.js +20 -0
- package/dist/ui/rich-tooltip.d.ts +83 -0
- package/dist/ui/rich-tooltip.js +331 -0
- package/dist/ui/scroll-area.d.ts +25 -0
- package/dist/ui/scroll-area.js +93 -0
- package/dist/ui/select.d.ts +44 -0
- package/dist/ui/select.js +124 -0
- package/dist/ui/separator.d.ts +9 -0
- package/dist/ui/separator.js +16 -0
- package/dist/ui/sheet.d.ts +25 -0
- package/dist/ui/sheet.js +76 -0
- package/dist/ui/sidebar.d.ts +88 -0
- package/dist/ui/sidebar.js +362 -0
- package/dist/ui/skeleton.d.ts +8 -0
- package/dist/ui/skeleton.js +13 -0
- package/dist/ui/slider.d.ts +24 -0
- package/dist/ui/slider.js +114 -0
- package/dist/ui/spinner.d.ts +12 -0
- package/dist/ui/spinner.js +26 -0
- package/dist/ui/stepper.d.ts +58 -0
- package/dist/ui/stepper.js +232 -0
- package/dist/ui/switch.d.ts +26 -0
- package/dist/ui/switch.js +71 -0
- package/dist/ui/table-of-contents.d.ts +22 -0
- package/dist/ui/table-of-contents.js +181 -0
- package/dist/ui/table.d.ts +37 -0
- package/dist/ui/table.js +83 -0
- package/dist/ui/tabs.d.ts +36 -0
- package/dist/ui/tabs.js +127 -0
- package/dist/ui/textarea.d.ts +9 -0
- package/dist/ui/textarea.js +16 -0
- package/dist/ui/timeline.d.ts +40 -0
- package/dist/ui/timeline.js +80 -0
- package/dist/ui/toast.d.ts +28 -0
- package/dist/ui/toast.js +132 -0
- package/dist/ui/toggle.d.ts +20 -0
- package/dist/ui/toggle.js +71 -0
- package/dist/ui/toolbar.d.ts +40 -0
- package/dist/ui/toolbar.js +72 -0
- package/dist/ui/tooltip.d.ts +27 -0
- package/dist/ui/tooltip.js +93 -0
- package/dist/ui/tree.d.ts +56 -0
- package/dist/ui/tree.js +438 -0
- package/dist/ui/trigger-menu.d.ts +46 -0
- package/dist/ui/trigger-menu.js +116 -0
- package/dist/user-ask.d.ts +50 -0
- package/dist/user-ask.js +398 -0
- package/package.json +115 -0
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
//#region src/lib/env-file.ts
|
|
2
|
+
const ENV_FILE_MAX_SIZE = 65536;
|
|
3
|
+
const DUPLICATE_ENVIRONMENT_VARIABLE_MESSAGE = "Environment variable keys must be unique";
|
|
4
|
+
var DuplicateEnvironmentVariableKeyError = class extends Error {
|
|
5
|
+
key;
|
|
6
|
+
constructor(key) {
|
|
7
|
+
super(DUPLICATE_ENVIRONMENT_VARIABLE_MESSAGE);
|
|
8
|
+
this.key = key;
|
|
9
|
+
this.name = "DuplicateEnvironmentVariableKeyError";
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
function createEmptyEnvironmentVariableEntry() {
|
|
13
|
+
return {
|
|
14
|
+
key: "",
|
|
15
|
+
value: ""
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
function rowsFromEnvironmentVariables(envVars) {
|
|
19
|
+
const entries = Object.entries(envVars ?? {});
|
|
20
|
+
return entries.length > 0 ? entries.map(([key, value]) => ({
|
|
21
|
+
key,
|
|
22
|
+
value: String(value)
|
|
23
|
+
})) : [createEmptyEnvironmentVariableEntry()];
|
|
24
|
+
}
|
|
25
|
+
function getDuplicateEnvironmentVariableKeys(rows) {
|
|
26
|
+
const seen = /* @__PURE__ */ new Set();
|
|
27
|
+
const duplicates = /* @__PURE__ */ new Set();
|
|
28
|
+
for (const row of rows) {
|
|
29
|
+
const key = row.key.trim();
|
|
30
|
+
if (!key) continue;
|
|
31
|
+
if (seen.has(key)) duplicates.add(key);
|
|
32
|
+
else seen.add(key);
|
|
33
|
+
}
|
|
34
|
+
return duplicates;
|
|
35
|
+
}
|
|
36
|
+
function collectEnvironmentVariables(rows) {
|
|
37
|
+
const envVars = {};
|
|
38
|
+
const seen = /* @__PURE__ */ new Set();
|
|
39
|
+
for (const row of rows) {
|
|
40
|
+
const key = row.key.trim();
|
|
41
|
+
if (!key) continue;
|
|
42
|
+
if (seen.has(key)) throw new DuplicateEnvironmentVariableKeyError(key);
|
|
43
|
+
seen.add(key);
|
|
44
|
+
envVars[key] = row.value;
|
|
45
|
+
}
|
|
46
|
+
return envVars;
|
|
47
|
+
}
|
|
48
|
+
function parseEnvAssignment(line) {
|
|
49
|
+
const normalizedLine = line.trim();
|
|
50
|
+
if (!normalizedLine || normalizedLine.startsWith("#")) return void 0;
|
|
51
|
+
const stripped = normalizedLine.replace(/^export\s+/, "");
|
|
52
|
+
const equalsIndex = stripped.indexOf("=");
|
|
53
|
+
if (equalsIndex === -1) return void 0;
|
|
54
|
+
const key = stripped.slice(0, equalsIndex).trim();
|
|
55
|
+
if (!key) return void 0;
|
|
56
|
+
return {
|
|
57
|
+
key,
|
|
58
|
+
rawValue: stripped.slice(equalsIndex + 1)
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
function openingQuote(value) {
|
|
62
|
+
if (value.startsWith("\"")) return "\"";
|
|
63
|
+
if (value.startsWith("'")) return "'";
|
|
64
|
+
}
|
|
65
|
+
function parseUnquotedEnvValue(rawValue) {
|
|
66
|
+
const commentIndex = rawValue.indexOf(" #");
|
|
67
|
+
return (commentIndex === -1 ? rawValue : rawValue.slice(0, commentIndex)).trim();
|
|
68
|
+
}
|
|
69
|
+
function parseQuotedEnvValue(lines, lineIndex, value, quote) {
|
|
70
|
+
const closingIndex = findClosingQuoteIndex(value, quote, 1);
|
|
71
|
+
if (closingIndex !== -1) return {
|
|
72
|
+
value: unescapeQuotedValue(value.slice(1, closingIndex), quote),
|
|
73
|
+
nextLineIndex: lineIndex + 1
|
|
74
|
+
};
|
|
75
|
+
const parts = [value.slice(1)];
|
|
76
|
+
let nextLineIndex = lineIndex + 1;
|
|
77
|
+
while (nextLineIndex < lines.length) {
|
|
78
|
+
const nextLine = lines[nextLineIndex];
|
|
79
|
+
if (nextLine === void 0) break;
|
|
80
|
+
const endIndex = findClosingQuoteIndex(nextLine, quote);
|
|
81
|
+
if (endIndex !== -1) {
|
|
82
|
+
parts.push(nextLine.slice(0, endIndex));
|
|
83
|
+
nextLineIndex += 1;
|
|
84
|
+
break;
|
|
85
|
+
}
|
|
86
|
+
parts.push(nextLine);
|
|
87
|
+
nextLineIndex += 1;
|
|
88
|
+
}
|
|
89
|
+
return {
|
|
90
|
+
value: unescapeQuotedValue(parts.join("\n"), quote),
|
|
91
|
+
nextLineIndex
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
function parseEnvValue(lines, lineIndex, rawValue) {
|
|
95
|
+
const value = rawValue.trimStart();
|
|
96
|
+
const quote = openingQuote(value);
|
|
97
|
+
if (quote) return parseQuotedEnvValue(lines, lineIndex, value, quote);
|
|
98
|
+
return {
|
|
99
|
+
value: parseUnquotedEnvValue(rawValue),
|
|
100
|
+
nextLineIndex: lineIndex + 1
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
function parseEnvFileText(text) {
|
|
104
|
+
const results = [];
|
|
105
|
+
const lines = text.replace(/^\uFEFF/, "").split(/\r?\n/);
|
|
106
|
+
let lineIndex = 0;
|
|
107
|
+
while (lineIndex < lines.length) {
|
|
108
|
+
const currentLine = lines[lineIndex];
|
|
109
|
+
if (currentLine === void 0) break;
|
|
110
|
+
const assignment = parseEnvAssignment(currentLine);
|
|
111
|
+
if (!assignment) {
|
|
112
|
+
lineIndex++;
|
|
113
|
+
continue;
|
|
114
|
+
}
|
|
115
|
+
const parsedValue = parseEnvValue(lines, lineIndex, assignment.rawValue);
|
|
116
|
+
results.push({
|
|
117
|
+
key: assignment.key,
|
|
118
|
+
value: parsedValue.value
|
|
119
|
+
});
|
|
120
|
+
lineIndex = parsedValue.nextLineIndex;
|
|
121
|
+
}
|
|
122
|
+
return results;
|
|
123
|
+
}
|
|
124
|
+
function findClosingQuoteIndex(value, quote, startIndex = 0) {
|
|
125
|
+
for (let index = startIndex; index < value.length; index++) if (value[index] === quote && !isEscaped(value, index)) return index;
|
|
126
|
+
return -1;
|
|
127
|
+
}
|
|
128
|
+
function isEscaped(value, index) {
|
|
129
|
+
let slashCount = 0;
|
|
130
|
+
for (let cursor = index - 1; cursor >= 0 && value[cursor] === "\\"; cursor--) slashCount++;
|
|
131
|
+
return slashCount % 2 === 1;
|
|
132
|
+
}
|
|
133
|
+
const DOUBLE_QUOTED_CONTROL_ESCAPES = {
|
|
134
|
+
n: "\n",
|
|
135
|
+
r: "\r",
|
|
136
|
+
t: " "
|
|
137
|
+
};
|
|
138
|
+
function escapedQuotedCharacter(next, quote) {
|
|
139
|
+
if (next === quote || next === "\\") return next;
|
|
140
|
+
if (quote === "'") return void 0;
|
|
141
|
+
return DOUBLE_QUOTED_CONTROL_ESCAPES[next];
|
|
142
|
+
}
|
|
143
|
+
function unescapeQuotedValue(value, quote) {
|
|
144
|
+
let result = "";
|
|
145
|
+
for (let index = 0; index < value.length; index++) {
|
|
146
|
+
const current = value[index];
|
|
147
|
+
const next = value[index + 1];
|
|
148
|
+
if (current !== "\\" || next === void 0) {
|
|
149
|
+
result += current;
|
|
150
|
+
continue;
|
|
151
|
+
}
|
|
152
|
+
const unescaped = escapedQuotedCharacter(next, quote);
|
|
153
|
+
result += unescaped ?? current;
|
|
154
|
+
if (unescaped !== void 0) index++;
|
|
155
|
+
}
|
|
156
|
+
return result;
|
|
157
|
+
}
|
|
158
|
+
function escapeDoubleQuotedValue(value) {
|
|
159
|
+
return value.replace(/\\/g, "\\\\").replace(/"/g, "\\\"");
|
|
160
|
+
}
|
|
161
|
+
function shouldQuoteValue(value) {
|
|
162
|
+
return value.includes("\n") || value.includes("\r") || value.includes(" #") || /^\s|\s$/.test(value);
|
|
163
|
+
}
|
|
164
|
+
function rowsToEnvFileText(rows) {
|
|
165
|
+
const lines = [];
|
|
166
|
+
for (const row of rows) {
|
|
167
|
+
const key = row.key.trim();
|
|
168
|
+
if (!key) continue;
|
|
169
|
+
const value = row.value;
|
|
170
|
+
lines.push(shouldQuoteValue(value) ? `${key}="${escapeDoubleQuotedValue(value)}"` : `${key}=${value}`);
|
|
171
|
+
}
|
|
172
|
+
return lines.join("\n");
|
|
173
|
+
}
|
|
174
|
+
async function readEnvFile(file, options = {}) {
|
|
175
|
+
const maxSize = options.maxSize ?? 65536;
|
|
176
|
+
if (file.size > maxSize) return {
|
|
177
|
+
ok: false,
|
|
178
|
+
error: `File is too large (max ${Math.ceil(maxSize / 1024)} KB).`
|
|
179
|
+
};
|
|
180
|
+
let text;
|
|
181
|
+
try {
|
|
182
|
+
text = await readFileText(file);
|
|
183
|
+
} catch {
|
|
184
|
+
return {
|
|
185
|
+
ok: false,
|
|
186
|
+
error: "Could not read the selected file. Please try again."
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
if (text.includes("\0")) return {
|
|
190
|
+
ok: false,
|
|
191
|
+
error: "File appears to be binary. Please import a plain-text .env file."
|
|
192
|
+
};
|
|
193
|
+
const entries = parseEnvFileText(text);
|
|
194
|
+
if (entries.length === 0) return {
|
|
195
|
+
ok: false,
|
|
196
|
+
error: "No valid environment variables found in the file."
|
|
197
|
+
};
|
|
198
|
+
return {
|
|
199
|
+
ok: true,
|
|
200
|
+
entries
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
async function readFileText(file) {
|
|
204
|
+
if (typeof file.text === "function") try {
|
|
205
|
+
return await file.text();
|
|
206
|
+
} catch {}
|
|
207
|
+
return new Promise((resolve, reject) => {
|
|
208
|
+
const reader = new FileReader();
|
|
209
|
+
reader.onload = () => {
|
|
210
|
+
if (typeof reader.result === "string") resolve(reader.result);
|
|
211
|
+
else reject(/* @__PURE__ */ new Error("FileReader returned non-text content."));
|
|
212
|
+
};
|
|
213
|
+
reader.onerror = () => reject(reader.error ?? /* @__PURE__ */ new Error("FileReader failed."));
|
|
214
|
+
reader.readAsText(file);
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
//#endregion
|
|
218
|
+
export { DUPLICATE_ENVIRONMENT_VARIABLE_MESSAGE, DuplicateEnvironmentVariableKeyError, ENV_FILE_MAX_SIZE, collectEnvironmentVariables, createEmptyEnvironmentVariableEntry, getDuplicateEnvironmentVariableKeys, parseEnvFileText, readEnvFile, rowsFromEnvironmentVariables, rowsToEnvFileText };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
//#region src/lib/format-audio-recorder-duration.ts
|
|
2
|
+
function formatAudioRecorderDuration(durationMs) {
|
|
3
|
+
const totalSeconds = Math.max(0, Math.floor(durationMs / 1e3));
|
|
4
|
+
return `${Math.floor(totalSeconds / 60)}:${String(totalSeconds % 60).padStart(2, "0")}`;
|
|
5
|
+
}
|
|
6
|
+
//#endregion
|
|
7
|
+
export { formatAudioRecorderDuration };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
//#region src/lib/liquid-glass-optics.d.ts
|
|
2
|
+
declare const LIQUID_GLASS_OPTICS_GLSL = "\nconst float LIQUID_GLASS_REFRACTIVE_INDEX = 1.5;\n\nfloat liquidPLength(vec2 value, float exponent) {\n return pow(pow(value.x, exponent) + pow(value.y, exponent), 1.0 / exponent);\n}\n\nfloat liquidSurfaceSDF(vec2 point, vec2 halfSize, float cornerRadius, float cornerExponent) {\n float radius = min(cornerRadius, min(halfSize.x, halfSize.y));\n vec2 q = abs(point) - halfSize + vec2(radius);\n vec2 outside = max(q, vec2(0.0));\n float corner = liquidPLength(outside, cornerExponent);\n return min(max(q.x, q.y), 0.0) + corner - radius;\n}\n\nfloat liquidOpticalInsideDistance(\n vec2 point,\n vec2 halfSize,\n float cornerRadius,\n float cornerExponent\n) {\n return max(-liquidSurfaceSDF(point, halfSize, cornerRadius, cornerExponent), 0.0);\n}\n\nvec2 liquidInwardOpticalNormal(\n vec2 point,\n vec2 halfSize,\n float cornerRadius,\n float cornerExponent\n) {\n float epsilon = 0.35;\n vec2 gradient = vec2(\n liquidSurfaceSDF(point + vec2(epsilon, 0.0), halfSize, cornerRadius, cornerExponent)\n - liquidSurfaceSDF(point - vec2(epsilon, 0.0), halfSize, cornerRadius, cornerExponent),\n liquidSurfaceSDF(point + vec2(0.0, epsilon), halfSize, cornerRadius, cornerExponent)\n - liquidSurfaceSDF(point - vec2(0.0, epsilon), halfSize, cornerRadius, cornerExponent)\n );\n float gradientLength = length(gradient);\n if (gradientLength <= 0.0001) return vec2(0.0);\n return -gradient / gradientLength;\n}\n\nfloat liquidEdgeWidth(vec2 size, float edgeRatio, float edgeCap) {\n vec2 halfSize = size * 0.5;\n float requestedWidth = min(max(min(size.x, size.y) * edgeRatio, 18.0), edgeCap);\n return min(requestedWidth, max(min(halfSize.x, halfSize.y) - 1.0, 0.001));\n}\n\nfloat liquidEdgeLens(float opticalInside, float edgeWidth) {\n float edgeDistance = clamp(opticalInside / max(edgeWidth, 0.001), 0.0, 1.0);\n return pow(1.0 - edgeDistance, 1.35);\n}\n\nfloat liquidConvexSurfaceSlopeForExponent(float radialDistance, float exponent) {\n float profile = max(1.0 - pow(radialDistance, exponent), 0.0001);\n return pow(radialDistance, exponent - 1.0) * pow(profile, 1.0 / exponent - 1.0);\n}\n\nfloat liquidConvexSurfaceSlope(float opticalInside, float edgeWidth) {\n float edgeDistance = clamp(opticalInside / max(edgeWidth, 0.001), 0.0005, 0.9995);\n float radialDistance = 1.0 - edgeDistance;\n float squircleSlope = liquidConvexSurfaceSlopeForExponent(radialDistance, 4.0);\n float circularSlope = liquidConvexSurfaceSlopeForExponent(radialDistance, 2.0);\n return min(mix(squircleSlope, circularSlope, 0.55), 12.0);\n}\n\nvec3 liquidLensSurfaceNormal(vec2 inwardNormal, float opticalInside, float edgeWidth) {\n float slope = liquidConvexSurfaceSlope(opticalInside, edgeWidth);\n return normalize(vec3(-inwardNormal * slope, 1.0));\n}\n\nvec2 liquidRefractedOffset(\n vec2 inwardNormal,\n float opticalInside,\n float edgeWidth,\n float depthScale\n) {\n float edgeDistance = clamp(opticalInside / max(edgeWidth, 0.001), 0.0, 1.0);\n if (edgeDistance >= 1.0) return vec2(0.0);\n\n vec3 surfaceNormal = liquidLensSurfaceNormal(inwardNormal, opticalInside, edgeWidth);\n vec3 ray = refract(vec3(0.0, 0.0, -1.0), surfaceNormal, 1.0 / LIQUID_GLASS_REFRACTIVE_INDEX);\n vec2 snellOffset = ray.xy / max(-ray.z, 0.2) * edgeWidth * depthScale;\n\n float radialDistance = 1.0 - edgeDistance;\n float circularRoll = 1.0 - sqrt(max(1.0 - radialDistance * radialDistance, 0.0));\n vec2 rollOffset = inwardNormal * circularRoll * edgeWidth * 0.18;\n float interiorFade = 1.0 - smoothstep(0.82, 1.0, edgeDistance);\n vec2 offset = (snellOffset + rollOffset) * interiorFade;\n float maximumOffset = edgeWidth * 1.05;\n return offset * min(1.0, maximumOffset / max(length(offset), 0.0001));\n}\n";
|
|
3
|
+
//#endregion
|
|
4
|
+
export { LIQUID_GLASS_OPTICS_GLSL };
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
//#region src/lib/liquid-glass-optics.ts
|
|
2
|
+
const LIQUID_GLASS_OPTICS_GLSL = `
|
|
3
|
+
const float LIQUID_GLASS_REFRACTIVE_INDEX = 1.5;
|
|
4
|
+
|
|
5
|
+
float liquidPLength(vec2 value, float exponent) {
|
|
6
|
+
return pow(pow(value.x, exponent) + pow(value.y, exponent), 1.0 / exponent);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
float liquidSurfaceSDF(vec2 point, vec2 halfSize, float cornerRadius, float cornerExponent) {
|
|
10
|
+
float radius = min(cornerRadius, min(halfSize.x, halfSize.y));
|
|
11
|
+
vec2 q = abs(point) - halfSize + vec2(radius);
|
|
12
|
+
vec2 outside = max(q, vec2(0.0));
|
|
13
|
+
float corner = liquidPLength(outside, cornerExponent);
|
|
14
|
+
return min(max(q.x, q.y), 0.0) + corner - radius;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
float liquidOpticalInsideDistance(
|
|
18
|
+
vec2 point,
|
|
19
|
+
vec2 halfSize,
|
|
20
|
+
float cornerRadius,
|
|
21
|
+
float cornerExponent
|
|
22
|
+
) {
|
|
23
|
+
return max(-liquidSurfaceSDF(point, halfSize, cornerRadius, cornerExponent), 0.0);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
vec2 liquidInwardOpticalNormal(
|
|
27
|
+
vec2 point,
|
|
28
|
+
vec2 halfSize,
|
|
29
|
+
float cornerRadius,
|
|
30
|
+
float cornerExponent
|
|
31
|
+
) {
|
|
32
|
+
float epsilon = 0.35;
|
|
33
|
+
vec2 gradient = vec2(
|
|
34
|
+
liquidSurfaceSDF(point + vec2(epsilon, 0.0), halfSize, cornerRadius, cornerExponent)
|
|
35
|
+
- liquidSurfaceSDF(point - vec2(epsilon, 0.0), halfSize, cornerRadius, cornerExponent),
|
|
36
|
+
liquidSurfaceSDF(point + vec2(0.0, epsilon), halfSize, cornerRadius, cornerExponent)
|
|
37
|
+
- liquidSurfaceSDF(point - vec2(0.0, epsilon), halfSize, cornerRadius, cornerExponent)
|
|
38
|
+
);
|
|
39
|
+
float gradientLength = length(gradient);
|
|
40
|
+
if (gradientLength <= 0.0001) return vec2(0.0);
|
|
41
|
+
return -gradient / gradientLength;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
float liquidEdgeWidth(vec2 size, float edgeRatio, float edgeCap) {
|
|
45
|
+
vec2 halfSize = size * 0.5;
|
|
46
|
+
float requestedWidth = min(max(min(size.x, size.y) * edgeRatio, 18.0), edgeCap);
|
|
47
|
+
return min(requestedWidth, max(min(halfSize.x, halfSize.y) - 1.0, 0.001));
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
float liquidEdgeLens(float opticalInside, float edgeWidth) {
|
|
51
|
+
float edgeDistance = clamp(opticalInside / max(edgeWidth, 0.001), 0.0, 1.0);
|
|
52
|
+
return pow(1.0 - edgeDistance, 1.35);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
float liquidConvexSurfaceSlopeForExponent(float radialDistance, float exponent) {
|
|
56
|
+
float profile = max(1.0 - pow(radialDistance, exponent), 0.0001);
|
|
57
|
+
return pow(radialDistance, exponent - 1.0) * pow(profile, 1.0 / exponent - 1.0);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
float liquidConvexSurfaceSlope(float opticalInside, float edgeWidth) {
|
|
61
|
+
float edgeDistance = clamp(opticalInside / max(edgeWidth, 0.001), 0.0005, 0.9995);
|
|
62
|
+
float radialDistance = 1.0 - edgeDistance;
|
|
63
|
+
float squircleSlope = liquidConvexSurfaceSlopeForExponent(radialDistance, 4.0);
|
|
64
|
+
float circularSlope = liquidConvexSurfaceSlopeForExponent(radialDistance, 2.0);
|
|
65
|
+
return min(mix(squircleSlope, circularSlope, 0.55), 12.0);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
vec3 liquidLensSurfaceNormal(vec2 inwardNormal, float opticalInside, float edgeWidth) {
|
|
69
|
+
float slope = liquidConvexSurfaceSlope(opticalInside, edgeWidth);
|
|
70
|
+
return normalize(vec3(-inwardNormal * slope, 1.0));
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
vec2 liquidRefractedOffset(
|
|
74
|
+
vec2 inwardNormal,
|
|
75
|
+
float opticalInside,
|
|
76
|
+
float edgeWidth,
|
|
77
|
+
float depthScale
|
|
78
|
+
) {
|
|
79
|
+
float edgeDistance = clamp(opticalInside / max(edgeWidth, 0.001), 0.0, 1.0);
|
|
80
|
+
if (edgeDistance >= 1.0) return vec2(0.0);
|
|
81
|
+
|
|
82
|
+
vec3 surfaceNormal = liquidLensSurfaceNormal(inwardNormal, opticalInside, edgeWidth);
|
|
83
|
+
vec3 ray = refract(vec3(0.0, 0.0, -1.0), surfaceNormal, 1.0 / LIQUID_GLASS_REFRACTIVE_INDEX);
|
|
84
|
+
vec2 snellOffset = ray.xy / max(-ray.z, 0.2) * edgeWidth * depthScale;
|
|
85
|
+
|
|
86
|
+
float radialDistance = 1.0 - edgeDistance;
|
|
87
|
+
float circularRoll = 1.0 - sqrt(max(1.0 - radialDistance * radialDistance, 0.0));
|
|
88
|
+
vec2 rollOffset = inwardNormal * circularRoll * edgeWidth * 0.18;
|
|
89
|
+
float interiorFade = 1.0 - smoothstep(0.82, 1.0, edgeDistance);
|
|
90
|
+
vec2 offset = (snellOffset + rollOffset) * interiorFade;
|
|
91
|
+
float maximumOffset = edgeWidth * 1.05;
|
|
92
|
+
return offset * min(1.0, maximumOffset / max(length(offset), 0.0001));
|
|
93
|
+
}
|
|
94
|
+
`;
|
|
95
|
+
//#endregion
|
|
96
|
+
export { LIQUID_GLASS_OPTICS_GLSL };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Country, Value } from "react-phone-number-input/max";
|
|
2
|
+
//#region src/lib/phone-input-format.d.ts
|
|
3
|
+
declare function normalizePhoneInputText(value: string, country: Country | undefined): string;
|
|
4
|
+
declare function normalizePhoneInputValue(value: Value | undefined, country: Country | undefined): string | undefined;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { normalizePhoneInputText, normalizePhoneInputValue };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { AsYouType } from "libphonenumber-js/max";
|
|
2
|
+
import { getCountryCallingCode } from "react-phone-number-input/max";
|
|
3
|
+
//#region src/lib/phone-input-format.ts
|
|
4
|
+
function normalizePhoneInputText(value, country) {
|
|
5
|
+
if (!country) return value;
|
|
6
|
+
const callingCode = `+${getCountryCallingCode(country)}`;
|
|
7
|
+
if (!value.startsWith(callingCode)) return value;
|
|
8
|
+
const nationalDigits = value.slice(callingCode.length).replaceAll(/\D/g, "");
|
|
9
|
+
if (!nationalDigits) return value;
|
|
10
|
+
const nationalFormatter = new AsYouType(country);
|
|
11
|
+
nationalFormatter.input(nationalDigits);
|
|
12
|
+
const normalizedValue = nationalFormatter.getNumberValue();
|
|
13
|
+
return normalizedValue ? new AsYouType().input(normalizedValue) : value;
|
|
14
|
+
}
|
|
15
|
+
function normalizePhoneInputValue(value, country) {
|
|
16
|
+
if (!value || !country) return value;
|
|
17
|
+
const callingCode = `+${getCountryCallingCode(country)}`;
|
|
18
|
+
if (!value.startsWith(callingCode)) return value;
|
|
19
|
+
const nationalDigits = value.slice(callingCode.length);
|
|
20
|
+
if (!nationalDigits) return value;
|
|
21
|
+
const formatter = new AsYouType(country);
|
|
22
|
+
formatter.input(nationalDigits);
|
|
23
|
+
return formatter.getNumberValue();
|
|
24
|
+
}
|
|
25
|
+
//#endregion
|
|
26
|
+
export { normalizePhoneInputText, normalizePhoneInputValue };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
//#region src/lib/phone-number.d.ts
|
|
2
|
+
type PhoneNumberValidationMode = "possible" | "valid";
|
|
3
|
+
type PhoneNumberSchemaMessages = {
|
|
4
|
+
format?: string;
|
|
5
|
+
invalid?: string;
|
|
6
|
+
mobile?: string;
|
|
7
|
+
};
|
|
8
|
+
type PhoneNumberSchemaOptions = {
|
|
9
|
+
mode?: PhoneNumberValidationMode;
|
|
10
|
+
mobileOnly?: boolean;
|
|
11
|
+
messages?: PhoneNumberSchemaMessages;
|
|
12
|
+
};
|
|
13
|
+
declare function createPhoneNumberSchema({ mode, mobileOnly, messages }?: PhoneNumberSchemaOptions): import("zod").ZodPipe<import("zod").ZodE164, import("zod").ZodTransform<string, string>>;
|
|
14
|
+
declare const phoneNumberSchema: import("zod").ZodPipe<import("zod").ZodE164, import("zod").ZodTransform<string, string>>;
|
|
15
|
+
declare const possiblePhoneNumberSchema: import("zod").ZodPipe<import("zod").ZodE164, import("zod").ZodTransform<string, string>>;
|
|
16
|
+
declare const mobilePhoneNumberSchema: import("zod").ZodPipe<import("zod").ZodE164, import("zod").ZodTransform<string, string>>;
|
|
17
|
+
//#endregion
|
|
18
|
+
export { PhoneNumberSchemaMessages, PhoneNumberSchemaOptions, PhoneNumberValidationMode, createPhoneNumberSchema, mobilePhoneNumberSchema, phoneNumberSchema, possiblePhoneNumberSchema };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { isPossiblePhoneNumber, isValidPhoneNumber, parsePhoneNumber } from "react-phone-number-input/max";
|
|
2
|
+
import { e164 } from "zod";
|
|
3
|
+
//#region src/lib/phone-number.ts
|
|
4
|
+
const DEFAULT_MESSAGES = {
|
|
5
|
+
format: "Enter a phone number in international format.",
|
|
6
|
+
invalid: "Enter a valid phone number.",
|
|
7
|
+
mobile: "Enter a mobile phone number."
|
|
8
|
+
};
|
|
9
|
+
const MOBILE_TYPES = /* @__PURE__ */ new Set(["MOBILE", "FIXED_LINE_OR_MOBILE"]);
|
|
10
|
+
function isMobilePhoneNumber(value) {
|
|
11
|
+
try {
|
|
12
|
+
const type = parsePhoneNumber(value)?.getType();
|
|
13
|
+
return type ? MOBILE_TYPES.has(type) : false;
|
|
14
|
+
} catch {
|
|
15
|
+
return false;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
function createPhoneNumberSchema({ mode = "valid", mobileOnly = false, messages = {} } = {}) {
|
|
19
|
+
const isAccepted = mode === "possible" ? isPossiblePhoneNumber : isValidPhoneNumber;
|
|
20
|
+
let schema = e164(messages.format ?? DEFAULT_MESSAGES.format).refine(isAccepted, messages.invalid ?? DEFAULT_MESSAGES.invalid);
|
|
21
|
+
if (mobileOnly) schema = schema.refine(isMobilePhoneNumber, messages.mobile ?? DEFAULT_MESSAGES.mobile);
|
|
22
|
+
return schema.transform((value) => value);
|
|
23
|
+
}
|
|
24
|
+
const phoneNumberSchema = createPhoneNumberSchema();
|
|
25
|
+
const possiblePhoneNumberSchema = createPhoneNumberSchema({ mode: "possible" });
|
|
26
|
+
const mobilePhoneNumberSchema = createPhoneNumberSchema({ mobileOnly: true });
|
|
27
|
+
//#endregion
|
|
28
|
+
export { createPhoneNumberSchema, mobilePhoneNumberSchema, phoneNumberSchema, possiblePhoneNumberSchema };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
//#region src/lib/trigger-detect.d.ts
|
|
2
|
+
type TriggerMatch = {
|
|
3
|
+
/** trigger character that opened menu (e.g. "/" or "@"). */
|
|
4
|
+
char: string;
|
|
5
|
+
/** Text typed after trigger char, up to caret (never contains whitespace). */
|
|
6
|
+
query: string;
|
|
7
|
+
/** Offset of trigger char in scanned text; token spans [start, end). */
|
|
8
|
+
start: number;
|
|
9
|
+
/** Offset of caret in scanned text (exclusive end of trigger token). */
|
|
10
|
+
end: number;
|
|
11
|
+
};
|
|
12
|
+
declare function detectTrigger(textBeforeCaret: string, triggerChars: readonly string[]): TriggerMatch | null;
|
|
13
|
+
declare function caretRectInTextarea(element: HTMLTextAreaElement, offset: number): DOMRect;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { TriggerMatch, caretRectInTextarea, detectTrigger };
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
//#region src/lib/trigger-detect.ts
|
|
2
|
+
const WHITESPACE = /* @__PURE__ */ new Set([
|
|
3
|
+
" ",
|
|
4
|
+
"\n",
|
|
5
|
+
" ",
|
|
6
|
+
"\xA0"
|
|
7
|
+
]);
|
|
8
|
+
function detectTrigger(textBeforeCaret, triggerChars) {
|
|
9
|
+
const triggerSet = new Set(triggerChars);
|
|
10
|
+
for (let i = textBeforeCaret.length - 1; i >= 0; i -= 1) {
|
|
11
|
+
const char = textBeforeCaret.at(i);
|
|
12
|
+
if (char === void 0) return null;
|
|
13
|
+
if (WHITESPACE.has(char)) return null;
|
|
14
|
+
if (triggerSet.has(char)) {
|
|
15
|
+
const preceding = i === 0 ? "" : textBeforeCaret.at(i - 1) ?? "";
|
|
16
|
+
if (preceding === "" || WHITESPACE.has(preceding)) return {
|
|
17
|
+
char,
|
|
18
|
+
query: textBeforeCaret.slice(i + 1),
|
|
19
|
+
start: i,
|
|
20
|
+
end: textBeforeCaret.length
|
|
21
|
+
};
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
const MIRROR_PROPERTIES = [
|
|
28
|
+
"box-sizing",
|
|
29
|
+
"width",
|
|
30
|
+
"font-family",
|
|
31
|
+
"font-size",
|
|
32
|
+
"font-weight",
|
|
33
|
+
"font-style",
|
|
34
|
+
"font-variant",
|
|
35
|
+
"letter-spacing",
|
|
36
|
+
"text-transform",
|
|
37
|
+
"text-indent",
|
|
38
|
+
"line-height",
|
|
39
|
+
"tab-size",
|
|
40
|
+
"padding-top",
|
|
41
|
+
"padding-right",
|
|
42
|
+
"padding-bottom",
|
|
43
|
+
"padding-left",
|
|
44
|
+
"border-top-width",
|
|
45
|
+
"border-right-width",
|
|
46
|
+
"border-bottom-width",
|
|
47
|
+
"border-left-width"
|
|
48
|
+
];
|
|
49
|
+
function caretRectInTextarea(element, offset) {
|
|
50
|
+
const doc = element.ownerDocument;
|
|
51
|
+
const computed = doc.defaultView?.getComputedStyle(element);
|
|
52
|
+
const mirror = doc.createElement("div");
|
|
53
|
+
const style = mirror.style;
|
|
54
|
+
style.position = "absolute";
|
|
55
|
+
style.visibility = "hidden";
|
|
56
|
+
style.whiteSpace = "pre-wrap";
|
|
57
|
+
style.overflowWrap = "break-word";
|
|
58
|
+
style.top = "0";
|
|
59
|
+
style.left = "-9999px";
|
|
60
|
+
if (computed) for (const property of MIRROR_PROPERTIES) style.setProperty(property, computed.getPropertyValue(property));
|
|
61
|
+
mirror.textContent = element.value.slice(0, offset);
|
|
62
|
+
const marker = doc.createElement("span");
|
|
63
|
+
marker.textContent = element.value.slice(offset) || ".";
|
|
64
|
+
mirror.appendChild(marker);
|
|
65
|
+
doc.body.appendChild(mirror);
|
|
66
|
+
const elementRect = element.getBoundingClientRect();
|
|
67
|
+
const mirrorRect = mirror.getBoundingClientRect();
|
|
68
|
+
const markerRect = marker.getBoundingClientRect();
|
|
69
|
+
const lineHeight = computed ? Number.parseFloat(computed.lineHeight) : 0;
|
|
70
|
+
const height = markerRect.height || (Number.isFinite(lineHeight) ? lineHeight : 16);
|
|
71
|
+
const x = elementRect.left + (markerRect.left - mirrorRect.left) - element.scrollLeft;
|
|
72
|
+
const y = elementRect.top + (markerRect.top - mirrorRect.top) - element.scrollTop;
|
|
73
|
+
doc.body.removeChild(mirror);
|
|
74
|
+
return new DOMRect(x, y, 1, height);
|
|
75
|
+
}
|
|
76
|
+
//#endregion
|
|
77
|
+
export { caretRectInTextarea, detectTrigger };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { MarkdownBlockKnobStyle } from "./knob-contracts/markdown-block-knobs.js";
|
|
2
|
+
import { CodeCopyProps } from "./ui/code.js";
|
|
3
|
+
import { CSSProperties, ComponentProps } from "react";
|
|
4
|
+
//#region src/markdown-block.d.ts
|
|
5
|
+
type MarkdownBlockProps = Omit<ComponentProps<"figure">, "style"> & {
|
|
6
|
+
code: string;
|
|
7
|
+
style?: CSSProperties & MarkdownBlockKnobStyle;
|
|
8
|
+
};
|
|
9
|
+
declare function MarkdownBlock({ code, className, children, ...props }: MarkdownBlockProps): import("react").JSX.Element;
|
|
10
|
+
type MarkdownBlockHeaderProps = Omit<ComponentProps<"figcaption">, "style"> & {
|
|
11
|
+
style?: CSSProperties & MarkdownBlockKnobStyle;
|
|
12
|
+
};
|
|
13
|
+
declare function MarkdownBlockHeader({ className, ...props }: MarkdownBlockHeaderProps): import("react").JSX.Element;
|
|
14
|
+
type MarkdownBlockTitleProps = Omit<ComponentProps<"div">, "style"> & {
|
|
15
|
+
style?: CSSProperties & MarkdownBlockKnobStyle;
|
|
16
|
+
};
|
|
17
|
+
declare function MarkdownBlockTitle({ children, className, ...props }: MarkdownBlockTitleProps): import("react").JSX.Element;
|
|
18
|
+
type MarkdownBlockCopyProps = Omit<CodeCopyProps, "value">;
|
|
19
|
+
declare function MarkdownBlockCopy({ "aria-label": ariaLabel, ...props }: MarkdownBlockCopyProps): import("react").JSX.Element;
|
|
20
|
+
type MarkdownBlockContentProps = ComponentProps<"div"> & {
|
|
21
|
+
style?: CSSProperties & MarkdownBlockKnobStyle;
|
|
22
|
+
};
|
|
23
|
+
declare function MarkdownBlockContent({ children, className, ...props }: MarkdownBlockContentProps): import("react").JSX.Element;
|
|
24
|
+
//#endregion
|
|
25
|
+
export { MarkdownBlock, MarkdownBlockContent, MarkdownBlockContentProps, MarkdownBlockCopy, MarkdownBlockCopyProps, MarkdownBlockHeader, MarkdownBlockHeaderProps, MarkdownBlockProps, MarkdownBlockTitle, MarkdownBlockTitleProps };
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "./lib/cn.js";
|
|
3
|
+
import { CodeCopy } from "./ui/code.js";
|
|
4
|
+
import { Markdown } from "./ui/markdown.js";
|
|
5
|
+
import { createContext, useContext } from "react";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
//#region src/markdown-block.tsx
|
|
8
|
+
const MarkdownBlockContext = createContext(null);
|
|
9
|
+
function useMarkdownBlockContext() {
|
|
10
|
+
const code = useContext(MarkdownBlockContext);
|
|
11
|
+
if (code === null) throw new Error("MarkdownBlock compound components must be rendered inside <MarkdownBlock>.");
|
|
12
|
+
return code;
|
|
13
|
+
}
|
|
14
|
+
function MarkdownBlock({ code, className, children, ...props }) {
|
|
15
|
+
return /* @__PURE__ */ jsx(MarkdownBlockContext.Provider, {
|
|
16
|
+
value: code,
|
|
17
|
+
children: /* @__PURE__ */ jsx("figure", {
|
|
18
|
+
"data-control-ui": "markdown-block",
|
|
19
|
+
"data-control-family": "markdown-block",
|
|
20
|
+
"data-slot": "root",
|
|
21
|
+
"data-surface": "panel",
|
|
22
|
+
className: cn("overflow-hidden", className),
|
|
23
|
+
...props,
|
|
24
|
+
children
|
|
25
|
+
})
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
function MarkdownBlockHeader({ className, ...props }) {
|
|
29
|
+
return /* @__PURE__ */ jsx("figcaption", {
|
|
30
|
+
"data-control-ui": "markdown-block",
|
|
31
|
+
"data-control-family": "markdown-block",
|
|
32
|
+
"data-slot": "header",
|
|
33
|
+
className: cn("sticky top-0 z-10 flex items-center justify-between", className),
|
|
34
|
+
...props
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
function MarkdownBlockTitle({ children = "Markdown", className, ...props }) {
|
|
38
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
39
|
+
"data-control-ui": "markdown-block",
|
|
40
|
+
"data-control-family": "markdown-block",
|
|
41
|
+
"data-slot": "title",
|
|
42
|
+
className: cn("flex min-w-0 items-center", className),
|
|
43
|
+
...props,
|
|
44
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
45
|
+
"aria-hidden": "true",
|
|
46
|
+
"data-control-ui": "markdown-block",
|
|
47
|
+
"data-control-family": "markdown-block",
|
|
48
|
+
"data-slot": "title-icon",
|
|
49
|
+
className: "flex items-center justify-center",
|
|
50
|
+
children: "MD"
|
|
51
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
52
|
+
className: "truncate",
|
|
53
|
+
children
|
|
54
|
+
})]
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
function MarkdownBlockCopy({ "aria-label": ariaLabel = "Copy markdown", ...props }) {
|
|
58
|
+
const code = useMarkdownBlockContext();
|
|
59
|
+
return /* @__PURE__ */ jsx(CodeCopy, {
|
|
60
|
+
value: code,
|
|
61
|
+
"aria-label": ariaLabel,
|
|
62
|
+
...props
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
function MarkdownBlockContent({ children, className, ...props }) {
|
|
66
|
+
const code = useMarkdownBlockContext();
|
|
67
|
+
return /* @__PURE__ */ jsx("div", {
|
|
68
|
+
"data-control-ui": "markdown-block",
|
|
69
|
+
"data-control-family": "markdown-block",
|
|
70
|
+
"data-slot": "content",
|
|
71
|
+
className: cn("max-h-[420px] overflow-auto mask-y-from-[calc(100%_-_var(--scroll-fade-size))]", className),
|
|
72
|
+
...props,
|
|
73
|
+
children: children ?? /* @__PURE__ */ jsx(Markdown, { content: code })
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
//#endregion
|
|
77
|
+
export { MarkdownBlock, MarkdownBlockContent, MarkdownBlockCopy, MarkdownBlockHeader, MarkdownBlockTitle };
|