solid-js 1.4.1 → 1.4.4

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.
@@ -5,9 +5,9 @@ export declare namespace SolidStore {
5
5
  }
6
6
  }
7
7
  export declare type NotWrappable = string | number | bigint | symbol | boolean | Function | null | undefined | SolidStore.Unwrappable[keyof SolidStore.Unwrappable];
8
- export declare type Store<T> = DeepReadonly<T>;
9
- export declare function isWrappable(obj: any): any;
10
- export declare function unwrap<T extends StoreNode>(item: any, set?: Set<unknown>): T;
8
+ export declare type Store<T> = T;
9
+ export declare function isWrappable<T>(obj: T | NotWrappable): obj is T;
10
+ export declare function unwrap<T>(item: T, set?: Set<unknown>): T;
11
11
  export declare function getDataNodes(target: StoreNode): any;
12
12
  export declare function getDataNode(nodes: Record<string, any>, property: string | symbol, value: any): any;
13
13
  export declare function proxyDescriptor(target: StoreNode, property: PropertyKey): PropertyDescriptor | undefined;
@@ -15,19 +15,26 @@ export declare function trackSelf(target: StoreNode): void;
15
15
  export declare function ownKeys(target: StoreNode): (string | symbol)[];
16
16
  export declare function setProperty(state: StoreNode, property: PropertyKey, value: any): void;
17
17
  export declare function updatePath(current: StoreNode, path: any[], traversed?: PropertyKey[]): void;
18
+ /** @deprecated */
18
19
  export declare type DeepReadonly<T> = 0 extends 1 & T ? T : T extends NotWrappable ? T : {
19
20
  readonly [K in keyof T]: DeepReadonly<T[K]>;
20
21
  };
22
+ /** @deprecated */
21
23
  export declare type DeepMutable<T> = 0 extends 1 & T ? T : T extends NotWrappable ? T : {
22
24
  -readonly [K in keyof T]: DeepMutable<T[K]>;
23
25
  };
26
+ export declare type CustomPartial<T> = T extends readonly unknown[] ? "0" extends keyof T ? {
27
+ [K in Extract<keyof T, `${number}`>]?: T[K];
28
+ } : {
29
+ [x: number]: T[number];
30
+ } : Partial<T>;
24
31
  export declare type StorePathRange = {
25
32
  from?: number;
26
33
  to?: number;
27
34
  by?: number;
28
35
  };
29
- export declare type ArrayFilterFn<T> = (item: DeepReadonly<T>, index: number) => boolean;
30
- export declare type StoreSetter<T, U extends PropertyKey[] = []> = ((prevState: DeepReadonly<T>, traversed: U) => T | Partial<T> | DeepReadonly<T> | Partial<DeepReadonly<T>> | void) | T | Partial<T> | DeepReadonly<T> | Partial<DeepReadonly<T>>;
36
+ export declare type ArrayFilterFn<T> = (item: T, index: number) => boolean;
37
+ export declare type StoreSetter<T, U extends PropertyKey[] = []> = ((prevState: T, traversed: U) => T | CustomPartial<T> | void) | T | CustomPartial<T>;
31
38
  export declare type Part<T, K extends KeyOf<T> = KeyOf<T>> = [K] extends [never] ? never : K | readonly K[] | ([T] extends [readonly unknown[]] ? ArrayFilterFn<T[number]> | StorePathRange : never);
32
39
  declare type W<T> = Exclude<T, NotWrappable>;
33
40
  declare type KeyOf<T> = number extends keyof T ? 0 extends 1 & T ? keyof T : [T] extends [readonly unknown[]] ? number : [T] extends [never] ? never : keyof T : keyof T;
