@kortix/ui 0.0.0-bootstrap.0 → 0.14.3
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 +153 -2
- package/dist/_vendor/kortix-shared.js +341 -0
- package/dist/chat/agent-picker.d.ts +8 -0
- package/dist/chat/agent-picker.js +18 -0
- package/dist/chat/composer.d.ts +31 -0
- package/dist/chat/composer.js +114 -0
- package/dist/chat/index.d.ts +22 -0
- package/dist/chat/index.js +22 -0
- package/dist/chat/markdown.d.ts +10 -0
- package/dist/chat/markdown.js +36 -0
- package/dist/chat/message-list.d.ts +25 -0
- package/dist/chat/message-list.js +73 -0
- package/dist/chat/message-view.d.ts +17 -0
- package/dist/chat/message-view.js +86 -0
- package/dist/chat/model-picker.d.ts +10 -0
- package/dist/chat/model-picker.js +68 -0
- package/dist/chat/permission-prompt.d.ts +10 -0
- package/dist/chat/permission-prompt.js +40 -0
- package/dist/chat/question-prompt.d.ts +8 -0
- package/dist/chat/question-prompt.js +60 -0
- package/dist/chat/send-failure.d.ts +9 -0
- package/dist/chat/send-failure.js +21 -0
- package/dist/chat/session-thread.d.ts +28 -0
- package/dist/chat/session-thread.js +47 -0
- package/dist/chat/streaming-markdown.d.ts +21 -0
- package/dist/chat/streaming-markdown.js +59 -0
- package/dist/chat/tool-call.d.ts +4 -0
- package/dist/chat/tool-call.js +150 -0
- package/dist/chat/user-message-parts.d.ts +6 -0
- package/dist/chat/user-message-parts.js +11 -0
- package/dist/components/ui/accordion.d.ts +7 -0
- package/dist/components/ui/accordion.js +18 -0
- package/dist/components/ui/alert-dialog.d.ts +19 -0
- package/dist/components/ui/alert-dialog.js +48 -0
- package/dist/components/ui/alert.d.ts +13 -0
- package/dist/components/ui/alert.js +67 -0
- package/dist/components/ui/avatar.d.ts +11 -0
- package/dist/components/ui/avatar.js +23 -0
- package/dist/components/ui/back-pill.d.ts +13 -0
- package/dist/components/ui/back-pill.js +18 -0
- package/dist/components/ui/badge.d.ts +10 -0
- package/dist/components/ui/badge.js +42 -0
- package/dist/components/ui/breadcrumb.d.ts +11 -0
- package/dist/components/ui/breadcrumb.js +28 -0
- package/dist/components/ui/bubble.d.ts +20 -0
- package/dist/components/ui/bubble.js +38 -0
- package/dist/components/ui/button-group.d.ts +9 -0
- package/dist/components/ui/button-group.js +32 -0
- package/dist/components/ui/button.d.ts +13 -0
- package/dist/components/ui/button.js +67 -0
- package/dist/components/ui/calendar.d.ts +4 -0
- package/dist/components/ui/calendar.js +39 -0
- package/dist/components/ui/card.d.ts +96 -0
- package/dist/components/ui/card.js +291 -0
- package/dist/components/ui/chain-of-thought.d.ts +75 -0
- package/dist/components/ui/chain-of-thought.js +66 -0
- package/dist/components/ui/chart.d.ts +65 -0
- package/dist/components/ui/chart.js +118 -0
- package/dist/components/ui/checkbox-group.d.ts +19 -0
- package/dist/components/ui/checkbox-group.js +41 -0
- package/dist/components/ui/checkbox.d.ts +14 -0
- package/dist/components/ui/checkbox.js +27 -0
- package/dist/components/ui/collapsible.d.ts +5 -0
- package/dist/components/ui/collapsible.js +14 -0
- package/dist/components/ui/command.d.ts +58 -0
- package/dist/components/ui/command.js +135 -0
- package/dist/components/ui/confirm-dialog.d.ts +19 -0
- package/dist/components/ui/confirm-dialog.js +30 -0
- package/dist/components/ui/context-menu.d.ts +45 -0
- package/dist/components/ui/context-menu.js +93 -0
- package/dist/components/ui/count-badge.d.ts +26 -0
- package/dist/components/ui/count-badge.js +26 -0
- package/dist/components/ui/data-grid.d.ts +24 -0
- package/dist/components/ui/data-grid.js +107 -0
- package/dist/components/ui/date-range-picker.d.ts +119 -0
- package/dist/components/ui/date-range-picker.js +190 -0
- package/dist/components/ui/definition-list.d.ts +15 -0
- package/dist/components/ui/definition-list.js +26 -0
- package/dist/components/ui/dialog.d.ts +29 -0
- package/dist/components/ui/dialog.js +52 -0
- package/dist/components/ui/disclosure.d.ts +121 -0
- package/dist/components/ui/disclosure.js +138 -0
- package/dist/components/ui/dot-matrix/dotm-3x3-10.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-3x3-10.js +29 -0
- package/dist/components/ui/dot-matrix/dotm-3x3-12.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-3x3-12.js +19 -0
- package/dist/components/ui/dot-matrix/dotm-3x3-13.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-3x3-13.js +19 -0
- package/dist/components/ui/dot-matrix/dotm-3x3-15.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-3x3-15.js +22 -0
- package/dist/components/ui/dot-matrix/dotm-3x3-16.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-3x3-16.js +5 -0
- package/dist/components/ui/dot-matrix/dotm-3x3-18.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-3x3-18.js +5 -0
- package/dist/components/ui/dot-matrix/dotm-3x3-19.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-3x3-19.js +5 -0
- package/dist/components/ui/dot-matrix/dotm-3x3-2.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-3x3-2.js +3 -0
- package/dist/components/ui/dot-matrix/dotm-3x3-20.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-3x3-20.js +5 -0
- package/dist/components/ui/dot-matrix/dotm-3x3-21.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-3x3-21.js +5 -0
- package/dist/components/ui/dot-matrix/dotm-3x3-3.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-3x3-3.js +3 -0
- package/dist/components/ui/dot-matrix/dotm-3x3-4.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-3x3-4.js +3 -0
- package/dist/components/ui/dot-matrix/dotm-3x3-5.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-3x3-5.js +3 -0
- package/dist/components/ui/dot-matrix/dotm-3x3-6.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-3x3-6.js +19 -0
- package/dist/components/ui/dot-matrix/dotm-3x3-7.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-3x3-7.js +19 -0
- package/dist/components/ui/dot-matrix/dotm-3x3-8.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-3x3-8.js +19 -0
- package/dist/components/ui/dot-matrix/dotm-3x3-9.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-3x3-9.js +23 -0
- package/dist/components/ui/dot-matrix/dotm-circular-1.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-circular-1.js +28 -0
- package/dist/components/ui/dot-matrix/dotm-circular-10.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-circular-10.js +40 -0
- package/dist/components/ui/dot-matrix/dotm-circular-11.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-circular-11.js +37 -0
- package/dist/components/ui/dot-matrix/dotm-circular-12.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-circular-12.js +42 -0
- package/dist/components/ui/dot-matrix/dotm-circular-14.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-circular-14.js +37 -0
- package/dist/components/ui/dot-matrix/dotm-circular-15.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-circular-15.js +49 -0
- package/dist/components/ui/dot-matrix/dotm-circular-17.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-circular-17.js +31 -0
- package/dist/components/ui/dot-matrix/dotm-circular-2.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-circular-2.js +37 -0
- package/dist/components/ui/dot-matrix/dotm-circular-3.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-circular-3.js +54 -0
- package/dist/components/ui/dot-matrix/dotm-circular-4.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-circular-4.js +35 -0
- package/dist/components/ui/dot-matrix/dotm-circular-5.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-circular-5.js +30 -0
- package/dist/components/ui/dot-matrix/dotm-circular-6.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-circular-6.js +37 -0
- package/dist/components/ui/dot-matrix/dotm-circular-7.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-circular-7.js +25 -0
- package/dist/components/ui/dot-matrix/dotm-circular-8.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-circular-8.js +26 -0
- package/dist/components/ui/dot-matrix/dotm-circular-9.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-circular-9.js +41 -0
- package/dist/components/ui/dot-matrix/dotm-square-1.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-square-1.js +27 -0
- package/dist/components/ui/dot-matrix/dotm-square-10.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-square-10.js +27 -0
- package/dist/components/ui/dot-matrix/dotm-square-11.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-square-11.js +25 -0
- package/dist/components/ui/dot-matrix/dotm-square-12.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-square-12.js +28 -0
- package/dist/components/ui/dot-matrix/dotm-square-13.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-square-13.js +45 -0
- package/dist/components/ui/dot-matrix/dotm-square-14.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-square-14.js +38 -0
- package/dist/components/ui/dot-matrix/dotm-square-15.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-square-15.js +31 -0
- package/dist/components/ui/dot-matrix/dotm-square-16.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-square-16.js +33 -0
- package/dist/components/ui/dot-matrix/dotm-square-17.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-square-17.js +27 -0
- package/dist/components/ui/dot-matrix/dotm-square-18.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-square-18.js +29 -0
- package/dist/components/ui/dot-matrix/dotm-square-19.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-square-19.js +74 -0
- package/dist/components/ui/dot-matrix/dotm-square-2.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-square-2.js +72 -0
- package/dist/components/ui/dot-matrix/dotm-square-20.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-square-20.js +79 -0
- package/dist/components/ui/dot-matrix/dotm-square-3.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-square-3.js +23 -0
- package/dist/components/ui/dot-matrix/dotm-square-4.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-square-4.js +41 -0
- package/dist/components/ui/dot-matrix/dotm-square-5.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-square-5.js +23 -0
- package/dist/components/ui/dot-matrix/dotm-square-6.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-square-6.js +20 -0
- package/dist/components/ui/dot-matrix/dotm-square-7.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-square-7.js +43 -0
- package/dist/components/ui/dot-matrix/dotm-square-8.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-square-8.js +57 -0
- package/dist/components/ui/dot-matrix/dotm-square-9.d.ts +4 -0
- package/dist/components/ui/dot-matrix/dotm-square-9.js +89 -0
- package/dist/components/ui/dot-matrix/session-dot-matrix.d.ts +46 -0
- package/dist/components/ui/dot-matrix/session-dot-matrix.js +153 -0
- package/dist/components/ui/drawer.d.ts +15 -0
- package/dist/components/ui/drawer.js +35 -0
- package/dist/components/ui/dropdown-menu.d.ts +49 -0
- package/dist/components/ui/dropdown-menu.js +113 -0
- package/dist/components/ui/emoji-picker.d.ts +15 -0
- package/dist/components/ui/emoji-picker.js +137 -0
- package/dist/components/ui/emoji-tint.d.ts +41 -0
- package/dist/components/ui/emoji-tint.js +131 -0
- package/dist/components/ui/empty.d.ts +11 -0
- package/dist/components/ui/empty.js +33 -0
- package/dist/components/ui/entity-avatar.d.ts +84 -0
- package/dist/components/ui/entity-avatar.js +106 -0
- package/dist/components/ui/faded-scroll-area.d.ts +8 -0
- package/dist/components/ui/faded-scroll-area.js +80 -0
- package/dist/components/ui/favicon-avatar.d.ts +32 -0
- package/dist/components/ui/favicon-avatar.js +18 -0
- package/dist/components/ui/field.d.ts +15 -0
- package/dist/components/ui/field.js +48 -0
- package/dist/components/ui/file-tree.d.ts +32 -0
- package/dist/components/ui/file-tree.js +30 -0
- package/dist/components/ui/glyph-face.d.ts +18 -0
- package/dist/components/ui/glyph-face.js +37 -0
- package/dist/components/ui/glyph-paths-source.d.ts +2 -0
- package/dist/components/ui/glyph-paths-source.js +40 -0
- package/dist/components/ui/glyph-paths.generated.d.ts +2 -0
- package/dist/components/ui/glyph-paths.generated.js +207 -0
- package/dist/components/ui/glyph-picker.d.ts +22 -0
- package/dist/components/ui/glyph-picker.js +118 -0
- package/dist/components/ui/glyph-registry.d.ts +36 -0
- package/dist/components/ui/glyph-registry.js +479 -0
- package/dist/components/ui/glyph-tint.d.ts +6 -0
- package/dist/components/ui/glyph-tint.js +93 -0
- package/dist/components/ui/hint.d.ts +14 -0
- package/dist/components/ui/hint.js +12 -0
- package/dist/components/ui/histogram-bars.d.ts +38 -0
- package/dist/components/ui/histogram-bars.js +93 -0
- package/dist/components/ui/hover-card.d.ts +28 -0
- package/dist/components/ui/hover-card.js +35 -0
- package/dist/components/ui/icon-provider.d.ts +23 -0
- package/dist/components/ui/icon-provider.js +30 -0
- package/dist/components/ui/info-banner.d.ts +14 -0
- package/dist/components/ui/info-banner.js +72 -0
- package/dist/components/ui/inline-meta.d.ts +6 -0
- package/dist/components/ui/inline-meta.js +8 -0
- package/dist/components/ui/input-group.d.ts +19 -0
- package/dist/components/ui/input-group.js +73 -0
- package/dist/components/ui/input.d.ts +26 -0
- package/dist/components/ui/input.js +23 -0
- package/dist/components/ui/item.d.ts +23 -0
- package/dist/components/ui/item.js +67 -0
- package/dist/components/ui/kbd.d.ts +3 -0
- package/dist/components/ui/kbd.js +20 -0
- package/dist/components/ui/kortix-asterisk.d.ts +6 -0
- package/dist/components/ui/kortix-asterisk.js +17 -0
- package/dist/components/ui/kortix-icons.d.ts +2 -0
- package/dist/components/ui/kortix-icons.js +17 -0
- package/dist/components/ui/kortix-loader.d.ts +76 -0
- package/dist/components/ui/kortix-loader.js +74 -0
- package/dist/components/ui/kortix-logo.d.ts +30 -0
- package/dist/components/ui/kortix-logo.js +47 -0
- package/dist/components/ui/label.d.ts +4 -0
- package/dist/components/ui/label.js +9 -0
- package/dist/components/ui/list.d.ts +15 -0
- package/dist/components/ui/list.js +25 -0
- package/dist/components/ui/loading.d.ts +19 -0
- package/dist/components/ui/loading.js +31 -0
- package/dist/components/ui/local-time.d.ts +34 -0
- package/dist/components/ui/local-time.js +60 -0
- package/dist/components/ui/map.d.ts +101 -0
- package/dist/components/ui/map.js +257 -0
- package/dist/components/ui/marker.d.ts +14 -0
- package/dist/components/ui/marker.js +28 -0
- package/dist/components/ui/menu-recipe.d.ts +102 -0
- package/dist/components/ui/menu-recipe.js +129 -0
- package/dist/components/ui/mermaid-render.d.ts +51 -0
- package/dist/components/ui/mermaid-render.js +65 -0
- package/dist/components/ui/mermaid-renderer.d.ts +13 -0
- package/dist/components/ui/mermaid-renderer.js +340 -0
- package/dist/components/ui/message.d.ts +15 -0
- package/dist/components/ui/message.js +26 -0
- package/dist/components/ui/modal.d.ts +104 -0
- package/dist/components/ui/modal.js +180 -0
- package/dist/components/ui/navigation-menu.d.ts +16 -0
- package/dist/components/ui/navigation-menu.js +35 -0
- package/dist/components/ui/page-search-bar.d.ts +11 -0
- package/dist/components/ui/page-search-bar.js +13 -0
- package/dist/components/ui/phone-input.d.ts +7 -0
- package/dist/components/ui/phone-input.js +59 -0
- package/dist/components/ui/pixel-kortix-mark.d.ts +13 -0
- package/dist/components/ui/pixel-kortix-mark.js +40 -0
- package/dist/components/ui/popover.d.ts +10 -0
- package/dist/components/ui/popover.js +38 -0
- package/dist/components/ui/portal.d.ts +5 -0
- package/dist/components/ui/portal.js +15 -0
- package/dist/components/ui/preview-image.d.ts +14 -0
- package/dist/components/ui/preview-image.js +58 -0
- package/dist/components/ui/progress-ring.d.ts +6 -0
- package/dist/components/ui/progress-ring.js +9 -0
- package/dist/components/ui/progress.d.ts +6 -0
- package/dist/components/ui/progress.js +8 -0
- package/dist/components/ui/radio-group.d.ts +12 -0
- package/dist/components/ui/radio-group.js +20 -0
- package/dist/components/ui/resizable.d.ts +24 -0
- package/dist/components/ui/resizable.js +16 -0
- package/dist/components/ui/scroll-area.d.ts +5 -0
- package/dist/components/ui/scroll-area.js +11 -0
- package/dist/components/ui/section-card.d.ts +37 -0
- package/dist/components/ui/section-card.js +14 -0
- package/dist/components/ui/section.d.ts +10 -0
- package/dist/components/ui/section.js +22 -0
- package/dist/components/ui/select.d.ts +25 -0
- package/dist/components/ui/select.js +59 -0
- package/dist/components/ui/separator.d.ts +4 -0
- package/dist/components/ui/separator.js +8 -0
- package/dist/components/ui/shader-safe.d.ts +48 -0
- package/dist/components/ui/shader-safe.js +74 -0
- package/dist/components/ui/sheet.d.ts +32 -0
- package/dist/components/ui/sheet.js +55 -0
- package/dist/components/ui/sidebar-context.d.ts +72 -0
- package/dist/components/ui/sidebar-context.js +36 -0
- package/dist/components/ui/sidebar-menu-primitives.d.ts +38 -0
- package/dist/components/ui/sidebar-menu-primitives.js +97 -0
- package/dist/components/ui/sidebar-panel.d.ts +36 -0
- package/dist/components/ui/sidebar-panel.js +265 -0
- package/dist/components/ui/sidebar-peek.d.ts +27 -0
- package/dist/components/ui/sidebar-peek.js +70 -0
- package/dist/components/ui/sidebar-width.d.ts +48 -0
- package/dist/components/ui/sidebar-width.js +62 -0
- package/dist/components/ui/sidebar.d.ts +18 -0
- package/dist/components/ui/sidebar.js +194 -0
- package/dist/components/ui/skeleton.d.ts +3 -0
- package/dist/components/ui/skeleton.js +6 -0
- package/dist/components/ui/slider-native.d.ts +7 -0
- package/dist/components/ui/slider-native.js +16 -0
- package/dist/components/ui/slider.d.ts +14 -0
- package/dist/components/ui/slider.js +48 -0
- package/dist/components/ui/sliding-tab-indicator.d.ts +61 -0
- package/dist/components/ui/sliding-tab-indicator.js +128 -0
- package/dist/components/ui/split-sheet.d.ts +61 -0
- package/dist/components/ui/split-sheet.js +239 -0
- package/dist/components/ui/spotlight-card.d.ts +8 -0
- package/dist/components/ui/spotlight-card.js +43 -0
- package/dist/components/ui/status-ring.d.ts +38 -0
- package/dist/components/ui/status-ring.js +38 -0
- package/dist/components/ui/status.d.ts +58 -0
- package/dist/components/ui/status.js +76 -0
- package/dist/components/ui/stepper.d.ts +28 -0
- package/dist/components/ui/stepper.js +73 -0
- package/dist/components/ui/switch.d.ts +8 -0
- package/dist/components/ui/switch.js +131 -0
- package/dist/components/ui/system-message.d.ts +23 -0
- package/dist/components/ui/system-message.js +51 -0
- package/dist/components/ui/table.d.ts +10 -0
- package/dist/components/ui/table.js +28 -0
- package/dist/components/ui/tabs.d.ts +73 -0
- package/dist/components/ui/tabs.js +207 -0
- package/dist/components/ui/tag.d.ts +7 -0
- package/dist/components/ui/tag.js +22 -0
- package/dist/components/ui/text-shimmer.d.ts +13 -0
- package/dist/components/ui/text-shimmer.js +91 -0
- package/dist/components/ui/textarea.d.ts +33 -0
- package/dist/components/ui/textarea.js +87 -0
- package/dist/components/ui/toast.d.ts +105 -0
- package/dist/components/ui/toast.js +233 -0
- package/dist/components/ui/toggle.d.ts +12 -0
- package/dist/components/ui/toggle.js +26 -0
- package/dist/components/ui/tooltip.d.ts +9 -0
- package/dist/components/ui/tooltip.js +16 -0
- package/dist/components/ui/trigger-variants.d.ts +14 -0
- package/dist/components/ui/trigger-variants.js +67 -0
- package/dist/components/ui/type-to-confirm-dialog.d.ts +88 -0
- package/dist/components/ui/type-to-confirm-dialog.js +101 -0
- package/dist/components/ui/typed-title-logic.d.ts +22 -0
- package/dist/components/ui/typed-title-logic.js +33 -0
- package/dist/components/ui/typed-title.d.ts +38 -0
- package/dist/components/ui/typed-title.js +66 -0
- package/dist/components/ui/typing-animation.d.ts +36 -0
- package/dist/components/ui/typing-animation.js +141 -0
- package/dist/components/ui/user-avatar.d.ts +47 -0
- package/dist/components/ui/user-avatar.js +46 -0
- package/dist/hooks/use-debounce.d.ts +4 -0
- package/dist/hooks/use-debounce.js +17 -0
- package/dist/hooks/use-is-dark.d.ts +2 -0
- package/dist/hooks/use-is-dark.js +27 -0
- package/dist/hooks/use-mobile.d.ts +2 -0
- package/dist/hooks/use-mobile.js +15 -0
- package/dist/hooks/use-proximity-hover.d.ts +52 -0
- package/dist/hooks/use-proximity-hover.js +232 -0
- package/dist/icons/close.d.ts +2 -0
- package/dist/icons/close.js +7 -0
- package/dist/icons/copy.d.ts +3 -0
- package/dist/icons/copy.js +6 -0
- package/dist/icons/sidebar-toggle.d.ts +13 -0
- package/dist/icons/sidebar-toggle.js +13 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.js +33 -0
- package/dist/lib/dotmatrix-core.d.ts +113 -0
- package/dist/lib/dotmatrix-core.js +920 -0
- package/dist/lib/dotmatrix-hooks.d.ts +28 -0
- package/dist/lib/dotmatrix-hooks.js +151 -0
- package/dist/lib/favicon.d.ts +4 -0
- package/dist/lib/favicon.js +21 -0
- package/dist/lib/font-weight.d.ts +6 -0
- package/dist/lib/font-weight.js +6 -0
- package/dist/lib/icon-config.d.ts +33 -0
- package/dist/lib/icon-config.js +22 -0
- package/dist/lib/icon-context.d.ts +34 -0
- package/dist/lib/icon-context.js +81 -0
- package/dist/lib/portal-root.d.ts +8 -0
- package/dist/lib/portal-root.js +26 -0
- package/dist/lib/settle.d.ts +16 -0
- package/dist/lib/settle.js +29 -0
- package/dist/lib/springs.d.ts +31 -0
- package/dist/lib/springs.js +29 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/lib/utils.js +5 -0
- package/dist/lib/z-stack.d.ts +55 -0
- package/dist/lib/z-stack.js +130 -0
- package/dist/providers/ui-provider.d.ts +141 -0
- package/dist/providers/ui-provider.js +93 -0
- package/dist/styles/dotmatrix-loader.css +1239 -0
- package/dist/styles/fonts.css +46 -0
- package/dist/styles/tailwind.css +10 -0
- package/dist/styles/theme.css +1019 -0
- package/dist/styles/tokens.css +146 -0
- package/dist/styles.css +2 -0
- package/package.json +874 -4
- package/skills/kortix-ui/SKILL.md +150 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { createDotm5x5Component } from '../../../lib/dotmatrix-core.js';
|
|
3
|
+
const BASE_OPACITY = 0.08;
|
|
4
|
+
const LIT_OPACITY = 0.94;
|
|
5
|
+
const CAP_OPACITY = 1;
|
|
6
|
+
const STEP_COUNT = 24;
|
|
7
|
+
const MAX_LEVEL = 5;
|
|
8
|
+
function clampLevel(value) {
|
|
9
|
+
return Math.max(1, Math.min(MAX_LEVEL, Math.round(value)));
|
|
10
|
+
}
|
|
11
|
+
function makeResolver(cycle, reducedMotion) {
|
|
12
|
+
return ({ isActive, row, col, phase }) => {
|
|
13
|
+
if (!isActive) {
|
|
14
|
+
return { className: 'dmx-inactive' };
|
|
15
|
+
}
|
|
16
|
+
const t = reducedMotion || phase === 'idle' ? 0 : cycle * STEP_COUNT;
|
|
17
|
+
const colPhase = t * 0.52 + col * 1.15;
|
|
18
|
+
const level = clampLevel(1 + ((Math.sin(colPhase) + 1) / 2) * (MAX_LEVEL - 1));
|
|
19
|
+
const topLitRow = MAX_LEVEL - level;
|
|
20
|
+
if (row > topLitRow) {
|
|
21
|
+
return { style: { opacity: LIT_OPACITY } };
|
|
22
|
+
}
|
|
23
|
+
if (row === topLitRow) {
|
|
24
|
+
return { style: { opacity: CAP_OPACITY } };
|
|
25
|
+
}
|
|
26
|
+
return { style: { opacity: BASE_OPACITY } };
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
export const DotmSquare18 = createDotm5x5Component('DotmSquare18', makeResolver, { speed: 1.35, cycleMsBase: 1750 });
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { createDotm5x5Component } from '../../../lib/dotmatrix-core.js';
|
|
3
|
+
const STEP_COUNT = 48;
|
|
4
|
+
const BASE_OPACITY = 0.08;
|
|
5
|
+
const SECONDARY_TRAIL_OPACITY = 0.32;
|
|
6
|
+
const PRIMARY_TRAIL_OPACITY = 0.62;
|
|
7
|
+
const PEAK_OPACITY = 1;
|
|
8
|
+
const CURVE_OPACITY = 0.2;
|
|
9
|
+
const CURVE_SAMPLES = Array.from({ length: 96 }, (_, index) => {
|
|
10
|
+
const t = (index / 96) * Math.PI * 2;
|
|
11
|
+
return {
|
|
12
|
+
x: Math.sin(t),
|
|
13
|
+
y: 0.58 * Math.sin(2 * t),
|
|
14
|
+
};
|
|
15
|
+
});
|
|
16
|
+
function gridPoint(row, col) {
|
|
17
|
+
return {
|
|
18
|
+
x: (col - 2) / 2,
|
|
19
|
+
y: (2 - row) / 2,
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
function loopPoint(step) {
|
|
23
|
+
const t = ((step % STEP_COUNT) / STEP_COUNT) * Math.PI * 2;
|
|
24
|
+
return {
|
|
25
|
+
x: Math.sin(t),
|
|
26
|
+
y: 0.58 * Math.sin(2 * t),
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
function squaredDistance(a, b) {
|
|
30
|
+
const dx = a.x - b.x;
|
|
31
|
+
const dy = a.y - b.y;
|
|
32
|
+
return dx * dx + dy * dy;
|
|
33
|
+
}
|
|
34
|
+
function minCurveDistanceSq(point) {
|
|
35
|
+
let min = Number.POSITIVE_INFINITY;
|
|
36
|
+
for (const sample of CURVE_SAMPLES) {
|
|
37
|
+
min = Math.min(min, squaredDistance(point, sample));
|
|
38
|
+
}
|
|
39
|
+
return min;
|
|
40
|
+
}
|
|
41
|
+
function headInfluence(dot, head) {
|
|
42
|
+
const distSq = squaredDistance(dot, head);
|
|
43
|
+
return Math.exp(-distSq / 0.19);
|
|
44
|
+
}
|
|
45
|
+
function makeResolver(cycle, reducedMotion) {
|
|
46
|
+
return ({ isActive, row, col, phase }) => {
|
|
47
|
+
if (!isActive) {
|
|
48
|
+
return { className: 'dmx-inactive' };
|
|
49
|
+
}
|
|
50
|
+
const dot = gridPoint(row, col);
|
|
51
|
+
if (reducedMotion || phase === 'idle') {
|
|
52
|
+
const curveGlow = Math.exp(-minCurveDistanceSq(dot) / 0.2);
|
|
53
|
+
const centerBoost = Math.exp(-(dot.x * dot.x + dot.y * dot.y) / 0.06);
|
|
54
|
+
return {
|
|
55
|
+
style: {
|
|
56
|
+
opacity: Math.min(PEAK_OPACITY, BASE_OPACITY + curveGlow * CURVE_OPACITY + centerBoost * 0.18),
|
|
57
|
+
},
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
const headA = loopPoint(cycle);
|
|
61
|
+
const headB = loopPoint(cycle + STEP_COUNT / 2);
|
|
62
|
+
const trailA = loopPoint(cycle - 4);
|
|
63
|
+
const trailB = loopPoint(cycle + STEP_COUNT / 2 - 4);
|
|
64
|
+
const lead = Math.max(headInfluence(dot, headA), headInfluence(dot, headB));
|
|
65
|
+
const trail = Math.max(headInfluence(dot, trailA), headInfluence(dot, trailB));
|
|
66
|
+
const centerPulse = Math.exp(-(dot.x * dot.x + dot.y * dot.y) / 0.05) * (0.45 + 0.55 * lead);
|
|
67
|
+
const opacity = BASE_OPACITY +
|
|
68
|
+
SECONDARY_TRAIL_OPACITY * trail +
|
|
69
|
+
PRIMARY_TRAIL_OPACITY * lead +
|
|
70
|
+
0.16 * centerPulse;
|
|
71
|
+
return { style: { opacity: Math.min(PEAK_OPACITY, opacity) } };
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
export const DotmSquare19 = createDotm5x5Component('DotmSquare19', makeResolver, { speed: 1.45, cycleMsBase: 1700, steps: STEP_COUNT });
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { createDotm5x5Component, rowMajorIndex } from '../../../lib/dotmatrix-core.js';
|
|
3
|
+
const SNAKE_TAIL = [1, 0.82, 0.68, 0.54, 0.42, 0.31, 0.22, 0.14];
|
|
4
|
+
const BASE_OPACITY = 0.08;
|
|
5
|
+
function buildRowCyclePath() {
|
|
6
|
+
const path = [];
|
|
7
|
+
const push = (row, col) => path.push(rowMajorIndex(row, col));
|
|
8
|
+
// 1st col: bottom -> top
|
|
9
|
+
for (let row = 4; row >= 0; row -= 1)
|
|
10
|
+
push(row, 0);
|
|
11
|
+
// top to 3rd col
|
|
12
|
+
push(0, 1);
|
|
13
|
+
push(0, 2);
|
|
14
|
+
// 3rd col: top -> bottom
|
|
15
|
+
for (let row = 1; row <= 4; row += 1)
|
|
16
|
+
push(row, 2);
|
|
17
|
+
// bottom left to 2nd col
|
|
18
|
+
push(4, 1);
|
|
19
|
+
// 2nd col: bottom -> top
|
|
20
|
+
for (let row = 3; row >= 0; row -= 1)
|
|
21
|
+
push(row, 1);
|
|
22
|
+
// top right to 4th col
|
|
23
|
+
push(0, 2);
|
|
24
|
+
push(0, 3);
|
|
25
|
+
// 4th col: top -> bottom
|
|
26
|
+
for (let row = 1; row <= 4; row += 1)
|
|
27
|
+
push(row, 3);
|
|
28
|
+
// bottom left to 3rd col
|
|
29
|
+
push(4, 2);
|
|
30
|
+
// 3rd col: bottom -> top
|
|
31
|
+
for (let row = 3; row >= 0; row -= 1)
|
|
32
|
+
push(row, 2);
|
|
33
|
+
// top right to 5th col
|
|
34
|
+
push(0, 3);
|
|
35
|
+
push(0, 4);
|
|
36
|
+
// 5th col: top -> bottom
|
|
37
|
+
for (let row = 1; row <= 4; row += 1)
|
|
38
|
+
push(row, 4);
|
|
39
|
+
return path;
|
|
40
|
+
}
|
|
41
|
+
const route = buildRowCyclePath();
|
|
42
|
+
const routeLen = route.length;
|
|
43
|
+
const visitsByIndex = (() => {
|
|
44
|
+
const visits = new Map();
|
|
45
|
+
for (let step = 0; step < routeLen; step += 1) {
|
|
46
|
+
const index = route[step];
|
|
47
|
+
const list = visits.get(index) ?? [];
|
|
48
|
+
list.push(step);
|
|
49
|
+
visits.set(index, list);
|
|
50
|
+
}
|
|
51
|
+
return visits;
|
|
52
|
+
})();
|
|
53
|
+
function makeResolver(cycle) {
|
|
54
|
+
return ({ isActive, index }) => {
|
|
55
|
+
if (!isActive) {
|
|
56
|
+
return { className: 'dmx-inactive' };
|
|
57
|
+
}
|
|
58
|
+
if (routeLen <= 0) {
|
|
59
|
+
return { style: { opacity: BASE_OPACITY } };
|
|
60
|
+
}
|
|
61
|
+
const visits = visitsByIndex.get(index) ?? [];
|
|
62
|
+
let opacity = BASE_OPACITY;
|
|
63
|
+
for (const stepIndex of visits) {
|
|
64
|
+
const distance = (cycle - stepIndex + routeLen) % routeLen;
|
|
65
|
+
if (distance >= 0 && distance < SNAKE_TAIL.length) {
|
|
66
|
+
opacity = Math.max(opacity, SNAKE_TAIL[distance]);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return { style: { opacity } };
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
export const DotmSquare2 = createDotm5x5Component('DotmSquare2', makeResolver, { speed: 1.15, cycleMsBase: 1500, steps: routeLen });
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { createDotm5x5Component, rowMajorIndex } from '../../../lib/dotmatrix-core.js';
|
|
3
|
+
/** Clockwise perimeter: one closed loop you can trace with your eye. */
|
|
4
|
+
const PERIMETER_PATH = [
|
|
5
|
+
rowMajorIndex(0, 0),
|
|
6
|
+
rowMajorIndex(0, 1),
|
|
7
|
+
rowMajorIndex(0, 2),
|
|
8
|
+
rowMajorIndex(0, 3),
|
|
9
|
+
rowMajorIndex(0, 4),
|
|
10
|
+
rowMajorIndex(1, 4),
|
|
11
|
+
rowMajorIndex(2, 4),
|
|
12
|
+
rowMajorIndex(3, 4),
|
|
13
|
+
rowMajorIndex(4, 4),
|
|
14
|
+
rowMajorIndex(4, 3),
|
|
15
|
+
rowMajorIndex(4, 2),
|
|
16
|
+
rowMajorIndex(4, 1),
|
|
17
|
+
rowMajorIndex(4, 0),
|
|
18
|
+
rowMajorIndex(3, 0),
|
|
19
|
+
rowMajorIndex(2, 0),
|
|
20
|
+
rowMajorIndex(1, 0),
|
|
21
|
+
];
|
|
22
|
+
const LOOP_LEN = PERIMETER_PATH.length;
|
|
23
|
+
const TAIL_BRIGHT = [1, 0.82, 0.64, 0.46, 0.3, 0.18];
|
|
24
|
+
const BACK_TAIL_BRIGHT = [0.38, 0.3, 0.22, 0.14];
|
|
25
|
+
const BASE_OPACITY = 0.08;
|
|
26
|
+
const TWIST_INNER_OPACITY = 0.52;
|
|
27
|
+
const SEAM_PULSE_OPACITY = 0.55;
|
|
28
|
+
const IDLE_RING_OPACITY = 0.48;
|
|
29
|
+
/** Corner steps on the loop → one cell “inside” the strip at the fold (half-twist cue). */
|
|
30
|
+
const TWIST_INNER_BY_HEAD_STEP = new Map([
|
|
31
|
+
[0, rowMajorIndex(1, 1)],
|
|
32
|
+
[4, rowMajorIndex(1, 3)],
|
|
33
|
+
[8, rowMajorIndex(3, 3)],
|
|
34
|
+
[12, rowMajorIndex(3, 1)],
|
|
35
|
+
]);
|
|
36
|
+
function pathStepForCellIndex(cellIndex) {
|
|
37
|
+
const step = PERIMETER_PATH.indexOf(cellIndex);
|
|
38
|
+
return step;
|
|
39
|
+
}
|
|
40
|
+
function opacityFromTail(distance, tail) {
|
|
41
|
+
if (distance < 0 || distance >= tail.length) {
|
|
42
|
+
return 0;
|
|
43
|
+
}
|
|
44
|
+
return tail[distance];
|
|
45
|
+
}
|
|
46
|
+
function makeResolver(cycle, reducedMotion) {
|
|
47
|
+
return ({ isActive, index, phase }) => {
|
|
48
|
+
if (!isActive) {
|
|
49
|
+
return { className: 'dmx-inactive' };
|
|
50
|
+
}
|
|
51
|
+
const onLoop = pathStepForCellIndex(index);
|
|
52
|
+
const backHead = (cycle + Math.floor(LOOP_LEN / 2)) % LOOP_LEN;
|
|
53
|
+
if (reducedMotion || phase === 'idle') {
|
|
54
|
+
if (onLoop >= 0) {
|
|
55
|
+
return { style: { opacity: IDLE_RING_OPACITY } };
|
|
56
|
+
}
|
|
57
|
+
if (index === rowMajorIndex(2, 2)) {
|
|
58
|
+
return { style: { opacity: 0.22 } };
|
|
59
|
+
}
|
|
60
|
+
return { style: { opacity: BASE_OPACITY } };
|
|
61
|
+
}
|
|
62
|
+
let opacity = BASE_OPACITY;
|
|
63
|
+
if (onLoop >= 0) {
|
|
64
|
+
const forward = (cycle - onLoop + LOOP_LEN) % LOOP_LEN;
|
|
65
|
+
const alongBack = (backHead - onLoop + LOOP_LEN) % LOOP_LEN;
|
|
66
|
+
opacity = Math.max(opacity, opacityFromTail(forward, TAIL_BRIGHT), opacityFromTail(alongBack, BACK_TAIL_BRIGHT));
|
|
67
|
+
}
|
|
68
|
+
const twistInner = TWIST_INNER_BY_HEAD_STEP.get(cycle);
|
|
69
|
+
if (twistInner === index) {
|
|
70
|
+
opacity = Math.max(opacity, TWIST_INNER_OPACITY);
|
|
71
|
+
}
|
|
72
|
+
const seam = rowMajorIndex(2, 2);
|
|
73
|
+
if (index === seam && cycle % 4 === 0) {
|
|
74
|
+
opacity = Math.max(opacity, SEAM_PULSE_OPACITY);
|
|
75
|
+
}
|
|
76
|
+
return { style: { opacity: Math.min(1, opacity) } };
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
export const DotmSquare20 = createDotm5x5Component('DotmSquare20', makeResolver, { speed: 1.45, cycleMsBase: 1600, steps: LOOP_LEN });
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { createDotm5x5Component, spiralInwardNormFromIndex, spiralInwardOrderValue, } from '../../../lib/dotmatrix-core.js';
|
|
3
|
+
const animationResolver = ({ isActive, index, reducedMotion, phase }) => {
|
|
4
|
+
if (!isActive) {
|
|
5
|
+
return { className: 'dmx-inactive' };
|
|
6
|
+
}
|
|
7
|
+
const order = spiralInwardOrderValue(index);
|
|
8
|
+
const pathNorm = spiralInwardNormFromIndex(index);
|
|
9
|
+
const style = { '--dmx-spiral-order': order };
|
|
10
|
+
if (reducedMotion || phase === 'idle') {
|
|
11
|
+
return {
|
|
12
|
+
style: {
|
|
13
|
+
...style,
|
|
14
|
+
opacity: 0.16 + pathNorm * 0.78,
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
return { className: 'dmx-spiral-snake', style };
|
|
19
|
+
};
|
|
20
|
+
function makeResolver() {
|
|
21
|
+
return animationResolver;
|
|
22
|
+
}
|
|
23
|
+
export const DotmSquare3 = createDotm5x5Component('DotmSquare3', makeResolver, { speed: 1.35 });
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { createDotm5x5Component, middleRingAntiClockwiseNormFromIndex, middleRingAntiClockwiseOrderValue, outerRingClockwiseNormFromIndex, outerRingClockwiseOrderValue, } from '../../../lib/dotmatrix-core.js';
|
|
3
|
+
const animationResolver = ({ isActive, index, row, col, reducedMotion, phase, }) => {
|
|
4
|
+
if (!isActive) {
|
|
5
|
+
return { className: 'dmx-inactive' };
|
|
6
|
+
}
|
|
7
|
+
const isCenter = row === 2 && col === 2;
|
|
8
|
+
if (isCenter) {
|
|
9
|
+
return { className: 'dmx-inactive' };
|
|
10
|
+
}
|
|
11
|
+
const outerOrder = outerRingClockwiseOrderValue(index);
|
|
12
|
+
if (outerOrder >= 0) {
|
|
13
|
+
const outerNorm = outerRingClockwiseNormFromIndex(index);
|
|
14
|
+
const style = { '--dmx-outer-order': outerOrder };
|
|
15
|
+
if (reducedMotion || phase === 'idle') {
|
|
16
|
+
return {
|
|
17
|
+
style: {
|
|
18
|
+
...style,
|
|
19
|
+
opacity: 0.2 + outerNorm * 0.72,
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
return { className: 'dmx-outer-snake', style };
|
|
24
|
+
}
|
|
25
|
+
const middleOrder = middleRingAntiClockwiseOrderValue(index);
|
|
26
|
+
const middleNorm = middleRingAntiClockwiseNormFromIndex(index);
|
|
27
|
+
const style = { '--dmx-middle-order': middleOrder };
|
|
28
|
+
if (reducedMotion || phase === 'idle') {
|
|
29
|
+
return {
|
|
30
|
+
style: {
|
|
31
|
+
...style,
|
|
32
|
+
opacity: 0.2 + middleNorm * 0.72,
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
return { className: 'dmx-middle-snake', style };
|
|
37
|
+
};
|
|
38
|
+
function makeResolver() {
|
|
39
|
+
return animationResolver;
|
|
40
|
+
}
|
|
41
|
+
export const DotmSquare4 = createDotm5x5Component('DotmSquare4', makeResolver, { speed: 1.35 });
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { diagonalSnakeNormFromIndex, diagonalSnakeOrderValue, createDotm5x5Component, } from '../../../lib/dotmatrix-core.js';
|
|
3
|
+
const animationResolver = ({ isActive, index, reducedMotion, phase }) => {
|
|
4
|
+
if (!isActive) {
|
|
5
|
+
return { className: 'dmx-inactive' };
|
|
6
|
+
}
|
|
7
|
+
const order = diagonalSnakeOrderValue(index);
|
|
8
|
+
const pathNorm = diagonalSnakeNormFromIndex(index);
|
|
9
|
+
const style = { '--dmx-diagonal-snake-order': order };
|
|
10
|
+
if (reducedMotion || phase === 'idle') {
|
|
11
|
+
return {
|
|
12
|
+
style: {
|
|
13
|
+
...style,
|
|
14
|
+
opacity: 0.16 + pathNorm * 0.78,
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
return { className: 'dmx-diagonal-snake', style };
|
|
19
|
+
};
|
|
20
|
+
function makeResolver() {
|
|
21
|
+
return animationResolver;
|
|
22
|
+
}
|
|
23
|
+
export const DotmSquare5 = createDotm5x5Component('DotmSquare5', makeResolver, { speed: 1.35 });
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { createDotm5x5Component } from '../../../lib/dotmatrix-core.js';
|
|
3
|
+
const COLUMN_HEIGHT = 5;
|
|
4
|
+
function makeResolver(_cycle, reducedMotion) {
|
|
5
|
+
return ({ isActive, row, col, phase }) => {
|
|
6
|
+
if (!isActive) {
|
|
7
|
+
return { className: 'dmx-inactive' };
|
|
8
|
+
}
|
|
9
|
+
const goesUp = col % 2 === 0;
|
|
10
|
+
const position = goesUp ? COLUMN_HEIGHT - 1 - row : row;
|
|
11
|
+
if (reducedMotion || phase === 'idle') {
|
|
12
|
+
return { style: { opacity: 0.22 + (position / (COLUMN_HEIGHT - 1)) * 0.66 } };
|
|
13
|
+
}
|
|
14
|
+
return {
|
|
15
|
+
className: 'dmx-square6-col-snake',
|
|
16
|
+
style: { '--dmx-col-pos': position },
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export const DotmSquare6 = createDotm5x5Component('DotmSquare6', makeResolver, { speed: 2.2 });
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { createDotm5x5Component, rowMajorIndex } from '../../../lib/dotmatrix-core.js';
|
|
3
|
+
const BASE_OPACITY = 0.08;
|
|
4
|
+
const SETTLED_OPACITY = 0.42;
|
|
5
|
+
const ACTIVE_OPACITY = 1;
|
|
6
|
+
const CLEAR_OPACITY = 0.88;
|
|
7
|
+
const IDLE_STEP = 10;
|
|
8
|
+
const FRAME_MASKS = [
|
|
9
|
+
'.....' + '.....' + '.....' + '.....' + 'ooooo',
|
|
10
|
+
'.....' + '.....' + '.....' + 'ooooo' + 'ooooo',
|
|
11
|
+
'.....' + '.....' + 'ooooo' + 'ooooo' + 'ooooo',
|
|
12
|
+
'.....' + 'ooooo' + 'ooooo' + 'ooooo' + 'ooooo',
|
|
13
|
+
'ooooo' + 'ooooo' + 'ooooo' + 'ooooo' + 'ooooo',
|
|
14
|
+
'ccccc' + 'ccccc' + 'ccccc' + 'ccccc' + 'ccccc',
|
|
15
|
+
'.....' + '.....' + '.....' + '.....' + '.....',
|
|
16
|
+
'ccccc' + 'ccccc' + 'ccccc' + 'ccccc' + 'ccccc',
|
|
17
|
+
'.....' + '.....' + '.....' + '.....' + '.....',
|
|
18
|
+
'.....' + '.....' + '.....' + '.....' + '.....',
|
|
19
|
+
];
|
|
20
|
+
const FRAME_SEQUENCE = [0, 1, 2, 3, 4, 4, 5, 6, 7, 8, 9];
|
|
21
|
+
function maskCell(mask, row, col) {
|
|
22
|
+
return mask[rowMajorIndex(row, col)] ?? '.';
|
|
23
|
+
}
|
|
24
|
+
function makeResolver(cycle, reducedMotion) {
|
|
25
|
+
const frame = FRAME_SEQUENCE[cycle] ?? FRAME_SEQUENCE[0] ?? 0;
|
|
26
|
+
return ({ isActive, row, col }) => {
|
|
27
|
+
if (!isActive) {
|
|
28
|
+
return { className: 'dmx-inactive' };
|
|
29
|
+
}
|
|
30
|
+
const cell = maskCell(FRAME_MASKS[frame], row, col);
|
|
31
|
+
if (cell === 'x') {
|
|
32
|
+
return { style: { opacity: ACTIVE_OPACITY } };
|
|
33
|
+
}
|
|
34
|
+
if (cell === 'o') {
|
|
35
|
+
return { style: { opacity: SETTLED_OPACITY } };
|
|
36
|
+
}
|
|
37
|
+
if (cell === 'c') {
|
|
38
|
+
return { style: { opacity: CLEAR_OPACITY } };
|
|
39
|
+
}
|
|
40
|
+
return { style: { opacity: BASE_OPACITY } };
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
export const DotmSquare7 = createDotm5x5Component('DotmSquare7', makeResolver, { speed: 1.35, cycleMsBase: 1900, steps: FRAME_SEQUENCE.length, idleStep: Math.min(IDLE_STEP, FRAME_SEQUENCE.length - 1) });
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { createDotm5x5Component, MATRIX_SIZE } from '../../../lib/dotmatrix-core.js';
|
|
3
|
+
const ROWS = MATRIX_SIZE;
|
|
4
|
+
const COLS = MATRIX_SIZE;
|
|
5
|
+
/** Steps 0..FILL_LAST: column `c` gains one row from the bottom each tick, delayed by `c` (col 0 full at `ROWS`, last col at `ROWS + COLS - 1`). */
|
|
6
|
+
const FILL_LAST = ROWS + COLS - 1;
|
|
7
|
+
const BLINK_STEPS = 4;
|
|
8
|
+
const BLINK_OPACITIES = [0.38, 1, 0.38, 1];
|
|
9
|
+
const DRAIN_LAST = FILL_LAST;
|
|
10
|
+
/** fillTick 0..FILL_LAST → drainTick 0..DRAIN_LAST → + blink in between */
|
|
11
|
+
const SEQUENCE_LEN = FILL_LAST + 1 + BLINK_STEPS + DRAIN_LAST + 1;
|
|
12
|
+
const BASE_OPACITY = 0.08;
|
|
13
|
+
const SETTLED_OPACITY = 0.52;
|
|
14
|
+
const CAP_OPACITY = 1;
|
|
15
|
+
function fillHeight(col, fillTick) {
|
|
16
|
+
return Math.max(0, Math.min(ROWS, fillTick - col));
|
|
17
|
+
}
|
|
18
|
+
function drainHeight(col, drainTick) {
|
|
19
|
+
return Math.max(0, Math.min(ROWS, ROWS - Math.max(0, drainTick - col)));
|
|
20
|
+
}
|
|
21
|
+
function makeResolver(cycle, reducedMotion) {
|
|
22
|
+
return ({ isActive, row, col, phase }) => {
|
|
23
|
+
if (!isActive) {
|
|
24
|
+
return { className: 'dmx-inactive' };
|
|
25
|
+
}
|
|
26
|
+
if (reducedMotion || phase === 'idle') {
|
|
27
|
+
return { style: { opacity: BASE_OPACITY } };
|
|
28
|
+
}
|
|
29
|
+
let height = 0;
|
|
30
|
+
let blinkOpacity = null;
|
|
31
|
+
if (cycle <= FILL_LAST) {
|
|
32
|
+
height = fillHeight(col, cycle);
|
|
33
|
+
}
|
|
34
|
+
else if (cycle < FILL_LAST + 1 + BLINK_STEPS) {
|
|
35
|
+
height = ROWS;
|
|
36
|
+
blinkOpacity = BLINK_OPACITIES[cycle - (FILL_LAST + 1)] ?? 1;
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
const drainTick = cycle - (FILL_LAST + 1 + BLINK_STEPS);
|
|
40
|
+
height = drainHeight(col, drainTick);
|
|
41
|
+
}
|
|
42
|
+
const bottomRow = ROWS - 1;
|
|
43
|
+
const topLitRow = ROWS - height;
|
|
44
|
+
const isLit = height > 0 && row >= topLitRow && row <= bottomRow;
|
|
45
|
+
if (!isLit) {
|
|
46
|
+
return { style: { opacity: BASE_OPACITY } };
|
|
47
|
+
}
|
|
48
|
+
if (blinkOpacity !== null) {
|
|
49
|
+
return { style: { opacity: blinkOpacity } };
|
|
50
|
+
}
|
|
51
|
+
const isCap = row === topLitRow && height > 0 && height < ROWS;
|
|
52
|
+
return {
|
|
53
|
+
style: { opacity: isCap ? CAP_OPACITY : SETTLED_OPACITY },
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
export const DotmSquare8 = createDotm5x5Component('DotmSquare8', makeResolver, { speed: 1.4, cycleMsBase: 2000, steps: SEQUENCE_LEN });
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { createDotm5x5Component } from '../../../lib/dotmatrix-core.js';
|
|
3
|
+
/**
|
|
4
|
+
* Dots 1–6 in Unicode / ISO braille numbering (matches U+2800 + mask):
|
|
5
|
+
* 1·4
|
|
6
|
+
* 2·5
|
|
7
|
+
* 3·6
|
|
8
|
+
*/
|
|
9
|
+
const D1 = 0x01;
|
|
10
|
+
const D2 = 0x02;
|
|
11
|
+
const D3 = 0x04;
|
|
12
|
+
const D4 = 0x08;
|
|
13
|
+
const D5 = 0x10;
|
|
14
|
+
const D6 = 0x20;
|
|
15
|
+
/** Left column “odd” / right column “even” — classic 2×3 checkerboard. */
|
|
16
|
+
const CHECK_A = D1 | D3 | D5;
|
|
17
|
+
const BASE_OPACITY = 0.08;
|
|
18
|
+
const MID_OPACITY = 0.26;
|
|
19
|
+
const GAP_OPACITY = 0.12;
|
|
20
|
+
const CELL_ROW_START = 1;
|
|
21
|
+
const LEFT_COL = 0;
|
|
22
|
+
const RIGHT_CELL_COL = 3;
|
|
23
|
+
function brailleBitForCell(row, col, cellColStart) {
|
|
24
|
+
if (row < CELL_ROW_START || row > CELL_ROW_START + 2) {
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
const dr = row - CELL_ROW_START;
|
|
28
|
+
if (col === cellColStart) {
|
|
29
|
+
return D1 << dr;
|
|
30
|
+
}
|
|
31
|
+
if (col === cellColStart + 1) {
|
|
32
|
+
return D4 << dr;
|
|
33
|
+
}
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
function resolveBraille(row, col) {
|
|
37
|
+
const left = brailleBitForCell(row, col, LEFT_COL);
|
|
38
|
+
if (left !== null) {
|
|
39
|
+
return { bit: left };
|
|
40
|
+
}
|
|
41
|
+
const right = brailleBitForCell(row, col, RIGHT_CELL_COL);
|
|
42
|
+
if (right !== null) {
|
|
43
|
+
return { bit: right };
|
|
44
|
+
}
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
function makeResolver(_cycle, reducedMotion) {
|
|
48
|
+
return ({ isActive, row, col, phase }) => {
|
|
49
|
+
if (!isActive) {
|
|
50
|
+
return { className: 'dmx-inactive' };
|
|
51
|
+
}
|
|
52
|
+
const braille = resolveBraille(row, col);
|
|
53
|
+
if (reducedMotion || phase === 'idle') {
|
|
54
|
+
if (braille) {
|
|
55
|
+
const mask = CHECK_A;
|
|
56
|
+
const on = (mask & braille.bit) !== 0;
|
|
57
|
+
return { style: { opacity: on ? MID_OPACITY : BASE_OPACITY } };
|
|
58
|
+
}
|
|
59
|
+
if (row >= CELL_ROW_START && row <= CELL_ROW_START + 2 && col === 2) {
|
|
60
|
+
return { style: { opacity: GAP_OPACITY } };
|
|
61
|
+
}
|
|
62
|
+
return { style: { opacity: BASE_OPACITY } };
|
|
63
|
+
}
|
|
64
|
+
if (row >= CELL_ROW_START && row <= CELL_ROW_START + 2 && col === 2) {
|
|
65
|
+
return { style: { opacity: GAP_OPACITY } };
|
|
66
|
+
}
|
|
67
|
+
if (!braille) {
|
|
68
|
+
return { style: { opacity: BASE_OPACITY } };
|
|
69
|
+
}
|
|
70
|
+
let bitClass = 'dmx-square9-d1';
|
|
71
|
+
if (braille.bit === D2) {
|
|
72
|
+
bitClass = 'dmx-square9-d2';
|
|
73
|
+
}
|
|
74
|
+
else if (braille.bit === D3) {
|
|
75
|
+
bitClass = 'dmx-square9-d3';
|
|
76
|
+
}
|
|
77
|
+
else if (braille.bit === D4) {
|
|
78
|
+
bitClass = 'dmx-square9-d4';
|
|
79
|
+
}
|
|
80
|
+
else if (braille.bit === D5) {
|
|
81
|
+
bitClass = 'dmx-square9-d5';
|
|
82
|
+
}
|
|
83
|
+
else if (braille.bit === D6) {
|
|
84
|
+
bitClass = 'dmx-square9-d6';
|
|
85
|
+
}
|
|
86
|
+
return { className: `dmx-square9-bit ${bitClass}` };
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
export const DotmSquare9 = createDotm5x5Component('DotmSquare9', makeResolver, { speed: 1.5 });
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The session-keyed dot-matrix picker.
|
|
3
|
+
*
|
|
4
|
+
* Every session gets its own busy-indicator animation: the session_id is
|
|
5
|
+
* hashed (FNV-1a) onto one of the variants below, so the choice is RANDOM
|
|
6
|
+
* ACROSS SESSIONS but STABLE WITHIN one — the same session shows the same
|
|
7
|
+
* matrix on every render, reload, and device, with no stored state and no
|
|
8
|
+
* `Math.random()`. A new session rolls a new glyph simply by having a new id.
|
|
9
|
+
*
|
|
10
|
+
* `DOT_MATRIX_CATALOG` is the curated set of variants: the 3x3, circular,
|
|
11
|
+
* and square families only — hex and triangle are intentionally out (they
|
|
12
|
+
* read poorly at the 14px busy-indicator size) and must not be added back.
|
|
13
|
+
* `/debug/dot-matrix` renders the full catalog; the live session pool is
|
|
14
|
+
* the catalog filtered to `SESSION_DOT_MATRIX_FAMILIES`. Order changes
|
|
15
|
+
* reshuffle which session gets which glyph (harmless — the mapping is
|
|
16
|
+
* cosmetic), but keep new entries APPENDED inside their family so existing
|
|
17
|
+
* sessions keep their glyph.
|
|
18
|
+
*
|
|
19
|
+
* `SessionDotMatrix` with no `sessionId` renders `DotmSquare14` — the
|
|
20
|
+
* pre-existing default — so session-less surfaces (the home demo, the debug
|
|
21
|
+
* harness) keep today's visual.
|
|
22
|
+
*/
|
|
23
|
+
import type { ComponentType } from 'react';
|
|
24
|
+
import type { DotMatrixCommonProps } from '../../../lib/dotmatrix-core.js';
|
|
25
|
+
export type DotMatrixFamily = '3x3' | 'circular' | 'square';
|
|
26
|
+
export type DotMatrixCatalogEntry = {
|
|
27
|
+
name: string;
|
|
28
|
+
family: DotMatrixFamily;
|
|
29
|
+
Component: ComponentType<DotMatrixCommonProps>;
|
|
30
|
+
};
|
|
31
|
+
export declare const DOT_MATRIX_CATALOG: readonly DotMatrixCatalogEntry[];
|
|
32
|
+
export declare const SESSION_DOT_MATRIX_FAMILIES: ReadonlySet<DotMatrixFamily>;
|
|
33
|
+
export declare const SESSION_DOT_MATRIX_POOL: readonly DotMatrixCatalogEntry[];
|
|
34
|
+
export declare const SESSION_DOT_MATRIX_VARIANTS: readonly ComponentType<DotMatrixCommonProps>[];
|
|
35
|
+
/**
|
|
36
|
+
* FNV-1a over the session id, reduced onto the registry. Deterministic and
|
|
37
|
+
* dependency-free; `Math.imul` keeps the multiply in 32-bit space and
|
|
38
|
+
* `>>> 0` makes the result unsigned before the modulo.
|
|
39
|
+
*/
|
|
40
|
+
export declare function sessionDotMatrixIndex(sessionId: string): number;
|
|
41
|
+
export type SessionDotMatrixProps = DotMatrixCommonProps & {
|
|
42
|
+
/** Picks the variant. Absent → `DotmSquare14`, the pre-existing default. */
|
|
43
|
+
sessionId?: string;
|
|
44
|
+
};
|
|
45
|
+
export declare function fiveByFiveDotSizeFor(size: number): number;
|
|
46
|
+
export declare function SessionDotMatrix({ sessionId, ...props }: SessionDotMatrixProps): import("react").JSX.Element;
|