solid-js 1.9.6 → 1.9.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/dist/dev.cjs +26 -15
  2. package/dist/dev.js +334 -564
  3. package/dist/server.cjs +3 -1
  4. package/dist/server.js +83 -178
  5. package/dist/solid.cjs +26 -15
  6. package/dist/solid.js +290 -493
  7. package/h/dist/h.js +9 -40
  8. package/h/jsx-runtime/dist/jsx.js +1 -1
  9. package/h/jsx-runtime/types/index.d.ts +8 -11
  10. package/h/jsx-runtime/types/jsx.d.ts +246 -234
  11. package/h/types/hyperscript.d.ts +11 -11
  12. package/html/dist/html.js +94 -219
  13. package/html/types/lit.d.ts +33 -52
  14. package/package.json +3 -3
  15. package/store/dist/dev.cjs +9 -5
  16. package/store/dist/dev.js +50 -126
  17. package/store/dist/server.js +8 -20
  18. package/store/dist/store.cjs +9 -5
  19. package/store/dist/store.js +47 -117
  20. package/store/types/index.d.ts +7 -21
  21. package/store/types/modifiers.d.ts +3 -6
  22. package/store/types/mutable.d.ts +2 -5
  23. package/store/types/server.d.ts +5 -25
  24. package/store/types/store.d.ts +61 -218
  25. package/types/index.d.ts +11 -78
  26. package/types/jsx.d.ts +245 -229
  27. package/types/reactive/array.d.ts +4 -12
  28. package/types/reactive/observable.d.ts +16 -22
  29. package/types/reactive/scheduler.d.ts +6 -9
  30. package/types/reactive/signal.d.ts +145 -236
  31. package/types/render/Suspense.d.ts +5 -5
  32. package/types/render/component.d.ts +37 -73
  33. package/types/render/flow.d.ts +31 -43
  34. package/types/render/hydration.d.ts +15 -15
  35. package/types/server/index.d.ts +2 -57
  36. package/types/server/reactive.d.ts +45 -76
  37. package/types/server/rendering.d.ts +98 -169
  38. package/universal/dist/dev.js +12 -28
  39. package/universal/dist/universal.js +12 -28
  40. package/universal/types/index.d.ts +2 -3
  41. package/universal/types/universal.d.ts +3 -2
  42. package/web/dist/dev.cjs +89 -6
  43. package/web/dist/dev.js +174 -646
  44. package/web/dist/server.cjs +90 -5
  45. package/web/dist/server.js +194 -647
  46. package/web/dist/web.cjs +89 -6
  47. package/web/dist/web.js +172 -634
  48. package/web/storage/dist/storage.js +3 -3
  49. package/web/types/core.d.ts +1 -9
  50. package/web/types/index.d.ts +11 -31
  51. package/web/types/server-mock.d.ts +32 -47
package/web/dist/web.js CHANGED
@@ -1,82 +1,33 @@
1
- import {
2
- createMemo,
3
- createRoot,
4
- createRenderEffect,
5
- untrack,
6
- sharedConfig,
7
- enableHydration,
8
- getOwner,
9
- createEffect,
10
- runWithOwner,
11
- createSignal,
12
- onCleanup,
13
- splitProps
14
- } from "solid-js";
15
- export {
16
- ErrorBoundary,
17
- For,
18
- Index,
19
- Match,
20
- Show,
21
- Suspense,
22
- SuspenseList,
23
- Switch,
24
- createComponent,
25
- createRenderEffect as effect,
26
- getOwner,
27
- mergeProps,
28
- untrack
29
- } from "solid-js";
1
+ import { createMemo, createRoot, createRenderEffect, untrack, sharedConfig, enableHydration, getOwner, createEffect, runWithOwner, createSignal, onCleanup, splitProps } from 'solid-js';
2
+ export { ErrorBoundary, For, Index, Match, Show, Suspense, SuspenseList, Switch, createComponent, createRenderEffect as effect, getOwner, mergeProps, untrack } from 'solid-js';
30
3
 
