keits 0.0.1 → 0.0.3
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/dev/index.js +548 -430
- package/dist/dev/router.js +443 -0
- package/dist/dev/shared/element-C4DfKtZW.js +255 -0
- package/dist/dev/shared/graph-D6-x_CWC.js +324 -0
- package/dist/dev/shared/owner-DlUsXKXE.js +122 -0
- package/dist/dev/svg.js +70 -0
- package/dist/prod/index.js +359 -377
- package/dist/prod/router.js +343 -0
- package/dist/prod/shared/element-DUtXb3px.js +187 -0
- package/dist/prod/shared/graph-C_aA46c6.js +240 -0
- package/dist/prod/shared/owner-DgJNPM0P.js +104 -0
- package/dist/prod/svg.js +8 -0
- package/dist/types/async/index.d.ts +2 -0
- package/dist/types/async/lazy.d.ts +7 -0
- package/dist/types/async/resource.d.ts +23 -0
- package/dist/types/async/suspense-context.d.ts +4 -0
- package/dist/types/core/graph.d.ts +8 -0
- package/dist/types/dom/element.d.ts +3 -0
- package/dist/types/dom/events.d.ts +1 -0
- package/dist/types/dom/hooks.d.ts +8 -0
- package/dist/types/dom/index.d.ts +6 -0
- package/dist/types/dom/insert.d.ts +2 -0
- package/dist/types/dom/mount.d.ts +2 -0
- package/dist/types/dom/namespaces.d.ts +1 -0
- package/dist/types/dom/props.d.ts +3 -0
- package/dist/types/dom/render-effect.d.ts +1 -0
- package/dist/types/dom/tags.d.ts +112 -0
- package/dist/types/dom/types.d.ts +43 -0
- package/dist/types/dom/unsafe.d.ts +1 -0
- package/dist/types/flow/catch.d.ts +2 -0
- package/dist/types/flow/dynamic.d.ts +6 -0
- package/dist/types/flow/for.d.ts +7 -0
- package/dist/types/flow/if.d.ts +4 -0
- package/dist/types/flow/index.d.ts +8 -0
- package/dist/types/flow/portal.d.ts +2 -0
- package/dist/types/flow/range.d.ts +11 -0
- package/dist/types/flow/show.d.ts +1 -0
- package/dist/types/flow/suspense.d.ts +2 -0
- package/dist/types/flow/switch.d.ts +9 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/router/history.d.ts +21 -0
- package/dist/types/router/index.d.ts +3 -0
- package/dist/types/router/links.d.ts +1 -0
- package/dist/types/router/match.d.ts +15 -0
- package/dist/types/router/router.d.ts +10 -0
- package/dist/types/router/scroll.d.ts +5 -0
- package/dist/types/router/types.d.ts +87 -0
- package/dist/types/svg/element.d.ts +2 -0
- package/dist/types/svg/index.d.ts +3 -0
- package/dist/types/svg/tags.d.ts +63 -0
- package/dist/types/svg/types.d.ts +13 -0
- package/package.json +31 -6
|
@@ -0,0 +1,324 @@
|
|
|
1
|
+
var LOOP_LIMIT = 100;
|
|
2
|
+
var currentObserver = null;
|
|
3
|
+
var currentOwner = null;
|
|
4
|
+
var currentRunId = 0;
|
|
5
|
+
var runCounter = 0;
|
|
6
|
+
var newSources = null;
|
|
7
|
+
var keptCount = 0;
|
|
8
|
+
var batchDepth = 0;
|
|
9
|
+
var flushCounter = 0;
|
|
10
|
+
var queue = [];
|
|
11
|
+
var mounts = [];
|
|
12
|
+
var lastWritten = null;
|
|
13
|
+
var unhandledErrors = [];
|
|
14
|
+
var staticDepth = 0;
|
|
15
|
+
function track(source) {
|
|
16
|
+
const observer = currentObserver;
|
|
17
|
+
if (observer === null || source.seenBy === currentRunId) return;
|
|
18
|
+
source.seenBy = currentRunId;
|
|
19
|
+
if (newSources === null && observer.sources[keptCount] === source) {
|
|
20
|
+
keptCount++;
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
(newSources ??= []).push(source);
|
|
24
|
+
source.observers.push(observer);
|
|
25
|
+
}
|
|
26
|
+
function isTracking() {
|
|
27
|
+
return currentObserver !== null;
|
|
28
|
+
}
|
|
29
|
+
function notify(source) {
|
|
30
|
+
if (source.observers.length === 0) return;
|
|
31
|
+
lastWritten = source;
|
|
32
|
+
batchDepth++;
|
|
33
|
+
try {
|
|
34
|
+
for (const observer of source.observers) mark(observer, 2);
|
|
35
|
+
} finally {
|
|
36
|
+
endBatch();
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
function mark(node, state) {
|
|
40
|
+
if (node.state >= state) return;
|
|
41
|
+
const wasClean = node.state === 0;
|
|
42
|
+
node.state = state;
|
|
43
|
+
if (!wasClean) return;
|
|
44
|
+
if (node.kind === 1) queue.push(node);
|
|
45
|
+
else for (const observer of node.observers) mark(observer, 1);
|
|
46
|
+
}
|
|
47
|
+
function updateIfNeeded(node) {
|
|
48
|
+
if (node.state === 1) for (const source of node.sources) {
|
|
49
|
+
if (source.kind !== 2) continue;
|
|
50
|
+
updateIfNeeded(source);
|
|
51
|
+
if (node.state === 2) break;
|
|
52
|
+
}
|
|
53
|
+
if (node.state === 2) {
|
|
54
|
+
if (node.kind === 1) runEffect(node);
|
|
55
|
+
else recompute(node);
|
|
56
|
+
} else node.state = 0;
|
|
57
|
+
}
|
|
58
|
+
function recompute(node) {
|
|
59
|
+
let changed;
|
|
60
|
+
node.computing = true;
|
|
61
|
+
try {
|
|
62
|
+
const next = run(node, () => node.fn(node.value));
|
|
63
|
+
changed = !node.hasValue || node.hasError || node.equals === false || !node.equals(node.value, next);
|
|
64
|
+
if (changed) node.value = next;
|
|
65
|
+
node.hasValue = true;
|
|
66
|
+
node.hasError = false;
|
|
67
|
+
node.error = void 0;
|
|
68
|
+
} catch (error) {
|
|
69
|
+
changed = true;
|
|
70
|
+
node.hasError = true;
|
|
71
|
+
node.error = error;
|
|
72
|
+
} finally {
|
|
73
|
+
node.computing = false;
|
|
74
|
+
}
|
|
75
|
+
if (changed) {
|
|
76
|
+
for (const observer of node.observers) if (observer.state === 1) observer.state = 2;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
function runEffect(node) {
|
|
80
|
+
try {
|
|
81
|
+
run(node, node.fn);
|
|
82
|
+
} catch (error) {
|
|
83
|
+
handleError(error, node);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
function run(node, fn) {
|
|
87
|
+
cleanNode(node);
|
|
88
|
+
const prevObserver = currentObserver;
|
|
89
|
+
const prevOwner = currentOwner;
|
|
90
|
+
const prevRunId = currentRunId;
|
|
91
|
+
const prevNew = newSources;
|
|
92
|
+
const prevKept = keptCount;
|
|
93
|
+
currentObserver = node;
|
|
94
|
+
currentOwner = node;
|
|
95
|
+
currentRunId = ++runCounter;
|
|
96
|
+
newSources = null;
|
|
97
|
+
keptCount = 0;
|
|
98
|
+
node.state = 0;
|
|
99
|
+
try {
|
|
100
|
+
return fn();
|
|
101
|
+
} finally {
|
|
102
|
+
updateSources(node, newSources, keptCount);
|
|
103
|
+
currentObserver = prevObserver;
|
|
104
|
+
currentOwner = prevOwner;
|
|
105
|
+
currentRunId = prevRunId;
|
|
106
|
+
newSources = prevNew;
|
|
107
|
+
keptCount = prevKept;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
function updateSources(node, added, kept) {
|
|
111
|
+
if (node.disposed) {
|
|
112
|
+
if (added !== null) for (const source of added) unlink(source, node);
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
const sources = node.sources;
|
|
116
|
+
for (let i = kept; i < sources.length; i++) unlink(sources[i], node);
|
|
117
|
+
sources.length = kept;
|
|
118
|
+
if (added !== null) for (const source of added) sources.push(source);
|
|
119
|
+
}
|
|
120
|
+
function unlink(source, node) {
|
|
121
|
+
const observers = source.observers;
|
|
122
|
+
const i = observers.lastIndexOf(node);
|
|
123
|
+
if (i === -1) return;
|
|
124
|
+
observers[i] = observers[observers.length - 1];
|
|
125
|
+
observers.pop();
|
|
126
|
+
}
|
|
127
|
+
function batch(fn) {
|
|
128
|
+
batchDepth++;
|
|
129
|
+
try {
|
|
130
|
+
return fn();
|
|
131
|
+
} finally {
|
|
132
|
+
endBatch();
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
function endBatch() {
|
|
136
|
+
if (--batchDepth === 0) settle();
|
|
137
|
+
}
|
|
138
|
+
function settle() {
|
|
139
|
+
do {
|
|
140
|
+
flush();
|
|
141
|
+
if (mounts.length > 0) runMounts();
|
|
142
|
+
} while (queue.length > 0 || mounts.length > 0);
|
|
143
|
+
if (unhandledErrors.length > 0) {
|
|
144
|
+
const errors = unhandledErrors.splice(0);
|
|
145
|
+
throw errors.length === 1 ? errors[0] : new AggregateError(errors, "[keits] multiple unhandled errors");
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
function runMounts() {
|
|
149
|
+
batchDepth++;
|
|
150
|
+
const pending = mounts.splice(0);
|
|
151
|
+
try {
|
|
152
|
+
for (const { owner, fn } of pending) {
|
|
153
|
+
if (owner?.disposed) continue;
|
|
154
|
+
try {
|
|
155
|
+
runWithOwner(owner, fn);
|
|
156
|
+
} catch (error) {
|
|
157
|
+
handleError(error, owner);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
} finally {
|
|
161
|
+
batchDepth--;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
function flush() {
|
|
165
|
+
batchDepth++;
|
|
166
|
+
const flushId = ++flushCounter;
|
|
167
|
+
let completed = false;
|
|
168
|
+
try {
|
|
169
|
+
for (let i = 0; i < queue.length; i++) {
|
|
170
|
+
const node = queue[i];
|
|
171
|
+
if (node.state === 0) continue;
|
|
172
|
+
if (node.flushId !== flushId) {
|
|
173
|
+
node.flushId = flushId;
|
|
174
|
+
node.flushRuns = 0;
|
|
175
|
+
}
|
|
176
|
+
if (++node.flushRuns > LOOP_LIMIT) {
|
|
177
|
+
node.state = 0;
|
|
178
|
+
handleError(loopError(node), node);
|
|
179
|
+
continue;
|
|
180
|
+
}
|
|
181
|
+
runTop(node);
|
|
182
|
+
}
|
|
183
|
+
completed = true;
|
|
184
|
+
} finally {
|
|
185
|
+
if (!completed) for (const node of queue) node.state = 0;
|
|
186
|
+
queue.length = 0;
|
|
187
|
+
batchDepth--;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
function runTop(node) {
|
|
191
|
+
const staleOwners = [];
|
|
192
|
+
for (let o = node.owner; o !== null; o = o.owner) if (o.kind !== 3 && o.state !== 0) staleOwners.push(o);
|
|
193
|
+
for (let i = staleOwners.length - 1; i >= 0; i--) updateIfNeeded(staleOwners[i]);
|
|
194
|
+
updateIfNeeded(node);
|
|
195
|
+
}
|
|
196
|
+
function loopError(node) {
|
|
197
|
+
{
|
|
198
|
+
const who = node.name ? `"${node.name}"` : "an unnamed effect";
|
|
199
|
+
const what = lastWritten?.name ? ` Last signal written: "${lastWritten.name}".` : "";
|
|
200
|
+
return /* @__PURE__ */ new Error(`[keits] Infinite update loop: ${who} re-ran ${LOOP_LIMIT} times in one update. It probably writes a signal it also reads.${what}`);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
function untrack(fn) {
|
|
204
|
+
const prev = currentObserver;
|
|
205
|
+
currentObserver = null;
|
|
206
|
+
try {
|
|
207
|
+
return fn();
|
|
208
|
+
} finally {
|
|
209
|
+
currentObserver = prev;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
function adopt(node) {
|
|
213
|
+
const owner = currentOwner;
|
|
214
|
+
node.owner = owner;
|
|
215
|
+
if (owner !== null) (owner.children ??= []).push(node);
|
|
216
|
+
}
|
|
217
|
+
function getOwner() {
|
|
218
|
+
return currentOwner;
|
|
219
|
+
}
|
|
220
|
+
function runWithOwner(owner, fn) {
|
|
221
|
+
const prevOwner = currentOwner;
|
|
222
|
+
const prevObserver = currentObserver;
|
|
223
|
+
currentOwner = owner;
|
|
224
|
+
currentObserver = null;
|
|
225
|
+
try {
|
|
226
|
+
return fn();
|
|
227
|
+
} finally {
|
|
228
|
+
currentOwner = prevOwner;
|
|
229
|
+
currentObserver = prevObserver;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
function addCleanup(fn) {
|
|
233
|
+
if (currentOwner === null) return false;
|
|
234
|
+
(currentOwner.cleanups ??= []).push(fn);
|
|
235
|
+
return true;
|
|
236
|
+
}
|
|
237
|
+
function addMount(fn) {
|
|
238
|
+
if (staticDepth > 0) return;
|
|
239
|
+
queueMount(currentOwner, fn);
|
|
240
|
+
}
|
|
241
|
+
function queueMount(owner, fn) {
|
|
242
|
+
for (let o = owner; o !== null; o = o.owner) if (o.kind === 3 && o.held) {
|
|
243
|
+
o.held.push({
|
|
244
|
+
owner,
|
|
245
|
+
fn
|
|
246
|
+
});
|
|
247
|
+
return;
|
|
248
|
+
}
|
|
249
|
+
mounts.push({
|
|
250
|
+
owner,
|
|
251
|
+
fn
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
function deferMounts(fn) {
|
|
255
|
+
const holder = {
|
|
256
|
+
kind: 3,
|
|
257
|
+
owner: null,
|
|
258
|
+
children: null,
|
|
259
|
+
cleanups: null,
|
|
260
|
+
disposed: false,
|
|
261
|
+
handler: null,
|
|
262
|
+
held: []
|
|
263
|
+
};
|
|
264
|
+
adopt(holder);
|
|
265
|
+
const result = runWithOwner(holder, fn);
|
|
266
|
+
const release = () => {
|
|
267
|
+
const list = holder.held;
|
|
268
|
+
if (!list) return;
|
|
269
|
+
holder.held = null;
|
|
270
|
+
for (const { owner, fn } of list) queueMount(owner, fn);
|
|
271
|
+
};
|
|
272
|
+
return {
|
|
273
|
+
result,
|
|
274
|
+
release
|
|
275
|
+
};
|
|
276
|
+
}
|
|
277
|
+
function cleanNode(node) {
|
|
278
|
+
const children = node.children;
|
|
279
|
+
const cleanups = node.cleanups;
|
|
280
|
+
node.children = null;
|
|
281
|
+
node.cleanups = null;
|
|
282
|
+
if (children !== null) for (let i = children.length - 1; i >= 0; i--) dispose(children[i]);
|
|
283
|
+
if (cleanups !== null) for (let i = cleanups.length - 1; i >= 0; i--) try {
|
|
284
|
+
cleanups[i]();
|
|
285
|
+
} catch (error) {
|
|
286
|
+
handleError(error, node);
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
function dispose(node) {
|
|
290
|
+
if (node.disposed) return;
|
|
291
|
+
node.disposed = true;
|
|
292
|
+
if (node.kind !== 3) {
|
|
293
|
+
for (const source of node.sources) unlink(source, node);
|
|
294
|
+
node.sources.length = 0;
|
|
295
|
+
node.state = 0;
|
|
296
|
+
}
|
|
297
|
+
cleanNode(node);
|
|
298
|
+
}
|
|
299
|
+
function handleError(error, owner) {
|
|
300
|
+
for (let o = owner; o !== null; o = o.owner) {
|
|
301
|
+
if (o.kind !== 3 || o.handler === null || o.disposed) continue;
|
|
302
|
+
const handler = o.handler;
|
|
303
|
+
try {
|
|
304
|
+
runWithOwner(o.owner, () => handler(error));
|
|
305
|
+
return;
|
|
306
|
+
} catch (handlerError) {
|
|
307
|
+
error = handlerError;
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
if (batchDepth === 0) throw error;
|
|
311
|
+
unhandledErrors.push(error);
|
|
312
|
+
}
|
|
313
|
+
function isStaticRender() {
|
|
314
|
+
return staticDepth > 0;
|
|
315
|
+
}
|
|
316
|
+
function withStaticRender(fn) {
|
|
317
|
+
staticDepth++;
|
|
318
|
+
try {
|
|
319
|
+
return fn();
|
|
320
|
+
} finally {
|
|
321
|
+
staticDepth--;
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
export { withStaticRender as _, deferMounts as a, handleError as c, notify as d, runEffect as f, updateIfNeeded as g, untrack as h, batch as i, isStaticRender as l, track as m, addMount as n, dispose as o, runWithOwner as p, adopt as r, getOwner as s, addCleanup as t, isTracking as u };
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { _ as withStaticRender, c as handleError, d as notify, g as updateIfNeeded, i as batch, m as track, n as addMount, o as dispose, p as runWithOwner$1, r as adopt, s as getOwner$1, t as addCleanup } from "./graph-D6-x_CWC.js";
|
|
2
|
+
// src/core/signal.ts
|
|
3
|
+
function signal(value, options) {
|
|
4
|
+
const node = {
|
|
5
|
+
kind: 0,
|
|
6
|
+
value,
|
|
7
|
+
equals: options?.equals ?? Object.is,
|
|
8
|
+
observers: [],
|
|
9
|
+
seenBy: 0
|
|
10
|
+
};
|
|
11
|
+
if (options?.name !== void 0) node.name = options.name;
|
|
12
|
+
const read = () => {
|
|
13
|
+
track(node);
|
|
14
|
+
return node.value;
|
|
15
|
+
};
|
|
16
|
+
const set = (next) => {
|
|
17
|
+
const value = typeof next === "function" ? next(node.value) : next;
|
|
18
|
+
if (node.equals !== false && node.equals(node.value, value)) return;
|
|
19
|
+
node.value = value;
|
|
20
|
+
notify(node);
|
|
21
|
+
};
|
|
22
|
+
return Object.assign(read, { set });
|
|
23
|
+
}
|
|
24
|
+
// src/core/computed.ts
|
|
25
|
+
function computed(fn, options) {
|
|
26
|
+
const node = {
|
|
27
|
+
kind: 2,
|
|
28
|
+
fn,
|
|
29
|
+
value: void 0,
|
|
30
|
+
equals: options?.equals ?? Object.is,
|
|
31
|
+
hasValue: false,
|
|
32
|
+
hasError: false,
|
|
33
|
+
error: void 0,
|
|
34
|
+
computing: false,
|
|
35
|
+
state: 2,
|
|
36
|
+
sources: [],
|
|
37
|
+
observers: [],
|
|
38
|
+
seenBy: 0,
|
|
39
|
+
flushId: 0,
|
|
40
|
+
flushRuns: 0,
|
|
41
|
+
owner: null,
|
|
42
|
+
children: null,
|
|
43
|
+
cleanups: null,
|
|
44
|
+
disposed: false
|
|
45
|
+
};
|
|
46
|
+
if (options?.name !== void 0) node.name = options.name;
|
|
47
|
+
adopt(node);
|
|
48
|
+
return () => {
|
|
49
|
+
if (node.computing) throw cycleError(node);
|
|
50
|
+
if (node.state !== 0) updateIfNeeded(node);
|
|
51
|
+
track(node);
|
|
52
|
+
if (node.hasError) throw node.error;
|
|
53
|
+
return node.value;
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
function cycleError(node) {
|
|
57
|
+
{
|
|
58
|
+
const who = node.name ? `"${node.name}"` : "a computed";
|
|
59
|
+
return /* @__PURE__ */ new Error(`[keits] Cycle detected: ${who} reads itself (directly or through other computeds).`);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
// src/core/owner.ts
|
|
63
|
+
function getOwner() {
|
|
64
|
+
return getOwner$1();
|
|
65
|
+
}
|
|
66
|
+
function runWithOwner(owner, fn) {
|
|
67
|
+
return runWithOwner$1(owner, fn);
|
|
68
|
+
}
|
|
69
|
+
function createRoot(fn) {
|
|
70
|
+
const root = {
|
|
71
|
+
kind: 3,
|
|
72
|
+
owner: getOwner$1(),
|
|
73
|
+
children: null,
|
|
74
|
+
cleanups: null,
|
|
75
|
+
disposed: false,
|
|
76
|
+
handler: null
|
|
77
|
+
};
|
|
78
|
+
const disposeRoot = () => batch(() => dispose(root));
|
|
79
|
+
return batch(() => {
|
|
80
|
+
try {
|
|
81
|
+
return runWithOwner$1(root, () => fn(disposeRoot));
|
|
82
|
+
} catch (error) {
|
|
83
|
+
dispose(root);
|
|
84
|
+
throw error;
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
function onCleanup(fn) {
|
|
89
|
+
if (!addCleanup(fn) && true) console.warn("[keits] onCleanup was called outside an owner, so it will never run.");
|
|
90
|
+
}
|
|
91
|
+
function onMount(fn) {
|
|
92
|
+
addMount(fn);
|
|
93
|
+
}
|
|
94
|
+
function catchError(fn, handler) {
|
|
95
|
+
const boundary = {
|
|
96
|
+
kind: 3,
|
|
97
|
+
owner: null,
|
|
98
|
+
children: null,
|
|
99
|
+
cleanups: null,
|
|
100
|
+
disposed: false,
|
|
101
|
+
handler
|
|
102
|
+
};
|
|
103
|
+
adopt(boundary);
|
|
104
|
+
return batch(() => {
|
|
105
|
+
try {
|
|
106
|
+
return runWithOwner$1(boundary, fn);
|
|
107
|
+
} catch (error) {
|
|
108
|
+
handleError(error, boundary);
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
function renderStatic(fn) {
|
|
114
|
+
return withStaticRender(() => createRoot((dispose) => {
|
|
115
|
+
try {
|
|
116
|
+
return fn();
|
|
117
|
+
} finally {
|
|
118
|
+
dispose();
|
|
119
|
+
}
|
|
120
|
+
}));
|
|
121
|
+
}
|
|
122
|
+
export { onMount as a, computed as c, onCleanup as i, signal as l, createRoot as n, renderStatic as o, getOwner as r, runWithOwner as s, catchError as t };
|
package/dist/dev/svg.js
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { r as SVG_NS, t as createFactory } from "./shared/element-C4DfKtZW.js";
|
|
2
|
+
// src/svg/element.ts
|
|
3
|
+
function svg(tag) {
|
|
4
|
+
return createFactory(tag, SVG_NS);
|
|
5
|
+
}
|
|
6
|
+
// src/svg/tags.ts
|
|
7
|
+
var $a = /* @__PURE__ */ svg("a");
|
|
8
|
+
var $animate = /* @__PURE__ */ svg("animate");
|
|
9
|
+
var $animateMotion = /* @__PURE__ */ svg("animateMotion");
|
|
10
|
+
var $animateTransform = /* @__PURE__ */ svg("animateTransform");
|
|
11
|
+
var $circle = /* @__PURE__ */ svg("circle");
|
|
12
|
+
var $clipPath = /* @__PURE__ */ svg("clipPath");
|
|
13
|
+
var $defs = /* @__PURE__ */ svg("defs");
|
|
14
|
+
var $desc = /* @__PURE__ */ svg("desc");
|
|
15
|
+
var $ellipse = /* @__PURE__ */ svg("ellipse");
|
|
16
|
+
var $feBlend = /* @__PURE__ */ svg("feBlend");
|
|
17
|
+
var $feColorMatrix = /* @__PURE__ */ svg("feColorMatrix");
|
|
18
|
+
var $feComponentTransfer = /* @__PURE__ */ svg("feComponentTransfer");
|
|
19
|
+
var $feComposite = /* @__PURE__ */ svg("feComposite");
|
|
20
|
+
var $feConvolveMatrix = /* @__PURE__ */ svg("feConvolveMatrix");
|
|
21
|
+
var $feDiffuseLighting = /* @__PURE__ */ svg("feDiffuseLighting");
|
|
22
|
+
var $feDisplacementMap = /* @__PURE__ */ svg("feDisplacementMap");
|
|
23
|
+
var $feDistantLight = /* @__PURE__ */ svg("feDistantLight");
|
|
24
|
+
var $feDropShadow = /* @__PURE__ */ svg("feDropShadow");
|
|
25
|
+
var $feFlood = /* @__PURE__ */ svg("feFlood");
|
|
26
|
+
var $feFuncA = /* @__PURE__ */ svg("feFuncA");
|
|
27
|
+
var $feFuncB = /* @__PURE__ */ svg("feFuncB");
|
|
28
|
+
var $feFuncG = /* @__PURE__ */ svg("feFuncG");
|
|
29
|
+
var $feFuncR = /* @__PURE__ */ svg("feFuncR");
|
|
30
|
+
var $feGaussianBlur = /* @__PURE__ */ svg("feGaussianBlur");
|
|
31
|
+
var $feImage = /* @__PURE__ */ svg("feImage");
|
|
32
|
+
var $feMerge = /* @__PURE__ */ svg("feMerge");
|
|
33
|
+
var $feMergeNode = /* @__PURE__ */ svg("feMergeNode");
|
|
34
|
+
var $feMorphology = /* @__PURE__ */ svg("feMorphology");
|
|
35
|
+
var $feOffset = /* @__PURE__ */ svg("feOffset");
|
|
36
|
+
var $fePointLight = /* @__PURE__ */ svg("fePointLight");
|
|
37
|
+
var $feSpecularLighting = /* @__PURE__ */ svg("feSpecularLighting");
|
|
38
|
+
var $feSpotLight = /* @__PURE__ */ svg("feSpotLight");
|
|
39
|
+
var $feTile = /* @__PURE__ */ svg("feTile");
|
|
40
|
+
var $feTurbulence = /* @__PURE__ */ svg("feTurbulence");
|
|
41
|
+
var $filter = /* @__PURE__ */ svg("filter");
|
|
42
|
+
var $foreignObject = /* @__PURE__ */ svg("foreignObject");
|
|
43
|
+
var $g = /* @__PURE__ */ svg("g");
|
|
44
|
+
var $image = /* @__PURE__ */ svg("image");
|
|
45
|
+
var $line = /* @__PURE__ */ svg("line");
|
|
46
|
+
var $linearGradient = /* @__PURE__ */ svg("linearGradient");
|
|
47
|
+
var $marker = /* @__PURE__ */ svg("marker");
|
|
48
|
+
var $mask = /* @__PURE__ */ svg("mask");
|
|
49
|
+
var $metadata = /* @__PURE__ */ svg("metadata");
|
|
50
|
+
var $mpath = /* @__PURE__ */ svg("mpath");
|
|
51
|
+
var $path = /* @__PURE__ */ svg("path");
|
|
52
|
+
var $pattern = /* @__PURE__ */ svg("pattern");
|
|
53
|
+
var $polygon = /* @__PURE__ */ svg("polygon");
|
|
54
|
+
var $polyline = /* @__PURE__ */ svg("polyline");
|
|
55
|
+
var $radialGradient = /* @__PURE__ */ svg("radialGradient");
|
|
56
|
+
var $rect = /* @__PURE__ */ svg("rect");
|
|
57
|
+
var $script = /* @__PURE__ */ svg("script");
|
|
58
|
+
var $set = /* @__PURE__ */ svg("set");
|
|
59
|
+
var $stop = /* @__PURE__ */ svg("stop");
|
|
60
|
+
var $style = /* @__PURE__ */ svg("style");
|
|
61
|
+
var $svg = /* @__PURE__ */ svg("svg");
|
|
62
|
+
var $switch = /* @__PURE__ */ svg("switch");
|
|
63
|
+
var $symbol = /* @__PURE__ */ svg("symbol");
|
|
64
|
+
var $text = /* @__PURE__ */ svg("text");
|
|
65
|
+
var $textPath = /* @__PURE__ */ svg("textPath");
|
|
66
|
+
var $title = /* @__PURE__ */ svg("title");
|
|
67
|
+
var $tspan = /* @__PURE__ */ svg("tspan");
|
|
68
|
+
var $use = /* @__PURE__ */ svg("use");
|
|
69
|
+
var $view = /* @__PURE__ */ svg("view");
|
|
70
|
+
export { $a, $animate, $animateMotion, $animateTransform, $circle, $clipPath, $defs, $desc, $ellipse, $feBlend, $feColorMatrix, $feComponentTransfer, $feComposite, $feConvolveMatrix, $feDiffuseLighting, $feDisplacementMap, $feDistantLight, $feDropShadow, $feFlood, $feFuncA, $feFuncB, $feFuncG, $feFuncR, $feGaussianBlur, $feImage, $feMerge, $feMergeNode, $feMorphology, $feOffset, $fePointLight, $feSpecularLighting, $feSpotLight, $feTile, $feTurbulence, $filter, $foreignObject, $g, $image, $line, $linearGradient, $marker, $mask, $metadata, $mpath, $path, $pattern, $polygon, $polyline, $radialGradient, $rect, $script, $set, $stop, $style, $svg, $switch, $symbol, $text, $textPath, $title, $tspan, $use, $view, svg };
|