@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.
- package/dist/index100.js +6 -6
- package/dist/index101.js +4 -32
- package/dist/index102.js +4 -57
- package/dist/index103.js +6 -8
- package/dist/index104.js +29 -10
- package/dist/index105.js +55 -56
- package/dist/index106.js +9 -6
- package/dist/index107.js +13 -38
- package/dist/index108.js +58 -21
- package/dist/index109.js +6 -25
- package/dist/index110.js +39 -10
- package/dist/index111.js +20 -56
- package/dist/index112.js +25 -36
- package/dist/index113.js +10 -119
- package/dist/index114.js +54 -89
- package/dist/index115.js +34 -6
- package/dist/index116.js +112 -432
- package/dist/index117.js +92 -33
- package/dist/index118.js +6 -1200
- package/dist/index119.js +438 -3
- package/dist/index120.js +5 -1735
- package/dist/index121.js +2 -5
- package/dist/index122.js +1735 -2
- package/dist/index27.js +1 -1
- package/dist/index3.js +3 -3
- package/dist/index30.js +8 -8
- package/dist/index34.js +12 -12
- package/dist/index36.js +7 -7
- package/dist/index38.js +7 -7
- package/dist/index4.js +10 -10
- package/dist/index40.js +84 -2
- package/dist/index41.js +50 -68
- package/dist/index42.js +34 -47
- package/dist/index43.js +55 -32
- package/dist/index44.js +23 -73
- package/dist/index45.js +18 -14
- package/dist/index46.js +16 -20
- package/dist/index47.js +16 -16
- package/dist/index48.js +13 -13
- package/dist/index49.js +14 -14
- package/dist/index50.js +2 -26
- package/dist/index51.js +24 -17
- package/dist/index52.js +20 -16
- package/dist/index53.js +122 -16
- package/dist/index54.js +2 -2
- package/dist/index55.js +2 -2
- package/dist/index56.js +2 -2
- package/dist/index57.js +2 -2
- package/dist/index58.js +2 -2
- package/dist/index59.js +2 -2
- package/dist/index6.js +1 -1
- package/dist/index60.js +2 -2
- package/dist/index61.js +1 -1
- package/dist/index62.js +2 -2
- package/dist/index63.js +2 -2
- package/dist/index64.js +2 -2
- package/dist/index65.js +1 -1
- package/dist/index66.js +2 -49
- package/dist/index67.js +19 -44
- package/dist/index68.js +18 -2587
- package/dist/index69.js +18 -51
- package/dist/index7.js +2 -2
- package/dist/index70.js +2 -7207
- package/dist/index71.js +2 -14
- package/dist/index72.js +2 -22
- package/dist/index73.js +34 -124
- package/dist/index74.js +2 -2
- package/dist/index75.js +2 -2
- package/dist/index76.js +2 -2
- package/dist/index77.js +2 -2
- package/dist/index78.js +2 -2
- package/dist/index79.js +2 -25
- package/dist/index8.js +3 -3
- package/dist/index80.js +2 -34
- package/dist/index81.js +2 -2
- package/dist/index82.js +49 -2
- package/dist/index83.js +44 -3
- package/dist/index84.js +2587 -2
- package/dist/index85.js +51 -2
- package/dist/index86.js +7207 -2
- package/dist/index87.js +14 -2
- package/dist/index88.js +5324 -2
- package/dist/index89.js +2 -2
- package/dist/index90.js +1 -1
- package/dist/index91.js +1 -1
- package/dist/index92.js +1 -1
- package/dist/index93.js +1 -1
- package/dist/index94.js +2 -5324
- package/dist/index95.js +2 -2
- package/dist/index96.js +32 -9
- package/dist/index97.js +1201 -6
- package/dist/index98.js +3 -4
- package/dist/index99.js +10 -4
- package/package.json +1 -1
package/dist/index116.js
CHANGED
|
@@ -1,441 +1,121 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
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
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
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
|
-
|
|
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
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
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
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
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
|
-
|
|
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
|
-
|
|
435
|
-
|
|
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
|
};
|