@heyramzi/ui 2.8.0 → 2.10.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 +1 -1
- package/README.md +1 -1
- package/dist/agents/helpers.js +52 -0
- package/dist/agents/index.js +3 -0
- package/dist/agents/page-state.js +65 -0
- package/dist/agents/types.js +1 -0
- package/dist/agents/vendor/color.js +149 -0
- package/dist/agents/vendor/draw.js +548 -0
- package/dist/agents/vendor/engine.js +632 -0
- package/dist/agents/vendor/mesh.js +727 -0
- package/dist/agents/vendor/plastic.js +3273 -0
- package/dist/agents/vendor/presets.js +171 -0
- package/dist/agents/vendor/shapes.js +24 -0
- package/dist/agents/vendor/ticker.js +56 -0
- package/dist/agents/vendor/types.js +0 -0
- package/dist/agents/vendor/wear.js +1525 -0
- package/dist/ai/ai-button/index.js +2 -0
- package/dist/ai/confirmation/confirmation-context.svelte.js +12 -0
- package/dist/ai/confirmation/index.js +9 -0
- package/dist/ai/generation-progress/index.js +2 -0
- package/dist/ai/index.js +11 -0
- package/dist/ai/loading-state/index.js +3 -0
- package/dist/ai/prompt-input/index.js +6 -0
- package/dist/ai/reasoning/index.js +4 -0
- package/dist/ai/reasoning/reasoning-context.svelte.js +12 -0
- package/dist/ai/response/index.js +3 -0
- package/dist/ai/suggestion/index.js +3 -0
- package/dist/ai/thinking-dots/index.js +3 -0
- package/dist/ai/typing-dots/index.js +2 -0
- package/dist/ai/voice-waveform/index.js +3 -0
- package/dist/animations/text-swap.js +30 -0
- package/dist/brand/index.js +65 -0
- package/dist/canvas/card/resize.js +10 -0
- package/dist/canvas/edges/edge-path.js +284 -0
- package/dist/canvas/editor/context-menu.js +42 -0
- package/dist/canvas/editor/dispatch.svelte.js +157 -0
- package/dist/canvas/editor/editor-context.js +8 -0
- package/dist/canvas/editor/editor-mode.js +0 -0
- package/dist/canvas/editor/frame.js +87 -0
- package/dist/canvas/editor/hand-context.js +8 -0
- package/dist/canvas/editor/history-core.js +221 -0
- package/dist/canvas/editor/keymap.js +193 -0
- package/dist/canvas/editor/layout-actions.js +170 -0
- package/dist/canvas/editor/lock.js +65 -0
- package/dist/canvas/editor/rebase.js +279 -0
- package/dist/canvas/editor/style.js +174 -0
- package/dist/canvas/editor/text-field-context.js +8 -0
- package/dist/canvas/editor/z-order.js +82 -0
- package/dist/canvas/headless/alignment.js +20 -0
- package/dist/canvas/headless/break-apart-find.js +324 -0
- package/dist/canvas/headless/break-apart-pieces.js +74 -0
- package/dist/canvas/headless/break-apart-plan.js +378 -0
- package/dist/canvas/headless/break-apart-style.js +93 -0
- package/dist/canvas/headless/break-apart.js +206 -0
- package/dist/canvas/headless/canvas-cleanup.js +70 -0
- package/dist/canvas/headless/edge-anchors.js +134 -0
- package/dist/canvas/headless/edge-memo.js +28 -0
- package/dist/canvas/headless/edge-serialization.js +31 -0
- package/dist/canvas/headless/figure-geometry.js +331 -0
- package/dist/canvas/headless/fit-viewport.js +82 -0
- package/dist/canvas/headless/grid.js +96 -0
- package/dist/canvas/headless/icon-node.js +45 -0
- package/dist/canvas/headless/index.js +1 -0
- package/dist/canvas/headless/linkify.js +25 -0
- package/dist/canvas/headless/pen-marks.js +115 -0
- package/dist/canvas/headless/sketch.js +250 -0
- package/dist/canvas/headless/snap-guides.js +100 -0
- package/dist/canvas/headless/svg-figure.js +137 -0
- package/dist/canvas/headless/table-layout.js +161 -0
- package/dist/canvas/index.js +25 -0
- package/dist/canvas/lod/lod-mode.svelte.js +22 -0
- package/dist/canvas/lod/render-all.svelte.js +45 -0
- package/dist/canvas/ops/arrange.js +83 -0
- package/dist/canvas/ops/ops.js +318 -0
- package/dist/canvas/pen/colors.js +41 -0
- package/dist/canvas/pen/eraser.js +35 -0
- package/dist/canvas/pen/geometry.js +143 -0
- package/dist/canvas/pen/index.js +9 -0
- package/dist/canvas/pen/ops.js +15 -0
- package/dist/canvas/pen/pen-session.js +171 -0
- package/dist/canvas/pen/plugin.js +129 -0
- package/dist/canvas/pen/shapes.js +80 -0
- package/dist/canvas/pen/stroke-path.js +37 -0
- package/dist/canvas/pen/types.js +30 -0
- package/dist/canvas/pen/ui.js +20 -0
- package/dist/canvas/plugin.js +51 -0
- package/dist/canvas/screen/glyphs.js +24 -0
- package/dist/canvas/screen/labels.js +24 -0
- package/dist/canvas/screen/parts.js +140 -0
- package/dist/canvas/screen/plugin.js +71 -0
- package/dist/canvas/screen/types.js +44 -0
- package/dist/canvas/screen/ui.js +13 -0
- package/dist/canvas/test-utils.js +18 -0
- package/dist/canvas/types.js +0 -0
- package/dist/canvas/ui/forward-wheel.js +27 -0
- package/dist/canvas/ui/icons.js +133 -0
- package/dist/canvas/ui/place-panel.js +57 -0
- package/dist/canvas/ui/shortcut-tip.js +18 -0
- package/dist/canvas/ui/tools.js +411 -0
- package/dist/charts/dashboard/chart.js +1 -0
- package/dist/charts/dashboard/data-table.js +7 -0
- package/dist/charts/dashboard/index.js +13 -0
- package/dist/charts/dashboard/windows.js +5 -0
- package/dist/charts/edge-fade.js +7 -0
- package/dist/charts/hover-band.js +13 -0
- package/dist/charts/index.js +19 -0
- package/dist/charts/motion.js +15 -0
- package/dist/charts/primitives/chart-utils.js +22 -0
- package/dist/charts/primitives/index.js +4 -0
- package/dist/components/copy/clipboard.js +38 -0
- package/dist/components/copy/copied.svelte.js +26 -0
- package/dist/components/copy/index.js +3 -0
- package/dist/components/data-table/data-table.js +55 -0
- package/dist/components/data-table/index.js +7 -0
- package/dist/components/docs/index.js +3 -0
- package/dist/components/docs/scroll-spy.svelte.js +71 -0
- package/dist/components/field-row/index.js +1 -0
- package/dist/components/hold-to-confirm/index.js +1 -0
- package/dist/components/icon/index.js +1 -0
- package/dist/components/language-flag/index.js +1 -0
- package/dist/components/list-page/filter-section.js +4 -0
- package/dist/components/list-page/index.js +25 -0
- package/dist/components/list-page/list-table.js +5 -0
- package/dist/components/list-page/queue-rail.js +3 -0
- package/dist/components/list-page/section-host.js +8 -0
- package/dist/components/list-page/step.js +5 -0
- package/dist/components/list-page/types.js +0 -0
- package/dist/components/locale-switch/index.js +1 -0
- package/dist/components/mark/index.js +1 -0
- package/dist/components/open-in/index.js +1 -0
- package/dist/components/picker/index.js +3 -0
- package/dist/components/picker/trigger.js +33 -0
- package/dist/components/picker/types.js +0 -0
- package/dist/components/section-card/index.js +1 -0
- package/dist/components/section-header/index.js +2 -0
- package/dist/components/segmented/collapse.js +32 -0
- package/dist/components/segmented/index.js +8 -0
- package/dist/components/segmented/segmented.js +50 -0
- package/dist/components/star-rating-input/index.js +2 -0
- package/dist/components/svg/index.js +1 -0
- package/dist/components/table-view/index.js +1 -0
- package/dist/components/table-view/types.js +0 -0
- package/dist/components/tags-input/index.js +2 -0
- package/dist/components/tags-input/tags.js +90 -0
- package/dist/components/theme/index.js +3 -0
- package/dist/components/toolbar/index.js +3 -0
- package/dist/components/toolbar/toolbar-trigger.js +4 -0
- package/dist/editor/anchors.js +17 -0
- package/dist/editor/block-id.js +62 -0
- package/dist/editor/block-ops.js +105 -0
- package/dist/editor/doc-blocks.js +181 -0
- package/dist/editor/extensions.js +200 -0
- package/dist/editor/index.js +4 -0
- package/dist/editor/markdown-test-helpers.js +6 -0
- package/dist/editor/markdown.js +486 -0
- package/dist/editor/serializer.js +268 -0
- package/dist/editor/slash-items.js +104 -0
- package/dist/editor/youtube-url.js +27 -0
- package/dist/effects/animated-beam/index.js +1 -0
- package/dist/effects/animated-beam/path-calculator.svelte.js +42 -0
- package/dist/effects/animated-beam/types.js +0 -0
- package/dist/effects/border-beam/css.js +420 -0
- package/dist/effects/border-beam/presets.js +1792 -0
- package/dist/effects/border-beam/register-properties.js +39 -0
- package/dist/effects/border-beam/types.js +0 -0
- package/dist/effects/image-comparison/compare.js +4 -0
- package/dist/effects/image-reveal/index.js +1 -0
- package/dist/effects/image-reveal/types.js +0 -0
- package/dist/effects/magnetic/magnetic.js +54 -0
- package/dist/effects/reveal/index.js +4 -0
- package/dist/effects/reveal/observe.js +43 -0
- package/dist/effects/reveal/types.js +0 -0
- package/dist/effects/shader-gradient/color.js +34 -0
- package/dist/effects/shader-gradient/index.js +1 -0
- package/dist/effects/shader-gradient/renderer.js +320 -0
- package/dist/effects/shader-gradient/shaders.js +280 -0
- package/dist/effects/shader-gradient/types.js +0 -0
- package/dist/icons/apple-symbol-exports.js +126 -0
- package/dist/icons/sf-symbols.js +465 -0
- package/dist/icons/trades.js +34 -0
- package/dist/inbox/index.js +4 -0
- package/dist/inbox/logic.js +156 -0
- package/dist/inbox/types.js +46 -0
- package/dist/index.js +18 -0
- package/dist/lib/arrive.js +13 -0
- package/dist/lib/icon-types.js +0 -0
- package/dist/lib/initials.js +17 -0
- package/dist/lib/layout.js +1 -0
- package/dist/lib/panel.js +3 -0
- package/dist/lib/result.js +26 -0
- package/dist/lib/sliding-pill.js +45 -0
- package/dist/lib/theme-transition.js +53 -0
- package/dist/lib/tone.js +32 -0
- package/dist/lib/utils.js +5 -0
- package/dist/onboarding/define-tours.js +28 -0
- package/dist/onboarding/index.js +4 -0
- package/dist/onboarding/onboarding.svelte.js +15 -0
- package/dist/onboarding/pick.js +16 -0
- package/dist/onboarding/stores.js +50 -0
- package/dist/onboarding/types.js +1 -0
- package/dist/onboarding/wait.js +25 -0
- package/dist/panel/index.js +1 -0
- package/dist/panel/side-panel-types.js +0 -0
- package/dist/record/demo-data.js +512 -0
- package/dist/record/fields.js +148 -0
- package/dist/record/format.js +97 -0
- package/dist/record/gutter.js +1 -0
- package/dist/record/index.js +15 -0
- package/dist/record/kinds.js +110 -0
- package/dist/record/logic.js +255 -0
- package/dist/record/types.js +52 -0
- package/dist/shadcn/accordion/index.js +5 -0
- package/dist/shadcn/alert/index.js +5 -0
- package/dist/shadcn/alert-dialog/index.js +12 -0
- package/dist/shadcn/attachment/index.js +10 -0
- package/dist/shadcn/avatar/index.js +7 -0
- package/dist/shadcn/badge/index.js +2 -0
- package/dist/shadcn/breadcrumb/index.js +8 -0
- package/dist/shadcn/bubble/index.js +5 -0
- package/dist/shadcn/button/index.js +2 -0
- package/dist/shadcn/calendar/index.js +19 -0
- package/dist/shadcn/card/index.js +8 -0
- package/dist/shadcn/checkbox/index.js +2 -0
- package/dist/shadcn/code-block/index.js +9 -0
- package/dist/shadcn/collapsible/index.js +4 -0
- package/dist/shadcn/command/index.js +13 -0
- package/dist/shadcn/context-menu/index.js +17 -0
- package/dist/shadcn/dialog/index.js +11 -0
- package/dist/shadcn/dropdown-menu/index.js +19 -0
- package/dist/shadcn/dropdown-menu/menu-item.js +23 -0
- package/dist/shadcn/empty/index.js +7 -0
- package/dist/shadcn/field/index.js +12 -0
- package/dist/shadcn/hooks/highlighter.js +92 -0
- package/dist/shadcn/hooks/is-mobile.svelte.js +7 -0
- package/dist/shadcn/hooks/use-highlighted-code.svelte.js +65 -0
- package/dist/shadcn/hover-card/index.js +5 -0
- package/dist/shadcn/input/index.js +3 -0
- package/dist/shadcn/input-otp/index.js +5 -0
- package/dist/shadcn/kbd/index.js +3 -0
- package/dist/shadcn/label/index.js +2 -0
- package/dist/shadcn/marker/index.js +4 -0
- package/dist/shadcn/message/index.js +7 -0
- package/dist/shadcn/message-scroller/index.js +8 -0
- package/dist/shadcn/popover/index.js +9 -0
- package/dist/shadcn/progress/index.js +2 -0
- package/dist/shadcn/progress/tone.js +11 -0
- package/dist/shadcn/radio-group/index.js +3 -0
- package/dist/shadcn/scroll-area/index.js +3 -0
- package/dist/shadcn/select/index.js +12 -0
- package/dist/shadcn/separator/index.js +2 -0
- package/dist/shadcn/sheet/index.js +11 -0
- package/dist/shadcn/sidebar/constants.js +6 -0
- package/dist/shadcn/sidebar/context.svelte.js +38 -0
- package/dist/shadcn/sidebar/index.js +25 -0
- package/dist/shadcn/skeleton/index.js +2 -0
- package/dist/shadcn/slider/index.js +2 -0
- package/dist/shadcn/sonner/index.js +1 -0
- package/dist/shadcn/spinner/index.js +1 -0
- package/dist/shadcn/switch/index.js +2 -0
- package/dist/shadcn/table/index.js +9 -0
- package/dist/shadcn/tabs/index.js +5 -0
- package/dist/shadcn/textarea/index.js +2 -0
- package/dist/shadcn/toggle/index.js +3 -0
- package/dist/shadcn/toggle-group/index.js +3 -0
- package/dist/shadcn/tooltip/context.js +8 -0
- package/dist/shadcn/tooltip/index.js +6 -0
- package/dist/shadcn/trace/index.js +9 -0
- package/dist/slides/bridges.js +66 -0
- package/dist/slides/deck-controller.svelte.js +221 -0
- package/dist/slides/export/capture.js +81 -0
- package/dist/slides/export/ffmpeg.js +85 -0
- package/dist/slides/export/index.js +4 -0
- package/dist/slides/export/launch.js +8 -0
- package/dist/slides/export/pdf.js +78 -0
- package/dist/slides/export/types.js +0 -0
- package/dist/slides/index.js +7 -0
- package/dist/slides/labels.js +26 -0
- package/dist/slides/layout.js +47 -0
- package/dist/slides/model.js +9 -0
- package/dist/slides/navigation.js +89 -0
- package/dist/slides/types.js +6 -0
- package/dist/status/define-statuses.js +16 -0
- package/dist/status/index.js +4 -0
- package/dist/status/status-types.js +0 -0
- package/dist/test-setup.js +26 -0
- package/dist/thread/index.js +3 -0
- package/dist/thread/logic.js +94 -0
- package/dist/thread/types.js +23 -0
- package/dist/work/board-order.js +109 -0
- package/dist/work/dates.js +19 -0
- package/dist/work/detail/detail-types.js +20 -0
- package/dist/work/docs/edited.js +39 -0
- package/dist/work/docs/index.js +7 -0
- package/dist/work/docs/labels.js +38 -0
- package/dist/work/docs/menu.js +121 -0
- package/dist/work/docs/outline.js +39 -0
- package/dist/work/gantt/logic.js +260 -0
- package/dist/work/inbox/inbox-logic.js +94 -0
- package/dist/work/inbox/inbox-statuses.js +86 -0
- package/dist/work/inbox/inbox-types.js +0 -0
- package/dist/work/inbox/index.js +1 -0
- package/dist/work/index.js +21 -0
- package/dist/work/kanban-drag.js +25 -0
- package/dist/work/kanban-types.js +0 -0
- package/dist/work/presets/sales.js +35 -0
- package/dist/work/reorder.js +10 -0
- package/dist/work/task-types.js +0 -0
- package/dist/work/time/duration.js +60 -0
- package/dist/work/time/time-types.js +25 -0
- package/dist/work/use-kanban-dnd.svelte.js +128 -0
- package/package.json +102 -76
- package/src/agents/vendor/draw.ts +4 -4
- package/src/canvas/headless/canvas-cleanup.test.ts +1 -1
- package/src/canvas/ops/ops.ts +1 -1
- package/src/charts/area-chart.svelte +11 -1
- package/src/charts/bar-chart.svelte +18 -3
- package/src/charts/line-chart.svelte +11 -1
- package/src/components/data-table/data-table.ts +4 -5
- package/src/components/data-table/pagination.svelte +5 -3
- package/src/components/docs/on-this-page.svelte +82 -5
- package/src/components/docs/scroll-spy.svelte.ts +6 -1
- package/src/components/list-page/detail-header.svelte +7 -3
- package/src/components/list-page/empty-state.svelte +3 -1
- package/src/components/list-page/filter-popover.svelte +2 -2
- package/src/components/list-page/rail-row.svelte +5 -2
- package/src/components/mark/mark.svelte +2 -1
- package/src/components/section-card/section-card.svelte +3 -1
- package/src/components/section-header/section-header.svelte +5 -5
- package/src/components/segmented/segment.svelte +1 -1
- package/src/components/table-view/table-view.svelte +6 -1
- package/src/components/tags-input/tags-input.svelte +1 -1
- package/src/components/toolbar/toolbar-trigger.ts +8 -2
- package/src/components/toolbar/toolbar.svelte +1 -1
- package/src/editor/anchors.ts +28 -0
- package/src/editor/doc-blocks.ts +168 -0
- package/src/editor/doc-page.css +389 -0
- package/src/editor/editor.svelte +47 -5
- package/src/editor/extensions.ts +26 -2
- package/src/editor/markdown.ts +27 -2
- package/src/editor/slash-items.ts +18 -0
- package/src/icons/trades.ts +1 -1
- package/src/inbox/README.md +6 -4
- package/src/inbox/inbox.test.ts +1 -1
- package/src/inbox/index.ts +2 -2
- package/src/inbox/logic.ts +29 -5
- package/src/inbox/thread-inbox.svelte +219 -92
- package/src/inbox/types.ts +27 -1
- package/src/lib/initials.test.ts +25 -0
- package/src/lib/initials.ts +29 -0
- package/src/modules.test.ts +4 -64
- package/src/panel/README.md +1 -1
- package/src/record/README.md +1 -1
- package/src/record/demo-data.ts +4 -4
- package/src/record/info-list.svelte +5 -4
- package/src/record/next-up.svelte +1 -1
- package/src/record/project-list.svelte +1 -1
- package/src/record/record-demo.svelte +2 -2
- package/src/record/steps-rail.svelte +3 -3
- package/src/shadcn/badge/badge.svelte +1 -1
- package/src/shadcn/card/card-title.svelte +1 -5
- package/src/shadcn/empty/empty-description.svelte +1 -1
- package/src/shadcn/progress/progress.svelte +8 -1
- package/src/shadcn/table/table-cell.svelte +10 -2
- package/src/status/README.md +1 -1
- package/src/thread/README.md +2 -0
- package/src/thread/index.ts +9 -1
- package/src/thread/logic.ts +33 -3
- package/src/thread/thread-body.svelte +37 -0
- package/src/thread/thread-events.svelte +30 -0
- package/src/thread/thread.svelte +74 -59
- package/src/thread/types.ts +21 -0
- package/src/{tasks → work}/README.md +11 -8
- package/src/{tasks → work}/detail/task-thread.svelte +8 -15
- package/src/work/docs/doc-editor-page.svelte +194 -0
- package/src/work/docs/doc-menu.svelte +333 -0
- package/src/work/docs/docs-demo.svelte +227 -0
- package/src/work/docs/edited-chip.svelte +125 -0
- package/src/work/docs/edited.ts +54 -0
- package/src/work/docs/index.ts +38 -0
- package/src/work/docs/labels.ts +70 -0
- package/src/work/docs/menu.ts +127 -0
- package/src/work/docs/outline.ts +60 -0
- package/src/{tasks → work}/gantt/gantt-group-row.svelte +1 -1
- package/src/{tasks → work}/inbox/inbox-card.svelte +113 -50
- package/src/work/inbox/inbox-logic.ts +98 -0
- package/src/work/inbox/inbox-trace.svelte +58 -0
- package/src/{tasks → work}/inbox/inbox-types.ts +2 -0
- package/src/{tasks → work}/index.ts +0 -10
- package/src/{tasks → work}/kanban-board.svelte +1 -1
- package/src/{tasks → work}/task-list.svelte +1 -1
- package/src/{tasks → work}/time/time-tracker.svelte +2 -5
- package/src/tasks/inbox/inbox-logic.ts +0 -21
- package/src/tasks/inbox/inbox-trace.svelte +0 -51
- /package/src/{tasks → work}/ambient.d.ts +0 -0
- /package/src/{tasks → work}/board-order.ts +0 -0
- /package/src/{tasks → work}/dates.ts +0 -0
- /package/src/{tasks → work}/demo.svelte +0 -0
- /package/src/{tasks → work}/detail/detail-demo.svelte +0 -0
- /package/src/{tasks → work}/detail/detail-types.ts +0 -0
- /package/src/{tasks → work}/detail/task-chip.svelte +0 -0
- /package/src/{tasks → work}/detail/task-detail.svelte +0 -0
- /package/src/{tasks → work}/detail/task-property.svelte +0 -0
- /package/src/{tasks → work}/gantt/gantt-bar.svelte +0 -0
- /package/src/{tasks → work}/gantt/gantt-grid.svelte +0 -0
- /package/src/{tasks → work}/gantt/gantt-header.svelte +0 -0
- /package/src/{tasks → work}/gantt/gantt-task-row.svelte +0 -0
- /package/src/{tasks → work}/gantt/gantt.css +0 -0
- /package/src/{tasks → work}/gantt/gantt.test.ts +0 -0
- /package/src/{tasks → work}/gantt/logic.test.ts +0 -0
- /package/src/{tasks → work}/gantt/logic.ts +0 -0
- /package/src/{tasks → work}/inbox/inbox-draft.svelte +0 -0
- /package/src/{tasks → work}/inbox/inbox-statuses.ts +0 -0
- /package/src/{tasks → work}/inbox/index.ts +0 -0
- /package/src/{tasks → work}/kanban-column.svelte +0 -0
- /package/src/{tasks → work}/kanban-drag.ts +0 -0
- /package/src/{tasks → work}/kanban-types.ts +0 -0
- /package/src/{tasks → work}/presets/sales.ts +0 -0
- /package/src/{tasks → work}/reorder.ts +0 -0
- /package/src/{tasks → work}/task-gantt.svelte +0 -0
- /package/src/{tasks → work}/task-types.ts +0 -0
- /package/src/{tasks → work}/time/duration.ts +0 -0
- /package/src/{tasks → work}/time/time-chip.svelte +0 -0
- /package/src/{tasks → work}/time/time-dot.svelte +0 -0
- /package/src/{tasks → work}/time/time-ring.svelte +0 -0
- /package/src/{tasks → work}/time/time-types.ts +0 -0
- /package/src/{tasks → work}/use-kanban-dnd.svelte.ts +0 -0
|
@@ -0,0 +1,420 @@
|
|
|
1
|
+
import { lineBloomGradient, lineBorderGradient, lineInnerGradient, mdBorderGradient, mdInnerGradient, smBorderGradient, smInnerGradient } from "./presets.js";
|
|
2
|
+
function commonHostRules(id) {
|
|
3
|
+
return `
|
|
4
|
+
[data-beam="${id}"][data-paused],
|
|
5
|
+
[data-beam="${id}"][data-paused]::before,
|
|
6
|
+
[data-beam="${id}"][data-paused]::after,
|
|
7
|
+
[data-beam="${id}"][data-paused] [data-beam-bloom] { animation-play-state: paused; }
|
|
8
|
+
|
|
9
|
+
@media (prefers-reduced-motion: reduce) {
|
|
10
|
+
[data-beam="${id}"][data-active],
|
|
11
|
+
[data-beam="${id}"][data-fading] { animation: none; }
|
|
12
|
+
[data-beam="${id}"][data-active]::before,
|
|
13
|
+
[data-beam="${id}"][data-active]::after,
|
|
14
|
+
[data-beam="${id}"][data-fading]::before,
|
|
15
|
+
[data-beam="${id}"][data-fading]::after,
|
|
16
|
+
[data-beam="${id}"][data-active] [data-beam-bloom],
|
|
17
|
+
[data-beam="${id}"][data-fading] [data-beam-bloom] { animation: none; }
|
|
18
|
+
[data-beam="${id}"][data-active] { --beam-opacity-${id}: 1; }
|
|
19
|
+
[data-beam="${id}"][data-fading] { --beam-opacity-${id}: 0; }
|
|
20
|
+
}`;
|
|
21
|
+
}
|
|
22
|
+
function spinHeader(id, borderRadius, duration) {
|
|
23
|
+
return `
|
|
24
|
+
@property --beam-angle-${id} { syntax: "<angle>"; initial-value: 0deg; inherits: true; }
|
|
25
|
+
@property --beam-opacity-${id} { syntax: "<number>"; initial-value: 0; inherits: true; }
|
|
26
|
+
|
|
27
|
+
[data-beam="${id}"] { position: relative; border-radius: ${borderRadius}px; overflow: hidden; }
|
|
28
|
+
[data-beam="${id}"][data-active] { animation: beam-spin-${id} ${duration}s linear infinite, beam-fade-in-${id} 0.6s ease forwards; }
|
|
29
|
+
[data-beam="${id}"][data-fading] { animation: beam-spin-${id} ${duration}s linear infinite, beam-fade-out-${id} 0.5s ease forwards; }
|
|
30
|
+
`;
|
|
31
|
+
}
|
|
32
|
+
function spinKeyframes(id) {
|
|
33
|
+
return `
|
|
34
|
+
@keyframes beam-spin-${id} { to { --beam-angle-${id}: 360deg; } }
|
|
35
|
+
@keyframes beam-fade-in-${id} { to { --beam-opacity-${id}: 1; } }
|
|
36
|
+
@keyframes beam-fade-out-${id} { from { --beam-opacity-${id}: 1; } to { --beam-opacity-${id}: 0; } }
|
|
37
|
+
`;
|
|
38
|
+
}
|
|
39
|
+
function hueShift(id, staticColors, hueRange, brightness, saturation) {
|
|
40
|
+
const grade = `brightness(${brightness.toFixed(2)}) saturate(${saturation.toFixed(2)})`;
|
|
41
|
+
if (staticColors) return {
|
|
42
|
+
decl: `filter: ${grade};`,
|
|
43
|
+
keyframes: ""
|
|
44
|
+
};
|
|
45
|
+
const filter = (deg)=>`filter: hue-rotate(${deg >= 0 ? "" : "-"}${Math.abs(deg)}deg) ${grade};`;
|
|
46
|
+
return {
|
|
47
|
+
decl: `animation: beam-hue-shift-${id} 12s ease-in-out infinite;`,
|
|
48
|
+
keyframes: `
|
|
49
|
+
@keyframes beam-hue-shift-${id} {
|
|
50
|
+
0% { ${filter(-hueRange)} }
|
|
51
|
+
50% { ${filter(hueRange)} }
|
|
52
|
+
100% { ${filter(-hueRange)} }
|
|
53
|
+
}`
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
function bloomBlock(o) {
|
|
57
|
+
return `
|
|
58
|
+
[data-beam="${o.id}"] [data-beam-bloom] {
|
|
59
|
+
display: none; position: absolute; inset: 0;
|
|
60
|
+
border-radius: ${o.innerR}px; clip-path: inset(0 round ${o.borderRadius}px);
|
|
61
|
+
background: ${o.bloomGradient};
|
|
62
|
+
-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
|
|
63
|
+
-webkit-mask-composite: xor;
|
|
64
|
+
mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
|
|
65
|
+
mask-composite: exclude;
|
|
66
|
+
padding: ${o.borderWidth}px;
|
|
67
|
+
filter: blur(8px) brightness(${o.brightness.toFixed(2)}) saturate(${o.saturation.toFixed(2)});
|
|
68
|
+
pointer-events: none; z-index: 3; opacity: 0;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
[data-beam="${o.id}"][data-active] [data-beam-bloom],
|
|
72
|
+
[data-beam="${o.id}"][data-fading] [data-beam-bloom] {
|
|
73
|
+
display: block;
|
|
74
|
+
opacity: calc(var(--beam-opacity-${o.id}) * ${o.bloomOpacity.toFixed(2)} * var(--beam-strength, 1));
|
|
75
|
+
}`;
|
|
76
|
+
}
|
|
77
|
+
export function generateCss(opts) {
|
|
78
|
+
if (opts.size === "line") return generateLineCss(opts);
|
|
79
|
+
if (opts.size === "sm") return generateSmCss(opts);
|
|
80
|
+
return generateMdCss(opts);
|
|
81
|
+
}
|
|
82
|
+
function generateSmCss(o) {
|
|
83
|
+
const { id, borderRadius, borderWidth, duration, strokeOpacity, innerOpacity, bloomOpacity, innerShadow, colorVariant, staticColors, brightness, saturation, hueRange, theme, colors, bloom } = o;
|
|
84
|
+
const innerR = Math.max(0, borderRadius - borderWidth);
|
|
85
|
+
const scale = colorVariant === "mono" ? 0.5 : 1;
|
|
86
|
+
const sOp = strokeOpacity * scale;
|
|
87
|
+
const iOp = innerOpacity * scale;
|
|
88
|
+
const bOp = bloomOpacity * scale;
|
|
89
|
+
const hue = hueShift(id, staticColors, hueRange, brightness, saturation);
|
|
90
|
+
const dark = theme === "dark";
|
|
91
|
+
const strokeBeam = dark ? `conic-gradient(
|
|
92
|
+
from var(--beam-angle-${id}),
|
|
93
|
+
transparent 0%, transparent 54%,
|
|
94
|
+
rgba(255, 255, 255, 0.1) 57%,
|
|
95
|
+
rgba(255, 255, 255, 0.3) 60%,
|
|
96
|
+
rgba(255, 255, 255, 0.6) 63%,
|
|
97
|
+
rgba(255, 255, 255, 0.75) 66%,
|
|
98
|
+
rgba(255, 255, 255, 0.6) 69%,
|
|
99
|
+
rgba(255, 255, 255, 0.3) 72%,
|
|
100
|
+
rgba(255, 255, 255, 0.1) 75%,
|
|
101
|
+
transparent 78%, transparent 100%
|
|
102
|
+
)` : `conic-gradient(
|
|
103
|
+
from var(--beam-angle-${id}),
|
|
104
|
+
transparent 0%, transparent 54%,
|
|
105
|
+
rgba(0, 0, 0, 0.08) 57%,
|
|
106
|
+
rgba(0, 0, 0, 0.2) 60%,
|
|
107
|
+
rgba(0, 0, 0, 0.4) 63%,
|
|
108
|
+
rgba(0, 0, 0, 0.55) 66%,
|
|
109
|
+
rgba(0, 0, 0, 0.4) 69%,
|
|
110
|
+
rgba(0, 0, 0, 0.2) 72%,
|
|
111
|
+
rgba(0, 0, 0, 0.08) 75%,
|
|
112
|
+
transparent 78%, transparent 100%
|
|
113
|
+
)`;
|
|
114
|
+
const border = smBorderGradient(colorVariant, colors);
|
|
115
|
+
const inner = smInnerGradient(colorVariant, colors);
|
|
116
|
+
const bloomBeam = dark ? `conic-gradient(
|
|
117
|
+
from var(--beam-angle-${id}),
|
|
118
|
+
transparent 0%, transparent 58%,
|
|
119
|
+
rgba(255, 255, 255, 0.03) 62%,
|
|
120
|
+
rgba(255, 255, 255, 0.08) 65%,
|
|
121
|
+
rgba(255, 255, 255, 0.2) 67%,
|
|
122
|
+
rgba(255, 255, 255, 0.45) 69%,
|
|
123
|
+
rgba(255, 255, 255, 0.85) 70%,
|
|
124
|
+
rgba(255, 255, 255, 0.85) 70.5%,
|
|
125
|
+
rgba(255, 255, 255, 0.45) 71.5%,
|
|
126
|
+
rgba(255, 255, 255, 0.2) 73%,
|
|
127
|
+
rgba(255, 255, 255, 0.08) 75%,
|
|
128
|
+
rgba(255, 255, 255, 0.03) 78%,
|
|
129
|
+
transparent 82%
|
|
130
|
+
)` : `conic-gradient(
|
|
131
|
+
from var(--beam-angle-${id}),
|
|
132
|
+
transparent 0%, transparent 58%,
|
|
133
|
+
rgba(0, 0, 0, 0.02) 62%,
|
|
134
|
+
rgba(0, 0, 0, 0.08) 65%,
|
|
135
|
+
rgba(0, 0, 0, 0.2) 67%,
|
|
136
|
+
rgba(0, 0, 0, 0.4) 69%,
|
|
137
|
+
rgba(0, 0, 0, 0.6) 70%,
|
|
138
|
+
rgba(0, 0, 0, 0.6) 70.5%,
|
|
139
|
+
rgba(0, 0, 0, 0.4) 71.5%,
|
|
140
|
+
rgba(0, 0, 0, 0.2) 73%,
|
|
141
|
+
rgba(0, 0, 0, 0.08) 75%,
|
|
142
|
+
rgba(0, 0, 0, 0.02) 78%,
|
|
143
|
+
transparent 82%
|
|
144
|
+
)`;
|
|
145
|
+
const maskConic = `conic-gradient(
|
|
146
|
+
from var(--beam-angle-${id}),
|
|
147
|
+
transparent 0%, transparent 22%,
|
|
148
|
+
rgba(255, 255, 255, 0.12) 28%, rgba(255, 255, 255, 0.4) 36%,
|
|
149
|
+
white 46%, white 82%,
|
|
150
|
+
rgba(255, 255, 255, 0.4) 88%, rgba(255, 255, 255, 0.12) 94%,
|
|
151
|
+
transparent 97%, transparent 100%
|
|
152
|
+
)`;
|
|
153
|
+
const ringMask = `conic-gradient(from var(--beam-angle-${id}), transparent 0%, transparent 30%, rgba(255, 255, 255, 0.1) 36%, rgba(255, 255, 255, 0.35) 44%, white 52%, white 80%, rgba(255, 255, 255, 0.35) 86%, rgba(255, 255, 255, 0.1) 92%, transparent 95%, transparent 100%)`;
|
|
154
|
+
const bloomCss = bloom ? bloomBlock({
|
|
155
|
+
id,
|
|
156
|
+
borderRadius,
|
|
157
|
+
innerR,
|
|
158
|
+
borderWidth,
|
|
159
|
+
bloomGradient: bloomBeam,
|
|
160
|
+
brightness,
|
|
161
|
+
saturation,
|
|
162
|
+
bloomOpacity: bOp
|
|
163
|
+
}) : "";
|
|
164
|
+
return `
|
|
165
|
+
${spinHeader(id, borderRadius, duration)}
|
|
166
|
+
[data-beam="${id}"][data-active]::after,
|
|
167
|
+
[data-beam="${id}"][data-fading]::after {
|
|
168
|
+
content: ""; position: absolute; inset: 0;
|
|
169
|
+
border-radius: ${innerR}px; padding: ${borderWidth}px;
|
|
170
|
+
clip-path: inset(0 round ${borderRadius}px);
|
|
171
|
+
background: ${strokeBeam},${border};
|
|
172
|
+
-webkit-mask: ${ringMask}, linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
|
|
173
|
+
-webkit-mask-composite: source-in, xor;
|
|
174
|
+
mask: ${ringMask}, linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
|
|
175
|
+
mask-composite: intersect, exclude;
|
|
176
|
+
pointer-events: none; z-index: 2;
|
|
177
|
+
opacity: calc(var(--beam-opacity-${id}) * ${sOp.toFixed(2)} * var(--beam-strength, 1));
|
|
178
|
+
${hue.decl}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
[data-beam="${id}"][data-active]::before,
|
|
182
|
+
[data-beam="${id}"][data-fading]::before {
|
|
183
|
+
content: ""; position: absolute; inset: 0;
|
|
184
|
+
border-radius: ${borderRadius}px;
|
|
185
|
+
clip-path: inset(0 round ${borderRadius}px);
|
|
186
|
+
background: ${inner};
|
|
187
|
+
box-shadow: inset 0 0 5px 1px ${innerShadow};
|
|
188
|
+
-webkit-mask-image: ${maskConic};
|
|
189
|
+
-webkit-mask-composite: source-over;
|
|
190
|
+
mask-image: ${maskConic};
|
|
191
|
+
mask-composite: add;
|
|
192
|
+
pointer-events: none; z-index: 1;
|
|
193
|
+
opacity: calc(var(--beam-opacity-${id}) * ${iOp.toFixed(2)} * var(--beam-strength, 1));
|
|
194
|
+
${hue.decl}
|
|
195
|
+
}
|
|
196
|
+
${bloomCss}
|
|
197
|
+
${spinKeyframes(id)}
|
|
198
|
+
${hue.keyframes}
|
|
199
|
+
${commonHostRules(id)}
|
|
200
|
+
`;
|
|
201
|
+
}
|
|
202
|
+
function generateMdCss(o) {
|
|
203
|
+
const { id, borderRadius, borderWidth, duration, strokeOpacity, innerOpacity, bloomOpacity, innerShadow, colorVariant, staticColors, brightness, saturation, hueRange, theme, colors, bloom } = o;
|
|
204
|
+
const innerR = Math.max(0, borderRadius - borderWidth);
|
|
205
|
+
const scale = colorVariant === "mono" ? 0.5 : 1;
|
|
206
|
+
const sOp = strokeOpacity * scale;
|
|
207
|
+
const iOp = innerOpacity * scale;
|
|
208
|
+
const bOp = bloomOpacity * scale;
|
|
209
|
+
const hue = hueShift(id, staticColors, hueRange, brightness, saturation);
|
|
210
|
+
const dark = theme === "dark";
|
|
211
|
+
const strokeBeam = dark ? `conic-gradient(from var(--beam-angle-${id}), transparent 0%, transparent 54%, rgba(255, 255, 255, 0.1) 57%, rgba(255, 255, 255, 0.3) 60%, rgba(255, 255, 255, 0.6) 63%, rgba(255, 255, 255, 0.75) 66%, rgba(255, 255, 255, 0.6) 69%, rgba(255, 255, 255, 0.3) 72%, rgba(255, 255, 255, 0.1) 75%, transparent 78%, transparent 100%)` : `conic-gradient(from var(--beam-angle-${id}), transparent 0%, transparent 54%, rgba(0, 0, 0, 0.08) 57%, rgba(0, 0, 0, 0.2) 60%, rgba(0, 0, 0, 0.4) 63%, rgba(0, 0, 0, 0.55) 66%, rgba(0, 0, 0, 0.4) 69%, rgba(0, 0, 0, 0.2) 72%, rgba(0, 0, 0, 0.08) 75%, transparent 78%, transparent 100%)`;
|
|
212
|
+
const border = mdBorderGradient(colorVariant, colors);
|
|
213
|
+
const inner = mdInnerGradient(colorVariant, colors);
|
|
214
|
+
const bloomBeam = dark ? `conic-gradient(from var(--beam-angle-${id}), transparent 0%, transparent 58%, rgba(255, 255, 255, 0.03) 62%, rgba(255, 255, 255, 0.08) 65%, rgba(255, 255, 255, 0.2) 67%, rgba(255, 255, 255, 0.45) 69%, rgba(255, 255, 255, 0.85) 70%, rgba(255, 255, 255, 0.85) 70.5%, rgba(255, 255, 255, 0.45) 71.5%, rgba(255, 255, 255, 0.2) 73%, rgba(255, 255, 255, 0.08) 75%, rgba(255, 255, 255, 0.03) 78%, transparent 82%)` : `conic-gradient(from var(--beam-angle-${id}), transparent 0%, transparent 58%, rgba(0, 0, 0, 0.02) 62%, rgba(0, 0, 0, 0.08) 65%, rgba(0, 0, 0, 0.2) 67%, rgba(0, 0, 0, 0.4) 69%, rgba(0, 0, 0, 0.6) 70%, rgba(0, 0, 0, 0.6) 70.5%, rgba(0, 0, 0, 0.4) 71.5%, rgba(0, 0, 0, 0.2) 73%, rgba(0, 0, 0, 0.08) 75%, rgba(0, 0, 0, 0.02) 78%, transparent 82%)`;
|
|
215
|
+
const conicMask = `conic-gradient(from var(--beam-angle-${id}), transparent 0%, transparent 30%, rgba(255, 255, 255, 0.1) 36%, rgba(255, 255, 255, 0.35) 44%, white 52%, white 80%, rgba(255, 255, 255, 0.35) 86%, rgba(255, 255, 255, 0.1) 92%, transparent 95%, transparent 100%)`;
|
|
216
|
+
const bloomCss = bloom ? bloomBlock({
|
|
217
|
+
id,
|
|
218
|
+
borderRadius,
|
|
219
|
+
innerR,
|
|
220
|
+
borderWidth,
|
|
221
|
+
bloomGradient: bloomBeam,
|
|
222
|
+
brightness,
|
|
223
|
+
saturation,
|
|
224
|
+
bloomOpacity: bOp
|
|
225
|
+
}) : "";
|
|
226
|
+
return `
|
|
227
|
+
${spinHeader(id, borderRadius, duration)}
|
|
228
|
+
[data-beam="${id}"][data-active]::after,
|
|
229
|
+
[data-beam="${id}"][data-fading]::after {
|
|
230
|
+
content: ""; position: absolute; inset: 0;
|
|
231
|
+
border-radius: ${innerR}px; padding: ${borderWidth}px;
|
|
232
|
+
clip-path: inset(0 round ${borderRadius}px);
|
|
233
|
+
background: ${strokeBeam},${border};
|
|
234
|
+
-webkit-mask: ${conicMask}, linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
|
|
235
|
+
-webkit-mask-composite: source-in, xor;
|
|
236
|
+
mask: ${conicMask}, linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
|
|
237
|
+
mask-composite: intersect, exclude;
|
|
238
|
+
pointer-events: none; z-index: 2;
|
|
239
|
+
opacity: calc(var(--beam-opacity-${id}) * ${sOp.toFixed(2)} * var(--beam-strength, 1));
|
|
240
|
+
${hue.decl}
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
[data-beam="${id}"][data-active]::before,
|
|
244
|
+
[data-beam="${id}"][data-fading]::before {
|
|
245
|
+
content: ""; position: absolute; inset: 0;
|
|
246
|
+
border-radius: ${borderRadius}px;
|
|
247
|
+
background: ${inner};
|
|
248
|
+
box-shadow: inset 0 0 9px 1px ${innerShadow};
|
|
249
|
+
-webkit-mask-image: ${conicMask}, linear-gradient(white, transparent 28px, transparent calc(100% - 28px), white), linear-gradient(to right, white, transparent 28px, transparent calc(100% - 28px), white);
|
|
250
|
+
-webkit-mask-composite: source-in, source-over;
|
|
251
|
+
mask-image: ${conicMask}, linear-gradient(white, transparent 28px, transparent calc(100% - 28px), white), linear-gradient(to right, white, transparent 28px, transparent calc(100% - 28px), white);
|
|
252
|
+
mask-composite: intersect, add;
|
|
253
|
+
pointer-events: none; z-index: 1;
|
|
254
|
+
opacity: calc(var(--beam-opacity-${id}) * ${iOp.toFixed(2)} * var(--beam-strength, 1));
|
|
255
|
+
clip-path: inset(0 round ${borderRadius}px);
|
|
256
|
+
${hue.decl}
|
|
257
|
+
}
|
|
258
|
+
${bloomCss}
|
|
259
|
+
${spinKeyframes(id)}
|
|
260
|
+
${hue.keyframes}
|
|
261
|
+
${commonHostRules(id)}
|
|
262
|
+
`;
|
|
263
|
+
}
|
|
264
|
+
function generateLineCss(o) {
|
|
265
|
+
const { id, borderRadius, borderWidth, duration, strokeOpacity, innerOpacity, bloomOpacity, innerShadow, colorVariant, staticColors, brightness, saturation, hueRange, theme, colors, bloom } = o;
|
|
266
|
+
const innerR = Math.max(0, borderRadius - borderWidth);
|
|
267
|
+
const dark = theme === "dark";
|
|
268
|
+
const grade = `brightness(${brightness.toFixed(2)}) saturate(${saturation.toFixed(2)})`;
|
|
269
|
+
const hueAnim = staticColors ? `filter: ${grade};` : `animation: beam-hue-shift-${id} 12s ease-in-out infinite;`;
|
|
270
|
+
const bloomAnim = staticColors ? `filter: blur(8px) ${grade};` : `animation: beam-hue-shift-bloom-${id} 8s ease-in-out infinite;`;
|
|
271
|
+
const hueKeyframes = staticColors ? "" : `
|
|
272
|
+
@keyframes beam-hue-shift-${id} {
|
|
273
|
+
0% { filter: hue-rotate(-${hueRange}deg) brightness(${brightness.toFixed(2)}) saturate(${saturation.toFixed(2)}); }
|
|
274
|
+
50% { filter: hue-rotate(${hueRange}deg) brightness(${brightness.toFixed(2)}) saturate(${saturation.toFixed(2)}); }
|
|
275
|
+
100% { filter: hue-rotate(-${hueRange}deg) brightness(${brightness.toFixed(2)}) saturate(${saturation.toFixed(2)}); }
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
@keyframes beam-hue-shift-bloom-${id} {
|
|
279
|
+
0% { filter: blur(8px) hue-rotate(-${hueRange + 10}deg) brightness(${brightness.toFixed(2)}) saturate(${saturation.toFixed(2)}); }
|
|
280
|
+
50% { filter: blur(8px) hue-rotate(${hueRange + 10}deg) brightness(${brightness.toFixed(2)}) saturate(${saturation.toFixed(2)}); }
|
|
281
|
+
100% { filter: blur(8px) hue-rotate(-${hueRange + 10}deg) brightness(${brightness.toFixed(2)}) saturate(${saturation.toFixed(2)}); }
|
|
282
|
+
}`;
|
|
283
|
+
const highlight = dark ? `radial-gradient(ellipse calc(24px * var(--beam-w-${id})) calc(28px * var(--beam-h-${id})) at calc(var(--beam-x-${id}) * 100%) calc(100% + 2px), rgba(255, 255, 255, 0.38) 0%, rgba(255, 255, 255, 0.12) 30%, transparent 65%)` : `radial-gradient(ellipse calc(35px * var(--beam-w-${id})) calc(28px * var(--beam-h-${id})) at calc(var(--beam-x-${id}) * 100%) calc(100% + 2px), rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.25) 35%, transparent 70%)`;
|
|
284
|
+
const border = lineBorderGradient(colorVariant, dark, id, colors);
|
|
285
|
+
const inner = lineInnerGradient(colorVariant, id, colors);
|
|
286
|
+
const bloomGrad = lineBloomGradient(colorVariant, dark, id, colors);
|
|
287
|
+
return `
|
|
288
|
+
@property --beam-x-${id} { syntax: "<number>"; initial-value: 0; inherits: true; }
|
|
289
|
+
@property --beam-w-${id} { syntax: "<number>"; initial-value: 1; inherits: true; }
|
|
290
|
+
@property --beam-h-${id} { syntax: "<number>"; initial-value: 1; inherits: true; }
|
|
291
|
+
@property --beam-spike-${id} { syntax: "<number>"; initial-value: 1; inherits: true; }
|
|
292
|
+
@property --beam-spike2-${id} { syntax: "<number>"; initial-value: 1; inherits: true; }
|
|
293
|
+
@property --beam-edge-${id} { syntax: "<number>"; initial-value: 1; inherits: true; }
|
|
294
|
+
@property --beam-opacity-${id} { syntax: "<number>"; initial-value: 0; inherits: true; }
|
|
295
|
+
|
|
296
|
+
[data-beam="${id}"] { position: relative; border-radius: ${borderRadius}px; overflow: hidden; }
|
|
297
|
+
|
|
298
|
+
[data-beam="${id}"][data-active] {
|
|
299
|
+
animation:
|
|
300
|
+
beam-travel-${id} ${duration}s linear infinite,
|
|
301
|
+
beam-edge-fade-${id} ${duration}s linear infinite,
|
|
302
|
+
beam-breathe-${id} ${(duration * 1.3).toFixed(1)}s ease-in-out infinite,
|
|
303
|
+
beam-spike-${id} ${(duration * 1.33).toFixed(1)}s ease-in-out infinite,
|
|
304
|
+
beam-spike2-${id} ${(duration * 1.7).toFixed(1)}s ease-in-out infinite,
|
|
305
|
+
beam-fade-in-${id} 0.6s ease forwards;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
[data-beam="${id}"][data-fading] {
|
|
309
|
+
animation:
|
|
310
|
+
beam-travel-${id} ${duration}s linear infinite,
|
|
311
|
+
beam-edge-fade-${id} ${duration}s linear infinite,
|
|
312
|
+
beam-breathe-${id} ${(duration * 1.3).toFixed(1)}s ease-in-out infinite,
|
|
313
|
+
beam-spike-${id} ${(duration * 1.33).toFixed(1)}s ease-in-out infinite,
|
|
314
|
+
beam-spike2-${id} ${(duration * 1.7).toFixed(1)}s ease-in-out infinite,
|
|
315
|
+
beam-fade-out-${id} 0.5s ease forwards;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
[data-beam="${id}"][data-active]::after,
|
|
319
|
+
[data-beam="${id}"][data-fading]::after {
|
|
320
|
+
content: ""; position: absolute; inset: 0;
|
|
321
|
+
border-radius: ${innerR}px; padding: ${borderWidth}px;
|
|
322
|
+
clip-path: inset(0 round ${borderRadius}px);
|
|
323
|
+
background: ${highlight}, ${border};
|
|
324
|
+
-webkit-mask: radial-gradient(ellipse calc(78px * var(--beam-w-${id})) calc(60px * var(--beam-h-${id})) at calc(var(--beam-x-${id}) * 100%) 100%, white 0%, rgba(255, 255, 255, 0.5) 45%, transparent 100%), linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
|
|
325
|
+
-webkit-mask-composite: source-in, xor;
|
|
326
|
+
mask: radial-gradient(ellipse calc(78px * var(--beam-w-${id})) calc(60px * var(--beam-h-${id})) at calc(var(--beam-x-${id}) * 100%) 100%, white 0%, rgba(255, 255, 255, 0.5) 45%, transparent 100%), linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
|
|
327
|
+
mask-composite: intersect, exclude;
|
|
328
|
+
pointer-events: none; z-index: 2;
|
|
329
|
+
opacity: calc(var(--beam-opacity-${id}) * var(--beam-edge-${id}) * ${strokeOpacity.toFixed(2)} * var(--beam-strength, 1));
|
|
330
|
+
${hueAnim}
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
[data-beam="${id}"][data-active]::before,
|
|
334
|
+
[data-beam="${id}"][data-fading]::before {
|
|
335
|
+
content: ""; position: absolute; inset: 0;
|
|
336
|
+
border-radius: ${borderRadius}px;
|
|
337
|
+
background: ${inner};
|
|
338
|
+
box-shadow: inset 0 0 9px 1px ${innerShadow};
|
|
339
|
+
-webkit-mask-image: radial-gradient(ellipse calc(78px * var(--beam-w-${id})) calc(60px * var(--beam-h-${id})) at calc(var(--beam-x-${id}) * 100%) 100%, white 0%, rgba(255, 255, 255, 0.5) 45%, transparent 100%), linear-gradient(white, transparent 28px, transparent calc(100% - 28px), white), linear-gradient(to right, white, transparent 28px, transparent calc(100% - 28px), white);
|
|
340
|
+
-webkit-mask-composite: source-in, source-over;
|
|
341
|
+
mask-image: radial-gradient(ellipse calc(78px * var(--beam-w-${id})) calc(60px * var(--beam-h-${id})) at calc(var(--beam-x-${id}) * 100%) 100%, white 0%, rgba(255, 255, 255, 0.5) 45%, transparent 100%), linear-gradient(white, transparent 28px, transparent calc(100% - 28px), white), linear-gradient(to right, white, transparent 28px, transparent calc(100% - 28px), white);
|
|
342
|
+
mask-composite: intersect, add;
|
|
343
|
+
pointer-events: none; z-index: 1;
|
|
344
|
+
opacity: calc(var(--beam-opacity-${id}) * var(--beam-edge-${id}) * ${innerOpacity.toFixed(2)} * var(--beam-strength, 1));
|
|
345
|
+
clip-path: inset(0 round ${borderRadius}px);
|
|
346
|
+
${hueAnim}
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
${bloom ? `
|
|
350
|
+
[data-beam="${id}"] [data-beam-bloom] {
|
|
351
|
+
display: none; position: absolute; inset: 0;
|
|
352
|
+
border-radius: ${innerR}px; clip-path: inset(0 round ${borderRadius}px);
|
|
353
|
+
padding: 0;
|
|
354
|
+
-webkit-mask: radial-gradient(ellipse calc(84px * var(--beam-w-${id})) calc(110px * var(--beam-h-${id})) at calc(var(--beam-x-${id}) * 100%) 100%, white 0%, rgba(255, 255, 255, 0.5) 35%, transparent 100%);
|
|
355
|
+
-webkit-mask-composite: source-over;
|
|
356
|
+
mask: radial-gradient(ellipse calc(84px * var(--beam-w-${id})) calc(110px * var(--beam-h-${id})) at calc(var(--beam-x-${id}) * 100%) 100%, white 0%, rgba(255, 255, 255, 0.5) 35%, transparent 100%);
|
|
357
|
+
mask-composite: add;
|
|
358
|
+
background: ${bloomGrad};
|
|
359
|
+
pointer-events: none; z-index: 3; opacity: 0;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
[data-beam="${id}"][data-active] [data-beam-bloom],
|
|
363
|
+
[data-beam="${id}"][data-fading] [data-beam-bloom] {
|
|
364
|
+
display: block;
|
|
365
|
+
opacity: calc(var(--beam-opacity-${id}) * var(--beam-edge-${id}) * ${bloomOpacity.toFixed(2)} * var(--beam-strength, 1));
|
|
366
|
+
${bloomAnim}
|
|
367
|
+
}` : ""}
|
|
368
|
+
|
|
369
|
+
@keyframes beam-travel-${id} {
|
|
370
|
+
0% { --beam-x-${id}: 0.06; --beam-w-${id}: 0.5; }
|
|
371
|
+
10% { --beam-x-${id}: 0.15; --beam-w-${id}: 0.8; }
|
|
372
|
+
20% { --beam-x-${id}: 0.25; --beam-w-${id}: 1.1; }
|
|
373
|
+
30% { --beam-x-${id}: 0.35; --beam-w-${id}: 1.3; }
|
|
374
|
+
40% { --beam-x-${id}: 0.44; --beam-w-${id}: 1.45; }
|
|
375
|
+
50% { --beam-x-${id}: 0.5; --beam-w-${id}: 1.5; }
|
|
376
|
+
60% { --beam-x-${id}: 0.56; --beam-w-${id}: 1.45; }
|
|
377
|
+
70% { --beam-x-${id}: 0.65; --beam-w-${id}: 1.3; }
|
|
378
|
+
80% { --beam-x-${id}: 0.75; --beam-w-${id}: 1.1; }
|
|
379
|
+
90% { --beam-x-${id}: 0.85; --beam-w-${id}: 0.8; }
|
|
380
|
+
100% { --beam-x-${id}: 0.94; --beam-w-${id}: 0.5; }
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
@keyframes beam-edge-fade-${id} {
|
|
384
|
+
0% { --beam-edge-${id}: 0; }
|
|
385
|
+
12.5% { --beam-edge-${id}: 0; }
|
|
386
|
+
32.5% { --beam-edge-${id}: 1; }
|
|
387
|
+
67.5% { --beam-edge-${id}: 1; }
|
|
388
|
+
87.5% { --beam-edge-${id}: 0; }
|
|
389
|
+
100% { --beam-edge-${id}: 0; }
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
@keyframes beam-breathe-${id} {
|
|
393
|
+
0%, 100% { --beam-h-${id}: 0.8; }
|
|
394
|
+
25% { --beam-h-${id}: 1.25; }
|
|
395
|
+
55% { --beam-h-${id}: 0.85; }
|
|
396
|
+
80% { --beam-h-${id}: 1.3; }
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
@keyframes beam-spike-${id} {
|
|
400
|
+
0% { --beam-spike-${id}: 0.8; }
|
|
401
|
+
25% { --beam-spike-${id}: 1.3; }
|
|
402
|
+
50% { --beam-spike-${id}: 0.9; }
|
|
403
|
+
75% { --beam-spike-${id}: 1.4; }
|
|
404
|
+
100% { --beam-spike-${id}: 0.8; }
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
@keyframes beam-spike2-${id} {
|
|
408
|
+
0% { --beam-spike2-${id}: 1.2; }
|
|
409
|
+
25% { --beam-spike2-${id}: 0.7; }
|
|
410
|
+
50% { --beam-spike2-${id}: 1.4; }
|
|
411
|
+
75% { --beam-spike2-${id}: 0.8; }
|
|
412
|
+
100% { --beam-spike2-${id}: 1.2; }
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
@keyframes beam-fade-in-${id} { to { --beam-opacity-${id}: 1; } }
|
|
416
|
+
@keyframes beam-fade-out-${id} { from { --beam-opacity-${id}: 1; } to { --beam-opacity-${id}: 0; } }
|
|
417
|
+
${hueKeyframes}
|
|
418
|
+
${commonHostRules(id)}
|
|
419
|
+
`;
|
|
420
|
+
}
|