@pyreon/vue-compat 0.4.0 → 0.5.1
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/lib/analysis/jsx-runtime.js.html +5406 -0
- package/lib/jsx-runtime.js +93 -0
- package/lib/jsx-runtime.js.map +1 -0
- package/lib/types/jsx-runtime.d.ts +92 -0
- package/lib/types/jsx-runtime.d.ts.map +1 -0
- package/lib/types/jsx-runtime2.d.ts +10 -0
- package/lib/types/jsx-runtime2.d.ts.map +1 -0
- package/package.json +4 -4
- package/src/jsx-dev-runtime.ts +1 -0
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { Fragment, h, onUnmount } from "@pyreon/core";
|
|
2
|
+
import { runUntracked, signal } from "@pyreon/reactivity";
|
|
3
|
+
|
|
4
|
+
//#region src/jsx-runtime.ts
|
|
5
|
+
let _currentCtx = null;
|
|
6
|
+
let _hookIndex = 0;
|
|
7
|
+
function beginRender(ctx) {
|
|
8
|
+
_currentCtx = ctx;
|
|
9
|
+
_hookIndex = 0;
|
|
10
|
+
ctx.pendingEffects = [];
|
|
11
|
+
ctx.pendingLayoutEffects = [];
|
|
12
|
+
}
|
|
13
|
+
function endRender() {
|
|
14
|
+
_currentCtx = null;
|
|
15
|
+
_hookIndex = 0;
|
|
16
|
+
}
|
|
17
|
+
function runLayoutEffects(entries) {
|
|
18
|
+
for (const entry of entries) {
|
|
19
|
+
if (entry.cleanup) entry.cleanup();
|
|
20
|
+
const cleanup = entry.fn();
|
|
21
|
+
entry.cleanup = typeof cleanup === "function" ? cleanup : void 0;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
function scheduleEffects(ctx, entries) {
|
|
25
|
+
if (entries.length === 0) return;
|
|
26
|
+
queueMicrotask(() => {
|
|
27
|
+
for (const entry of entries) {
|
|
28
|
+
if (ctx.unmounted) return;
|
|
29
|
+
if (entry.cleanup) entry.cleanup();
|
|
30
|
+
const cleanup = entry.fn();
|
|
31
|
+
entry.cleanup = typeof cleanup === "function" ? cleanup : void 0;
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
const _wrapperCache = /* @__PURE__ */ new WeakMap();
|
|
36
|
+
function wrapCompatComponent(vueComponent) {
|
|
37
|
+
let wrapped = _wrapperCache.get(vueComponent);
|
|
38
|
+
if (wrapped) return wrapped;
|
|
39
|
+
wrapped = ((props) => {
|
|
40
|
+
const ctx = {
|
|
41
|
+
hooks: [],
|
|
42
|
+
scheduleRerender: () => {},
|
|
43
|
+
pendingEffects: [],
|
|
44
|
+
pendingLayoutEffects: [],
|
|
45
|
+
unmounted: false,
|
|
46
|
+
unmountCallbacks: []
|
|
47
|
+
};
|
|
48
|
+
const version = signal(0);
|
|
49
|
+
let updateScheduled = false;
|
|
50
|
+
ctx.scheduleRerender = () => {
|
|
51
|
+
if (ctx.unmounted || updateScheduled) return;
|
|
52
|
+
updateScheduled = true;
|
|
53
|
+
queueMicrotask(() => {
|
|
54
|
+
updateScheduled = false;
|
|
55
|
+
if (!ctx.unmounted) version.set(version.peek() + 1);
|
|
56
|
+
});
|
|
57
|
+
};
|
|
58
|
+
onUnmount(() => {
|
|
59
|
+
ctx.unmounted = true;
|
|
60
|
+
for (const cb of ctx.unmountCallbacks) cb();
|
|
61
|
+
});
|
|
62
|
+
return () => {
|
|
63
|
+
version();
|
|
64
|
+
beginRender(ctx);
|
|
65
|
+
const result = runUntracked(() => vueComponent(props));
|
|
66
|
+
const layoutEffects = ctx.pendingLayoutEffects;
|
|
67
|
+
const effects = ctx.pendingEffects;
|
|
68
|
+
endRender();
|
|
69
|
+
runLayoutEffects(layoutEffects);
|
|
70
|
+
scheduleEffects(ctx, effects);
|
|
71
|
+
return result;
|
|
72
|
+
};
|
|
73
|
+
});
|
|
74
|
+
_wrapperCache.set(vueComponent, wrapped);
|
|
75
|
+
return wrapped;
|
|
76
|
+
}
|
|
77
|
+
function jsx(type, props, key) {
|
|
78
|
+
const { children, ...rest } = props;
|
|
79
|
+
const propsWithKey = key != null ? {
|
|
80
|
+
...rest,
|
|
81
|
+
key
|
|
82
|
+
} : rest;
|
|
83
|
+
if (typeof type === "function") return h(wrapCompatComponent(type), children !== void 0 ? {
|
|
84
|
+
...propsWithKey,
|
|
85
|
+
children
|
|
86
|
+
} : propsWithKey);
|
|
87
|
+
return h(type, propsWithKey, ...children === void 0 ? [] : Array.isArray(children) ? children : [children]);
|
|
88
|
+
}
|
|
89
|
+
const jsxs = jsx;
|
|
90
|
+
|
|
91
|
+
//#endregion
|
|
92
|
+
export { Fragment, jsx, jsxs };
|
|
93
|
+
//# sourceMappingURL=jsx-runtime.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsx-runtime.js","names":[],"sources":["../src/jsx-runtime.ts"],"sourcesContent":["/**\n * Compat JSX runtime for Vue compatibility mode.\n *\n * When `jsxImportSource` is redirected to `@pyreon/vue-compat` (via the vite\n * plugin's `compat: \"vue\"` option), OXC rewrites JSX to import from this file.\n *\n * For component VNodes, we wrap the component function so it returns a reactive\n * accessor — enabling Vue-style re-renders on state change while Pyreon's\n * existing renderer handles all DOM work.\n *\n * Key difference from react/preact compat: the component body runs inside\n * `runUntracked` to prevent `.value` reads (which access underlying signals)\n * from being tracked by the reactive accessor. Only the version signal\n * triggers re-renders.\n */\n\nimport type { ComponentFn, Props, VNode, VNodeChild } from \"@pyreon/core\"\nimport { Fragment, h, onUnmount } from \"@pyreon/core\"\nimport { runUntracked, signal } from \"@pyreon/reactivity\"\n\nexport { Fragment }\n\n// ─── Render context (used by hooks) ──────────────────────────────────────────\n\nexport interface RenderContext {\n hooks: unknown[]\n scheduleRerender: () => void\n /** Effect entries pending execution after render */\n pendingEffects: EffectEntry[]\n /** Layout effect entries pending execution after render */\n pendingLayoutEffects: EffectEntry[]\n /** Set to true when the component is unmounted */\n unmounted: boolean\n /** Callbacks to run on unmount (lifecycle + effect cleanups) */\n unmountCallbacks: (() => void)[]\n}\n\nexport interface EffectEntry {\n // biome-ignore lint/suspicious/noConfusingVoidType: matches Vue's effect signature\n fn: () => (() => void) | void\n deps: unknown[] | undefined\n cleanup: (() => void) | undefined\n}\n\nlet _currentCtx: RenderContext | null = null\nlet _hookIndex = 0\n\nexport function getCurrentCtx(): RenderContext | null {\n return _currentCtx\n}\n\nexport function getHookIndex(): number {\n return _hookIndex++\n}\n\nexport function beginRender(ctx: RenderContext): void {\n _currentCtx = ctx\n _hookIndex = 0\n ctx.pendingEffects = []\n ctx.pendingLayoutEffects = []\n}\n\nexport function endRender(): void {\n _currentCtx = null\n _hookIndex = 0\n}\n\n// ─── Effect runners ──────────────────────────────────────────────────────────\n\nfunction runLayoutEffects(entries: EffectEntry[]): void {\n for (const entry of entries) {\n if (entry.cleanup) entry.cleanup()\n const cleanup = entry.fn()\n entry.cleanup = typeof cleanup === \"function\" ? cleanup : undefined\n }\n}\n\nfunction scheduleEffects(ctx: RenderContext, entries: EffectEntry[]): void {\n if (entries.length === 0) return\n queueMicrotask(() => {\n for (const entry of entries) {\n if (ctx.unmounted) return\n if (entry.cleanup) entry.cleanup()\n const cleanup = entry.fn()\n entry.cleanup = typeof cleanup === \"function\" ? cleanup : undefined\n }\n })\n}\n\n// ─── Component wrapping ──────────────────────────────────────────────────────\n\n// biome-ignore lint/complexity/noBannedTypes: Function is needed for generic component wrapping\nconst _wrapperCache = new WeakMap<Function, ComponentFn>()\n\n// biome-ignore lint/complexity/noBannedTypes: Function is needed for generic component wrapping\nfunction wrapCompatComponent(vueComponent: Function): ComponentFn {\n let wrapped = _wrapperCache.get(vueComponent)\n if (wrapped) return wrapped\n\n // The wrapper returns a reactive accessor (() => VNodeChild) which Pyreon's\n // mountChild treats as a reactive expression via mountReactive.\n wrapped = ((props: Props) => {\n const ctx: RenderContext = {\n hooks: [],\n scheduleRerender: () => {\n // Will be replaced below after version signal is created\n },\n pendingEffects: [],\n pendingLayoutEffects: [],\n unmounted: false,\n unmountCallbacks: [],\n }\n\n const version = signal(0)\n let updateScheduled = false\n\n ctx.scheduleRerender = () => {\n if (ctx.unmounted || updateScheduled) return\n updateScheduled = true\n queueMicrotask(() => {\n updateScheduled = false\n if (!ctx.unmounted) version.set(version.peek() + 1)\n })\n }\n\n // Register cleanup when component unmounts\n onUnmount(() => {\n ctx.unmounted = true\n for (const cb of ctx.unmountCallbacks) cb()\n })\n\n // Return reactive accessor — Pyreon's mountChild calls mountReactive\n return () => {\n version() // tracked read — triggers re-execution when state changes\n beginRender(ctx)\n // runUntracked prevents .value signal reads from being tracked by this accessor —\n // only the version signal should trigger re-renders\n const result = runUntracked(() => (vueComponent as ComponentFn)(props))\n const layoutEffects = ctx.pendingLayoutEffects\n const effects = ctx.pendingEffects\n endRender()\n\n runLayoutEffects(layoutEffects)\n scheduleEffects(ctx, effects)\n\n return result\n }\n }) as unknown as ComponentFn\n\n _wrapperCache.set(vueComponent, wrapped)\n return wrapped\n}\n\n// ─── JSX functions ───────────────────────────────────────────────────────────\n\nexport function jsx(\n type: string | ComponentFn | symbol,\n props: Props & { children?: VNodeChild | VNodeChild[] },\n key?: string | number | null,\n): VNode {\n const { children, ...rest } = props\n const propsWithKey = (key != null ? { ...rest, key } : rest) as Props\n\n if (typeof type === \"function\") {\n // Wrap Vue-style component for re-render support\n const wrapped = wrapCompatComponent(type)\n const componentProps = children !== undefined ? { ...propsWithKey, children } : propsWithKey\n return h(wrapped, componentProps)\n }\n\n // DOM element or symbol (Fragment): children go in vnode.children\n const childArray = children === undefined ? [] : Array.isArray(children) ? children : [children]\n\n return h(type, propsWithKey, ...(childArray as VNodeChild[]))\n}\n\nexport const jsxs = jsx\nexport const jsxDEV = jsx\n"],"mappings":";;;;AA4CA,IAAI,cAAoC;AACxC,IAAI,aAAa;AAUjB,SAAgB,YAAY,KAA0B;AACpD,eAAc;AACd,cAAa;AACb,KAAI,iBAAiB,EAAE;AACvB,KAAI,uBAAuB,EAAE;;AAG/B,SAAgB,YAAkB;AAChC,eAAc;AACd,cAAa;;AAKf,SAAS,iB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cAAc,QAAQ;AACxC,QAAO;;AAKT,SAAgB,IACd,MACA,OACA,KACO;CACP,MAAM,EAAE,UAAU,GAAG,SAAS;CAC9B,MAAM,eAAgB,OAAO,OAAO;EAAE,GAAG;EAAM;EAAK,GAAG;AAEvD,KAAI,OAAO,SAAS,WAIlB,QAAO,EAFS,oBAAoB,KAAK,EAClB,aAAa,SAAY;EAAE,GAAG;EAAc;EAAU,GAAG,aAC/C;AAMnC,QAAO,EAAE,MAAM,cAAc,GAFV,aAAa,SAAY,EAAE,GAAG,MAAM,QAAQ,SAAS,GAAG,WAAW,CAAC,SAAS,CAEnC;;AAG/D,MAAa,OAAO"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { Fragment, h, onUnmount } from "@pyreon/core";
|
|
2
|
+
import { runUntracked, signal } from "@pyreon/reactivity";
|
|
3
|
+
|
|
4
|
+
//#region src/jsx-runtime.ts
|
|
5
|
+
|
|
6
|
+
function beginRender(ctx) {
|
|
7
|
+
_currentCtx = ctx;
|
|
8
|
+
_hookIndex = 0;
|
|
9
|
+
ctx.pendingEffects = [];
|
|
10
|
+
ctx.pendingLayoutEffects = [];
|
|
11
|
+
}
|
|
12
|
+
function endRender() {
|
|
13
|
+
_currentCtx = null;
|
|
14
|
+
_hookIndex = 0;
|
|
15
|
+
}
|
|
16
|
+
function runLayoutEffects(entries) {
|
|
17
|
+
for (const entry of entries) {
|
|
18
|
+
if (entry.cleanup) entry.cleanup();
|
|
19
|
+
const cleanup = entry.fn();
|
|
20
|
+
entry.cleanup = typeof cleanup === "function" ? cleanup : void 0;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
function scheduleEffects(ctx, entries) {
|
|
24
|
+
if (entries.length === 0) return;
|
|
25
|
+
queueMicrotask(() => {
|
|
26
|
+
for (const entry of entries) {
|
|
27
|
+
if (ctx.unmounted) return;
|
|
28
|
+
if (entry.cleanup) entry.cleanup();
|
|
29
|
+
const cleanup = entry.fn();
|
|
30
|
+
entry.cleanup = typeof cleanup === "function" ? cleanup : void 0;
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
function wrapCompatComponent(vueComponent) {
|
|
35
|
+
let wrapped = _wrapperCache.get(vueComponent);
|
|
36
|
+
if (wrapped) return wrapped;
|
|
37
|
+
wrapped = props => {
|
|
38
|
+
const ctx = {
|
|
39
|
+
hooks: [],
|
|
40
|
+
scheduleRerender: () => {},
|
|
41
|
+
pendingEffects: [],
|
|
42
|
+
pendingLayoutEffects: [],
|
|
43
|
+
unmounted: false,
|
|
44
|
+
unmountCallbacks: []
|
|
45
|
+
};
|
|
46
|
+
const version = signal(0);
|
|
47
|
+
let updateScheduled = false;
|
|
48
|
+
ctx.scheduleRerender = () => {
|
|
49
|
+
if (ctx.unmounted || updateScheduled) return;
|
|
50
|
+
updateScheduled = true;
|
|
51
|
+
queueMicrotask(() => {
|
|
52
|
+
updateScheduled = false;
|
|
53
|
+
if (!ctx.unmounted) version.set(version.peek() + 1);
|
|
54
|
+
});
|
|
55
|
+
};
|
|
56
|
+
onUnmount(() => {
|
|
57
|
+
ctx.unmounted = true;
|
|
58
|
+
for (const cb of ctx.unmountCallbacks) cb();
|
|
59
|
+
});
|
|
60
|
+
return () => {
|
|
61
|
+
version();
|
|
62
|
+
beginRender(ctx);
|
|
63
|
+
const result = runUntracked(() => vueComponent(props));
|
|
64
|
+
const layoutEffects = ctx.pendingLayoutEffects;
|
|
65
|
+
const effects = ctx.pendingEffects;
|
|
66
|
+
endRender();
|
|
67
|
+
runLayoutEffects(layoutEffects);
|
|
68
|
+
scheduleEffects(ctx, effects);
|
|
69
|
+
return result;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
_wrapperCache.set(vueComponent, wrapped);
|
|
73
|
+
return wrapped;
|
|
74
|
+
}
|
|
75
|
+
function jsx(type, props, key) {
|
|
76
|
+
const {
|
|
77
|
+
children,
|
|
78
|
+
...rest
|
|
79
|
+
} = props;
|
|
80
|
+
const propsWithKey = key != null ? {
|
|
81
|
+
...rest,
|
|
82
|
+
key
|
|
83
|
+
} : rest;
|
|
84
|
+
if (typeof type === "function") return h(wrapCompatComponent(type), children !== void 0 ? {
|
|
85
|
+
...propsWithKey,
|
|
86
|
+
children
|
|
87
|
+
} : propsWithKey);
|
|
88
|
+
return h(type, propsWithKey, ...(children === void 0 ? [] : Array.isArray(children) ? children : [children]));
|
|
89
|
+
}
|
|
90
|
+
//#endregion
|
|
91
|
+
export { Fragment, jsx, jsxs };
|
|
92
|
+
//# sourceMappingURL=jsx-runtime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsx-runtime.d.ts","names":[],"sources":["../../src/jsx-runtime.ts"],"mappings":";;;;;AAuDA,SAAgB,WAAA,CAAY,GAAA,EAA0B;EACpD,WAAA,GAAc,GAAA;EACd,UAAA,GAAa,CAAA;EACb,GAAA,CAAI,cAAA,GAAiB,EAAE;EACvB,GAAA,CAAI,oBAAA,GAAuB,EAAE;;AAG/B,SAAgB,SAAA,CAAA,EAAkB;EAChC,WAAA,GAAc,IAAA;EACd,UAAA,GAAa,CAAA;;AAKf,SAAS,gBAAA,CAAiB,OAAA,EAA8B;EACtD,KAAK,MAAM,KAAA,IAAS,OAAA,EAAS;IAC3B,IAAI,KAAA,CAAM,OAAA,EAAS,KAAA,CAAM,OAAA,CAAA,CAAS;IAClC,MAAM,OAAA,GAAU,KAAA,CAAM,EAAA,CAAA,CAAI;IAC1B,KAAA,CAAM,OAAA,GAAU,OAAO,OAAA,KAAY,UAAA,GAAa,OAAA,GAAU,KAAA,CAAA;;;AAI9D,SAAS,eAAA,CAAgB,GAAA,EAAoB,OAAA,EAA8B;EACzE,IAAI,OAAA,CAAQ,MAAA,KAAW,CAAA,EAAG;EAC1B,cAAA,CAAA,MAAqB;IACnB,KAAK,MAAM,KAAA,IAAS,OAAA,EAAS;MAC3B,IAAI,GAAA,CAAI,SAAA,EAAW;MACnB,IAAI,KAAA,CAAM,OAAA,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,GAAA,CAAI,oBAAA;MAC1B,MAAM,OAAA,GAAU,GAAA,CAAI,cAAA;MACpB,SAAA,CAAA,CAAW;MAEX,gBAAA,CAAiB,aAAA,CAAc;MAC/B,eAAA,CAAgB,GAAA,EAAK,OAAA,CAAQ;MAE7B,OAAO,MAAA;;;EAIX,aAAA,CAAc,GAAA,CAAI,YAAA,EAAc,OAAA,CAAQ;EACxC,OAAO,OAAA;;AAKT,SAAgB,GAAA,CACd,IAAA,EACA,KAAA,EACA,GAAA,EACO;EACP,MAAM;IAAE,QAAA;IAAU,GAAG;EAAA,CAAA,GAAS,KAAA;EAC9B,MAAM,YAAA,GAAgB,GAAA,IAAO,IAAA,GAAO;IAAE,GAAG,IAAA;IAAM;GAAK,GAAG,IAAA;EAEvD,IAAI,OAAO,IAAA,KAAS,UAAA,EAIlB,OAAO,CAAA,CAFS,mBAAA,CAAoB,IAAA,CAAK,EAClB,QAAA,KAAa,KAAA,CAAA,GAAY;IAAE,GAAG,YAAA;IAAc;GAAU,GAAG,YAAA,CAC/C;EAMnC,OAAO,CAAA,CAAE,IAAA,EAAM,YAAA,EAAc,IAFV,QAAA,KAAa,KAAA,CAAA,GAAY,EAAE,GAAG,KAAA,CAAM,OAAA,CAAQ,QAAA,CAAS,GAAG,QAAA,GAAW,CAAC,QAAA,CAAS,EAEnC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ComponentFn, Fragment, Props, VNode, VNodeChild } from "@pyreon/core";
|
|
2
|
+
|
|
3
|
+
//#region src/jsx-runtime.d.ts
|
|
4
|
+
declare function jsx(type: string | ComponentFn | symbol, props: Props & {
|
|
5
|
+
children?: VNodeChild | VNodeChild[];
|
|
6
|
+
}, key?: string | number | null): VNode;
|
|
7
|
+
declare const jsxs: typeof jsx;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { Fragment, jsx, jsxs };
|
|
10
|
+
//# sourceMappingURL=jsx-runtime2.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsx-runtime2.d.ts","names":[],"sources":["../../src/jsx-runtime.ts"],"mappings":";;;iBA2JgB,GAAA,CACd,IAAA,WAAe,WAAA,WACf,KAAA,EAAO,KAAA;EAAU,QAAA,GAAW,UAAA,GAAa,UAAA;AAAA,GACzC,GAAA,4BACC,KAAA;AAAA,cAiBU,IAAA,SAAI,GAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pyreon/vue-compat",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"description": "Vue 3-compatible Composition API shim for Pyreon — write Vue-style code that runs on Pyreon's reactive engine",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -49,9 +49,9 @@
|
|
|
49
49
|
"prepublishOnly": "bun run build"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@pyreon/core": "^0.
|
|
53
|
-
"@pyreon/reactivity": "^0.
|
|
54
|
-
"@pyreon/runtime-dom": "^0.
|
|
52
|
+
"@pyreon/core": "^0.5.1",
|
|
53
|
+
"@pyreon/reactivity": "^0.5.1",
|
|
54
|
+
"@pyreon/runtime-dom": "^0.5.1"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@happy-dom/global-registrator": "^20.8.3",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Fragment, jsx, jsxs } from "./jsx-runtime"
|