@editora/ui-core 0.1.19 → 0.1.21
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/dist/{ElementBase-1b301e7f.js → ElementBase-EV6mVBUV.js} +1 -1
- package/dist/{ElementBase-909688f3.mjs → ElementBase-YlTLMsGk.mjs} +3 -3
- package/dist/accordion.cjs.js +3 -3
- package/dist/accordion.esm.js +39 -62
- package/dist/alert-dialog.cjs.js +19 -19
- package/dist/alert-dialog.esm.js +69 -87
- package/dist/alert.cjs.js +1 -1
- package/dist/alert.esm.js +4 -7
- package/dist/anchor.cjs.js +2 -2
- package/dist/anchor.esm.js +3 -3
- package/dist/animated-beam.cjs.js +83 -83
- package/dist/animated-beam.esm.js +250 -277
- package/dist/animated-list.cjs.js +4 -4
- package/dist/animated-list.esm.js +47 -61
- package/dist/animated-text.cjs.js +2 -2
- package/dist/animated-text.esm.js +13 -24
- package/dist/app-header.cjs.js +3 -3
- package/dist/app-header.esm.js +11 -13
- package/dist/aspect-ratio.cjs.js +1 -1
- package/dist/aspect-ratio.esm.js +4 -7
- package/dist/avatar.cjs.js +1 -1
- package/dist/avatar.esm.js +7 -13
- package/dist/badge.cjs.js +1 -1
- package/dist/badge.esm.js +4 -7
- package/dist/block-controls.cjs.js +2 -2
- package/dist/block-controls.esm.js +19 -35
- package/dist/box.cjs.js +1 -1
- package/dist/box.esm.js +8 -15
- package/dist/breadcrumb.cjs.js +2 -2
- package/dist/breadcrumb.esm.js +20 -37
- package/dist/button.cjs.js +1 -521
- package/dist/button.esm.js +2 -671
- package/dist/{calendar-2c11b824.mjs → calendar-DLY4acgn.mjs} +293 -342
- package/dist/{calendar-a8735e40.js → calendar-Dkof-FTK.js} +25 -25
- package/dist/calendar.cjs.js +1 -1
- package/dist/calendar.esm.js +8 -9
- package/dist/card.cjs.js +4 -4
- package/dist/card.esm.js +13 -19
- package/dist/chart.cjs.js +64 -64
- package/dist/chart.esm.js +223 -254
- package/dist/checkbox.cjs.js +1 -1
- package/dist/checkbox.esm.js +2 -3
- package/dist/collapsible.cjs.js +1 -1
- package/dist/collapsible.esm.js +5 -9
- package/dist/{collection-a1aac0c6.mjs → collection-C7URGjEI.mjs} +8 -14
- package/dist/collection.cjs.js +1 -1
- package/dist/collection.esm.js +30 -29
- package/dist/color-picker.cjs.js +10 -10
- package/dist/color-picker.esm.js +190 -253
- package/dist/combobox.cjs.js +13 -13
- package/dist/combobox.esm.js +93 -126
- package/dist/command-palette.cjs.js +3 -3
- package/dist/command-palette.esm.js +19 -30
- package/dist/command.cjs.js +4 -4
- package/dist/command.esm.js +41 -53
- package/dist/components/ui-collection.d.ts.map +1 -1
- package/dist/components/ui-multi-select.d.ts.map +1 -1
- package/dist/components/ui-orbiter.d.ts.map +1 -1
- package/dist/components/ui-portal.d.ts.map +1 -1
- package/dist/components/ui-positioner.d.ts.map +1 -1
- package/dist/components/ui-skeleton.d.ts.map +1 -1
- package/dist/components/ui-sortable.d.ts +8 -0
- package/dist/components/ui-sortable.d.ts.map +1 -1
- package/dist/components/ui-split-button.d.ts +1 -0
- package/dist/components/ui-split-button.d.ts.map +1 -1
- package/dist/components/ui-tabs.d.ts.map +1 -1
- package/dist/components/ui-textarea.d.ts.map +1 -1
- package/dist/components/ui-time-picker.d.ts.map +1 -1
- package/dist/container.cjs.js +2 -2
- package/dist/container.esm.js +2 -3
- package/dist/context-menu.cjs.js +8 -8
- package/dist/context-menu.esm.js +157 -219
- package/dist/control-group.cjs.js +1 -1
- package/dist/control-group.esm.js +2 -3
- package/dist/data-table.cjs.js +4 -4
- package/dist/data-table.esm.js +299 -381
- package/dist/date-field.cjs.js +3 -3
- package/dist/date-field.esm.js +68 -80
- package/dist/date-picker.cjs.js +9 -9
- package/dist/date-picker.esm.js +69 -97
- package/dist/date-range-picker.cjs.js +3 -3
- package/dist/date-range-picker.esm.js +32 -56
- package/dist/date-range-time-picker.cjs.js +9 -9
- package/dist/date-range-time-picker.esm.js +111 -140
- package/dist/date-time-picker.cjs.js +7 -7
- package/dist/date-time-picker.esm.js +115 -147
- package/dist/date-time-utils-Dmost5Ee.js +1 -0
- package/dist/date-time-utils-y1N2gvG2.mjs +268 -0
- package/dist/description.cjs.js +1 -1
- package/dist/description.esm.js +3 -5
- package/dist/dialog.cjs.js +12 -12
- package/dist/dialog.esm.js +44 -63
- package/dist/direction-provider.cjs.js +1 -1
- package/dist/direction-provider.esm.js +2 -3
- package/dist/{dismissable-layer-9c7e6b58.mjs → dismissable-layer-BmPIoK80.mjs} +29 -33
- package/dist/dismissable-layer-DNfrKA20.js +1 -0
- package/dist/dismissable-layer.cjs.js +2 -2
- package/dist/dismissable-layer.esm.js +4 -6
- package/dist/dock.cjs.js +5 -5
- package/dist/dock.esm.js +134 -155
- package/dist/drawer.cjs.js +2 -2
- package/dist/drawer.esm.js +18 -35
- package/dist/dropdown.cjs.js +2 -2
- package/dist/dropdown.esm.js +119 -149
- package/dist/dropzone.cjs.js +1 -1
- package/dist/dropzone.esm.js +0 -1
- package/dist/empty-state.cjs.js +1 -1
- package/dist/empty-state.esm.js +1 -1
- package/dist/field-error.cjs.js +1 -1
- package/dist/field-error.esm.js +3 -5
- package/dist/field.cjs.js +5 -5
- package/dist/field.esm.js +27 -34
- package/dist/fieldset.cjs.js +4 -4
- package/dist/fieldset.esm.js +19 -24
- package/dist/file-upload.cjs.js +4 -4
- package/dist/file-upload.esm.js +69 -93
- package/dist/flex.cjs.js +1 -1
- package/dist/flex.esm.js +5 -9
- package/dist/floating-toolbar.cjs.js +4 -4
- package/dist/floating-toolbar.esm.js +60 -85
- package/dist/focus-scope-Bwug2gDv.js +1 -0
- package/dist/{focus-scope-103833ee.mjs → focus-scope-CmEsG5UZ.mjs} +39 -48
- package/dist/focus-scope.cjs.js +2 -2
- package/dist/focus-scope.esm.js +15 -20
- package/dist/form.cjs.js +2 -2
- package/dist/form.esm.js +26 -53
- package/dist/gantt.cjs.js +43 -43
- package/dist/gantt.esm.js +295 -322
- package/dist/grid.cjs.js +1 -1
- package/dist/grid.esm.js +5 -9
- package/dist/hover-card.cjs.js +4 -4
- package/dist/hover-card.esm.js +22 -28
- package/dist/icon-cloud.cjs.js +7 -7
- package/dist/icon-cloud.esm.js +48 -62
- package/dist/icon.cjs.js +1 -1
- package/dist/icon.esm.js +2 -4
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +378 -390
- package/dist/inline-edit.cjs.js +11 -11
- package/dist/inline-edit.esm.js +32 -36
- package/dist/input.cjs.js +17 -17
- package/dist/input.esm.js +50 -63
- package/dist/label.cjs.js +2 -2
- package/dist/label.esm.js +8 -17
- package/dist/layout.cjs.js +2 -2
- package/dist/layout.esm.js +20 -26
- package/dist/listbox-B6QgECax.js +46 -0
- package/dist/listbox-DJamVeFj.mjs +200 -0
- package/dist/listbox.cjs.js +1 -1
- package/dist/listbox.esm.js +2 -4
- package/dist/marquee.cjs.js +5 -5
- package/dist/marquee.esm.js +33 -50
- package/dist/masonry-grid.cjs.js +1 -1
- package/dist/masonry-grid.esm.js +5 -9
- package/dist/menu.cjs.js +3 -3
- package/dist/menu.esm.js +106 -126
- package/dist/menubar.cjs.js +5 -5
- package/dist/menubar.esm.js +118 -164
- package/dist/meter.cjs.js +2 -2
- package/dist/meter.esm.js +4 -4
- package/dist/multi-select.cjs.js +5 -5
- package/dist/multi-select.esm.js +125 -137
- package/dist/navigation-menu.cjs.js +4 -4
- package/dist/navigation-menu.esm.js +44 -55
- package/dist/number-field.cjs.js +2 -2
- package/dist/number-field.esm.js +73 -98
- package/dist/number-ticker.cjs.js +3 -3
- package/dist/number-ticker.esm.js +22 -43
- package/dist/odometer.cjs.js +1 -1
- package/dist/odometer.esm.js +5 -9
- package/dist/orbiter.cjs.js +13 -13
- package/dist/orbiter.esm.js +79 -90
- package/dist/{overlayManager-5bbd4dc3.mjs → overlayManager-BJjU1VA8.mjs} +4 -5
- package/dist/{overlayManager-0eda4e08.js → overlayManager-CSy3fJmJ.js} +1 -1
- package/dist/pagination.cjs.js +2 -2
- package/dist/pagination.esm.js +14 -18
- package/dist/{panel-group-a376cc5e.mjs → panel-group-8sVNnGxg.mjs} +24 -46
- package/dist/panel-group-CaD0_KQf.js +36 -0
- package/dist/panel-group.cjs.js +1 -1
- package/dist/panel-group.esm.js +2 -5
- package/dist/panel.cjs.js +4 -4
- package/dist/panel.esm.js +8 -10
- package/dist/password-field.cjs.js +9 -9
- package/dist/password-field.esm.js +62 -82
- package/dist/pin-input.cjs.js +3 -3
- package/dist/pin-input.esm.js +33 -39
- package/dist/placement-grid.cjs.js +4 -4
- package/dist/placement-grid.esm.js +108 -131
- package/dist/plugin-panel.cjs.js +7 -7
- package/dist/plugin-panel.esm.js +13 -15
- package/dist/popover.cjs.js +2 -2
- package/dist/popover.esm.js +21 -31
- package/dist/portal-DgpQ3Jo1.js +1 -0
- package/dist/{portal-fe73e5cc.mjs → portal-bR42gHvG.mjs} +43 -48
- package/dist/portal.cjs.js +3 -3
- package/dist/portal.esm.js +20 -28
- package/dist/{positioner-e9770c66.mjs → positioner-D0VGxtYU.mjs} +189 -209
- package/dist/positioner-D_fqyx_j.js +1 -0
- package/dist/positioner.cjs.js +2 -2
- package/dist/positioner.esm.js +22 -28
- package/dist/presence.cjs.js +1 -1
- package/dist/presence.esm.js +7 -13
- package/dist/primitives/auto-scroll.d.ts +9 -0
- package/dist/primitives/auto-scroll.d.ts.map +1 -0
- package/dist/primitives/selector.d.ts +4 -0
- package/dist/primitives/selector.d.ts.map +1 -0
- package/dist/progress.cjs.js +1 -1
- package/dist/progress.esm.js +5 -9
- package/dist/quick-actions.cjs.js +6 -6
- package/dist/quick-actions.esm.js +52 -62
- package/dist/radio-group.cjs.js +13 -13
- package/dist/radio-group.esm.js +39 -51
- package/dist/radio.cjs.js +1 -1
- package/dist/radio.esm.js +5 -9
- package/dist/rating.cjs.js +1 -1
- package/dist/rating.esm.js +12 -23
- package/dist/{roving-focus-group-4350c9a7.mjs → roving-focus-group-Dbm1Jko_.mjs} +3 -6
- package/dist/roving-focus-group.cjs.js +1 -1
- package/dist/roving-focus-group.esm.js +3 -5
- package/dist/runtime-CTaOSmBj.js +1 -0
- package/dist/{runtime-161f68a2.mjs → runtime-D1gFh1fS.mjs} +338 -366
- package/dist/runtime.cjs.js +1 -1
- package/dist/runtime.esm.js +6 -6
- package/dist/scroll-area.cjs.js +3 -3
- package/dist/scroll-area.esm.js +38 -46
- package/dist/{scroll-lock-31da444f.mjs → scroll-lock-LfqXXqsu.mjs} +5 -9
- package/dist/section.cjs.js +1 -1
- package/dist/section.esm.js +1 -1
- package/dist/select.cjs.js +7 -7
- package/dist/select.esm.js +67 -97
- package/dist/selection-popup.cjs.js +1 -1
- package/dist/selection-popup.esm.js +8 -15
- package/dist/selector-BvAh35ve.js +1 -0
- package/dist/selector-WI8pD7YO.mjs +18 -0
- package/dist/separator.cjs.js +1 -1
- package/dist/separator.esm.js +1 -1
- package/dist/sidebar.cjs.js +18 -18
- package/dist/sidebar.esm.js +117 -139
- package/dist/skeleton.cjs.js +11 -11
- package/dist/skeleton.esm.js +27 -24
- package/dist/slider.cjs.js +1 -1
- package/dist/slider.esm.js +6 -11
- package/dist/slot.cjs.js +4 -4
- package/dist/slot.esm.js +16 -19
- package/dist/sortable.cjs.js +79 -65
- package/dist/sortable.esm.js +714 -734
- package/dist/spinning-text.cjs.js +12 -12
- package/dist/spinning-text.esm.js +80 -92
- package/dist/split-button.cjs.js +4 -4
- package/dist/split-button.esm.js +77 -62
- package/dist/splitter.cjs.js +1 -1
- package/dist/splitter.esm.js +1 -1
- package/dist/stepper.cjs.js +8 -8
- package/dist/stepper.esm.js +32 -52
- package/dist/switch.cjs.js +7 -7
- package/dist/switch.esm.js +23 -31
- package/dist/table.cjs.js +2 -2
- package/dist/table.esm.js +46 -56
- package/dist/tabs.cjs.js +8 -8
- package/dist/tabs.esm.js +89 -109
- package/dist/tags-input.cjs.js +4 -4
- package/dist/tags-input.esm.js +45 -62
- package/dist/textarea.cjs.js +10 -10
- package/dist/textarea.esm.js +49 -52
- package/dist/time-field.cjs.js +4 -4
- package/dist/time-field.esm.js +70 -84
- package/dist/time-picker.cjs.js +22 -22
- package/dist/time-picker.esm.js +88 -110
- package/dist/timeline.cjs.js +1 -1
- package/dist/timeline.esm.js +3 -5
- package/dist/toast.cjs.js +2 -2
- package/dist/toast.esm.js +33 -47
- package/dist/toggle-group.cjs.js +6 -6
- package/dist/toggle-group.esm.js +85 -105
- package/dist/toggle.cjs.js +1 -1
- package/dist/toggle.esm.js +3 -5
- package/dist/toolbar.cjs.js +1 -1
- package/dist/toolbar.esm.js +13 -24
- package/dist/tooltip.cjs.js +2 -2
- package/dist/tooltip.esm.js +31 -42
- package/dist/transfer-list.cjs.js +31 -31
- package/dist/transfer-list.esm.js +114 -127
- package/dist/{tree-dcd74a4a.mjs → tree-B3kE8ESs.mjs} +55 -62
- package/dist/tree-Dx_kv_ih.js +39 -0
- package/dist/tree-item.cjs.js +2 -2
- package/dist/tree-item.esm.js +2 -3
- package/dist/tree.cjs.js +1 -1
- package/dist/tree.esm.js +2 -5
- package/dist/ui-button-Q0GNNWKC.mjs +665 -0
- package/dist/ui-button-rXQOS9QJ.js +521 -0
- package/dist/{icon-9e9da03b.js → ui-icon-BzVNC_lr.js} +4 -4
- package/dist/{icon-e2a85cc1.mjs → ui-icon-YI6lyuqU.mjs} +58 -65
- package/dist/visually-hidden.cjs.js +1 -1
- package/dist/visually-hidden.esm.js +1 -1
- package/dist/wizard.cjs.js +14 -14
- package/dist/wizard.esm.js +85 -105
- package/package.json +2 -2
- package/dist/date-time-utils-66480de4.js +0 -1
- package/dist/date-time-utils-a2c7af25.mjs +0 -307
- package/dist/dismissable-layer-193e3bed.js +0 -1
- package/dist/focus-scope-2b12b4e7.js +0 -1
- package/dist/listbox-308789a0.mjs +0 -210
- package/dist/listbox-ef2f708e.js +0 -46
- package/dist/panel-group-40254cdd.js +0 -36
- package/dist/portal-c69756c0.js +0 -1
- package/dist/positioner-33529bb8.js +0 -1
- package/dist/runtime-3f13807b.js +0 -1
- package/dist/tree-0a7a8d05.js +0 -39
- /package/dist/{collection-a2969ad2.js → collection-qv8A8rq4.js} +0 -0
- /package/dist/{menu-item-styles-27fdbac4.mjs → menu-item-styles-CZiPwPwl.mjs} +0 -0
- /package/dist/{menu-item-styles-83ad1e22.js → menu-item-styles-CbNUEwP2.js} +0 -0
- /package/dist/{roving-focus-group-5c059bf9.js → roving-focus-group-BdJ_4Njm.js} +0 -0
- /package/dist/{scroll-lock-d7b0df21.js → scroll-lock-BX6e3Ced.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as pe } from "./ElementBase-
|
|
1
|
+
import { E as pe } from "./ElementBase-YlTLMsGk.mjs";
|
|
2
2
|
const ie = 3200, ne = 0, oe = 0, se = 3, re = 4, de = 0.18, me = 3, D = "#8b5cf6", q = "#f59e0b", fe = "rgba(148, 163, 184, 0.34)", j = 2, ge = /* @__PURE__ */ new Set(["none", "sm", "md", "lg", "full"]), ue = /* @__PURE__ */ new Set(["brand", "neutral", "info", "success", "warning", "danger"]), xe = /* @__PURE__ */ new Set(["calm", "smooth", "snappy", "surge", "pulse", "heartbeat"]), Y = /* @__PURE__ */ new Set(["auto", "straight", "soft", "arc"]), X = /* @__PURE__ */ new Set(["forward", "reverse"]), ye = /* @__PURE__ */ new Set(["none", "glow", "pulse", "ring", "shake"]), K = [
|
|
3
3
|
"node-id",
|
|
4
4
|
"column",
|
|
@@ -18,7 +18,7 @@ const ie = 3200, ne = 0, oe = 0, se = 3, re = 4, de = 0.18, me = 3, D = "#8b5cf6
|
|
|
18
18
|
"trail-width",
|
|
19
19
|
"beam-width",
|
|
20
20
|
"id"
|
|
21
|
-
],
|
|
21
|
+
], c = {
|
|
22
22
|
xxs: {
|
|
23
23
|
nodeSize: 36,
|
|
24
24
|
hubSize: 50,
|
|
@@ -120,14 +120,14 @@ const ie = 3200, ne = 0, oe = 0, se = 3, re = 4, de = 0.18, me = 3, D = "#8b5cf6
|
|
|
120
120
|
--ui-animated-beam-duration: ${ie}ms;
|
|
121
121
|
--ui-animated-beam-delay: ${ne}ms;
|
|
122
122
|
--ui-animated-beam-stagger: ${oe}ms;
|
|
123
|
-
--ui-animated-beam-padding: ${
|
|
124
|
-
--ui-animated-beam-column-gap: ${
|
|
125
|
-
--ui-animated-beam-row-gap: ${
|
|
126
|
-
--ui-animated-beam-node-size: ${
|
|
127
|
-
--ui-animated-beam-hub-size: ${
|
|
128
|
-
--ui-animated-beam-min-height: ${
|
|
123
|
+
--ui-animated-beam-padding: ${c.md.padding}px;
|
|
124
|
+
--ui-animated-beam-column-gap: ${c.md.columnGap}px;
|
|
125
|
+
--ui-animated-beam-row-gap: ${c.md.rowGap}px;
|
|
126
|
+
--ui-animated-beam-node-size: ${c.md.nodeSize}px;
|
|
127
|
+
--ui-animated-beam-hub-size: ${c.md.hubSize}px;
|
|
128
|
+
--ui-animated-beam-min-height: ${c.md.minHeight}px;
|
|
129
129
|
--ui-animated-beam-columns: ${me};
|
|
130
|
-
--ui-animated-beam-radius: ${
|
|
130
|
+
--ui-animated-beam-radius: ${c.md.radius}px;
|
|
131
131
|
--ui-animated-beam-trail-width: ${se}px;
|
|
132
132
|
--ui-animated-beam-beam-width: ${re}px;
|
|
133
133
|
--ui-animated-beam-beam-factor: ${de};
|
|
@@ -172,57 +172,57 @@ const ie = 3200, ne = 0, oe = 0, se = 3, re = 4, de = 0.18, me = 3, D = "#8b5cf6
|
|
|
172
172
|
|
|
173
173
|
:host([size="xxs"]),
|
|
174
174
|
:host([size="0"]) {
|
|
175
|
-
--ui-animated-beam-padding: ${
|
|
176
|
-
--ui-animated-beam-column-gap: ${
|
|
177
|
-
--ui-animated-beam-row-gap: ${
|
|
178
|
-
--ui-animated-beam-node-size: ${
|
|
179
|
-
--ui-animated-beam-hub-size: ${
|
|
180
|
-
--ui-animated-beam-min-height: ${
|
|
181
|
-
--ui-animated-beam-radius: ${
|
|
175
|
+
--ui-animated-beam-padding: ${c.xxs.padding}px;
|
|
176
|
+
--ui-animated-beam-column-gap: ${c.xxs.columnGap}px;
|
|
177
|
+
--ui-animated-beam-row-gap: ${c.xxs.rowGap}px;
|
|
178
|
+
--ui-animated-beam-node-size: ${c.xxs.nodeSize}px;
|
|
179
|
+
--ui-animated-beam-hub-size: ${c.xxs.hubSize}px;
|
|
180
|
+
--ui-animated-beam-min-height: ${c.xxs.minHeight}px;
|
|
181
|
+
--ui-animated-beam-radius: ${c.xxs.radius}px;
|
|
182
182
|
}
|
|
183
183
|
|
|
184
184
|
:host([size="xs"]) {
|
|
185
|
-
--ui-animated-beam-padding: ${
|
|
186
|
-
--ui-animated-beam-column-gap: ${
|
|
187
|
-
--ui-animated-beam-row-gap: ${
|
|
188
|
-
--ui-animated-beam-node-size: ${
|
|
189
|
-
--ui-animated-beam-hub-size: ${
|
|
190
|
-
--ui-animated-beam-min-height: ${
|
|
191
|
-
--ui-animated-beam-radius: ${
|
|
185
|
+
--ui-animated-beam-padding: ${c.xs.padding}px;
|
|
186
|
+
--ui-animated-beam-column-gap: ${c.xs.columnGap}px;
|
|
187
|
+
--ui-animated-beam-row-gap: ${c.xs.rowGap}px;
|
|
188
|
+
--ui-animated-beam-node-size: ${c.xs.nodeSize}px;
|
|
189
|
+
--ui-animated-beam-hub-size: ${c.xs.hubSize}px;
|
|
190
|
+
--ui-animated-beam-min-height: ${c.xs.minHeight}px;
|
|
191
|
+
--ui-animated-beam-radius: ${c.xs.radius}px;
|
|
192
192
|
}
|
|
193
193
|
|
|
194
194
|
:host([size="sm"]),
|
|
195
195
|
:host([size="1"]) {
|
|
196
|
-
--ui-animated-beam-padding: ${
|
|
197
|
-
--ui-animated-beam-column-gap: ${
|
|
198
|
-
--ui-animated-beam-row-gap: ${
|
|
199
|
-
--ui-animated-beam-node-size: ${
|
|
200
|
-
--ui-animated-beam-hub-size: ${
|
|
201
|
-
--ui-animated-beam-min-height: ${
|
|
202
|
-
--ui-animated-beam-radius: ${
|
|
196
|
+
--ui-animated-beam-padding: ${c.sm.padding}px;
|
|
197
|
+
--ui-animated-beam-column-gap: ${c.sm.columnGap}px;
|
|
198
|
+
--ui-animated-beam-row-gap: ${c.sm.rowGap}px;
|
|
199
|
+
--ui-animated-beam-node-size: ${c.sm.nodeSize}px;
|
|
200
|
+
--ui-animated-beam-hub-size: ${c.sm.hubSize}px;
|
|
201
|
+
--ui-animated-beam-min-height: ${c.sm.minHeight}px;
|
|
202
|
+
--ui-animated-beam-radius: ${c.sm.radius}px;
|
|
203
203
|
}
|
|
204
204
|
|
|
205
205
|
:host(:not([size])),
|
|
206
206
|
:host([size="md"]),
|
|
207
207
|
:host([size="2"]) {
|
|
208
|
-
--ui-animated-beam-padding: ${
|
|
209
|
-
--ui-animated-beam-column-gap: ${
|
|
210
|
-
--ui-animated-beam-row-gap: ${
|
|
211
|
-
--ui-animated-beam-node-size: ${
|
|
212
|
-
--ui-animated-beam-hub-size: ${
|
|
213
|
-
--ui-animated-beam-min-height: ${
|
|
214
|
-
--ui-animated-beam-radius: ${
|
|
208
|
+
--ui-animated-beam-padding: ${c.md.padding}px;
|
|
209
|
+
--ui-animated-beam-column-gap: ${c.md.columnGap}px;
|
|
210
|
+
--ui-animated-beam-row-gap: ${c.md.rowGap}px;
|
|
211
|
+
--ui-animated-beam-node-size: ${c.md.nodeSize}px;
|
|
212
|
+
--ui-animated-beam-hub-size: ${c.md.hubSize}px;
|
|
213
|
+
--ui-animated-beam-min-height: ${c.md.minHeight}px;
|
|
214
|
+
--ui-animated-beam-radius: ${c.md.radius}px;
|
|
215
215
|
}
|
|
216
216
|
|
|
217
217
|
:host([size="lg"]),
|
|
218
218
|
:host([size="3"]) {
|
|
219
|
-
--ui-animated-beam-padding: ${
|
|
220
|
-
--ui-animated-beam-column-gap: ${
|
|
221
|
-
--ui-animated-beam-row-gap: ${
|
|
222
|
-
--ui-animated-beam-node-size: ${
|
|
223
|
-
--ui-animated-beam-hub-size: ${
|
|
224
|
-
--ui-animated-beam-min-height: ${
|
|
225
|
-
--ui-animated-beam-radius: ${
|
|
219
|
+
--ui-animated-beam-padding: ${c.lg.padding}px;
|
|
220
|
+
--ui-animated-beam-column-gap: ${c.lg.columnGap}px;
|
|
221
|
+
--ui-animated-beam-row-gap: ${c.lg.rowGap}px;
|
|
222
|
+
--ui-animated-beam-node-size: ${c.lg.nodeSize}px;
|
|
223
|
+
--ui-animated-beam-hub-size: ${c.lg.hubSize}px;
|
|
224
|
+
--ui-animated-beam-min-height: ${c.lg.minHeight}px;
|
|
225
|
+
--ui-animated-beam-radius: ${c.lg.radius}px;
|
|
226
226
|
}
|
|
227
227
|
|
|
228
228
|
:host([tone="neutral"]) {
|
|
@@ -668,11 +668,10 @@ class ve extends pe {
|
|
|
668
668
|
super.connectedCallback(), this._bindReducedMotionWatcher(), this._ensureResizeObserver(), this._ensureMutationObserver();
|
|
669
669
|
}
|
|
670
670
|
disconnectedCallback() {
|
|
671
|
-
|
|
672
|
-
this._clearNodeEffectAnimations(), this._disconnectResizeObserver(), this._disconnectMutationObserver(), (t = (e = this._mediaQuery) == null ? void 0 : e.removeEventListener) == null || t.call(e, "change", this._boundReducedMotionChange), (o = (s = this._mediaQuery) == null ? void 0 : s.removeListener) == null || o.call(s, this._boundReducedMotionChange), this._mediaQuery = null, super.disconnectedCallback();
|
|
671
|
+
this._clearNodeEffectAnimations(), this._disconnectResizeObserver(), this._disconnectMutationObserver(), this._mediaQuery?.removeEventListener?.("change", this._boundReducedMotionChange), this._mediaQuery?.removeListener?.(this._boundReducedMotionChange), this._mediaQuery = null, super.disconnectedCallback();
|
|
673
672
|
}
|
|
674
|
-
attributeChangedCallback(e, t,
|
|
675
|
-
if (!(t ===
|
|
673
|
+
attributeChangedCallback(e, t, r) {
|
|
674
|
+
if (!(t === r || !this.isConnected)) {
|
|
676
675
|
if (e === "paused") {
|
|
677
676
|
this._syncState();
|
|
678
677
|
return;
|
|
@@ -690,7 +689,6 @@ class ve extends pe {
|
|
|
690
689
|
this._clearNodeEffectAnimations(), this._syncRuntimeStyles(), this._syncNodes(), this._syncConnections(), this._layoutNodes(), this._renderConnections(), this._syncObservedResizeElements(), this._syncState();
|
|
691
690
|
}
|
|
692
691
|
render() {
|
|
693
|
-
var e, t, s;
|
|
694
692
|
this.setContent(`
|
|
695
693
|
<style>${_e}</style>
|
|
696
694
|
<style data-ui-animated-beam-animations></style>
|
|
@@ -709,7 +707,7 @@ class ve extends pe {
|
|
|
709
707
|
</div>
|
|
710
708
|
</div>
|
|
711
709
|
</div>
|
|
712
|
-
`), this._surfaceEl = this.root.querySelector(".surface"), this._canvasEl = this.root.querySelector(".canvas"), this._svgEl = this.root.querySelector(".svg"), this._defsEl = this.root.querySelector("defs"), this._pathsEl = this.root.querySelector(".paths"), this._animationStyleEl = this.root.querySelector("style[data-ui-animated-beam-animations]"), this._nodeSlot = this.root.querySelector("slot:not([name])"), this._hubSlot = this.root.querySelector('slot[name="hub"]'), this._connectionSlot = this.root.querySelector('slot[name="connections"]'),
|
|
710
|
+
`), this._surfaceEl = this.root.querySelector(".surface"), this._canvasEl = this.root.querySelector(".canvas"), this._svgEl = this.root.querySelector(".svg"), this._defsEl = this.root.querySelector("defs"), this._pathsEl = this.root.querySelector(".paths"), this._animationStyleEl = this.root.querySelector("style[data-ui-animated-beam-animations]"), this._nodeSlot = this.root.querySelector("slot:not([name])"), this._hubSlot = this.root.querySelector('slot[name="hub"]'), this._connectionSlot = this.root.querySelector('slot[name="connections"]'), this._nodeSlot?.addEventListener("slotchange", this._boundSlotChange), this._hubSlot?.addEventListener("slotchange", this._boundSlotChange), this._connectionSlot?.addEventListener("slotchange", this._boundSlotChange), this._syncRuntimeStyles(), this.refresh();
|
|
713
711
|
}
|
|
714
712
|
shouldRenderOnAttributeChange() {
|
|
715
713
|
return !1;
|
|
@@ -729,12 +727,10 @@ class ve extends pe {
|
|
|
729
727
|
}));
|
|
730
728
|
}
|
|
731
729
|
_bindReducedMotionWatcher() {
|
|
732
|
-
|
|
733
|
-
typeof window > "u" || typeof window.matchMedia != "function" || this._mediaQuery || (this._mediaQuery = window.matchMedia("(prefers-reduced-motion: reduce)"), (t = (e = this._mediaQuery).addEventListener) == null || t.call(e, "change", this._boundReducedMotionChange), (o = (s = this._mediaQuery).addListener) == null || o.call(s, this._boundReducedMotionChange));
|
|
730
|
+
typeof window > "u" || typeof window.matchMedia != "function" || this._mediaQuery || (this._mediaQuery = window.matchMedia("(prefers-reduced-motion: reduce)"), this._mediaQuery.addEventListener?.("change", this._boundReducedMotionChange), this._mediaQuery.addListener?.(this._boundReducedMotionChange));
|
|
734
731
|
}
|
|
735
732
|
_prefersReducedMotion() {
|
|
736
|
-
|
|
737
|
-
return !!((e = this._mediaQuery) != null && e.matches);
|
|
733
|
+
return !!this._mediaQuery?.matches;
|
|
738
734
|
}
|
|
739
735
|
_ensureResizeObserver() {
|
|
740
736
|
this._resizeObserver || typeof ResizeObserver > "u" || (this._resizeObserver = new ResizeObserver(this._boundResize), this._syncObservedResizeElements());
|
|
@@ -743,12 +739,10 @@ class ve extends pe {
|
|
|
743
739
|
this._resizeObserver && (this._resizeObserver.disconnect(), this._resizeObserver = null, this._observedResizeElements.clear());
|
|
744
740
|
}
|
|
745
741
|
_syncObservedResizeElements() {
|
|
746
|
-
if (!this._resizeObserver)
|
|
747
|
-
return;
|
|
742
|
+
if (!this._resizeObserver) return;
|
|
748
743
|
const e = /* @__PURE__ */ new Set();
|
|
749
744
|
this._canvasEl && e.add(this._canvasEl), e.add(this);
|
|
750
|
-
for (const t of this._nodes)
|
|
751
|
-
e.add(t.el);
|
|
745
|
+
for (const t of this._nodes) e.add(t.el);
|
|
752
746
|
for (const t of this._observedResizeElements)
|
|
753
747
|
e.has(t) || this._resizeObserver.unobserve(t);
|
|
754
748
|
for (const t of e)
|
|
@@ -775,22 +769,21 @@ class ve extends pe {
|
|
|
775
769
|
}));
|
|
776
770
|
}
|
|
777
771
|
_disconnectMutationObserver() {
|
|
778
|
-
|
|
779
|
-
(e = this._mutationObserver) == null || e.disconnect(), this._mutationObserver = null;
|
|
772
|
+
this._mutationObserver?.disconnect(), this._mutationObserver = null;
|
|
780
773
|
}
|
|
781
774
|
_syncRuntimeStyles() {
|
|
782
775
|
const e = this._sizePreset(), t = this._motionPreset();
|
|
783
776
|
this.style.setProperty("--ui-animated-beam-required-width", `${this._autoFit() ? 0 : this._requiredWidthPx(e)}px`), this.style.setProperty("--ui-animated-beam-duration", `${this._durationMs() * t.durationScale}ms`), this.style.setProperty("--ui-animated-beam-delay", `${this._delayMs()}ms`), this.style.setProperty("--ui-animated-beam-stagger", `${this._staggerMs()}ms`), this.style.setProperty("--ui-animated-beam-columns", String(this._columns())), this.style.setProperty("--ui-animated-beam-padding", `${this._paddingPx(e)}px`), this.style.setProperty("--ui-animated-beam-column-gap", `${this._columnGapPx(e)}px`), this.style.setProperty("--ui-animated-beam-row-gap", `${this._rowGapPx(e)}px`), this.style.setProperty("--ui-animated-beam-node-size", `${this._nodeSizePx(e)}px`), this.style.setProperty("--ui-animated-beam-hub-size", `${this._hubSizePx(e)}px`), this.style.setProperty("--ui-animated-beam-min-height", `${this._minHeightPx(e)}px`), this.style.setProperty("--ui-animated-beam-trail-width", `${this._trailWidthPx()}px`), this.style.setProperty("--ui-animated-beam-beam-width", `${this._beamWidthPx()}px`), this.style.setProperty("--ui-animated-beam-beam-factor", String(this._beamFactor(t))), this.style.setProperty("--ui-animated-beam-glow-opacity", String(t.glowOpacity)), this.style.setProperty("--ui-animated-beam-glow-blur", `${t.glowBlur}px`);
|
|
784
|
-
const
|
|
785
|
-
if (
|
|
786
|
-
const i = le(
|
|
777
|
+
const r = this.getAttribute("radius");
|
|
778
|
+
if (r && !ge.has(r.trim())) {
|
|
779
|
+
const i = le(r);
|
|
787
780
|
i ? this.style.setProperty("--ui-animated-beam-radius", i) : this.style.removeProperty("--ui-animated-beam-radius");
|
|
788
781
|
} else
|
|
789
782
|
this.style.removeProperty("--ui-animated-beam-radius");
|
|
790
783
|
const o = this.getAttribute("color-start"), n = this.getAttribute("color-end");
|
|
791
784
|
o ? this.style.setProperty("--ui-animated-beam-accent", o) : this.style.removeProperty("--ui-animated-beam-accent"), n ? this.style.setProperty("--ui-animated-beam-accent-end", n) : this.style.removeProperty("--ui-animated-beam-accent-end");
|
|
792
|
-
const
|
|
793
|
-
|
|
785
|
+
const s = this.getAttribute("trail-color");
|
|
786
|
+
s ? this.style.setProperty("--ui-animated-beam-path-color", s) : this.style.removeProperty("--ui-animated-beam-path-color");
|
|
794
787
|
}
|
|
795
788
|
_nodesFromSlot() {
|
|
796
789
|
return this._nodeSlot ? this._nodeSlot.assignedElements({ flatten: !0 }).filter((e) => e instanceof HTMLElement) : [];
|
|
@@ -802,136 +795,129 @@ class ve extends pe {
|
|
|
802
795
|
return this._connectionSlot ? this._connectionSlot.assignedElements({ flatten: !0 }).filter((e) => e instanceof HTMLElement) : [];
|
|
803
796
|
}
|
|
804
797
|
_syncNodes() {
|
|
805
|
-
const e = this._sizePreset(), t = this._columns(),
|
|
798
|
+
const e = this._sizePreset(), t = this._columns(), r = this._declaredRows(), o = this._nodesFromSlot(), n = this._hubsFromSlot(), s = /* @__PURE__ */ new Set([...o, ...n]);
|
|
806
799
|
for (const p of this._nodes)
|
|
807
|
-
|
|
800
|
+
s.has(p.el) || Pe(p.el);
|
|
808
801
|
const i = [];
|
|
809
|
-
o.forEach((p,
|
|
810
|
-
i.push(this._buildNodeRecord(p, "node",
|
|
811
|
-
}), n.forEach((p,
|
|
812
|
-
i.push(this._buildNodeRecord(p, "hub",
|
|
802
|
+
o.forEach((p, l) => {
|
|
803
|
+
i.push(this._buildNodeRecord(p, "node", l, t, r, e));
|
|
804
|
+
}), n.forEach((p, l) => {
|
|
805
|
+
i.push(this._buildNodeRecord(p, "hub", l, t, r, e));
|
|
813
806
|
}), this._nodes = i, this.setAttribute("data-node-count", String(o.length)), this.setAttribute("data-hub-count", String(n.length));
|
|
814
807
|
}
|
|
815
|
-
_buildNodeRecord(e, t,
|
|
808
|
+
_buildNodeRecord(e, t, r, o, n, s) {
|
|
816
809
|
const i = t === "hub" ? "data-ui-animated-beam-hub" : "data-ui-animated-beam-node";
|
|
817
810
|
e.hasAttribute(i) || e.setAttribute(i, ""), e.hasAttribute("data-ui-animated-beam-managed") || e.setAttribute("data-ui-animated-beam-managed", ""), e.hasAttribute("data-ui-animated-beam-node-id-owned") || e.removeAttribute("data-ui-animated-beam-node-id-owned"), t === "hub" && e.getAttribute("slot") !== "hub" && e.setAttribute("slot", "hub");
|
|
818
|
-
const p = this._nodeIdForElement(e, t,
|
|
811
|
+
const p = this._nodeIdForElement(e, t, r), l = n ? Math.max(1, Math.ceil(n / 2)) : t === "hub" ? 2 : r + 1, d = O(L(e.getAttribute("row"), l), 1, Math.max(n || l, l)), u = t === "hub" ? Math.ceil(o / 2) : O(r + 1, 1, o), h = O(L(e.getAttribute("column"), u), 1, o), g = t === "hub" ? s.hubSize : s.nodeSize, f = P(e.getAttribute("size"), g);
|
|
819
812
|
return {
|
|
820
813
|
el: e,
|
|
821
814
|
nodeId: p,
|
|
822
815
|
kind: t,
|
|
823
|
-
column:
|
|
816
|
+
column: h,
|
|
824
817
|
row: d,
|
|
825
|
-
sizePx:
|
|
818
|
+
sizePx: f,
|
|
826
819
|
centerX: 0,
|
|
827
820
|
centerY: 0,
|
|
828
|
-
radiusPx:
|
|
821
|
+
radiusPx: f / 2
|
|
829
822
|
};
|
|
830
823
|
}
|
|
831
|
-
_nodeIdForElement(e, t,
|
|
824
|
+
_nodeIdForElement(e, t, r) {
|
|
832
825
|
const o = e.getAttribute("node-id") || e.id;
|
|
833
|
-
if (o)
|
|
834
|
-
|
|
835
|
-
const n = `${t}-${s + 1}`;
|
|
826
|
+
if (o) return o;
|
|
827
|
+
const n = `${t}-${r + 1}`;
|
|
836
828
|
return e.setAttribute("node-id", n), e.setAttribute("data-ui-animated-beam-node-id-owned", ""), n;
|
|
837
829
|
}
|
|
838
830
|
_syncConnections() {
|
|
839
|
-
const e = this._motionPreset(), t = this._connectionsFromSlot(),
|
|
831
|
+
const e = this._motionPreset(), t = this._connectionsFromSlot(), r = new Set(t);
|
|
840
832
|
for (const i of this._connections)
|
|
841
|
-
|
|
842
|
-
const o = this._tone(), n = [],
|
|
833
|
+
r.has(i.el) || ke(i.el);
|
|
834
|
+
const o = this._tone(), n = [], s = /* @__PURE__ */ new Map();
|
|
843
835
|
t.forEach((i, p) => {
|
|
844
836
|
i.getAttribute("slot") !== "connections" && i.setAttribute("slot", "connections"), i.hasAttribute("data-ui-animated-beam-connection") || i.setAttribute("data-ui-animated-beam-connection", ""), i.hasAttribute("data-ui-animated-beam-managed") || i.setAttribute("data-ui-animated-beam-managed", "");
|
|
845
|
-
const
|
|
846
|
-
if (!
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
r.set(h, g + 1), n.push({
|
|
837
|
+
const l = i.getAttribute("from"), d = i.getAttribute("to");
|
|
838
|
+
if (!l || !d) return;
|
|
839
|
+
const u = Ce(i.getAttribute("tone")), h = F(i.getAttribute("duration"), this._durationMs()), g = i.getAttribute("delay"), f = s.get(l) || 0;
|
|
840
|
+
s.set(l, f + 1), n.push({
|
|
850
841
|
el: i,
|
|
851
|
-
from:
|
|
842
|
+
from: l,
|
|
852
843
|
to: d,
|
|
853
844
|
index: p,
|
|
854
845
|
curve: this._curveForConnection(i),
|
|
855
846
|
reverse: this._directionForConnection(i) === "reverse",
|
|
856
|
-
tone:
|
|
857
|
-
durationMs:
|
|
858
|
-
hasExplicitDelay:
|
|
859
|
-
localDelayMs: F(
|
|
847
|
+
tone: u,
|
|
848
|
+
durationMs: h * e.durationScale,
|
|
849
|
+
hasExplicitDelay: g != null && g.trim() !== "",
|
|
850
|
+
localDelayMs: F(g, 0),
|
|
860
851
|
delayMs: 0,
|
|
861
|
-
siblingIndex:
|
|
852
|
+
siblingIndex: f,
|
|
862
853
|
beamFactor: _(ae(i.getAttribute("beam-factor"), this._beamFactor(e)), 0.06, 0.48),
|
|
863
854
|
trailWidthPx: P(i.getAttribute("trail-width"), this._trailWidthPx()),
|
|
864
855
|
beamWidthPx: P(i.getAttribute("beam-width"), this._beamWidthPx()),
|
|
865
|
-
colorStart: i.getAttribute("color-start") || E[
|
|
866
|
-
colorEnd: i.getAttribute("color-end") || E[
|
|
856
|
+
colorStart: i.getAttribute("color-start") || E[u || o].start,
|
|
857
|
+
colorEnd: i.getAttribute("color-end") || E[u || o].end
|
|
867
858
|
});
|
|
868
859
|
}), this._connections = n, this.setAttribute("data-connection-count", String(this._connections.length));
|
|
869
860
|
}
|
|
870
861
|
_curveForConnection(e) {
|
|
871
862
|
const t = e.getAttribute("curve");
|
|
872
|
-
if (t && Y.has(t))
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
return s && Y.has(s) ? s : "auto";
|
|
863
|
+
if (t && Y.has(t)) return t;
|
|
864
|
+
const r = this.getAttribute("curve");
|
|
865
|
+
return r && Y.has(r) ? r : "auto";
|
|
876
866
|
}
|
|
877
867
|
_directionForConnection(e) {
|
|
878
868
|
const t = e.getAttribute("direction");
|
|
879
869
|
if (t && X.has(t))
|
|
880
870
|
return t;
|
|
881
|
-
if (e.hasAttribute("reverse"))
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
return s && X.has(s) ? s : this.hasAttribute("reverse") ? "reverse" : "forward";
|
|
871
|
+
if (e.hasAttribute("reverse")) return "reverse";
|
|
872
|
+
const r = this.getAttribute("direction");
|
|
873
|
+
return r && X.has(r) ? r : this.hasAttribute("reverse") ? "reverse" : "forward";
|
|
885
874
|
}
|
|
886
875
|
_layoutNodes() {
|
|
887
|
-
if (!this._canvasEl || !this._svgEl)
|
|
888
|
-
return;
|
|
876
|
+
if (!this._canvasEl || !this._svgEl) return;
|
|
889
877
|
const e = this._layoutMetrics();
|
|
890
878
|
this._lastLayoutMetrics = e;
|
|
891
|
-
const t = this._resolvedRowCount(),
|
|
879
|
+
const t = this._resolvedRowCount(), r = e.columns > 1 ? (e.width - e.padding * 2 - e.columnGap * (e.columns - 1)) / e.columns : e.width - e.padding * 2, o = t > 1 ? (e.height - e.padding * 2 - e.rowGap * (t - 1)) / t : e.height - e.padding * 2;
|
|
892
880
|
for (const n of this._nodes) {
|
|
893
|
-
const
|
|
894
|
-
n.centerX = i, n.centerY = p, n.radiusPx =
|
|
881
|
+
const s = n.sizePx * e.scale, i = e.padding + r * (n.column - 0.5) + e.columnGap * (n.column - 1), p = e.padding + o * (n.row - 0.5) + e.rowGap * (n.row - 1);
|
|
882
|
+
n.centerX = i, n.centerY = p, n.radiusPx = s / 2, n.el.style.left = `${i}px`, n.el.style.top = `${p}px`, n.el.style.inlineSize = `${s}px`, n.el.style.blockSize = `${s}px`, n.el.style.zIndex = n.kind === "hub" ? "2" : "1", n.el.style.setProperty("--ui-animated-beam-render-size", `${s}px`);
|
|
895
883
|
}
|
|
896
884
|
this._svgEl.setAttribute("viewBox", `0 0 ${e.width} ${e.height}`), this._canvasEl.style.minHeight = `${e.height}px`, this.setAttribute("data-row-count", String(t)), this.setAttribute("data-column-count", String(e.columns));
|
|
897
885
|
}
|
|
898
886
|
_renderConnections() {
|
|
899
|
-
if (!this._defsEl || !this._pathsEl || !this._animationStyleEl)
|
|
900
|
-
|
|
901
|
-
const e = this._lastLayoutMetrics || this._layoutMetrics(), t = _(e.scale, 0.72, 1), s = this._nodeEffect(), o = this._motionPreset(), n = new Map(this._nodes.map((y) => [y.nodeId, y])), r = [], i = [], p = [];
|
|
887
|
+
if (!this._defsEl || !this._pathsEl || !this._animationStyleEl) return;
|
|
888
|
+
const e = this._lastLayoutMetrics || this._layoutMetrics(), t = _(e.scale, 0.72, 1), r = this._nodeEffect(), o = this._motionPreset(), n = new Map(this._nodes.map((y) => [y.nodeId, y])), s = [], i = [], p = [];
|
|
902
889
|
this._connections.forEach((y) => {
|
|
903
|
-
const
|
|
904
|
-
if (!
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
r.push({
|
|
890
|
+
const m = n.get(y.from), w = n.get(y.to);
|
|
891
|
+
if (!m || !w) return;
|
|
892
|
+
const x = we(m, w, y.curve);
|
|
893
|
+
s.push({
|
|
908
894
|
connection: y,
|
|
909
895
|
geometry: x,
|
|
910
896
|
travelDistance: x.length
|
|
911
897
|
});
|
|
912
898
|
});
|
|
913
|
-
const
|
|
899
|
+
const l = Se(s, this._delayMs(), this._staggerMs()), d = Math.max(
|
|
914
900
|
1,
|
|
915
|
-
...
|
|
916
|
-
),
|
|
917
|
-
|
|
918
|
-
const w = (
|
|
919
|
-
|
|
901
|
+
...s.map((y) => (l.get(y.connection) ?? this._delayMs()) + y.connection.durationMs)
|
|
902
|
+
), u = r === "none" ? 0 : J(d), h = this._repeat() ? "infinite" : "1", g = [], f = /* @__PURE__ */ new Map();
|
|
903
|
+
s.forEach((y) => {
|
|
904
|
+
const w = (l.get(y.connection) ?? this._delayMs()) + y.connection.durationMs, x = ce(y.connection);
|
|
905
|
+
f.set(x, Math.max(f.get(x) ?? 0, w));
|
|
920
906
|
});
|
|
921
907
|
const $ = Math.max(
|
|
922
908
|
d,
|
|
923
|
-
...Array.from(
|
|
909
|
+
...Array.from(f.values(), (y) => y + u)
|
|
924
910
|
);
|
|
925
|
-
|
|
926
|
-
const { connection:
|
|
927
|
-
|
|
928
|
-
const V = `${this._uid}-glow-${
|
|
929
|
-
|
|
911
|
+
s.forEach((y) => {
|
|
912
|
+
const { connection: m, geometry: w, travelDistance: x } = y, z = m.reverse ? $e(w) : w, k = `${this._uid}-gradient-${m.index}`, A = Math.max(1, m.trailWidthPx * t), M = Math.max(1.5, m.beamWidthPx * t), C = A.toFixed(2), T = M.toFixed(2), R = Math.max(M * 2, M + 4 * t), H = R.toFixed(2), N = z.start, G = z.end, I = 0, U = _(x * m.beamFactor, M * 6, x * 0.72);
|
|
913
|
+
m.delayMs = l.get(m) ?? this._delayMs();
|
|
914
|
+
const V = `${this._uid}-glow-${m.index}`, Q = `${this._uid}-core-${m.index}`;
|
|
915
|
+
g.push(
|
|
930
916
|
Z(
|
|
931
917
|
V,
|
|
932
918
|
$,
|
|
933
|
-
|
|
934
|
-
|
|
919
|
+
m.delayMs,
|
|
920
|
+
m.durationMs,
|
|
935
921
|
"var(--ui-animated-beam-glow-opacity)",
|
|
936
922
|
o.pattern,
|
|
937
923
|
x,
|
|
@@ -939,12 +925,12 @@ class ve extends pe {
|
|
|
939
925
|
R * 1.18,
|
|
940
926
|
U
|
|
941
927
|
)
|
|
942
|
-
),
|
|
928
|
+
), g.push(
|
|
943
929
|
Z(
|
|
944
930
|
Q,
|
|
945
931
|
$,
|
|
946
|
-
|
|
947
|
-
|
|
932
|
+
m.delayMs,
|
|
933
|
+
m.durationMs,
|
|
948
934
|
"var(--ui-animated-beam-core-opacity)",
|
|
949
935
|
o.pattern,
|
|
950
936
|
x,
|
|
@@ -954,21 +940,21 @@ class ve extends pe {
|
|
|
954
940
|
)
|
|
955
941
|
), i.push(`
|
|
956
942
|
<linearGradient id="${k}" gradientUnits="userSpaceOnUse" x1="${N.x}" y1="${N.y}" x2="${G.x}" y2="${G.y}">
|
|
957
|
-
<stop offset="0%" stop-color="${B(
|
|
958
|
-
<stop offset="100%" stop-color="${B(
|
|
943
|
+
<stop offset="0%" stop-color="${B(m.colorStart || D)}"></stop>
|
|
944
|
+
<stop offset="100%" stop-color="${B(m.colorEnd || q)}"></stop>
|
|
959
945
|
</linearGradient>
|
|
960
946
|
`), p.push(`
|
|
961
947
|
<g
|
|
962
948
|
class="connection"
|
|
963
949
|
part="connection"
|
|
964
|
-
data-from="${B(
|
|
965
|
-
data-to="${B(
|
|
950
|
+
data-from="${B(m.from)}"
|
|
951
|
+
data-to="${B(m.to)}"
|
|
966
952
|
style="
|
|
967
953
|
--ui-animated-beam-travel-distance:${x};
|
|
968
|
-
--ui-animated-beam-connection-duration:${
|
|
969
|
-
--ui-animated-beam-connection-delay:${
|
|
954
|
+
--ui-animated-beam-connection-duration:${m.durationMs}ms;
|
|
955
|
+
--ui-animated-beam-connection-delay:${m.delayMs}ms;
|
|
970
956
|
--ui-animated-beam-cycle-duration:${$}ms;
|
|
971
|
-
--ui-animated-beam-iteration-count:${
|
|
957
|
+
--ui-animated-beam-iteration-count:${h};
|
|
972
958
|
--ui-animated-beam-progress-offset:${I};
|
|
973
959
|
"
|
|
974
960
|
>
|
|
@@ -996,39 +982,36 @@ class ve extends pe {
|
|
|
996
982
|
></path>
|
|
997
983
|
</g>
|
|
998
984
|
`);
|
|
999
|
-
}), this._applyNodeEffectStyles(
|
|
985
|
+
}), this._applyNodeEffectStyles(r, f, $, h, g), this._defsEl.innerHTML = i.join(""), this._pathsEl.innerHTML = p.join(""), this._animationStyleEl.textContent = g.join(`
|
|
1000
986
|
`), this.setAttribute("data-path-visible", this._pathVisible() ? "true" : "false");
|
|
1001
987
|
}
|
|
1002
|
-
_applyNodeEffectStyles(e, t,
|
|
1003
|
-
const
|
|
988
|
+
_applyNodeEffectStyles(e, t, r, o, n) {
|
|
989
|
+
const s = J(r);
|
|
1004
990
|
this._nodes.forEach((i, p) => {
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
(m = this._nodeEffectAnimations.get(i.el)) == null || m.cancel(), this._nodeEffectAnimations.delete(i.el), be(i.el);
|
|
991
|
+
const l = t.get(i.nodeId);
|
|
992
|
+
if (e === "none" || l == null) {
|
|
993
|
+
this._nodeEffectAnimations.get(i.el)?.cancel(), this._nodeEffectAnimations.delete(i.el), be(i.el);
|
|
1009
994
|
return;
|
|
1010
995
|
}
|
|
1011
996
|
const d = `${this._uid}-node-effect-${p}`;
|
|
1012
|
-
n.push(Ae(d,
|
|
997
|
+
n.push(Ae(d, r, l, s, e)), i.el.style.setProperty("--ui-animated-beam-node-effect-name", d), i.el.style.setProperty("--ui-animated-beam-node-effect-cycle", `${r}ms`), i.el.style.setProperty("--ui-animated-beam-node-effect-iterations", o), this._startNodeEffectAnimation(i.el, e, r, l, s, o);
|
|
1013
998
|
});
|
|
1014
999
|
}
|
|
1015
1000
|
_syncState() {
|
|
1016
1001
|
const e = this.hasAttribute("paused") || this._prefersReducedMotion();
|
|
1017
1002
|
this.setAttribute("data-state", e ? "paused" : "running"), this.setAttribute("data-reduced-motion", this._prefersReducedMotion() ? "true" : "false"), this.setAttribute("data-path-visible", this._pathVisible() ? "true" : "false"), this._syncNodeEffectAnimationState(e);
|
|
1018
1003
|
}
|
|
1019
|
-
_startNodeEffectAnimation(e, t,
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
duration: s,
|
|
1026
|
-
iterations: r === "infinite" ? 1 / 0 : 1,
|
|
1004
|
+
_startNodeEffectAnimation(e, t, r, o, n, s) {
|
|
1005
|
+
if (typeof e.animate != "function" || this._prefersReducedMotion() || t === "none") return;
|
|
1006
|
+
this._nodeEffectAnimations.get(e)?.cancel();
|
|
1007
|
+
const i = Math.max(r, 1), p = _(o / i, 0, 1), l = _((o + n * 0.35) / i, p, 1), d = _((o + n * 0.72) / i, l, 1), u = _((o + n) / i, d, 1), h = e.animate(Me(t, p, l, d, u), {
|
|
1008
|
+
duration: r,
|
|
1009
|
+
iterations: s === "infinite" ? 1 / 0 : 1,
|
|
1027
1010
|
fill: "both",
|
|
1028
1011
|
easing: "linear",
|
|
1029
1012
|
delay: 0
|
|
1030
1013
|
});
|
|
1031
|
-
(this.hasAttribute("paused") || this._prefersReducedMotion()) &&
|
|
1014
|
+
(this.hasAttribute("paused") || this._prefersReducedMotion()) && h.pause(), this._nodeEffectAnimations.set(e, h);
|
|
1032
1015
|
}
|
|
1033
1016
|
_syncNodeEffectAnimationState(e) {
|
|
1034
1017
|
this._nodeEffectAnimations.forEach((t) => {
|
|
@@ -1039,26 +1022,25 @@ class ve extends pe {
|
|
|
1039
1022
|
this._nodeEffectAnimations.forEach((e) => e.cancel()), this._nodeEffectAnimations.clear();
|
|
1040
1023
|
}
|
|
1041
1024
|
_layoutMetrics() {
|
|
1042
|
-
|
|
1043
|
-
const e = this._sizePreset(), t = this._columns(), s = this._resolvedRowCount(), o = this._paddingPx(e), n = this._columnGapPx(e), r = this._rowGapPx(e), i = this._nodeSizePx(e), p = this._hubSizePx(e), h = this._minHeightPx(e), d = Math.max(i, Math.round(p * 0.86)), m = o * 2 + t * d + Math.max(0, t - 1) * n, c = (C = this._canvasEl) == null ? void 0 : C.getBoundingClientRect(), f = (c == null ? void 0 : c.width) || this.clientWidth || 0, g = this._autoFit() && f > 0 && m > 0 ? _(f / m, 0.2, 1) : 1, $ = o * g, y = n * g, u = r * g, w = i * g, x = p * g, z = h * g, k = Math.max(
|
|
1025
|
+
const e = this._sizePreset(), t = this._columns(), r = this._resolvedRowCount(), o = this._paddingPx(e), n = this._columnGapPx(e), s = this._rowGapPx(e), i = this._nodeSizePx(e), p = this._hubSizePx(e), l = this._minHeightPx(e), d = Math.max(i, Math.round(p * 0.86)), u = o * 2 + t * d + Math.max(0, t - 1) * n, h = this._canvasEl?.getBoundingClientRect(), g = h?.width || this.clientWidth || 0, f = this._autoFit() && g > 0 && u > 0 ? _(g / u, 0.2, 1) : 1, $ = o * f, y = n * f, m = s * f, w = i * f, x = p * f, z = l * f, k = Math.max(
|
|
1044
1026
|
z,
|
|
1045
|
-
$ * 2 +
|
|
1046
|
-
), A = this._autoFit() &&
|
|
1027
|
+
$ * 2 + r * Math.max(w, Math.round(x * 0.86)) + Math.max(0, r - 1) * m
|
|
1028
|
+
), A = this._autoFit() && g > 0 ? g : Math.max(g, u), M = Math.max(h?.height || this.clientHeight || 0, k);
|
|
1047
1029
|
return {
|
|
1048
1030
|
width: A,
|
|
1049
1031
|
height: M,
|
|
1050
|
-
scale:
|
|
1032
|
+
scale: f,
|
|
1051
1033
|
padding: $,
|
|
1052
1034
|
columns: t,
|
|
1053
|
-
rows:
|
|
1035
|
+
rows: r,
|
|
1054
1036
|
columnGap: y,
|
|
1055
|
-
rowGap:
|
|
1037
|
+
rowGap: m,
|
|
1056
1038
|
nodeSize: w,
|
|
1057
1039
|
hubSize: x
|
|
1058
1040
|
};
|
|
1059
1041
|
}
|
|
1060
1042
|
_resolvedRowCount() {
|
|
1061
|
-
const e = this._declaredRows(), t = this._nodes.reduce((
|
|
1043
|
+
const e = this._declaredRows(), t = this._nodes.reduce((r, o) => Math.max(r, o.row), 1);
|
|
1062
1044
|
return Math.max(1, e || t);
|
|
1063
1045
|
}
|
|
1064
1046
|
_declaredRows() {
|
|
@@ -1087,8 +1069,8 @@ class ve extends pe {
|
|
|
1087
1069
|
return P(this.getAttribute("min-height"), e.minHeight);
|
|
1088
1070
|
}
|
|
1089
1071
|
_requiredWidthPx(e) {
|
|
1090
|
-
const t = this._columns(),
|
|
1091
|
-
return
|
|
1072
|
+
const t = this._columns(), r = this._paddingPx(e), o = this._columnGapPx(e), n = this._nodeSizePx(e), s = this._hubSizePx(e), i = Math.max(n, Math.round(s * 0.86));
|
|
1073
|
+
return r * 2 + t * i + Math.max(0, t - 1) * o;
|
|
1092
1074
|
}
|
|
1093
1075
|
_autoFit() {
|
|
1094
1076
|
const e = this.getAttribute("auto-fit");
|
|
@@ -1114,7 +1096,7 @@ class ve extends pe {
|
|
|
1114
1096
|
}
|
|
1115
1097
|
_sizePreset() {
|
|
1116
1098
|
const e = this.getAttribute("size");
|
|
1117
|
-
return e === "xxs" || e === "0" ?
|
|
1099
|
+
return e === "xxs" || e === "0" ? c.xxs : e === "xs" ? c.xs : e === "sm" || e === "1" ? c.sm : e === "lg" || e === "3" ? c.lg : c.md;
|
|
1118
1100
|
}
|
|
1119
1101
|
_motionPreset() {
|
|
1120
1102
|
const e = this.getAttribute("animation");
|
|
@@ -1138,37 +1120,37 @@ class ve extends pe {
|
|
|
1138
1120
|
}
|
|
1139
1121
|
}
|
|
1140
1122
|
function we(a, e, t) {
|
|
1141
|
-
const
|
|
1142
|
-
if (t === "straight" || t === "auto" &&
|
|
1123
|
+
const r = { x: a.centerX, y: a.centerY }, o = { x: e.centerX, y: e.centerY }, n = Math.atan2(o.y - r.y, o.x - r.x), s = te(r, n, Math.max(0, a.radiusPx - j)), i = te(o, n + Math.PI, Math.max(0, e.radiusPx - j)), p = i.x - s.x, l = i.y - s.y, d = Math.abs(p), u = Math.abs(l);
|
|
1124
|
+
if (t === "straight" || t === "auto" && u < Math.max(8, Math.min(a.radiusPx, e.radiusPx) * 0.28))
|
|
1143
1125
|
return {
|
|
1144
1126
|
kind: "line",
|
|
1145
|
-
start:
|
|
1127
|
+
start: s,
|
|
1146
1128
|
end: i,
|
|
1147
|
-
d: `M ${
|
|
1148
|
-
length: he(
|
|
1129
|
+
d: `M ${b(s.x)} ${b(s.y)} L ${b(i.x)} ${b(i.y)}`,
|
|
1130
|
+
length: he(s, i)
|
|
1149
1131
|
};
|
|
1150
|
-
const
|
|
1151
|
-
if (d >=
|
|
1152
|
-
const y = Math.max(d *
|
|
1132
|
+
const h = t === "arc" ? 0.56 : t === "soft" ? 0.34 : u > d * 0.45 ? 0.48 : 0.4;
|
|
1133
|
+
if (d >= u) {
|
|
1134
|
+
const y = Math.max(d * h, 44), m = { x: s.x + Math.sign(p || 1) * y, y: s.y }, w = { x: i.x - Math.sign(p || 1) * y, y: i.y };
|
|
1153
1135
|
return {
|
|
1154
1136
|
kind: "cubic",
|
|
1155
|
-
start:
|
|
1137
|
+
start: s,
|
|
1156
1138
|
end: i,
|
|
1157
|
-
c1:
|
|
1139
|
+
c1: m,
|
|
1158
1140
|
c2: w,
|
|
1159
|
-
d: `M ${
|
|
1160
|
-
length: ee(
|
|
1141
|
+
d: `M ${b(s.x)} ${b(s.y)} C ${b(m.x)} ${b(m.y)} ${b(w.x)} ${b(w.y)} ${b(i.x)} ${b(i.y)}`,
|
|
1142
|
+
length: ee(s, m, w, i)
|
|
1161
1143
|
};
|
|
1162
1144
|
}
|
|
1163
|
-
const
|
|
1145
|
+
const g = Math.max(u * h, 44), f = { x: s.x, y: s.y + Math.sign(l || 1) * g }, $ = { x: i.x, y: i.y - Math.sign(l || 1) * g };
|
|
1164
1146
|
return {
|
|
1165
1147
|
kind: "cubic",
|
|
1166
|
-
start:
|
|
1148
|
+
start: s,
|
|
1167
1149
|
end: i,
|
|
1168
|
-
c1:
|
|
1150
|
+
c1: f,
|
|
1169
1151
|
c2: $,
|
|
1170
|
-
d: `M ${
|
|
1171
|
-
length: ee(
|
|
1152
|
+
d: `M ${b(s.x)} ${b(s.y)} C ${b(f.x)} ${b(f.y)} ${b($.x)} ${b($.y)} ${b(i.x)} ${b(i.y)}`,
|
|
1153
|
+
length: ee(s, f, $, i)
|
|
1172
1154
|
};
|
|
1173
1155
|
}
|
|
1174
1156
|
function $e(a) {
|
|
@@ -1177,7 +1159,7 @@ function $e(a) {
|
|
|
1177
1159
|
kind: "line",
|
|
1178
1160
|
start: a.end,
|
|
1179
1161
|
end: a.start,
|
|
1180
|
-
d: `M ${
|
|
1162
|
+
d: `M ${b(a.end.x)} ${b(a.end.y)} L ${b(a.start.x)} ${b(a.start.y)}`,
|
|
1181
1163
|
length: a.length
|
|
1182
1164
|
};
|
|
1183
1165
|
const e = a.c2, t = a.c1;
|
|
@@ -1187,149 +1169,145 @@ function $e(a) {
|
|
|
1187
1169
|
end: a.start,
|
|
1188
1170
|
c1: e,
|
|
1189
1171
|
c2: t,
|
|
1190
|
-
d: `M ${
|
|
1172
|
+
d: `M ${b(a.end.x)} ${b(a.end.y)} C ${b(e.x)} ${b(e.y)} ${b(t.x)} ${b(t.y)} ${b(a.start.x)} ${b(a.start.y)}`,
|
|
1191
1173
|
length: a.length
|
|
1192
1174
|
};
|
|
1193
1175
|
}
|
|
1194
1176
|
function Se(a, e, t) {
|
|
1195
|
-
const
|
|
1177
|
+
const r = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set();
|
|
1196
1178
|
for (const d of a) {
|
|
1197
|
-
const
|
|
1198
|
-
|
|
1179
|
+
const u = ce(d.connection), h = r.get(u);
|
|
1180
|
+
h ? h.push(d) : r.set(u, [d]);
|
|
1199
1181
|
}
|
|
1200
1182
|
const p = (d) => {
|
|
1201
|
-
const
|
|
1202
|
-
if (
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
if (m != null)
|
|
1216
|
-
return m;
|
|
1217
|
-
if (i.has(d))
|
|
1218
|
-
return e;
|
|
1183
|
+
const u = o.get(d);
|
|
1184
|
+
if (u != null) return u;
|
|
1185
|
+
if (s.has(d)) return e;
|
|
1186
|
+
s.add(d);
|
|
1187
|
+
const h = r.get(d);
|
|
1188
|
+
let g = e;
|
|
1189
|
+
return h?.length && (g = h.reduce((f, $) => {
|
|
1190
|
+
const y = l($.connection);
|
|
1191
|
+
return Math.max(f, y + $.connection.durationMs);
|
|
1192
|
+
}, e)), s.delete(d), o.set(d, g), g;
|
|
1193
|
+
}, l = (d) => {
|
|
1194
|
+
const u = n.get(d);
|
|
1195
|
+
if (u != null) return u;
|
|
1196
|
+
if (i.has(d)) return e;
|
|
1219
1197
|
i.add(d);
|
|
1220
|
-
const
|
|
1221
|
-
return i.delete(d), n.set(d,
|
|
1198
|
+
const h = p(ze(d)), g = d.hasExplicitDelay ? 0 : d.siblingIndex * t, f = h + g + d.localDelayMs;
|
|
1199
|
+
return i.delete(d), n.set(d, f), f;
|
|
1222
1200
|
};
|
|
1223
1201
|
for (const d of a)
|
|
1224
|
-
n.set(d.connection,
|
|
1202
|
+
n.set(d.connection, l(d.connection));
|
|
1225
1203
|
return n;
|
|
1226
1204
|
}
|
|
1227
|
-
function Z(a, e, t,
|
|
1228
|
-
const d = Math.max(e, 1),
|
|
1205
|
+
function Z(a, e, t, r, o, n, s, i, p, l) {
|
|
1206
|
+
const d = Math.max(e, 1), u = _(t / d * 100, 0, 100), h = _((t + r) / d * 100, u, 100), g = _(u + Math.max(r / d * 100 * 0.02, 0.01), u, h), f = S(u), $ = S(g), y = S(h), m = b(i), w = b(p), x = b(s), z = b(l);
|
|
1229
1207
|
if (n === "pulse") {
|
|
1230
|
-
const k = _(
|
|
1208
|
+
const k = _(u + (h - u) * 0.42, g, h), A = _(u + (h - u) * 0.82, k, h), M = S(k), C = S(A);
|
|
1231
1209
|
return `
|
|
1232
1210
|
@keyframes ${a} {
|
|
1233
|
-
0%, ${
|
|
1211
|
+
0%, ${f}% {
|
|
1234
1212
|
opacity: 0;
|
|
1235
1213
|
stroke-dasharray: ${z} ${x};
|
|
1236
1214
|
stroke-dashoffset: 0;
|
|
1237
|
-
stroke-width: ${
|
|
1215
|
+
stroke-width: ${m};
|
|
1238
1216
|
}
|
|
1239
1217
|
${$}% {
|
|
1240
1218
|
opacity: calc(${o} * 0.72);
|
|
1241
1219
|
stroke-dasharray: ${z} ${x};
|
|
1242
1220
|
stroke-dashoffset: 0;
|
|
1243
|
-
stroke-width: ${
|
|
1221
|
+
stroke-width: ${m};
|
|
1244
1222
|
}
|
|
1245
1223
|
${M}% {
|
|
1246
1224
|
opacity: ${o};
|
|
1247
1225
|
stroke-dasharray: ${z} ${x};
|
|
1248
|
-
stroke-dashoffset: ${
|
|
1226
|
+
stroke-dashoffset: ${b(-s * 0.44)};
|
|
1249
1227
|
stroke-width: ${w};
|
|
1250
1228
|
}
|
|
1251
1229
|
${C}% {
|
|
1252
1230
|
opacity: calc(${o} * 0.68);
|
|
1253
1231
|
stroke-dasharray: ${z} ${x};
|
|
1254
|
-
stroke-dashoffset: ${
|
|
1255
|
-
stroke-width: ${
|
|
1232
|
+
stroke-dashoffset: ${b(-s * 0.84)};
|
|
1233
|
+
stroke-width: ${m};
|
|
1256
1234
|
}
|
|
1257
1235
|
${y}%,
|
|
1258
1236
|
100% {
|
|
1259
1237
|
opacity: 0;
|
|
1260
1238
|
stroke-dasharray: ${z} ${x};
|
|
1261
|
-
stroke-dashoffset: ${
|
|
1262
|
-
stroke-width: ${
|
|
1239
|
+
stroke-dashoffset: ${b(-s)};
|
|
1240
|
+
stroke-width: ${m};
|
|
1263
1241
|
}
|
|
1264
1242
|
}
|
|
1265
1243
|
`;
|
|
1266
1244
|
}
|
|
1267
1245
|
if (n === "heartbeat") {
|
|
1268
|
-
const k = _(
|
|
1246
|
+
const k = _(l * 0.72, i * 4.5, s * 0.42), A = b(k), M = _(u + (h - u) * 0.24, g, h), C = _(u + (h - u) * 0.34, M, h), T = _(u + (h - u) * 0.48, C, h), R = _(u + (h - u) * 0.82, T, h), H = S(M), N = S(C), G = S(T), I = S(R);
|
|
1269
1247
|
return `
|
|
1270
1248
|
@keyframes ${a} {
|
|
1271
|
-
0%, ${
|
|
1249
|
+
0%, ${f}% {
|
|
1272
1250
|
opacity: 0;
|
|
1273
1251
|
stroke-dasharray: ${A} ${x};
|
|
1274
1252
|
stroke-dashoffset: 0;
|
|
1275
|
-
stroke-width: ${
|
|
1253
|
+
stroke-width: ${m};
|
|
1276
1254
|
}
|
|
1277
1255
|
${$}% {
|
|
1278
1256
|
opacity: calc(${o} * 0.7);
|
|
1279
1257
|
stroke-dasharray: ${A} ${x};
|
|
1280
1258
|
stroke-dashoffset: 0;
|
|
1281
|
-
stroke-width: ${
|
|
1259
|
+
stroke-width: ${m};
|
|
1282
1260
|
}
|
|
1283
1261
|
${H}% {
|
|
1284
1262
|
opacity: calc(${o} * 0.88);
|
|
1285
1263
|
stroke-dasharray: ${A} ${x};
|
|
1286
|
-
stroke-dashoffset: ${
|
|
1287
|
-
stroke-width: ${
|
|
1264
|
+
stroke-dashoffset: ${b(-s * 0.24)};
|
|
1265
|
+
stroke-width: ${b(i * 1.08)};
|
|
1288
1266
|
}
|
|
1289
1267
|
${N}% {
|
|
1290
1268
|
opacity: calc(${o} * 0.5);
|
|
1291
1269
|
stroke-dasharray: ${A} ${x};
|
|
1292
|
-
stroke-dashoffset: ${
|
|
1293
|
-
stroke-width: ${
|
|
1270
|
+
stroke-dashoffset: ${b(-s * 0.34)};
|
|
1271
|
+
stroke-width: ${m};
|
|
1294
1272
|
}
|
|
1295
1273
|
${G}% {
|
|
1296
1274
|
opacity: ${o};
|
|
1297
1275
|
stroke-dasharray: ${A} ${x};
|
|
1298
|
-
stroke-dashoffset: ${
|
|
1276
|
+
stroke-dashoffset: ${b(-s * 0.5)};
|
|
1299
1277
|
stroke-width: ${w};
|
|
1300
1278
|
}
|
|
1301
1279
|
${I}% {
|
|
1302
1280
|
opacity: calc(${o} * 0.7);
|
|
1303
1281
|
stroke-dasharray: ${A} ${x};
|
|
1304
|
-
stroke-dashoffset: ${
|
|
1305
|
-
stroke-width: ${
|
|
1282
|
+
stroke-dashoffset: ${b(-s * 0.84)};
|
|
1283
|
+
stroke-width: ${m};
|
|
1306
1284
|
}
|
|
1307
1285
|
${y}%,
|
|
1308
1286
|
100% {
|
|
1309
1287
|
opacity: 0;
|
|
1310
1288
|
stroke-dasharray: ${A} ${x};
|
|
1311
|
-
stroke-dashoffset: ${
|
|
1312
|
-
stroke-width: ${
|
|
1289
|
+
stroke-dashoffset: ${b(-s)};
|
|
1290
|
+
stroke-width: ${m};
|
|
1313
1291
|
}
|
|
1314
1292
|
}
|
|
1315
1293
|
`;
|
|
1316
1294
|
}
|
|
1317
1295
|
return `
|
|
1318
1296
|
@keyframes ${a} {
|
|
1319
|
-
0%, ${
|
|
1297
|
+
0%, ${f}% {
|
|
1320
1298
|
opacity: 0;
|
|
1321
1299
|
stroke-dasharray: 0 ${x};
|
|
1322
|
-
stroke-width: ${
|
|
1300
|
+
stroke-width: ${m};
|
|
1323
1301
|
}
|
|
1324
1302
|
${$}% {
|
|
1325
1303
|
opacity: ${o};
|
|
1326
1304
|
stroke-dasharray: 0 ${x};
|
|
1327
|
-
stroke-width: ${
|
|
1305
|
+
stroke-width: ${m};
|
|
1328
1306
|
}
|
|
1329
1307
|
${y}%, 100% {
|
|
1330
1308
|
opacity: ${o};
|
|
1331
1309
|
stroke-dasharray: ${x} 0;
|
|
1332
|
-
stroke-width: ${
|
|
1310
|
+
stroke-width: ${m};
|
|
1333
1311
|
}
|
|
1334
1312
|
}
|
|
1335
1313
|
`;
|
|
@@ -1343,10 +1321,10 @@ function ce(a) {
|
|
|
1343
1321
|
function J(a) {
|
|
1344
1322
|
return _(a * 0.16, 360, 900);
|
|
1345
1323
|
}
|
|
1346
|
-
function Ae(a, e, t,
|
|
1347
|
-
const n = Math.max(e, 1),
|
|
1324
|
+
function Ae(a, e, t, r, o) {
|
|
1325
|
+
const n = Math.max(e, 1), s = _(t / n * 100, 0, 100), i = _((t + r * 0.35) / n * 100, s, 100), p = _((t + r * 0.72) / n * 100, i, 100), l = _((t + r) / n * 100, p, 100), d = S(s), u = S(i), h = S(p), g = S(l);
|
|
1348
1326
|
if (o === "shake") {
|
|
1349
|
-
const
|
|
1327
|
+
const m = _(s + (i - s) * 0.3, s, i), w = _(s + (i - s) * 0.65, m, i), x = S(m), z = S(w);
|
|
1350
1328
|
return `
|
|
1351
1329
|
@keyframes ${a} {
|
|
1352
1330
|
0%, ${d}%, 100% {
|
|
@@ -1364,15 +1342,15 @@ function Ae(a, e, t, s, o) {
|
|
|
1364
1342
|
${z}% {
|
|
1365
1343
|
transform: translate(calc(-50% + 2px), calc(-50% - 1px)) scale(1.03) rotate(2deg);
|
|
1366
1344
|
}
|
|
1367
|
-
${
|
|
1345
|
+
${u}% {
|
|
1368
1346
|
transform: translate(-50%, -50%) scale(1.03);
|
|
1369
1347
|
box-shadow:
|
|
1370
1348
|
var(--ui-animated-beam-node-base-shadow),
|
|
1371
1349
|
0 0 0 6px var(--ui-animated-beam-node-effect-ring),
|
|
1372
1350
|
0 0 24px var(--ui-animated-beam-node-effect-glow);
|
|
1373
1351
|
}
|
|
1374
|
-
${
|
|
1375
|
-
${
|
|
1352
|
+
${h}%,
|
|
1353
|
+
${g}% {
|
|
1376
1354
|
transform: translate(-50%, -50%) scale(1);
|
|
1377
1355
|
box-shadow: var(--ui-animated-beam-node-base-shadow);
|
|
1378
1356
|
border-color: color-mix(in srgb, var(--ui-animated-beam-accent) 12%, rgba(15, 23, 42, 0.1));
|
|
@@ -1387,13 +1365,13 @@ function Ae(a, e, t, s, o) {
|
|
|
1387
1365
|
box-shadow: var(--ui-animated-beam-node-base-shadow);
|
|
1388
1366
|
border-color: color-mix(in srgb, var(--ui-animated-beam-accent) 12%, rgba(15, 23, 42, 0.1));
|
|
1389
1367
|
}
|
|
1390
|
-
${
|
|
1368
|
+
${u}% {
|
|
1391
1369
|
transform: ${o === "pulse" ? "translate(-50%, -50%) scale(1.08)" : o === "ring" ? "translate(-50%, -50%) scale(1.04)" : "translate(-50%, -50%) scale(1.03)"};
|
|
1392
1370
|
box-shadow: ${o === "ring" ? "var(--ui-animated-beam-node-base-shadow), 0 0 0 7px var(--ui-animated-beam-node-effect-ring)" : o === "pulse" ? "var(--ui-animated-beam-node-base-shadow), 0 0 0 6px var(--ui-animated-beam-node-effect-ring), 0 0 20px var(--ui-animated-beam-node-effect-glow)" : "var(--ui-animated-beam-node-base-shadow), 0 0 0 5px var(--ui-animated-beam-node-effect-ring), 0 0 28px var(--ui-animated-beam-node-effect-glow)"};
|
|
1393
1371
|
border-color: ${o === "ring" ? "color-mix(in srgb, var(--ui-animated-beam-accent-end) 34%, transparent)" : "color-mix(in srgb, var(--ui-animated-beam-accent) 28%, transparent)"};
|
|
1394
1372
|
}
|
|
1395
|
-
${
|
|
1396
|
-
${
|
|
1373
|
+
${h}%,
|
|
1374
|
+
${g}% {
|
|
1397
1375
|
transform: translate(-50%, -50%) scale(1);
|
|
1398
1376
|
box-shadow: var(--ui-animated-beam-node-base-shadow);
|
|
1399
1377
|
border-color: color-mix(in srgb, var(--ui-animated-beam-accent) 12%, rgba(15, 23, 42, 0.1));
|
|
@@ -1401,7 +1379,7 @@ function Ae(a, e, t, s, o) {
|
|
|
1401
1379
|
}
|
|
1402
1380
|
`;
|
|
1403
1381
|
}
|
|
1404
|
-
function Me(a, e = 0, t = 0.1,
|
|
1382
|
+
function Me(a, e = 0, t = 0.1, r = 0.16, o = 0.2) {
|
|
1405
1383
|
const n = {
|
|
1406
1384
|
offset: 0,
|
|
1407
1385
|
transform: "translate(-50%, -50%) scale(1)",
|
|
@@ -1409,12 +1387,12 @@ function Me(a, e = 0, t = 0.1, s = 0.16, o = 0.2) {
|
|
|
1409
1387
|
borderColor: "color-mix(in srgb, var(--ui-animated-beam-accent) 12%, rgba(15, 23, 42, 0.1))"
|
|
1410
1388
|
};
|
|
1411
1389
|
if (a === "shake") {
|
|
1412
|
-
const
|
|
1390
|
+
const l = e + (t - e) * 0.3, d = e + (t - e) * 0.65;
|
|
1413
1391
|
return [
|
|
1414
1392
|
{ ...n, offset: 0 },
|
|
1415
1393
|
{ ...n, offset: e },
|
|
1416
1394
|
{
|
|
1417
|
-
offset:
|
|
1395
|
+
offset: l,
|
|
1418
1396
|
transform: "translate(calc(-50% - 2px), calc(-50% + 1px)) scale(1.02) rotate(-2deg)",
|
|
1419
1397
|
boxShadow: "var(--ui-animated-beam-node-base-shadow), 0 0 0 5px var(--ui-animated-beam-node-effect-ring)",
|
|
1420
1398
|
borderColor: "color-mix(in srgb, var(--ui-animated-beam-accent-end) 30%, transparent)"
|
|
@@ -1431,38 +1409,38 @@ function Me(a, e = 0, t = 0.1, s = 0.16, o = 0.2) {
|
|
|
1431
1409
|
boxShadow: "var(--ui-animated-beam-node-base-shadow), 0 0 0 6px var(--ui-animated-beam-node-effect-ring), 0 0 24px var(--ui-animated-beam-node-effect-glow)",
|
|
1432
1410
|
borderColor: "color-mix(in srgb, var(--ui-animated-beam-accent-end) 30%, transparent)"
|
|
1433
1411
|
},
|
|
1434
|
-
{ ...n, offset:
|
|
1412
|
+
{ ...n, offset: r },
|
|
1435
1413
|
{ ...n, offset: o },
|
|
1436
1414
|
{ ...n, offset: 1 }
|
|
1437
1415
|
];
|
|
1438
1416
|
}
|
|
1439
|
-
const
|
|
1417
|
+
const s = a === "pulse" ? "translate(-50%, -50%) scale(1.08)" : a === "ring" ? "translate(-50%, -50%) scale(1.04)" : "translate(-50%, -50%) scale(1.03)", i = a === "ring" ? "var(--ui-animated-beam-node-base-shadow), 0 0 0 7px var(--ui-animated-beam-node-effect-ring)" : a === "pulse" ? "var(--ui-animated-beam-node-base-shadow), 0 0 0 6px var(--ui-animated-beam-node-effect-ring), 0 0 20px var(--ui-animated-beam-node-effect-glow)" : "var(--ui-animated-beam-node-base-shadow), 0 0 0 5px var(--ui-animated-beam-node-effect-ring), 0 0 28px var(--ui-animated-beam-node-effect-glow)", p = a === "ring" ? "color-mix(in srgb, var(--ui-animated-beam-accent-end) 34%, transparent)" : "color-mix(in srgb, var(--ui-animated-beam-accent) 28%, transparent)";
|
|
1440
1418
|
return [
|
|
1441
1419
|
{ ...n, offset: 0 },
|
|
1442
1420
|
{ ...n, offset: e },
|
|
1443
1421
|
{
|
|
1444
1422
|
offset: t,
|
|
1445
|
-
transform:
|
|
1423
|
+
transform: s,
|
|
1446
1424
|
boxShadow: i,
|
|
1447
1425
|
borderColor: p
|
|
1448
1426
|
},
|
|
1449
|
-
{ ...n, offset:
|
|
1427
|
+
{ ...n, offset: r },
|
|
1450
1428
|
{ ...n, offset: o },
|
|
1451
1429
|
{ ...n, offset: 1 }
|
|
1452
1430
|
];
|
|
1453
1431
|
}
|
|
1454
|
-
function ee(a, e, t,
|
|
1432
|
+
function ee(a, e, t, r) {
|
|
1455
1433
|
let o = 0, n = a;
|
|
1456
|
-
const
|
|
1457
|
-
for (let i = 1; i <=
|
|
1458
|
-
const p = i /
|
|
1459
|
-
o += he(n,
|
|
1434
|
+
const s = 18;
|
|
1435
|
+
for (let i = 1; i <= s; i += 1) {
|
|
1436
|
+
const p = i / s, l = Ee(a, e, t, r, p);
|
|
1437
|
+
o += he(n, l), n = l;
|
|
1460
1438
|
}
|
|
1461
1439
|
return o;
|
|
1462
1440
|
}
|
|
1463
|
-
function Ee(a, e, t,
|
|
1464
|
-
const n = 1 - o,
|
|
1465
|
-
return { x:
|
|
1441
|
+
function Ee(a, e, t, r, o) {
|
|
1442
|
+
const n = 1 - o, s = n * n * n * a.x + 3 * n * n * o * e.x + 3 * n * o * o * t.x + o * o * o * r.x, i = n * n * n * a.y + 3 * n * n * o * e.y + 3 * n * o * o * t.y + o * o * o * r.y;
|
|
1443
|
+
return { x: s, y: i };
|
|
1466
1444
|
}
|
|
1467
1445
|
function te(a, e, t) {
|
|
1468
1446
|
return {
|
|
@@ -1487,32 +1465,27 @@ function le(a) {
|
|
|
1487
1465
|
}
|
|
1488
1466
|
function P(a, e) {
|
|
1489
1467
|
const t = le(a);
|
|
1490
|
-
if (!t)
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
return s ? Number.parseFloat(s[0]) : e;
|
|
1468
|
+
if (!t) return e;
|
|
1469
|
+
const r = t.match(/-?\d+(\.\d+)?/);
|
|
1470
|
+
return r ? Number.parseFloat(r[0]) : e;
|
|
1494
1471
|
}
|
|
1495
1472
|
function F(a, e) {
|
|
1496
|
-
if (!a)
|
|
1497
|
-
return e;
|
|
1473
|
+
if (!a) return e;
|
|
1498
1474
|
const t = a.trim();
|
|
1499
1475
|
return t ? /^-?\d+(\.\d+)?$/.test(t) ? Number.parseFloat(t) : t.endsWith("ms") ? Number.parseFloat(t.slice(0, -2)) || e : t.endsWith("s") ? (Number.parseFloat(t.slice(0, -1)) || e / 1e3) * 1e3 : e : e;
|
|
1500
1476
|
}
|
|
1501
1477
|
function W(a, e) {
|
|
1502
|
-
if (a == null)
|
|
1503
|
-
return e;
|
|
1478
|
+
if (a == null) return e;
|
|
1504
1479
|
const t = a.trim().toLowerCase();
|
|
1505
1480
|
return t ? t === "false" || t === "0" || t === "off" || t === "no" ? !1 : t === "true" || t === "1" || t === "on" || t === "yes" ? !0 : e : !0;
|
|
1506
1481
|
}
|
|
1507
1482
|
function L(a, e) {
|
|
1508
|
-
if (a == null)
|
|
1509
|
-
return e;
|
|
1483
|
+
if (a == null) return e;
|
|
1510
1484
|
const t = Number.parseInt(a, 10);
|
|
1511
1485
|
return Number.isFinite(t) ? t : e;
|
|
1512
1486
|
}
|
|
1513
1487
|
function ae(a, e) {
|
|
1514
|
-
if (a == null)
|
|
1515
|
-
return e;
|
|
1488
|
+
if (a == null) return e;
|
|
1516
1489
|
const t = Number.parseFloat(a);
|
|
1517
1490
|
return Number.isFinite(t) ? t : e;
|
|
1518
1491
|
}
|
|
@@ -1525,7 +1498,7 @@ function _(a, e, t) {
|
|
|
1525
1498
|
function he(a, e) {
|
|
1526
1499
|
return Math.hypot(e.x - a.x, e.y - a.y);
|
|
1527
1500
|
}
|
|
1528
|
-
function
|
|
1501
|
+
function b(a) {
|
|
1529
1502
|
return a.toFixed(2);
|
|
1530
1503
|
}
|
|
1531
1504
|
function S(a) {
|