@pyreon/runtime-dom 0.16.0 → 0.18.0
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.
|
@@ -5386,7 +5386,7 @@ var drawChart = (function (exports) {
|
|
|
5386
5386
|
</script>
|
|
5387
5387
|
<script>
|
|
5388
5388
|
/*<!--*/
|
|
5389
|
-
const data = {"version":2,"tree":{"name":"root","children":[{"name":"index.js","children":[{"name":"src","children":[{"uid":"
|
|
5389
|
+
const data = {"version":2,"tree":{"name":"root","children":[{"name":"index.js","children":[{"name":"src","children":[{"uid":"8df5ffbc-1","name":"delegate.ts"},{"uid":"8df5ffbc-3","name":"hydration-debug.ts"},{"uid":"8df5ffbc-5","name":"devtools.ts"},{"uid":"8df5ffbc-7","name":"nodes.ts"},{"uid":"8df5ffbc-9","name":"props.ts"},{"uid":"8df5ffbc-11","name":"mount.ts"},{"uid":"8df5ffbc-13","name":"hydrate.ts"},{"uid":"8df5ffbc-15","name":"keep-alive.ts"},{"uid":"8df5ffbc-17","name":"template.ts"},{"uid":"8df5ffbc-19","name":"transition.ts"},{"uid":"8df5ffbc-21","name":"transition-group.ts"},{"uid":"8df5ffbc-23","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"8df5ffbc-1":{"renderedLength":2090,"gzipLength":1029,"brotliLength":0,"metaUid":"8df5ffbc-0"},"8df5ffbc-3":{"renderedLength":1395,"gzipLength":718,"brotliLength":0,"metaUid":"8df5ffbc-2"},"8df5ffbc-5":{"renderedLength":7009,"gzipLength":2149,"brotliLength":0,"metaUid":"8df5ffbc-4"},"8df5ffbc-7":{"renderedLength":17556,"gzipLength":4660,"brotliLength":0,"metaUid":"8df5ffbc-6"},"8df5ffbc-9":{"renderedLength":8288,"gzipLength":3134,"brotliLength":0,"metaUid":"8df5ffbc-8"},"8df5ffbc-11":{"renderedLength":12232,"gzipLength":3882,"brotliLength":0,"metaUid":"8df5ffbc-10"},"8df5ffbc-13":{"renderedLength":8312,"gzipLength":2472,"brotliLength":0,"metaUid":"8df5ffbc-12"},"8df5ffbc-15":{"renderedLength":1518,"gzipLength":724,"brotliLength":0,"metaUid":"8df5ffbc-14"},"8df5ffbc-17":{"renderedLength":5942,"gzipLength":2283,"brotliLength":0,"metaUid":"8df5ffbc-16"},"8df5ffbc-19":{"renderedLength":4929,"gzipLength":1410,"brotliLength":0,"metaUid":"8df5ffbc-18"},"8df5ffbc-21":{"renderedLength":8002,"gzipLength":2092,"brotliLength":0,"metaUid":"8df5ffbc-20"},"8df5ffbc-23":{"renderedLength":985,"gzipLength":549,"brotliLength":0,"metaUid":"8df5ffbc-22"}},"nodeMetas":{"8df5ffbc-0":{"id":"/src/delegate.ts","moduleParts":{"index.js":"8df5ffbc-1"},"imported":[{"uid":"8df5ffbc-24"}],"importedBy":[{"uid":"8df5ffbc-22"},{"uid":"8df5ffbc-12"},{"uid":"8df5ffbc-8"}]},"8df5ffbc-2":{"id":"/src/hydration-debug.ts","moduleParts":{"index.js":"8df5ffbc-3"},"imported":[],"importedBy":[{"uid":"8df5ffbc-22"},{"uid":"8df5ffbc-12"}]},"8df5ffbc-4":{"id":"/src/devtools.ts","moduleParts":{"index.js":"8df5ffbc-5"},"imported":[],"importedBy":[{"uid":"8df5ffbc-22"},{"uid":"8df5ffbc-10"}]},"8df5ffbc-6":{"id":"/src/nodes.ts","moduleParts":{"index.js":"8df5ffbc-7"},"imported":[{"uid":"8df5ffbc-25"},{"uid":"8df5ffbc-24"}],"importedBy":[{"uid":"8df5ffbc-12"},{"uid":"8df5ffbc-10"}]},"8df5ffbc-8":{"id":"/src/props.ts","moduleParts":{"index.js":"8df5ffbc-9"},"imported":[{"uid":"8df5ffbc-25"},{"uid":"8df5ffbc-24"},{"uid":"8df5ffbc-0"}],"importedBy":[{"uid":"8df5ffbc-22"},{"uid":"8df5ffbc-12"},{"uid":"8df5ffbc-10"}]},"8df5ffbc-10":{"id":"/src/mount.ts","moduleParts":{"index.js":"8df5ffbc-11"},"imported":[{"uid":"8df5ffbc-25"},{"uid":"8df5ffbc-24"},{"uid":"8df5ffbc-4"},{"uid":"8df5ffbc-6"},{"uid":"8df5ffbc-8"}],"importedBy":[{"uid":"8df5ffbc-22"},{"uid":"8df5ffbc-12"},{"uid":"8df5ffbc-14"},{"uid":"8df5ffbc-16"},{"uid":"8df5ffbc-20"}]},"8df5ffbc-12":{"id":"/src/hydrate.ts","moduleParts":{"index.js":"8df5ffbc-13"},"imported":[{"uid":"8df5ffbc-25"},{"uid":"8df5ffbc-24"},{"uid":"8df5ffbc-0"},{"uid":"8df5ffbc-2"},{"uid":"8df5ffbc-10"},{"uid":"8df5ffbc-6"},{"uid":"8df5ffbc-8"}],"importedBy":[{"uid":"8df5ffbc-22"}]},"8df5ffbc-14":{"id":"/src/keep-alive.ts","moduleParts":{"index.js":"8df5ffbc-15"},"imported":[{"uid":"8df5ffbc-25"},{"uid":"8df5ffbc-24"},{"uid":"8df5ffbc-10"}],"importedBy":[{"uid":"8df5ffbc-22"}]},"8df5ffbc-16":{"id":"/src/template.ts","moduleParts":{"index.js":"8df5ffbc-17"},"imported":[{"uid":"8df5ffbc-24"},{"uid":"8df5ffbc-10"}],"importedBy":[{"uid":"8df5ffbc-22"}]},"8df5ffbc-18":{"id":"/src/transition.ts","moduleParts":{"index.js":"8df5ffbc-19"},"imported":[{"uid":"8df5ffbc-25"},{"uid":"8df5ffbc-24"}],"importedBy":[{"uid":"8df5ffbc-22"}]},"8df5ffbc-20":{"id":"/src/transition-group.ts","moduleParts":{"index.js":"8df5ffbc-21"},"imported":[{"uid":"8df5ffbc-25"},{"uid":"8df5ffbc-24"},{"uid":"8df5ffbc-10"}],"importedBy":[{"uid":"8df5ffbc-22"}]},"8df5ffbc-22":{"id":"/src/index.ts","moduleParts":{"index.js":"8df5ffbc-23"},"imported":[{"uid":"8df5ffbc-0"},{"uid":"8df5ffbc-12"},{"uid":"8df5ffbc-2"},{"uid":"8df5ffbc-14"},{"uid":"8df5ffbc-10"},{"uid":"8df5ffbc-8"},{"uid":"8df5ffbc-16"},{"uid":"8df5ffbc-18"},{"uid":"8df5ffbc-20"},{"uid":"8df5ffbc-4"}],"importedBy":[],"isEntry":true},"8df5ffbc-24":{"id":"@pyreon/reactivity","moduleParts":{},"imported":[],"importedBy":[{"uid":"8df5ffbc-0"},{"uid":"8df5ffbc-12"},{"uid":"8df5ffbc-14"},{"uid":"8df5ffbc-10"},{"uid":"8df5ffbc-8"},{"uid":"8df5ffbc-16"},{"uid":"8df5ffbc-18"},{"uid":"8df5ffbc-20"},{"uid":"8df5ffbc-6"}]},"8df5ffbc-25":{"id":"@pyreon/core","moduleParts":{},"imported":[],"importedBy":[{"uid":"8df5ffbc-12"},{"uid":"8df5ffbc-14"},{"uid":"8df5ffbc-10"},{"uid":"8df5ffbc-8"},{"uid":"8df5ffbc-18"},{"uid":"8df5ffbc-20"},{"uid":"8df5ffbc-6"}]}},"env":{"rollup":"4.23.0"},"options":{"gzip":true,"brotli":false,"sourcemap":false}};
|
|
5390
5390
|
|
|
5391
5391
|
const run = () => {
|
|
5392
5392
|
const width = window.innerWidth;
|
|
@@ -5386,7 +5386,7 @@ var drawChart = (function (exports) {
|
|
|
5386
5386
|
</script>
|
|
5387
5387
|
<script>
|
|
5388
5388
|
/*<!--*/
|
|
5389
|
-
const data = {"version":2,"tree":{"name":"root","children":[{"name":"keep-alive-entry.js","children":[{"name":"src","children":[{"uid":"
|
|
5389
|
+
const data = {"version":2,"tree":{"name":"root","children":[{"name":"keep-alive-entry.js","children":[{"name":"src","children":[{"uid":"56ea40e5-1","name":"devtools.ts"},{"uid":"56ea40e5-3","name":"nodes.ts"},{"uid":"56ea40e5-5","name":"delegate.ts"},{"uid":"56ea40e5-7","name":"props.ts"},{"uid":"56ea40e5-9","name":"mount.ts"},{"uid":"56ea40e5-11","name":"keep-alive.ts"}]}]}],"isRoot":true},"nodeParts":{"56ea40e5-1":{"renderedLength":759,"gzipLength":340,"brotliLength":0,"metaUid":"56ea40e5-0"},"56ea40e5-3":{"renderedLength":17556,"gzipLength":4658,"brotliLength":0,"metaUid":"56ea40e5-2"},"56ea40e5-5":{"renderedLength":790,"gzipLength":436,"brotliLength":0,"metaUid":"56ea40e5-4"},"56ea40e5-7":{"renderedLength":7818,"gzipLength":2974,"brotliLength":0,"metaUid":"56ea40e5-6"},"56ea40e5-9":{"renderedLength":12162,"gzipLength":3873,"brotliLength":0,"metaUid":"56ea40e5-8"},"56ea40e5-11":{"renderedLength":1518,"gzipLength":724,"brotliLength":0,"metaUid":"56ea40e5-10"}},"nodeMetas":{"56ea40e5-0":{"id":"/src/devtools.ts","moduleParts":{"keep-alive-entry.js":"56ea40e5-1"},"imported":[],"importedBy":[{"uid":"56ea40e5-8"}]},"56ea40e5-2":{"id":"/src/nodes.ts","moduleParts":{"keep-alive-entry.js":"56ea40e5-3"},"imported":[{"uid":"56ea40e5-12"},{"uid":"56ea40e5-13"}],"importedBy":[{"uid":"56ea40e5-8"}]},"56ea40e5-4":{"id":"/src/delegate.ts","moduleParts":{"keep-alive-entry.js":"56ea40e5-5"},"imported":[{"uid":"56ea40e5-13"}],"importedBy":[{"uid":"56ea40e5-6"}]},"56ea40e5-6":{"id":"/src/props.ts","moduleParts":{"keep-alive-entry.js":"56ea40e5-7"},"imported":[{"uid":"56ea40e5-12"},{"uid":"56ea40e5-13"},{"uid":"56ea40e5-4"}],"importedBy":[{"uid":"56ea40e5-8"}]},"56ea40e5-8":{"id":"/src/mount.ts","moduleParts":{"keep-alive-entry.js":"56ea40e5-9"},"imported":[{"uid":"56ea40e5-12"},{"uid":"56ea40e5-13"},{"uid":"56ea40e5-0"},{"uid":"56ea40e5-2"},{"uid":"56ea40e5-6"}],"importedBy":[{"uid":"56ea40e5-10"}]},"56ea40e5-10":{"id":"/src/keep-alive.ts","moduleParts":{"keep-alive-entry.js":"56ea40e5-11"},"imported":[{"uid":"56ea40e5-12"},{"uid":"56ea40e5-13"},{"uid":"56ea40e5-8"}],"importedBy":[],"isEntry":true},"56ea40e5-12":{"id":"@pyreon/core","moduleParts":{},"imported":[],"importedBy":[{"uid":"56ea40e5-10"},{"uid":"56ea40e5-8"},{"uid":"56ea40e5-2"},{"uid":"56ea40e5-6"}]},"56ea40e5-13":{"id":"@pyreon/reactivity","moduleParts":{},"imported":[],"importedBy":[{"uid":"56ea40e5-10"},{"uid":"56ea40e5-8"},{"uid":"56ea40e5-2"},{"uid":"56ea40e5-6"},{"uid":"56ea40e5-4"}]}},"env":{"rollup":"4.23.0"},"options":{"gzip":true,"brotli":false,"sourcemap":false}};
|
|
5390
5390
|
|
|
5391
5391
|
const run = () => {
|
|
5392
5392
|
const width = window.innerWidth;
|
package/lib/index.js
CHANGED
|
@@ -1049,7 +1049,10 @@ function applyProps(el, props) {
|
|
|
1049
1049
|
let cleanups = null;
|
|
1050
1050
|
for (const key in props) {
|
|
1051
1051
|
if (key === "key" || key === "ref" || key === "children") continue;
|
|
1052
|
-
const
|
|
1052
|
+
const descriptor = Object.getOwnPropertyDescriptor(props, key);
|
|
1053
|
+
let c;
|
|
1054
|
+
if (descriptor?.get) c = renderEffect(() => applyStaticProp(el, key, props[key]));
|
|
1055
|
+
else c = applyProp(el, key, props[key]);
|
|
1053
1056
|
if (c) if (!first) first = c;
|
|
1054
1057
|
else if (!cleanups) cleanups = [first, c];
|
|
1055
1058
|
else cleanups.push(c);
|
package/lib/keep-alive-entry.js
CHANGED
|
@@ -763,7 +763,10 @@ function applyProps(el, props) {
|
|
|
763
763
|
let cleanups = null;
|
|
764
764
|
for (const key in props) {
|
|
765
765
|
if (key === "key" || key === "ref" || key === "children") continue;
|
|
766
|
-
const
|
|
766
|
+
const descriptor = Object.getOwnPropertyDescriptor(props, key);
|
|
767
|
+
let c;
|
|
768
|
+
if (descriptor?.get) c = renderEffect(() => applyStaticProp(el, key, props[key]));
|
|
769
|
+
else c = applyProp(el, key, props[key]);
|
|
767
770
|
if (c) if (!first) first = c;
|
|
768
771
|
else if (!cleanups) cleanups = [first, c];
|
|
769
772
|
else cleanups.push(c);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pyreon/runtime-dom",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.0",
|
|
4
4
|
"description": "DOM renderer for Pyreon",
|
|
5
5
|
"homepage": "https://github.com/pyreon/pyreon/tree/main/packages/runtime-dom#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -54,15 +54,15 @@
|
|
|
54
54
|
"prepublishOnly": "bun run build"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@pyreon/core": "^0.
|
|
58
|
-
"@pyreon/reactivity": "^0.
|
|
57
|
+
"@pyreon/core": "^0.18.0",
|
|
58
|
+
"@pyreon/reactivity": "^0.18.0"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"@happy-dom/global-registrator": "^20.8.9",
|
|
62
|
-
"@pyreon/compiler": "^0.
|
|
62
|
+
"@pyreon/compiler": "^0.18.0",
|
|
63
63
|
"@pyreon/manifest": "0.13.1",
|
|
64
|
-
"@pyreon/runtime-server": "^0.
|
|
65
|
-
"@pyreon/test-utils": "^0.13.
|
|
64
|
+
"@pyreon/runtime-server": "^0.18.0",
|
|
65
|
+
"@pyreon/test-utils": "^0.13.5",
|
|
66
66
|
"@vitest/browser-playwright": "^4.1.4",
|
|
67
67
|
"esbuild": "^0.28.0",
|
|
68
68
|
"happy-dom": "^20.8.3",
|
package/src/props.ts
CHANGED
|
@@ -179,7 +179,23 @@ export function applyProps(el: Element, props: Props): Cleanup | null {
|
|
|
179
179
|
let cleanups: Cleanup[] | null = null
|
|
180
180
|
for (const key in props) {
|
|
181
181
|
if (key === 'key' || key === 'ref' || key === 'children') continue
|
|
182
|
-
|
|
182
|
+
// Getter-shaped descriptors are produced by `makeReactiveProps` from
|
|
183
|
+
// compiler-emitted `_rp(() => signal())` wrappers. A plain
|
|
184
|
+
// `props[key]` read fires the getter once at mount time and stores
|
|
185
|
+
// the resolved value — breaking signal-driven reactivity. Detecting
|
|
186
|
+
// the descriptor and wrapping the read in `renderEffect` here is
|
|
187
|
+
// equivalent to applyProp's existing function-value branch (line 322),
|
|
188
|
+
// routed through the descriptor instead of the value. Other prop
|
|
189
|
+
// pipelines (`splitProps`, `mergeProps`, rocketstyle's
|
|
190
|
+
// descriptor-preserving merges) keep the getter intact end-to-end;
|
|
191
|
+
// this is the final consumer that closes the loop.
|
|
192
|
+
const descriptor = Object.getOwnPropertyDescriptor(props, key)
|
|
193
|
+
let c: Cleanup | null
|
|
194
|
+
if (descriptor?.get) {
|
|
195
|
+
c = renderEffect(() => applyStaticProp(el, key, (props as Record<string, unknown>)[key]))
|
|
196
|
+
} else {
|
|
197
|
+
c = applyProp(el, key, props[key])
|
|
198
|
+
}
|
|
183
199
|
if (c) {
|
|
184
200
|
if (!first) {
|
|
185
201
|
first = c
|
|
@@ -118,12 +118,16 @@ describe('Transition', () => {
|
|
|
118
118
|
const target = el.querySelector('.lifecycle') as HTMLElement
|
|
119
119
|
if (target) {
|
|
120
120
|
target.dispatchEvent(new Event('transitionend'))
|
|
121
|
-
//
|
|
122
|
-
//
|
|
123
|
-
//
|
|
124
|
-
//
|
|
125
|
-
|
|
126
|
-
|
|
121
|
+
// Poll for the assertion instead of fixed sleep. Fixed setTimeout
|
|
122
|
+
// is structurally flaky on shared CI runners: scheduling latency
|
|
123
|
+
// between dispatchEvent's callback queue and the next tick can
|
|
124
|
+
// exceed any reasonable fixed wait (we tried 10ms then 50ms, both
|
|
125
|
+
// flaked). `vi.waitFor` polls every 10ms up to the timeout, so it
|
|
126
|
+
// settles as soon as the assertion holds while still bounding the
|
|
127
|
+
// worst case.
|
|
128
|
+
await vi.waitFor(() => expect(onAfterEnter).toHaveBeenCalled(), {
|
|
129
|
+
timeout: 2000,
|
|
130
|
+
})
|
|
127
131
|
}
|
|
128
132
|
})
|
|
129
133
|
|