@heyramzi/ui 0.0.0-stage → 6.1.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/COMPONENTS.md +141 -0
- package/README.md +130 -2
- package/package.json +215 -3
- package/scripts/lib/sync-core.mjs +113 -0
- package/scripts/relative-imports.mjs +39 -0
- package/scripts/sf-symbol.mjs +93 -0
- package/scripts/sync-shadcn.mjs +341 -0
- package/scripts/sync-transitions.mjs +146 -0
- package/scripts/validate-apple-symbol-exports.mjs +45 -0
- package/src/agents/agent-avatar.svelte +639 -0
- package/src/agents/agent-cast.svelte +173 -0
- package/src/agents/demo.svelte +78 -0
- package/src/agents/index.ts +11 -0
- package/src/agents/types.ts +72 -0
- package/src/agents/vendor/LICENSE +21 -0
- package/src/agents/vendor/color.ts +155 -0
- package/src/agents/vendor/draw.ts +840 -0
- package/src/agents/vendor/engine.ts +845 -0
- package/src/agents/vendor/mesh.ts +838 -0
- package/src/agents/vendor/plastic.ts +4958 -0
- package/src/agents/vendor/presets.ts +103 -0
- package/src/agents/vendor/shapes.ts +41 -0
- package/src/agents/vendor/ticker.ts +67 -0
- package/src/agents/vendor/types.ts +261 -0
- package/src/agents/vendor/wear.ts +1699 -0
- package/src/ai/composer/Composer.css +108 -0
- package/src/ai/composer/Composer.svelte +111 -0
- package/src/ai/composer/index.ts +10 -0
- package/src/ai/confirmation/Confirmation.svelte +54 -0
- package/src/ai/confirmation/ConfirmationAccepted.svelte +23 -0
- package/src/ai/confirmation/ConfirmationAction.svelte +53 -0
- package/src/ai/confirmation/ConfirmationActions.svelte +24 -0
- package/src/ai/confirmation/ConfirmationFailed.svelte +23 -0
- package/src/ai/confirmation/ConfirmationRejected.svelte +23 -0
- package/src/ai/confirmation/ConfirmationRequest.svelte +25 -0
- package/src/ai/confirmation/ConfirmationTitle.svelte +25 -0
- package/src/ai/confirmation/confirmation-context.svelte.ts +22 -0
- package/src/ai/confirmation/index.ts +50 -0
- package/src/ai/conversation/Conversation.svelte +28 -0
- package/src/ai/conversation/ConversationContent.svelte +35 -0
- package/src/ai/conversation/ConversationEmptyState.svelte +46 -0
- package/src/ai/conversation/ConversationScrollButton.svelte +51 -0
- package/src/ai/conversation/index.ts +33 -0
- package/src/ai/conversation/stick-to-bottom-context.svelte.ts +131 -0
- package/src/ai/index.ts +119 -0
- package/src/ai/loading-state/PixelLoader.svelte +138 -0
- package/src/ai/loading-state/index.ts +5 -0
- package/src/ai/prompt-input/PromptInput.svelte +38 -0
- package/src/ai/prompt-input/PromptInputBody.svelte +19 -0
- package/src/ai/prompt-input/PromptInputSubmit.svelte +73 -0
- package/src/ai/prompt-input/PromptInputTextarea.svelte +74 -0
- package/src/ai/prompt-input/PromptInputToolbar.svelte +19 -0
- package/src/ai/prompt-input/index.ts +34 -0
- package/src/ai/reasoning/Reasoning.svelte +47 -0
- package/src/ai/reasoning/ReasoningContent.svelte +27 -0
- package/src/ai/reasoning/ReasoningTrigger.svelte +48 -0
- package/src/ai/reasoning/index.ts +22 -0
- package/src/ai/reasoning/reasoning-context.svelte.ts +20 -0
- package/src/ai/response/Response.css +32 -0
- package/src/ai/response/Response.svelte +130 -0
- package/src/ai/response/index.ts +5 -0
- package/src/ai/suggestion/Suggestion.svelte +43 -0
- package/src/ai/suggestion/Suggestions.svelte +25 -0
- package/src/ai/suggestion/index.ts +14 -0
- package/src/ai/thinking-dots/ThinkingDots.svelte +42 -0
- package/src/ai/thinking-dots/index.ts +5 -0
- package/src/ai/typing-dots/TypingDots.css +39 -0
- package/src/ai/typing-dots/TypingDots.svelte +27 -0
- package/src/ai/typing-dots/index.ts +10 -0
- package/src/ai/voice-waveform/VoiceWaveform.css +40 -0
- package/src/ai/voice-waveform/VoiceWaveform.svelte +46 -0
- package/src/ai/voice-waveform/index.ts +5 -0
- package/src/animations/README.md +84 -0
- package/src/animations/accordion.css +58 -0
- package/src/animations/avatar-group-hover.css +47 -0
- package/src/animations/card-tilt.css +74 -0
- package/src/animations/digit-pop-in.css +78 -0
- package/src/animations/dropdown.css +121 -0
- package/src/animations/icon-swap.css +43 -0
- package/src/animations/index.css +34 -0
- package/src/animations/input-clear-dissolve.css +86 -0
- package/src/animations/input-shake.css +114 -0
- package/src/animations/learn-more-hover.css +48 -0
- package/src/animations/like-button.css +93 -0
- package/src/animations/modal.css +75 -0
- package/src/animations/notification-badge.css +81 -0
- package/src/animations/page-side-by-side.css +63 -0
- package/src/animations/panel.css +86 -0
- package/src/animations/plus-menu-morph.css +97 -0
- package/src/animations/reasoning-stream.css +49 -0
- package/src/animations/resize.css +20 -0
- package/src/animations/shimmer-text.css +72 -0
- package/src/animations/skeleton-reveal.css +97 -0
- package/src/animations/spinning-counter.css +52 -0
- package/src/animations/streaming-text.css +31 -0
- package/src/animations/success-check.css +120 -0
- package/src/animations/tabs-sliding.css +83 -0
- package/src/animations/text-swap.css +40 -0
- package/src/animations/text-swap.ts +40 -0
- package/src/animations/texts-reveal.css +70 -0
- package/src/animations/thinking-states.css +65 -0
- package/src/animations/tooltip.css +72 -0
- package/src/animations/upstream-coverage.test.ts +65 -0
- package/src/animations/view-transition-reveal.ts +74 -0
- package/src/charts/animated-value.css +7 -0
- package/src/charts/animated-value.svelte +110 -0
- package/src/charts/area-chart.css +29 -0
- package/src/charts/area-chart.svelte +195 -0
- package/src/charts/bar-chart.css +119 -0
- package/src/charts/bar-chart.svelte +269 -0
- package/src/charts/charts.css +201 -0
- package/src/charts/crosshair.svelte +35 -0
- package/src/charts/donut-chart.css +56 -0
- package/src/charts/donut-chart.svelte +158 -0
- package/src/charts/edge-fade.svelte +43 -0
- package/src/charts/edge-fade.ts +16 -0
- package/src/charts/figure.css +100 -0
- package/src/charts/figure.svelte +122 -0
- package/src/charts/gauge-chart.css +94 -0
- package/src/charts/gauge-chart.svelte +303 -0
- package/src/charts/hover-band.test.ts +30 -0
- package/src/charts/hover-band.ts +21 -0
- package/src/charts/hover-focus.svelte +85 -0
- package/src/charts/index.ts +30 -0
- package/src/charts/legend.css +131 -0
- package/src/charts/legend.svelte +112 -0
- package/src/charts/line-chart.css +26 -0
- package/src/charts/line-chart.svelte +256 -0
- package/src/charts/motion.ts +19 -0
- package/src/charts/number-chart.css +168 -0
- package/src/charts/number-chart.svelte +177 -0
- package/src/charts/primitives/chart-container.svelte +57 -0
- package/src/charts/primitives/chart-style.svelte +36 -0
- package/src/charts/primitives/chart-tooltip.svelte +161 -0
- package/src/charts/primitives/chart-utils.ts +54 -0
- package/src/charts/primitives/index.ts +11 -0
- package/src/charts/reveal.svelte +61 -0
- package/src/charts/ring-chart.css +96 -0
- package/src/charts/ring-chart.svelte +158 -0
- package/src/charts/sparkline.css +45 -0
- package/src/charts/sparkline.svelte +140 -0
- package/src/charts/stat-card.css +103 -0
- package/src/charts/stat-card.svelte +267 -0
- package/src/charts/time-series-chart.css +28 -0
- package/src/charts/time-series-chart.svelte +179 -0
- package/src/charts/trend-pill.css +38 -0
- package/src/charts/trend-pill.svelte +48 -0
- package/src/design/index.css +270 -0
- package/src/design/polish.css +159 -0
- package/src/effects/animated-beam/AnimatedBeam.svelte +132 -0
- package/src/effects/animated-beam/diagrams/BeamSvg.svelte +91 -0
- package/src/effects/animated-beam/index.ts +2 -0
- package/src/effects/animated-beam/path-calculator.svelte.ts +70 -0
- package/src/effects/animated-beam/types.ts +23 -0
- package/src/effects/border-beam/BorderBeam.svelte +223 -0
- package/src/effects/border-beam/css.test.ts +46 -0
- package/src/effects/border-beam/css.ts +574 -0
- package/src/effects/border-beam/presets.ts +699 -0
- package/src/effects/border-beam/register-properties.test.ts +74 -0
- package/src/effects/border-beam/register-properties.ts +73 -0
- package/src/effects/border-beam/types.ts +38 -0
- package/src/effects/image-comparison/ImageComparison.css +66 -0
- package/src/effects/image-comparison/ImageComparison.svelte +92 -0
- package/src/effects/image-reveal/ImageReveal.css +10 -0
- package/src/effects/image-reveal/ImageReveal.svelte +357 -0
- package/src/effects/image-reveal/index.ts +2 -0
- package/src/effects/image-reveal/types.ts +35 -0
- package/src/effects/magnetic/magnetic.ts +81 -0
- package/src/effects/marquee/Marquee.css +52 -0
- package/src/effects/marquee/Marquee.svelte +96 -0
- package/src/effects/progressive-blur/ProgressiveBlur.css +9 -0
- package/src/effects/progressive-blur/ProgressiveBlur.svelte +63 -0
- package/src/effects/reveal/AnimatedGroup.svelte +101 -0
- package/src/effects/reveal/InView.svelte +77 -0
- package/src/effects/reveal/TextEffect.svelte +142 -0
- package/src/effects/reveal/index.ts +10 -0
- package/src/effects/reveal/observe.ts +33 -0
- package/src/effects/reveal/reveal.css +141 -0
- package/src/effects/reveal/types.ts +25 -0
- package/src/effects/shader-gradient/ShaderGradient.svelte +227 -0
- package/src/effects/shader-gradient/color.ts +44 -0
- package/src/effects/shader-gradient/index.ts +5 -0
- package/src/effects/shader-gradient/renderer.ts +456 -0
- package/src/effects/shader-gradient/shaders.ts +324 -0
- package/src/effects/shader-gradient/types.ts +68 -0
- package/src/effects/spotlight/Spotlight.css +14 -0
- package/src/effects/spotlight/Spotlight.svelte +61 -0
- package/src/effects/theme-toggle/ThemeToggle.css +21 -0
- package/src/effects/theme-toggle/ThemeToggle.svelte +101 -0
- package/src/icons/TradeIcon.svelte +16 -0
- package/src/icons/apple-symbol-exports.ts +135 -0
- package/src/icons/sf-symbols.ts +527 -0
- package/src/icons/trades.ts +89 -0
- package/src/index.ts +49 -0
- package/src/lib/arrive.ts +26 -0
- package/src/lib/hooks/is-mobile.svelte.ts +11 -0
- package/src/lib/icon-types.ts +17 -0
- package/src/lib/layout.ts +8 -0
- package/src/lib/panel.ts +15 -0
- package/src/lib/theme-transition.ts +51 -0
- package/src/lib/utils.ts +45 -0
- package/src/shadcn/accordion/accordion-content.svelte +22 -0
- package/src/shadcn/accordion/accordion-item.svelte +17 -0
- package/src/shadcn/accordion/accordion-trigger.svelte +35 -0
- package/src/shadcn/accordion/accordion.svelte +19 -0
- package/src/shadcn/accordion/index.ts +16 -0
- package/src/shadcn/alert/alert-description.svelte +23 -0
- package/src/shadcn/alert/alert-title.svelte +20 -0
- package/src/shadcn/alert/alert.svelte +44 -0
- package/src/shadcn/alert/index.ts +14 -0
- package/src/shadcn/alert-dialog/alert-dialog-action.svelte +18 -0
- package/src/shadcn/alert-dialog/alert-dialog-cancel.svelte +18 -0
- package/src/shadcn/alert-dialog/alert-dialog-content.svelte +29 -0
- package/src/shadcn/alert-dialog/alert-dialog-description.svelte +17 -0
- package/src/shadcn/alert-dialog/alert-dialog-footer.svelte +20 -0
- package/src/shadcn/alert-dialog/alert-dialog-header.svelte +20 -0
- package/src/shadcn/alert-dialog/alert-dialog-overlay.svelte +17 -0
- package/src/shadcn/alert-dialog/alert-dialog-portal.svelte +7 -0
- package/src/shadcn/alert-dialog/alert-dialog-title.svelte +17 -0
- package/src/shadcn/alert-dialog/alert-dialog-trigger.svelte +7 -0
- package/src/shadcn/alert-dialog/alert-dialog.svelte +7 -0
- package/src/shadcn/alert-dialog/index.ts +37 -0
- package/src/shadcn/attachment/attachment-action.svelte +23 -0
- package/src/shadcn/attachment/attachment-actions.svelte +23 -0
- package/src/shadcn/attachment/attachment-content.svelte +23 -0
- package/src/shadcn/attachment/attachment-description.svelte +23 -0
- package/src/shadcn/attachment/attachment-group.svelte +23 -0
- package/src/shadcn/attachment/attachment-media.svelte +44 -0
- package/src/shadcn/attachment/attachment-title.svelte +23 -0
- package/src/shadcn/attachment/attachment-trigger.svelte +29 -0
- package/src/shadcn/attachment/attachment.svelte +55 -0
- package/src/shadcn/attachment/index.ts +40 -0
- package/src/shadcn/avatar/avatar-badge.svelte +26 -0
- package/src/shadcn/avatar/avatar-fallback.svelte +20 -0
- package/src/shadcn/avatar/avatar-group-count.svelte +23 -0
- package/src/shadcn/avatar/avatar-group.svelte +23 -0
- package/src/shadcn/avatar/avatar-image.svelte +17 -0
- package/src/shadcn/avatar/avatar.svelte +26 -0
- package/src/shadcn/avatar/index.ts +22 -0
- package/src/shadcn/badge/badge.svelte +53 -0
- package/src/shadcn/badge/index.ts +2 -0
- package/src/shadcn/breadcrumb/breadcrumb-ellipsis.svelte +23 -0
- package/src/shadcn/breadcrumb/breadcrumb-item.svelte +20 -0
- package/src/shadcn/breadcrumb/breadcrumb-link.svelte +31 -0
- package/src/shadcn/breadcrumb/breadcrumb-list.svelte +23 -0
- package/src/shadcn/breadcrumb/breadcrumb-page.svelte +23 -0
- package/src/shadcn/breadcrumb/breadcrumb-separator.svelte +27 -0
- package/src/shadcn/breadcrumb/breadcrumb.svelte +21 -0
- package/src/shadcn/breadcrumb/index.ts +25 -0
- package/src/shadcn/bubble/bubble-content.svelte +31 -0
- package/src/shadcn/bubble/bubble-group.svelte +20 -0
- package/src/shadcn/bubble/bubble-reactions.svelte +52 -0
- package/src/shadcn/bubble/bubble.svelte +58 -0
- package/src/shadcn/bubble/index.ts +25 -0
- package/src/shadcn/button/button.svelte +121 -0
- package/src/shadcn/button/index.ts +17 -0
- package/src/shadcn/calendar/calendar-caption.svelte +76 -0
- package/src/shadcn/calendar/calendar-cell.svelte +19 -0
- package/src/shadcn/calendar/calendar-day.svelte +35 -0
- package/src/shadcn/calendar/calendar-grid-body.svelte +12 -0
- package/src/shadcn/calendar/calendar-grid-head.svelte +12 -0
- package/src/shadcn/calendar/calendar-grid-row.svelte +12 -0
- package/src/shadcn/calendar/calendar-grid.svelte +16 -0
- package/src/shadcn/calendar/calendar-head-cell.svelte +19 -0
- package/src/shadcn/calendar/calendar-header.svelte +19 -0
- package/src/shadcn/calendar/calendar-heading.svelte +16 -0
- package/src/shadcn/calendar/calendar-month-select.svelte +44 -0
- package/src/shadcn/calendar/calendar-month.svelte +15 -0
- package/src/shadcn/calendar/calendar-months.svelte +19 -0
- package/src/shadcn/calendar/calendar-nav.svelte +19 -0
- package/src/shadcn/calendar/calendar-next-button.svelte +31 -0
- package/src/shadcn/calendar/calendar-prev-button.svelte +31 -0
- package/src/shadcn/calendar/calendar-year-select.svelte +43 -0
- package/src/shadcn/calendar/calendar.svelte +118 -0
- package/src/shadcn/calendar/index.ts +40 -0
- package/src/shadcn/card/card-action.svelte +23 -0
- package/src/shadcn/card/card-content.svelte +20 -0
- package/src/shadcn/card/card-description.svelte +20 -0
- package/src/shadcn/card/card-footer.svelte +23 -0
- package/src/shadcn/card/card-header.svelte +23 -0
- package/src/shadcn/card/card-title.svelte +29 -0
- package/src/shadcn/card/card.svelte +25 -0
- package/src/shadcn/card/index.ts +25 -0
- package/src/shadcn/checkbox/checkbox.svelte +38 -0
- package/src/shadcn/checkbox/index.ts +6 -0
- package/src/shadcn/collapsible/collapsible-content.svelte +7 -0
- package/src/shadcn/collapsible/collapsible-trigger.svelte +7 -0
- package/src/shadcn/collapsible/collapsible.svelte +11 -0
- package/src/shadcn/collapsible/index.ts +13 -0
- package/src/shadcn/command/command-dialog.svelte +66 -0
- package/src/shadcn/command/command-empty.svelte +17 -0
- package/src/shadcn/command/command-group.svelte +40 -0
- package/src/shadcn/command/command-input.svelte +64 -0
- package/src/shadcn/command/command-item.svelte +37 -0
- package/src/shadcn/command/command-link-item.svelte +20 -0
- package/src/shadcn/command/command-list.svelte +20 -0
- package/src/shadcn/command/command-loading.svelte +7 -0
- package/src/shadcn/command/command-separator.svelte +17 -0
- package/src/shadcn/command/command-shortcut.svelte +23 -0
- package/src/shadcn/command/command.svelte +28 -0
- package/src/shadcn/command/index.ts +37 -0
- package/src/shadcn/context-menu/context-menu-checkbox-item.svelte +41 -0
- package/src/shadcn/context-menu/context-menu-content.svelte +28 -0
- package/src/shadcn/context-menu/context-menu-group-heading.svelte +21 -0
- package/src/shadcn/context-menu/context-menu-group.svelte +7 -0
- package/src/shadcn/context-menu/context-menu-item.svelte +27 -0
- package/src/shadcn/context-menu/context-menu-label.svelte +27 -0
- package/src/shadcn/context-menu/context-menu-portal.svelte +7 -0
- package/src/shadcn/context-menu/context-menu-radio-group.svelte +16 -0
- package/src/shadcn/context-menu/context-menu-radio-item.svelte +35 -0
- package/src/shadcn/context-menu/context-menu-separator.svelte +17 -0
- package/src/shadcn/context-menu/context-menu-shortcut.svelte +23 -0
- package/src/shadcn/context-menu/context-menu-sub-content.svelte +25 -0
- package/src/shadcn/context-menu/context-menu-sub-trigger.svelte +29 -0
- package/src/shadcn/context-menu/context-menu-sub.svelte +7 -0
- package/src/shadcn/context-menu/context-menu-trigger.svelte +17 -0
- package/src/shadcn/context-menu/context-menu.svelte +7 -0
- package/src/shadcn/context-menu/index.ts +52 -0
- package/src/shadcn/dialog/dialog-close.svelte +11 -0
- package/src/shadcn/dialog/dialog-content.svelte +57 -0
- package/src/shadcn/dialog/dialog-description.svelte +20 -0
- package/src/shadcn/dialog/dialog-footer.svelte +32 -0
- package/src/shadcn/dialog/dialog-header.svelte +20 -0
- package/src/shadcn/dialog/dialog-overlay.svelte +20 -0
- package/src/shadcn/dialog/dialog-portal.svelte +7 -0
- package/src/shadcn/dialog/dialog-title.svelte +17 -0
- package/src/shadcn/dialog/dialog-trigger.svelte +11 -0
- package/src/shadcn/dialog/dialog.svelte +7 -0
- package/src/shadcn/dialog/index.ts +34 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-checkbox-group.svelte +16 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-checkbox-item.svelte +43 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-content.svelte +31 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-group-heading.svelte +22 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-group.svelte +7 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-item.svelte +29 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-label.svelte +27 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-portal.svelte +7 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-radio-group.svelte +16 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-radio-item.svelte +34 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-separator.svelte +17 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-shortcut.svelte +23 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-sub-content.svelte +20 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-sub-trigger.svelte +29 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-sub.svelte +7 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-trigger.svelte +7 -0
- package/src/shadcn/dropdown-menu/dropdown-menu.svelte +7 -0
- package/src/shadcn/dropdown-menu/index.ts +56 -0
- package/src/shadcn/dropdown-menu/menu-item.ts +43 -0
- package/src/shadcn/empty/empty-content.svelte +23 -0
- package/src/shadcn/empty/empty-description.svelte +23 -0
- package/src/shadcn/empty/empty-header.svelte +20 -0
- package/src/shadcn/empty/empty-media.svelte +41 -0
- package/src/shadcn/empty/empty-title.svelte +20 -0
- package/src/shadcn/empty/empty.svelte +23 -0
- package/src/shadcn/empty/index.ts +22 -0
- package/src/shadcn/field/field-content.svelte +20 -0
- package/src/shadcn/field/field-description.svelte +25 -0
- package/src/shadcn/field/field-error.svelte +58 -0
- package/src/shadcn/field/field-group.svelte +23 -0
- package/src/shadcn/field/field-label.svelte +26 -0
- package/src/shadcn/field/field-legend.svelte +29 -0
- package/src/shadcn/field/field-separator.svelte +35 -0
- package/src/shadcn/field/field-set.svelte +24 -0
- package/src/shadcn/field/field-title.svelte +23 -0
- package/src/shadcn/field/field.svelte +53 -0
- package/src/shadcn/field/index.ts +33 -0
- package/src/shadcn/hooks/is-mobile.svelte.ts +9 -0
- package/src/shadcn/hover-card/hover-card-content.svelte +31 -0
- package/src/shadcn/hover-card/hover-card-portal.svelte +7 -0
- package/src/shadcn/hover-card/hover-card-trigger.svelte +7 -0
- package/src/shadcn/hover-card/hover-card.svelte +7 -0
- package/src/shadcn/hover-card/index.ts +15 -0
- package/src/shadcn/input/index.ts +9 -0
- package/src/shadcn/input/input.svelte +48 -0
- package/src/shadcn/input/secret-input.svelte +75 -0
- package/src/shadcn/input-otp/index.ts +15 -0
- package/src/shadcn/input-otp/input-otp-group.svelte +20 -0
- package/src/shadcn/input-otp/input-otp-separator.svelte +25 -0
- package/src/shadcn/input-otp/input-otp-slot.svelte +26 -0
- package/src/shadcn/input-otp/input-otp.svelte +22 -0
- package/src/shadcn/label/index.ts +7 -0
- package/src/shadcn/label/label.svelte +20 -0
- package/src/shadcn/marker/index.ts +15 -0
- package/src/shadcn/marker/marker-content.svelte +23 -0
- package/src/shadcn/marker/marker-icon.svelte +21 -0
- package/src/shadcn/marker/marker.svelte +52 -0
- package/src/shadcn/message/index.ts +22 -0
- package/src/shadcn/message/message-avatar.svelte +23 -0
- package/src/shadcn/message/message-content.svelte +23 -0
- package/src/shadcn/message/message-footer.svelte +23 -0
- package/src/shadcn/message/message-group.svelte +20 -0
- package/src/shadcn/message/message-header.svelte +23 -0
- package/src/shadcn/message/message.svelte +27 -0
- package/src/shadcn/popover/index.ts +28 -0
- package/src/shadcn/popover/popover-close.svelte +7 -0
- package/src/shadcn/popover/popover-content.svelte +38 -0
- package/src/shadcn/popover/popover-description.svelte +20 -0
- package/src/shadcn/popover/popover-header.svelte +20 -0
- package/src/shadcn/popover/popover-portal.svelte +7 -0
- package/src/shadcn/popover/popover-title.svelte +15 -0
- package/src/shadcn/popover/popover-trigger.svelte +17 -0
- package/src/shadcn/popover/popover.svelte +7 -0
- package/src/shadcn/progress/index.ts +7 -0
- package/src/shadcn/progress/progress.svelte +30 -0
- package/src/shadcn/radio-group/index.ts +10 -0
- package/src/shadcn/radio-group/radio-group-item.svelte +31 -0
- package/src/shadcn/radio-group/radio-group.svelte +19 -0
- package/src/shadcn/scroll-area/index.ts +10 -0
- package/src/shadcn/scroll-area/scroll-area-scrollbar.svelte +30 -0
- package/src/shadcn/scroll-area/scroll-area.svelte +43 -0
- package/src/shadcn/select/index.ts +37 -0
- package/src/shadcn/select/select-content.svelte +45 -0
- package/src/shadcn/select/select-group-heading.svelte +21 -0
- package/src/shadcn/select/select-group.svelte +17 -0
- package/src/shadcn/select/select-item.svelte +38 -0
- package/src/shadcn/select/select-label.svelte +20 -0
- package/src/shadcn/select/select-portal.svelte +7 -0
- package/src/shadcn/select/select-scroll-down-button.svelte +23 -0
- package/src/shadcn/select/select-scroll-up-button.svelte +23 -0
- package/src/shadcn/select/select-separator.svelte +18 -0
- package/src/shadcn/select/select-trigger.svelte +33 -0
- package/src/shadcn/select/select.svelte +11 -0
- package/src/shadcn/separator/index.ts +7 -0
- package/src/shadcn/separator/separator.svelte +23 -0
- package/src/shadcn/sheet/index.ts +34 -0
- package/src/shadcn/sheet/sheet-close.svelte +7 -0
- package/src/shadcn/sheet/sheet-content.svelte +72 -0
- package/src/shadcn/sheet/sheet-description.svelte +17 -0
- package/src/shadcn/sheet/sheet-footer.svelte +20 -0
- package/src/shadcn/sheet/sheet-header.svelte +20 -0
- package/src/shadcn/sheet/sheet-overlay.svelte +20 -0
- package/src/shadcn/sheet/sheet-portal.svelte +7 -0
- package/src/shadcn/sheet/sheet-title.svelte +17 -0
- package/src/shadcn/sheet/sheet-trigger.svelte +7 -0
- package/src/shadcn/sheet/sheet.svelte +7 -0
- package/src/shadcn/sidebar/constants.ts +6 -0
- package/src/shadcn/sidebar/context.svelte.ts +81 -0
- package/src/shadcn/sidebar/index.ts +75 -0
- package/src/shadcn/sidebar/sidebar-content.svelte +24 -0
- package/src/shadcn/sidebar/sidebar-footer.svelte +21 -0
- package/src/shadcn/sidebar/sidebar-group-action.svelte +33 -0
- package/src/shadcn/sidebar/sidebar-group-content.svelte +21 -0
- package/src/shadcn/sidebar/sidebar-group-label.svelte +33 -0
- package/src/shadcn/sidebar/sidebar-group.svelte +21 -0
- package/src/shadcn/sidebar/sidebar-header.svelte +21 -0
- package/src/shadcn/sidebar/sidebar-input.svelte +21 -0
- package/src/shadcn/sidebar/sidebar-inset.svelte +23 -0
- package/src/shadcn/sidebar/sidebar-menu-action.svelte +37 -0
- package/src/shadcn/sidebar/sidebar-menu-badge.svelte +24 -0
- package/src/shadcn/sidebar/sidebar-menu-button.svelte +103 -0
- package/src/shadcn/sidebar/sidebar-menu-item.svelte +21 -0
- package/src/shadcn/sidebar/sidebar-menu-skeleton.svelte +36 -0
- package/src/shadcn/sidebar/sidebar-menu-sub-button.svelte +39 -0
- package/src/shadcn/sidebar/sidebar-menu-sub-item.svelte +21 -0
- package/src/shadcn/sidebar/sidebar-menu-sub.svelte +24 -0
- package/src/shadcn/sidebar/sidebar-menu.svelte +21 -0
- package/src/shadcn/sidebar/sidebar-provider.svelte +62 -0
- package/src/shadcn/sidebar/sidebar-rail.svelte +36 -0
- package/src/shadcn/sidebar/sidebar-separator.svelte +19 -0
- package/src/shadcn/sidebar/sidebar-trigger.svelte +37 -0
- package/src/shadcn/sidebar/sidebar.svelte +109 -0
- package/src/shadcn/skeleton/index.ts +7 -0
- package/src/shadcn/skeleton/skeleton.svelte +17 -0
- package/src/shadcn/slider/index.ts +7 -0
- package/src/shadcn/slider/slider.svelte +52 -0
- package/src/shadcn/sonner/index.ts +1 -0
- package/src/shadcn/sonner/sonner.svelte +34 -0
- package/src/shadcn/spinner/index.ts +1 -0
- package/src/shadcn/spinner/spinner.svelte +26 -0
- package/src/shadcn/switch/index.ts +7 -0
- package/src/shadcn/switch/switch.svelte +31 -0
- package/src/shadcn/table/index.ts +28 -0
- package/src/shadcn/table/table-body.svelte +20 -0
- package/src/shadcn/table/table-caption.svelte +20 -0
- package/src/shadcn/table/table-cell.svelte +20 -0
- package/src/shadcn/table/table-footer.svelte +20 -0
- package/src/shadcn/table/table-head.svelte +23 -0
- package/src/shadcn/table/table-header.svelte +20 -0
- package/src/shadcn/table/table-row.svelte +23 -0
- package/src/shadcn/table/table.svelte +25 -0
- package/src/shadcn/tabs/index.ts +16 -0
- package/src/shadcn/tabs/tabs-content.svelte +17 -0
- package/src/shadcn/tabs/tabs-list.svelte +25 -0
- package/src/shadcn/tabs/tabs-trigger.svelte +20 -0
- package/src/shadcn/tabs/tabs.svelte +19 -0
- package/src/shadcn/textarea/index.ts +7 -0
- package/src/shadcn/textarea/textarea.svelte +23 -0
- package/src/shadcn/toggle/index.ts +13 -0
- package/src/shadcn/toggle/toggle.svelte +53 -0
- package/src/shadcn/toggle-group/index.ts +10 -0
- package/src/shadcn/toggle-group/toggle-group-item.svelte +35 -0
- package/src/shadcn/toggle-group/toggle-group.svelte +59 -0
- package/src/shadcn/tooltip/context.ts +16 -0
- package/src/shadcn/tooltip/index.ts +19 -0
- package/src/shadcn/tooltip/tooltip-content.svelte +38 -0
- package/src/shadcn/tooltip/tooltip-portal.svelte +7 -0
- package/src/shadcn/tooltip/tooltip-provider.svelte +16 -0
- package/src/shadcn/tooltip/tooltip-trigger.svelte +7 -0
- package/src/shadcn/tooltip/tooltip.svelte +19 -0
- package/src/shadcn/utilities.css +549 -0
- package/src/showcase/AiSection.svelte +157 -0
- package/src/showcase/AnimationsSection.svelte +1658 -0
- package/src/showcase/ChartsSection.svelte +458 -0
- package/src/showcase/EffectsSection.svelte +152 -0
- package/src/showcase/ShadcnSection.svelte +27 -0
- package/src/showcase/ShowcaseImport.svelte +126 -0
- package/src/showcase/ShowcaseList.svelte +132 -0
- package/src/showcase/ShowcaseNav.svelte +247 -0
- package/src/showcase/ShowcaseSection.svelte +112 -0
- package/src/showcase/ShowcaseShell.svelte +55 -0
- package/src/showcase/ShowcaseStage.svelte +342 -0
- package/src/showcase/ShowcaseVariant.svelte +109 -0
- package/src/showcase/assets/image-reveal/art-1.jpg +0 -0
- package/src/showcase/assets/image-reveal/art-2.jpg +0 -0
- package/src/showcase/assets/image-reveal/art-3.jpg +0 -0
- package/src/showcase/check.svg +1 -0
- package/src/showcase/chevron-arms.svg +2 -0
- package/src/showcase/chevron-down.svg +1 -0
- package/src/showcase/copy.svg +2 -0
- package/src/showcase/demos/ai/confirmation.svelte +59 -0
- package/src/showcase/demos/ai/conversation.svelte +59 -0
- package/src/showcase/demos/ai/loading-state.svelte +19 -0
- package/src/showcase/demos/ai/prompt-input.svelte +57 -0
- package/src/showcase/demos/ai/reasoning.svelte +19 -0
- package/src/showcase/demos/ai/thinking-dots.svelte +15 -0
- package/src/showcase/demos/ai/voice-waveform.svelte +24 -0
- package/src/showcase/demos/effects/animated-beam.svelte +50 -0
- package/src/showcase/demos/effects/animated-group.svelte +47 -0
- package/src/showcase/demos/effects/border-beam-default.svelte +20 -0
- package/src/showcase/demos/effects/border-beam-line.svelte +20 -0
- package/src/showcase/demos/effects/border-beam-mono.svelte +20 -0
- package/src/showcase/demos/effects/border-beam-sunset.svelte +20 -0
- package/src/showcase/demos/effects/image-comparison.svelte +25 -0
- package/src/showcase/demos/effects/image-reveal.svelte +49 -0
- package/src/showcase/demos/effects/in-view.svelte +41 -0
- package/src/showcase/demos/effects/integrations-hub.svelte +82 -0
- package/src/showcase/demos/effects/magnetic.svelte +31 -0
- package/src/showcase/demos/effects/marquee.svelte +33 -0
- package/src/showcase/demos/effects/progressive-blur.svelte +47 -0
- package/src/showcase/demos/effects/spotlight.svelte +40 -0
- package/src/showcase/demos/effects/text-effect.svelte +55 -0
- package/src/showcase/demos/shadcn/accordion.svelte +45 -0
- package/src/showcase/demos/shadcn/alert-dialog.svelte +23 -0
- package/src/showcase/demos/shadcn/alert.svelte +30 -0
- package/src/showcase/demos/shadcn/attachment.svelte +71 -0
- package/src/showcase/demos/shadcn/avatar.svelte +30 -0
- package/src/showcase/demos/shadcn/badge.svelte +26 -0
- package/src/showcase/demos/shadcn/breadcrumb.svelte +34 -0
- package/src/showcase/demos/shadcn/bubble.svelte +36 -0
- package/src/showcase/demos/shadcn/button.svelte +11 -0
- package/src/showcase/demos/shadcn/calendar.svelte +8 -0
- package/src/showcase/demos/shadcn/card.svelte +39 -0
- package/src/showcase/demos/shadcn/checkbox.svelte +39 -0
- package/src/showcase/demos/shadcn/collapsible.svelte +20 -0
- package/src/showcase/demos/shadcn/command.svelte +48 -0
- package/src/showcase/demos/shadcn/context-menu.svelte +54 -0
- package/src/showcase/demos/shadcn/demo-harness.svelte +12 -0
- package/src/showcase/demos/shadcn/demos.test.ts +20 -0
- package/src/showcase/demos/shadcn/dialog.svelte +38 -0
- package/src/showcase/demos/shadcn/dropdown-menu.svelte +59 -0
- package/src/showcase/demos/shadcn/empty.svelte +29 -0
- package/src/showcase/demos/shadcn/field.svelte +115 -0
- package/src/showcase/demos/shadcn/hover-card.svelte +32 -0
- package/src/showcase/demos/shadcn/index.ts +358 -0
- package/src/showcase/demos/shadcn/input-otp.svelte +19 -0
- package/src/showcase/demos/shadcn/input.svelte +5 -0
- package/src/showcase/demos/shadcn/label.svelte +11 -0
- package/src/showcase/demos/shadcn/marker.svelte +30 -0
- package/src/showcase/demos/shadcn/message.svelte +75 -0
- package/src/showcase/demos/shadcn/popover.svelte +36 -0
- package/src/showcase/demos/shadcn/progress.svelte +13 -0
- package/src/showcase/demos/shadcn/radio-group.svelte +19 -0
- package/src/showcase/demos/shadcn/scroll-area.svelte +18 -0
- package/src/showcase/demos/shadcn/select.svelte +29 -0
- package/src/showcase/demos/shadcn/separator.svelte +12 -0
- package/src/showcase/demos/shadcn/sheet.svelte +48 -0
- package/src/showcase/demos/shadcn/skeleton.svelte +11 -0
- package/src/showcase/demos/shadcn/slider.svelte +7 -0
- package/src/showcase/demos/shadcn/sonner.svelte +18 -0
- package/src/showcase/demos/shadcn/spinner.svelte +11 -0
- package/src/showcase/demos/shadcn/switch.svelte +9 -0
- package/src/showcase/demos/shadcn/table.svelte +76 -0
- package/src/showcase/demos/shadcn/tabs.svelte +62 -0
- package/src/showcase/demos/shadcn/textarea.svelte +5 -0
- package/src/showcase/demos/shadcn/toggle-group.svelte +18 -0
- package/src/showcase/demos/shadcn/toggle.svelte +14 -0
- package/src/showcase/demos/shadcn/tooltip.svelte +13 -0
- package/src/showcase/heart.svg +1 -0
- package/src/showcase/index.ts +38 -0
- package/src/showcase/kit.test.ts +72 -0
- package/src/showcase/kit.ts +17 -0
- package/src/showcase/plus.svg +1 -0
- package/src/showcase/showcase-shell.css +91 -0
- package/src/showcase/stacked-section.css +15 -0
- package/src/showcase/success-check.svg +1 -0
- package/src/showcase/types.ts +29 -0
- package/src/svg-raw.d.ts +7 -0
- package/src/test-setup.ts +34 -0
- package/src/tokens.css +993 -0
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
/* The craft layer, the opinionated half of a design system.
|
|
2
|
+
*
|
|
3
|
+
* A palette says which colours a product uses. This file says how a surface
|
|
4
|
+
* lifts off the page, how round a control is against a card, and how long an
|
|
5
|
+
* overlay takes to arrive. Those three answers are what separate a kit that
|
|
6
|
+
* looks assembled from one that looks made, and they were the part every app
|
|
7
|
+
* here was re-deciding per component.
|
|
8
|
+
*
|
|
9
|
+
* WHY it ships beside the palette rather than inside it: the palette is the
|
|
10
|
+
* brand and differs per app; elevation, radius and motion are craft and should
|
|
11
|
+
* not. An app imports this, then tints it with `--elev-tint` and nothing else.
|
|
12
|
+
*
|
|
13
|
+
* Studied from beautifului.dev and rareui.com, which both build the same three
|
|
14
|
+
* ladders: a hairline that is a shadow rather than a border, a radius that
|
|
15
|
+
* steps by the role of the box, and a close that is faster than its open.
|
|
16
|
+
*
|
|
17
|
+
* Import once, after Tailwind:
|
|
18
|
+
* @import "@heyramzi/ui/design";
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
@import "./polish.css";
|
|
22
|
+
|
|
23
|
+
/* ── Radius, by role not by size ─────────────────────────────
|
|
24
|
+
A chip inside a control inside a card has to read as nested, which needs
|
|
25
|
+
three radii that step, not one radius reused. The Tailwind names are the
|
|
26
|
+
home so `rounded-lg` on a button already resolves to the control radius and
|
|
27
|
+
no component has to learn a new class. */
|
|
28
|
+
@theme {
|
|
29
|
+
--radius-xs: 4px; /* tag, dot, inline code */
|
|
30
|
+
--radius-sm: 6px; /* chip, badge, small pill */
|
|
31
|
+
--radius-md: 7px; /* between a chip and a control */
|
|
32
|
+
--radius-lg: 8px; /* control: button, input, select, menu item */
|
|
33
|
+
--radius-xl: 10px; /* card, panel, stage */
|
|
34
|
+
--radius-2xl: 14px; /* overlay: dialog, sheet, command palette */
|
|
35
|
+
--radius-3xl: 20px; /* hero surface, full-bleed panel */
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/* ── Elevation ───────────────────────────────────────────────
|
|
39
|
+
Four steps of lift, plus the two edges that are not lift.
|
|
40
|
+
|
|
41
|
+
WHY the steps are shadow-only and the hairline is its own token: most boxes
|
|
42
|
+
in a kit already draw a border, and an elevation that bakes a `0 0 0 1px`
|
|
43
|
+
ring into every step gives those boxes two edges a pixel apart. Compose them
|
|
44
|
+
where a component drops its border:
|
|
45
|
+
|
|
46
|
+
box-shadow: var(--elev-hairline), var(--elev-card);
|
|
47
|
+
|
|
48
|
+
WHY each step is stacked rather than one blurred drop: a single shadow reads
|
|
49
|
+
as a sticker. Depth is several offsets falling off together, which is what
|
|
50
|
+
the eye reads as distance. They cost nothing extra because every stop is the
|
|
51
|
+
same colour at a different alpha.
|
|
52
|
+
|
|
53
|
+
WHY the blur radii are large and the alphas small: a 4px blur at 20% draws a
|
|
54
|
+
visible grey edge, which the eye reads as a second border. A 28px blur at 7%
|
|
55
|
+
is barely a colour anywhere and reads as height. Reach for more blur before
|
|
56
|
+
more alpha, every time.
|
|
57
|
+
|
|
58
|
+
`--elev-tint` is the one knob an app turns. Pure black greys a warm palette
|
|
59
|
+
out; the hue of the app's own darkest surface keeps the shadow in the
|
|
60
|
+
family. */
|
|
61
|
+
:root {
|
|
62
|
+
--elev-tint: oklch(0 0 0);
|
|
63
|
+
|
|
64
|
+
/* Resting on the page. A button, a chip, a row. */
|
|
65
|
+
--elev-btn:
|
|
66
|
+
0 1px 1px -0.5px color-mix(in oklab, var(--elev-tint) 7%, transparent),
|
|
67
|
+
0 2px 5px -2px color-mix(in oklab, var(--elev-tint) 6%, transparent);
|
|
68
|
+
|
|
69
|
+
/* Sitting on the page. A card, a stage, a panel. */
|
|
70
|
+
--elev-card:
|
|
71
|
+
0 1px 2px -1px color-mix(in oklab, var(--elev-tint) 7%, transparent),
|
|
72
|
+
0 4px 9px -3px color-mix(in oklab, var(--elev-tint) 6%, transparent),
|
|
73
|
+
0 14px 28px -10px color-mix(in oklab, var(--elev-tint) 7%, transparent);
|
|
74
|
+
|
|
75
|
+
/* Lifted off the page. A hovered card, a popover, a menu. */
|
|
76
|
+
--elev-raised:
|
|
77
|
+
0 1px 2px -1px color-mix(in oklab, var(--elev-tint) 8%, transparent),
|
|
78
|
+
0 6px 13px -4px color-mix(in oklab, var(--elev-tint) 9%, transparent),
|
|
79
|
+
0 20px 40px -12px color-mix(in oklab, var(--elev-tint) 12%, transparent);
|
|
80
|
+
|
|
81
|
+
/* Floating over a dimmed page. A dialog, a sheet, a command palette. */
|
|
82
|
+
--elev-overlay:
|
|
83
|
+
0 2px 4px -1px color-mix(in oklab, var(--elev-tint) 8%, transparent),
|
|
84
|
+
0 12px 26px -8px color-mix(in oklab, var(--elev-tint) 12%, transparent),
|
|
85
|
+
0 40px 72px -20px color-mix(in oklab, var(--elev-tint) 20%, transparent);
|
|
86
|
+
|
|
87
|
+
/* The two edges. A hairline separates a surface from what is behind it; a rim
|
|
88
|
+
is the light catching its top edge, which is what makes a filled control
|
|
89
|
+
read as a physical key rather than a coloured rectangle. */
|
|
90
|
+
--elev-hairline: 0 0 0 1px var(--color-border, var(--border));
|
|
91
|
+
--elev-rim: inset 0 1px 0 color-mix(in oklab, white 16%, transparent);
|
|
92
|
+
|
|
93
|
+
/* A field is the one box that goes in rather than up. */
|
|
94
|
+
--elev-field: inset 0 1px 2px color-mix(in oklab, var(--elev-tint) 7%, transparent);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/* A dark surface cannot cast a darker shadow than the page it sits on, so the
|
|
98
|
+
hairline does the separating and the shadow only sinks what is behind it. On
|
|
99
|
+
dark the hairline is white at a low alpha, which is what reads as a lit edge
|
|
100
|
+
rather than as a drawn border. */
|
|
101
|
+
.dark {
|
|
102
|
+
--elev-btn: 0 1px 2px color-mix(in oklab, black 30%, transparent);
|
|
103
|
+
--elev-card:
|
|
104
|
+
0 1px 2px color-mix(in oklab, black 24%, transparent),
|
|
105
|
+
0 4px 12px -4px color-mix(in oklab, black 30%, transparent);
|
|
106
|
+
--elev-raised:
|
|
107
|
+
0 2px 6px color-mix(in oklab, black 30%, transparent),
|
|
108
|
+
0 10px 24px -6px color-mix(in oklab, black 38%, transparent);
|
|
109
|
+
--elev-overlay:
|
|
110
|
+
0 4px 10px color-mix(in oklab, black 34%, transparent),
|
|
111
|
+
0 24px 56px -12px color-mix(in oklab, black 50%, transparent);
|
|
112
|
+
|
|
113
|
+
--elev-hairline: 0 0 0 1px color-mix(in oklab, white 10%, transparent);
|
|
114
|
+
--elev-rim: inset 0 1px 0 color-mix(in oklab, white 10%, transparent);
|
|
115
|
+
--elev-field: inset 0 1px 2px color-mix(in oklab, black 40%, transparent);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/* ── Focus ───────────────────────────────────────────────────
|
|
119
|
+
One ring, two parts: a solid edge that redraws the control's own outline in
|
|
120
|
+
the accent, and a soft halo that carries it off the surface. Written as a
|
|
121
|
+
variable so a component spends one line on it and every control focuses the
|
|
122
|
+
same way. */
|
|
123
|
+
:root {
|
|
124
|
+
--ring-color: var(--color-ring, var(--ring));
|
|
125
|
+
--ring-halo: color-mix(in oklab, var(--ring-color) 16%, transparent);
|
|
126
|
+
/* A solid pixel redrawing the control's own edge, then a wide soft band. At a
|
|
127
|
+
higher alpha the band reads as a second border rather than as a glow, which
|
|
128
|
+
is why it is 16% over 4px and not 30% over 2px. */
|
|
129
|
+
--ring-focus: 0 0 0 1px var(--ring-color), 0 0 0 5px var(--ring-halo);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/* ── Motion ──────────────────────────────────────────────────
|
|
133
|
+
The transitions-dev scale, verbatim, so a snippet pasted from that skill and
|
|
134
|
+
a component written here read from the same names.
|
|
135
|
+
|
|
136
|
+
The doctrine in one line: an open is an invitation and a close should get out
|
|
137
|
+
of the way, so every close is shorter than its open and no close bounces. */
|
|
138
|
+
:root {
|
|
139
|
+
--duration-stagger: 40ms;
|
|
140
|
+
--duration-micro: 80ms;
|
|
141
|
+
--duration-quick: 150ms; /* every close, text swap, tooltip in */
|
|
142
|
+
--duration-fast: 250ms; /* every open, tabs, icon swap, page slide */
|
|
143
|
+
--duration-medium: 350ms; /* panel close, toast close */
|
|
144
|
+
--duration-slow: 400ms; /* panel open, skeleton reveal */
|
|
145
|
+
--duration-very-slow: 500ms; /* emphasis: badge, text reveal, success check */
|
|
146
|
+
|
|
147
|
+
--ease-smooth-out: cubic-bezier(0.22, 1, 0.36, 1); /* all surface motion */
|
|
148
|
+
--ease-in-out: ease-in-out; /* swaps and cross-fades */
|
|
149
|
+
--ease-out: ease-out; /* tooltips */
|
|
150
|
+
--ease-linear: linear; /* shimmer, pulse, spinner */
|
|
151
|
+
|
|
152
|
+
--distance-micro: 4px;
|
|
153
|
+
--distance-small: 6px;
|
|
154
|
+
--distance-base: 8px;
|
|
155
|
+
--distance-medium: 12px;
|
|
156
|
+
--distance-large: 30px;
|
|
157
|
+
|
|
158
|
+
--scale-large: 0.96; /* modal */
|
|
159
|
+
--scale-medium: 0.97; /* dropdown, popover open */
|
|
160
|
+
--scale-small: 0.98; /* tooltip */
|
|
161
|
+
--scale-tiny: 0.99; /* dropdown close */
|
|
162
|
+
|
|
163
|
+
--blur-small: 2px;
|
|
164
|
+
--blur-medium: 3px;
|
|
165
|
+
--blur-large: 8px;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/* Tailwind utility aliases, so `shadow-card`, `duration-fast` and
|
|
169
|
+
`ease-smooth-out` exist as classes and a component can stay in utilities
|
|
170
|
+
instead of dropping into a style block for one shadow. */
|
|
171
|
+
@theme inline {
|
|
172
|
+
--shadow-hairline: var(--elev-hairline);
|
|
173
|
+
--shadow-btn: var(--elev-btn);
|
|
174
|
+
--shadow-card: var(--elev-card);
|
|
175
|
+
--shadow-raised: var(--elev-raised);
|
|
176
|
+
--shadow-overlay: var(--elev-overlay);
|
|
177
|
+
--shadow-field: var(--elev-field);
|
|
178
|
+
--shadow-rim: var(--elev-rim);
|
|
179
|
+
/* A filled control: the lit top edge and the resting lift, in one class,
|
|
180
|
+
because the two never appear apart and utilities cannot be stacked. */
|
|
181
|
+
--shadow-key: var(--elev-rim), var(--elev-btn);
|
|
182
|
+
/* The composed pair, for a surface that draws no border of its own. */
|
|
183
|
+
--shadow-edge-card: var(--elev-hairline), var(--elev-card);
|
|
184
|
+
--shadow-edge-raised: var(--elev-hairline), var(--elev-raised);
|
|
185
|
+
--shadow-edge-overlay: var(--elev-hairline), var(--elev-overlay);
|
|
186
|
+
|
|
187
|
+
--ease-smooth-out: var(--ease-smooth-out);
|
|
188
|
+
|
|
189
|
+
/* WHY the durations are re-declared under a second name: Tailwind's
|
|
190
|
+
`duration-*` utility reads `--transition-duration-*`, not `--duration-*`, so
|
|
191
|
+
the six names above generated no class at all. `duration-fast` therefore
|
|
192
|
+
compiled to nothing and the element ended up at `transition-duration: 0s`:
|
|
193
|
+
no error, no warning, and a component that simply does not animate. The
|
|
194
|
+
comment at the top of this block had claimed `duration-fast` was a class
|
|
195
|
+
since the block was written. Found 31 Aug 2026 by probing a live page. */
|
|
196
|
+
--transition-duration-micro: var(--duration-micro);
|
|
197
|
+
--transition-duration-quick: var(--duration-quick);
|
|
198
|
+
--transition-duration-fast: var(--duration-fast);
|
|
199
|
+
--transition-duration-medium: var(--duration-medium);
|
|
200
|
+
--transition-duration-slow: var(--duration-slow);
|
|
201
|
+
--transition-duration-very-slow: var(--duration-very-slow);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/* The bits-ui state variants every primitive in `./shadcn` is written against.
|
|
205
|
+
*
|
|
206
|
+
* bits-ui v2 writes `data-checked` / `data-open` and v1 wrote
|
|
207
|
+
* `data-state="checked"`, so each variant matches both and a component does not
|
|
208
|
+
* have to know which it is talking to. They live here rather than in a
|
|
209
|
+
* consumer's stylesheet because the classes that need them ship in this
|
|
210
|
+
* package: an app that defines only the palette rendered a switch that never
|
|
211
|
+
* moved. Moved out of upsys `tokens.css` on 14 Sep 2026, with the kit. */
|
|
212
|
+
@custom-variant data-open {
|
|
213
|
+
&:where([data-state="open"]),
|
|
214
|
+
&:where([data-open]:not([data-open="false"])) {
|
|
215
|
+
@slot;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
@custom-variant data-closed {
|
|
220
|
+
&:where([data-state="closed"]),
|
|
221
|
+
&:where([data-closed]:not([data-closed="false"])) {
|
|
222
|
+
@slot;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
@custom-variant data-checked {
|
|
227
|
+
&:where([data-state="checked"]),
|
|
228
|
+
&:where([data-checked]:not([data-checked="false"])) {
|
|
229
|
+
@slot;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
@custom-variant data-unchecked {
|
|
234
|
+
&:where([data-state="unchecked"]),
|
|
235
|
+
&:where([data-unchecked]:not([data-unchecked="false"])) {
|
|
236
|
+
@slot;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
@custom-variant data-selected {
|
|
241
|
+
&:where([data-selected]) {
|
|
242
|
+
@slot;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
@custom-variant data-disabled {
|
|
247
|
+
&:where([data-disabled="true"]),
|
|
248
|
+
&:where([data-disabled]:not([data-disabled="false"])) {
|
|
249
|
+
@slot;
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
@custom-variant data-active {
|
|
254
|
+
&:where([data-state="active"]),
|
|
255
|
+
&:where([data-active]:not([data-active="false"])) {
|
|
256
|
+
@slot;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
@custom-variant data-horizontal {
|
|
261
|
+
&:where([data-orientation="horizontal"]) {
|
|
262
|
+
@slot;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
@custom-variant data-vertical {
|
|
267
|
+
&:where([data-orientation="vertical"]) {
|
|
268
|
+
@slot;
|
|
269
|
+
}
|
|
270
|
+
}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
/* The rules the craft layer applies for itself.
|
|
2
|
+
*
|
|
3
|
+
* Two layers, on purpose. `base` holds the element defaults (focus, selection,
|
|
4
|
+
* scrollbars) so any component class or utility beats them. `components` holds
|
|
5
|
+
* the three motion primitives, so a utility still beats those too.
|
|
6
|
+
*
|
|
7
|
+
* WHY the layers are not optional: an `@import` at the top of an app stylesheet
|
|
8
|
+
* lands OUTSIDE Tailwind's layers, and unlayered CSS beats every layered rule
|
|
9
|
+
* whatever its specificity. Written bare, a `:where()` selector here would
|
|
10
|
+
* silently outrank `focus-visible:ring-3` on every control in the app.
|
|
11
|
+
*
|
|
12
|
+
* Imported by ./index.css. Do not import it on its own, because it reads the tokens
|
|
13
|
+
* that file declares. */
|
|
14
|
+
|
|
15
|
+
@layer base {
|
|
16
|
+
/* One ring for the whole kit. `:where` keeps it at specificity zero on top of
|
|
17
|
+
the layer, so a control that needs a different ring writes one and wins. */
|
|
18
|
+
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
|
|
19
|
+
outline: none;
|
|
20
|
+
box-shadow: var(--ring-focus);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/* The accent at a low alpha, not the browser blue, because a selected word is
|
|
24
|
+
the one moment the palette shows up inside running text. */
|
|
25
|
+
::selection {
|
|
26
|
+
background: color-mix(in oklab, var(--ring-color) 24%, transparent);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/* A default macOS overlay scrollbar paints a black bar on a dark panel. Track
|
|
30
|
+
transparent, thumb on the line token, so it belongs to whatever surface it
|
|
31
|
+
is over. The border is what insets the thumb without a second element. */
|
|
32
|
+
:where(html) {
|
|
33
|
+
scrollbar-color: var(--color-border, var(--border)) transparent;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
::-webkit-scrollbar {
|
|
37
|
+
width: 10px;
|
|
38
|
+
height: 10px;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
::-webkit-scrollbar-track {
|
|
42
|
+
background: transparent;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
::-webkit-scrollbar-thumb {
|
|
46
|
+
border: 3px solid transparent;
|
|
47
|
+
background-clip: padding-box;
|
|
48
|
+
border-radius: 999px;
|
|
49
|
+
background-color: var(--color-border, var(--border));
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
::-webkit-scrollbar-thumb:hover {
|
|
53
|
+
background-color: var(--color-muted-foreground, var(--muted-foreground));
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
@layer components {
|
|
58
|
+
/* Three moves the kit repeats. They are classes rather than tokens because a
|
|
59
|
+
component wants one name, not four declarations, and because the reduced
|
|
60
|
+
motion guard then lives in one place instead of in every component.
|
|
61
|
+
|
|
62
|
+
Namespaced `t-` to match the transitions-dev snippets, which these sit
|
|
63
|
+
beside rather than duplicate. */
|
|
64
|
+
|
|
65
|
+
/* A control that reads as a key: it travels down a pixel under the finger.
|
|
66
|
+
The travel is what sells it, because a colour change alone reads as a hover
|
|
67
|
+
state, not as a press. */
|
|
68
|
+
.t-press {
|
|
69
|
+
transition:
|
|
70
|
+
background-color var(--duration-quick) var(--ease-smooth-out),
|
|
71
|
+
border-color var(--duration-quick) var(--ease-smooth-out),
|
|
72
|
+
color var(--duration-quick) var(--ease-smooth-out),
|
|
73
|
+
box-shadow var(--duration-quick) var(--ease-smooth-out),
|
|
74
|
+
transform var(--duration-micro) var(--ease-smooth-out);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.t-press:active:not(:disabled, [aria-disabled="true"]) {
|
|
78
|
+
transform: translateY(1px);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/* A card that answers the pointer. It rises by a pixel and gains the next
|
|
82
|
+
step of elevation, so the hover reads as the card coming forward rather
|
|
83
|
+
than as its border changing colour. */
|
|
84
|
+
.t-lift {
|
|
85
|
+
transition:
|
|
86
|
+
box-shadow var(--duration-fast) var(--ease-smooth-out),
|
|
87
|
+
transform var(--duration-fast) var(--ease-smooth-out);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.t-lift:hover {
|
|
91
|
+
transform: translateY(-1px);
|
|
92
|
+
box-shadow: var(--elev-raised);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/* A surface arriving. The open carries the distance, the scale and the blur;
|
|
96
|
+
the close drops all three and takes less time, per the open/close
|
|
97
|
+
asymmetry rule in transitions-dev. */
|
|
98
|
+
.t-enter {
|
|
99
|
+
animation: t-enter var(--duration-fast) var(--ease-smooth-out) both;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.t-exit {
|
|
103
|
+
animation: t-exit var(--duration-quick) var(--ease-smooth-out) both;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
@media (prefers-reduced-motion: reduce) {
|
|
107
|
+
.t-press,
|
|
108
|
+
.t-lift {
|
|
109
|
+
transition: none;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.t-press:active,
|
|
113
|
+
.t-lift:hover {
|
|
114
|
+
transform: none;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.t-enter,
|
|
118
|
+
.t-exit {
|
|
119
|
+
animation-duration: 1ms;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
@keyframes t-enter {
|
|
125
|
+
from {
|
|
126
|
+
opacity: 0;
|
|
127
|
+
transform: translateY(var(--distance-micro)) scale(var(--scale-medium));
|
|
128
|
+
filter: blur(var(--blur-small));
|
|
129
|
+
}
|
|
130
|
+
to {
|
|
131
|
+
opacity: 1;
|
|
132
|
+
transform: none;
|
|
133
|
+
filter: none;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/* A mark confirming a state that has already changed: it arrives after the box
|
|
138
|
+
it sits in, so it overshoots slightly instead of fading. */
|
|
139
|
+
@keyframes t-check {
|
|
140
|
+
from {
|
|
141
|
+
opacity: 0;
|
|
142
|
+
transform: scale(0.4);
|
|
143
|
+
}
|
|
144
|
+
to {
|
|
145
|
+
opacity: 1;
|
|
146
|
+
transform: scale(1);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
@keyframes t-exit {
|
|
151
|
+
from {
|
|
152
|
+
opacity: 1;
|
|
153
|
+
transform: none;
|
|
154
|
+
}
|
|
155
|
+
to {
|
|
156
|
+
opacity: 0;
|
|
157
|
+
transform: scale(var(--scale-tiny));
|
|
158
|
+
}
|
|
159
|
+
}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
<script lang="ts" module>
|
|
2
|
+
import type { AnimatedBeamProps } from "./types.js";
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<script lang="ts">
|
|
6
|
+
// =========================
|
|
7
|
+
// IMPORTS
|
|
8
|
+
// =========================
|
|
9
|
+
import { cn } from "@heyramzi/utils";
|
|
10
|
+
import BeamSvg from "./diagrams/BeamSvg.svelte";
|
|
11
|
+
import { usePathCalculator } from "./path-calculator.svelte.js";
|
|
12
|
+
|
|
13
|
+
// =========================
|
|
14
|
+
// PROPS
|
|
15
|
+
// =========================
|
|
16
|
+
let {
|
|
17
|
+
class: className,
|
|
18
|
+
containerRef,
|
|
19
|
+
fromRef,
|
|
20
|
+
toRef,
|
|
21
|
+
curvature = 0,
|
|
22
|
+
reverse = false,
|
|
23
|
+
duration = 4,
|
|
24
|
+
delay = 0,
|
|
25
|
+
pathColor = "gray",
|
|
26
|
+
pathWidth = 2,
|
|
27
|
+
pathOpacity = 0.2,
|
|
28
|
+
gradientStartColor = "#ffaa40",
|
|
29
|
+
gradientStopColor = "#414fd2",
|
|
30
|
+
startXOffset = 0,
|
|
31
|
+
startYOffset = 0,
|
|
32
|
+
endXOffset = 0,
|
|
33
|
+
endYOffset = 0,
|
|
34
|
+
fromAnchor = "center",
|
|
35
|
+
toAnchor = "center",
|
|
36
|
+
}: AnimatedBeamProps = $props();
|
|
37
|
+
|
|
38
|
+
// =========================
|
|
39
|
+
// STATE
|
|
40
|
+
// =========================
|
|
41
|
+
const id = `beam-${Math.random().toString(36).slice(2, 10)}`;
|
|
42
|
+
const path = usePathCalculator();
|
|
43
|
+
let motionOK = $state(true);
|
|
44
|
+
|
|
45
|
+
// ========================= DERIVED ========================= WHY: a short bright band (the stops) is swept along the path by animating the
|
|
46
|
+
|
|
47
|
+
// gradient vector. forward runs the comet from start to end, reverse the other way.
|
|
48
|
+
|
|
49
|
+
// Same coordinate pairs the motion-sv version used, as SMIL value lists, so no animation runtime is pulled into the dependency-free package.
|
|
50
|
+
const coords = $derived(
|
|
51
|
+
reverse ? { x1: "90%;-10%", x2: "100%;0%" } : { x1: "10%;110%", x2: "0%;100%" },
|
|
52
|
+
);
|
|
53
|
+
|
|
54
|
+
// =========================
|
|
55
|
+
// FUNCTIONS
|
|
56
|
+
// =========================
|
|
57
|
+
function updatePath() {
|
|
58
|
+
path.calculatePath(
|
|
59
|
+
containerRef,
|
|
60
|
+
fromRef,
|
|
61
|
+
toRef,
|
|
62
|
+
curvature,
|
|
63
|
+
startXOffset,
|
|
64
|
+
startYOffset,
|
|
65
|
+
endXOffset,
|
|
66
|
+
endYOffset,
|
|
67
|
+
fromAnchor,
|
|
68
|
+
toAnchor,
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// =========================
|
|
73
|
+
// EFFECTS
|
|
74
|
+
// =========================
|
|
75
|
+
$effect(() => {
|
|
76
|
+
// WHY: touch every geometry input so the path recomputes when a ref,
|
|
77
|
+
// anchor, or offset changes, not just on container resize.
|
|
78
|
+
void [
|
|
79
|
+
containerRef,
|
|
80
|
+
fromRef,
|
|
81
|
+
toRef,
|
|
82
|
+
curvature,
|
|
83
|
+
startXOffset,
|
|
84
|
+
startYOffset,
|
|
85
|
+
endXOffset,
|
|
86
|
+
endYOffset,
|
|
87
|
+
fromAnchor,
|
|
88
|
+
toAnchor,
|
|
89
|
+
];
|
|
90
|
+
updatePath();
|
|
91
|
+
if (!containerRef) return;
|
|
92
|
+
let raf = 0;
|
|
93
|
+
const ro = new ResizeObserver(() => {
|
|
94
|
+
cancelAnimationFrame(raf);
|
|
95
|
+
raf = requestAnimationFrame(updatePath);
|
|
96
|
+
});
|
|
97
|
+
ro.observe(containerRef);
|
|
98
|
+
return () => {
|
|
99
|
+
cancelAnimationFrame(raf);
|
|
100
|
+
ro.disconnect();
|
|
101
|
+
};
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
$effect(() => {
|
|
105
|
+
if (typeof window === "undefined") return;
|
|
106
|
+
const mq = window.matchMedia("(prefers-reduced-motion: reduce)");
|
|
107
|
+
motionOK = !mq.matches;
|
|
108
|
+
const onChange = () => (motionOK = !mq.matches);
|
|
109
|
+
mq.addEventListener("change", onChange);
|
|
110
|
+
return () => mq.removeEventListener("change", onChange);
|
|
111
|
+
});
|
|
112
|
+
</script>
|
|
113
|
+
|
|
114
|
+
<!-- =========================== -->
|
|
115
|
+
<!-- MARKUP -->
|
|
116
|
+
<!-- =========================== -->
|
|
117
|
+
<BeamSvg
|
|
118
|
+
{id}
|
|
119
|
+
class={cn("pointer-events-none absolute left-0 top-0 transform-gpu stroke-2", className)}
|
|
120
|
+
width={path.svgDimensions.width}
|
|
121
|
+
height={path.svgDimensions.height}
|
|
122
|
+
pathD={path.pathD}
|
|
123
|
+
{pathColor}
|
|
124
|
+
{pathWidth}
|
|
125
|
+
{pathOpacity}
|
|
126
|
+
{motionOK}
|
|
127
|
+
{coords}
|
|
128
|
+
{duration}
|
|
129
|
+
{delay}
|
|
130
|
+
{gradientStartColor}
|
|
131
|
+
{gradientStopColor}
|
|
132
|
+
/>
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
// =========================
|
|
3
|
+
// PROPS
|
|
4
|
+
// =========================
|
|
5
|
+
type Props = {
|
|
6
|
+
id: string;
|
|
7
|
+
class?: string;
|
|
8
|
+
width: number;
|
|
9
|
+
height: number;
|
|
10
|
+
pathD: string;
|
|
11
|
+
pathColor: string;
|
|
12
|
+
pathWidth: number;
|
|
13
|
+
pathOpacity: number;
|
|
14
|
+
motionOK: boolean;
|
|
15
|
+
coords: { x1: string; x2: string };
|
|
16
|
+
duration: number;
|
|
17
|
+
delay: number;
|
|
18
|
+
gradientStartColor: string;
|
|
19
|
+
gradientStopColor: string;
|
|
20
|
+
};
|
|
21
|
+
let {
|
|
22
|
+
id,
|
|
23
|
+
class: className,
|
|
24
|
+
width,
|
|
25
|
+
height,
|
|
26
|
+
pathD,
|
|
27
|
+
pathColor,
|
|
28
|
+
pathWidth,
|
|
29
|
+
pathOpacity,
|
|
30
|
+
motionOK,
|
|
31
|
+
coords,
|
|
32
|
+
duration,
|
|
33
|
+
delay,
|
|
34
|
+
gradientStartColor,
|
|
35
|
+
gradientStopColor,
|
|
36
|
+
}: Props = $props();
|
|
37
|
+
</script>
|
|
38
|
+
|
|
39
|
+
<svg
|
|
40
|
+
fill="none"
|
|
41
|
+
{width}
|
|
42
|
+
{height}
|
|
43
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
44
|
+
class={className}
|
|
45
|
+
viewBox="0 0 {width} {height}"
|
|
46
|
+
>
|
|
47
|
+
<path
|
|
48
|
+
d={pathD}
|
|
49
|
+
stroke={pathColor}
|
|
50
|
+
stroke-width={pathWidth}
|
|
51
|
+
stroke-opacity={pathOpacity}
|
|
52
|
+
stroke-linecap="round"
|
|
53
|
+
/>
|
|
54
|
+
{#if motionOK}
|
|
55
|
+
<path
|
|
56
|
+
d={pathD}
|
|
57
|
+
stroke-width={pathWidth}
|
|
58
|
+
stroke={`url(#${id})`}
|
|
59
|
+
stroke-opacity="1"
|
|
60
|
+
stroke-linecap="round"
|
|
61
|
+
/>
|
|
62
|
+
<defs>
|
|
63
|
+
<linearGradient {id} gradientUnits="userSpaceOnUse" x1="0%" x2="0%" y1="0%" y2="0%">
|
|
64
|
+
<animate
|
|
65
|
+
attributeName="x1"
|
|
66
|
+
values={coords.x1}
|
|
67
|
+
dur="{duration}s"
|
|
68
|
+
begin="{delay}s"
|
|
69
|
+
calcMode="spline"
|
|
70
|
+
keyTimes="0;1"
|
|
71
|
+
keySplines="0.16 1 0.3 1"
|
|
72
|
+
repeatCount="indefinite"
|
|
73
|
+
/>
|
|
74
|
+
<animate
|
|
75
|
+
attributeName="x2"
|
|
76
|
+
values={coords.x2}
|
|
77
|
+
dur="{duration}s"
|
|
78
|
+
begin="{delay}s"
|
|
79
|
+
calcMode="spline"
|
|
80
|
+
keyTimes="0;1"
|
|
81
|
+
keySplines="0.16 1 0.3 1"
|
|
82
|
+
repeatCount="indefinite"
|
|
83
|
+
/>
|
|
84
|
+
<stop stop-color={gradientStartColor} stop-opacity="0"></stop>
|
|
85
|
+
<stop stop-color={gradientStartColor}></stop>
|
|
86
|
+
<stop offset="32.5%" stop-color={gradientStopColor}></stop>
|
|
87
|
+
<stop offset="100%" stop-color={gradientStopColor} stop-opacity="0"></stop>
|
|
88
|
+
</linearGradient>
|
|
89
|
+
</defs>
|
|
90
|
+
{/if}
|
|
91
|
+
</svg>
|