@jalvin/vite-plugin 2.0.42 → 2.0.43
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/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +147 -87
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export interface JalvinAppEntry {
|
|
2
2
|
/** Path to the root .jalvin file, relative to the Vite project root. */
|
|
3
3
|
file: string;
|
|
4
|
-
/** Name of the component to mount as the
|
|
4
|
+
/** Name of the component to mount as the React root. */
|
|
5
5
|
component: string;
|
|
6
6
|
/** Optional page title for the generated HTML. */
|
|
7
7
|
title?: string;
|
|
@@ -23,8 +23,8 @@ export interface JalvinViteOptions {
|
|
|
23
23
|
*/
|
|
24
24
|
runtimeImport?: string;
|
|
25
25
|
/**
|
|
26
|
-
* When set, the plugin generates a virtual index.html and entry point
|
|
27
|
-
* so no hand-written index.html or main.
|
|
26
|
+
* When set, the plugin generates a virtual index.html and React entry point
|
|
27
|
+
* so no hand-written index.html or main.tsx is needed in the project.
|
|
28
28
|
*/
|
|
29
29
|
entry?: JalvinAppEntry;
|
|
30
30
|
}
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAgCA,MAAM,WAAW,cAAc;IAC7B,wEAAwE;IACxE,IAAI,EAAE,MAAM,CAAC;IACb,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAgCA,MAAM,WAAW,cAAc;IAC7B,wEAAwE;IACxE,IAAI,EAAE,MAAM,CAAC;IACb,wDAAwD;IACxD,SAAS,EAAE,MAAM,CAAC;IAClB,kDAAkD;IAClD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,KAAK,CAAC,EAAE,cAAc,CAAC;CACxB;AAkGD,wBAAgB,MAAM,CAAC,IAAI,GAAE,iBAAsB,GAAG,GAAG,CAkJxD;AAED,eAAe,MAAM,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
2
3
|
// @jalvin/vite-plugin — Vite plugin for the Jalvin language
|
|
3
4
|
//
|
|
@@ -22,90 +23,141 @@
|
|
|
22
23
|
// })],
|
|
23
24
|
// });
|
|
24
25
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
27
|
+
if (k2 === undefined) k2 = k;
|
|
28
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
29
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
30
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
31
|
+
}
|
|
32
|
+
Object.defineProperty(o, k2, desc);
|
|
33
|
+
}) : (function(o, m, k, k2) {
|
|
34
|
+
if (k2 === undefined) k2 = k;
|
|
35
|
+
o[k2] = m[k];
|
|
36
|
+
}));
|
|
37
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
38
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
39
|
+
}) : function(o, v) {
|
|
40
|
+
o["default"] = v;
|
|
41
|
+
});
|
|
42
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
43
|
+
var ownKeys = function(o) {
|
|
44
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
45
|
+
var ar = [];
|
|
46
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
47
|
+
return ar;
|
|
48
|
+
};
|
|
49
|
+
return ownKeys(o);
|
|
50
|
+
};
|
|
51
|
+
return function (mod) {
|
|
52
|
+
if (mod && mod.__esModule) return mod;
|
|
53
|
+
var result = {};
|
|
54
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
55
|
+
__setModuleDefault(result, mod);
|
|
56
|
+
return result;
|
|
57
|
+
};
|
|
58
|
+
})();
|
|
59
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
60
|
+
exports.jalvin = jalvin;
|
|
61
|
+
const path = __importStar(require("node:path"));
|
|
62
|
+
const fs = __importStar(require("node:fs"));
|
|
63
|
+
const compiler_1 = require("@jalvin/compiler");
|
|
28
64
|
const VIRTUAL_ENTRY = "virtual:@jalvin/app-entry";
|
|
29
65
|
const VIRTUAL_ENTRY_RESOLVED = "\0virtual:@jalvin/app-entry";
|
|
30
66
|
function generateIndexHtml(title, scriptSrc) {
|
|
31
|
-
return `<!DOCTYPE html>
|
|
32
|
-
<html lang="en">
|
|
33
|
-
<head>
|
|
34
|
-
<meta charset="UTF-8" />
|
|
35
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
36
|
-
<title>${title}</title>
|
|
37
|
-
<style>
|
|
38
|
-
*, *::before, *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
|
|
39
|
-
html, body { height: 100%; margin: 0; overflow-x: hidden; }
|
|
40
|
-
body {
|
|
41
|
-
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
42
|
-
background: #fafafa;
|
|
43
|
-
color: #1c1c1c;
|
|
44
|
-
-webkit-text-size-adjust: 100%;
|
|
45
|
-
text-size-adjust: 100%;
|
|
46
|
-
}
|
|
47
|
-
#root { height: 100%; }
|
|
48
|
-
button { touch-action: manipulation; }
|
|
49
|
-
input, textarea, select { font-size: 1rem; }
|
|
50
|
-
</style>
|
|
51
|
-
</head>
|
|
52
|
-
<body>
|
|
53
|
-
<div id="root"></div>
|
|
54
|
-
<script type="module" src="${scriptSrc}"></script>
|
|
55
|
-
</body>
|
|
67
|
+
return `<!DOCTYPE html>
|
|
68
|
+
<html lang="en">
|
|
69
|
+
<head>
|
|
70
|
+
<meta charset="UTF-8" />
|
|
71
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
72
|
+
<title>${title}</title>
|
|
73
|
+
<style>
|
|
74
|
+
*, *::before, *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
|
|
75
|
+
html, body { height: 100%; margin: 0; overflow-x: hidden; }
|
|
76
|
+
body {
|
|
77
|
+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
78
|
+
background: #fafafa;
|
|
79
|
+
color: #1c1c1c;
|
|
80
|
+
-webkit-text-size-adjust: 100%;
|
|
81
|
+
text-size-adjust: 100%;
|
|
82
|
+
}
|
|
83
|
+
#root { height: 100%; }
|
|
84
|
+
button { touch-action: manipulation; }
|
|
85
|
+
input, textarea, select { font-size: 1rem; }
|
|
86
|
+
</style>
|
|
87
|
+
</head>
|
|
88
|
+
<body>
|
|
89
|
+
<div id="root"></div>
|
|
90
|
+
<script type="module" src="${scriptSrc}"></script>
|
|
91
|
+
</body>
|
|
56
92
|
</html>`;
|
|
57
93
|
}
|
|
58
|
-
function generateEntryModule(entryFilePath, component
|
|
94
|
+
function generateEntryModule(entryFilePath, component) {
|
|
95
|
+
// Use React.createElement to avoid needing JSX in the virtual module itself.
|
|
59
96
|
return [
|
|
60
|
-
`import
|
|
97
|
+
`import React from "react";`,
|
|
98
|
+
`import ReactDOM from "react-dom/client";`,
|
|
99
|
+
`import { WindowSizeClassProvider } from "@jalvin/runtime";`,
|
|
100
|
+
``,
|
|
61
101
|
`const rootEl = document.getElementById("root");`,
|
|
62
102
|
`if (!rootEl) throw new Error("Missing #root element");`,
|
|
103
|
+
`const root = ReactDOM.createRoot(rootEl);`,
|
|
63
104
|
``,
|
|
64
105
|
`function showError(err) {`,
|
|
65
|
-
`
|
|
66
|
-
`
|
|
67
|
-
`
|
|
68
|
-
`
|
|
69
|
-
`
|
|
70
|
-
`
|
|
71
|
-
`
|
|
72
|
-
`
|
|
73
|
-
|
|
74
|
-
`
|
|
75
|
-
`
|
|
76
|
-
`
|
|
77
|
-
`
|
|
78
|
-
`
|
|
79
|
-
`
|
|
80
|
-
|
|
81
|
-
`
|
|
82
|
-
`
|
|
83
|
-
`
|
|
84
|
-
`
|
|
85
|
-
`
|
|
86
|
-
`
|
|
87
|
-
`
|
|
88
|
-
`
|
|
89
|
-
`
|
|
90
|
-
`
|
|
91
|
-
|
|
92
|
-
`
|
|
106
|
+
` root.render(`,
|
|
107
|
+
` React.createElement(`,
|
|
108
|
+
` "div",`,
|
|
109
|
+
` {`,
|
|
110
|
+
` style: {`,
|
|
111
|
+
` fontFamily: "monospace",`,
|
|
112
|
+
` padding: "32px",`,
|
|
113
|
+
` background: "#1a1a1a",`,
|
|
114
|
+
` color: "#ff6b6b",`,
|
|
115
|
+
` minHeight: "100vh",`,
|
|
116
|
+
` boxSizing: "border-box",`,
|
|
117
|
+
` },`,
|
|
118
|
+
` },`,
|
|
119
|
+
` React.createElement(`,
|
|
120
|
+
` "h2",`,
|
|
121
|
+
` { style: { margin: "0 0 16px", fontSize: "18px", color: "#ff4444" } },`,
|
|
122
|
+
` "\u26a0\ufe0f Jalvin App Error"`,
|
|
123
|
+
` ),`,
|
|
124
|
+
` React.createElement(`,
|
|
125
|
+
` "pre",`,
|
|
126
|
+
` {`,
|
|
127
|
+
` style: {`,
|
|
128
|
+
` whiteSpace: "pre-wrap",`,
|
|
129
|
+
` wordBreak: "break-word",`,
|
|
130
|
+
` background: "#111",`,
|
|
131
|
+
` padding: "16px",`,
|
|
132
|
+
` borderRadius: "6px",`,
|
|
133
|
+
` color: "#ff9898",`,
|
|
134
|
+
` fontSize: "13px",`,
|
|
135
|
+
` },`,
|
|
136
|
+
` },`,
|
|
137
|
+
` String(err?.stack ?? err)`,
|
|
138
|
+
` )`,
|
|
139
|
+
` )`,
|
|
140
|
+
` );`,
|
|
93
141
|
`}`,
|
|
94
142
|
``,
|
|
95
143
|
`window.addEventListener('unhandledrejection', e => showError(e.reason));`,
|
|
96
144
|
`window.addEventListener('error', e => showError(e.error ?? e.message));`,
|
|
97
145
|
``,
|
|
98
146
|
`try {`,
|
|
99
|
-
` const
|
|
100
|
-
`
|
|
101
|
-
`
|
|
102
|
-
`
|
|
147
|
+
` const { ${component} } = await import(${JSON.stringify(entryFilePath)});`,
|
|
148
|
+
` root.render(`,
|
|
149
|
+
` React.createElement(React.StrictMode, null,`,
|
|
150
|
+
` React.createElement(WindowSizeClassProvider, null,`,
|
|
151
|
+
` React.createElement(${component})`,
|
|
152
|
+
` )`,
|
|
153
|
+
` )`,
|
|
154
|
+
` );`,
|
|
103
155
|
`} catch (err) {`,
|
|
104
156
|
` showError(err);`,
|
|
105
157
|
`}`,
|
|
106
158
|
].join("\n");
|
|
107
159
|
}
|
|
108
|
-
|
|
160
|
+
function jalvin(opts = {}) {
|
|
109
161
|
const extensions = opts.extensions ?? [".jalvin"];
|
|
110
162
|
let viteConfig;
|
|
111
163
|
const isJalvinFile = (id) => extensions.some((ext) => id.endsWith(ext));
|
|
@@ -116,22 +168,21 @@ export function jalvin(opts = {}) {
|
|
|
116
168
|
viteConfig = config;
|
|
117
169
|
},
|
|
118
170
|
config(cfg, { command }) {
|
|
171
|
+
// Ensure @jalvin/runtime (CJS) is pre-bundled by Vite's esbuild so the
|
|
172
|
+
// browser receives a proper ES module instead of bare CommonJS.
|
|
119
173
|
cfg.optimizeDeps = cfg.optimizeDeps ?? {};
|
|
120
|
-
|
|
121
|
-
if (!
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
if (!cfg.resolve.dedupe.includes(pkg))
|
|
133
|
-
cfg.resolve.dedupe.push(pkg);
|
|
134
|
-
}
|
|
174
|
+
const include = cfg.optimizeDeps.include ?? [];
|
|
175
|
+
if (!include.includes("@jalvin/runtime"))
|
|
176
|
+
include.push("@jalvin/runtime");
|
|
177
|
+
cfg.optimizeDeps.include = include;
|
|
178
|
+
// Exclude @jalvin/ui from pre-bundling — it ships as native ESM so
|
|
179
|
+
// Vite can serve it directly from node_modules. Pre-bundling it creates
|
|
180
|
+
// a content-addressed cached bundle that goes stale when the package is
|
|
181
|
+
// updated but the lockfile hash hasn't changed.
|
|
182
|
+
const exclude = cfg.optimizeDeps.exclude ?? [];
|
|
183
|
+
if (!exclude.includes("@jalvin/ui"))
|
|
184
|
+
exclude.push("@jalvin/ui");
|
|
185
|
+
cfg.optimizeDeps.exclude = exclude;
|
|
135
186
|
if (!opts.entry)
|
|
136
187
|
return;
|
|
137
188
|
if (command === "build") {
|
|
@@ -153,13 +204,12 @@ export function jalvin(opts = {}) {
|
|
|
153
204
|
return null;
|
|
154
205
|
const root = viteConfig?.root ?? process.cwd();
|
|
155
206
|
const entryFilePath = path.resolve(root, opts.entry.file);
|
|
156
|
-
|
|
157
|
-
return generateEntryModule(entryFilePath, opts.entry.component, runtimeImport);
|
|
207
|
+
return generateEntryModule(entryFilePath, opts.entry.component);
|
|
158
208
|
},
|
|
159
209
|
async transform(code, id) {
|
|
160
210
|
if (!isJalvinFile(id))
|
|
161
211
|
return null;
|
|
162
|
-
const result = compile(code, id, {
|
|
212
|
+
const result = (0, compiler_1.compile)(code, id, {
|
|
163
213
|
emitTypes: opts.emitTypes ?? false,
|
|
164
214
|
runtimeImport: opts.runtimeImport ?? "@jalvin/runtime",
|
|
165
215
|
sourceRoot: viteConfig?.root ?? process.cwd(),
|
|
@@ -175,6 +225,7 @@ export function jalvin(opts = {}) {
|
|
|
175
225
|
this.error(`Jalvin compilation failed:\n${errors}`);
|
|
176
226
|
return null;
|
|
177
227
|
}
|
|
228
|
+
// Surface warnings through Vite
|
|
178
229
|
for (const diag of result.diagnostics.items) {
|
|
179
230
|
if (diag.severity === "warning") {
|
|
180
231
|
this.warn({
|
|
@@ -183,20 +234,26 @@ export function jalvin(opts = {}) {
|
|
|
183
234
|
});
|
|
184
235
|
}
|
|
185
236
|
}
|
|
237
|
+
// The compiled output is TSX with JSX syntax. We need to transform
|
|
238
|
+
// JSX → JS here because Vite's React plugin only handles .tsx/.jsx files.
|
|
239
|
+
// Use a dynamic import to work around vite's deprecated CJS type stub.
|
|
186
240
|
const { transformWithEsbuild } = await import("vite");
|
|
187
|
-
const
|
|
188
|
-
|
|
241
|
+
const tsxResult = await transformWithEsbuild(result.code, id + ".tsx", {
|
|
242
|
+
jsx: "automatic",
|
|
243
|
+
loader: "tsx",
|
|
189
244
|
target: "esnext",
|
|
190
|
-
jsx: "preserve",
|
|
191
245
|
});
|
|
192
246
|
return {
|
|
193
|
-
code:
|
|
194
|
-
map:
|
|
247
|
+
code: tsxResult.code,
|
|
248
|
+
map: tsxResult.map,
|
|
195
249
|
};
|
|
196
250
|
},
|
|
197
251
|
configureServer(server) {
|
|
198
252
|
if (!opts.entry)
|
|
199
253
|
return;
|
|
254
|
+
// Return a post-hook (runs after Vite's own middlewares).
|
|
255
|
+
// When no static index.html exists, Vite passes requests for "/" through,
|
|
256
|
+
// so this middleware catches them and serves the generated HTML.
|
|
200
257
|
return () => {
|
|
201
258
|
server.middlewares.use(async (req, res, next) => {
|
|
202
259
|
const url = req.url ?? "/";
|
|
@@ -205,6 +262,7 @@ export function jalvin(opts = {}) {
|
|
|
205
262
|
return;
|
|
206
263
|
}
|
|
207
264
|
const root = viteConfig?.root ?? process.cwd();
|
|
265
|
+
// If a static index.html already exists, let Vite handle it normally.
|
|
208
266
|
if (fs.existsSync(path.join(root, "index.html"))) {
|
|
209
267
|
next();
|
|
210
268
|
return;
|
|
@@ -220,6 +278,7 @@ export function jalvin(opts = {}) {
|
|
|
220
278
|
generateBundle(_, bundle) {
|
|
221
279
|
if (!opts.entry)
|
|
222
280
|
return;
|
|
281
|
+
// Find the entry chunk to reference in the emitted HTML.
|
|
223
282
|
const entryChunk = Object.values(bundle).find((c) => c.type === "chunk" && c.isEntry);
|
|
224
283
|
const scriptSrc = entryChunk ? `./${entryChunk.fileName}` : `./${VIRTUAL_ENTRY}`;
|
|
225
284
|
const title = opts.entry.title ?? "Jalvin App";
|
|
@@ -229,10 +288,11 @@ export function jalvin(opts = {}) {
|
|
|
229
288
|
handleHotUpdate({ file, server }) {
|
|
230
289
|
if (!isJalvinFile(file))
|
|
231
290
|
return;
|
|
291
|
+
// Force full reload for now — incremental recompile is straightforward
|
|
232
292
|
server.ws.send({ type: "full-reload", path: file });
|
|
233
293
|
return [];
|
|
234
294
|
},
|
|
235
295
|
};
|
|
236
296
|
}
|
|
237
|
-
|
|
297
|
+
exports.default = jalvin;
|
|
238
298
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,4DAA4D;AAC5D,EAAE;AACF,0BAA0B;AAC1B,EAAE;AACF,8CAA8C;AAC9C,EAAE;AACF,kCAAkC;AAClC,2BAA2B;AAC3B,QAAQ;AACR,EAAE;AACF,0DAA0D;AAC1D,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,4EAA4E;AAC5E,6BAA6B;AAC7B,EAAE;AACF,kCAAkC;AAClC,yBAAyB;AACzB,wEAAwE;AACxE,WAAW;AACX,QAAQ;AACR,gFAAgF;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,gFAA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,OAAO,EAAE,CAAC;QACZ,CAAC;KACF,CAAC;AACJ,CAAC;AAED,kBAAe,MAAM,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jalvin/vite-plugin",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.43",
|
|
4
4
|
"description": "Vite plugin for the Jalvin language — import .jalvin files directly",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"vite": ">=5.0.0"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@jalvin/compiler": "2.0.
|
|
24
|
+
"@jalvin/compiler": "2.0.43"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"typescript": "^5.4.0",
|