31
- const booleans = [
32
- "allowfullscreen",
33
- "async",
34
- "autofocus",
35
- "autoplay",
36
- "checked",
37
- "controls",
38
- "default",
39
- "disabled",
40
- "formnovalidate",
41
- "hidden",
42
- "indeterminate",
43
- "inert",
44
- "ismap",
45
- "loop",
46
- "multiple",
47
- "muted",
48
- "nomodule",
49
- "novalidate",
50
- "open",
51
- "playsinline",
52
- "readonly",
53
- "required",
54
- "reversed",
55
- "seamless",
56
- "selected"
4
+ const booleans = ["allowfullscreen", "async", "alpha",
5
+ "autofocus",
6
+ "autoplay", "checked", "controls", "default", "disabled", "formnovalidate", "hidden",
7
+ "indeterminate", "inert",
8
+ "ismap", "loop", "multiple", "muted", "nomodule", "novalidate", "open", "playsinline", "readonly", "required", "reversed", "seamless",
9
+ "selected", "adauctionheaders",
10
+ "browsingtopics",
11
+ "credentialless",
12
+ "defaultchecked", "defaultmuted", "defaultselected", "defer", "disablepictureinpicture", "disableremoteplayback", "preservespitch",
13
+ "shadowrootclonable", "shadowrootcustomelementregistry",
14
+ "shadowrootdelegatesfocus", "shadowrootserializable",
15
+ "sharedstoragewritable"
57
16
  ];
58
- const Properties = /*#__PURE__*/ new Set([
59
- "className",
60
- "value",
61
- "readOnly",
62
- "noValidate",
63
- "formNoValidate",
64
- "isMap",
65
- "noModule",
66
- "playsInline",
67
- ...booleans
68
- ]);
69
- const ChildProperties = /*#__PURE__*/ new Set([
70
- "innerHTML",
71
- "textContent",
72
- "innerText",
73
- "children"
74
- ]);
75
- const Aliases = /*#__PURE__*/ Object.assign(Object.create(null), {
17
+ const Properties = /*#__PURE__*/new Set([
18
+ "className", "value",
19
+ "readOnly", "noValidate", "formNoValidate", "isMap", "noModule", "playsInline", "adAuctionHeaders",
20
+ "allowFullscreen", "browsingTopics",
21
+ "defaultChecked", "defaultMuted", "defaultSelected", "disablePictureInPicture", "disableRemotePlayback", "preservesPitch", "shadowRootClonable", "shadowRootCustomElementRegistry",
22
+ "shadowRootDelegatesFocus", "shadowRootSerializable",
23
+ "sharedStorageWritable",
24
+ ...booleans]);
25
+ const ChildProperties = /*#__PURE__*/new Set(["innerHTML", "textContent", "innerText", "children"]);
26
+ const Aliases = /*#__PURE__*/Object.assign(Object.create(null), {
76
27
  className: "class",
77
28
  htmlFor: "for"
78
29
  });
79
- const PropAliases = /*#__PURE__*/ Object.assign(Object.create(null), {
30
+ const PropAliases = /*#__PURE__*/Object.assign(Object.create(null), {
80
31
  class: "className",
81
32
  novalidate: {
82
33
  $: "noValidate",
@@ -103,400 +54,81 @@ const PropAliases = /*#__PURE__*/ Object.assign(Object.create(null), {
103
54
  $: "readOnly",
104
55
  INPUT: 1,
105
56
  TEXTAREA: 1
57
+ },
58
+ adauctionheaders: {
59
+ $: "adAuctionHeaders",
60
+ IFRAME: 1
61
+ },
62
+ allowfullscreen: {
63
+ $: "allowFullscreen",
64
+ IFRAME: 1
65
+ },
66
+ browsingtopics: {
67
+ $: "browsingTopics",
68
+ IMG: 1
69
+ },
70
+ defaultchecked: {
71
+ $: "defaultChecked",
72
+ INPUT: 1
73
+ },
74
+ defaultmuted: {
75
+ $: "defaultMuted",
76
+ AUDIO: 1,
77
+ VIDEO: 1
78
+ },
79
+ defaultselected: {
80
+ $: "defaultSelected",
81
+ OPTION: 1
82
+ },
83
+ disablepictureinpicture: {
84
+ $: "disablePictureInPicture",
85
+ VIDEO: 1
86
+ },
87
+ disableremoteplayback: {
88
+ $: "disableRemotePlayback",
89
+ AUDIO: 1,
90
+ VIDEO: 1
91
+ },
92
+ preservespitch: {
93
+ $: "preservesPitch",
94
+ AUDIO: 1,
95
+ VIDEO: 1
96
+ },
97
+ shadowrootclonable: {
98
+ $: "shadowRootClonable",
99
+ TEMPLATE: 1
100
+ },
101
+ shadowrootdelegatesfocus: {
102
+ $: "shadowRootDelegatesFocus",
103
+ TEMPLATE: 1
104
+ },
105
+ shadowrootserializable: {
106
+ $: "shadowRootSerializable",
107
+ TEMPLATE: 1
108
+ },
109
+ sharedstoragewritable: {
110
+ $: "sharedStorageWritable",
111
+ IFRAME: 1,
112
+ IMG: 1
106
113
  }
107
114
  });
108
115
  function getPropAlias(prop, tagName) {
109
116
  const a = PropAliases[prop];
110
- return typeof a === "object" ? (a[tagName] ? a["$"] : undefined) : a;
111
- }
112
- const DelegatedEvents = /*#__PURE__*/ new Set([
113
- "beforeinput",
114
- "click",
115
- "dblclick",
116
- "contextmenu",
117
- "focusin",
118
- "focusout",
119
- "input",
120
- "keydown",
121
- "keyup",
122
- "mousedown",
123
- "mousemove",
124
- "mouseout",
125
- "mouseover",
126
- "mouseup",
127
- "pointerdown",
128
- "pointermove",
129
- "pointerout",
130
- "pointerover",
131
- "pointerup",
132
- "touchend",
133
- "touchmove",
134
- "touchstart"
135
- ]);
136
- const SVGElements = /*#__PURE__*/ new Set([
137
- "altGlyph",
138
- "altGlyphDef",
139
- "altGlyphItem",
140
- "animate",
141
- "animateColor",
142
- "animateMotion",
143
- "animateTransform",
144
- "circle",
145
- "clipPath",
146
- "color-profile",
147
- "cursor",
148
- "defs",
149
- "desc",
150
- "ellipse",
151
- "feBlend",
152
- "feColorMatrix",
153
- "feComponentTransfer",
154
- "feComposite",
155
- "feConvolveMatrix",
156
- "feDiffuseLighting",
157
- "feDisplacementMap",
158
- "feDistantLight",
159
- "feDropShadow",
160
- "feFlood",
161
- "feFuncA",
162
- "feFuncB",
163
- "feFuncG",
164
- "feFuncR",
165
- "feGaussianBlur",
166
- "feImage",
167
- "feMerge",
168
- "feMergeNode",
169
- "feMorphology",
170
- "feOffset",
171
- "fePointLight",
172
- "feSpecularLighting",
173
- "feSpotLight",
174
- "feTile",
175
- "feTurbulence",
176
- "filter",
177
- "font",
178
- "font-face",
179
- "font-face-format",
180
- "font-face-name",
181
- "font-face-src",
182
- "font-face-uri",
183
- "foreignObject",
184
- "g",
185
- "glyph",
186
- "glyphRef",
187
- "hkern",
188
- "image",
189
- "line",
190
- "linearGradient",
191
- "marker",
192
- "mask",
193
- "metadata",
194
- "missing-glyph",
195
- "mpath",
196
- "path",
197
- "pattern",
198
- "polygon",
199
- "polyline",
200
- "radialGradient",
201
- "rect",
202
- "set",
203
- "stop",
204
- "svg",
205
- "switch",
206
- "symbol",
207
- "text",
208
- "textPath",
209
- "tref",
210
- "tspan",
211
- "use",
212
- "view",
213
- "vkern"
214
- ]);
117
+ return typeof a === "object" ? a[tagName] ? a["$"] : undefined : a;
118
+ }
119
+ const DelegatedEvents = /*#__PURE__*/new Set(["beforeinput", "click", "dblclick", "contextmenu", "focusin", "focusout", "input", "keydown", "keyup", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup", "pointerdown", "pointermove", "pointerout", "pointerover", "pointerup", "touchend", "touchmove", "touchstart"]);
120
+ const SVGElements = /*#__PURE__*/new Set([
121
+ "altGlyph", "altGlyphDef", "altGlyphItem", "animate", "animateColor", "animateMotion", "animateTransform", "circle", "clipPath", "color-profile", "cursor", "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", "font", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignObject", "g", "glyph", "glyphRef", "hkern", "image", "line", "linearGradient", "marker", "mask", "metadata", "missing-glyph", "mpath", "path", "pattern", "polygon", "polyline", "radialGradient", "rect",
122
+ "set", "stop",
123
+ "svg", "switch", "symbol", "text", "textPath",
124
+ "tref", "tspan", "use", "view", "vkern"]);
215
125
  const SVGNamespace = {
216
126
  xlink: "http://www.w3.org/1999/xlink",
217
127
  xml: "http://www.w3.org/XML/1998/namespace"
218
128
  };
219
- const DOMElements = /*#__PURE__*/ new Set([
220
- "html",
221
- "base",
222
- "head",
223
- "link",
224
- "meta",
225
- "style",
226
- "title",
227
- "body",
228
- "address",
229
- "article",
230
- "aside",
231
- "footer",
232
- "header",
233
- "main",
234
- "nav",
235
- "section",
236
- "body",
237
- "blockquote",
238
- "dd",
239
- "div",
240
- "dl",
241
- "dt",
242
- "figcaption",
243
- "figure",
244
- "hr",
245
- "li",
246
- "ol",
247
- "p",
248
- "pre",
249
- "ul",
250
- "a",
251
- "abbr",
252
- "b",
253
- "bdi",
254
- "bdo",
255
- "br",
256
- "cite",
257
- "code",
258
- "data",
259
- "dfn",
260
- "em",
261
- "i",
262
- "kbd",
263
- "mark",
264
- "q",
265
- "rp",
266
- "rt",
267
- "ruby",
268
- "s",
269
- "samp",
270
- "small",
271
- "span",
272
- "strong",
273
- "sub",
274
- "sup",
275
- "time",
276
- "u",
277
- "var",
278
- "wbr",
279
- "area",
280
- "audio",
281
- "img",
282
- "map",
283
- "track",
284
- "video",
285
- "embed",
286
- "iframe",
287
- "object",
288
- "param",
289
- "picture",
290
- "portal",
291
- "source",
292
- "svg",
293
- "math",
294
- "canvas",
295
- "noscript",
296
- "script",
297
- "del",
298
- "ins",
299
- "caption",
300
- "col",
301
- "colgroup",
302
- "table",
303
- "tbody",
304
- "td",
305
- "tfoot",
306
- "th",
307
- "thead",
308
- "tr",
309
- "button",
310
- "datalist",
311
- "fieldset",
312
- "form",
313
- "input",
314
- "label",
315
- "legend",
316
- "meter",
317
- "optgroup",
318
- "option",
319
- "output",
320
- "progress",
321
- "select",
322
- "textarea",
323
- "details",
324
- "dialog",
325
- "menu",
326
- "summary",
327
- "details",
328
- "slot",
329
- "template",
330
- "acronym",
331
- "applet",
332
- "basefont",
333
- "bgsound",
334
- "big",
335
- "blink",
336
- "center",
337
- "content",
338
- "dir",
339
- "font",
340
- "frame",
341
- "frameset",
342
- "hgroup",
343
- "image",
344
- "keygen",
345
- "marquee",
346
- "menuitem",
347
- "nobr",
348
- "noembed",
349
- "noframes",
350
- "plaintext",
351
- "rb",
352
- "rtc",
353
- "shadow",
354
- "spacer",
355
- "strike",
356
- "tt",
357
- "xmp",
358
- "a",
359
- "abbr",
360
- "acronym",
361
- "address",
362
- "applet",
363
- "area",
364
- "article",
365
- "aside",
366
- "audio",
367
- "b",
368
- "base",
369
- "basefont",
370
- "bdi",
371
- "bdo",
372
- "bgsound",
373
- "big",
374
- "blink",
375
- "blockquote",
376
- "body",
377
- "br",
378
- "button",
379
- "canvas",
380
- "caption",
381
- "center",
382
- "cite",
383
- "code",
384
- "col",
385
- "colgroup",
386
- "content",
387
- "data",
388
- "datalist",
389
- "dd",
390
- "del",
391
- "details",
392
- "dfn",
393
- "dialog",
394
- "dir",
395
- "div",
396
- "dl",
397
- "dt",
398
- "em",
399
- "embed",
400
- "fieldset",
401
- "figcaption",
402
- "figure",
403
- "font",
404
- "footer",
405
- "form",
406
- "frame",
407
- "frameset",
408
- "head",
409
- "header",
410
- "hgroup",
411
- "hr",
412
- "html",
413
- "i",
414
- "iframe",
415
- "image",
416
- "img",
417
- "input",
418
- "ins",
419
- "kbd",
420
- "keygen",
421
- "label",
422
- "legend",
423
- "li",
424
- "link",
425
- "main",
426
- "map",
427
- "mark",
428
- "marquee",
429
- "menu",
430
- "menuitem",
431
- "meta",
432
- "meter",
433
- "nav",
434
- "nobr",
435
- "noembed",
436
- "noframes",
437
- "noscript",
438
- "object",
439
- "ol",
440
- "optgroup",
441
- "option",
442
- "output",
443
- "p",
444
- "param",
445
- "picture",
446
- "plaintext",
447
- "portal",
448
- "pre",
449
- "progress",
450
- "q",
451
- "rb",
452
- "rp",
453
- "rt",
454
- "rtc",
455
- "ruby",
456
- "s",
457
- "samp",
458
- "script",
459
- "section",
460
- "select",
461
- "shadow",
462
- "slot",
463
- "small",
464
- "source",
465
- "spacer",
466
- "span",
467
- "strike",
468
- "strong",
469
- "style",
470
- "sub",
471
- "summary",
472
- "sup",
473
- "table",
474
- "tbody",
475
- "td",
476
- "template",
477
- "textarea",
478
- "tfoot",
479
- "th",
480
- "thead",
481
- "time",
482
- "title",
483
- "tr",
484
- "track",
485
- "tt",
486
- "u",
487
- "ul",
488
- "var",
489
- "video",
490
- "wbr",
491
- "xmp",
492
- "input",
493
- "h1",
494
- "h2",
495
- "h3",
496
- "h4",
497
- "h5",
498
- "h6"
499
- ]);
129
+ const DOMElements = /*#__PURE__*/new Set(["html", "base", "head", "link", "meta", "style", "title", "body", "address", "article", "aside", "footer", "header", "main", "nav", "section", "body", "blockquote", "dd", "div", "dl", "dt", "figcaption", "figure", "hr", "li", "ol", "p", "pre", "ul", "a", "abbr", "b", "bdi", "bdo", "br", "cite", "code", "data", "dfn", "em", "i", "kbd", "mark", "q", "rp", "rt", "ruby", "s", "samp", "small", "span", "strong", "sub", "sup", "time", "u", "var", "wbr", "area", "audio", "img", "map", "track", "video", "embed", "iframe", "object", "param", "picture", "portal", "source", "svg", "math", "canvas", "noscript", "script", "del", "ins", "caption", "col", "colgroup", "table", "tbody", "td", "tfoot", "th", "thead", "tr", "button", "datalist", "fieldset", "form", "input", "label", "legend", "meter", "optgroup", "option", "output", "progress", "select", "textarea", "details", "dialog", "menu", "summary", "details", "slot", "template", "acronym", "applet", "basefont", "bgsound", "big", "blink", "center", "content", "dir", "font", "frame", "frameset", "hgroup", "image", "keygen", "marquee", "menuitem", "nobr", "noembed", "noframes", "plaintext", "rb", "rtc", "shadow", "spacer", "strike", "tt", "xmp", "a", "abbr", "acronym", "address", "applet", "area", "article", "aside", "audio", "b", "base", "basefont", "bdi", "bdo", "bgsound", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "em", "embed", "fieldset", "figcaption", "figure", "font", "footer", "form", "frame", "frameset", "head", "header", "hgroup", "hr", "html", "i", "iframe", "image", "img", "input", "ins", "kbd", "keygen", "label", "legend", "li", "link", "main", "map", "mark", "marquee", "menu", "menuitem", "meta", "meter", "nav", "nobr", "noembed", "noframes", "noscript", "object", "ol", "optgroup", "option", "output", "p", "param", "picture", "plaintext", "portal", "pre", "progress", "q", "rb", "rp", "rt", "rtc", "ruby", "s", "samp", "script", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "title", "tr", "track", "tt", "u", "ul", "var", "video", "wbr", "xmp", "input", "h1", "h2", "h3", "h4", "h5", "h6",
130
+ "webview",
131
+ "isindex", "listing", "multicol", "nextid", "noindex", "search"]);
500
132
 
501
133
  const memo = fn => createMemo(() => fn());
502
134
 
@@ -519,7 +151,7 @@ function reconcileArrays(parentNode, a, b) {
519
151
  bEnd--;
520
152
  }
521
153
  if (aEnd === aStart) {
522
- const node = bEnd < bLength ? (bStart ? b[bStart - 1].nextSibling : b[bEnd - bStart]) : after;
154
+ const node = bEnd < bLength ? bStart ? b[bStart - 1].nextSibling : b[bEnd - bStart] : after;
523
155
  while (bStart < bEnd) parentNode.insertBefore(b[bStart++], node);
524
156
  } else if (bEnd === bStart) {
525
157
  while (aStart < aEnd) {
@@ -562,9 +194,7 @@ function render(code, element, init, options = {}) {
562
194
  let disposer;
563
195
  createRoot(dispose => {
564
196
  disposer = dispose;
565
- element === document
566
- ? code()
567
- : insert(element, code(), element.firstChild ? null : undefined, init);
197
+ element === document ? code() : insert(element, code(), element.firstChild ? null : undefined, init);
568
198
  }, options.owner);
569
199
  return () => {
570
200
  disposer();
@@ -574,15 +204,11 @@ function render(code, element, init, options = {}) {
574
204
  function template(html, isImportNode, isSVG, isMathML) {
575
205
  let node;
576
206
  const create = () => {
577
- const t = isMathML
578
- ? document.createElementNS("http://www.w3.org/1998/Math/MathML", "template")
579
- : document.createElement("template");
207
+ const t = isMathML ? document.createElementNS("http://www.w3.org/1998/Math/MathML", "template") : document.createElement("template");
580
208
  t.innerHTML = html;
581
209
  return isSVG ? t.content.firstChild.firstChild : isMathML ? t.firstChild : t.content.firstChild;
582
210
  };
583
- const fn = isImportNode
584
- ? () => untrack(() => document.importNode(node || (node = create()), true))
585
- : () => (node || (node = create())).cloneNode(true);
211
+ const fn = isImportNode ? () => untrack(() => document.importNode(node || (node = create()), true)) : () => (node || (node = create())).cloneNode(true);
586
212
  fn.cloneNode = fn;
587
213
  return fn;
588
214
  }
@@ -608,13 +234,11 @@ function setProperty(node, name, value) {
608
234
  }
609
235
  function setAttribute(node, name, value) {
610
236
  if (isHydrating(node)) return;
611
- if (value == null) node.removeAttribute(name);
612
- else node.setAttribute(name, value);
237
+ if (value == null) node.removeAttribute(name);else node.setAttribute(name, value);
613
238
  }
614
239
  function setAttributeNS(node, namespace, name, value) {
615
240
  if (isHydrating(node)) return;
616
- if (value == null) node.removeAttributeNS(namespace, name);
617
- else node.setAttributeNS(namespace, name, value);
241
+ if (value == null) node.removeAttributeNS(namespace, name);else node.setAttributeNS(namespace, name, value);
618
242
  }
619
243
  function setBoolAttribute(node, name, value) {
620
244
  if (isHydrating(node)) return;
@@ -622,8 +246,7 @@ function setBoolAttribute(node, name, value) {
622
246
  }
623
247
  function className(node, value) {
624
248
  if (isHydrating(node)) return;
625
- if (value == null) node.removeAttribute("class");
626
- else node.className = value;
249
+ if (value == null) node.removeAttribute("class");else node.className = value;
627
250
  }
628
251
  function addEventListener(node, name, handler, delegate) {
629
252
  if (delegate) {
@@ -633,7 +256,7 @@ function addEventListener(node, name, handler, delegate) {
633
256
  } else node[`$$${name}`] = handler;
634
257
  } else if (Array.isArray(handler)) {
635
258
  const handlerFn = handler[0];
636
- node.addEventListener(name, (handler[0] = e => handlerFn.call(node, handler[1], e)));
259
+ node.addEventListener(name, handler[0] = e => handlerFn.call(node, handler[1], e));
637
260
  } else node.addEventListener(name, handler, typeof handler !== "function" && handler);
638
261
  }
639
262
  function classList(node, value, prev = {}) {
@@ -658,7 +281,7 @@ function classList(node, value, prev = {}) {
658
281
  function style(node, value, prev) {
659
282
  if (!value) return prev ? setAttribute(node, "style") : value;
660
283
  const nodeStyle = node.style;
661
- if (typeof value === "string") return (nodeStyle.cssText = value);
284
+ if (typeof value === "string") return nodeStyle.cssText = value;
662
285
  typeof prev === "string" && (nodeStyle.cssText = prev = undefined);
663
286
  prev || (prev = {});
664
287
  value || (value = {});
@@ -676,12 +299,13 @@ function style(node, value, prev) {
676
299
  }
677
300
  return prev;
678
301
  }
302
+ function setStyleProperty(node, name, value) {
303
+ value != null ? node.style.setProperty(name, value) : node.style.removeProperty(name);
304
+ }
679
305
  function spread(node, props = {}, isSVG, skipChildren) {
680
306
  const prevProps = {};
681
307
  if (!skipChildren) {
682
- createRenderEffect(
683
- () => (prevProps.children = insertExpression(node, props.children, prevProps.children))
684
- );
308
+ createRenderEffect(() => prevProps.children = insertExpression(node, props.children, prevProps.children));
685
309
  }
686
310
  createRenderEffect(() => typeof props.ref === "function" && use(props.ref, node));
687
311
  createRenderEffect(() => assign(node, props, isSVG, true, prevProps, true));
@@ -745,7 +369,7 @@ function getNextElement(template) {
745
369
  let node,
746
370
  key,
747
371
  hydrating = isHydrating();
748
- if (!hydrating || !(node = sharedConfig.registry.get((key = getHydrationKey())))) {
372
+ if (!hydrating || !(node = sharedConfig.registry.get(key = getHydrationKey()))) {
749
373
  return template();
750
374
  }
751
375
  if (sharedConfig.completed) sharedConfig.completed.add(node);
@@ -764,8 +388,7 @@ function getNextMarker(start) {
764
388
  while (end) {
765
389
  if (end.nodeType === 8) {
766
390
  const v = end.nodeValue;
767
- if (v === "$") count++;
768
- else if (v === "/") {
391
+ if (v === "$") count++;else if (v === "/") {
769
392
  if (count === 0) return [end, current];
770
393
  count--;
771
394
  }
@@ -779,7 +402,10 @@ function getNextMarker(start) {
779
402
  function runHydrationEvents() {
780
403
  if (sharedConfig.events && !sharedConfig.events.queued) {
781
404
  queueMicrotask(() => {
782
- const { completed, events } = sharedConfig;
405
+ const {
406
+ completed,
407
+ events
408
+ } = sharedConfig;
783
409
  if (!events) return;
784
410
  events.queued = false;
785
411
  while (events.length) {
@@ -804,8 +430,7 @@ function toPropertyName(name) {
804
430
  }
805
431
  function toggleClassKey(node, key, value) {
806
432
  const classNames = key.trim().split(/\s+/);
807
- for (let i = 0, nameLen = classNames.length; i < nameLen; i++)
808
- node.classList.toggle(classNames[i], value);
433
+ for (let i = 0, nameLen = classNames.length; i < nameLen; i++) node.classList.toggle(classNames[i], value);
809
434
  }
810
435
  function assignProp(node, prop, value, prev, isSVG, skipRef, props) {
811
436
  let isCE, isProp, isChildProp, propAlias, forceProp;
@@ -837,24 +462,15 @@ function assignProp(node, prop, value, prev, isSVG, skipRef, props) {
837
462
  setAttribute(node, prop.slice(5), value);
838
463
  } else if (prop.slice(0, 5) === "bool:") {
839
464
  setBoolAttribute(node, prop.slice(5), value);
840
- } else if (
841
- (forceProp = prop.slice(0, 5) === "prop:") ||
842
- (isChildProp = ChildProperties.has(prop)) ||
843
- (!isSVG &&
844
- ((propAlias = getPropAlias(prop, node.tagName)) || (isProp = Properties.has(prop)))) ||
845
- (isCE = node.nodeName.includes("-") || "is" in props)
846
- ) {
465
+ } else if ((forceProp = prop.slice(0, 5) === "prop:") || (isChildProp = ChildProperties.has(prop)) || !isSVG && ((propAlias = getPropAlias(prop, node.tagName)) || (isProp = Properties.has(prop))) || (isCE = node.nodeName.includes("-") || "is" in props)) {
847
466
  if (forceProp) {
848
467
  prop = prop.slice(5);
849
468
  isProp = true;
850
469
  } else if (isHydrating(node)) return value;
851
- if (prop === "class" || prop === "className") className(node, value);
852
- else if (isCE && !isProp && !isChildProp) node[toPropertyName(prop)] = value;
853
- else node[propAlias || prop] = value;
470
+ if (prop === "class" || prop === "className") className(node, value);else if (isCE && !isProp && !isChildProp) node[toPropertyName(prop)] = value;else node[propAlias || prop] = value;
854
471
  } else {
855
472
  const ns = isSVG && prop.indexOf(":") > -1 && SVGNamespace[prop.split(":")[0]];
856
- if (ns) setAttributeNS(node, ns, prop, value);
857
- else setAttribute(node, Aliases[prop] || prop, value);
473
+ if (ns) setAttributeNS(node, ns, prop, value);else setAttribute(node, Aliases[prop] || prop, value);
858
474
  }
859
475
  return value;
860
476
  }
@@ -866,11 +482,10 @@ function eventHandler(e) {
866
482
  const key = `$$${e.type}`;
867
483
  const oriTarget = e.target;
868
484
  const oriCurrentTarget = e.currentTarget;
869
- const retarget = value =>
870
- Object.defineProperty(e, "target", {
871
- configurable: true,
872
- value
873
- });
485
+ const retarget = value => Object.defineProperty(e, "target", {
486
+ configurable: true,
487
+ value
488
+ });
874
489
  const handleNode = () => {
875
490
  const handler = node[key];
876
491
  if (handler && !node.disabled) {
@@ -878,11 +493,7 @@ function eventHandler(e) {
878
493
  data !== undefined ? handler.call(node, data, e) : handler.call(node, e);
879
494
  if (e.cancelBubble) return;
880
495
  }
881
- node.host &&
882
- typeof node.host !== "string" &&
883
- !node.host._$host &&
884
- node.contains(e.target) &&
885
- retarget(node.host);
496
+ node.host && typeof node.host !== "string" && !node.host._$host && node.contains(e.target) && retarget(node.host);
886
497
  return true;
887
498
  };
888
499
  const walkUpTree = () => {
@@ -910,7 +521,8 @@ function eventHandler(e) {
910
521
  break;
911
522
  }
912
523
  }
913
- } else walkUpTree();
524
+ }
525
+ else walkUpTree();
914
526
  retarget(oriTarget);
915
527
  }
916
528
  function insertExpression(parent, value, current, marker, unwrapArray) {
@@ -920,8 +532,7 @@ function insertExpression(parent, value, current, marker, unwrapArray) {
920
532
  let cleaned = [];
921
533
  for (let i = 0; i < current.length; i++) {
922
534
  const node = current[i];
923
- if (node.nodeType === 8 && node.data.slice(0, 2) === "!$") node.remove();
924
- else cleaned.push(node);
535
+ if (node.nodeType === 8 && node.data.slice(0, 2) === "!$") node.remove();else cleaned.push(node);
925
536
  }
926
537
  current = cleaned;
927
538
  }
@@ -929,7 +540,7 @@ function insertExpression(parent, value, current, marker, unwrapArray) {
929
540
  if (value === current) return current;
930
541
  const t = typeof value,
931
542
  multi = marker !== undefined;
932
- parent = (multi && current[0] && current[0].parentNode) || parent;
543
+ parent = multi && current[0] && current[0].parentNode || parent;
933
544
  if (t === "string" || t === "number") {
934
545
  if (hydrating) return current;
935
546
  if (t === "number") {
@@ -961,17 +572,17 @@ function insertExpression(parent, value, current, marker, unwrapArray) {
961
572
  const array = [];
962
573
  const currentArray = current && Array.isArray(current);
963
574
  if (normalizeIncomingArray(array, value, current, unwrapArray)) {
964
- createRenderEffect(() => (current = insertExpression(parent, array, current, marker, true)));
575
+ createRenderEffect(() => current = insertExpression(parent, array, current, marker, true));
965
576
  return () => current;
966
577
  }
967
578
  if (hydrating) {
968
579
  if (!array.length) return current;
969
- if (marker === undefined) return (current = [...parent.childNodes]);
580
+ if (marker === undefined) return current = [...parent.childNodes];
970
581
  let node = array[0];
971
582
  if (node.parentNode !== parent) return current;
972
583
  const nodes = [node];
973
584
  while ((node = node.nextSibling) !== marker) nodes.push(node);
974
- return (current = nodes);
585
+ return current = nodes;
975
586
  }
976
587
  if (array.length === 0) {
977
588
  current = cleanChildren(parent, current, marker);
@@ -986,15 +597,15 @@ function insertExpression(parent, value, current, marker, unwrapArray) {
986
597
  }
987
598
  current = array;
988
599
  } else if (value.nodeType) {
989
- if (hydrating && value.parentNode) return (current = multi ? [value] : value);
600
+ if (hydrating && value.parentNode) return current = multi ? [value] : value;
990
601
  if (Array.isArray(current)) {
991
- if (multi) return (current = cleanChildren(parent, current, marker, value));
602
+ if (multi) return current = cleanChildren(parent, current, marker, value);
992
603
  cleanChildren(parent, current, null, value);
993
604
  } else if (current == null || current === "" || !parent.firstChild) {
994
605
  parent.appendChild(value);
995
606
  } else parent.replaceChild(value, parent.firstChild);
996
607
  current = value;
997
- } else;
608
+ } else ;
998
609
  return current;
999
610
  }
1000
611
  function normalizeIncomingArray(normalized, array, current, unwrap) {
@@ -1003,28 +614,21 @@ function normalizeIncomingArray(normalized, array, current, unwrap) {
1003
614
  let item = array[i],
1004
615
  prev = current && current[normalized.length],
1005
616
  t;
1006
- if (item == null || item === true || item === false);
1007
- else if ((t = typeof item) === "object" && item.nodeType) {
617
+ if (item == null || item === true || item === false) ; else if ((t = typeof item) === "object" && item.nodeType) {
1008
618
  normalized.push(item);
1009
619
  } else if (Array.isArray(item)) {
1010
620
  dynamic = normalizeIncomingArray(normalized, item, prev) || dynamic;
1011
621
  } else if (t === "function") {
1012
622
  if (unwrap) {
1013
623
  while (typeof item === "function") item = item();
1014
- dynamic =
1015
- normalizeIncomingArray(
1016
- normalized,
1017
- Array.isArray(item) ? item : [item],
1018
- Array.isArray(prev) ? prev : [prev]
1019
- ) || dynamic;
624
+ dynamic = normalizeIncomingArray(normalized, Array.isArray(item) ? item : [item], Array.isArray(prev) ? prev : [prev]) || dynamic;
1020
625
  } else {
1021
626
  normalized.push(item);
1022
627
  dynamic = true;
1023
628
  }
1024
629
  } else {
1025
630
  const value = String(item);
1026
- if (prev && prev.nodeType === 3 && prev.data === value) normalized.push(prev);
1027
- else normalized.push(document.createTextNode(value));
631
+ if (prev && prev.nodeType === 3 && prev.data === value) normalized.push(prev);else normalized.push(document.createTextNode(value));
1028
632
  }
1029
633
  }
1030
634
  return dynamic;
@@ -1033,7 +637,7 @@ function appendNodes(parent, array, marker = null) {
1033
637
  for (let i = 0, len = array.length; i < len; i++) parent.insertBefore(array[i], marker);
1034
638
  }
1035
639
  function cleanChildren(parent, current, marker, replacement) {
1036
- if (marker === undefined) return (parent.textContent = "");
640
+ if (marker === undefined) return parent.textContent = "";
1037
641
  const node = replacement || document.createTextNode("");
1038
642
  if (current.length) {
1039
643
  let inserted = false;
@@ -1041,9 +645,7 @@ function cleanChildren(parent, current, marker, replacement) {
1041
645
  const el = current[i];
1042
646
  if (node !== el) {
1043
647
  const isParent = el.parentNode === parent;
1044
- if (!inserted && !i)
1045
- isParent ? parent.replaceChild(node, el) : parent.insertBefore(node, marker);
1046
- else isParent && el.remove();
648
+ if (!inserted && !i) isParent ? parent.replaceChild(node, el) : parent.insertBefore(node, marker);else isParent && el.remove();
1047
649
  } else inserted = true;
1048
650
  }
1049
651
  } else parent.insertBefore(node, marker);
@@ -1054,8 +656,7 @@ function gatherHydratable(element, root) {
1054
656
  for (let i = 0; i < templates.length; i++) {
1055
657
  const node = templates[i];
1056
658
  const key = node.getAttribute("data-hk");
1057
- if ((!root || key.startsWith(root)) && !sharedConfig.registry.has(key))
1058
- sharedConfig.registry.set(key, node);
659
+ if ((!root || key.startsWith(root)) && !sharedConfig.registry.has(key)) sharedConfig.registry.set(key, node);
1059
660
  }
1060
661
  }
1061
662
  function getHydrationKey() {
@@ -1099,55 +700,52 @@ function ssrSpread(props, isSVG, skipChildren) {}
1099
700
  const isServer = false;
1100
701
  const isDev = false;
1101
702
  const SVG_NAMESPACE = "http://www.w3.org/2000/svg";
1102
- function createElement(tagName, isSVG = false) {
1103
- return isSVG ? document.createElementNS(SVG_NAMESPACE, tagName) : document.createElement(tagName);
703
+ function createElement(tagName, isSVG = false, is = undefined) {
704
+ return isSVG ? document.createElementNS(SVG_NAMESPACE, tagName) : document.createElement(tagName, {
705
+ is
706
+ });
1104
707
  }
1105
708
  const hydrate = (...args) => {
1106
709
  enableHydration();
1107
710
  return hydrate$1(...args);
1108
711
  };
1109
712
  function Portal(props) {
1110
- const { useShadow } = props,
713
+ const {
714
+ useShadow
715
+ } = props,
1111
716
  marker = document.createTextNode(""),
1112
717
  mount = () => props.mount || document.body,
1113
718
  owner = getOwner();
1114
719
  let content;
1115
720
  let hydrating = !!sharedConfig.context;
1116
- createEffect(
1117
- () => {
1118
- if (hydrating) getOwner().user = hydrating = false;
1119
- content || (content = runWithOwner(owner, () => createMemo(() => props.children)));
1120
- const el = mount();
1121
- if (el instanceof HTMLHeadElement) {
1122
- const [clean, setClean] = createSignal(false);
1123
- const cleanup = () => setClean(true);
1124
- createRoot(dispose => insert(el, () => (!clean() ? content() : dispose()), null));
1125
- onCleanup(cleanup);
1126
- } else {
1127
- const container = createElement(props.isSVG ? "g" : "div", props.isSVG),
1128
- renderRoot =
1129
- useShadow && container.attachShadow
1130
- ? container.attachShadow({
1131
- mode: "open"
1132
- })
1133
- : container;
1134
- Object.defineProperty(container, "_$host", {
1135
- get() {
1136
- return marker.parentNode;
1137
- },
1138
- configurable: true
1139
- });
1140
- insert(renderRoot, content);
1141
- el.appendChild(container);
1142
- props.ref && props.ref(container);
1143
- onCleanup(() => el.removeChild(container));
1144
- }
1145
- },
1146
- undefined,
1147
- {
1148
- render: !hydrating
721
+ createEffect(() => {
722
+ if (hydrating) getOwner().user = hydrating = false;
723
+ content || (content = runWithOwner(owner, () => createMemo(() => props.children)));
724
+ const el = mount();
725
+ if (el instanceof HTMLHeadElement) {
726
+ const [clean, setClean] = createSignal(false);
727
+ const cleanup = () => setClean(true);
728
+ createRoot(dispose => insert(el, () => !clean() ? content() : dispose(), null));
729
+ onCleanup(cleanup);
730
+ } else {
731
+ const container = createElement(props.isSVG ? "g" : "div", props.isSVG),
732
+ renderRoot = useShadow && container.attachShadow ? container.attachShadow({
733
+ mode: "open"
734
+ }) : container;
735
+ Object.defineProperty(container, "_$host", {
736
+ get() {
737
+ return marker.parentNode;
738
+ },
739
+ configurable: true
740
+ });
741
+ insert(renderRoot, content);
742
+ el.appendChild(container);
743
+ props.ref && props.ref(container);
744
+ onCleanup(() => el.removeChild(container));
1149
745
  }
1150
- );
746
+ }, undefined, {
747
+ render: !hydrating
748
+ });
1151
749
  return marker;
1152
750
  }
1153
751
  function createDynamic(component, props) {
@@ -1159,7 +757,7 @@ function createDynamic(component, props) {
1159
757
  return untrack(() => component(props));
1160
758
  case "string":
1161
759
  const isSvg = SVGElements.has(component);
1162
- const el = sharedConfig.context ? getNextElement() : createElement(component, isSvg);
760
+ const el = sharedConfig.context ? getNextElement() : createElement(component, isSvg, props.is);
1163
761
  spread(el, props, isSvg);
1164
762
  return el;
1165
763
  }
@@ -1170,64 +768,4 @@ function Dynamic(props) {
1170
768
  return createDynamic(() => props.component, others);
1171
769
  }
1172
770
 
1173
- export {
1174
- Aliases,
1175
- voidFn as Assets,
1176
- ChildProperties,
1177
- DOMElements,
1178
- DelegatedEvents,
1179
- Dynamic,
1180
- Hydration,
1181
- voidFn as HydrationScript,
1182
- NoHydration,
1183
- Portal,
1184
- Properties,
1185
- RequestContext,
1186
- SVGElements,
1187
- SVGNamespace,
1188
- addEventListener,
1189
- assign,
1190
- classList,
1191
- className,
1192
- clearDelegatedEvents,
1193
- createDynamic,
1194
- delegateEvents,
1195
- dynamicProperty,
1196
- escape,
1197
- voidFn as generateHydrationScript,
1198
- voidFn as getAssets,
1199
- getHydrationKey,
1200
- getNextElement,
1201
- getNextMarker,
1202
- getNextMatch,
1203
- getPropAlias,
1204
- voidFn as getRequestEvent,
1205
- hydrate,
1206
- innerHTML,
1207
- insert,
1208
- isDev,
1209
- isServer,
1210
- memo,
1211
- render,
1212
- renderToStream,
1213
- renderToString,
1214
- renderToStringAsync,
1215
- resolveSSRNode,
1216
- runHydrationEvents,
1217
- setAttribute,
1218
- setAttributeNS,
1219
- setBoolAttribute,
1220
- setProperty,
1221
- spread,
1222
- ssr,
1223
- ssrAttribute,
1224
- ssrClassList,
1225
- ssrElement,
1226
- ssrHydrationKey,
1227
- ssrSpread,
1228
- ssrStyle,
1229
- style,
1230
- template,
1231
- use,
1232
- voidFn as useAssets
1233
- };
771
+ export { Aliases, voidFn as Assets, ChildProperties, DOMElements, DelegatedEvents, Dynamic, Hydration, voidFn as HydrationScript, NoHydration, Portal, Properties, RequestContext, SVGElements, SVGNamespace, addEventListener, assign, classList, className, clearDelegatedEvents, createDynamic, delegateEvents, dynamicProperty, escape, voidFn as generateHydrationScript, voidFn as getAssets, getHydrationKey, getNextElement, getNextMarker, getNextMatch, getPropAlias, voidFn as getRequestEvent, hydrate, innerHTML, insert, isDev, isServer, memo, render, renderToStream, renderToString, renderToStringAsync, resolveSSRNode, runHydrationEvents, setAttribute, setAttributeNS, setBoolAttribute, setProperty, setStyleProperty, spread, ssr, ssrAttribute, ssrClassList, ssrElement, ssrHydrationKey, ssrSpread, ssrStyle, style, template, use, voidFn as useAssets };