@voidzero-dev/vitepress-theme 0.1.35 → 0.1.38

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.
Files changed (94) hide show
  1. package/dist/index100.js +6 -6
  2. package/dist/index101.js +4 -32
  3. package/dist/index102.js +4 -57
  4. package/dist/index103.js +6 -8
  5. package/dist/index104.js +29 -10
  6. package/dist/index105.js +55 -56
  7. package/dist/index106.js +9 -6
  8. package/dist/index107.js +13 -38
  9. package/dist/index108.js +58 -21
  10. package/dist/index109.js +6 -25
  11. package/dist/index110.js +39 -10
  12. package/dist/index111.js +20 -56
  13. package/dist/index112.js +25 -36
  14. package/dist/index113.js +10 -119
  15. package/dist/index114.js +54 -89
  16. package/dist/index115.js +34 -6
  17. package/dist/index116.js +112 -432
  18. package/dist/index117.js +92 -33
  19. package/dist/index118.js +6 -1200
  20. package/dist/index119.js +438 -3
  21. package/dist/index120.js +5 -1735
  22. package/dist/index121.js +2 -5
  23. package/dist/index122.js +1735 -2
  24. package/dist/index27.js +1 -1
  25. package/dist/index3.js +3 -3
  26. package/dist/index30.js +8 -8
  27. package/dist/index34.js +12 -12
  28. package/dist/index36.js +7 -7
  29. package/dist/index38.js +7 -7
  30. package/dist/index4.js +10 -10
  31. package/dist/index40.js +84 -2
  32. package/dist/index41.js +50 -68
  33. package/dist/index42.js +34 -47
  34. package/dist/index43.js +55 -32
  35. package/dist/index44.js +23 -73
  36. package/dist/index45.js +18 -14
  37. package/dist/index46.js +16 -20
  38. package/dist/index47.js +16 -16
  39. package/dist/index48.js +13 -13
  40. package/dist/index49.js +14 -14
  41. package/dist/index50.js +2 -26
  42. package/dist/index51.js +24 -17
  43. package/dist/index52.js +20 -16
  44. package/dist/index53.js +122 -16
  45. package/dist/index54.js +2 -2
  46. package/dist/index55.js +2 -2
  47. package/dist/index56.js +2 -2
  48. package/dist/index57.js +2 -2
  49. package/dist/index58.js +2 -2
  50. package/dist/index59.js +2 -2
  51. package/dist/index6.js +1 -1
  52. package/dist/index60.js +2 -2
  53. package/dist/index61.js +1 -1
  54. package/dist/index62.js +2 -2
  55. package/dist/index63.js +2 -2
  56. package/dist/index64.js +2 -2
  57. package/dist/index65.js +1 -1
  58. package/dist/index66.js +2 -49
  59. package/dist/index67.js +19 -44
  60. package/dist/index68.js +18 -2587
  61. package/dist/index69.js +18 -51
  62. package/dist/index7.js +2 -2
  63. package/dist/index70.js +2 -7207
  64. package/dist/index71.js +2 -14
  65. package/dist/index72.js +2 -22
  66. package/dist/index73.js +34 -124
  67. package/dist/index74.js +2 -2
  68. package/dist/index75.js +2 -2
  69. package/dist/index76.js +2 -2
  70. package/dist/index77.js +2 -2
  71. package/dist/index78.js +2 -2
  72. package/dist/index79.js +2 -25
  73. package/dist/index8.js +3 -3
  74. package/dist/index80.js +2 -34
  75. package/dist/index81.js +2 -2
  76. package/dist/index82.js +49 -2
  77. package/dist/index83.js +44 -3
  78. package/dist/index84.js +2587 -2
  79. package/dist/index85.js +51 -2
  80. package/dist/index86.js +7207 -2
  81. package/dist/index87.js +14 -2
  82. package/dist/index88.js +5324 -2
  83. package/dist/index89.js +2 -2
  84. package/dist/index90.js +1 -1
  85. package/dist/index91.js +1 -1
  86. package/dist/index92.js +1 -1
  87. package/dist/index93.js +1 -1
  88. package/dist/index94.js +2 -5324
  89. package/dist/index95.js +2 -2
  90. package/dist/index96.js +32 -9
  91. package/dist/index97.js +1201 -6
  92. package/dist/index98.js +3 -4
  93. package/dist/index99.js +10 -4
  94. package/package.json +1 -1
