@vobs/ui 1.2.1 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/activity-rail.cjs +65 -629
- package/dist/activity-rail.cjs.map +1 -1
- package/dist/activity-rail.js +44 -612
- package/dist/activity-rail.js.map +1 -1
- package/dist/alert.cjs +58 -536
- package/dist/alert.cjs.map +1 -1
- package/dist/alert.js +33 -519
- package/dist/alert.js.map +1 -1
- package/dist/avatar.cjs +45 -519
- package/dist/avatar.cjs.map +1 -1
- package/dist/avatar.js +26 -508
- package/dist/avatar.js.map +1 -1
- package/dist/button.cjs +46 -559
- package/dist/button.cjs.map +1 -1
- package/dist/button.js +21 -545
- package/dist/button.js.map +1 -1
- package/dist/card.cjs +55 -532
- package/dist/card.cjs.map +1 -1
- package/dist/card.js +30 -515
- package/dist/card.js.map +1 -1
- package/dist/chat-composer.cjs +84 -602
- package/dist/chat-composer.cjs.map +1 -1
- package/dist/chat-composer.js +52 -576
- package/dist/chat-composer.js.map +1 -1
- package/dist/dialog.cjs +88 -591
- package/dist/dialog.cjs.map +1 -1
- package/dist/dialog.js +63 -569
- package/dist/dialog.js.map +1 -1
- package/dist/drawer.cjs +91 -594
- package/dist/drawer.cjs.map +1 -1
- package/dist/drawer.js +65 -571
- package/dist/drawer.js.map +1 -1
- package/dist/editor-tabs.cjs +75 -635
- package/dist/editor-tabs.cjs.map +1 -1
- package/dist/editor-tabs.js +51 -616
- package/dist/editor-tabs.js.map +1 -1
- package/dist/file-tree.cjs +70 -634
- package/dist/file-tree.cjs.map +1 -1
- package/dist/file-tree.js +49 -617
- package/dist/file-tree.js.map +1 -1
- package/dist/forms.cjs +80 -589
- package/dist/forms.cjs.map +1 -1
- package/dist/forms.js +41 -559
- package/dist/forms.js.map +1 -1
- package/dist/icon.cjs +44 -624
- package/dist/icon.cjs.map +1 -1
- package/dist/icon.js +25 -615
- package/dist/icon.js.map +1 -1
- package/dist/icons.cjs +2 -3
- package/dist/icons.cjs.map +1 -1
- package/dist/icons.js +0 -1
- package/dist/icons.js.map +1 -1
- package/dist/index.cjs +735 -1586
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +811 -1517
- package/dist/index.js.map +1 -1
- package/dist/kbd.cjs +53 -525
- package/dist/kbd.cjs.map +1 -1
- package/dist/kbd.js +30 -509
- package/dist/kbd.js.map +1 -1
- package/dist/menu.cjs +68 -582
- package/dist/menu.cjs.map +1 -1
- package/dist/menu.js +47 -565
- package/dist/menu.js.map +1 -1
- package/dist/nav-list.cjs +71 -635
- package/dist/nav-list.cjs.map +1 -1
- package/dist/nav-list.js +50 -618
- package/dist/nav-list.js.map +1 -1
- package/dist/overlay.cjs +43 -197
- package/dist/overlay.cjs.map +1 -1
- package/dist/overlay.js +20 -192
- package/dist/overlay.js.map +1 -1
- package/dist/page-header.cjs +68 -585
- package/dist/page-header.cjs.map +1 -1
- package/dist/page-header.js +42 -565
- package/dist/page-header.js.map +1 -1
- package/dist/pagination.cjs +70 -585
- package/dist/pagination.cjs.map +1 -1
- package/dist/pagination.js +53 -572
- package/dist/pagination.js.map +1 -1
- package/dist/stat-card.cjs +62 -538
- package/dist/stat-card.cjs.map +1 -1
- package/dist/stat-card.js +36 -519
- package/dist/stat-card.js.map +1 -1
- package/dist/status-bar.cjs +65 -576
- package/dist/status-bar.cjs.map +1 -1
- package/dist/status-bar.js +43 -560
- package/dist/status-bar.js.map +1 -1
- package/dist/table.cjs +87 -605
- package/dist/table.cjs.map +1 -1
- package/dist/table.js +57 -579
- package/dist/table.js.map +1 -1
- package/dist/tabs.cjs +62 -626
- package/dist/tabs.cjs.map +1 -1
- package/dist/tabs.js +45 -613
- package/dist/tabs.js.map +1 -1
- package/dist/tag.cjs +40 -514
- package/dist/tag.cjs.map +1 -1
- package/dist/tag.js +18 -503
- package/dist/tag.js.map +1 -1
- package/dist/toast.cjs +95 -1001
- package/dist/toast.cjs.map +1 -1
- package/dist/toast.js +74 -980
- package/dist/toast.js.map +1 -1
- package/dist/types.cjs +18 -2
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +5 -1
- package/dist/types.d.ts +5 -1
- package/dist/types.js +0 -2
- package/dist/types.js.map +1 -1
- package/dist/utils.cjs +77 -580
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.js +29 -545
- package/dist/utils.js.map +1 -1
- package/dist/workbench-titlebar.cjs +83 -598
- package/dist/workbench-titlebar.cjs.map +1 -1
- package/dist/workbench-titlebar.js +55 -575
- package/dist/workbench-titlebar.js.map +1 -1
- package/package.json +5 -5
- package/src/types.ts +7 -0
package/dist/toast.cjs
CHANGED
|
@@ -1,978 +1,56 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
var __VOBS_CJS_FILE_URL = require("url").pathToFileURL(__filename).href;
|
|
2
|
+
"use strict";
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
7
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
var signalNames = /* @__PURE__ */ new WeakMap();
|
|
9
|
-
function hasDebugHooks() {
|
|
10
|
-
return activeDebugHooks !== null;
|
|
11
|
-
}
|
|
12
|
-
__name(hasDebugHooks, "hasDebugHooks");
|
|
13
|
-
function setSignalDebugName(signal, name) {
|
|
14
|
-
signalNames.set(signal, name);
|
|
15
|
-
invokeDebug("signalNamed", signal, name);
|
|
16
|
-
}
|
|
17
|
-
__name(setSignalDebugName, "setSignalDebugName");
|
|
18
|
-
function invokeDebug(name, ...args) {
|
|
19
|
-
return;
|
|
20
|
-
}
|
|
21
|
-
__name(invokeDebug, "invokeDebug");
|
|
22
|
-
|
|
23
|
-
// packages/reactivity/src/owner.ts
|
|
24
|
-
var currentOwner = null;
|
|
25
|
-
var nextOwnerId = 1;
|
|
26
|
-
var ownerNames = /* @__PURE__ */ new WeakMap();
|
|
27
|
-
function createOwner() {
|
|
28
|
-
const parent = currentOwner;
|
|
29
|
-
let disposed = parent?.disposed ?? false;
|
|
30
|
-
const children = [];
|
|
31
|
-
const cleanups = [];
|
|
32
|
-
const errorHandlers = /* @__PURE__ */ new Set();
|
|
33
|
-
const owner = {
|
|
34
|
-
id: `owner-${nextOwnerId++}`,
|
|
35
|
-
parent,
|
|
36
|
-
children,
|
|
37
|
-
depth: (parent?.depth ?? -1) + 1,
|
|
38
|
-
get disposed() {
|
|
39
|
-
return disposed;
|
|
40
|
-
},
|
|
41
|
-
run(fn) {
|
|
42
|
-
if (disposed) throw new Error("Vobs: \u5DF2\u9500\u6BC1\u7684 Owner \u4E0D\u80FD\u7EE7\u7EED\u8FD0\u884C");
|
|
43
|
-
const previous = currentOwner;
|
|
44
|
-
currentOwner = owner;
|
|
45
|
-
try {
|
|
46
|
-
return fn();
|
|
47
|
-
} finally {
|
|
48
|
-
currentOwner = previous;
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
addCleanup(cleanup) {
|
|
52
|
-
if (disposed) {
|
|
53
|
-
cleanup();
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
cleanups.push(cleanup);
|
|
57
|
-
},
|
|
58
|
-
onDispose(cleanup) {
|
|
59
|
-
owner.addCleanup(cleanup);
|
|
60
|
-
},
|
|
61
|
-
onError(handler) {
|
|
62
|
-
errorHandlers.add(handler);
|
|
63
|
-
const remove = /* @__PURE__ */ __name(() => errorHandlers.delete(handler), "remove");
|
|
64
|
-
owner.addCleanup(remove);
|
|
65
|
-
return remove;
|
|
66
|
-
},
|
|
67
|
-
handleError(error) {
|
|
68
|
-
for (const handler of [...errorHandlers].reverse()) {
|
|
69
|
-
try {
|
|
70
|
-
handler(error);
|
|
71
|
-
return true;
|
|
72
|
-
} catch (handlerError) {
|
|
73
|
-
return parent?.handleError(handlerError) ?? false;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
return parent?.handleError(error) ?? false;
|
|
77
|
-
},
|
|
78
|
-
dispose() {
|
|
79
|
-
if (disposed) return;
|
|
80
|
-
disposed = true;
|
|
81
|
-
for (const child of [...children]) child.dispose();
|
|
82
|
-
children.length = 0;
|
|
83
|
-
let firstError;
|
|
84
|
-
for (let index = cleanups.length - 1; index >= 0; index--) {
|
|
85
|
-
try {
|
|
86
|
-
cleanups[index]();
|
|
87
|
-
} catch (error) {
|
|
88
|
-
firstError ?? (firstError = error);
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
cleanups.length = 0;
|
|
92
|
-
if (parent) {
|
|
93
|
-
const index = parent.children.indexOf(owner);
|
|
94
|
-
if (index >= 0) parent.children.splice(index, 1);
|
|
95
|
-
}
|
|
96
|
-
if (firstError) throw firstError;
|
|
97
|
-
}
|
|
98
|
-
};
|
|
99
|
-
if (parent && !parent.disposed) parent.children.push(owner);
|
|
100
|
-
return owner;
|
|
101
|
-
}
|
|
102
|
-
__name(createOwner, "createOwner");
|
|
103
|
-
function setOwnerDebugName(owner, name) {
|
|
104
|
-
ownerNames.set(owner, name);
|
|
105
|
-
}
|
|
106
|
-
__name(setOwnerDebugName, "setOwnerDebugName");
|
|
107
|
-
function getCurrentOwner() {
|
|
108
|
-
return currentOwner;
|
|
109
|
-
}
|
|
110
|
-
__name(getCurrentOwner, "getCurrentOwner");
|
|
111
|
-
|
|
112
|
-
// packages/reactivity/src/signal.ts
|
|
113
|
-
var currentSubscriber = null;
|
|
114
|
-
function getCurrentSubscriber() {
|
|
115
|
-
return currentSubscriber;
|
|
116
|
-
}
|
|
117
|
-
__name(getCurrentSubscriber, "getCurrentSubscriber");
|
|
118
|
-
function setCurrentSubscriber(subscriber) {
|
|
119
|
-
currentSubscriber = subscriber;
|
|
120
|
-
}
|
|
121
|
-
__name(setCurrentSubscriber, "setCurrentSubscriber");
|
|
122
|
-
function trackDependency(dependency) {
|
|
123
|
-
if (!currentSubscriber || currentSubscriber.disposed) return;
|
|
124
|
-
!currentSubscriber.dependencies.has(dependency);
|
|
125
|
-
currentSubscriber.dependencies.add(dependency);
|
|
126
|
-
}
|
|
127
|
-
__name(trackDependency, "trackDependency");
|
|
128
|
-
function state(initialValue, debugName) {
|
|
129
|
-
let value = initialValue;
|
|
130
|
-
let disposed = false;
|
|
131
|
-
const subscribers = /* @__PURE__ */ new Set();
|
|
132
|
-
const signalInstance = {
|
|
133
|
-
get value() {
|
|
134
|
-
const subscriber = getCurrentSubscriber();
|
|
135
|
-
if (subscriber && !subscriber.disposed) {
|
|
136
|
-
subscribers.add(subscriber);
|
|
137
|
-
trackDependency(signalInstance);
|
|
138
|
-
}
|
|
139
|
-
return value;
|
|
140
|
-
},
|
|
141
|
-
set value(nextValue) {
|
|
142
|
-
if (disposed || Object.is(value, nextValue)) return;
|
|
143
|
-
value = nextValue;
|
|
144
|
-
for (const subscriber of [...subscribers]) subscriber.notify();
|
|
145
|
-
},
|
|
146
|
-
unsubscribe(subscriber) {
|
|
147
|
-
subscribers.delete(subscriber);
|
|
148
|
-
},
|
|
149
|
-
// 与 `.value =` 赋值同一条路径:判等短路、debug hook、notify 全部一致。
|
|
150
|
-
// 以闭包实现,可安全地作为回调直接传递(无 this 绑定问题)。
|
|
151
|
-
set(next) {
|
|
152
|
-
signalInstance.value = next;
|
|
153
|
-
},
|
|
154
|
-
dispose() {
|
|
155
|
-
if (disposed) return;
|
|
156
|
-
disposed = true;
|
|
157
|
-
subscribers.clear();
|
|
158
|
-
}
|
|
159
|
-
};
|
|
160
|
-
const owner = getCurrentOwner();
|
|
161
|
-
owner?.addCleanup(signalInstance.dispose);
|
|
162
|
-
if (debugName?.trim()) setSignalDebugName(signalInstance, debugName.trim());
|
|
163
|
-
return signalInstance;
|
|
164
|
-
}
|
|
165
|
-
__name(state, "state");
|
|
166
|
-
|
|
167
|
-
// packages/reactivity/src/scheduler.ts
|
|
168
|
-
var _Scheduler = class _Scheduler {
|
|
169
|
-
constructor() {
|
|
170
|
-
this.dirtyEffects = /* @__PURE__ */ new Set();
|
|
171
|
-
this.lowPriorityEffects = /* @__PURE__ */ new Set();
|
|
172
|
-
// flush 不可重入(flushing 标志保证),缓冲数组可在轮次间安全复用,避免每轮分配。
|
|
173
|
-
this.normalBuffer = [];
|
|
174
|
-
this.lowBuffer = [];
|
|
175
|
-
this.flushing = false;
|
|
176
|
-
this.scheduled = false;
|
|
177
|
-
this.batchDepth = 0;
|
|
178
|
-
}
|
|
179
|
-
schedule(effect2) {
|
|
180
|
-
if (effect2.disposed) return;
|
|
181
|
-
this.dirtyEffects.add(effect2);
|
|
182
|
-
this.lowPriorityEffects.delete(effect2);
|
|
183
|
-
this.ensureScheduled();
|
|
184
|
-
}
|
|
185
|
-
/** Queue an effect behind normal updates while preserving deterministic order. */
|
|
186
|
-
scheduleLow(effect2) {
|
|
187
|
-
if (effect2.disposed) return;
|
|
188
|
-
if (!this.dirtyEffects.has(effect2)) this.lowPriorityEffects.add(effect2);
|
|
189
|
-
this.ensureScheduled();
|
|
190
|
-
}
|
|
191
|
-
ensureScheduled() {
|
|
192
|
-
if (this.batchDepth === 0 && !this.flushing && !this.scheduled) {
|
|
193
|
-
this.scheduled = true;
|
|
194
|
-
queueMicrotask(() => {
|
|
195
|
-
this.scheduled = false;
|
|
196
|
-
this.flush();
|
|
197
|
-
});
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
remove(effect2) {
|
|
201
|
-
this.dirtyEffects.delete(effect2);
|
|
202
|
-
this.lowPriorityEffects.delete(effect2);
|
|
203
|
-
}
|
|
204
|
-
batch(fn) {
|
|
205
|
-
this.batchDepth++;
|
|
206
|
-
try {
|
|
207
|
-
return fn();
|
|
208
|
-
} finally {
|
|
209
|
-
this.batchDepth--;
|
|
210
|
-
if (this.batchDepth === 0) this.flush();
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
flush() {
|
|
214
|
-
if (this.flushing || this.batchDepth > 0) return;
|
|
215
|
-
this.flushing = true;
|
|
216
|
-
let rounds = 0;
|
|
217
|
-
let firstError;
|
|
218
|
-
let hasError = false;
|
|
219
|
-
try {
|
|
220
|
-
while (this.dirtyEffects.size > 0 || this.lowPriorityEffects.size > 0) {
|
|
221
|
-
if (++rounds > 100) {
|
|
222
|
-
this.dirtyEffects.clear();
|
|
223
|
-
this.lowPriorityEffects.clear();
|
|
224
|
-
throw new Error("Vobs: \u54CD\u5E94\u5F0F\u66F4\u65B0\u8D85\u8FC7 100 \u8F6E\uFF0C\u53EF\u80FD\u5B58\u5728\u5FAA\u73AF\u4F9D\u8D56");
|
|
225
|
-
}
|
|
226
|
-
this.collectRunnable(this.dirtyEffects, this.normalBuffer);
|
|
227
|
-
this.collectRunnable(this.lowPriorityEffects, this.lowBuffer);
|
|
228
|
-
sortEffects(this.normalBuffer);
|
|
229
|
-
sortEffects(this.lowBuffer);
|
|
230
|
-
for (const effect2 of this.normalBuffer) {
|
|
231
|
-
try {
|
|
232
|
-
effect2.run();
|
|
233
|
-
} catch (error) {
|
|
234
|
-
if (!hasError) {
|
|
235
|
-
firstError = error;
|
|
236
|
-
hasError = true;
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
for (const effect2 of this.lowBuffer) {
|
|
241
|
-
try {
|
|
242
|
-
effect2.run();
|
|
243
|
-
} catch (error) {
|
|
244
|
-
if (!hasError) {
|
|
245
|
-
firstError = error;
|
|
246
|
-
hasError = true;
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
this.normalBuffer.length = 0;
|
|
251
|
-
this.lowBuffer.length = 0;
|
|
252
|
-
}
|
|
253
|
-
} finally {
|
|
254
|
-
this.normalBuffer.length = 0;
|
|
255
|
-
this.lowBuffer.length = 0;
|
|
256
|
-
this.flushing = false;
|
|
257
|
-
}
|
|
258
|
-
if (hasError) throw firstError;
|
|
259
|
-
}
|
|
260
|
-
/** 收集未 disposed 的 effect 并清空源集合;run() 期间新调度的 effect 留给下一轮。 */
|
|
261
|
-
collectRunnable(source, target) {
|
|
262
|
-
for (const effect2 of source) {
|
|
263
|
-
if (!effect2.disposed) target.push(effect2);
|
|
264
|
-
}
|
|
265
|
-
source.clear();
|
|
266
|
-
}
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
267
11
|
};
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
__name(sortEffects, "sortEffects");
|
|
276
|
-
var scheduler = new Scheduler();
|
|
277
|
-
|
|
278
|
-
// packages/reactivity/src/effect.ts
|
|
279
|
-
var nextEffectOrder = 1;
|
|
280
|
-
function cleanupDependencies(subscriber) {
|
|
281
|
-
for (const dependency of subscriber.dependencies) {
|
|
282
|
-
dependency.unsubscribe(subscriber);
|
|
283
|
-
}
|
|
284
|
-
subscriber.dependencies.clear();
|
|
285
|
-
}
|
|
286
|
-
__name(cleanupDependencies, "cleanupDependencies");
|
|
287
|
-
function effect(callback) {
|
|
288
|
-
const owner = getCurrentOwner();
|
|
289
|
-
let cleanup;
|
|
290
|
-
let dirty = true;
|
|
291
|
-
let disposed = false;
|
|
292
|
-
const eff = {
|
|
293
|
-
order: nextEffectOrder++,
|
|
294
|
-
depth: owner?.depth ?? 0,
|
|
295
|
-
dependencies: /* @__PURE__ */ new Set(),
|
|
296
|
-
get disposed() {
|
|
297
|
-
return disposed;
|
|
298
|
-
},
|
|
299
|
-
notify() {
|
|
300
|
-
if (disposed || dirty) return;
|
|
301
|
-
dirty = true;
|
|
302
|
-
scheduler.schedule(eff);
|
|
303
|
-
},
|
|
304
|
-
run() {
|
|
305
|
-
if (disposed || !dirty) return;
|
|
306
|
-
dirty = false;
|
|
307
|
-
const previousCleanup = cleanup;
|
|
308
|
-
cleanup = void 0;
|
|
309
|
-
let cleanupError;
|
|
310
|
-
if (previousCleanup) {
|
|
311
|
-
try {
|
|
312
|
-
previousCleanup();
|
|
313
|
-
} catch (error) {
|
|
314
|
-
const handled2 = owner?.handleError(error) ?? false;
|
|
315
|
-
if (!handled2) cleanupError = error;
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
cleanupDependencies(eff);
|
|
319
|
-
const previous = getCurrentSubscriber();
|
|
320
|
-
setCurrentSubscriber(eff);
|
|
321
|
-
let thrown;
|
|
322
|
-
let handled = false;
|
|
323
|
-
try {
|
|
324
|
-
const result = owner ? owner.run(callback) : callback();
|
|
325
|
-
cleanup = typeof result === "function" ? result : void 0;
|
|
326
|
-
} catch (error) {
|
|
327
|
-
thrown = error;
|
|
328
|
-
handled = owner?.handleError(error) ?? false;
|
|
329
|
-
if (!handled) throw error;
|
|
330
|
-
} finally {
|
|
331
|
-
setCurrentSubscriber(previous);
|
|
332
|
-
}
|
|
333
|
-
if (cleanupError && !thrown) throw cleanupError;
|
|
334
|
-
},
|
|
335
|
-
scheduleLow() {
|
|
336
|
-
if (disposed || dirty) return;
|
|
337
|
-
dirty = true;
|
|
338
|
-
scheduler.scheduleLow(eff);
|
|
339
|
-
},
|
|
340
|
-
dispose() {
|
|
341
|
-
if (disposed) return;
|
|
342
|
-
disposed = true;
|
|
343
|
-
dirty = false;
|
|
344
|
-
scheduler.remove(eff);
|
|
345
|
-
const previousCleanup = cleanup;
|
|
346
|
-
cleanup = void 0;
|
|
347
|
-
let cleanupError;
|
|
348
|
-
if (previousCleanup) {
|
|
349
|
-
try {
|
|
350
|
-
previousCleanup();
|
|
351
|
-
} catch (error) {
|
|
352
|
-
const handled = owner?.handleError(error) ?? false;
|
|
353
|
-
if (!handled) cleanupError = error;
|
|
354
|
-
}
|
|
355
|
-
}
|
|
356
|
-
cleanupDependencies(eff);
|
|
357
|
-
if (cleanupError) throw cleanupError;
|
|
358
|
-
}
|
|
359
|
-
};
|
|
360
|
-
owner?.addCleanup(eff.dispose);
|
|
361
|
-
eff.run();
|
|
362
|
-
return eff;
|
|
363
|
-
}
|
|
364
|
-
__name(effect, "effect");
|
|
365
|
-
|
|
366
|
-
// packages/runtime/src/debug.ts
|
|
367
|
-
var activeRuntimeDebugHooks = null;
|
|
368
|
-
function getRuntimeDebugHooks() {
|
|
369
|
-
return activeRuntimeDebugHooks;
|
|
370
|
-
}
|
|
371
|
-
__name(getRuntimeDebugHooks, "getRuntimeDebugHooks");
|
|
372
|
-
function invokeRuntimeDebug(name, ...args) {
|
|
373
|
-
return;
|
|
374
|
-
}
|
|
375
|
-
__name(invokeRuntimeDebug, "invokeRuntimeDebug");
|
|
376
|
-
function readDebugValue(read) {
|
|
377
|
-
try {
|
|
378
|
-
return read();
|
|
379
|
-
} catch {
|
|
380
|
-
return "[Uninspectable]";
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
__name(readDebugValue, "readDebugValue");
|
|
384
|
-
function describeDebugNode(node) {
|
|
385
|
-
if (!node || typeof node !== "object") return "node";
|
|
386
|
-
const value = node;
|
|
387
|
-
const name = typeof value.tagName === "string" ? value.tagName.toLowerCase() : typeof value.nodeName === "string" ? value.nodeName.toLowerCase() : "node";
|
|
388
|
-
const id = typeof value.id === "string" && value.id ? `#${value.id}` : "";
|
|
389
|
-
const className = typeof value.className === "string" && value.className ? `.${value.className.trim().split(/\s+/).filter(Boolean).join(".")}` : "";
|
|
390
|
-
return `${name}${id}${className}`;
|
|
391
|
-
}
|
|
392
|
-
__name(describeDebugNode, "describeDebugNode");
|
|
393
|
-
|
|
394
|
-
// packages/runtime/src/hmr.ts
|
|
395
|
-
var globalTarget = globalThis;
|
|
396
|
-
var hmrGlobal = globalTarget.__VOBS_HMR__ ?? { modules: /* @__PURE__ */ new Map() };
|
|
397
|
-
globalTarget.__VOBS_HMR__ = hmrGlobal;
|
|
398
|
-
function markHmrInstanceMounted(node, parent) {
|
|
399
|
-
const instance = hmrInstances.get(node);
|
|
400
|
-
if (instance) instance.parent = parent;
|
|
401
|
-
}
|
|
402
|
-
__name(markHmrInstanceMounted, "markHmrInstanceMounted");
|
|
403
|
-
var hmrInstances = /* @__PURE__ */ new WeakMap();
|
|
404
|
-
var nodeOwners = /* @__PURE__ */ new WeakMap();
|
|
405
|
-
var eventBindings = /* @__PURE__ */ new WeakMap();
|
|
406
|
-
function getRenderer() {
|
|
407
|
-
{
|
|
408
|
-
throw new Error("\u6E32\u67D3\u5668\u672A\u521D\u59CB\u5316");
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
|
-
__name(getRenderer, "getRenderer");
|
|
412
|
-
function createText(content) {
|
|
413
|
-
return getRenderer().createText(content);
|
|
414
|
-
}
|
|
415
|
-
__name(createText, "createText");
|
|
416
|
-
function createElement(tag) {
|
|
417
|
-
return getRenderer().createElement(tag);
|
|
418
|
-
}
|
|
419
|
-
__name(createElement, "createElement");
|
|
420
|
-
function createComment(content) {
|
|
421
|
-
return getRenderer().createComment(content);
|
|
422
|
-
}
|
|
423
|
-
__name(createComment, "createComment");
|
|
424
|
-
function insertBefore(parent, child, anchor) {
|
|
425
|
-
if (isVobsFragment(child)) {
|
|
426
|
-
child.mount(parent, isVobsFragment(anchor) ? anchor.start : anchor);
|
|
427
|
-
return;
|
|
428
|
-
}
|
|
429
|
-
getRenderer().insertBefore(parent, child, isVobsFragment(anchor) ? anchor.start : anchor);
|
|
430
|
-
markHmrInstanceMounted(child, parent);
|
|
431
|
-
}
|
|
432
|
-
__name(insertBefore, "insertBefore");
|
|
433
|
-
function removeChild(parent, child) {
|
|
434
|
-
disposeNodeOwner(child);
|
|
435
|
-
if (isVobsFragment(child)) {
|
|
436
|
-
child.unmount(parent);
|
|
437
|
-
return;
|
|
438
|
-
}
|
|
439
|
-
getRenderer().removeChild(parent, child);
|
|
440
|
-
}
|
|
441
|
-
__name(removeChild, "removeChild");
|
|
442
|
-
function setProperty(node, key, value) {
|
|
443
|
-
getRenderer().setProperty(node, key, value);
|
|
444
|
-
}
|
|
445
|
-
__name(setProperty, "setProperty");
|
|
446
|
-
function setAttribute(node, key, value) {
|
|
447
|
-
getRenderer().setAttribute(node, key, value);
|
|
448
|
-
}
|
|
449
|
-
__name(setAttribute, "setAttribute");
|
|
450
|
-
function addEventListener(node, event, handler) {
|
|
451
|
-
const renderer = getRenderer();
|
|
452
|
-
const owner = getCurrentOwner();
|
|
453
|
-
let bindings = eventBindings.get(node);
|
|
454
|
-
if (!bindings) {
|
|
455
|
-
bindings = /* @__PURE__ */ new Map();
|
|
456
|
-
eventBindings.set(node, bindings);
|
|
457
|
-
}
|
|
458
|
-
const previous = bindings.get(event);
|
|
459
|
-
if (previous && previous.original === handler && previous.owner === owner) return;
|
|
460
|
-
if (previous) renderer.removeEventListener(node, event, previous.handler);
|
|
461
|
-
const listener = owner ? (reason) => {
|
|
462
|
-
try {
|
|
463
|
-
owner.run(() => handler(reason));
|
|
464
|
-
} catch (error) {
|
|
465
|
-
const handled = owner.handleError(error);
|
|
466
|
-
invokeRuntimeDebug("error", {
|
|
467
|
-
error,
|
|
468
|
-
owner,
|
|
469
|
-
phase: "event",
|
|
470
|
-
handled,
|
|
471
|
-
recovery: handled ? "handled" : "propagated"
|
|
472
|
-
});
|
|
473
|
-
if (!handled) throw error;
|
|
474
|
-
}
|
|
475
|
-
} : handler;
|
|
476
|
-
const binding = { handler: listener, owner, original: handler };
|
|
477
|
-
bindings.set(event, binding);
|
|
478
|
-
renderer.addEventListener(node, event, listener);
|
|
479
|
-
owner?.onDispose(() => {
|
|
480
|
-
if (bindings?.get(event) !== binding) return;
|
|
481
|
-
bindings.delete(event);
|
|
482
|
-
renderer.removeEventListener(node, event, listener);
|
|
483
|
-
});
|
|
484
|
-
}
|
|
485
|
-
__name(addEventListener, "addEventListener");
|
|
486
|
-
function createBlock(factory) {
|
|
487
|
-
const owner = createOwner();
|
|
488
|
-
setOwnerDebugName(owner, "dynamic");
|
|
489
|
-
let node;
|
|
490
|
-
try {
|
|
491
|
-
node = owner.run(factory);
|
|
492
|
-
} catch (error) {
|
|
493
|
-
owner.dispose();
|
|
494
|
-
throw error;
|
|
495
|
-
}
|
|
496
|
-
if (!node) {
|
|
497
|
-
owner.dispose();
|
|
498
|
-
return null;
|
|
499
|
-
}
|
|
500
|
-
associateNodeOwner(node, owner);
|
|
501
|
-
return node;
|
|
502
|
-
}
|
|
503
|
-
__name(createBlock, "createBlock");
|
|
504
|
-
function associateNodeOwner(node, owner) {
|
|
505
|
-
nodeOwners.set(node, owner);
|
|
506
|
-
}
|
|
507
|
-
__name(associateNodeOwner, "associateNodeOwner");
|
|
508
|
-
function disposeNodeOwner(node) {
|
|
509
|
-
const owner = nodeOwners.get(node);
|
|
510
|
-
if (!owner) return;
|
|
511
|
-
nodeOwners.delete(node);
|
|
512
|
-
owner.dispose();
|
|
513
|
-
}
|
|
514
|
-
__name(disposeNodeOwner, "disposeNodeOwner");
|
|
515
|
-
|
|
516
|
-
// packages/runtime/src/fragment.ts
|
|
517
|
-
function createFragment(factory) {
|
|
518
|
-
const start = createComment("vobs:fragment:start");
|
|
519
|
-
const end = createComment("vobs:fragment:end");
|
|
520
|
-
let parent = null;
|
|
521
|
-
let initialized = false;
|
|
522
|
-
const owner = getCurrentOwner();
|
|
523
|
-
const fragment = {
|
|
524
|
-
kind: "vobs-fragment",
|
|
525
|
-
start,
|
|
526
|
-
end,
|
|
527
|
-
mount(nextParent, anchor) {
|
|
528
|
-
if (parent && parent !== nextParent) {
|
|
529
|
-
throw new Error("Vobs Fragment: \u4E0D\u80FD\u8DE8\u7236\u8282\u70B9\u79FB\u52A8 Fragment");
|
|
530
|
-
}
|
|
531
|
-
if (initialized) {
|
|
532
|
-
moveRange(nextParent, start, end, anchor);
|
|
533
|
-
return;
|
|
534
|
-
}
|
|
535
|
-
const renderer = getRenderer();
|
|
536
|
-
renderer.insertBefore(nextParent, start, anchor);
|
|
537
|
-
renderer.insertBefore(nextParent, end, anchor);
|
|
538
|
-
parent = nextParent;
|
|
539
|
-
initialized = true;
|
|
540
|
-
if (owner) owner.run(() => factory(nextParent, end));
|
|
541
|
-
else factory(nextParent, end);
|
|
542
|
-
},
|
|
543
|
-
unmount(nextParent) {
|
|
544
|
-
if (!initialized || parent !== nextParent) {
|
|
545
|
-
throw new Error("Vobs Fragment: Fragment \u4E0D\u5C5E\u4E8E\u6307\u5B9A\u7236\u8282\u70B9");
|
|
546
|
-
}
|
|
547
|
-
const renderer = getRenderer();
|
|
548
|
-
let current = renderer.nextSibling(start);
|
|
549
|
-
while (current && current !== end) {
|
|
550
|
-
const next = renderer.nextSibling(current);
|
|
551
|
-
renderer.removeChild(nextParent, current);
|
|
552
|
-
current = next;
|
|
553
|
-
}
|
|
554
|
-
renderer.removeChild(nextParent, start);
|
|
555
|
-
renderer.removeChild(nextParent, end);
|
|
556
|
-
parent = null;
|
|
557
|
-
initialized = false;
|
|
558
|
-
}
|
|
559
|
-
};
|
|
560
|
-
return fragment;
|
|
561
|
-
}
|
|
562
|
-
__name(createFragment, "createFragment");
|
|
563
|
-
function isVobsFragment(value) {
|
|
564
|
-
return Boolean(value) && typeof value === "object" && value.kind === "vobs-fragment";
|
|
565
|
-
}
|
|
566
|
-
__name(isVobsFragment, "isVobsFragment");
|
|
567
|
-
function moveRange(parent, start, end, anchor) {
|
|
568
|
-
const renderer = getRenderer();
|
|
569
|
-
const nodes = [start];
|
|
570
|
-
let current = renderer.nextSibling(start);
|
|
571
|
-
while (current) {
|
|
572
|
-
nodes.push(current);
|
|
573
|
-
if (current === end) break;
|
|
574
|
-
current = renderer.nextSibling(current);
|
|
575
|
-
}
|
|
576
|
-
if (nodes[nodes.length - 1] !== end) {
|
|
577
|
-
throw new Error("Vobs Fragment: \u627E\u4E0D\u5230\u7ED3\u675F\u951A\u70B9");
|
|
578
|
-
}
|
|
579
|
-
for (const node of nodes) renderer.insertBefore(parent, node, anchor);
|
|
580
|
-
}
|
|
581
|
-
__name(moveRange, "moveRange");
|
|
582
|
-
|
|
583
|
-
// packages/runtime/src/dynamic.ts
|
|
584
|
-
function insertDynamic(parent, anchor, factory) {
|
|
585
|
-
const marker = createComment("vobs:dynamic");
|
|
586
|
-
insertBefore(parent, marker, anchor);
|
|
587
|
-
let current = null;
|
|
588
|
-
effect(() => {
|
|
589
|
-
const next = createBlock(factory);
|
|
590
|
-
if (next === current) return;
|
|
591
|
-
if (current) removeChild(parent, current);
|
|
592
|
-
current = next;
|
|
593
|
-
if (current) insertBefore(parent, current, marker);
|
|
594
|
-
});
|
|
595
|
-
}
|
|
596
|
-
__name(insertDynamic, "insertDynamic");
|
|
597
|
-
function insertList(parent, anchor, source, renderItem, keyOf) {
|
|
598
|
-
const marker = createComment("vobs:list");
|
|
599
|
-
insertBefore(parent, marker, anchor);
|
|
600
|
-
let entries = [];
|
|
601
|
-
const tracksIndex = renderItem.length >= 2;
|
|
602
|
-
effect(() => {
|
|
603
|
-
const items = source();
|
|
604
|
-
let keys = null;
|
|
605
|
-
if (keyOf) {
|
|
606
|
-
keys = new Array(items.length);
|
|
607
|
-
let allKeyed = items.length > 0;
|
|
608
|
-
for (let index = 0; index < items.length; index++) {
|
|
609
|
-
const key = keyOf(items[index], index);
|
|
610
|
-
if (key == null) {
|
|
611
|
-
allKeyed = false;
|
|
612
|
-
break;
|
|
613
|
-
}
|
|
614
|
-
keys[index] = key;
|
|
615
|
-
}
|
|
616
|
-
if (!allKeyed) keys = null;
|
|
617
|
-
}
|
|
618
|
-
const nextEntries = keys ? reconcileKeyed(items, keys, entries, renderItem) : reconcileIndexed(items, entries, renderItem);
|
|
619
|
-
const refreshed = tracksIndex ? /* @__PURE__ */ new Set() : null;
|
|
620
|
-
for (let index = 0; index < nextEntries.length; index++) {
|
|
621
|
-
const entry = nextEntries[index];
|
|
622
|
-
if (tracksIndex) {
|
|
623
|
-
if (entry.index !== index) {
|
|
624
|
-
refreshListEntry(parent, entry, index, renderItem);
|
|
625
|
-
refreshed.add(entry);
|
|
626
|
-
}
|
|
627
|
-
} else {
|
|
628
|
-
entry.index = index;
|
|
629
|
-
}
|
|
630
|
-
}
|
|
631
|
-
const retained = new Set(nextEntries);
|
|
632
|
-
for (const entry of entries) {
|
|
633
|
-
if (!retained.has(entry)) disposeEntry(parent, entry);
|
|
634
|
-
}
|
|
635
|
-
reorderListEntries(parent, marker, entries, nextEntries, refreshed);
|
|
636
|
-
entries = nextEntries;
|
|
637
|
-
});
|
|
638
|
-
}
|
|
639
|
-
__name(insertList, "insertList");
|
|
640
|
-
function reorderListEntries(parent, marker, previous, nextEntries, forceInsert) {
|
|
641
|
-
const count = nextEntries.length;
|
|
642
|
-
if (count === 0) return;
|
|
643
|
-
if (previous.length === 0) {
|
|
644
|
-
let reference2 = marker;
|
|
645
|
-
for (let index = count - 1; index >= 0; index--) {
|
|
646
|
-
const node = nextEntries[index].node;
|
|
647
|
-
insertBefore(parent, node, reference2);
|
|
648
|
-
reference2 = node;
|
|
649
|
-
}
|
|
650
|
-
return;
|
|
651
|
-
}
|
|
652
|
-
const oldIndexOf = /* @__PURE__ */ new Map();
|
|
653
|
-
for (let index = 0; index < previous.length; index++) oldIndexOf.set(previous[index], index);
|
|
654
|
-
const seq = new Array(count);
|
|
655
|
-
for (let index = 0; index < count; index++) {
|
|
656
|
-
const entry = nextEntries[index];
|
|
657
|
-
seq[index] = forceInsert?.has(entry) ? -1 : oldIndexOf.get(entry) ?? -1;
|
|
658
|
-
}
|
|
659
|
-
const keep = computeKeptByLis(seq);
|
|
660
|
-
let reference = marker;
|
|
661
|
-
for (let index = count - 1; index >= 0; index--) {
|
|
662
|
-
const node = nextEntries[index].node;
|
|
663
|
-
if (keep[index]) {
|
|
664
|
-
reference = node;
|
|
665
|
-
continue;
|
|
666
|
-
}
|
|
667
|
-
insertBefore(parent, node, reference);
|
|
668
|
-
reference = node;
|
|
669
|
-
}
|
|
670
|
-
}
|
|
671
|
-
__name(reorderListEntries, "reorderListEntries");
|
|
672
|
-
function computeKeptByLis(seq) {
|
|
673
|
-
const count = seq.length;
|
|
674
|
-
const keep = new Array(count).fill(false);
|
|
675
|
-
const tailsIndex = [];
|
|
676
|
-
const tailsValue = [];
|
|
677
|
-
const prev = new Array(count).fill(-1);
|
|
678
|
-
for (let i = 0; i < count; i++) {
|
|
679
|
-
const value = seq[i];
|
|
680
|
-
if (value < 0) continue;
|
|
681
|
-
let lo = 0;
|
|
682
|
-
let hi = tailsValue.length;
|
|
683
|
-
while (lo < hi) {
|
|
684
|
-
const mid = lo + hi >> 1;
|
|
685
|
-
if (tailsValue[mid] < value) lo = mid + 1;
|
|
686
|
-
else hi = mid;
|
|
687
|
-
}
|
|
688
|
-
if (lo === tailsValue.length) {
|
|
689
|
-
tailsValue.push(value);
|
|
690
|
-
tailsIndex.push(i);
|
|
691
|
-
} else {
|
|
692
|
-
tailsValue[lo] = value;
|
|
693
|
-
tailsIndex[lo] = i;
|
|
694
|
-
}
|
|
695
|
-
prev[i] = lo > 0 ? tailsIndex[lo - 1] : -1;
|
|
696
|
-
}
|
|
697
|
-
let cursor = tailsIndex.length > 0 ? tailsIndex[tailsIndex.length - 1] : -1;
|
|
698
|
-
while (cursor >= 0) {
|
|
699
|
-
keep[cursor] = true;
|
|
700
|
-
cursor = prev[cursor];
|
|
701
|
-
}
|
|
702
|
-
return keep;
|
|
703
|
-
}
|
|
704
|
-
__name(computeKeptByLis, "computeKeptByLis");
|
|
705
|
-
function reconcileKeyed(items, keys, entries, renderItem) {
|
|
706
|
-
const previous = new Map(entries.map((entry) => [entry.key, entry]));
|
|
707
|
-
const seen = /* @__PURE__ */ new Set();
|
|
708
|
-
const nextEntries = [];
|
|
709
|
-
for (let index = 0; index < items.length; index++) {
|
|
710
|
-
const item = items[index];
|
|
711
|
-
const key = keys[index];
|
|
712
|
-
if (seen.has(key)) {
|
|
713
|
-
console.warn(`Vobs: \u68C0\u6D4B\u5230\u91CD\u590D\u7684\u5217\u8868 key: ${String(key)}`);
|
|
714
|
-
}
|
|
715
|
-
seen.add(key);
|
|
716
|
-
const entry = previous.get(key);
|
|
717
|
-
if (entry) {
|
|
718
|
-
previous.delete(key);
|
|
719
|
-
if (isPrimitiveItem(item) && !Object.is(entry.value, item)) {
|
|
720
|
-
nextEntries.push(createListEntry(item, index, key, renderItem));
|
|
721
|
-
continue;
|
|
722
|
-
}
|
|
723
|
-
entry.item.value = item;
|
|
724
|
-
entry.value = item;
|
|
725
|
-
nextEntries.push(entry);
|
|
726
|
-
continue;
|
|
727
|
-
}
|
|
728
|
-
nextEntries.push(createListEntry(item, index, key, renderItem));
|
|
729
|
-
}
|
|
730
|
-
return nextEntries;
|
|
731
|
-
}
|
|
732
|
-
__name(reconcileKeyed, "reconcileKeyed");
|
|
733
|
-
function reconcileIndexed(items, entries, renderItem) {
|
|
734
|
-
const nextEntries = [];
|
|
735
|
-
for (let index = 0; index < items.length; index++) {
|
|
736
|
-
const item = items[index];
|
|
737
|
-
const entry = entries[index];
|
|
738
|
-
if (entry && isPrimitiveItem(item) && !Object.is(entry.value, item)) {
|
|
739
|
-
nextEntries.push(createListEntry(item, index, index, renderItem));
|
|
740
|
-
continue;
|
|
741
|
-
}
|
|
742
|
-
if (entry) {
|
|
743
|
-
entry.item.value = item;
|
|
744
|
-
entry.value = item;
|
|
745
|
-
nextEntries.push(entry);
|
|
746
|
-
continue;
|
|
747
|
-
}
|
|
748
|
-
nextEntries.push(createListEntry(item, index, index, renderItem));
|
|
749
|
-
}
|
|
750
|
-
return nextEntries;
|
|
751
|
-
}
|
|
752
|
-
__name(reconcileIndexed, "reconcileIndexed");
|
|
753
|
-
function isPrimitiveItem(item) {
|
|
754
|
-
return item === null || typeof item !== "object";
|
|
755
|
-
}
|
|
756
|
-
__name(isPrimitiveItem, "isPrimitiveItem");
|
|
757
|
-
function createListEntry(item, index, key, renderItem) {
|
|
758
|
-
const owner = createOwner();
|
|
759
|
-
let itemSignal;
|
|
760
|
-
let viewOwner;
|
|
761
|
-
let node;
|
|
762
|
-
owner.run(() => {
|
|
763
|
-
itemSignal = state(item);
|
|
764
|
-
viewOwner = createOwner();
|
|
765
|
-
node = viewOwner.run(() => renderItem(toReactiveItem(itemSignal, item), index));
|
|
766
|
-
});
|
|
767
|
-
associateNodeOwner(node, viewOwner);
|
|
768
|
-
return { key, node, owner, viewOwner, item: itemSignal, value: item, index };
|
|
769
|
-
}
|
|
770
|
-
__name(createListEntry, "createListEntry");
|
|
771
|
-
function refreshListEntry(parent, entry, index, renderItem) {
|
|
772
|
-
removeChild(parent, entry.node);
|
|
773
|
-
entry.index = index;
|
|
774
|
-
const previousView = entry.viewOwner;
|
|
775
|
-
entry.owner.run(() => {
|
|
776
|
-
entry.viewOwner = createOwner();
|
|
777
|
-
entry.node = entry.viewOwner.run(() => renderItem(
|
|
778
|
-
toReactiveItem(entry.item, entry.value),
|
|
779
|
-
index
|
|
780
|
-
));
|
|
781
|
-
});
|
|
782
|
-
previousView.dispose();
|
|
783
|
-
associateNodeOwner(entry.node, entry.viewOwner);
|
|
784
|
-
}
|
|
785
|
-
__name(refreshListEntry, "refreshListEntry");
|
|
786
|
-
function toReactiveItem(item, initialValue) {
|
|
787
|
-
if (typeof initialValue !== "object" || initialValue === null) {
|
|
788
|
-
return initialValue;
|
|
789
|
-
}
|
|
790
|
-
return new Proxy(initialValue, {
|
|
791
|
-
get(_target, property, receiver) {
|
|
792
|
-
return Reflect.get(item.value, property, receiver);
|
|
793
|
-
},
|
|
794
|
-
has(_target, property) {
|
|
795
|
-
return property in item.value;
|
|
796
|
-
},
|
|
797
|
-
ownKeys() {
|
|
798
|
-
return Reflect.ownKeys(item.value);
|
|
799
|
-
},
|
|
800
|
-
getOwnPropertyDescriptor(_target, property) {
|
|
801
|
-
return Object.getOwnPropertyDescriptor(item.value, property);
|
|
802
|
-
}
|
|
803
|
-
});
|
|
804
|
-
}
|
|
805
|
-
__name(toReactiveItem, "toReactiveItem");
|
|
806
|
-
function disposeEntry(parent, entry) {
|
|
807
|
-
removeChild(parent, entry.node);
|
|
808
|
-
entry.owner.dispose();
|
|
809
|
-
}
|
|
810
|
-
__name(disposeEntry, "disposeEntry");
|
|
811
|
-
|
|
812
|
-
// packages/vobs/src/context.ts
|
|
813
|
-
var ownerProviders = /* @__PURE__ */ new WeakMap();
|
|
814
|
-
function inject(key, fallback) {
|
|
815
|
-
const owner = getCurrentOwner();
|
|
816
|
-
const value = owner ? injectFromOwner(owner, key) : void 0;
|
|
817
|
-
return value === void 0 ? fallback : value;
|
|
818
|
-
}
|
|
819
|
-
__name(inject, "inject");
|
|
820
|
-
function injectFromOwner(owner, key) {
|
|
821
|
-
let current = owner;
|
|
822
|
-
while (current) {
|
|
823
|
-
const providers = ownerProviders.get(current);
|
|
824
|
-
if (providers?.has(key)) return providers.get(key);
|
|
825
|
-
current = current.parent;
|
|
826
|
-
}
|
|
827
|
-
return void 0;
|
|
828
|
-
}
|
|
829
|
-
__name(injectFromOwner, "injectFromOwner");
|
|
830
|
-
|
|
831
|
-
// packages/vobs/src/app.ts
|
|
832
|
-
function createInjectionKey(description) {
|
|
833
|
-
return Symbol(description);
|
|
834
|
-
}
|
|
835
|
-
__name(createInjectionKey, "createInjectionKey");
|
|
836
|
-
|
|
837
|
-
// packages/notification/src/index.ts
|
|
838
|
-
var _NotificationError = class _NotificationError extends Error {
|
|
839
|
-
constructor(code, message) {
|
|
840
|
-
super(message);
|
|
841
|
-
this.name = "NotificationError";
|
|
842
|
-
this.code = code;
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
843
17
|
}
|
|
18
|
+
return to;
|
|
844
19
|
};
|
|
845
|
-
|
|
846
|
-
var NotificationError = _NotificationError;
|
|
847
|
-
var NOTIFICATION_KEY = createInjectionKey("vobs.notification");
|
|
848
|
-
function useNotification() {
|
|
849
|
-
const notification = inject(NOTIFICATION_KEY);
|
|
850
|
-
if (!notification) {
|
|
851
|
-
throw new NotificationError("NOTIFICATION_CONTEXT_MISSING", "Vobs Notification: \u627E\u4E0D\u5230\u4E0A\u4E0B\u6587\uFF0C\u8BF7\u5B89\u88C5 notificationPlugin");
|
|
852
|
-
}
|
|
853
|
-
return notification;
|
|
854
|
-
}
|
|
855
|
-
__name(useNotification, "useNotification");
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
856
21
|
|
|
857
|
-
// packages/
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
const height = readProp(props, "height", size);
|
|
870
|
-
const normalizedWidth = normalizeSvgLength(width);
|
|
871
|
-
const normalizedHeight = normalizeSvgLength(height);
|
|
872
|
-
const userClass = [
|
|
873
|
-
readProp(props, "class", void 0),
|
|
874
|
-
readProp(props, "className", void 0)
|
|
875
|
-
].filter(hasText).join(" ");
|
|
876
|
-
const className = [options.class, options.className, userClass].filter(hasText).join(" ");
|
|
877
|
-
setAttribute(root, "class", className);
|
|
878
|
-
const internalStyle = size === void 0 ? "" : `width: ${normalizeCssLength(size)}; height: ${normalizeCssLength(size)}`;
|
|
879
|
-
const userStyle = readProp(props, "style", void 0);
|
|
880
|
-
const style = [internalStyle, userStyle].filter(hasText).join("; ");
|
|
881
|
-
setOptionalAttribute(root, "style", style || void 0);
|
|
882
|
-
const managedAttributes2 = /* @__PURE__ */ new Map();
|
|
883
|
-
for (const name of Object.keys(props)) {
|
|
884
|
-
if (name === "class" || name === "className" || name === "style" || name === "children") continue;
|
|
885
|
-
if (!name.startsWith("aria-") && !name.startsWith("data-") && !["id", "title", "role", "tabIndex"].includes(name)) continue;
|
|
886
|
-
const value = Reflect.get(props, name);
|
|
887
|
-
if (value === void 0 || value === null || value === false) continue;
|
|
888
|
-
managedAttributes2.set(name === "tabIndex" ? "tabindex" : name, String(value));
|
|
889
|
-
}
|
|
890
|
-
for (const [name, value] of managedAttributes2) setAttribute(root, name, value);
|
|
891
|
-
clearStaleAttributes(root, managedAttributes2);
|
|
892
|
-
const title = readProp(props, "title", void 0);
|
|
893
|
-
const ariaLabel = Reflect.get(props, "aria-label");
|
|
894
|
-
const decorative = readProp(props, "decorative", title === void 0 && ariaLabel === void 0);
|
|
895
|
-
setOptionalAttribute(root, "aria-hidden", decorative ? "true" : void 0);
|
|
896
|
-
setOptionalAttribute(root, "aria-label", ariaLabel === void 0 ? title : void 0);
|
|
897
|
-
setOptionalAttribute(root, "data-icon-name", options.dataIconName ?? definition?.name);
|
|
898
|
-
setOptionalAttribute(root, "color", readProp(props, "color", void 0));
|
|
899
|
-
if (!definition) {
|
|
900
|
-
setProperty(root, "innerHTML", "");
|
|
901
|
-
return;
|
|
902
|
-
}
|
|
903
|
-
const svgAttributes = {
|
|
904
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
905
|
-
viewBox: definition.viewBox ?? "0 0 24 24",
|
|
906
|
-
...options.defaultSvgAttributes,
|
|
907
|
-
...definition.attributes,
|
|
908
|
-
...normalizedWidth === void 0 ? {} : { width: normalizedWidth },
|
|
909
|
-
...normalizedHeight === void 0 ? {} : { height: normalizedHeight },
|
|
910
|
-
...readProp(props, "color", void 0) === void 0 ? {} : { color: readProp(props, "color", void 0) },
|
|
911
|
-
...readProp(props, "stroke", void 0) === void 0 ? {} : { stroke: readProp(props, "stroke", void 0) },
|
|
912
|
-
...readProp(props, "fill", void 0) === void 0 ? {} : { fill: readProp(props, "fill", void 0) },
|
|
913
|
-
...readProp(props, "strokeWidth", void 0) === void 0 ? {} : { "stroke-width": readProp(props, "strokeWidth", void 0) }
|
|
914
|
-
};
|
|
915
|
-
const markup = Object.entries(svgAttributes).filter(([, value]) => value !== void 0).map(([name, value]) => `${name}="${escapeXml(String(value))}"`).join(" ");
|
|
916
|
-
const titleMarkup = title === void 0 ? "" : `<title>${escapeXml(title)}</title>`;
|
|
917
|
-
setProperty(root, "innerHTML", `<svg ${markup} aria-hidden="true">${titleMarkup}${definition.body}</svg>`);
|
|
918
|
-
}
|
|
919
|
-
__name(updateSvgIconNode, "updateSvgIconNode");
|
|
920
|
-
function readProp(props, name, fallback) {
|
|
921
|
-
const value = Reflect.get(props, name);
|
|
922
|
-
return value === void 0 ? fallback : value;
|
|
923
|
-
}
|
|
924
|
-
__name(readProp, "readProp");
|
|
925
|
-
function hasText(value) {
|
|
926
|
-
return value !== void 0 && value.trim() !== "";
|
|
927
|
-
}
|
|
928
|
-
__name(hasText, "hasText");
|
|
929
|
-
function normalizeSvgLength(value) {
|
|
930
|
-
if (value === void 0) return void 0;
|
|
931
|
-
return typeof value === "number" ? String(value) : value;
|
|
932
|
-
}
|
|
933
|
-
__name(normalizeSvgLength, "normalizeSvgLength");
|
|
934
|
-
function normalizeCssLength(value) {
|
|
935
|
-
return typeof value === "number" || /^\d+(?:\.\d+)?$/u.test(value) ? `${value}px` : value;
|
|
936
|
-
}
|
|
937
|
-
__name(normalizeCssLength, "normalizeCssLength");
|
|
938
|
-
function setOptionalAttribute(node, name, value) {
|
|
939
|
-
if (value === void 0 || value === null || value === false || value === "") {
|
|
940
|
-
node.removeAttribute(name);
|
|
941
|
-
return;
|
|
942
|
-
}
|
|
943
|
-
setAttribute(node, name, String(value));
|
|
944
|
-
}
|
|
945
|
-
__name(setOptionalAttribute, "setOptionalAttribute");
|
|
946
|
-
function clearStaleAttributes(node, next) {
|
|
947
|
-
const previous = node.__vobsIconAttributes ?? /* @__PURE__ */ new Set();
|
|
948
|
-
for (const name of previous) {
|
|
949
|
-
if (!next.has(name)) node.removeAttribute(name);
|
|
950
|
-
}
|
|
951
|
-
node.__vobsIconAttributes = new Set(next.keys());
|
|
952
|
-
}
|
|
953
|
-
__name(clearStaleAttributes, "clearStaleAttributes");
|
|
954
|
-
function escapeXml(value) {
|
|
955
|
-
return value.replace(/&/gu, "&").replace(/</gu, "<").replace(/>/gu, ">").replace(/"/gu, """);
|
|
956
|
-
}
|
|
957
|
-
__name(escapeXml, "escapeXml");
|
|
22
|
+
// packages/ui/src/toast.ts
|
|
23
|
+
var toast_exports = {};
|
|
24
|
+
__export(toast_exports, {
|
|
25
|
+
ToastHost: () => ToastHost
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(toast_exports);
|
|
28
|
+
var import_vobs3 = require("@vobs/vobs");
|
|
29
|
+
var import_vobs4 = require("@vobs/vobs");
|
|
30
|
+
var import_notification = require("@vobs/notification");
|
|
31
|
+
|
|
32
|
+
// packages/ui/src/icon.ts
|
|
33
|
+
var import_icon_core = require("@vobs/icon-core");
|
|
958
34
|
|
|
959
35
|
// packages/ui/src/utils.ts
|
|
36
|
+
var import_reactivity = require("@vobs/reactivity");
|
|
37
|
+
var import_vobs = require("@vobs/vobs");
|
|
960
38
|
function classNames(...values) {
|
|
961
39
|
return values.flatMap((value) => typeof value === "string" ? value.trim().split(/\s+/u) : []).filter(Boolean).join(" ");
|
|
962
40
|
}
|
|
963
41
|
__name(classNames, "classNames");
|
|
964
|
-
function
|
|
42
|
+
function readProp(props, name, fallback) {
|
|
965
43
|
const value = Reflect.get(props, name);
|
|
966
44
|
return value === void 0 ? fallback : value;
|
|
967
45
|
}
|
|
968
|
-
__name(
|
|
46
|
+
__name(readProp, "readProp");
|
|
969
47
|
function hasProp(props, name) {
|
|
970
48
|
return name in props;
|
|
971
49
|
}
|
|
972
50
|
__name(hasProp, "hasProp");
|
|
973
51
|
function bindClassList(root, props, readBaseClasses) {
|
|
974
|
-
effect(() => {
|
|
975
|
-
setAttribute(root, "class", classNames(
|
|
52
|
+
(0, import_reactivity.effect)(() => {
|
|
53
|
+
(0, import_vobs.setAttribute)(root, "class", classNames(
|
|
976
54
|
...readBaseClasses(),
|
|
977
55
|
readString(props, "class"),
|
|
978
56
|
readString(props, "className")
|
|
@@ -986,7 +64,7 @@ function bindCommonAttributes(root, props, skip = [], options = {}) {
|
|
|
986
64
|
ignored.add("className");
|
|
987
65
|
ignored.add("children");
|
|
988
66
|
ignored.add("style");
|
|
989
|
-
effect(() => {
|
|
67
|
+
(0, import_reactivity.effect)(() => {
|
|
990
68
|
const next = /* @__PURE__ */ new Map();
|
|
991
69
|
for (const name of Object.keys(props)) {
|
|
992
70
|
if (ignored.has(name) || name.startsWith("on")) continue;
|
|
@@ -1000,7 +78,7 @@ function bindCommonAttributes(root, props, skip = [], options = {}) {
|
|
|
1000
78
|
for (const name of managed) {
|
|
1001
79
|
if (!next.has(name)) removeAttribute(root, name);
|
|
1002
80
|
}
|
|
1003
|
-
for (const [name, value] of next) setAttribute(root, name, value);
|
|
81
|
+
for (const [name, value] of next) (0, import_vobs.setAttribute)(root, name, value);
|
|
1004
82
|
setManagedAttributes(root, next.keys());
|
|
1005
83
|
});
|
|
1006
84
|
}
|
|
@@ -1010,29 +88,29 @@ function bindUserStyle(root, props) {
|
|
|
1010
88
|
}
|
|
1011
89
|
__name(bindUserStyle, "bindUserStyle");
|
|
1012
90
|
function bindStyle(root, props, createStyle) {
|
|
1013
|
-
effect(() => {
|
|
91
|
+
(0, import_reactivity.effect)(() => {
|
|
1014
92
|
const userStyle = readString(props, "style");
|
|
1015
93
|
const internalStyle = createStyle();
|
|
1016
94
|
const style = [internalStyle, userStyle].filter(Boolean).join("; ");
|
|
1017
|
-
if (style) setAttribute(root, "style", style);
|
|
95
|
+
if (style) (0, import_vobs.setAttribute)(root, "style", style);
|
|
1018
96
|
else removeAttribute(root, "style");
|
|
1019
97
|
});
|
|
1020
98
|
}
|
|
1021
99
|
__name(bindStyle, "bindStyle");
|
|
1022
100
|
function mountSlot(parent, props, propName) {
|
|
1023
|
-
insertDynamic(parent, null, () => resolveSlot(Reflect.get(props, propName)));
|
|
101
|
+
(0, import_vobs.insertDynamic)(parent, null, () => resolveSlot(Reflect.get(props, propName)));
|
|
1024
102
|
}
|
|
1025
103
|
__name(mountSlot, "mountSlot");
|
|
1026
104
|
function resolveSlot(value) {
|
|
1027
105
|
const resolved = typeof value === "function" ? value() : value;
|
|
1028
106
|
if (resolved === void 0 || resolved === null || resolved === false) return null;
|
|
1029
|
-
if (typeof resolved === "string" || typeof resolved === "number") return createText(String(resolved));
|
|
107
|
+
if (typeof resolved === "string" || typeof resolved === "number") return (0, import_vobs.createText)(String(resolved));
|
|
1030
108
|
if (Array.isArray(resolved)) {
|
|
1031
109
|
const children = resolved;
|
|
1032
|
-
return createFragment((parent, anchor) => {
|
|
110
|
+
return (0, import_vobs.createFragment)((parent, anchor) => {
|
|
1033
111
|
for (const child of children) {
|
|
1034
112
|
const node = resolveSlot(child);
|
|
1035
|
-
if (node) insertBefore(parent, node, anchor);
|
|
113
|
+
if (node) (0, import_vobs.insertBefore)(parent, node, anchor);
|
|
1036
114
|
}
|
|
1037
115
|
});
|
|
1038
116
|
}
|
|
@@ -1071,9 +149,9 @@ __name(removeAttribute, "removeAttribute");
|
|
|
1071
149
|
|
|
1072
150
|
// packages/ui/src/icon.ts
|
|
1073
151
|
function Icon(props = {}) {
|
|
1074
|
-
const root = createSvgIconNode(() => {
|
|
152
|
+
const root = (0, import_icon_core.createSvgIconNode)(() => {
|
|
1075
153
|
const definition = resolveIcon(
|
|
1076
|
-
|
|
154
|
+
readProp(props, "icon", void 0) ?? readProp(props, "name", void 0)
|
|
1077
155
|
);
|
|
1078
156
|
if (!definition) {
|
|
1079
157
|
if (hasProp(props, "children")) return void 0;
|
|
@@ -1157,9 +235,11 @@ function resolveIcon(icon) {
|
|
|
1157
235
|
__name(resolveIcon, "resolveIcon");
|
|
1158
236
|
|
|
1159
237
|
// packages/ui/src/overlay.ts
|
|
238
|
+
var import_reactivity2 = require("@vobs/reactivity");
|
|
239
|
+
var import_vobs2 = require("@vobs/vobs");
|
|
1160
240
|
function createPortal(node, adapter, target) {
|
|
1161
|
-
const placeholder = createComment("vui:portal");
|
|
1162
|
-
const owner = getCurrentOwner();
|
|
241
|
+
const placeholder = (0, import_vobs2.createComment)("vui:portal");
|
|
242
|
+
const owner = (0, import_reactivity2.getCurrentOwner)();
|
|
1163
243
|
if (!owner) throw new Error("Vobs UI: createPortal \u5FC5\u987B\u5728\u7EC4\u4EF6 Owner \u4F5C\u7528\u57DF\u5185\u8C03\u7528");
|
|
1164
244
|
adapter.mount(node, target);
|
|
1165
245
|
const cleanup = /* @__PURE__ */ __name(() => adapter.unmount(node, target), "cleanup");
|
|
@@ -1167,53 +247,67 @@ function createPortal(node, adapter, target) {
|
|
|
1167
247
|
return placeholder;
|
|
1168
248
|
}
|
|
1169
249
|
__name(createPortal, "createPortal");
|
|
250
|
+
var FOCUSABLE_SELECTOR = [
|
|
251
|
+
"a[href]",
|
|
252
|
+
"area[href]",
|
|
253
|
+
"button",
|
|
254
|
+
"input",
|
|
255
|
+
"select",
|
|
256
|
+
"textarea",
|
|
257
|
+
"iframe",
|
|
258
|
+
"object",
|
|
259
|
+
"embed",
|
|
260
|
+
"[contenteditable]",
|
|
261
|
+
"[tabindex]"
|
|
262
|
+
].join(",");
|
|
1170
263
|
|
|
1171
264
|
// packages/ui/src/toast.ts
|
|
1172
265
|
function ToastHost(props = {}) {
|
|
1173
|
-
const notification = props.notification ?? useNotification();
|
|
1174
|
-
const root = createElement("ol");
|
|
266
|
+
const notification = props.notification ?? (0, import_notification.useNotification)();
|
|
267
|
+
const root = (0, import_vobs4.createElement)("ol");
|
|
1175
268
|
bindClassList(root, props, () => [
|
|
1176
269
|
"vui-toast-host",
|
|
1177
|
-
`vui-toast-host--${
|
|
270
|
+
`vui-toast-host--${readProp(props, "position", "top-right")}`
|
|
1178
271
|
]);
|
|
1179
272
|
bindCommonAttributes(root, props, ["notification", "position", "closeLabel", "portal", "portalTarget"]);
|
|
1180
273
|
bindUserStyle(root, props);
|
|
1181
|
-
setAttribute(root, "aria-label", "Notifications");
|
|
1182
|
-
setAttribute(root, "role", "region");
|
|
1183
|
-
insertList(root, null, () => notification.notifications.value, (entry) => createToast(entry, notification,
|
|
1184
|
-
const portal =
|
|
1185
|
-
return portal ? createPortal(root, portal,
|
|
274
|
+
(0, import_vobs4.setAttribute)(root, "aria-label", "Notifications");
|
|
275
|
+
(0, import_vobs4.setAttribute)(root, "role", "region");
|
|
276
|
+
(0, import_vobs3.insertList)(root, null, () => notification.notifications.value, (entry) => createToast(entry, notification, readProp(props, "closeLabel", "Dismiss notification")), (entry) => entry.id);
|
|
277
|
+
const portal = readProp(props, "portal", void 0);
|
|
278
|
+
return portal ? createPortal(root, portal, readProp(props, "portalTarget", void 0)) : root;
|
|
1186
279
|
}
|
|
1187
280
|
__name(ToastHost, "ToastHost");
|
|
1188
281
|
function createToast(notification, context, closeLabel) {
|
|
1189
|
-
const item = createElement("li");
|
|
1190
|
-
const content = createElement("div");
|
|
1191
|
-
const close = createElement("button");
|
|
1192
|
-
setAttribute(item, "class", `vui-toast vui-toast--${notification.type}`);
|
|
1193
|
-
setAttribute(item, "data-notification-id", notification.id);
|
|
1194
|
-
setAttribute(item, "role", notification.type === "error" ? "alert" : "status");
|
|
1195
|
-
setAttribute(content, "class", "vui-toast__content");
|
|
1196
|
-
setAttribute(close, "class", "vui-toast__close");
|
|
1197
|
-
setAttribute(close, "type", "button");
|
|
1198
|
-
setAttribute(close, "aria-label", closeLabel);
|
|
1199
|
-
addEventListener(close, "click", () => context.dismiss(notification.id));
|
|
282
|
+
const item = (0, import_vobs4.createElement)("li");
|
|
283
|
+
const content = (0, import_vobs4.createElement)("div");
|
|
284
|
+
const close = (0, import_vobs4.createElement)("button");
|
|
285
|
+
(0, import_vobs4.setAttribute)(item, "class", `vui-toast vui-toast--${notification.type}`);
|
|
286
|
+
(0, import_vobs4.setAttribute)(item, "data-notification-id", notification.id);
|
|
287
|
+
(0, import_vobs4.setAttribute)(item, "role", notification.type === "error" ? "alert" : "status");
|
|
288
|
+
(0, import_vobs4.setAttribute)(content, "class", "vui-toast__content");
|
|
289
|
+
(0, import_vobs4.setAttribute)(close, "class", "vui-toast__close");
|
|
290
|
+
(0, import_vobs4.setAttribute)(close, "type", "button");
|
|
291
|
+
(0, import_vobs4.setAttribute)(close, "aria-label", closeLabel);
|
|
292
|
+
(0, import_vobs4.addEventListener)(close, "click", () => context.dismiss(notification.id));
|
|
1200
293
|
if (notification.title) {
|
|
1201
|
-
const title = createElement("div");
|
|
1202
|
-
setAttribute(title, "class", "vui-toast__title");
|
|
1203
|
-
insertBefore(title, createText(notification.title), null);
|
|
1204
|
-
insertBefore(content, title, null);
|
|
1205
|
-
}
|
|
1206
|
-
const message = createElement("div");
|
|
1207
|
-
setAttribute(message, "class", "vui-toast__message");
|
|
1208
|
-
insertBefore(message, createText(notification.content), null);
|
|
1209
|
-
insertBefore(content, message, null);
|
|
1210
|
-
insertBefore(close, Icon({ name: "x", size: 16, decorative: true }), null);
|
|
1211
|
-
insertBefore(item, content, null);
|
|
1212
|
-
insertBefore(item, close, null);
|
|
294
|
+
const title = (0, import_vobs4.createElement)("div");
|
|
295
|
+
(0, import_vobs4.setAttribute)(title, "class", "vui-toast__title");
|
|
296
|
+
(0, import_vobs4.insertBefore)(title, (0, import_vobs4.createText)(notification.title), null);
|
|
297
|
+
(0, import_vobs4.insertBefore)(content, title, null);
|
|
298
|
+
}
|
|
299
|
+
const message = (0, import_vobs4.createElement)("div");
|
|
300
|
+
(0, import_vobs4.setAttribute)(message, "class", "vui-toast__message");
|
|
301
|
+
(0, import_vobs4.insertBefore)(message, (0, import_vobs4.createText)(notification.content), null);
|
|
302
|
+
(0, import_vobs4.insertBefore)(content, message, null);
|
|
303
|
+
(0, import_vobs4.insertBefore)(close, Icon({ name: "x", size: 16, decorative: true }), null);
|
|
304
|
+
(0, import_vobs4.insertBefore)(item, content, null);
|
|
305
|
+
(0, import_vobs4.insertBefore)(item, close, null);
|
|
1213
306
|
return item;
|
|
1214
307
|
}
|
|
1215
308
|
__name(createToast, "createToast");
|
|
1216
|
-
|
|
1217
|
-
exports
|
|
1218
|
-
|
|
309
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
310
|
+
0 && (module.exports = {
|
|
311
|
+
ToastHost
|
|
312
|
+
});
|
|
1219
313
|
//# sourceMappingURL=toast.cjs.map
|