@voidzero-dev/vitepress-theme 0.1.33 → 0.1.35
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 +9 -0
- package/dist/index101.js +35 -0
- package/dist/index102.js +59 -0
- package/dist/index103.js +11 -0
- package/dist/index104.js +16 -0
- package/dist/index105.js +60 -0
- package/dist/index106.js +8 -0
- package/dist/index107.js +41 -0
- package/dist/index108.js +23 -0
- package/dist/index109.js +27 -0
- package/dist/index110.js +12 -0
- package/dist/index111.js +59 -0
- package/dist/index112.js +38 -0
- package/dist/index113.js +121 -0
- package/dist/index114.js +94 -0
- package/dist/index115.js +10 -0
- package/dist/index116.js +441 -0
- package/dist/index117.js +35 -0
- package/dist/index118.js +1204 -0
- package/dist/index119.js +6 -0
- package/dist/index120.js +1737 -0
- package/dist/index121.js +7 -0
- package/dist/index122.js +4 -0
- package/dist/index123.js +317 -0
- package/dist/index124.js +4 -0
- package/dist/index125.js +448 -0
- 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 +24 -21
- package/dist/index41.js +81 -23
- package/dist/index42.js +63 -27
- package/dist/index43.js +49 -22
- package/dist/index44.js +73 -23
- package/dist/index45.js +14 -14
- package/dist/index46.js +20 -16
- package/dist/index47.js +26 -2
- package/dist/index48.js +26 -2
- package/dist/index49.js +26 -2
- package/dist/index50.js +26 -2
- package/dist/index51.js +18 -2
- package/dist/index52.js +18 -2
- package/dist/index53.js +18 -2
- package/dist/index54.js +2 -2
- package/dist/index55.js +2 -2
- package/dist/index56.js +1 -1
- package/dist/index57.js +2 -2
- package/dist/index58.js +2 -18
- package/dist/index59.js +2 -18
- package/dist/index6.js +27 -27
- package/dist/index60.js +2 -18
- package/dist/index61.js +2 -2
- package/dist/index62.js +2 -49
- package/dist/index63.js +3 -44
- package/dist/index64.js +2 -2587
- package/dist/index65.js +2 -51
- package/dist/index66.js +49 -7207
- package/dist/index67.js +43 -14
- package/dist/index68.js +2585 -32
- package/dist/index69.js +51 -2
- package/dist/index7.js +1 -1
- package/dist/index70.js +7207 -2
- package/dist/index71.js +14 -2
- package/dist/index72.js +22 -2
- package/dist/index73.js +124 -2
- 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 +25 -2
- package/dist/index8.js +2 -2
- package/dist/index80.js +33 -21
- package/dist/index81.js +2 -124
- package/dist/index82.js +2 -2
- package/dist/index83.js +2 -439
- package/dist/index84.js +2 -1735
- package/dist/index85.js +2 -2
- package/dist/index86.js +2 -2
- package/dist/index87.js +2 -2
- package/dist/index88.js +1 -1
- package/dist/index89.js +1 -1
- package/dist/index90.js +1 -1
- package/dist/index91.js +2 -33
- package/dist/index92.js +2 -1202
- package/dist/index93.js +2 -446
- package/dist/index94.js +5324 -5
- package/dist/index95.js +2 -2
- package/dist/index96.js +9 -314
- package/dist/index97.js +7 -2
- package/dist/index98.js +4 -3
- package/dist/index99.js +6 -0
- package/package.json +1 -1
package/dist/index95.js
CHANGED
package/dist/index96.js
CHANGED
|
@@ -1,317 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
return
|
|
5
|
-
(
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
for (var S = p(3491), m = typeof window > "u" ? p.g : window, g = ["moz", "webkit"], h = "AnimationFrame", d = m["request" + h], _ = m["cancel" + h] || m["cancelRequest" + h], O = 0; !d && O < g.length; O++) d = m[g[O] + "Request" + h], _ = m[g[O] + "Cancel" + h] || m[g[O] + "CancelRequest" + h];
|
|
10
|
-
if (!d || !_) {
|
|
11
|
-
var D = 0, x = 0, b = [], R = 1e3 / 60;
|
|
12
|
-
d = function(y) {
|
|
13
|
-
if (b.length === 0) {
|
|
14
|
-
var T = S(), L = Math.max(0, R - (T - D));
|
|
15
|
-
D = L + T, setTimeout((function() {
|
|
16
|
-
var M = b.slice(0);
|
|
17
|
-
b.length = 0;
|
|
18
|
-
for (var C = 0; C < M.length; C++) if (!M[C].cancelled) try {
|
|
19
|
-
M[C].callback(D);
|
|
20
|
-
} catch (N) {
|
|
21
|
-
setTimeout((function() {
|
|
22
|
-
throw N;
|
|
23
|
-
}), 0);
|
|
24
|
-
}
|
|
25
|
-
}), Math.round(L));
|
|
26
|
-
}
|
|
27
|
-
return b.push({ handle: ++x, callback: y, cancelled: !1 }), x;
|
|
28
|
-
}, _ = function(y) {
|
|
29
|
-
for (var T = 0; T < b.length; T++) b[T].handle === y && (b[T].cancelled = !0);
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
s.exports = function(y) {
|
|
33
|
-
return d.call(m, y);
|
|
34
|
-
}, s.exports.cancel = function() {
|
|
35
|
-
_.apply(m, arguments);
|
|
36
|
-
}, s.exports.polyfill = function(y) {
|
|
37
|
-
y || (y = m), y.requestAnimationFrame = d, y.cancelAnimationFrame = _;
|
|
38
|
-
};
|
|
39
|
-
}, 3491: function(s) {
|
|
40
|
-
(function() {
|
|
41
|
-
var c, p, S, m, g, h;
|
|
42
|
-
typeof performance < "u" && performance !== null && performance.now ? s.exports = function() {
|
|
43
|
-
return performance.now();
|
|
44
|
-
} : typeof process < "u" && process !== null && process.hrtime ? (s.exports = function() {
|
|
45
|
-
return (c() - g) / 1e6;
|
|
46
|
-
}, p = process.hrtime, m = (c = function() {
|
|
47
|
-
var d;
|
|
48
|
-
return 1e9 * (d = p())[0] + d[1];
|
|
49
|
-
})(), h = 1e9 * process.uptime(), g = m - h) : Date.now ? (s.exports = function() {
|
|
50
|
-
return Date.now() - S;
|
|
51
|
-
}, S = Date.now()) : (s.exports = function() {
|
|
52
|
-
return (/* @__PURE__ */ new Date()).getTime() - S;
|
|
53
|
-
}, S = (/* @__PURE__ */ new Date()).getTime());
|
|
54
|
-
}).call(this);
|
|
55
|
-
} }, Q = {};
|
|
56
|
-
function w(s) {
|
|
57
|
-
var c = Q[s];
|
|
58
|
-
if (c !== void 0) return c.exports;
|
|
59
|
-
var p = Q[s] = { exports: {} };
|
|
60
|
-
return z[s].call(p.exports, p, p.exports, w), p.exports;
|
|
61
|
-
}
|
|
62
|
-
w.n = (s) => {
|
|
63
|
-
var c = s && s.__esModule ? () => s.default : () => s;
|
|
64
|
-
return w.d(c, { a: c }), c;
|
|
65
|
-
}, w.d = (s, c) => {
|
|
66
|
-
for (var p in c) w.o(c, p) && !w.o(s, p) && Object.defineProperty(s, p, { enumerable: !0, get: c[p] });
|
|
67
|
-
}, w.g = (function() {
|
|
68
|
-
if (typeof globalThis == "object") return globalThis;
|
|
69
|
-
try {
|
|
70
|
-
return this || new Function("return this")();
|
|
71
|
-
} catch {
|
|
72
|
-
if (typeof window == "object") return window;
|
|
73
|
-
}
|
|
74
|
-
})(), w.o = (s, c) => Object.prototype.hasOwnProperty.call(s, c);
|
|
75
|
-
var J = {};
|
|
76
|
-
return (() => {
|
|
77
|
-
w.d(J, { default: () => oe });
|
|
78
|
-
var s = w(3146), c = w.n(s);
|
|
79
|
-
const p = function(o) {
|
|
80
|
-
return new RegExp(/<[a-z][\s\S]*>/i).test(o);
|
|
81
|
-
}, S = function(o, t) {
|
|
82
|
-
return Math.floor(Math.random() * (t - o + 1)) + o;
|
|
83
|
-
};
|
|
84
|
-
var m = "TYPE_CHARACTER", g = "REMOVE_CHARACTER", h = "REMOVE_ALL", d = "REMOVE_LAST_VISIBLE_NODE", _ = "PAUSE_FOR", O = "CALL_FUNCTION", D = "ADD_HTML_TAG_ELEMENT", x = "CHANGE_DELETE_SPEED", b = "CHANGE_DELAY", R = "CHANGE_CURSOR", y = "PASTE_STRING", T = "HTML_TAG";
|
|
85
|
-
function L(o) {
|
|
86
|
-
return L = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
87
|
-
return typeof t;
|
|
88
|
-
} : function(t) {
|
|
89
|
-
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
90
|
-
}, L(o);
|
|
91
|
-
}
|
|
92
|
-
function M(o, t) {
|
|
93
|
-
var a = Object.keys(o);
|
|
94
|
-
if (Object.getOwnPropertySymbols) {
|
|
95
|
-
var r = Object.getOwnPropertySymbols(o);
|
|
96
|
-
t && (r = r.filter((function(A) {
|
|
97
|
-
return Object.getOwnPropertyDescriptor(o, A).enumerable;
|
|
98
|
-
}))), a.push.apply(a, r);
|
|
99
|
-
}
|
|
100
|
-
return a;
|
|
101
|
-
}
|
|
102
|
-
function C(o) {
|
|
103
|
-
for (var t = 1; t < arguments.length; t++) {
|
|
104
|
-
var a = arguments[t] != null ? arguments[t] : {};
|
|
105
|
-
t % 2 ? M(Object(a), !0).forEach((function(r) {
|
|
106
|
-
u(o, r, a[r]);
|
|
107
|
-
})) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(a)) : M(Object(a)).forEach((function(r) {
|
|
108
|
-
Object.defineProperty(o, r, Object.getOwnPropertyDescriptor(a, r));
|
|
109
|
-
}));
|
|
110
|
-
}
|
|
111
|
-
return o;
|
|
112
|
-
}
|
|
113
|
-
function N(o) {
|
|
114
|
-
return (function(t) {
|
|
115
|
-
if (Array.isArray(t)) return U(t);
|
|
116
|
-
})(o) || (function(t) {
|
|
117
|
-
if (typeof Symbol < "u" && t[Symbol.iterator] != null || t["@@iterator"] != null) return Array.from(t);
|
|
118
|
-
})(o) || (function(t, a) {
|
|
119
|
-
if (t) {
|
|
120
|
-
if (typeof t == "string") return U(t, a);
|
|
121
|
-
var r = {}.toString.call(t).slice(8, -1);
|
|
122
|
-
return r === "Object" && t.constructor && (r = t.constructor.name), r === "Map" || r === "Set" ? Array.from(t) : r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? U(t, a) : void 0;
|
|
123
|
-
}
|
|
124
|
-
})(o) || (function() {
|
|
125
|
-
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
126
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
127
|
-
})();
|
|
128
|
-
}
|
|
129
|
-
function U(o, t) {
|
|
130
|
-
(t == null || t > o.length) && (t = o.length);
|
|
131
|
-
for (var a = 0, r = Array(t); a < t; a++) r[a] = o[a];
|
|
132
|
-
return r;
|
|
133
|
-
}
|
|
134
|
-
function re(o, t) {
|
|
135
|
-
for (var a = 0; a < t.length; a++) {
|
|
136
|
-
var r = t[a];
|
|
137
|
-
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(o, $(r.key), r);
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
function u(o, t, a) {
|
|
141
|
-
return (t = $(t)) in o ? Object.defineProperty(o, t, { value: a, enumerable: !0, configurable: !0, writable: !0 }) : o[t] = a, o;
|
|
142
|
-
}
|
|
143
|
-
function $(o) {
|
|
144
|
-
var t = (function(a) {
|
|
145
|
-
if (L(a) != "object" || !a) return a;
|
|
146
|
-
var r = a[Symbol.toPrimitive];
|
|
147
|
-
if (r !== void 0) {
|
|
148
|
-
var A = r.call(a, "string");
|
|
149
|
-
if (L(A) != "object") return A;
|
|
150
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
151
|
-
}
|
|
152
|
-
return String(a);
|
|
153
|
-
})(o);
|
|
154
|
-
return L(t) == "symbol" ? t : t + "";
|
|
155
|
-
}
|
|
156
|
-
const oe = (function() {
|
|
157
|
-
function o(r, A) {
|
|
158
|
-
var e = this;
|
|
159
|
-
if ((function(n, i) {
|
|
160
|
-
if (!(n instanceof i)) throw new TypeError("Cannot call a class as a function");
|
|
161
|
-
})(this, o), u(this, "state", { cursorAnimation: null, lastFrameTime: null, pauseUntil: null, eventQueue: [], eventLoop: null, eventLoopPaused: !1, reverseCalledEvents: [], calledEvents: [], visibleNodes: [], initialOptions: null, elements: { container: null, wrapper: document.createElement("span"), cursor: document.createElement("span") } }), u(this, "options", { strings: null, cursor: "|", delay: "natural", pauseFor: 1500, deleteSpeed: "natural", loop: !1, autoStart: !1, devMode: !1, skipAddStyles: !1, wrapperClassName: "Typewriter__wrapper", cursorClassName: "Typewriter__cursor", stringSplitter: null, onCreateTextNode: null, onRemoveNode: null }), u(this, "setupWrapperElement", (function() {
|
|
162
|
-
e.state.elements.container && (e.state.elements.wrapper.className = e.options.wrapperClassName, e.state.elements.cursor.className = e.options.cursorClassName, e.state.elements.cursor.innerHTML = e.options.cursor, e.state.elements.container.innerHTML = "", e.state.elements.container.appendChild(e.state.elements.wrapper), e.state.elements.container.appendChild(e.state.elements.cursor));
|
|
163
|
-
})), u(this, "start", (function() {
|
|
164
|
-
return e.state.eventLoopPaused = !1, e.runEventLoop(), e;
|
|
165
|
-
})), u(this, "pause", (function() {
|
|
166
|
-
return e.state.eventLoopPaused = !0, e;
|
|
167
|
-
})), u(this, "stop", (function() {
|
|
168
|
-
return e.state.eventLoop && ((0, s.cancel)(e.state.eventLoop), e.state.eventLoop = null), e;
|
|
169
|
-
})), u(this, "pauseFor", (function(n) {
|
|
170
|
-
return e.addEventToQueue(_, { ms: n }), e;
|
|
171
|
-
})), u(this, "typeOutAllStrings", (function() {
|
|
172
|
-
return typeof e.options.strings == "string" ? (e.typeString(e.options.strings).pauseFor(e.options.pauseFor), e) : (e.options.strings.forEach((function(n) {
|
|
173
|
-
e.typeString(n).pauseFor(e.options.pauseFor).deleteAll(e.options.deleteSpeed);
|
|
174
|
-
})), e);
|
|
175
|
-
})), u(this, "typeString", (function(n) {
|
|
176
|
-
var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null;
|
|
177
|
-
if (p(n)) return e.typeOutHTMLString(n, i);
|
|
178
|
-
if (n) {
|
|
179
|
-
var f = (e.options || {}).stringSplitter, v = typeof f == "function" ? f(n) : n.split("");
|
|
180
|
-
e.typeCharacters(v, i);
|
|
181
|
-
}
|
|
182
|
-
return e;
|
|
183
|
-
})), u(this, "pasteString", (function(n) {
|
|
184
|
-
var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null;
|
|
185
|
-
return p(n) ? e.typeOutHTMLString(n, i, !0) : (n && e.addEventToQueue(y, { character: n, node: i }), e);
|
|
186
|
-
})), u(this, "typeOutHTMLString", (function(n) {
|
|
187
|
-
var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null, f = arguments.length > 2 ? arguments[2] : void 0, v = (function(k) {
|
|
188
|
-
var j = document.createElement("div");
|
|
189
|
-
return j.innerHTML = k, j.childNodes;
|
|
190
|
-
})(n);
|
|
191
|
-
if (v.length > 0) for (var l = 0; l < v.length; l++) {
|
|
192
|
-
var E = v[l], P = E.innerHTML;
|
|
193
|
-
E && E.nodeType !== 3 ? (E.innerHTML = "", e.addEventToQueue(D, { node: E, parentNode: i }), f ? e.pasteString(P, E) : e.typeString(P, E)) : E.textContent && (f ? e.pasteString(E.textContent, i) : e.typeString(E.textContent, i));
|
|
194
|
-
}
|
|
195
|
-
return e;
|
|
196
|
-
})), u(this, "deleteAll", (function() {
|
|
197
|
-
var n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "natural";
|
|
198
|
-
return e.addEventToQueue(h, { speed: n }), e;
|
|
199
|
-
})), u(this, "changeDeleteSpeed", (function(n) {
|
|
200
|
-
if (!n) throw new Error("Must provide new delete speed");
|
|
201
|
-
return e.addEventToQueue(x, { speed: n }), e;
|
|
202
|
-
})), u(this, "changeDelay", (function(n) {
|
|
203
|
-
if (!n) throw new Error("Must provide new delay");
|
|
204
|
-
return e.addEventToQueue(b, { delay: n }), e;
|
|
205
|
-
})), u(this, "changeCursor", (function(n) {
|
|
206
|
-
if (!n) throw new Error("Must provide new cursor");
|
|
207
|
-
return e.addEventToQueue(R, { cursor: n }), e;
|
|
208
|
-
})), u(this, "deleteChars", (function(n) {
|
|
209
|
-
if (!n) throw new Error("Must provide amount of characters to delete");
|
|
210
|
-
for (var i = 0; i < n; i++) e.addEventToQueue(g);
|
|
211
|
-
return e;
|
|
212
|
-
})), u(this, "callFunction", (function(n, i) {
|
|
213
|
-
if (!n || typeof n != "function") throw new Error("Callback must be a function");
|
|
214
|
-
return e.addEventToQueue(O, { cb: n, thisArg: i }), e;
|
|
215
|
-
})), u(this, "typeCharacters", (function(n) {
|
|
216
|
-
var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null;
|
|
217
|
-
if (!n || !Array.isArray(n)) throw new Error("Characters must be an array");
|
|
218
|
-
return n.forEach((function(f) {
|
|
219
|
-
e.addEventToQueue(m, { character: f, node: i });
|
|
220
|
-
})), e;
|
|
221
|
-
})), u(this, "removeCharacters", (function(n) {
|
|
222
|
-
if (!n || !Array.isArray(n)) throw new Error("Characters must be an array");
|
|
223
|
-
return n.forEach((function() {
|
|
224
|
-
e.addEventToQueue(g);
|
|
225
|
-
})), e;
|
|
226
|
-
})), u(this, "addEventToQueue", (function(n, i) {
|
|
227
|
-
var f = arguments.length > 2 && arguments[2] !== void 0 && arguments[2];
|
|
228
|
-
return e.addEventToStateProperty(n, i, f, "eventQueue");
|
|
229
|
-
})), u(this, "addReverseCalledEvent", (function(n, i) {
|
|
230
|
-
var f = arguments.length > 2 && arguments[2] !== void 0 && arguments[2];
|
|
231
|
-
return e.options.loop ? e.addEventToStateProperty(n, i, f, "reverseCalledEvents") : e;
|
|
232
|
-
})), u(this, "addEventToStateProperty", (function(n, i) {
|
|
233
|
-
var f = arguments.length > 2 && arguments[2] !== void 0 && arguments[2], v = arguments.length > 3 ? arguments[3] : void 0, l = { eventName: n, eventArgs: i || {} };
|
|
234
|
-
return e.state[v] = f ? [l].concat(N(e.state[v])) : [].concat(N(e.state[v]), [l]), e;
|
|
235
|
-
})), u(this, "runEventLoop", (function() {
|
|
236
|
-
e.state.lastFrameTime || (e.state.lastFrameTime = Date.now());
|
|
237
|
-
var n = Date.now(), i = n - e.state.lastFrameTime;
|
|
238
|
-
if (!e.state.eventQueue.length) {
|
|
239
|
-
if (!e.options.loop) return;
|
|
240
|
-
e.state.eventQueue = N(e.state.calledEvents), e.state.calledEvents = [], e.options = C({}, e.state.initialOptions);
|
|
241
|
-
}
|
|
242
|
-
if (e.state.eventLoop = c()(e.runEventLoop), !e.state.eventLoopPaused) {
|
|
243
|
-
if (e.state.pauseUntil) {
|
|
244
|
-
if (n < e.state.pauseUntil) return;
|
|
245
|
-
e.state.pauseUntil = null;
|
|
246
|
-
}
|
|
247
|
-
var f, v = N(e.state.eventQueue), l = v.shift();
|
|
248
|
-
if (!(i <= (f = l.eventName === d || l.eventName === g ? e.options.deleteSpeed === "natural" ? S(40, 80) : e.options.deleteSpeed : e.options.delay === "natural" ? S(120, 160) : e.options.delay))) {
|
|
249
|
-
var E = l.eventName, P = l.eventArgs;
|
|
250
|
-
switch (e.logInDevMode({ currentEvent: l, state: e.state, delay: f }), E) {
|
|
251
|
-
case y:
|
|
252
|
-
case m:
|
|
253
|
-
var k = P.character, j = P.node, X = document.createTextNode(k), F = X;
|
|
254
|
-
e.options.onCreateTextNode && typeof e.options.onCreateTextNode == "function" && (F = e.options.onCreateTextNode(k, X)), F && (j ? j.appendChild(F) : e.state.elements.wrapper.appendChild(F)), e.state.visibleNodes = [].concat(N(e.state.visibleNodes), [{ type: "TEXT_NODE", character: k, node: F }]);
|
|
255
|
-
break;
|
|
256
|
-
case g:
|
|
257
|
-
v.unshift({ eventName: d, eventArgs: { removingCharacterNode: !0 } });
|
|
258
|
-
break;
|
|
259
|
-
case _:
|
|
260
|
-
var ae = l.eventArgs.ms;
|
|
261
|
-
e.state.pauseUntil = Date.now() + parseInt(ae);
|
|
262
|
-
break;
|
|
263
|
-
case O:
|
|
264
|
-
var K = l.eventArgs, se = K.cb, ie = K.thisArg;
|
|
265
|
-
se.call(ie, { elements: e.state.elements });
|
|
266
|
-
break;
|
|
267
|
-
case D:
|
|
268
|
-
var Z = l.eventArgs, Y = Z.node, V = Z.parentNode;
|
|
269
|
-
V ? V.appendChild(Y) : e.state.elements.wrapper.appendChild(Y), e.state.visibleNodes = [].concat(N(e.state.visibleNodes), [{ type: T, node: Y, parentNode: V || e.state.elements.wrapper }]);
|
|
270
|
-
break;
|
|
271
|
-
case h:
|
|
272
|
-
var ue = e.state.visibleNodes, W = P.speed, H = [];
|
|
273
|
-
W && H.push({ eventName: x, eventArgs: { speed: W, temp: !0 } });
|
|
274
|
-
for (var ee = 0, le = ue.length; ee < le; ee++) H.push({ eventName: d, eventArgs: { removingCharacterNode: !1 } });
|
|
275
|
-
W && H.push({ eventName: x, eventArgs: { speed: e.options.deleteSpeed, temp: !0 } }), v.unshift.apply(v, H);
|
|
276
|
-
break;
|
|
277
|
-
case d:
|
|
278
|
-
var ce = l.eventArgs.removingCharacterNode;
|
|
279
|
-
if (e.state.visibleNodes.length) {
|
|
280
|
-
var G = e.state.visibleNodes.pop(), pe = G.type, I = G.node, de = G.character;
|
|
281
|
-
e.options.onRemoveNode && typeof e.options.onRemoveNode == "function" && e.options.onRemoveNode({ node: I, character: de }), I && I.parentNode.removeChild(I), pe === T && ce && v.unshift({ eventName: d, eventArgs: {} });
|
|
282
|
-
}
|
|
283
|
-
break;
|
|
284
|
-
case x:
|
|
285
|
-
e.options.deleteSpeed = l.eventArgs.speed;
|
|
286
|
-
break;
|
|
287
|
-
case b:
|
|
288
|
-
e.options.delay = l.eventArgs.delay;
|
|
289
|
-
break;
|
|
290
|
-
case R:
|
|
291
|
-
e.options.cursor = l.eventArgs.cursor, e.state.elements.cursor.innerHTML = l.eventArgs.cursor;
|
|
292
|
-
}
|
|
293
|
-
e.options.loop && (l.eventName === d || l.eventArgs && l.eventArgs.temp || (e.state.calledEvents = [].concat(N(e.state.calledEvents), [l]))), e.state.eventQueue = v, e.state.lastFrameTime = n;
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
})), r) if (typeof r == "string") {
|
|
297
|
-
var B = document.querySelector(r);
|
|
298
|
-
if (!B) throw new Error("Could not find container element");
|
|
299
|
-
this.state.elements.container = B;
|
|
300
|
-
} else this.state.elements.container = r;
|
|
301
|
-
A && (this.options = C(C({}, this.options), A)), this.state.initialOptions = C({}, this.options), this.init();
|
|
302
|
-
}
|
|
303
|
-
var t, a;
|
|
304
|
-
return t = o, (a = [{ key: "init", value: function() {
|
|
305
|
-
var r, A;
|
|
306
|
-
this.setupWrapperElement(), this.addEventToQueue(R, { cursor: this.options.cursor }, !0), this.addEventToQueue(h, null, !0), !window || window.___TYPEWRITER_JS_STYLES_ADDED___ || this.options.skipAddStyles || (r = ".Typewriter__cursor{-webkit-animation:Typewriter-cursor 1s infinite;animation:Typewriter-cursor 1s infinite;margin-left:1px}@-webkit-keyframes Typewriter-cursor{0%{opacity:0}50%{opacity:1}100%{opacity:0}}@keyframes Typewriter-cursor{0%{opacity:0}50%{opacity:1}100%{opacity:0}}", (A = document.createElement("style")).appendChild(document.createTextNode(r)), document.head.appendChild(A), window.___TYPEWRITER_JS_STYLES_ADDED___ = !0), this.options.autoStart === !0 && this.options.strings && this.typeOutAllStrings().start();
|
|
307
|
-
} }, { key: "logInDevMode", value: function(r) {
|
|
308
|
-
this.options.devMode && console.log(r);
|
|
309
|
-
} }]) && re(t.prototype, a), Object.defineProperty(t, "prototype", { writable: !1 }), o;
|
|
310
|
-
})();
|
|
311
|
-
})(), J.default;
|
|
312
|
-
})()));
|
|
313
|
-
})(q), q.exports);
|
|
1
|
+
import { inject as c, provide as s } from "vue";
|
|
2
|
+
function x(t, r) {
|
|
3
|
+
const e = typeof t == "string" && !r ? `${t}Context` : r, i = Symbol(e);
|
|
4
|
+
return [(n) => {
|
|
5
|
+
const o = c(i, n);
|
|
6
|
+
if (o || o === null) return o;
|
|
7
|
+
throw new Error(`Injection \`${i.toString()}\` not found. Component must be used within ${Array.isArray(t) ? `one of the following components: ${t.join(", ")}` : `\`${t}\``}`);
|
|
8
|
+
}, (n) => (s(i, n), n)];
|
|
314
9
|
}
|
|
315
10
|
export {
|
|
316
|
-
|
|
11
|
+
x as createContext
|
|
317
12
|
};
|
package/dist/index97.js
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
function t() {
|
|
2
|
+
let e = document.activeElement;
|
|
3
|
+
if (e == null) return null;
|
|
4
|
+
for (; e != null && e.shadowRoot != null && e.shadowRoot.activeElement != null; ) e = e.shadowRoot.activeElement;
|
|
5
|
+
return e;
|
|
6
|
+
}
|
|
2
7
|
export {
|
|
3
|
-
|
|
8
|
+
t as getActiveElement
|
|
4
9
|
};
|
package/dist/index98.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { Fragment as e } from "vue";
|
|
2
|
+
function n(t) {
|
|
3
|
+
return t ? t.flatMap((r) => r.type === e ? n(r.children) : [r]) : [];
|
|
3
4
|
}
|
|
4
5
|
export {
|
|
5
|
-
|
|
6
|
+
n as renderSlotFragments
|
|
6
7
|
};
|
package/dist/index99.js
ADDED