package/dist/index116.js CHANGED
@@ -1,441 +1,121 @@
1
- const m = (n, t, e) => {
2
- const i = document.createElement(n), [s, r] = Array.isArray(t) ? [void 0, t] : [t, e];
3
- return s && Object.assign(i, s), r?.forEach((a) => i.appendChild(a)), i;
4
- }, V = (n, t) => {
5
- var e;
6
- return t === "left" ? n.offsetLeft : (((e = n.offsetParent instanceof HTMLElement ? n.offsetParent : null) == null ? void 0 : e.offsetWidth) ?? 0) - n.offsetWidth - n.offsetLeft;
7
- }, B = (n) => n.offsetWidth > 0 && n.offsetHeight > 0, G = (n, t) => {
8
- !customElements.get(n) && customElements.define(n, t);
9
- };
10
- function X(n, t, { reverse: e = !1 } = {}) {
11
- const i = n.length;
12
- for (let s = e ? i - 1 : 0; e ? s >= 0 : s < i; e ? s-- : s++)
13
- t(n[s], s);
14
- }
15
- function J(n, t, e, i) {
16
- const s = t.formatToParts(n);
17
- e && s.unshift({ type: "prefix", value: e }), i && s.push({ type: "suffix", value: i });
18
- const r = [], a = [], o = [], c = [], d = {}, p = (h) => `${h}:${d[h] = (d[h] ?? -1) + 1}`;
19
- let $ = "", g = !1, v = !1;
20
- for (const h of s) {
21
- $ += h.value;
22
- const l = h.type === "minusSign" || h.type === "plusSign" ? "sign" : h.type;
23
- l === "integer" ? (g = !0, a.push(...h.value.split("").map((S) => ({ type: l, value: parseInt(S) })))) : l === "group" ? a.push({ type: l, value: h.value }) : l === "decimal" ? (v = !0, o.push({ type: l, value: h.value, key: p(l) })) : l === "fraction" ? o.push(...h.value.split("").map((S) => ({
24
- type: l,
25
- value: parseInt(S),
26
- key: p(l),
27
- pos: -1 - d[l]
28
- }))) : (g || v ? c : r).push({
29
- type: l,
30
- value: h.value,
31
- key: p(l)
32
- });
33
- }
34
- const R = [];
35
- for (let h = a.length - 1; h >= 0; h--) {
36
- const l = a[h];
37
- R.unshift(l.type === "integer" ? {
38
- ...l,
39
- key: p(l.type),
40
- pos: d[l.type]
41
- } : {
42
- ...l,
43
- key: p(l.type)
44
- });
45
- }
46
- return {
47
- pre: r,
48
- integer: R,
49
- fraction: o,
50
- post: c,
51
- valueAsString: $,
52
- value: typeof n == "string" ? parseFloat(n) : n
53
- };
54
- }
55
- const F = String.raw, W = (() => {
56
- try {
57
- document.createElement("div").animate({ opacity: 0 }, { easing: "linear(0, 1)" });
58
- } catch {
59
- return !1;
60
- }
61
- return !0;
62
- })(), O = typeof CSS < "u" && CSS.supports && CSS.supports("line-height", "mod(1,1)"), j = typeof matchMedia < "u" ? matchMedia("(prefers-reduced-motion: reduce)") : null, w = "--_number-flow-d-opacity", A = "--_number-flow-d-width", b = "--_number-flow-dx", E = "--_number-flow-d", D = (() => {
63
- try {
64
- return CSS.registerProperty({
65
- name: w,
66
- syntax: "<number>",
67
- inherits: !1,
68
- initialValue: "0"
69
- }), CSS.registerProperty({
70
- name: b,
71
- syntax: "<length>",
72
- inherits: !0,
73
- initialValue: "0px"
74
- }), CSS.registerProperty({
75
- name: A,
76
- syntax: "<number>",
77
- inherits: !1,
78
- initialValue: "0"
79
- }), CSS.registerProperty({
80
- name: E,
81
- syntax: "<number>",
82
- inherits: !0,
83
- initialValue: "0"
84
- }), !0;
85
- } catch {
86
- return !1;
87
- }
88
- })(), I = "var(--number-flow-char-height, 1em)", u = "var(--number-flow-mask-height, 0.25em)", k = `calc(${u} / 2)`, x = "var(--number-flow-mask-width, 0.5em)", f = `calc(${x} / var(--scale-x))`, y = "#000 0, transparent 71%", U = F`:host{display:inline-block;direction:ltr;white-space:nowrap;isolation:isolate;line-height:${I} !important}.number,.number__inner{display:inline-block;transform-origin:left top}:host([data-will-change]) :is(.number,.number__inner,.section,.digit,.digit__num,.symbol){will-change:transform}.number{--scale-x:calc(1 + var(${A}) / var(--width));transform:translateX(var(${b})) scaleX(var(--scale-x));margin:0 calc(-1 * ${x});position:relative;-webkit-mask-image:linear-gradient(to right,transparent 0,#000 ${f},#000 calc(100% - ${f}),transparent ),linear-gradient(to bottom,transparent 0,#000 ${u},#000 calc(100% - ${u}),transparent 100% ),radial-gradient(at bottom right,${y}),radial-gradient(at bottom left,${y}),radial-gradient(at top left,${y}),radial-gradient(at top right,${y});-webkit-mask-size:100% calc(100% - ${u} * 2),calc(100% - ${f} * 2) 100%,${f} ${u},${f} ${u},${f} ${u},${f} ${u};-webkit-mask-position:center,center,top left,top right,bottom right,bottom left;-webkit-mask-repeat:no-repeat}.number__inner{padding:${k} ${x};transform:scaleX(calc(1 / var(--scale-x))) translateX(calc(-1 * var(${b})))}:host > :not(.number){z-index:5}.section,.symbol{display:inline-block;position:relative;isolation:isolate}.section::after{content:'\200b';display:inline-block}.section--justify-left{transform-origin:center left}.section--justify-right{transform-origin:center right}.section > [inert],.symbol > [inert]{margin:0 !important;position:absolute !important;z-index:-1}.digit{display:inline-block;position:relative;--c:var(--current) + var(${E})}.digit__num,.number .section::after{padding:${k} 0}.digit__num{display:inline-block;--offset-raw:mod(var(--length) + var(--n) - mod(var(--c),var(--length)),var(--length));--offset:calc( var(--offset-raw) - var(--length) * round(down,var(--offset-raw) / (var(--length) / 2),1) );--y:clamp(-100%,var(--offset) * 100%,100%);transform:translateY(var(--y))}.digit__num[inert]{position:absolute;top:0;left:50%;transform:translateX(-50%) translateY(var(--y))}.digit:not(.is-spinning) .digit__num[inert]{display:none}.symbol__value{display:inline-block;mix-blend-mode:plus-lighter;white-space:pre}.section--justify-left .symbol > [inert]{left:0}.section--justify-right .symbol > [inert]{right:0}.animate-presence{opacity:calc(1 + var(${w}))}`, z = HTMLElement, H = O && W && D;
89
- let _;
90
- class Y extends z {
91
- constructor() {
92
- super(), this.created = !1, this.batched = !1;
93
- const { animated: t, ...e } = this.constructor.defaultProps;
94
- this._animated = this.computedAnimated = t, Object.assign(this, e);
95
- }
96
- get animated() {
97
- return this._animated;
98
- }
99
- set animated(t) {
100
- var e;
101
- this.animated !== t && (this._animated = t, (e = this.shadowRoot) == null || e.getAnimations().forEach((i) => i.finish()));
102
- }
103
- /**
104
- * @internal
105
- */
106
- set data(t) {
107
- var e;
108
- if (t == null)
109
- return;
110
- const { pre: i, integer: s, fraction: r, post: a, value: o } = t;
111
- if (this.created) {
112
- const c = this._data;
113
- this._data = t, this.computedTrend = typeof this.trend == "function" ? this.trend(c.value, o) : this.trend, this.computedAnimated = H && this._animated && (!this.respectMotionPreference || !(j != null && j.matches)) && // https://github.com/barvian/number-flow/issues/9
114
- B(this), (e = this.plugins) == null || e.forEach((d) => {
115
- var p;
116
- return (p = d.onUpdate) == null ? void 0 : p.call(d, t, c, this);
117
- }), this.batched || this.willUpdate(), this._pre.update(i), this._num.update({ integer: s, fraction: r }), this._post.update(a), this.batched || this.didUpdate();
118
- } else {
119
- this._data = t, this.attachShadow({ mode: "open" });
120
- try {
121
- this._internals ?? (this._internals = this.attachInternals()), this._internals.role = "img";
122
- } catch {
123
- }
124
- if (typeof CSSStyleSheet < "u" && this.shadowRoot.adoptedStyleSheets)
125
- _ || (_ = new CSSStyleSheet(), _.replaceSync(U)), this.shadowRoot.adoptedStyleSheets = [_];
126
- else {
127
- const c = document.createElement("style");
128
- c.textContent = U, this.shadowRoot.appendChild(c);
129
- }
130
- this._pre = new T(this, i, {
131
- justify: "right",
132
- part: "left"
133
- }), this.shadowRoot.appendChild(this._pre.el), this._num = new Z(this, s, r), this.shadowRoot.appendChild(this._num.el), this._post = new T(this, a, {
134
- justify: "left",
135
- part: "right"
136
- }), this.shadowRoot.appendChild(this._post.el), this.created = !0;
137
- }
138
- try {
139
- this._internals.ariaLabel = t.valueAsString;
140
- } catch {
1
+ import { createContext as E } from "./index99.js";
2
+ import { useDirection as x } from "./index103.js";
3
+ import { Primitive as G } from "./index112.js";
4
+ import { useCollection as O } from "./index114.js";
5
+ import { focusFirst as k, ENTRY_FOCUS as M, EVENT_OPTIONS as N } from "./index115.js";
6
+ import { defineComponent as P, toRefs as V, ref as c, createBlock as w, openBlock as A, unref as s, withCtx as g, createVNode as $, renderSlot as D } from "vue";
7
+ import { useVModel as U } from "./index105.js";
8
+ const [X, j] = E("RovingFocusGroup");
9
+ var K = /* @__PURE__ */ P({
10
+ __name: "RovingFocusGroup",
11
+ props: {
12
+ orientation: {
13
+ type: String,
14
+ required: !1,
15
+ default: void 0
16
+ },
17
+ dir: {
18
+ type: String,
19
+ required: !1
20
+ },
21
+ loop: {
22
+ type: Boolean,
23
+ required: !1,
24
+ default: !1
25
+ },
26
+ currentTabStopId: {
27
+ type: [String, null],
28
+ required: !1
29
+ },
30
+ defaultCurrentTabStopId: {
31
+ type: String,
32
+ required: !1
33
+ },
34
+ preventScrollOnEntryFocus: {
35
+ type: Boolean,
36
+ required: !1,
37
+ default: !1
38
+ },
39
+ asChild: {
40
+ type: Boolean,
41
+ required: !1
42
+ },
43
+ as: {
44
+ type: null,
45
+ required: !1
141
46
  }
142
- }
143
- /**
144
- * @internal
145
- */
146
- willUpdate() {
147
- this._pre.willUpdate(), this._num.willUpdate(), this._post.willUpdate();
148
- }
149
- /**
150
- * @internal
151
- */
152
- didUpdate() {
153
- if (!this.computedAnimated)
154
- return;
155
- this._abortAnimationsFinish ? this._abortAnimationsFinish.abort() : this.dispatchEvent(new Event("animationsstart")), this._pre.didUpdate(), this._num.didUpdate(), this._post.didUpdate();
156
- const t = new AbortController();
157
- Promise.all(this.shadowRoot.getAnimations().map((e) => e.finished)).then(() => {
158
- t.signal.aborted || (this.dispatchEvent(new Event("animationsfinish")), this._abortAnimationsFinish = void 0);
159
- }), this._abortAnimationsFinish = t;
160
- }
161
- }
162
- Y.defaultProps = {
163
- transformTiming: {
164
- duration: 900,
165
- // Make sure to keep this minified:
166
- easing: "linear(0,.005,.019,.039,.066,.096,.129,.165,.202,.24,.278,.316,.354,.39,.426,.461,.494,.526,.557,.586,.614,.64,.665,.689,.711,.731,.751,.769,.786,.802,.817,.831,.844,.856,.867,.877,.887,.896,.904,.912,.919,.925,.931,.937,.942,.947,.951,.955,.959,.962,.965,.968,.971,.973,.976,.978,.98,.981,.983,.984,.986,.987,.988,.989,.99,.991,.992,.992,.993,.994,.994,.995,.995,.996,.996,.9963,.9967,.9969,.9972,.9975,.9977,.9979,.9981,.9982,.9984,.9985,.9987,.9988,.9989,1)"
167
47
  },
168
- spinTiming: void 0,
169
- opacityTiming: { duration: 450, easing: "ease-out" },
170
- animated: !0,
171
- trend: (n, t) => Math.sign(t - n),
172
- respectMotionPreference: !0,
173
- plugins: void 0,
174
- digits: void 0
175
- };
176
- class Z {
177
- constructor(t, e, i, { className: s, ...r } = {}) {
178
- this.flow = t, this._integer = new P(t, e, {
179
- justify: "right",
180
- part: "integer"
181
- }), this._fraction = new P(t, i, {
182
- justify: "left",
183
- part: "fraction"
184
- }), this._inner = m("span", {
185
- className: "number__inner"
186
- }, [this._integer.el, this._fraction.el]), this.el = m("span", {
187
- ...r,
188
- part: "number",
189
- className: `number ${s ?? ""}`
190
- }, [this._inner]);
191
- }
192
- willUpdate() {
193
- this._prevWidth = this.el.offsetWidth, this._prevLeft = this.el.getBoundingClientRect().left, this._integer.willUpdate(), this._fraction.willUpdate();
194
- }
195
- update({ integer: t, fraction: e }) {
196
- this._integer.update(t), this._fraction.update(e);
197
- }
198
- didUpdate() {
199
- const t = this.el.getBoundingClientRect();
200
- this._integer.didUpdate(), this._fraction.didUpdate();
201
- const e = this._prevLeft - t.left, i = this.el.offsetWidth, s = this._prevWidth - i;
202
- this.el.style.setProperty("--width", String(i)), this.el.animate({
203
- [b]: [`${e}px`, "0px"],
204
- [A]: [s, 0]
205
- }, {
206
- ...this.flow.transformTiming,
207
- composite: "accumulate"
208
- });
209
- }
210
- }
211
- class N {
212
- constructor(t, e, { justify: i, className: s, ...r }, a) {
213
- this.flow = t, this.children = /* @__PURE__ */ new Map(), this.onCharRemove = (c) => () => {
214
- this.children.delete(c);
215
- }, this.justify = i;
216
- const o = e.map((c) => this.addChar(c).el);
217
- this.el = m("span", {
218
- ...r,
219
- className: `section section--justify-${i} ${s ?? ""}`
220
- }, a ? a(o) : o);
221
- }
222
- addChar(t, { startDigitsAtZero: e = !1, ...i } = {}) {
223
- const s = t.type === "integer" || t.type === "fraction" ? new L(this, t.type, e ? 0 : t.value, t.pos, {
224
- ...i,
225
- onRemove: this.onCharRemove(t.key)
226
- }) : new q(this, t.type, t.value, {
227
- ...i,
228
- onRemove: this.onCharRemove(t.key)
229
- });
230
- return this.children.set(t.key, s), s;
231
- }
232
- unpop(t) {
233
- t.el.removeAttribute("inert"), t.el.style.top = "", t.el.style[this.justify] = "";
234
- }
235
- pop(t) {
236
- t.forEach((e) => {
237
- e.el.style.top = `${e.el.offsetTop}px`, e.el.style[this.justify] = `${V(e.el, this.justify)}px`;
238
- }), t.forEach((e) => {
239
- e.el.setAttribute("inert", ""), e.present = !1;
240
- });
241
- }
242
- addNewAndUpdateExisting(t) {
243
- const e = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), s = this.justify === "left", r = s ? "prepend" : "append";
244
- if (X(t, (a) => {
245
- let o;
246
- this.children.has(a.key) ? (o = this.children.get(a.key), i.set(a, o), this.unpop(o), o.present = !0) : (o = this.addChar(a, { startDigitsAtZero: !0, animateIn: !0 }), e.set(a, o)), this.el[r](o.el);
247
- }, { reverse: s }), this.flow.computedAnimated) {
248
- const a = this.el.getBoundingClientRect();
249
- e.forEach((o) => {
250
- o.willUpdate(a);
251
- });
252
- }
253
- e.forEach((a, o) => {
254
- a.update(o.value);
255
- }), i.forEach((a, o) => {
256
- a.update(o.value);
257
- });
258
- }
259
- willUpdate() {
260
- const t = this.el.getBoundingClientRect();
261
- this._prevOffset = t[this.justify], this.children.forEach((e) => e.willUpdate(t));
262
- }
263
- didUpdate() {
264
- const t = this.el.getBoundingClientRect();
265
- this.children.forEach((s) => s.didUpdate(t));
266
- const e = t[this.justify], i = this._prevOffset - e;
267
- i && this.children.size && this.el.animate({
268
- transform: [`translateX(${i}px)`, "none"]
269
- }, {
270
- ...this.flow.transformTiming,
271
- composite: "accumulate"
272
- });
273
- }
274
- }
275
- class P extends N {
276
- update(t) {
277
- const e = /* @__PURE__ */ new Map();
278
- this.children.forEach((i, s) => {
279
- t.find((r) => r.key === s) || e.set(s, i), this.unpop(i);
280
- }), this.addNewAndUpdateExisting(t), e.forEach((i) => {
281
- i instanceof L && i.update(0);
282
- }), this.pop(e);
283
- }
284
- }
285
- class T extends N {
286
- update(t) {
287
- const e = /* @__PURE__ */ new Map();
288
- this.children.forEach((i, s) => {
289
- t.find((r) => r.key === s) || e.set(s, i);
290
- }), this.pop(e), this.addNewAndUpdateExisting(t);
291
- }
292
- }
293
- class C {
294
- constructor(t, e, { onRemove: i, animateIn: s = !1 } = {}) {
295
- this.flow = t, this.el = e, this._present = !0, this._remove = () => {
296
- var r;
297
- this.el.remove(), (r = this._onRemove) == null || r.call(this);
298
- }, this.el.classList.add("animate-presence"), this.flow.computedAnimated && s && this.el.animate({
299
- [w]: [-0.9999, 0]
300
- }, {
301
- ...this.flow.opacityTiming,
302
- composite: "accumulate"
303
- }), this._onRemove = i;
304
- }
305
- get present() {
306
- return this._present;
307
- }
308
- set present(t) {
309
- if (this._present !== t) {
310
- if (this._present = t, t ? this.el.removeAttribute("inert") : this.el.setAttribute("inert", ""), !this.flow.computedAnimated) {
311
- t || this._remove();
312
- return;
48
+ emits: ["entryFocus", "update:currentTabStopId"],
49
+ setup(F, { expose: b, emit: I }) {
50
+ const r = F, p = I, { loop: S, orientation: f, dir: y } = V(r), v = x(y), l = U(r, "currentTabStopId", p, {
51
+ defaultValue: r.defaultCurrentTabStopId,
52
+ passive: r.currentTabStopId === void 0
53
+ }), u = c(!1), a = c(!1), d = c(0), { getItems: m, CollectionSlot: T } = O({ isProvider: !0 });
54
+ function C(e) {
55
+ const o = !a.value;
56
+ if (e.currentTarget && e.target === e.currentTarget && o && !u.value) {
57
+ const n = new CustomEvent(M, N);
58
+ if (e.currentTarget.dispatchEvent(n), p("entryFocus", n), !n.defaultPrevented) {
59
+ const i = m().map((t) => t.ref).filter((t) => t.dataset.disabled !== ""), _ = i.find((t) => t.getAttribute("data-active") === ""), R = i.find((t) => t.getAttribute("data-highlighted") === ""), q = i.find((t) => t.id === l.value), B = [
60
+ _,
61
+ R,
62
+ q,
63
+ ...i
64
+ ].filter(Boolean);
65
+ k(B, r.preventScrollOnEntryFocus);
66
+ }
313
67
  }
314
- this.el.style.setProperty("--_number-flow-d-opacity", t ? "0" : "-.999"), this.el.animate({
315
- [w]: t ? [-0.9999, 0] : [0.999, 0]
316
- }, {
317
- ...this.flow.opacityTiming,
318
- composite: "accumulate"
319
- }), t ? this.flow.removeEventListener("animationsfinish", this._remove) : this.flow.addEventListener("animationsfinish", this._remove, {
320
- once: !0
321
- });
68
+ a.value = !1;
322
69
  }
323
- }
324
- }
325
- class M extends C {
326
- constructor(t, e, i, s) {
327
- super(t.flow, i, s), this.section = t, this.value = e, this.el = i;
328
- }
329
- }
330
- class L extends M {
331
- constructor(t, e, i, s, r) {
332
- var a, o;
333
- const c = (((o = (a = t.flow.digits) == null ? void 0 : a[s]) == null ? void 0 : o.max) ?? 9) + 1, d = Array.from({ length: c }).map(($, g) => {
334
- const v = m("span", { className: "digit__num" }, [
335
- document.createTextNode(String(g))
336
- ]);
337
- return g !== i && v.setAttribute("inert", ""), v.style.setProperty("--n", String(g)), v;
338
- }), p = m("span", {
339
- part: `digit ${e}-digit`,
340
- className: "digit"
341
- }, d);
342
- p.style.setProperty("--current", String(i)), p.style.setProperty("--length", String(c)), super(t, i, p, r), this.pos = s, this._onAnimationsFinish = () => {
343
- this.el.classList.remove("is-spinning");
344
- }, this._numbers = d, this.length = c;
345
- }
346
- willUpdate(t) {
347
- const e = this.el.getBoundingClientRect();
348
- this._prevValue = this.value;
349
- const i = e[this.section.justify] - t[this.section.justify], s = e.width / 2;
350
- this._prevCenter = this.section.justify === "left" ? i + s : i - s;
351
- }
352
- update(t) {
353
- this.el.style.setProperty("--current", String(t)), this._numbers.forEach((e, i) => i === t ? e.removeAttribute("inert") : e.setAttribute("inert", "")), this.value = t;
354
- }
355
- didUpdate(t) {
356
- const e = this.el.getBoundingClientRect(), i = e[this.section.justify] - t[this.section.justify], s = e.width / 2, r = this.section.justify === "left" ? i + s : i - s, a = this._prevCenter - r;
357
- a && this.el.animate({
358
- transform: [`translateX(${a}px)`, "none"]
359
- }, {
360
- ...this.flow.transformTiming,
361
- composite: "accumulate"
362
- });
363
- const o = this.getDelta();
364
- o && (this.el.classList.add("is-spinning"), this.el.animate({
365
- [E]: [-o, 0]
366
- }, {
367
- ...this.flow.spinTiming ?? this.flow.transformTiming,
368
- composite: "accumulate"
369
- }), this.flow.addEventListener("animationsfinish", this._onAnimationsFinish, { once: !0 }));
370
- }
371
- getDelta() {
372
- var t;
373
- if (this.flow.plugins)
374
- for (const s of this.flow.plugins) {
375
- const r = (t = s.getDelta) == null ? void 0 : t.call(s, this.value, this._prevValue, this);
376
- if (r != null)
377
- return r;
70
+ function h() {
71
+ setTimeout(() => {
72
+ a.value = !1;
73
+ }, 1);
74
+ }
75
+ return b({ getItems: m }), j({
76
+ loop: S,
77
+ dir: v,
78
+ orientation: f,
79
+ currentTabStopId: l,
80
+ onItemFocus: (e) => {
81
+ l.value = e;
82
+ },
83
+ onItemShiftTab: () => {
84
+ u.value = !0;
85
+ },
86
+ onFocusableItemAdd: () => {
87
+ d.value++;
88
+ },
89
+ onFocusableItemRemove: () => {
90
+ d.value--;
378
91
  }
379
- const e = this.value - this._prevValue, i = this.flow.computedTrend || Math.sign(e);
380
- return i < 0 && this.value > this._prevValue ? this.value - this.length - this._prevValue : i > 0 && this.value < this._prevValue ? this.length - this._prevValue + this.value : e;
381
- }
382
- }
383
- class q extends M {
384
- constructor(t, e, i, s) {
385
- const r = m("span", {
386
- className: "symbol__value",
387
- textContent: i
388
- });
389
- super(t, i, m("span", {
390
- part: `symbol ${e}`,
391
- className: "symbol"
392
- }, [r]), s), this.type = e, this._children = /* @__PURE__ */ new Map(), this._onChildRemove = (a) => () => {
393
- this._children.delete(a);
394
- }, this._children.set(i, new C(this.flow, r, {
395
- onRemove: this._onChildRemove(i)
92
+ }), (e, o) => (A(), w(s(T), null, {
93
+ default: g(() => [$(s(G), {
94
+ tabindex: u.value || d.value === 0 ? -1 : 0,
95
+ "data-orientation": s(f),
96
+ as: e.as,
97
+ "as-child": e.asChild,
98
+ dir: s(v),
99
+ style: { outline: "none" },
100
+ onMousedown: o[0] || (o[0] = (n) => a.value = !0),
101
+ onMouseup: h,
102
+ onFocus: C,
103
+ onBlur: o[1] || (o[1] = (n) => u.value = !1)
104
+ }, {
105
+ default: g(() => [D(e.$slots, "default")]),
106
+ _: 3
107
+ }, 8, [
108
+ "tabindex",
109
+ "data-orientation",
110
+ "as",
111
+ "as-child",
112
+ "dir"
113
+ ])]),
114
+ _: 3
396
115
  }));
397
116
  }
398
- willUpdate(t) {
399
- if (this.type === "decimal")
400
- return;
401
- const e = this.el.getBoundingClientRect();
402
- this._prevOffset = e[this.section.justify] - t[this.section.justify];
403
- }
404
- update(t) {
405
- if (this.value !== t) {
406
- const e = this._children.get(this.value);
407
- e && (e.present = !1);
408
- const i = this._children.get(t);
409
- if (i)
410
- i.present = !0;
411
- else {
412
- const s = m("span", {
413
- className: "symbol__value",
414
- textContent: t
415
- });
416
- this.el.appendChild(s), this._children.set(t, new C(this.flow, s, {
417
- animateIn: !0,
418
- onRemove: this._onChildRemove(t)
419
- }));
420
- }
421
- }
422
- this.value = t;
423
- }
424
- didUpdate(t) {
425
- if (this.type === "decimal")
426
- return;
427
- const e = this.el.getBoundingClientRect()[this.section.justify] - t[this.section.justify], i = this._prevOffset - e;
428
- i && this.el.animate({
429
- transform: [`translateX(${i}px)`, "none"]
430
- }, { ...this.flow.transformTiming, composite: "accumulate" });
431
- }
432
- }
117
+ }), Z = K;
433
118
  export {
434
- L as D,
435
- Y as N,
436
- z as S,
437
- H as c,
438
- G as d,
439
- J as f,
440
- j as p
119
+ Z as RovingFocusGroup_default,
120
+ X as injectRovingFocusGroupContext
441
121
  };