solid-js 1.9.11 → 1.9.13

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.
@@ -9,7 +9,12 @@ export const SVGNamespace: Record<string, string>;
9
9
  export function getPropAlias(prop: string, tagName: string): string | undefined;
10
10
 
11
11
  type MountableElement = Element | Document | ShadowRoot | DocumentFragment | Node;
12
- export function render(code: () => JSX.Element, element: MountableElement): () => void;
12
+ export function render(
13
+ code: () => JSX.Element,
14
+ element: MountableElement,
15
+ init?: JSX.Element,
16
+ options?: { owner?: unknown }
17
+ ): () => void;
13
18
  export function template(html: string, isCE?: boolean, isSVG?: boolean): () => Element;
14
19
  export function effect<T>(fn: (prev?: T) => T, init?: T): void;
15
20
  export function memo<T>(fn: () => T, equal: boolean): () => T;
@@ -29,12 +34,20 @@ export function spread<T>(
29
34
  isSVG?: Boolean,
30
35
  skipChildren?: Boolean
31
36
  ): void;
32
- export function assign(node: Element, props: any, isSVG?: Boolean, skipChildren?: Boolean): void;
37
+ export function assign(
38
+ node: Element,
39
+ props: any,
40
+ isSVG?: Boolean,
41
+ skipChildren?: Boolean,
42
+ prevProps?: any,
43
+ skipRef?: Boolean
44
+ ): void;
33
45
  export function setAttribute(node: Element, name: string, value: string): void;
34
46
  export function setAttributeNS(node: Element, namespace: string, name: string, value: string): void;
35
47
  export function setBoolAttribute(node: Element, name: string, value: any): void;
36
48
  export function className(node: Element, value: string): void;
37
49
  export function setProperty(node: Element, name: string, value: any): void;
50
+ export function setStyleProperty(node: Element, name: string, value: any): void;
38
51
  export function addEventListener(
39
52
  node: Element,
40
53
  name: string,
@@ -43,9 +56,9 @@ export function addEventListener(
43
56
  ): void;
44
57
  export function classList(
45
58
  node: Element,
46
- value: { [k: string]: boolean },
47
- prev?: { [k: string]: boolean }
48
- ): { [k: string]: boolean };
59
+ value: JSX.ClassList,
60
+ prev?: JSX.ClassList
61
+ ): JSX.ClassList;
49
62
  export function style(
50
63
  node: Element,
51
64
  value: { [k: string]: string },
@@ -54,6 +67,7 @@ export function style(
54
67
  export function getOwner(): unknown;
55
68
  export function mergeProps(...sources: unknown[]): unknown;
56
69
  export function dynamicProperty(props: unknown, key: string): unknown;
70
+ export function use<Arg, Ret>(fn: (node: Element, arg: Arg) => Ret, node: Element, arg?: Arg): Ret
57
71
 
58
72
  export function hydrate(
59
73
  fn: () => JSX.Element,
@@ -61,7 +75,7 @@ export function hydrate(
61
75
  options?: { renderId?: string; owner?: unknown }
62
76
  ): () => void;
63
77
  export function getHydrationKey(): string;
64
- export function getNextElement(template?: HTMLTemplateElement): Element;
78
+ export function getNextElement(template?: () => Element): Element;
65
79
  export function getNextMatch(start: Node, elementName: string): Element;
66
80
  export function getNextMarker(start: Node): [Node, Array<Node>];
67
81
  export function useAssets(fn: () => JSX.Element): void;
@@ -50,7 +50,7 @@ export function ssrElement(
50
50
  children: any,
51
51
  needsId: boolean
52
52
  ): { t: string };
53
- export function ssrClassList(value: { [k: string]: boolean }): string;
53
+ export function ssrClassList(value: JSX.ClassList): string;
54
54
  export function ssrStyle(value: { [k: string]: string }): string;
55
55
  export function ssrAttribute(key: string, value: any, isBoolean: boolean): string;
56
56
  export function ssrHydrationKey(): string;
@@ -107,9 +107,9 @@ export function untrack<T>(fn: () => T): T;
107
107
  /** @deprecated not supported on the server side */
108
108
  export function classList(
109
109
  node: Element,
110
- value: { [k: string]: boolean },
111
- prev?: { [k: string]: boolean }
112
- ): { [k: string]: boolean };
110
+ value: JSX.ClassList,
111
+ prev?: JSX.ClassList
112
+ ): JSX.ClassList;
113
113
 
114
114
  /** @deprecated not supported on the server side */
115
115
  export function style(
@@ -175,3 +175,13 @@ export function getNextElement(template?: HTMLTemplateElement): Element;
175
175
  export function getNextMatch(start: Node, elementName: string): Element;
176
176
  /** @deprecated not supported on the server side */
177
177
  export function getNextMarker(start: Node): [Node, Array<Node>];
178
+ /** @deprecated not supported on the server side */
179
+ export function runHydrationEvents(): void;
180
+ /** @deprecated not supported on the server side */
181
+ export function use<Arg, Ret>(fn: (node: Element, arg: Arg) => Ret, node: Element, arg?: Arg): Ret;
182
+ /** @deprecated not supported on the server side */
183
+ export function setBoolAttribute(node: Element, name: string, value: any): void;
184
+ /** @deprecated not supported on the server side */
185
+ export function setStyleProperty(node: Element, name: string, value: any): void;
186
+ /** @deprecated not supported on the server side */
187
+ export function clearDelegatedEvents(d?: Document): void;