dom-expressions 0.40.4 → 0.40.6
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/package.json +9 -8
- package/src/client.d.ts +17 -3
- package/src/server.js +2 -2
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dom-expressions",
|
|
3
3
|
"description": "A Fine-Grained Runtime for Performant DOM Rendering",
|
|
4
|
-
"version": "0.40.
|
|
4
|
+
"version": "0.40.6",
|
|
5
5
|
"author": "Ryan Carniato",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -10,6 +10,11 @@
|
|
|
10
10
|
},
|
|
11
11
|
"readmeFilename": "README.md",
|
|
12
12
|
"sideEffects": false,
|
|
13
|
+
"scripts": {
|
|
14
|
+
"test": "jest --no-cache",
|
|
15
|
+
"test:coverage": "jest --coverage --no-cache",
|
|
16
|
+
"report:coverage": "cat ./coverage/lcov.info | ../../node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage"
|
|
17
|
+
},
|
|
13
18
|
"dependencies": {
|
|
14
19
|
"babel-plugin-transform-rename-import": "^2.3.0"
|
|
15
20
|
},
|
|
@@ -19,14 +24,10 @@
|
|
|
19
24
|
"seroval-plugins": "~1.5.0"
|
|
20
25
|
},
|
|
21
26
|
"devDependencies": {
|
|
22
|
-
"babel-plugin-jsx-dom-expressions": "^0.40.
|
|
27
|
+
"babel-plugin-jsx-dom-expressions": "^0.40.6",
|
|
23
28
|
"csstype": "^3.1",
|
|
24
29
|
"seroval": "~1.5.0",
|
|
25
30
|
"seroval-plugins": "~1.5.0"
|
|
26
31
|
},
|
|
27
|
-
"
|
|
28
|
-
|
|
29
|
-
"test:coverage": "jest --coverage --no-cache",
|
|
30
|
-
"report:coverage": "cat ./coverage/lcov.info | ../../node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage"
|
|
31
|
-
}
|
|
32
|
-
}
|
|
32
|
+
"gitHead": "4f1ff795b280004134c0c3e16dec1dc0c9148141"
|
|
33
|
+
}
|
package/src/client.d.ts
CHANGED
|
@@ -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(
|
|
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(
|
|
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,
|
|
@@ -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?:
|
|
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;
|
package/src/server.js
CHANGED
|
@@ -279,13 +279,13 @@ export function renderToStream(code, options = {}) {
|
|
|
279
279
|
writable = {
|
|
280
280
|
end() {
|
|
281
281
|
writer.releaseLock();
|
|
282
|
-
w.close();
|
|
282
|
+
w.close().catch(() => {});
|
|
283
283
|
resolve();
|
|
284
284
|
}
|
|
285
285
|
};
|
|
286
286
|
buffer = {
|
|
287
287
|
write(payload) {
|
|
288
|
-
writer.write(encoder.encode(payload));
|
|
288
|
+
writer.write(encoder.encode(payload)).catch(() => {});
|
|
289
289
|
}
|
|
290
290
|
};
|
|
291
291
|
buffer.write(tmp);
|