@devalok/shilp-sutra 0.36.0 → 0.37.0-next.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/MIGRATION.md +346 -0
- package/README.md +26 -29
- package/dist/_chunks/badge-group.js +42 -42
- package/dist/_chunks/badge-group.js.map +1 -1
- package/dist/_chunks/chat.js +324 -327
- package/dist/_chunks/chat.js.map +1 -1
- package/dist/_chunks/date-picker.js +245 -245
- package/dist/_chunks/date-picker.js.map +1 -1
- package/dist/_chunks/document-preview.js +33 -33
- package/dist/_chunks/document-preview.js.map +1 -1
- package/dist/_chunks/file-preview.js +264 -264
- package/dist/_chunks/file-preview.js.map +1 -1
- package/dist/_chunks/image-preview.js +45 -45
- package/dist/_chunks/image-preview.js.map +1 -1
- package/dist/_chunks/mention-suggestion.js +85 -85
- package/dist/_chunks/mention-suggestion.js.map +1 -1
- package/dist/_chunks/motion-provider.js +13 -13
- package/dist/_chunks/motion-provider.js.map +1 -1
- package/dist/_chunks/popover.js +36 -36
- package/dist/_chunks/popover.js.map +1 -1
- package/dist/_chunks/primitives.js +489 -489
- package/dist/_chunks/primitives.js.map +1 -1
- package/dist/_chunks/rich-chat-input.js +1066 -1066
- package/dist/_chunks/rich-chat-input.js.map +1 -1
- package/dist/_chunks/shared.js +43 -43
- package/dist/_chunks/shared.js.map +1 -1
- package/dist/_chunks/text.js +432 -0
- package/dist/_chunks/text.js.map +1 -0
- package/dist/_chunks/tiptap.js +6053 -6187
- package/dist/_chunks/tiptap.js.map +1 -1
- package/dist/_chunks/tree-view.js +97 -97
- package/dist/_chunks/tree-view.js.map +1 -1
- package/dist/_chunks/use-calendar.js.map +1 -1
- package/dist/ai/ai-command-provider.d.ts.map +1 -1
- package/dist/ai/ai-command-provider.js.map +1 -1
- package/dist/ai/block-renderer.d.ts.map +1 -1
- package/dist/ai/block-renderer.js +43 -43
- package/dist/ai/block-renderer.js.map +1 -1
- package/dist/ai/blocks/block-table.d.ts.map +1 -1
- package/dist/ai/blocks/confirm.d.ts.map +1 -1
- package/dist/ai/blocks/divider.d.ts.map +1 -1
- package/dist/ai/blocks/error.d.ts.map +1 -1
- package/dist/ai/blocks/index.d.ts +5 -5
- package/dist/ai/blocks/index.d.ts.map +1 -1
- package/dist/ai/blocks/index.js +2 -2
- package/dist/ai/blocks/info.d.ts.map +1 -1
- package/dist/ai/blocks/loading.d.ts.map +1 -1
- package/dist/ai/blocks/stat-row.d.ts.map +1 -1
- package/dist/ai/blocks/success.d.ts.map +1 -1
- package/dist/ai/blocks/text.d.ts.map +1 -1
- package/dist/ai/command-bar.d.ts +0 -11
- package/dist/ai/command-bar.d.ts.map +1 -1
- package/dist/ai/command-bar.js +128 -128
- package/dist/ai/command-bar.js.map +1 -1
- package/dist/ai/conversation.d.ts +1 -1
- package/dist/ai/conversation.d.ts.map +1 -1
- package/dist/ai/conversation.js +76 -76
- package/dist/ai/conversation.js.map +1 -1
- package/dist/ai/devadoot-icon.d.ts +0 -12
- package/dist/ai/devadoot-icon.d.ts.map +1 -1
- package/dist/ai/index.d.ts +11 -11
- package/dist/ai/index.d.ts.map +1 -1
- package/dist/ai/index.js +44 -44
- package/dist/ai/index.js.map +1 -1
- package/dist/composed/activity-feed.d.ts.map +1 -1
- package/dist/composed/activity-feed.js +93 -93
- package/dist/composed/activity-feed.js.map +1 -1
- package/dist/composed/avatar-group.d.ts.map +1 -1
- package/dist/composed/avatar-group.js +50 -50
- package/dist/composed/avatar-group.js.map +1 -1
- package/dist/composed/bulk-action-bar.d.ts.map +1 -1
- package/dist/composed/bulk-action-bar.js +40 -40
- package/dist/composed/bulk-action-bar.js.map +1 -1
- package/dist/composed/command-palette.d.ts +0 -6
- package/dist/composed/command-palette.d.ts.map +1 -1
- package/dist/composed/command-palette.js +131 -131
- package/dist/composed/command-palette.js.map +1 -1
- package/dist/composed/confirm-dialog.d.ts.map +1 -1
- package/dist/composed/confirm-dialog.js.map +1 -1
- package/dist/composed/content-card.d.ts.map +1 -1
- package/dist/composed/content-card.js.map +1 -1
- package/dist/composed/date-picker/calendar-grid.d.ts.map +1 -1
- package/dist/composed/date-picker/date-picker.d.ts.map +1 -1
- package/dist/composed/date-picker/date-range-picker.d.ts.map +1 -1
- package/dist/composed/date-picker/date-time-picker.d.ts.map +1 -1
- package/dist/composed/date-picker/index.d.ts +11 -11
- package/dist/composed/date-picker/index.d.ts.map +1 -1
- package/dist/composed/date-picker/index.js +1 -1
- package/dist/composed/date-picker/month-picker.d.ts.map +1 -1
- package/dist/composed/date-picker/presets.d.ts.map +1 -1
- package/dist/composed/date-picker/time-picker.d.ts.map +1 -1
- package/dist/composed/date-picker/year-picker.d.ts.map +1 -1
- package/dist/composed/deadline-indicator.d.ts.map +1 -1
- package/dist/composed/deadline-indicator.js +25 -25
- package/dist/composed/deadline-indicator.js.map +1 -1
- package/dist/composed/emoji-picker.d.ts.map +1 -1
- package/dist/composed/emoji-picker.js +37 -37
- package/dist/composed/emoji-picker.js.map +1 -1
- package/dist/composed/empty-state.d.ts.map +1 -1
- package/dist/composed/empty-state.js +21 -21
- package/dist/composed/empty-state.js.map +1 -1
- package/dist/composed/error-boundary.d.ts +1 -1
- package/dist/composed/error-boundary.d.ts.map +1 -1
- package/dist/composed/error-boundary.js.map +1 -1
- package/dist/composed/extensions/emoji-node.d.ts.map +1 -1
- package/dist/composed/extensions/emoji-suggestion.d.ts.map +1 -1
- package/dist/composed/extensions/file-attachment.d.ts.map +1 -1
- package/dist/composed/extensions/mention-suggestion.d.ts +1 -1
- package/dist/composed/extensions/mention-suggestion.d.ts.map +1 -1
- package/dist/composed/extensions/slash-command.d.ts +1 -1
- package/dist/composed/extensions/slash-command.d.ts.map +1 -1
- package/dist/composed/file-preview/audio-preview.d.ts.map +1 -1
- package/dist/composed/file-preview/document-preview.d.ts.map +1 -1
- package/dist/composed/file-preview/embed-preview.d.ts.map +1 -1
- package/dist/composed/file-preview/image-preview.d.ts.map +1 -1
- package/dist/composed/file-preview/shared.d.ts.map +1 -1
- package/dist/composed/file-preview/video-preview.d.ts.map +1 -1
- package/dist/composed/file-preview.d.ts.map +1 -1
- package/dist/composed/filter-bar.d.ts +1 -1
- package/dist/composed/filter-bar.d.ts.map +1 -1
- package/dist/composed/filter-bar.js +54 -54
- package/dist/composed/filter-bar.js.map +1 -1
- package/dist/composed/form-section.d.ts.map +1 -1
- package/dist/composed/form-section.js +26 -26
- package/dist/composed/form-section.js.map +1 -1
- package/dist/composed/global-loading.d.ts.map +1 -1
- package/dist/composed/global-loading.js.map +1 -1
- package/dist/composed/index.d.ts +55 -55
- package/dist/composed/index.d.ts.map +1 -1
- package/dist/composed/index.js +17 -17
- package/dist/composed/inline-edit.d.ts.map +1 -1
- package/dist/composed/inline-edit.js.map +1 -1
- package/dist/composed/loading-skeleton.d.ts +1 -1
- package/dist/composed/loading-skeleton.d.ts.map +1 -1
- package/dist/composed/loading-skeleton.js.map +1 -1
- package/dist/composed/markdown-viewer.d.ts.map +1 -1
- package/dist/composed/markdown-viewer.js +3 -3
- package/dist/composed/markdown-viewer.js.map +1 -1
- package/dist/composed/master-detail.d.ts.map +1 -1
- package/dist/composed/master-detail.js +42 -42
- package/dist/composed/master-detail.js.map +1 -1
- package/dist/composed/member-picker.d.ts.map +1 -1
- package/dist/composed/member-picker.js.map +1 -1
- package/dist/composed/multi-select-popover.d.ts.map +1 -1
- package/dist/composed/multi-select-popover.js +55 -55
- package/dist/composed/multi-select-popover.js.map +1 -1
- package/dist/composed/page-header.d.ts.map +1 -1
- package/dist/composed/page-header.js.map +1 -1
- package/dist/composed/page-skeletons.d.ts.map +1 -1
- package/dist/composed/page-skeletons.js.map +1 -1
- package/dist/composed/priority-indicator.d.ts.map +1 -1
- package/dist/composed/priority-indicator.js +34 -34
- package/dist/composed/priority-indicator.js.map +1 -1
- package/dist/composed/responsive-overlay.d.ts.map +1 -1
- package/dist/composed/responsive-overlay.js.map +1 -1
- package/dist/composed/rich-chat-input/attachment-strip.d.ts.map +1 -1
- package/dist/composed/rich-chat-input/audio-player.d.ts.map +1 -1
- package/dist/composed/rich-chat-input/audio-waveform.d.ts.map +1 -1
- package/dist/composed/rich-chat-input/chat-toolbar.d.ts.map +1 -1
- package/dist/composed/rich-chat-input/recording-overlay.d.ts.map +1 -1
- package/dist/composed/rich-chat-input/reply-banner.d.ts.map +1 -1
- package/dist/composed/rich-chat-input/schedule-send.d.ts.map +1 -1
- package/dist/composed/rich-chat-input.d.ts +6 -6
- package/dist/composed/rich-chat-input.d.ts.map +1 -1
- package/dist/composed/rich-chat-input.js +1 -1
- package/dist/composed/rich-text-editor.d.ts.map +1 -1
- package/dist/composed/rich-text-editor.js +25 -25
- package/dist/composed/rich-text-editor.js.map +1 -1
- package/dist/composed/schedule-view.d.ts.map +1 -1
- package/dist/composed/schedule-view.js +53 -53
- package/dist/composed/schedule-view.js.map +1 -1
- package/dist/composed/simple-tooltip.d.ts.map +1 -1
- package/dist/composed/simple-tooltip.js.map +1 -1
- package/dist/composed/status-badge.d.ts +1 -1
- package/dist/composed/status-badge.d.ts.map +1 -1
- package/dist/composed/status-badge.js +30 -30
- package/dist/composed/status-badge.js.map +1 -1
- package/dist/hooks/index.d.ts +3 -3
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/use-color-mode.js.map +1 -1
- package/dist/hooks/use-toast.d.ts +1 -1
- package/dist/hooks/use-toast.d.ts.map +1 -1
- package/dist/motion/index.d.ts +2 -2
- package/dist/motion/index.d.ts.map +1 -1
- package/dist/motion/index.js.map +1 -1
- package/dist/motion/motion-provider.d.ts +1 -1
- package/dist/motion/motion-provider.d.ts.map +1 -1
- package/dist/motion/primitives-index.d.ts +1 -1
- package/dist/motion/primitives-index.d.ts.map +1 -1
- package/dist/motion/primitives-index.js +40 -40
- package/dist/motion/primitives-index.js.map +1 -1
- package/dist/motion/primitives.d.ts +1 -1
- package/dist/motion/primitives.d.ts.map +1 -1
- package/dist/shell/app-command-palette.d.ts +0 -8
- package/dist/shell/app-command-palette.d.ts.map +1 -1
- package/dist/shell/app-command-palette.js.map +1 -1
- package/dist/shell/bottom-navbar.d.ts +0 -6
- package/dist/shell/bottom-navbar.d.ts.map +1 -1
- package/dist/shell/bottom-navbar.js +62 -62
- package/dist/shell/bottom-navbar.js.map +1 -1
- package/dist/shell/index.d.ts +8 -8
- package/dist/shell/index.d.ts.map +1 -1
- package/dist/shell/index.js +5 -5
- package/dist/shell/link-context.d.ts +1 -1
- package/dist/shell/link-context.d.ts.map +1 -1
- package/dist/shell/notification-center.d.ts +0 -6
- package/dist/shell/notification-center.d.ts.map +1 -1
- package/dist/shell/notification-center.js +54 -54
- package/dist/shell/notification-center.js.map +1 -1
- package/dist/shell/notification-preferences.d.ts +0 -6
- package/dist/shell/notification-preferences.d.ts.map +1 -1
- package/dist/shell/notification-preferences.js +22 -22
- package/dist/shell/notification-preferences.js.map +1 -1
- package/dist/shell/sidebar.d.ts.map +1 -1
- package/dist/shell/sidebar.js.map +1 -1
- package/dist/shell/top-bar.d.ts +0 -6
- package/dist/shell/top-bar.d.ts.map +1 -1
- package/dist/shell/top-bar.js.map +1 -1
- package/dist/tailwind/index.cjs +15 -499
- package/dist/tailwind/preset.d.ts +21 -0
- package/dist/tailwind/preset.d.ts.map +1 -1
- package/dist/tailwind/preset.js +14 -489
- package/dist/tailwind/preset.js.map +1 -1
- package/dist/tokens/animations.css +17 -0
- package/dist/tokens/base.css +26 -0
- package/dist/tokens/index.css +22 -0
- package/dist/tokens/semantic.css +436 -464
- package/dist/tokens/shilp-sutra.css +41 -0
- package/dist/tokens/typography-semantic.css +48 -41
- package/dist/tokens/utilities.css +276 -0
- package/dist/tokens/variants.css +14 -0
- package/dist/ui/accordion.d.ts +2 -2
- package/dist/ui/accordion.d.ts.map +1 -1
- package/dist/ui/accordion.js +23 -23
- package/dist/ui/accordion.js.map +1 -1
- package/dist/ui/alert-dialog.d.ts +2 -2
- package/dist/ui/alert-dialog.d.ts.map +1 -1
- package/dist/ui/alert-dialog.js +37 -37
- package/dist/ui/alert-dialog.js.map +1 -1
- package/dist/ui/alert.d.ts.map +1 -1
- package/dist/ui/alert.js +36 -36
- package/dist/ui/alert.js.map +1 -1
- package/dist/ui/aspect-ratio.d.ts +1 -1
- package/dist/ui/aspect-ratio.d.ts.map +1 -1
- package/dist/ui/aspect-ratio.js.map +1 -1
- package/dist/ui/autocomplete.d.ts +1 -1
- package/dist/ui/autocomplete.d.ts.map +1 -1
- package/dist/ui/autocomplete.js +27 -27
- package/dist/ui/autocomplete.js.map +1 -1
- package/dist/ui/avatar.d.ts +2 -2
- package/dist/ui/avatar.d.ts.map +1 -1
- package/dist/ui/avatar.js +41 -41
- package/dist/ui/avatar.js.map +1 -1
- package/dist/ui/badge-group.d.ts.map +1 -1
- package/dist/ui/badge-indicator.d.ts.map +1 -1
- package/dist/ui/badge-indicator.js +10 -10
- package/dist/ui/badge-indicator.js.map +1 -1
- package/dist/ui/badge.d.ts +2 -2
- package/dist/ui/badge.d.ts.map +1 -1
- package/dist/ui/banner.d.ts.map +1 -1
- package/dist/ui/banner.js +28 -28
- package/dist/ui/banner.js.map +1 -1
- package/dist/ui/breadcrumb.d.ts +1 -1
- package/dist/ui/breadcrumb.d.ts.map +1 -1
- package/dist/ui/breadcrumb.js.map +1 -1
- package/dist/ui/button-group.d.ts.map +1 -1
- package/dist/ui/button-group.js.map +1 -1
- package/dist/ui/button-processing.d.ts.map +1 -1
- package/dist/ui/button-processing.js +15 -15
- package/dist/ui/button-processing.js.map +1 -1
- package/dist/ui/button.d.ts.map +1 -1
- package/dist/ui/button.js +84 -84
- package/dist/ui/button.js.map +1 -1
- package/dist/ui/card.d.ts +1 -1
- package/dist/ui/card.d.ts.map +1 -1
- package/dist/ui/card.js +28 -28
- package/dist/ui/card.js.map +1 -1
- package/dist/ui/charts/_internal/axes.d.ts +1 -1
- package/dist/ui/charts/_internal/axes.d.ts.map +1 -1
- package/dist/ui/charts/_internal/grid-lines.d.ts.map +1 -1
- package/dist/ui/charts/_internal/legend.d.ts.map +1 -1
- package/dist/ui/charts/_internal/tooltip.d.ts +1 -1
- package/dist/ui/charts/_internal/tooltip.d.ts.map +1 -1
- package/dist/ui/charts/area-chart.d.ts.map +1 -1
- package/dist/ui/charts/bar-chart.d.ts +1 -1
- package/dist/ui/charts/bar-chart.d.ts.map +1 -1
- package/dist/ui/charts/chart-container.d.ts.map +1 -1
- package/dist/ui/charts/gauge-chart.d.ts.map +1 -1
- package/dist/ui/charts/index.d.ts +5 -5
- package/dist/ui/charts/index.d.ts.map +1 -1
- package/dist/ui/charts/index.js +618 -618
- package/dist/ui/charts/index.js.map +1 -1
- package/dist/ui/charts/line-chart.d.ts.map +1 -1
- package/dist/ui/charts/pie-chart.d.ts.map +1 -1
- package/dist/ui/charts/radar-chart.d.ts.map +1 -1
- package/dist/ui/charts/sparkline.d.ts.map +1 -1
- package/dist/ui/chat/date-separator.d.ts.map +1 -1
- package/dist/ui/chat/index.d.ts +4 -4
- package/dist/ui/chat/index.d.ts.map +1 -1
- package/dist/ui/chat/index.js +1 -1
- package/dist/ui/chat/message-input.d.ts.map +1 -1
- package/dist/ui/chat/message-list.d.ts.map +1 -1
- package/dist/ui/chat/message.d.ts +1 -1
- package/dist/ui/chat/message.d.ts.map +1 -1
- package/dist/ui/chat/system-message.d.ts.map +1 -1
- package/dist/ui/chat/typing-indicator.d.ts.map +1 -1
- package/dist/ui/chat/unread-separator.d.ts.map +1 -1
- package/dist/ui/checkbox.d.ts.map +1 -1
- package/dist/ui/checkbox.js +18 -18
- package/dist/ui/checkbox.js.map +1 -1
- package/dist/ui/code.d.ts.map +1 -1
- package/dist/ui/code.js.map +1 -1
- package/dist/ui/collapsible.d.ts +2 -2
- package/dist/ui/collapsible.d.ts.map +1 -1
- package/dist/ui/collapsible.js +10 -10
- package/dist/ui/collapsible.js.map +1 -1
- package/dist/ui/color-input.d.ts.map +1 -1
- package/dist/ui/color-input.js +85 -85
- package/dist/ui/color-input.js.map +1 -1
- package/dist/ui/color-swatch.d.ts.map +1 -1
- package/dist/ui/color-swatch.js.map +1 -1
- package/dist/ui/combobox.d.ts.map +1 -1
- package/dist/ui/combobox.js +58 -58
- package/dist/ui/combobox.js.map +1 -1
- package/dist/ui/container.d.ts.map +1 -1
- package/dist/ui/container.js.map +1 -1
- package/dist/ui/context-menu.d.ts +2 -2
- package/dist/ui/context-menu.d.ts.map +1 -1
- package/dist/ui/context-menu.js +47 -47
- package/dist/ui/context-menu.js.map +1 -1
- package/dist/ui/data-table-body.d.ts +1 -1
- package/dist/ui/data-table-body.d.ts.map +1 -1
- package/dist/ui/data-table-body.js +43 -43
- package/dist/ui/data-table-body.js.map +1 -1
- package/dist/ui/data-table-bulk-actions.js.map +1 -1
- package/dist/ui/data-table-card.d.ts.map +1 -1
- package/dist/ui/data-table-card.js +7 -7
- package/dist/ui/data-table-card.js.map +1 -1
- package/dist/ui/data-table-context.d.ts +1 -1
- package/dist/ui/data-table-context.d.ts.map +1 -1
- package/dist/ui/data-table-context.js.map +1 -1
- package/dist/ui/data-table-header.js +38 -38
- package/dist/ui/data-table-header.js.map +1 -1
- package/dist/ui/data-table-pagination.js.map +1 -1
- package/dist/ui/data-table-toolbar.d.ts.map +1 -1
- package/dist/ui/data-table-toolbar.js.map +1 -1
- package/dist/ui/data-table.d.ts +2 -2
- package/dist/ui/data-table.d.ts.map +1 -1
- package/dist/ui/data-table.js +5 -5
- package/dist/ui/data-table.js.map +1 -1
- package/dist/ui/devalok-grain.js +8 -8
- package/dist/ui/devalok-grain.js.map +1 -1
- package/dist/ui/dialog.d.ts +2 -2
- package/dist/ui/dialog.d.ts.map +1 -1
- package/dist/ui/dialog.js +41 -41
- package/dist/ui/dialog.js.map +1 -1
- package/dist/ui/dropdown-menu.d.ts +2 -2
- package/dist/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/ui/dropdown-menu.js +46 -46
- package/dist/ui/dropdown-menu.js.map +1 -1
- package/dist/ui/file-upload.d.ts.map +1 -1
- package/dist/ui/file-upload.js +54 -54
- package/dist/ui/file-upload.js.map +1 -1
- package/dist/ui/form.d.ts.map +1 -1
- package/dist/ui/form.js +17 -17
- package/dist/ui/form.js.map +1 -1
- package/dist/ui/hover-card.d.ts +2 -2
- package/dist/ui/hover-card.d.ts.map +1 -1
- package/dist/ui/hover-card.js +19 -19
- package/dist/ui/hover-card.js.map +1 -1
- package/dist/ui/icon-button.d.ts.map +1 -1
- package/dist/ui/icon-button.js.map +1 -1
- package/dist/ui/icon-group.d.ts.map +1 -1
- package/dist/ui/icon-group.js +4 -4
- package/dist/ui/icon-group.js.map +1 -1
- package/dist/ui/icon.d.ts.map +1 -1
- package/dist/ui/icon.js +32 -32
- package/dist/ui/icon.js.map +1 -1
- package/dist/ui/index.d.ts +57 -57
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/index.js +27 -27
- package/dist/ui/index.js.map +1 -1
- package/dist/ui/input-otp.d.ts +1 -1
- package/dist/ui/input-otp.d.ts.map +1 -1
- package/dist/ui/input-otp.js.map +1 -1
- package/dist/ui/input.d.ts.map +1 -1
- package/dist/ui/input.js +14 -14
- package/dist/ui/input.js.map +1 -1
- package/dist/ui/label.d.ts +1 -1
- package/dist/ui/label.d.ts.map +1 -1
- package/dist/ui/label.js.map +1 -1
- package/dist/ui/lib/bottom-sheet.d.ts.map +1 -1
- package/dist/ui/lib/index.d.ts +4 -4
- package/dist/ui/lib/index.d.ts.map +1 -1
- package/dist/ui/lib/slot.d.ts +1 -1
- package/dist/ui/lib/slot.d.ts.map +1 -1
- package/dist/ui/lib/utils.d.ts.map +1 -1
- package/dist/ui/lib/utils.js.map +1 -1
- package/dist/ui/link.d.ts.map +1 -1
- package/dist/ui/link.js.map +1 -1
- package/dist/ui/menubar.d.ts +2 -2
- package/dist/ui/menubar.d.ts.map +1 -1
- package/dist/ui/menubar.js +64 -64
- package/dist/ui/menubar.js.map +1 -1
- package/dist/ui/navigation-menu.d.ts +2 -2
- package/dist/ui/navigation-menu.d.ts.map +1 -1
- package/dist/ui/navigation-menu.js +72 -72
- package/dist/ui/navigation-menu.js.map +1 -1
- package/dist/ui/number-input.d.ts.map +1 -1
- package/dist/ui/number-input.js.map +1 -1
- package/dist/ui/pagination.d.ts +1 -1
- package/dist/ui/pagination.d.ts.map +1 -1
- package/dist/ui/pagination.js.map +1 -1
- package/dist/ui/popover.d.ts +2 -2
- package/dist/ui/popover.d.ts.map +1 -1
- package/dist/ui/progress-ring.d.ts +1 -1
- package/dist/ui/progress-ring.d.ts.map +1 -1
- package/dist/ui/progress-ring.js +33 -33
- package/dist/ui/progress-ring.js.map +1 -1
- package/dist/ui/progress.d.ts +2 -2
- package/dist/ui/progress.d.ts.map +1 -1
- package/dist/ui/progress.js +23 -23
- package/dist/ui/progress.js.map +1 -1
- package/dist/ui/radio.d.ts.map +1 -1
- package/dist/ui/radio.js +19 -19
- package/dist/ui/radio.js.map +1 -1
- package/dist/ui/search-input.d.ts.map +1 -1
- package/dist/ui/search-input.js +17 -17
- package/dist/ui/search-input.js.map +1 -1
- package/dist/ui/segmented-control.d.ts.map +1 -1
- package/dist/ui/segmented-control.js +19 -19
- package/dist/ui/segmented-control.js.map +1 -1
- package/dist/ui/select.d.ts +2 -2
- package/dist/ui/select.d.ts.map +1 -1
- package/dist/ui/select.js +68 -68
- package/dist/ui/select.js.map +1 -1
- package/dist/ui/separator.d.ts +1 -1
- package/dist/ui/separator.d.ts.map +1 -1
- package/dist/ui/separator.js.map +1 -1
- package/dist/ui/sheet.d.ts +2 -2
- package/dist/ui/sheet.d.ts.map +1 -1
- package/dist/ui/sheet.js +44 -44
- package/dist/ui/sheet.js.map +1 -1
- package/dist/ui/sidebar.d.ts +1 -1
- package/dist/ui/sidebar.d.ts.map +1 -1
- package/dist/ui/sidebar.js +156 -156
- package/dist/ui/sidebar.js.map +1 -1
- package/dist/ui/skeleton.d.ts +1 -1
- package/dist/ui/skeleton.d.ts.map +1 -1
- package/dist/ui/skeleton.js +2 -2
- package/dist/ui/skeleton.js.map +1 -1
- package/dist/ui/slider.d.ts +2 -2
- package/dist/ui/slider.d.ts.map +1 -1
- package/dist/ui/slider.js +5 -5
- package/dist/ui/slider.js.map +1 -1
- package/dist/ui/spinner.d.ts.map +1 -1
- package/dist/ui/spinner.js +21 -21
- package/dist/ui/spinner.js.map +1 -1
- package/dist/ui/split-button.d.ts +1 -1
- package/dist/ui/split-button.d.ts.map +1 -1
- package/dist/ui/split-button.js +28 -28
- package/dist/ui/split-button.js.map +1 -1
- package/dist/ui/stack.d.ts +1 -1
- package/dist/ui/stack.d.ts.map +1 -1
- package/dist/ui/stack.js.map +1 -1
- package/dist/ui/stat-card.d.ts.map +1 -1
- package/dist/ui/stat-card.js +73 -73
- package/dist/ui/stat-card.js.map +1 -1
- package/dist/ui/status-dot.d.ts.map +1 -1
- package/dist/ui/status-dot.js.map +1 -1
- package/dist/ui/stepper.d.ts +1 -1
- package/dist/ui/stepper.d.ts.map +1 -1
- package/dist/ui/stepper.js +48 -48
- package/dist/ui/stepper.js.map +1 -1
- package/dist/ui/switch.d.ts +1 -1
- package/dist/ui/switch.d.ts.map +1 -1
- package/dist/ui/switch.js +15 -15
- package/dist/ui/switch.js.map +1 -1
- package/dist/ui/table.d.ts +1 -1
- package/dist/ui/table.d.ts.map +1 -1
- package/dist/ui/table.js.map +1 -1
- package/dist/ui/tabs.d.ts +2 -2
- package/dist/ui/tabs.d.ts.map +1 -1
- package/dist/ui/tabs.js +52 -52
- package/dist/ui/tabs.js.map +1 -1
- package/dist/ui/text.d.ts +1 -1
- package/dist/ui/text.d.ts.map +1 -1
- package/dist/ui/text.js.map +1 -1
- package/dist/ui/textarea.d.ts.map +1 -1
- package/dist/ui/textarea.js +13 -13
- package/dist/ui/textarea.js.map +1 -1
- package/dist/ui/toast-registry.js.map +1 -1
- package/dist/ui/toast.d.ts +3 -3
- package/dist/ui/toast.d.ts.map +1 -1
- package/dist/ui/toast.js +164 -164
- package/dist/ui/toast.js.map +1 -1
- package/dist/ui/toaster.d.ts.map +1 -1
- package/dist/ui/toaster.js +6 -6
- package/dist/ui/toaster.js.map +1 -1
- package/dist/ui/toggle-group.d.ts +1 -1
- package/dist/ui/toggle-group.d.ts.map +1 -1
- package/dist/ui/toggle-group.js.map +1 -1
- package/dist/ui/toggle.d.ts +1 -1
- package/dist/ui/toggle.d.ts.map +1 -1
- package/dist/ui/toggle.js +14 -14
- package/dist/ui/toggle.js.map +1 -1
- package/dist/ui/tooltip.d.ts +2 -2
- package/dist/ui/tooltip.d.ts.map +1 -1
- package/dist/ui/tooltip.js +26 -26
- package/dist/ui/tooltip.js.map +1 -1
- package/dist/ui/tree-view/index.d.ts +2 -2
- package/dist/ui/tree-view/index.d.ts.map +1 -1
- package/dist/ui/tree-view/index.js +1 -1
- package/dist/ui/tree-view/tree-view.d.ts +1 -1
- package/dist/ui/tree-view/tree-view.d.ts.map +1 -1
- package/dist/ui/visually-hidden.d.ts.map +1 -1
- package/dist/ui/visually-hidden.js.map +1 -1
- package/docs/components/_header.md +96 -0
- package/docs/rollback.md +179 -0
- package/llms-full.txt +97 -1
- package/llms.txt +24 -2
- package/package.json +296 -277
- package/dist/_chunks/framer.js +0 -5604
- package/dist/_chunks/framer.js.map +0 -1
- package/dist/_chunks/rolldown-runtime.js +0 -21
- package/dist/_chunks/sonner.js +0 -616
- package/dist/_chunks/sonner.js.map +0 -1
- package/dist/_chunks/stat-row.js +0 -432
- package/dist/_chunks/stat-row.js.map +0 -1
|
@@ -1,17 +1,188 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
2
|
+
import { springs as e, tweens as t } from "../ui/lib/motion.js";
|
|
3
|
+
import { cn as n } from "../ui/lib/utils.js";
|
|
4
|
+
import { Icon as r } from "../ui/icon.js";
|
|
5
|
+
import { n as i } from "./badge-group.js";
|
|
6
|
+
import { Button as a } from "../ui/button.js";
|
|
7
|
+
import { Skeleton as o } from "../ui/skeleton.js";
|
|
8
|
+
import { a as s, i as c, t as l } from "./shared.js";
|
|
9
|
+
import * as u from "react";
|
|
10
|
+
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
11
|
+
import { IconDownload as p, IconMaximize as m, IconPlayerPause as h, IconPlayerPlay as g } from "@tabler/icons-react";
|
|
12
|
+
import { AnimatePresence as _, motion as v } from "framer-motion";
|
|
13
|
+
//#region src/composed/file-preview/audio-preview.tsx
|
|
14
|
+
function y({ url: e, fileName: t, onError: n }) {
|
|
15
|
+
let i = u.useRef(null), o = u.useRef(null), [p, m] = u.useState(!1), [_, v] = u.useState(0), [y, b] = u.useState(0), [x, S] = u.useState(0), [C, w] = u.useState(1), [T, E] = u.useState(!1), [D, O] = u.useState(!1), [k, A] = u.useState(null);
|
|
16
|
+
u.useEffect(() => {
|
|
17
|
+
function e(e) {
|
|
18
|
+
let t = o.current;
|
|
19
|
+
if (!t || !t.contains(document.activeElement) && document.activeElement !== t) return;
|
|
20
|
+
let n = i.current;
|
|
21
|
+
if (n) switch (e.key) {
|
|
22
|
+
case " ":
|
|
23
|
+
e.preventDefault(), m((e) => (e ? n.pause() : n.play(), !e));
|
|
24
|
+
break;
|
|
25
|
+
case "ArrowRight":
|
|
26
|
+
e.preventDefault(), n.currentTime = Math.min(n.duration || 0, n.currentTime + 5);
|
|
27
|
+
break;
|
|
28
|
+
case "ArrowLeft":
|
|
29
|
+
e.preventDefault(), n.currentTime = Math.max(0, n.currentTime - 5);
|
|
30
|
+
break;
|
|
31
|
+
case "m":
|
|
32
|
+
e.preventDefault(), E((e) => (n.muted = !e, !e));
|
|
33
|
+
break;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
37
|
+
}, []);
|
|
38
|
+
function j() {
|
|
39
|
+
i.current && (p ? i.current.pause() : i.current.play(), m(!p));
|
|
40
|
+
}
|
|
41
|
+
function M(e) {
|
|
42
|
+
if (!i.current || !y) return;
|
|
43
|
+
let t = e.currentTarget.getBoundingClientRect(), n = Math.max(0, Math.min(1, (e.clientX - t.left) / t.width));
|
|
44
|
+
i.current.currentTime = n * y;
|
|
45
|
+
}
|
|
46
|
+
function N(e) {
|
|
47
|
+
if (!y) return;
|
|
48
|
+
let t = e.currentTarget.getBoundingClientRect();
|
|
49
|
+
A((e.clientX - t.left) / t.width * y);
|
|
50
|
+
}
|
|
51
|
+
function P() {
|
|
52
|
+
if (!i.current) return;
|
|
53
|
+
let e = !T;
|
|
54
|
+
E(e), i.current.muted = e;
|
|
55
|
+
}
|
|
56
|
+
return D ? /* @__PURE__ */ d(l, {
|
|
57
|
+
message: "Could not load audio",
|
|
58
|
+
url: e
|
|
59
|
+
}) : /* @__PURE__ */ f("div", {
|
|
60
|
+
ref: o,
|
|
61
|
+
className: "rounded-ds-lg border border-surface-border bg-surface-raised shadow-raised overflow-hidden",
|
|
62
|
+
tabIndex: -1,
|
|
63
|
+
children: [
|
|
64
|
+
/* @__PURE__ */ d("audio", {
|
|
65
|
+
ref: i,
|
|
66
|
+
src: e,
|
|
67
|
+
onTimeUpdate: () => {
|
|
68
|
+
i.current && (S(i.current.currentTime), i.current.duration && v(i.current.currentTime / i.current.duration * 100));
|
|
69
|
+
},
|
|
70
|
+
onLoadedMetadata: () => b(i.current?.duration ?? 0),
|
|
71
|
+
onEnded: () => m(!1),
|
|
72
|
+
onError: () => {
|
|
73
|
+
O(!0), n?.("Audio failed to load");
|
|
74
|
+
}
|
|
75
|
+
}),
|
|
76
|
+
/* @__PURE__ */ f("div", {
|
|
77
|
+
className: "relative h-1 w-full cursor-pointer bg-surface-sunken group/bar",
|
|
78
|
+
onClick: M,
|
|
79
|
+
onMouseMove: N,
|
|
80
|
+
onMouseLeave: () => A(null),
|
|
81
|
+
role: "slider",
|
|
82
|
+
"aria-label": "Audio progress",
|
|
83
|
+
"aria-valuenow": Math.round(_),
|
|
84
|
+
"aria-valuemin": 0,
|
|
85
|
+
"aria-valuemax": 100,
|
|
86
|
+
tabIndex: 0,
|
|
87
|
+
children: [
|
|
88
|
+
/* @__PURE__ */ d("div", {
|
|
89
|
+
className: "absolute left-0 top-0 h-full bg-accent-9 transition-[width] duration-75",
|
|
90
|
+
style: { width: `${_}%` }
|
|
91
|
+
}),
|
|
92
|
+
k !== null && /* @__PURE__ */ d("div", {
|
|
93
|
+
className: "absolute -top-7 -translate-x-1/2 rounded-ds-sm bg-surface-overlay px-1.5 py-0.5 text-[10px] font-mono text-surface-fg shadow-floating pointer-events-none",
|
|
94
|
+
style: { left: `${k / (y || 1) * 100}%` },
|
|
95
|
+
children: s(k)
|
|
96
|
+
}),
|
|
97
|
+
/* @__PURE__ */ d("div", {
|
|
98
|
+
className: "absolute top-1/2 -translate-y-1/2 h-2.5 w-2.5 rounded-full bg-accent-9 shadow-raised opacity-0 group-hover/bar:opacity-100 transition-opacity",
|
|
99
|
+
style: {
|
|
100
|
+
left: `${_}%`,
|
|
101
|
+
marginLeft: "-5px"
|
|
102
|
+
}
|
|
103
|
+
})
|
|
104
|
+
]
|
|
105
|
+
}),
|
|
106
|
+
/* @__PURE__ */ f("div", {
|
|
107
|
+
className: "flex items-center gap-ds-04 px-ds-05 py-ds-04",
|
|
108
|
+
children: [
|
|
109
|
+
/* @__PURE__ */ d(a, {
|
|
110
|
+
variant: "solid",
|
|
111
|
+
size: "icon-sm",
|
|
112
|
+
onClick: j,
|
|
113
|
+
"aria-label": p ? "Pause" : "Play",
|
|
114
|
+
title: p ? "Pause" : "Play",
|
|
115
|
+
className: "shrink-0",
|
|
116
|
+
children: p ? /* @__PURE__ */ d(r, {
|
|
117
|
+
icon: h,
|
|
118
|
+
size: "sm"
|
|
119
|
+
}) : /* @__PURE__ */ d(r, {
|
|
120
|
+
icon: g,
|
|
121
|
+
size: "sm",
|
|
122
|
+
className: "ml-0.5"
|
|
123
|
+
})
|
|
124
|
+
}),
|
|
125
|
+
/* @__PURE__ */ f("div", {
|
|
126
|
+
className: "flex-1 min-w-0",
|
|
127
|
+
children: [t && /* @__PURE__ */ d("p", {
|
|
128
|
+
className: "text-ds-sm font-semibold text-surface-fg truncate",
|
|
129
|
+
children: t
|
|
130
|
+
}), /* @__PURE__ */ f("p", {
|
|
131
|
+
className: "text-ds-xs font-mono text-surface-fg-muted tabular-nums",
|
|
132
|
+
children: [
|
|
133
|
+
s(x),
|
|
134
|
+
" / ",
|
|
135
|
+
s(y)
|
|
136
|
+
]
|
|
137
|
+
})]
|
|
138
|
+
}),
|
|
139
|
+
/* @__PURE__ */ d(c, {
|
|
140
|
+
volume: C,
|
|
141
|
+
muted: T,
|
|
142
|
+
onVolumeChange: (e) => {
|
|
143
|
+
w(e), i.current && (i.current.volume = e), e > 0 && T && (E(!1), i.current && (i.current.muted = !1));
|
|
144
|
+
},
|
|
145
|
+
onMuteToggle: P,
|
|
146
|
+
variant: "light"
|
|
147
|
+
})
|
|
148
|
+
]
|
|
149
|
+
})
|
|
150
|
+
]
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
//#endregion
|
|
154
|
+
//#region src/composed/file-preview/embed-preview.tsx
|
|
155
|
+
function b({ url: e, embedUrl: n, onError: r }) {
|
|
156
|
+
let [i, a] = u.useState(!1), [s, c] = u.useState(!1);
|
|
157
|
+
return u.useEffect(() => {
|
|
158
|
+
let e = setTimeout(() => {
|
|
159
|
+
i || (c(!0), r?.("Embed timed out"));
|
|
160
|
+
}, 15e3);
|
|
161
|
+
return () => clearTimeout(e);
|
|
162
|
+
}, [i, r]), s ? /* @__PURE__ */ d(l, {
|
|
163
|
+
message: "Could not load embed",
|
|
164
|
+
url: e
|
|
165
|
+
}) : /* @__PURE__ */ f("div", {
|
|
166
|
+
className: "relative w-full rounded-ds-md overflow-hidden",
|
|
167
|
+
style: { aspectRatio: "16 / 9" },
|
|
168
|
+
children: [!i && /* @__PURE__ */ d(o, { className: "absolute inset-0" }), /* @__PURE__ */ d(v.iframe, {
|
|
169
|
+
src: n,
|
|
170
|
+
title: "Embedded content",
|
|
171
|
+
onLoad: () => a(!0),
|
|
172
|
+
onError: () => {
|
|
173
|
+
c(!0), r?.("Embed failed to load");
|
|
174
|
+
},
|
|
175
|
+
initial: { opacity: 0 },
|
|
176
|
+
animate: { opacity: +!!i },
|
|
177
|
+
transition: t.fade,
|
|
178
|
+
className: "absolute inset-0 h-full w-full border-none",
|
|
179
|
+
allowFullScreen: !0
|
|
180
|
+
})]
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
//#endregion
|
|
13
184
|
//#region src/composed/file-preview/video-preview.tsx
|
|
14
|
-
var
|
|
185
|
+
var x = [
|
|
15
186
|
.5,
|
|
16
187
|
.75,
|
|
17
188
|
1,
|
|
@@ -19,17 +190,17 @@ var y = [
|
|
|
19
190
|
1.5,
|
|
20
191
|
2
|
|
21
192
|
];
|
|
22
|
-
function
|
|
23
|
-
let
|
|
24
|
-
|
|
193
|
+
function S({ url: n, onError: i }) {
|
|
194
|
+
let a = u.useRef(null), o = u.useRef(null), [p, y] = u.useState(!1), [b, S] = u.useState(0), [C, w] = u.useState(0), [T, E] = u.useState(0), [D, O] = u.useState(!1), [k, A] = u.useState(!1), [j, M] = u.useState(!0), [N, P] = u.useState(1), F = u.useRef(void 0);
|
|
195
|
+
u.useEffect(() => () => clearTimeout(F.current), []), u.useEffect(() => {
|
|
25
196
|
function e(e) {
|
|
26
|
-
let t =
|
|
197
|
+
let t = o.current;
|
|
27
198
|
if (!t || !t.contains(document.activeElement) && document.activeElement !== t) return;
|
|
28
|
-
let n =
|
|
199
|
+
let n = a.current;
|
|
29
200
|
if (n) switch (e.key) {
|
|
30
201
|
case " ":
|
|
31
202
|
case "k":
|
|
32
|
-
e.preventDefault(),
|
|
203
|
+
e.preventDefault(), y((e) => (e ? n.pause() : n.play(), !e));
|
|
33
204
|
break;
|
|
34
205
|
case "ArrowRight":
|
|
35
206
|
e.preventDefault(), n.currentTime = Math.min(n.duration, n.currentTime + 5);
|
|
@@ -60,49 +231,49 @@ function b({ url: i, onError: o }) {
|
|
|
60
231
|
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
61
232
|
}, []);
|
|
62
233
|
function I(e) {
|
|
63
|
-
let t =
|
|
64
|
-
P(n),
|
|
234
|
+
let t = x.indexOf(N), n = x[Math.max(0, Math.min(x.length - 1, t + e))];
|
|
235
|
+
P(n), a.current && (a.current.playbackRate = n);
|
|
65
236
|
}
|
|
66
237
|
function L() {
|
|
67
|
-
|
|
238
|
+
a.current && (p ? a.current.pause() : a.current.play(), y(!p));
|
|
68
239
|
}
|
|
69
240
|
function R(e) {
|
|
70
|
-
if (!
|
|
241
|
+
if (!a.current || !C) return;
|
|
71
242
|
let t = e.currentTarget.getBoundingClientRect(), n = (e.clientX - t.left) / t.width;
|
|
72
|
-
|
|
243
|
+
a.current.currentTime = n * C;
|
|
73
244
|
}
|
|
74
245
|
function z() {
|
|
75
|
-
M(!0), clearTimeout(F.current),
|
|
246
|
+
M(!0), clearTimeout(F.current), p && (F.current = setTimeout(() => M(!1), 3e3));
|
|
76
247
|
}
|
|
77
|
-
return k ? /* @__PURE__ */
|
|
248
|
+
return k ? /* @__PURE__ */ d(l, {
|
|
78
249
|
message: "Could not load video",
|
|
79
|
-
url:
|
|
80
|
-
}) : /* @__PURE__ */
|
|
81
|
-
ref:
|
|
250
|
+
url: n
|
|
251
|
+
}) : /* @__PURE__ */ f("div", {
|
|
252
|
+
ref: o,
|
|
82
253
|
className: "group relative rounded-ds-md bg-black overflow-hidden",
|
|
83
254
|
onMouseMove: z,
|
|
84
|
-
onMouseLeave: () =>
|
|
255
|
+
onMouseLeave: () => p && M(!1),
|
|
85
256
|
tabIndex: -1,
|
|
86
257
|
children: [
|
|
87
|
-
/* @__PURE__ */
|
|
88
|
-
ref:
|
|
89
|
-
src:
|
|
258
|
+
/* @__PURE__ */ d("video", {
|
|
259
|
+
ref: a,
|
|
260
|
+
src: n,
|
|
90
261
|
className: "max-h-[70vh] w-full",
|
|
91
262
|
onClick: L,
|
|
92
263
|
muted: D,
|
|
93
264
|
onTimeUpdate: () => {
|
|
94
|
-
|
|
265
|
+
a.current && (E(a.current.currentTime), a.current.duration && S(a.current.currentTime / a.current.duration * 100));
|
|
95
266
|
},
|
|
96
|
-
onLoadedMetadata: () => w(
|
|
267
|
+
onLoadedMetadata: () => w(a.current?.duration ?? 0),
|
|
97
268
|
onEnded: () => {
|
|
98
|
-
|
|
269
|
+
y(!1), M(!0);
|
|
99
270
|
},
|
|
100
271
|
onError: () => {
|
|
101
|
-
A(!0),
|
|
272
|
+
A(!0), i?.("Video failed to load");
|
|
102
273
|
},
|
|
103
274
|
playsInline: !0
|
|
104
275
|
}),
|
|
105
|
-
!
|
|
276
|
+
!p && /* @__PURE__ */ d(v.button, {
|
|
106
277
|
initial: {
|
|
107
278
|
opacity: 0,
|
|
108
279
|
scale: .8
|
|
@@ -111,20 +282,20 @@ function b({ url: i, onError: o }) {
|
|
|
111
282
|
opacity: 1,
|
|
112
283
|
scale: 1
|
|
113
284
|
},
|
|
114
|
-
transition:
|
|
285
|
+
transition: e.snappy,
|
|
115
286
|
onClick: L,
|
|
116
287
|
className: "absolute inset-0 flex items-center justify-center bg-black/30",
|
|
117
288
|
"aria-label": "Play video",
|
|
118
|
-
children: /* @__PURE__ */
|
|
289
|
+
children: /* @__PURE__ */ d("div", {
|
|
119
290
|
className: "flex h-14 w-14 items-center justify-center rounded-full bg-white/90 shadow-floating",
|
|
120
|
-
children: /* @__PURE__ */
|
|
121
|
-
icon:
|
|
291
|
+
children: /* @__PURE__ */ d(r, {
|
|
292
|
+
icon: g,
|
|
122
293
|
size: "xl",
|
|
123
294
|
className: "text-surface-fg ml-0.5"
|
|
124
295
|
})
|
|
125
296
|
})
|
|
126
297
|
}),
|
|
127
|
-
/* @__PURE__ */
|
|
298
|
+
/* @__PURE__ */ d(_, { children: j && C > 0 && /* @__PURE__ */ f(v.div, {
|
|
128
299
|
initial: {
|
|
129
300
|
opacity: 0,
|
|
130
301
|
y: 10
|
|
@@ -137,76 +308,76 @@ function b({ url: i, onError: o }) {
|
|
|
137
308
|
opacity: 0,
|
|
138
309
|
y: 10
|
|
139
310
|
},
|
|
140
|
-
transition:
|
|
141
|
-
className: "absolute bottom-0 left-0 right-0 bg-
|
|
142
|
-
children: [/* @__PURE__ */
|
|
311
|
+
transition: t.fade,
|
|
312
|
+
className: "absolute bottom-0 left-0 right-0 bg-linear-to-t from-black/80 to-transparent px-ds-04 pb-ds-04 pt-ds-08",
|
|
313
|
+
children: [/* @__PURE__ */ f("div", {
|
|
143
314
|
className: "relative h-1 w-full cursor-pointer rounded-full bg-white/30 mb-ds-03 group/progress",
|
|
144
315
|
onClick: R,
|
|
145
316
|
role: "slider",
|
|
146
317
|
"aria-label": "Video progress",
|
|
147
|
-
"aria-valuenow": Math.round(
|
|
318
|
+
"aria-valuenow": Math.round(b),
|
|
148
319
|
"aria-valuemin": 0,
|
|
149
320
|
"aria-valuemax": 100,
|
|
150
321
|
tabIndex: 0,
|
|
151
|
-
children: [/* @__PURE__ */
|
|
322
|
+
children: [/* @__PURE__ */ d("div", {
|
|
152
323
|
className: "absolute left-0 top-0 h-full rounded-full bg-white transition-[width] duration-75",
|
|
153
|
-
style: { width: `${
|
|
154
|
-
}), /* @__PURE__ */
|
|
324
|
+
style: { width: `${b}%` }
|
|
325
|
+
}), /* @__PURE__ */ d("div", {
|
|
155
326
|
className: "absolute top-1/2 -translate-y-1/2 h-3 w-3 rounded-full bg-white shadow-raised opacity-0 group-hover/progress:opacity-100 transition-opacity",
|
|
156
327
|
style: {
|
|
157
|
-
left: `${
|
|
328
|
+
left: `${b}%`,
|
|
158
329
|
marginLeft: "-6px"
|
|
159
330
|
}
|
|
160
331
|
})]
|
|
161
|
-
}), /* @__PURE__ */
|
|
332
|
+
}), /* @__PURE__ */ f("div", {
|
|
162
333
|
className: "flex items-center gap-ds-03",
|
|
163
334
|
children: [
|
|
164
|
-
/* @__PURE__ */
|
|
335
|
+
/* @__PURE__ */ d("button", {
|
|
165
336
|
onClick: L,
|
|
166
337
|
className: "text-white hover:text-white/80",
|
|
167
|
-
"aria-label":
|
|
168
|
-
title:
|
|
169
|
-
children:
|
|
170
|
-
icon:
|
|
338
|
+
"aria-label": p ? "Pause" : "Play",
|
|
339
|
+
title: p ? "Pause" : "Play",
|
|
340
|
+
children: p ? /* @__PURE__ */ d(r, {
|
|
341
|
+
icon: h,
|
|
171
342
|
size: "lg"
|
|
172
|
-
}) : /* @__PURE__ */
|
|
173
|
-
icon:
|
|
343
|
+
}) : /* @__PURE__ */ d(r, {
|
|
344
|
+
icon: g,
|
|
174
345
|
size: "lg"
|
|
175
346
|
})
|
|
176
347
|
}),
|
|
177
|
-
/* @__PURE__ */
|
|
348
|
+
/* @__PURE__ */ d(c, {
|
|
178
349
|
volume: +!D,
|
|
179
350
|
muted: D,
|
|
180
351
|
onVolumeChange: (e) => {
|
|
181
|
-
|
|
352
|
+
a.current && (a.current.volume = e), e > 0 && D && (O(!1), a.current && (a.current.muted = !1));
|
|
182
353
|
},
|
|
183
354
|
onMuteToggle: () => {
|
|
184
|
-
O(!D),
|
|
355
|
+
O(!D), a.current && (a.current.muted = !D);
|
|
185
356
|
},
|
|
186
357
|
variant: "dark"
|
|
187
358
|
}),
|
|
188
|
-
/* @__PURE__ */
|
|
359
|
+
/* @__PURE__ */ f("span", {
|
|
189
360
|
className: "text-[11px] font-mono text-white/70 tabular-nums",
|
|
190
361
|
children: [
|
|
191
|
-
|
|
362
|
+
s(T),
|
|
192
363
|
" / ",
|
|
193
|
-
|
|
364
|
+
s(C)
|
|
194
365
|
]
|
|
195
366
|
}),
|
|
196
|
-
/* @__PURE__ */
|
|
197
|
-
/* @__PURE__ */
|
|
367
|
+
/* @__PURE__ */ d("div", { className: "flex-1" }),
|
|
368
|
+
/* @__PURE__ */ f("button", {
|
|
198
369
|
onClick: () => I(1),
|
|
199
370
|
className: "text-[11px] font-mono text-white/70 hover:text-white px-1 rounded-ds-sm hover:bg-white/10 transition-colors",
|
|
200
371
|
"aria-label": `Playback speed: ${N}x`,
|
|
201
372
|
children: [N, "x"]
|
|
202
373
|
}),
|
|
203
|
-
/* @__PURE__ */
|
|
204
|
-
onClick: () =>
|
|
374
|
+
/* @__PURE__ */ d("button", {
|
|
375
|
+
onClick: () => a.current?.requestFullscreen?.(),
|
|
205
376
|
className: "text-white hover:text-white/80",
|
|
206
377
|
"aria-label": "Fullscreen (F)",
|
|
207
378
|
title: "Fullscreen",
|
|
208
|
-
children: /* @__PURE__ */
|
|
209
|
-
icon:
|
|
379
|
+
children: /* @__PURE__ */ d(r, {
|
|
380
|
+
icon: m,
|
|
210
381
|
size: "sm"
|
|
211
382
|
})
|
|
212
383
|
})
|
|
@@ -217,179 +388,8 @@ function b({ url: i, onError: o }) {
|
|
|
217
388
|
});
|
|
218
389
|
}
|
|
219
390
|
//#endregion
|
|
220
|
-
//#region src/composed/file-preview/audio-preview.tsx
|
|
221
|
-
function x({ url: e, fileName: t, onError: n }) {
|
|
222
|
-
let r = f.useRef(null), i = f.useRef(null), [o, c] = f.useState(!1), [h, g] = f.useState(0), [y, b] = f.useState(0), [x, S] = f.useState(0), [C, w] = f.useState(1), [T, E] = f.useState(!1), [D, O] = f.useState(!1), [k, A] = f.useState(null);
|
|
223
|
-
f.useEffect(() => {
|
|
224
|
-
function e(e) {
|
|
225
|
-
let t = i.current;
|
|
226
|
-
if (!t || !t.contains(document.activeElement) && document.activeElement !== t) return;
|
|
227
|
-
let n = r.current;
|
|
228
|
-
if (n) switch (e.key) {
|
|
229
|
-
case " ":
|
|
230
|
-
e.preventDefault(), c((e) => (e ? n.pause() : n.play(), !e));
|
|
231
|
-
break;
|
|
232
|
-
case "ArrowRight":
|
|
233
|
-
e.preventDefault(), n.currentTime = Math.min(n.duration || 0, n.currentTime + 5);
|
|
234
|
-
break;
|
|
235
|
-
case "ArrowLeft":
|
|
236
|
-
e.preventDefault(), n.currentTime = Math.max(0, n.currentTime - 5);
|
|
237
|
-
break;
|
|
238
|
-
case "m":
|
|
239
|
-
e.preventDefault(), E((e) => (n.muted = !e, !e));
|
|
240
|
-
break;
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
244
|
-
}, []);
|
|
245
|
-
function j() {
|
|
246
|
-
r.current && (o ? r.current.pause() : r.current.play(), c(!o));
|
|
247
|
-
}
|
|
248
|
-
function M(e) {
|
|
249
|
-
if (!r.current || !y) return;
|
|
250
|
-
let t = e.currentTarget.getBoundingClientRect(), n = Math.max(0, Math.min(1, (e.clientX - t.left) / t.width));
|
|
251
|
-
r.current.currentTime = n * y;
|
|
252
|
-
}
|
|
253
|
-
function N(e) {
|
|
254
|
-
if (!y) return;
|
|
255
|
-
let t = e.currentTarget.getBoundingClientRect();
|
|
256
|
-
A((e.clientX - t.left) / t.width * y);
|
|
257
|
-
}
|
|
258
|
-
function P() {
|
|
259
|
-
if (!r.current) return;
|
|
260
|
-
let e = !T;
|
|
261
|
-
E(e), r.current.muted = e;
|
|
262
|
-
}
|
|
263
|
-
return D ? /* @__PURE__ */ p(d, {
|
|
264
|
-
message: "Could not load audio",
|
|
265
|
-
url: e
|
|
266
|
-
}) : /* @__PURE__ */ m("div", {
|
|
267
|
-
ref: i,
|
|
268
|
-
className: "rounded-ds-lg border border-surface-border bg-surface-raised shadow-raised overflow-hidden",
|
|
269
|
-
tabIndex: -1,
|
|
270
|
-
children: [
|
|
271
|
-
/* @__PURE__ */ p("audio", {
|
|
272
|
-
ref: r,
|
|
273
|
-
src: e,
|
|
274
|
-
onTimeUpdate: () => {
|
|
275
|
-
r.current && (S(r.current.currentTime), r.current.duration && g(r.current.currentTime / r.current.duration * 100));
|
|
276
|
-
},
|
|
277
|
-
onLoadedMetadata: () => b(r.current?.duration ?? 0),
|
|
278
|
-
onEnded: () => c(!1),
|
|
279
|
-
onError: () => {
|
|
280
|
-
O(!0), n?.("Audio failed to load");
|
|
281
|
-
}
|
|
282
|
-
}),
|
|
283
|
-
/* @__PURE__ */ m("div", {
|
|
284
|
-
className: "relative h-1 w-full cursor-pointer bg-surface-sunken group/bar",
|
|
285
|
-
onClick: M,
|
|
286
|
-
onMouseMove: N,
|
|
287
|
-
onMouseLeave: () => A(null),
|
|
288
|
-
role: "slider",
|
|
289
|
-
"aria-label": "Audio progress",
|
|
290
|
-
"aria-valuenow": Math.round(h),
|
|
291
|
-
"aria-valuemin": 0,
|
|
292
|
-
"aria-valuemax": 100,
|
|
293
|
-
tabIndex: 0,
|
|
294
|
-
children: [
|
|
295
|
-
/* @__PURE__ */ p("div", {
|
|
296
|
-
className: "absolute left-0 top-0 h-full bg-accent-9 transition-[width] duration-75",
|
|
297
|
-
style: { width: `${h}%` }
|
|
298
|
-
}),
|
|
299
|
-
k !== null && /* @__PURE__ */ p("div", {
|
|
300
|
-
className: "absolute -top-7 -translate-x-1/2 rounded-ds-sm bg-surface-overlay px-1.5 py-0.5 text-[10px] font-mono text-surface-fg shadow-floating pointer-events-none",
|
|
301
|
-
style: { left: `${k / (y || 1) * 100}%` },
|
|
302
|
-
children: l(k)
|
|
303
|
-
}),
|
|
304
|
-
/* @__PURE__ */ p("div", {
|
|
305
|
-
className: "absolute top-1/2 -translate-y-1/2 h-2.5 w-2.5 rounded-full bg-accent-9 shadow-raised opacity-0 group-hover/bar:opacity-100 transition-opacity",
|
|
306
|
-
style: {
|
|
307
|
-
left: `${h}%`,
|
|
308
|
-
marginLeft: "-5px"
|
|
309
|
-
}
|
|
310
|
-
})
|
|
311
|
-
]
|
|
312
|
-
}),
|
|
313
|
-
/* @__PURE__ */ m("div", {
|
|
314
|
-
className: "flex items-center gap-ds-04 px-ds-05 py-ds-04",
|
|
315
|
-
children: [
|
|
316
|
-
/* @__PURE__ */ p(s, {
|
|
317
|
-
variant: "solid",
|
|
318
|
-
size: "icon-sm",
|
|
319
|
-
onClick: j,
|
|
320
|
-
"aria-label": o ? "Pause" : "Play",
|
|
321
|
-
title: o ? "Pause" : "Play",
|
|
322
|
-
className: "shrink-0",
|
|
323
|
-
children: o ? /* @__PURE__ */ p(a, {
|
|
324
|
-
icon: _,
|
|
325
|
-
size: "sm"
|
|
326
|
-
}) : /* @__PURE__ */ p(a, {
|
|
327
|
-
icon: v,
|
|
328
|
-
size: "sm",
|
|
329
|
-
className: "ml-0.5"
|
|
330
|
-
})
|
|
331
|
-
}),
|
|
332
|
-
/* @__PURE__ */ m("div", {
|
|
333
|
-
className: "flex-1 min-w-0",
|
|
334
|
-
children: [t && /* @__PURE__ */ p("p", {
|
|
335
|
-
className: "text-ds-sm font-semibold text-surface-fg truncate",
|
|
336
|
-
children: t
|
|
337
|
-
}), /* @__PURE__ */ m("p", {
|
|
338
|
-
className: "text-ds-xs font-mono text-surface-fg-muted tabular-nums",
|
|
339
|
-
children: [
|
|
340
|
-
l(x),
|
|
341
|
-
" / ",
|
|
342
|
-
l(y)
|
|
343
|
-
]
|
|
344
|
-
})]
|
|
345
|
-
}),
|
|
346
|
-
/* @__PURE__ */ p(u, {
|
|
347
|
-
volume: C,
|
|
348
|
-
muted: T,
|
|
349
|
-
onVolumeChange: (e) => {
|
|
350
|
-
w(e), r.current && (r.current.volume = e), e > 0 && T && (E(!1), r.current && (r.current.muted = !1));
|
|
351
|
-
},
|
|
352
|
-
onMuteToggle: P,
|
|
353
|
-
variant: "light"
|
|
354
|
-
})
|
|
355
|
-
]
|
|
356
|
-
})
|
|
357
|
-
]
|
|
358
|
-
});
|
|
359
|
-
}
|
|
360
|
-
//#endregion
|
|
361
|
-
//#region src/composed/file-preview/embed-preview.tsx
|
|
362
|
-
function S({ url: t, embedUrl: n, onError: i }) {
|
|
363
|
-
let [a, o] = f.useState(!1), [s, l] = f.useState(!1);
|
|
364
|
-
return f.useEffect(() => {
|
|
365
|
-
let e = setTimeout(() => {
|
|
366
|
-
a || (l(!0), i?.("Embed timed out"));
|
|
367
|
-
}, 15e3);
|
|
368
|
-
return () => clearTimeout(e);
|
|
369
|
-
}, [a, i]), s ? /* @__PURE__ */ p(d, {
|
|
370
|
-
message: "Could not load embed",
|
|
371
|
-
url: t
|
|
372
|
-
}) : /* @__PURE__ */ m("div", {
|
|
373
|
-
className: "relative w-full rounded-ds-md overflow-hidden",
|
|
374
|
-
style: { aspectRatio: "16 / 9" },
|
|
375
|
-
children: [!a && /* @__PURE__ */ p(c, { className: "absolute inset-0" }), /* @__PURE__ */ p(e.iframe, {
|
|
376
|
-
src: n,
|
|
377
|
-
title: "Embedded content",
|
|
378
|
-
onLoad: () => o(!0),
|
|
379
|
-
onError: () => {
|
|
380
|
-
l(!0), i?.("Embed failed to load");
|
|
381
|
-
},
|
|
382
|
-
initial: { opacity: 0 },
|
|
383
|
-
animate: { opacity: +!!a },
|
|
384
|
-
transition: r.fade,
|
|
385
|
-
className: "absolute inset-0 h-full w-full border-none",
|
|
386
|
-
allowFullScreen: !0
|
|
387
|
-
})]
|
|
388
|
-
});
|
|
389
|
-
}
|
|
390
|
-
//#endregion
|
|
391
391
|
//#region src/composed/file-preview.tsx
|
|
392
|
-
var C =
|
|
392
|
+
var C = u.lazy(() => import("./image-preview.js")), w = u.lazy(() => import("./document-preview.js"));
|
|
393
393
|
function T(e, t) {
|
|
394
394
|
if (t) {
|
|
395
395
|
if (t.startsWith("image/")) return "image";
|
|
@@ -429,61 +429,61 @@ function E(e) {
|
|
|
429
429
|
let r = e.match(/loom\.com\/share\/([^?]+)/);
|
|
430
430
|
return r ? `https://www.loom.com/embed/${r[1]}` : e;
|
|
431
431
|
}
|
|
432
|
-
function D({ url: e, type: t, mimeType:
|
|
433
|
-
let
|
|
434
|
-
return /* @__PURE__ */
|
|
435
|
-
className:
|
|
432
|
+
function D({ url: e, type: t, mimeType: s, alt: c, initialPage: l = 1, fileName: m, fileSize: h, onError: g, className: _, ...v }) {
|
|
433
|
+
let x = t ?? T(e, s), D = /* @__PURE__ */ d(o, { className: "h-64 w-full rounded-ds-md" });
|
|
434
|
+
return /* @__PURE__ */ f("div", {
|
|
435
|
+
className: n("flex flex-col gap-ds-03", _),
|
|
436
436
|
...v,
|
|
437
437
|
children: [
|
|
438
|
-
(
|
|
438
|
+
(m || h) && /* @__PURE__ */ f("div", {
|
|
439
439
|
className: "flex items-center gap-ds-03",
|
|
440
|
-
children: [
|
|
440
|
+
children: [m && /* @__PURE__ */ d("span", {
|
|
441
441
|
className: "text-ds-sm font-semibold text-surface-fg truncate",
|
|
442
|
-
children:
|
|
443
|
-
}),
|
|
442
|
+
children: m
|
|
443
|
+
}), h && /* @__PURE__ */ d(i, {
|
|
444
444
|
variant: "subtle",
|
|
445
445
|
size: "xs",
|
|
446
|
-
children:
|
|
446
|
+
children: h
|
|
447
447
|
})]
|
|
448
448
|
}),
|
|
449
|
-
|
|
449
|
+
x === "image" && /* @__PURE__ */ d(u.Suspense, {
|
|
450
450
|
fallback: D,
|
|
451
|
-
children: /* @__PURE__ */
|
|
451
|
+
children: /* @__PURE__ */ d(C, {
|
|
452
452
|
url: e,
|
|
453
|
-
alt:
|
|
453
|
+
alt: c,
|
|
454
454
|
onError: g
|
|
455
455
|
})
|
|
456
456
|
}),
|
|
457
|
-
|
|
457
|
+
x === "pdf" && /* @__PURE__ */ d(u.Suspense, {
|
|
458
458
|
fallback: D,
|
|
459
|
-
children: /* @__PURE__ */
|
|
459
|
+
children: /* @__PURE__ */ d(w, {
|
|
460
460
|
url: e,
|
|
461
461
|
initialPage: l,
|
|
462
462
|
onError: g
|
|
463
463
|
})
|
|
464
464
|
}),
|
|
465
|
-
|
|
465
|
+
x === "video" && /* @__PURE__ */ d(S, {
|
|
466
466
|
url: e,
|
|
467
467
|
onError: g
|
|
468
468
|
}),
|
|
469
|
-
|
|
469
|
+
x === "audio" && /* @__PURE__ */ d(y, {
|
|
470
470
|
url: e,
|
|
471
|
-
fileName:
|
|
471
|
+
fileName: m,
|
|
472
472
|
onError: g
|
|
473
473
|
}),
|
|
474
|
-
|
|
474
|
+
x === "embed" && /* @__PURE__ */ d(b, {
|
|
475
475
|
url: e,
|
|
476
476
|
embedUrl: E(e),
|
|
477
477
|
onError: g
|
|
478
478
|
}),
|
|
479
|
-
|
|
479
|
+
x !== "audio" && /* @__PURE__ */ d("div", {
|
|
480
480
|
className: "flex justify-end",
|
|
481
|
-
children: /* @__PURE__ */
|
|
481
|
+
children: /* @__PURE__ */ d(a, {
|
|
482
482
|
variant: "ghost",
|
|
483
483
|
size: "xs",
|
|
484
|
-
startIcon: /* @__PURE__ */
|
|
484
|
+
startIcon: /* @__PURE__ */ d(r, { icon: p }),
|
|
485
485
|
asChild: !0,
|
|
486
|
-
children: /* @__PURE__ */
|
|
486
|
+
children: /* @__PURE__ */ d("a", {
|
|
487
487
|
href: e,
|
|
488
488
|
download: !0,
|
|
489
489
|
target: "_blank",
|