@@ -200,13 +200,12 @@ export declare function createMemo<Next extends Prev, Init = Next, Prev = Next>(
200
200
  export interface Resource<T> extends Accessor<T> {
201
201
  loading: boolean;
202
202
  error: any;
203
- latest: T | undefined;
203
+ latest: T;
204
204
  }
205
205
  export declare type ResourceActions<T> = {
206
206
  mutate: Setter<T>;
207
207
  refetch: (info?: unknown) => T | Promise<T> | undefined | null;
208
208
  };
209
- export declare type ResourceReturn<T> = [Resource<T>, ResourceActions<T>];
210
209
  export declare type ResourceSource<S> = S | false | null | undefined | (() => S | false | null | undefined);
211
210
  export declare type ResourceFetcher<S, T> = (k: S, info: ResourceFetcherInfo<T>) => T | Promise<T>;
212
211
  export declare type ResourceFetcherInfo<T> = {
@@ -224,6 +223,10 @@ export declare type ResourceOptions<T> = undefined extends T ? {
224
223
  deferStream?: boolean;
225
224
  onHydrated?: <S, T>(k: S, info: ResourceFetcherInfo<T>) => void;
226
225
  };
226
+ export declare type ResourceReturn<T, O extends ResourceOptions<T | undefined> | undefined, K = T> = [
227
+ Resource<O extends undefined | null ? T | undefined : NonNullable<O>["initialValue"] extends undefined ? T | undefined : T>,
228
+ ResourceActions<K>
229
+ ];
227
230
  /**
228
231
  * Creates a resource that wraps a repeated promise in a reactive pattern:
229
232
  * ```typescript
@@ -249,10 +252,10 @@ export declare type ResourceOptions<T> = undefined extends T ? {
249
252
  *
250
253
  * @description https://www.solidjs.com/docs/latest/api#createresource
251
254
  */
252
- export declare function createResource<T, S = true>(fetcher: ResourceFetcher<S, T>, options?: ResourceOptions<undefined>): ResourceReturn<T | undefined>;
253
- export declare function createResource<T, S = true>(fetcher: ResourceFetcher<S, T>, options: ResourceOptions<T>): ResourceReturn<T>;
254
- export declare function createResource<T, S>(source: ResourceSource<S>, fetcher: ResourceFetcher<S, T>, options?: ResourceOptions<undefined>): ResourceReturn<T | undefined>;
255
- export declare function createResource<T, S>(source: ResourceSource<S>, fetcher: ResourceFetcher<S, T>, options: ResourceOptions<T>): ResourceReturn<T>;
255
+ export declare function createResource<T, S = true>(fetcher: ResourceFetcher<S, T>, options?: ResourceOptions<undefined>): ResourceReturn<T | undefined, typeof options>;
256
+ export declare function createResource<T, S = true>(fetcher: ResourceFetcher<S, T>, options: ResourceOptions<T>): ResourceReturn<T, typeof options>;
257
+ export declare function createResource<T, S>(source: ResourceSource<S>, fetcher: ResourceFetcher<S, T>, options?: ResourceOptions<undefined>): ResourceReturn<T | undefined, typeof options>;
258
+ export declare function createResource<T, S>(source: ResourceSource<S>, fetcher: ResourceFetcher<S, T>, options: ResourceOptions<T>): ResourceReturn<T, typeof options>;
256
259
  export interface DeferredOptions<T> {
257
260
  equals?: false | ((prev: T, next: T) => boolean);
258
261
  name?: string;
@@ -66,21 +66,15 @@ export declare type ComponentProps<T extends keyof JSX.IntrinsicElements | Compo
66
66
  */
67
67
  export declare type Ref<T> = T | ((val: T) => void);
68
68
  export declare function createComponent<T>(Comp: Component<T>, props: T): JSX.Element;
69
- declare type Simplify<T> = T extends object ? {
70
- [K in keyof T]: T[K];
71
- } : T;
72
- declare type UnboxLazy<T> = T extends () => infer U ? U : T;
73
- declare type RequiredKeys<T> = keyof {
74
- [K in keyof T as T extends {
75
- [_ in K]: unknown;
76
- } ? K : never]: 0;
77
- };
78
- declare type Override<T, U> = {
79
- [K in keyof Omit<T, RequiredKeys<U>>]: T[K] | Exclude<U[K & keyof U], undefined>;
69
+ declare type Override<T, U> = T extends any ? U extends any ? {
70
+ [K in keyof T]: K extends keyof U ? undefined extends U[K] ? Exclude<U[K], undefined> | T[K] : U[K] : T[K];
80
71
  } & {
81
- [K in keyof Omit<U, Exclude<keyof T, RequiredKeys<U>>>]: Exclude<U[K], undefined> | (undefined extends U[K] ? (K extends keyof T ? T[K] : undefined) : never);
82
- };
83
- export declare type MergeProps<T extends unknown[], Curr = {}> = T extends [infer Next, ...infer Rest] ? MergeProps<Rest, Next extends object ? (Next extends Function ? Curr : Override<Curr, UnboxLazy<Next>>) : Curr> : Simplify<Curr>;
72
+ [K in keyof U]: K extends keyof T ? undefined extends U[K] ? Exclude<U[K], undefined> | T[K] : U[K] : U[K];
73
+ } : T & U : T & U;
74
+ export declare type MergeProps<T extends unknown[], Curr = {}> = T extends [
75
+ infer Next | (() => infer Next),
76
+ ...infer Rest
77
+ ] ? MergeProps<Rest, Override<Curr, Next>> : Curr;
84
78
  export declare function mergeProps<T extends [unknown, ...unknown[]]>(...sources: T): MergeProps<T>;
85
79
  export declare type SplitProps<T, K extends (readonly (keyof T)[])[]> = [
86
80
  ...{
@@ -7,7 +7,7 @@ declare type SharedConfig = {
7
7
  resources?: {
8
8
  [key: string]: any;
9
9
  };
10
- load?: (id: string) => Promise<any> | undefined;
10
+ load?: (id: string) => Promise<any> | any | undefined;
11
11
  gather?: (key: string) => void;
12
12
  registry?: Map<string, Element>;
13
13
  done?: boolean;
package/web/dist/dev.cjs CHANGED
@@ -5,8 +5,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var solidJs = require('solid-js');
6
6
 
7
7
  const booleans = ["allowfullscreen", "async", "autofocus", "autoplay", "checked", "controls", "default", "disabled", "formnovalidate", "hidden", "indeterminate", "ismap", "loop", "multiple", "muted", "nomodule", "novalidate", "open", "playsinline", "readonly", "required", "reversed", "seamless", "selected"];
8
- const Properties = new Set(["className", "value", "readOnly", "formNoValidate", "isMap", "noModule", "playsInline", ...booleans]);
9
- const ChildProperties = new Set(["innerHTML", "textContent", "innerText", "children"]);
8
+ const Properties = /*#__PURE__*/new Set(["className", "value", "readOnly", "formNoValidate", "isMap", "noModule", "playsInline", ...booleans]);
9
+ const ChildProperties = /*#__PURE__*/new Set(["innerHTML", "textContent", "innerText", "children"]);
10
10
  const Aliases = {
11
11
  className: "class",
12
12
  htmlFor: "for"
@@ -19,8 +19,8 @@ const PropAliases = {
19
19
  playsinline: "playsInline",
20
20
  readonly: "readOnly"
21
21
  };
22
- const DelegatedEvents = new Set(["beforeinput", "click", "dblclick", "contextmenu", "focusin", "focusout", "input", "keydown", "keyup", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup", "pointerdown", "pointermove", "pointerout", "pointerover", "pointerup", "touchend", "touchmove", "touchstart"]);
23
- const SVGElements = new Set([
22
+ 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"]);
23
+ const SVGElements = /*#__PURE__*/new Set([
24
24
  "altGlyph", "altGlyphDef", "altGlyphItem", "animate", "animateColor", "animateMotion", "animateTransform", "circle", "clipPath", "color-profile", "cursor", "defs", "desc", "ellipse", "feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "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",
25
25
  "set", "stop",
26
26
  "svg", "switch", "symbol", "text", "textPath",
@@ -29,7 +29,7 @@ const SVGNamespace = {
29
29
  xlink: "http://www.w3.org/1999/xlink",
30
30
  xml: "http://www.w3.org/XML/1998/namespace"
31
31
  };
32
- const DOMElements = 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"]);
32
+ 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"]);
33
33
 
34
34
  function memo(fn, equals) {
35
35
  return solidJs.createMemo(fn, undefined, !equals ? {
@@ -146,7 +146,8 @@ function addEventListener(node, name, handler, delegate) {
146
146
  node[`$$${name}Data`] = handler[1];
147
147
  } else node[`$$${name}`] = handler;
148
148
  } else if (Array.isArray(handler)) {
149
- node.addEventListener(name, e => handler[0](handler[1], e));
149
+ const handlerFn = handler[0];
150
+ node.addEventListener(name, handler[0] = e => handlerFn.call(node, handler[1], e));
150
151
  } else node.addEventListener(name, handler);
151
152
  }
152
153
  function classList(node, value, prev = {}) {
@@ -310,14 +311,24 @@ function assignProp(node, prop, value, prev, isSVG, skipRef) {
310
311
  value(node);
311
312
  }
312
313
  } else if (prop.slice(0, 3) === "on:") {
313
- node.addEventListener(prop.slice(3), value);
314
+ const e = prop.slice(3);
315
+ prev && node.removeEventListener(e, prev);
316
+ value && node.addEventListener(e, value);
314
317
  } else if (prop.slice(0, 10) === "oncapture:") {
315
- node.addEventListener(prop.slice(10), value, true);
318
+ const e = prop.slice(10);
319
+ prev && node.removeEventListener(e, prev, true);
320
+ value && node.addEventListener(e, value, true);
316
321
  } else if (prop.slice(0, 2) === "on") {
317
322
  const name = prop.slice(2).toLowerCase();
318
323
  const delegate = DelegatedEvents.has(name);
319
- addEventListener(node, name, value, delegate);
320
- delegate && delegateEvents([name]);
324
+ if (!delegate && prev) {
325
+ const h = Array.isArray(prev) ? prev[0] : prev;
326
+ node.removeEventListener(name, h);
327
+ }
328
+ if (delegate || value) {
329
+ addEventListener(node, name, value, delegate);
330
+ delegate && delegateEvents([name]);
331
+ }
321
332
  } else if ((isChildProp = ChildProperties.has(prop)) || !isSVG && (PropAliases[prop] || (isProp = Properties.has(prop))) || (isCE = node.nodeName.includes("-"))) {
322
333
  if (prop === "class" || prop === "className") className(node, value);else if (isCE && !isProp && !isChildProp) node[toPropertyName(prop)] = value;else node[PropAliases[prop] || prop] = value;
323
334
  } else {
@@ -349,7 +360,7 @@ function eventHandler(e) {
349
360
  const handler = node[key];
350
361
  if (handler && !node.disabled) {
351
362
  const data = node[`${key}Data`];
352
- data !== undefined ? handler(data, e) : handler(e);
363
+ data !== undefined ? handler.call(node, data, e) : handler.call(node, e);
353
364
  if (e.cancelBubble) return;
354
365
  }
355
366
  node = node.host && node.host !== node && node.host instanceof Node ? node.host : node.parentNode;
@@ -508,7 +519,7 @@ function resolveSSRNode(node) {}
508
519
  function ssrClassList(value) {}
509
520
  function ssrStyle(value) {}
510
521
  function ssrSpread(accessor) {}
511
- function ssrBoolean(key, value) {}
522
+ function ssrAttribute(key, value) {}
512
523
  function ssrHydrationKey() {}
513
524
  function escape(html) {}
514
525
  function generateHydrationScript() {}
@@ -561,8 +572,9 @@ function Portal(props) {
561
572
  }
562
573
  function Dynamic(props) {
563
574
  const [p, others] = solidJs.splitProps(props, ["component"]);
575
+ const cached = solidJs.createMemo(() => p.component);
564
576
  return solidJs.createMemo(() => {
565
- const component = p.component;
577
+ const component = cached();
566
578
  switch (typeof component) {
567
579
  case "function":
568
580
  Object.assign(component, {
@@ -667,7 +679,7 @@ exports.setAttribute = setAttribute;
667
679
  exports.setAttributeNS = setAttributeNS;
668
680
  exports.spread = spread;
669
681
  exports.ssr = ssr;
670
- exports.ssrBoolean = ssrBoolean;
682
+ exports.ssrAttribute = ssrAttribute;
671
683
  exports.ssrClassList = ssrClassList;
672
684
  exports.ssrHydrationKey = ssrHydrationKey;
673
685
  exports.ssrSpread = ssrSpread;
package/web/dist/dev.js CHANGED
@@ -2,8 +2,8 @@ import { createMemo, createRoot, createRenderEffect, sharedConfig, enableHydrati
2
2
  export { ErrorBoundary, For, Index, Match, Show, Suspense, SuspenseList, Switch, createComponent, createRenderEffect as effect, getOwner, mergeProps } from 'solid-js';
3
3
 
4
4
  const booleans = ["allowfullscreen", "async", "autofocus", "autoplay", "checked", "controls", "default", "disabled", "formnovalidate", "hidden", "indeterminate", "ismap", "loop", "multiple", "muted", "nomodule", "novalidate", "open", "playsinline", "readonly", "required", "reversed", "seamless", "selected"];
5
- const Properties = new Set(["className", "value", "readOnly", "formNoValidate", "isMap", "noModule", "playsInline", ...booleans]);
6
- const ChildProperties = new Set(["innerHTML", "textContent", "innerText", "children"]);
5
+ const Properties = /*#__PURE__*/new Set(["className", "value", "readOnly", "formNoValidate", "isMap", "noModule", "playsInline", ...booleans]);
6
+ const ChildProperties = /*#__PURE__*/new Set(["innerHTML", "textContent", "innerText", "children"]);
7
7
  const Aliases = {
8
8
  className: "class",
9
9
  htmlFor: "for"
@@ -16,8 +16,8 @@ const PropAliases = {
16
16
  playsinline: "playsInline",
17
17
  readonly: "readOnly"
18
18
  };
19
- const DelegatedEvents = new Set(["beforeinput", "click", "dblclick", "contextmenu", "focusin", "focusout", "input", "keydown", "keyup", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup", "pointerdown", "pointermove", "pointerout", "pointerover", "pointerup", "touchend", "touchmove", "touchstart"]);
20
- const SVGElements = new Set([
19
+ 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"]);
20
+ const SVGElements = /*#__PURE__*/new Set([
21
21
  "altGlyph", "altGlyphDef", "altGlyphItem", "animate", "animateColor", "animateMotion", "animateTransform", "circle", "clipPath", "color-profile", "cursor", "defs", "desc", "ellipse", "feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "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",
22
22
  "set", "stop",
23
23
  "svg", "switch", "symbol", "text", "textPath",
@@ -26,7 +26,7 @@ const SVGNamespace = {
26
26
  xlink: "http://www.w3.org/1999/xlink",
27
27
  xml: "http://www.w3.org/XML/1998/namespace"
28
28
  };
29
- const DOMElements = 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"]);
29
+ 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"]);
30
30
 
31
31
  function memo(fn, equals) {
32
32
  return createMemo(fn, undefined, !equals ? {
@@ -143,7 +143,8 @@ function addEventListener(node, name, handler, delegate) {
143
143
  node[`$$${name}Data`] = handler[1];
144
144
  } else node[`$$${name}`] = handler;
145
145
  } else if (Array.isArray(handler)) {
146
- node.addEventListener(name, e => handler[0](handler[1], e));
146
+ const handlerFn = handler[0];
147
+ node.addEventListener(name, handler[0] = e => handlerFn.call(node, handler[1], e));
147
148
  } else node.addEventListener(name, handler);
148
149
  }
149
150
  function classList(node, value, prev = {}) {
@@ -307,14 +308,24 @@ function assignProp(node, prop, value, prev, isSVG, skipRef) {
307
308
  value(node);
308
309
  }
309
310
  } else if (prop.slice(0, 3) === "on:") {
310
- node.addEventListener(prop.slice(3), value);
311
+ const e = prop.slice(3);
312
+ prev && node.removeEventListener(e, prev);
313
+ value && node.addEventListener(e, value);
311
314
  } else if (prop.slice(0, 10) === "oncapture:") {
312
- node.addEventListener(prop.slice(10), value, true);
315
+ const e = prop.slice(10);
316
+ prev && node.removeEventListener(e, prev, true);
317
+ value && node.addEventListener(e, value, true);
313
318
  } else if (prop.slice(0, 2) === "on") {
314
319
  const name = prop.slice(2).toLowerCase();
315
320
  const delegate = DelegatedEvents.has(name);
316
- addEventListener(node, name, value, delegate);
317
- delegate && delegateEvents([name]);
321
+ if (!delegate && prev) {
322
+ const h = Array.isArray(prev) ? prev[0] : prev;
323
+ node.removeEventListener(name, h);
324
+ }
325
+ if (delegate || value) {
326
+ addEventListener(node, name, value, delegate);
327
+ delegate && delegateEvents([name]);
328
+ }
318
329
  } else if ((isChildProp = ChildProperties.has(prop)) || !isSVG && (PropAliases[prop] || (isProp = Properties.has(prop))) || (isCE = node.nodeName.includes("-"))) {
319
330
  if (prop === "class" || prop === "className") className(node, value);else if (isCE && !isProp && !isChildProp) node[toPropertyName(prop)] = value;else node[PropAliases[prop] || prop] = value;
320
331
  } else {
@@ -346,7 +357,7 @@ function eventHandler(e) {
346
357
  const handler = node[key];
347
358
  if (handler && !node.disabled) {
348
359
  const data = node[`${key}Data`];
349
- data !== undefined ? handler(data, e) : handler(e);
360
+ data !== undefined ? handler.call(node, data, e) : handler.call(node, e);
350
361
  if (e.cancelBubble) return;
351
362
  }
352
363
  node = node.host && node.host !== node && node.host instanceof Node ? node.host : node.parentNode;
@@ -505,7 +516,7 @@ function resolveSSRNode(node) {}
505
516
  function ssrClassList(value) {}
506
517
  function ssrStyle(value) {}
507
518
  function ssrSpread(accessor) {}
508
- function ssrBoolean(key, value) {}
519
+ function ssrAttribute(key, value) {}
509
520
  function ssrHydrationKey() {}
510
521
  function escape(html) {}
511
522
  function generateHydrationScript() {}
@@ -558,8 +569,9 @@ function Portal(props) {
558
569
  }
559
570
  function Dynamic(props) {
560
571
  const [p, others] = splitProps(props, ["component"]);
572
+ const cached = createMemo(() => p.component);
561
573
  return createMemo(() => {
562
- const component = p.component;
574
+ const component = cached();
563
575
  switch (typeof component) {
564
576
  case "function":
565
577
  Object.assign(component, {
@@ -575,4 +587,4 @@ function Dynamic(props) {
575
587
  });
576
588
  }
577
589
 
578
- export { Aliases, Assets, ChildProperties, DOMElements, DelegatedEvents, Dynamic, Assets as HydrationScript, NoHydration, Portal, PropAliases, Properties, SVGElements, SVGNamespace, addEventListener, assign, classList, className, clearDelegatedEvents, delegateEvents, dynamicProperty, escape, generateHydrationScript, getHydrationKey, getNextElement, getNextMarker, getNextMatch, hydrate, innerHTML, insert, isServer, memo, render, renderToStream, renderToString, renderToStringAsync, resolveSSRNode, runHydrationEvents, setAttribute, setAttributeNS, spread, ssr, ssrBoolean, ssrClassList, ssrHydrationKey, ssrSpread, ssrStyle, style, template };
590
+ export { Aliases, Assets, ChildProperties, DOMElements, DelegatedEvents, Dynamic, Assets as HydrationScript, NoHydration, Portal, PropAliases, Properties, SVGElements, SVGNamespace, addEventListener, assign, classList, className, clearDelegatedEvents, delegateEvents, dynamicProperty, escape, generateHydrationScript, getHydrationKey, getNextElement, getNextMarker, getNextMatch, hydrate, innerHTML, insert, isServer, memo, render, renderToStream, renderToString, renderToStringAsync, resolveSSRNode, runHydrationEvents, setAttribute, setAttributeNS, spread, ssr, ssrAttribute, ssrClassList, ssrHydrationKey, ssrSpread, ssrStyle, style, template };
@@ -5,8 +5,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var solidJs = require('solid-js');
6
6
 
7
7
  const booleans = ["allowfullscreen", "async", "autofocus", "autoplay", "checked", "controls", "default", "disabled", "formnovalidate", "hidden", "indeterminate", "ismap", "loop", "multiple", "muted", "nomodule", "novalidate", "open", "playsinline", "readonly", "required", "reversed", "seamless", "selected"];
8
- const BooleanAttributes = new Set(booleans);
9
- new Set(["className", "value", "readOnly", "formNoValidate", "isMap", "noModule", "playsInline", ...booleans]);
8
+ const BooleanAttributes = /*#__PURE__*/new Set(booleans);
9
+ /*#__PURE__*/new Set(["className", "value", "readOnly", "formNoValidate", "isMap", "noModule", "playsInline", ...booleans]);
10
10
  const Aliases = {
11
11
  className: "class",
12
12
  htmlFor: "for"
@@ -2,8 +2,8 @@ import { sharedConfig, splitProps } from 'solid-js';
2
2
  export { ErrorBoundary, For, Index, Match, Show, Suspense, SuspenseList, Switch, createComponent, mergeProps } from 'solid-js';
3
3
 
4
4
  const booleans = ["allowfullscreen", "async", "autofocus", "autoplay", "checked", "controls", "default", "disabled", "formnovalidate", "hidden", "indeterminate", "ismap", "loop", "multiple", "muted", "nomodule", "novalidate", "open", "playsinline", "readonly", "required", "reversed", "seamless", "selected"];
5
- const BooleanAttributes = new Set(booleans);
6
- new Set(["className", "value", "readOnly", "formNoValidate", "isMap", "noModule", "playsInline", ...booleans]);
5
+ const BooleanAttributes = /*#__PURE__*/new Set(booleans);
6
+ /*#__PURE__*/new Set(["className", "value", "readOnly", "formNoValidate", "isMap", "noModule", "playsInline", ...booleans]);
7
7
  const Aliases = {
8
8
  className: "class",
9
9
  htmlFor: "for"
package/web/dist/web.cjs CHANGED
@@ -5,8 +5,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var solidJs = require('solid-js');
6
6
 
7
7
  const booleans = ["allowfullscreen", "async", "autofocus", "autoplay", "checked", "controls", "default", "disabled", "formnovalidate", "hidden", "indeterminate", "ismap", "loop", "multiple", "muted", "nomodule", "novalidate", "open", "playsinline", "readonly", "required", "reversed", "seamless", "selected"];
8
- const Properties = new Set(["className", "value", "readOnly", "formNoValidate", "isMap", "noModule", "playsInline", ...booleans]);
9
- const ChildProperties = new Set(["innerHTML", "textContent", "innerText", "children"]);
8
+ const Properties = /*#__PURE__*/new Set(["className", "value", "readOnly", "formNoValidate", "isMap", "noModule", "playsInline", ...booleans]);
9
+ const ChildProperties = /*#__PURE__*/new Set(["innerHTML", "textContent", "innerText", "children"]);
10
10
  const Aliases = {
11
11
  className: "class",
12
12
  htmlFor: "for"
@@ -19,8 +19,8 @@ const PropAliases = {
19
19
  playsinline: "playsInline",
20
20
  readonly: "readOnly"
21
21
  };
22
- const DelegatedEvents = new Set(["beforeinput", "click", "dblclick", "contextmenu", "focusin", "focusout", "input", "keydown", "keyup", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup", "pointerdown", "pointermove", "pointerout", "pointerover", "pointerup", "touchend", "touchmove", "touchstart"]);
23
- const SVGElements = new Set([
22
+ 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"]);
23
+ const SVGElements = /*#__PURE__*/new Set([
24
24
  "altGlyph", "altGlyphDef", "altGlyphItem", "animate", "animateColor", "animateMotion", "animateTransform", "circle", "clipPath", "color-profile", "cursor", "defs", "desc", "ellipse", "feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "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",
25
25
  "set", "stop",
26
26
  "svg", "switch", "symbol", "text", "textPath",
@@ -29,7 +29,7 @@ const SVGNamespace = {
29
29
  xlink: "http://www.w3.org/1999/xlink",
30
30
  xml: "http://www.w3.org/XML/1998/namespace"
31
31
  };
32
- const DOMElements = 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"]);
32
+ 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"]);
33
33
 
34
34
  function memo(fn, equals) {
35
35
  return solidJs.createMemo(fn, undefined, !equals ? {
@@ -145,7 +145,8 @@ function addEventListener(node, name, handler, delegate) {
145
145
  node[`$$${name}Data`] = handler[1];
146
146
  } else node[`$$${name}`] = handler;
147
147
  } else if (Array.isArray(handler)) {
148
- node.addEventListener(name, e => handler[0](handler[1], e));
148
+ const handlerFn = handler[0];
149
+ node.addEventListener(name, handler[0] = e => handlerFn.call(node, handler[1], e));
149
150
  } else node.addEventListener(name, handler);
150
151
  }
151
152
  function classList(node, value, prev = {}) {
@@ -309,14 +310,24 @@ function assignProp(node, prop, value, prev, isSVG, skipRef) {
309
310
  value(node);
310
311
  }
311
312
  } else if (prop.slice(0, 3) === "on:") {
312
- node.addEventListener(prop.slice(3), value);
313
+ const e = prop.slice(3);
314
+ prev && node.removeEventListener(e, prev);
315
+ value && node.addEventListener(e, value);
313
316
  } else if (prop.slice(0, 10) === "oncapture:") {
314
- node.addEventListener(prop.slice(10), value, true);
317
+ const e = prop.slice(10);
318
+ prev && node.removeEventListener(e, prev, true);
319
+ value && node.addEventListener(e, value, true);
315
320
  } else if (prop.slice(0, 2) === "on") {
316
321
  const name = prop.slice(2).toLowerCase();
317
322
  const delegate = DelegatedEvents.has(name);
318
- addEventListener(node, name, value, delegate);
319
- delegate && delegateEvents([name]);
323
+ if (!delegate && prev) {
324
+ const h = Array.isArray(prev) ? prev[0] : prev;
325
+ node.removeEventListener(name, h);
326
+ }
327
+ if (delegate || value) {
328
+ addEventListener(node, name, value, delegate);
329
+ delegate && delegateEvents([name]);
330
+ }
320
331
  } else if ((isChildProp = ChildProperties.has(prop)) || !isSVG && (PropAliases[prop] || (isProp = Properties.has(prop))) || (isCE = node.nodeName.includes("-"))) {
321
332
  if (prop === "class" || prop === "className") className(node, value);else if (isCE && !isProp && !isChildProp) node[toPropertyName(prop)] = value;else node[PropAliases[prop] || prop] = value;
322
333
  } else {
@@ -348,7 +359,7 @@ function eventHandler(e) {
348
359
  const handler = node[key];
349
360
  if (handler && !node.disabled) {
350
361
  const data = node[`${key}Data`];
351
- data !== undefined ? handler(data, e) : handler(e);
362
+ data !== undefined ? handler.call(node, data, e) : handler.call(node, e);
352
363
  if (e.cancelBubble) return;
353
364
  }
354
365
  node = node.host && node.host !== node && node.host instanceof Node ? node.host : node.parentNode;
@@ -507,7 +518,7 @@ function resolveSSRNode(node) {}
507
518
  function ssrClassList(value) {}
508
519
  function ssrStyle(value) {}
509
520
  function ssrSpread(accessor) {}
510
- function ssrBoolean(key, value) {}
521
+ function ssrAttribute(key, value) {}
511
522
  function ssrHydrationKey() {}
512
523
  function escape(html) {}
513
524
  function generateHydrationScript() {}
@@ -560,8 +571,9 @@ function Portal(props) {
560
571
  }
561
572
  function Dynamic(props) {
562
573
  const [p, others] = solidJs.splitProps(props, ["component"]);
574
+ const cached = solidJs.createMemo(() => p.component);
563
575
  return solidJs.createMemo(() => {
564
- const component = p.component;
576
+ const component = cached();
565
577
  switch (typeof component) {
566
578
  case "function":
567
579
  return solidJs.untrack(() => component(others));
@@ -663,7 +675,7 @@ exports.setAttribute = setAttribute;
663
675
  exports.setAttributeNS = setAttributeNS;
664
676
  exports.spread = spread;
665
677
  exports.ssr = ssr;
666
- exports.ssrBoolean = ssrBoolean;
678
+ exports.ssrAttribute = ssrAttribute;
667
679
  exports.ssrClassList = ssrClassList;
668
680
  exports.ssrHydrationKey = ssrHydrationKey;
669
681
  exports.ssrSpread = ssrSpread;