@expressive/dom 0.0.0 → 0.2.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.
- package/dist/chunk-adapter-4jlvwsge.d.ts +37 -0
- package/dist/chunk-hot-gq8TyYJV.js +178 -0
- package/dist/chunk-hot-gq8TyYJV.js.map +1 -0
- package/dist/{chunk-vnode-DHwzzX6t.d.ts → chunk-vnode-BsbDCqd1.d.ts} +1 -1
- package/dist/{chunk-vnode-DA7cLTKP.js → chunk-vnode-CzmFSz5_.js} +1 -1
- package/dist/{chunk-vnode-DA7cLTKP.js.map → chunk-vnode-CzmFSz5_.js.map} +1 -1
- package/dist/index.d.ts +2 -37
- package/dist/index.js +41 -149
- package/dist/index.js.map +1 -1
- package/dist/jsx-dev-runtime.d.ts +9 -2
- package/dist/jsx-dev-runtime.js +3 -2
- package/dist/jsx-dev-runtime.js.map +1 -1
- package/dist/jsx-runtime.d.ts +1 -1
- package/dist/jsx-runtime.js +1 -1
- package/dist/vite.d.ts +8 -0
- package/dist/vite.js +142 -0
- package/dist/vite.js.map +1 -0
- package/package.json +14 -3
package/dist/vite.js
ADDED
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { dirname } from "node:path";
|
|
2
|
+
|
|
3
|
+
//#region src/vite.ts
|
|
4
|
+
const SOURCE = /\.[cm]?[jt]sx?$/;
|
|
5
|
+
const COMPONENT = /^[A-Z]/;
|
|
6
|
+
const FUNCTION = ["ArrowFunctionExpression", "FunctionExpression"];
|
|
7
|
+
/**
|
|
8
|
+
* Top-level classes a module can reassign, those declaring private members,
|
|
9
|
+
* function components by name, and its exports by local binding.
|
|
10
|
+
*/
|
|
11
|
+
function scan(body) {
|
|
12
|
+
const classes = [];
|
|
13
|
+
const hidden = [];
|
|
14
|
+
const components = [];
|
|
15
|
+
const exports = {};
|
|
16
|
+
function add(name, node) {
|
|
17
|
+
classes.push(name);
|
|
18
|
+
if (node.body.body.some((member) => member.key?.type == "PrivateIdentifier")) hidden.push(name);
|
|
19
|
+
}
|
|
20
|
+
function collect(node) {
|
|
21
|
+
if (node.type == "ClassDeclaration" && node.id) add(node.id.name, node);
|
|
22
|
+
else if (node.type == "FunctionDeclaration" && COMPONENT.test(node.id?.name)) components.push(node.id.name);
|
|
23
|
+
else if (node.type == "VariableDeclaration") for (const { id, init } of node.declarations) {
|
|
24
|
+
if (id.type != "Identifier") continue;
|
|
25
|
+
if (init?.type == "ClassExpression" && node.kind != "const") add(id.name, init);
|
|
26
|
+
else if (FUNCTION.includes(init?.type) && COMPONENT.test(id.name)) components.push(id.name);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
function names(node) {
|
|
30
|
+
if (node.type == "VariableDeclaration") return node.declarations.flatMap(({ id }) => id.type == "Identifier" ? [id.name] : []);
|
|
31
|
+
return [node.id.name];
|
|
32
|
+
}
|
|
33
|
+
for (const node of body) if (node.type == "ExportNamedDeclaration") {
|
|
34
|
+
if (node.declaration) {
|
|
35
|
+
collect(node.declaration);
|
|
36
|
+
for (const name of names(node.declaration)) exports[name] = name;
|
|
37
|
+
} else if (!node.source) for (const { local, exported } of node.specifiers) exports[exported.name ?? exported.value] = local.name;
|
|
38
|
+
} else if (node.type == "ExportDefaultDeclaration") {
|
|
39
|
+
const { declaration } = node;
|
|
40
|
+
collect(declaration);
|
|
41
|
+
if (declaration.id) exports.default = declaration.id.name;
|
|
42
|
+
} else collect(node);
|
|
43
|
+
return {
|
|
44
|
+
classes,
|
|
45
|
+
hidden,
|
|
46
|
+
components,
|
|
47
|
+
exports
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Bind a module's classes to `hot.accept` and its function components to dom's
|
|
52
|
+
* refresh. A State class it could not patch reloads the page; after an update,
|
|
53
|
+
* a changed component re-renders in place and any other changed export
|
|
54
|
+
* invalidates importers.
|
|
55
|
+
*/
|
|
56
|
+
function inject(id, body, ssr = false) {
|
|
57
|
+
const { classes, hidden, components, exports } = scan(body);
|
|
58
|
+
if (!classes.length && !components.length) return "";
|
|
59
|
+
const list = classes.join(", ");
|
|
60
|
+
const record = Object.entries(exports).map(([name, local]) => `${JSON.stringify(name)}: ${local}`);
|
|
61
|
+
const refresh = Object.keys(exports).filter((name) => components.includes(exports[name]));
|
|
62
|
+
const effect = ssr ? "replace it instead of patching" : "will trigger a full reload";
|
|
63
|
+
const notes = hidden.map((name) => `${JSON.stringify(name)}: ${JSON.stringify(`[expressive] ${name} (${id}) declares #private members, so edits to its module ${effect}. Use _ properties instead to keep HMR.`)}`);
|
|
64
|
+
const replace = ssr ? ` const __notes = { ${notes.join(", ")} };
|
|
65
|
+
const __before = import.meta.hot.data.expressive;
|
|
66
|
+
const __classes = (import.meta.hot.data.expressive = { ${list} });
|
|
67
|
+
const __warned = (import.meta.hot.data.warned ||= {});
|
|
68
|
+
for (const key in __notes)
|
|
69
|
+
if (__before && __classes[key] !== __before[key] && !__warned[key]) {
|
|
70
|
+
__warned[key] = true;
|
|
71
|
+
console.warn(__notes[key]);
|
|
72
|
+
}
|
|
73
|
+
` : ` const __notes = { ${notes.join(", ")} };
|
|
74
|
+
const __flag = (key) => 'expressive:private:' + ${JSON.stringify(id)} + ':' + key;
|
|
75
|
+
for (const key in __notes)
|
|
76
|
+
try {
|
|
77
|
+
if (sessionStorage.getItem(__flag(key)) == 'due') {
|
|
78
|
+
console.warn(__notes[key]);
|
|
79
|
+
sessionStorage.setItem(__flag(key), 'shown');
|
|
80
|
+
}
|
|
81
|
+
} catch {}
|
|
82
|
+
const __before = import.meta.hot.data.expressive;
|
|
83
|
+
const __classes = (import.meta.hot.data.expressive = { ${list} });
|
|
84
|
+
for (const key in __before)
|
|
85
|
+
if (__classes[key] !== __before[key] && __classes[key]?.prototype instanceof __State) {
|
|
86
|
+
const note = __notes[key];
|
|
87
|
+
if (note)
|
|
88
|
+
try {
|
|
89
|
+
if (!sessionStorage.getItem(__flag(key))) sessionStorage.setItem(__flag(key), 'due');
|
|
90
|
+
} catch {
|
|
91
|
+
console.warn(note);
|
|
92
|
+
}
|
|
93
|
+
dispatchEvent(new CustomEvent('expressive:reload', { detail: { module: ${JSON.stringify(id)}, class: key, reason: note ? 'private members' : 'class changed shape' } }));
|
|
94
|
+
location.reload();
|
|
95
|
+
break;
|
|
96
|
+
}
|
|
97
|
+
`;
|
|
98
|
+
const lines = ["", `import { State as __State } from '@expressive/mvc';`];
|
|
99
|
+
if (classes.length) lines.push(`import { hot as __expressive } from '@expressive/mvc/runtime';`, "{", ` const __hot = __expressive.accept(${JSON.stringify(id)}, { ${list} });`, ...classes.map((name) => ` ${name} = __hot.${name};`), "}");
|
|
100
|
+
if (components.length) lines.push(`import { hot as __refresh } from '@expressive/dom/jsx-dev-runtime';`, `__refresh(${JSON.stringify(id)}, { ${components.join(", ")} });`);
|
|
101
|
+
lines.push(`if (import.meta.hot) {
|
|
102
|
+
${replace} const __exports = { ${record.join(", ")} };
|
|
103
|
+
import.meta.hot.accept((next) => {
|
|
104
|
+
if (!next) return;
|
|
105
|
+
for (const key in __exports) {
|
|
106
|
+
const after = next[key];
|
|
107
|
+
if (after !== __exports[key] && !(after?.prototype instanceof __State) && !${JSON.stringify(refresh)}.includes(key))
|
|
108
|
+
return import.meta.hot.invalidate(\`"\${key}" export cannot be hot-patched.\`);
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
`);
|
|
113
|
+
return lines.join("\n");
|
|
114
|
+
}
|
|
115
|
+
/** Hot-patch classes and refresh function components in place during `vite` dev. */
|
|
116
|
+
function expressive() {
|
|
117
|
+
let root = "";
|
|
118
|
+
let runtime;
|
|
119
|
+
return {
|
|
120
|
+
name: "@expressive/dom:hot",
|
|
121
|
+
apply: "serve",
|
|
122
|
+
enforce: "post",
|
|
123
|
+
configResolved(config) {
|
|
124
|
+
root = config.root;
|
|
125
|
+
},
|
|
126
|
+
async transform(code, id, options) {
|
|
127
|
+
const [file] = id.split("?");
|
|
128
|
+
if (!SOURCE.test(file) || file.includes("/node_modules/")) return;
|
|
129
|
+
runtime ||= Promise.all(["@expressive/mvc/runtime", "@expressive/dom/jsx-dev-runtime"].map((entry) => this.resolve(entry).then((found) => found && dirname(found.id))));
|
|
130
|
+
for (const own of await runtime) if (own && file.startsWith(own)) return;
|
|
131
|
+
const output = inject(file.startsWith(root + "/") ? file.slice(root.length) : file, this.parse(code).body, options?.ssr);
|
|
132
|
+
if (output) return {
|
|
133
|
+
code: code + output,
|
|
134
|
+
map: null
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
//#endregion
|
|
141
|
+
export { expressive as default };
|
|
142
|
+
//# sourceMappingURL=vite.js.map
|
package/dist/vite.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vite.js","names":[],"sources":["../src/vite.ts"],"sourcesContent":["import { dirname } from 'node:path';\nimport type { Plugin } from 'vite';\n\ntype Node = { type: string; [key: string]: any };\n\nconst SOURCE = /\\.[cm]?[jt]sx?$/;\n\nconst COMPONENT = /^[A-Z]/;\nconst FUNCTION = ['ArrowFunctionExpression', 'FunctionExpression'];\n\n/**\n * Top-level classes a module can reassign, those declaring private members,\n * function components by name, and its exports by local binding.\n */\nfunction scan(body: Node[]) {\n const classes: string[] = [];\n const hidden: string[] = [];\n const components: string[] = [];\n const exports: Record<string, string> = {};\n\n function add(name: string, node: Node) {\n classes.push(name);\n\n if (node.body.body.some((member: Node) => member.key?.type == 'PrivateIdentifier')) hidden.push(name);\n }\n\n function collect(node: Node) {\n if (node.type == 'ClassDeclaration' && node.id) add(node.id.name, node);\n else if (node.type == 'FunctionDeclaration' && COMPONENT.test(node.id?.name)) components.push(node.id.name);\n else if (node.type == 'VariableDeclaration')\n for (const { id, init } of node.declarations) {\n if (id.type != 'Identifier') continue;\n if (init?.type == 'ClassExpression' && node.kind != 'const') add(id.name, init);\n else if (FUNCTION.includes(init?.type) && COMPONENT.test(id.name)) components.push(id.name);\n }\n }\n\n function names(node: Node): string[] {\n if (node.type == 'VariableDeclaration')\n return node.declarations.flatMap(({ id }: Node) => (id.type == 'Identifier' ? [id.name] : []));\n\n return [node.id.name];\n }\n\n for (const node of body) {\n if (node.type == 'ExportNamedDeclaration') {\n if (node.declaration) {\n collect(node.declaration);\n for (const name of names(node.declaration)) exports[name] = name;\n } else if (!node.source)\n for (const { local, exported } of node.specifiers)\n exports[exported.name ?? exported.value] = local.name;\n } else if (node.type == 'ExportDefaultDeclaration') {\n const { declaration } = node;\n\n collect(declaration);\n\n if (declaration.id) exports.default = declaration.id.name;\n } else collect(node);\n }\n\n return { classes, hidden, components, exports };\n}\n\n/**\n * Bind a module's classes to `hot.accept` and its function components to dom's\n * refresh. A State class it could not patch reloads the page; after an update,\n * a changed component re-renders in place and any other changed export\n * invalidates importers.\n */\nfunction inject(id: string, body: Node[], ssr = false) {\n const { classes, hidden, components, exports } = scan(body);\n\n if (!classes.length && !components.length) return '';\n\n const list = classes.join(', ');\n const record = Object.entries(exports).map(([name, local]) => `${JSON.stringify(name)}: ${local}`);\n const refresh = Object.keys(exports).filter((name) => components.includes(exports[name]));\n const effect = ssr ? 'replace it instead of patching' : 'will trigger a full reload';\n const notes = hidden.map(\n (name) =>\n `${JSON.stringify(name)}: ${JSON.stringify(`[expressive] ${name} (${id}) declares #private members, so edits to its module ${effect}. Use _ properties instead to keep HMR.`)}`\n );\n const replace = ssr\n ? ` const __notes = { ${notes.join(', ')} };\n const __before = import.meta.hot.data.expressive;\n const __classes = (import.meta.hot.data.expressive = { ${list} });\n const __warned = (import.meta.hot.data.warned ||= {});\n for (const key in __notes)\n if (__before && __classes[key] !== __before[key] && !__warned[key]) {\n __warned[key] = true;\n console.warn(__notes[key]);\n }\n`\n : ` const __notes = { ${notes.join(', ')} };\n const __flag = (key) => 'expressive:private:' + ${JSON.stringify(id)} + ':' + key;\n for (const key in __notes)\n try {\n if (sessionStorage.getItem(__flag(key)) == 'due') {\n console.warn(__notes[key]);\n sessionStorage.setItem(__flag(key), 'shown');\n }\n } catch {}\n const __before = import.meta.hot.data.expressive;\n const __classes = (import.meta.hot.data.expressive = { ${list} });\n for (const key in __before)\n if (__classes[key] !== __before[key] && __classes[key]?.prototype instanceof __State) {\n const note = __notes[key];\n if (note)\n try {\n if (!sessionStorage.getItem(__flag(key))) sessionStorage.setItem(__flag(key), 'due');\n } catch {\n console.warn(note);\n }\n dispatchEvent(new CustomEvent('expressive:reload', { detail: { module: ${JSON.stringify(id)}, class: key, reason: note ? 'private members' : 'class changed shape' } }));\n location.reload();\n break;\n }\n`;\n const lines = ['', `import { State as __State } from '@expressive/mvc';`];\n\n if (classes.length)\n lines.push(\n `import { hot as __expressive } from '@expressive/mvc/runtime';`,\n '{',\n ` const __hot = __expressive.accept(${JSON.stringify(id)}, { ${list} });`,\n ...classes.map((name) => ` ${name} = __hot.${name};`),\n '}'\n );\n\n if (components.length)\n lines.push(\n `import { hot as __refresh } from '@expressive/dom/jsx-dev-runtime';`,\n `__refresh(${JSON.stringify(id)}, { ${components.join(', ')} });`\n );\n\n lines.push(`if (import.meta.hot) {\n${replace} const __exports = { ${record.join(', ')} };\n import.meta.hot.accept((next) => {\n if (!next) return;\n for (const key in __exports) {\n const after = next[key];\n if (after !== __exports[key] && !(after?.prototype instanceof __State) && !${JSON.stringify(refresh)}.includes(key))\n return import.meta.hot.invalidate(\\`\"\\${key}\" export cannot be hot-patched.\\`);\n }\n });\n}\n`);\n\n return lines.join('\\n');\n}\n\n/** Hot-patch classes and refresh function components in place during `vite` dev. */\nexport default function expressive(): Plugin {\n let root = '';\n let runtime: Promise<(string | null | undefined)[]> | undefined;\n\n return {\n name: '@expressive/dom:hot',\n apply: 'serve',\n enforce: 'post',\n configResolved(config) {\n root = config.root;\n },\n async transform(code, id, options) {\n const [file] = id.split('?');\n\n if (!SOURCE.test(file) || file.includes('/node_modules/')) return;\n\n runtime ||= Promise.all(\n ['@expressive/mvc/runtime', '@expressive/dom/jsx-dev-runtime'].map((entry) =>\n this.resolve(entry).then((found) => found && dirname(found.id))\n )\n );\n\n for (const own of await runtime) if (own && file.startsWith(own)) return;\n\n const output = inject(file.startsWith(root + '/') ? file.slice(root.length) : file, this.parse(code).body as Node[], options?.ssr);\n\n if (output) return { code: code + output, map: null };\n }\n };\n}\n"],"mappings":";;;AAKA,MAAM,SAAS;AAEf,MAAM,YAAY;AAClB,MAAM,WAAW,CAAC,2BAA2B,qBAAqB;;;;;AAMlE,SAAS,KAAK,MAAc;CAC1B,MAAM,UAAoB,EAAE;CAC5B,MAAM,SAAmB,EAAE;CAC3B,MAAM,aAAuB,EAAE;CAC/B,MAAM,UAAkC,EAAE;CAE1C,SAAS,IAAI,MAAc,MAAY;AACrC,UAAQ,KAAK,KAAK;AAElB,MAAI,KAAK,KAAK,KAAK,MAAM,WAAiB,OAAO,KAAK,QAAQ,oBAAoB,CAAE,QAAO,KAAK,KAAK;;CAGvG,SAAS,QAAQ,MAAY;AAC3B,MAAI,KAAK,QAAQ,sBAAsB,KAAK,GAAI,KAAI,KAAK,GAAG,MAAM,KAAK;WAC9D,KAAK,QAAQ,yBAAyB,UAAU,KAAK,KAAK,IAAI,KAAK,CAAE,YAAW,KAAK,KAAK,GAAG,KAAK;WAClG,KAAK,QAAQ,sBACpB,MAAK,MAAM,EAAE,IAAI,UAAU,KAAK,cAAc;AAC5C,OAAI,GAAG,QAAQ,aAAc;AAC7B,OAAI,MAAM,QAAQ,qBAAqB,KAAK,QAAQ,QAAS,KAAI,GAAG,MAAM,KAAK;YACtE,SAAS,SAAS,MAAM,KAAK,IAAI,UAAU,KAAK,GAAG,KAAK,CAAE,YAAW,KAAK,GAAG,KAAK;;;CAIjG,SAAS,MAAM,MAAsB;AACnC,MAAI,KAAK,QAAQ,sBACf,QAAO,KAAK,aAAa,SAAS,EAAE,SAAgB,GAAG,QAAQ,eAAe,CAAC,GAAG,KAAK,GAAG,EAAE,CAAE;AAEhG,SAAO,CAAC,KAAK,GAAG,KAAK;;AAGvB,M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|
|
2
2
|
"name": "@expressive/dom",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "MVC-native DOM renderer.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -36,6 +36,10 @@
|
|
|
36
36
|
"./jsx-dev-runtime": {
|
|
37
37
|
"types": "./dist/jsx-dev-runtime.d.ts",
|
|
38
38
|
"default": "./dist/jsx-dev-runtime.js"
|
|
39
|
+
},
|
|
40
|
+
"./vite": {
|
|
41
|
+
"types": "./dist/vite.d.ts",
|
|
42
|
+
"default": "./dist/vite.js"
|
|
39
43
|
}
|
|
40
44
|
},
|
|
41
45
|
"engines": {
|
|
@@ -49,11 +53,18 @@
|
|
|
49
53
|
"test": "tsc --noEmit && vitest run --coverage"
|
|
50
54
|
},
|
|
51
55
|
"peerDependencies": {
|
|
52
|
-
"@expressive/mvc": "^0.
|
|
56
|
+
"@expressive/mvc": "^0.87.0",
|
|
57
|
+
"vite": ">=5"
|
|
58
|
+
},
|
|
59
|
+
"peerDependenciesMeta": {
|
|
60
|
+
"vite": {
|
|
61
|
+
"optional": true
|
|
62
|
+
}
|
|
53
63
|
},
|
|
54
64
|
"devDependencies": {
|
|
55
65
|
"@expressive/mvc": "workspace:^",
|
|
56
66
|
"@types/node": "^25.2.0",
|
|
57
|
-
"tsdown": "^0.20.1"
|
|
67
|
+
"tsdown": "^0.20.1",
|
|
68
|
+
"vite": "^7.3.1"
|
|
58
69
|
}
|
|
59
70
|
}
|