hyper-dom-expressions 0.41.0-next.9 → 0.50.0-next.2
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/CHANGELOG.md +43 -0
- package/dist/hyper-dom-expressions.js +5 -3
- package/lib/hyper-dom-expressions.js +5 -3
- package/package.json +7 -9
- package/types/index.d.ts +4 -2
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# hyper-dom-expressions
|
|
2
|
+
|
|
3
|
+
## 0.50.0-next.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 39c207c: Fix a SyntaxError when an element has 222+ merged dynamic attributes
|
|
8
|
+
(solidjs/solid#2682). The internal identifier generator produced `in` at
|
|
9
|
+
index 221, and since these identifiers are emitted as object shorthand
|
|
10
|
+
destructuring bindings, the resulting `({ …, in }) => …` could not be parsed.
|
|
11
|
+
`getNumberedId` now shifts past any natural index that would encode to a JS
|
|
12
|
+
reserved word, keeping the mapping injective and the output at 2 characters
|
|
13
|
+
for all practical dynamic counts.
|
|
14
|
+
- 305d9ce: - SSR: Duplicate attributes in JSX without spreads are now deduplicated —
|
|
15
|
+
`<div class="a" class="b" />` correctly renders as `<div class="b" />`
|
|
16
|
+
(last-wins), matching client behavior. Previously the compiler kept both
|
|
17
|
+
attributes in the output.
|
|
18
|
+
- Client: `setAttributeNS` / `removeAttributeNS` now use matching names when
|
|
19
|
+
clearing namespaced attributes (e.g. `xlink:href`). Previously removal could
|
|
20
|
+
leave the attribute in place because it used the local name while the set
|
|
21
|
+
used the qualified name.
|
|
22
|
+
- Expanded test coverage across all four packages; no other behavior changes.
|
|
23
|
+
|
|
24
|
+
## 0.50.0-next.1
|
|
25
|
+
|
|
26
|
+
### Patch Changes
|
|
27
|
+
|
|
28
|
+
- ee365e0: - `insert()` accepts an optional 5th `options` argument that is forwarded to the
|
|
29
|
+
internal `effect()` call, letting callers (e.g. Solid's `render()`) opt into
|
|
30
|
+
transition-aware initial mounts without otherwise changing `insert`'s
|
|
31
|
+
behavior.
|
|
32
|
+
- SSR: `$dflj(ids)` now materializes every id in the list in a single call
|
|
33
|
+
instead of stopping after the first successful `$dfl`. Callers pass only the
|
|
34
|
+
keys they intend to materialize, which simplifies the primitive and composes
|
|
35
|
+
cleanly for bulk-uncollapse cases (e.g. a group activation revealing several
|
|
36
|
+
held fallbacks at once).
|
|
37
|
+
- SSR: Fix cascading async root holes in the streaming shell. When an inner
|
|
38
|
+
Loading boundary resolved its first chunk while the outer shell was still
|
|
39
|
+
pending, `flushEnd` could call `serializer.flush()` before `doShell()` had
|
|
40
|
+
written the root `_assets` module map, causing seroval to silently drop the
|
|
41
|
+
writes and client hydration to fail with "module was not preloaded". Root
|
|
42
|
+
asset serialization is now memoized and gated on both paths.
|
|
43
|
+
- Type formatting cleanup in `jsx-properties.d.ts`.
|
|
@@ -43,8 +43,8 @@ function createHyperScript(r) {
|
|
|
43
43
|
} else if (d[k].get) dynamic = true;
|
|
44
44
|
}
|
|
45
45
|
dynamic ?
|
|
46
|
-
r.spread(e, l,
|
|
47
|
-
r.assign(e, l,
|
|
46
|
+
r.spread(e, l, !!args.length) :
|
|
47
|
+
r.assign(e, l, !!args.length);
|
|
48
48
|
} else if ("function" === type) {
|
|
49
49
|
if (!e) {
|
|
50
50
|
let props,
|
|
@@ -89,7 +89,9 @@ function createHyperScript(r) {
|
|
|
89
89
|
if (!v) continue;
|
|
90
90
|
if (!e)
|
|
91
91
|
e = r.SVGElements.has(v) ?
|
|
92
|
-
document.createElementNS(
|
|
92
|
+
document.createElementNS(r.Namespaces.svg, v) :
|
|
93
|
+
r.MathMLElements.has(v) ?
|
|
94
|
+
document.createElementNS(r.Namespaces.mathml, v) :
|
|
93
95
|
document.createElement(v);else
|
|
94
96
|
if (v[0] === ".") classes.push(s);else
|
|
95
97
|
if (v[0] === "#") e.setAttribute("id", s);
|
|
@@ -45,8 +45,8 @@ function createHyperScript(r) {
|
|
|
45
45
|
} else if (d[k].get) dynamic = true;
|
|
46
46
|
}
|
|
47
47
|
dynamic ?
|
|
48
|
-
r.spread(e, l,
|
|
49
|
-
r.assign(e, l,
|
|
48
|
+
r.spread(e, l, !!args.length) :
|
|
49
|
+
r.assign(e, l, !!args.length);
|
|
50
50
|
} else if ("function" === type) {
|
|
51
51
|
if (!e) {
|
|
52
52
|
let props,
|
|
@@ -91,7 +91,9 @@ function createHyperScript(r) {
|
|
|
91
91
|
if (!v) continue;
|
|
92
92
|
if (!e)
|
|
93
93
|
e = r.SVGElements.has(v) ?
|
|
94
|
-
document.createElementNS(
|
|
94
|
+
document.createElementNS(r.Namespaces.svg, v) :
|
|
95
|
+
r.MathMLElements.has(v) ?
|
|
96
|
+
document.createElementNS(r.Namespaces.mathml, v) :
|
|
95
97
|
document.createElement(v);else
|
|
96
98
|
if (v[0] === ".") classes.push(s);else
|
|
97
99
|
if (v[0] === "#") e.setAttribute("id", s);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hyper-dom-expressions",
|
|
3
3
|
"description": "A Fine-Grained Rendering Runtime API using HyperScript",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.50.0-next.2",
|
|
5
5
|
"author": "Ryan Carniato",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -12,14 +12,12 @@
|
|
|
12
12
|
"module": "dist/hyper-dom-expressions.js",
|
|
13
13
|
"types": "types/index.d.ts",
|
|
14
14
|
"sideEffects": false,
|
|
15
|
+
"devDependencies": {
|
|
16
|
+
"dom-expressions": "0.50.0-next.2"
|
|
17
|
+
},
|
|
15
18
|
"scripts": {
|
|
16
19
|
"build": "rollup -c --bundleConfigAsCjs && tsc",
|
|
17
20
|
"test": "pnpm run build && jest",
|
|
18
|
-
"test:coverage": "pnpm run build && jest --coverage"
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
"devDependencies": {
|
|
22
|
-
"dom-expressions": "^0.41.0-next.9"
|
|
23
|
-
},
|
|
24
|
-
"gitHead": "cd9f4b48e6974aec176463d72490a44cf55eda7c"
|
|
25
|
-
}
|
|
21
|
+
"test:coverage": "pnpm run build && jest --coverage"
|
|
22
|
+
}
|
|
23
|
+
}
|
package/types/index.d.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
type MountableElement = Element | Document | ShadowRoot | DocumentFragment | Node;
|
|
2
2
|
interface Runtime {
|
|
3
3
|
insert(parent: MountableElement, accessor: any, marker?: Node | null, init?: any): any;
|
|
4
|
-
spread(node: Element, accessor: any,
|
|
5
|
-
assign(node: Element, props: any,
|
|
4
|
+
spread(node: Element, accessor: any, skipChildren?: Boolean): void;
|
|
5
|
+
assign(node: Element, props: any, skipChildren?: Boolean): void;
|
|
6
6
|
createComponent(Comp: (props: any) => any, props: any): any;
|
|
7
7
|
dynamicProperty(props: any, key: string): any;
|
|
8
8
|
SVGElements: Set<string>;
|
|
9
|
+
MathMLElements: Set<string>;
|
|
10
|
+
Namespaces: Record<string, string>;
|
|
9
11
|
}
|
|
10
12
|
type ExpandableNode = Node & {
|
|
11
13
|
[key: string]: any;
|