@weave-framework/compiler 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/LICENSE +21 -0
- package/dist/ast.d.ts +243 -0
- package/dist/ast.d.ts.map +1 -0
- package/dist/ast.js +3 -0
- package/dist/ast.js.map +1 -0
- package/dist/codegen.d.ts +25 -0
- package/dist/codegen.d.ts.map +1 -0
- package/dist/codegen.js +543 -0
- package/dist/codegen.js.map +1 -0
- package/dist/component.d.ts +60 -0
- package/dist/component.d.ts.map +1 -0
- package/dist/component.js +116 -0
- package/dist/component.js.map +1 -0
- package/dist/css.d.ts +26 -0
- package/dist/css.d.ts.map +1 -0
- package/dist/css.js +344 -0
- package/dist/css.js.map +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -0
- package/dist/infer.d.ts +13 -0
- package/dist/infer.d.ts.map +1 -0
- package/dist/infer.js +113 -0
- package/dist/infer.js.map +1 -0
- package/dist/parser.d.ts +15 -0
- package/dist/parser.d.ts.map +1 -0
- package/dist/parser.js +721 -0
- package/dist/parser.js.map +1 -0
- package/dist/scope.d.ts +71 -0
- package/dist/scope.d.ts.map +1 -0
- package/dist/scope.js +233 -0
- package/dist/scope.js.map +1 -0
- package/dist/sources.d.ts +52 -0
- package/dist/sources.d.ts.map +1 -0
- package/dist/sources.js +163 -0
- package/dist/sources.js.map +1 -0
- package/package.json +31 -0
package/dist/codegen.js
ADDED
|
@@ -0,0 +1,543 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Weave codegen — turns a template AST into JS that creates DOM once and wires
|
|
3
|
+
* fine-grained signal bindings via the `@weave-framework/runtime/dom` helpers.
|
|
4
|
+
*
|
|
5
|
+
* Static structure becomes hoisted `<template>` strings with `<!---->` comment
|
|
6
|
+
* anchors at dynamic positions; dynamic nodes are reached by compile-time
|
|
7
|
+
* child-index paths. Control-flow blocks compile to `ifBlock`/`eachBlock` calls
|
|
8
|
+
* whose branch/row bodies are nested render functions (so they close over `ctx`
|
|
9
|
+
* and any template locals), keeping every block's effects in its own scope.
|
|
10
|
+
*/
|
|
11
|
+
import { parseTemplate } from './parser.js';
|
|
12
|
+
import { rewrite, ctxScope, childScope } from './scope.js';
|
|
13
|
+
class Gen {
|
|
14
|
+
mode;
|
|
15
|
+
scopeAttr;
|
|
16
|
+
hostAttr;
|
|
17
|
+
used = new Set(); // @weave-framework/runtime/dom helpers
|
|
18
|
+
usedCore = new Set(); // @weave-framework/runtime primitives (computed, …)
|
|
19
|
+
templates = [];
|
|
20
|
+
tplN = 0;
|
|
21
|
+
fnN = 0;
|
|
22
|
+
constructor(mode, scopeAttr, hostAttr) {
|
|
23
|
+
this.mode = mode;
|
|
24
|
+
this.scopeAttr = scopeAttr;
|
|
25
|
+
this.hostAttr = hostAttr;
|
|
26
|
+
}
|
|
27
|
+
H(name) {
|
|
28
|
+
this.used.add(name);
|
|
29
|
+
return this.mode === 'function' ? `rt.${name}` : name;
|
|
30
|
+
}
|
|
31
|
+
Hc(name) {
|
|
32
|
+
this.usedCore.add(name);
|
|
33
|
+
return this.mode === 'function' ? `rt.${name}` : name;
|
|
34
|
+
}
|
|
35
|
+
/** Reference a child component: from the `_c` map in function mode, bare (imported) in module mode. */
|
|
36
|
+
Comp(name) {
|
|
37
|
+
return this.mode === 'function' ? `_c.${name}` : name;
|
|
38
|
+
}
|
|
39
|
+
tpl(html) {
|
|
40
|
+
const v = `_t${this.tplN++}`;
|
|
41
|
+
this.templates.push(`const ${v} = ${this.H('template')}(${JSON.stringify(html)});`);
|
|
42
|
+
return v;
|
|
43
|
+
}
|
|
44
|
+
fn(prefix = '_b') {
|
|
45
|
+
return `${prefix}${this.fnN++}`;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
export function compileTemplate(input, options = {}) {
|
|
49
|
+
const mode = options.mode ?? 'module';
|
|
50
|
+
const runtimeImport = options.runtimeImport ?? '@weave-framework/runtime/dom';
|
|
51
|
+
const gen = new Gen(mode, options.scopeAttr, options.hostAttr);
|
|
52
|
+
const ast = parseTemplate(input);
|
|
53
|
+
// isHost: the render fragment's top-level elements are the component's roots → `:host`.
|
|
54
|
+
const render = compileFragment(gen, ast, ctxScope(options.scope ?? []), 'render', 'ctx, slots', true);
|
|
55
|
+
if (mode === 'function') {
|
|
56
|
+
const body = [...gen.templates, render, 'return render(ctx, {});'].join('\n');
|
|
57
|
+
return { code: body };
|
|
58
|
+
}
|
|
59
|
+
const domImport = `import { ${[...gen.used].sort().join(', ')} } from ${JSON.stringify(runtimeImport)};`;
|
|
60
|
+
const coreImport = gen.usedCore.size
|
|
61
|
+
? `import { ${[...gen.usedCore].sort().join(', ')} } from "@weave-framework/runtime";\n`
|
|
62
|
+
: '';
|
|
63
|
+
const code = [domImport + '\n' + coreImport, ...gen.templates, `export default ${render}`].join('\n');
|
|
64
|
+
return { code };
|
|
65
|
+
}
|
|
66
|
+
/** Compile a list of nodes into a `function name(param){…}` declaration. */
|
|
67
|
+
function compileFragment(gen, nodes, scope, name, param = '', isHost = false) {
|
|
68
|
+
const top = trimTop(nodes);
|
|
69
|
+
if (top.length === 0)
|
|
70
|
+
throw new Error('Empty template fragment');
|
|
71
|
+
// A component/slot compiles to a bare `<!---->`, so it can't be the clone root —
|
|
72
|
+
// only a real DOM element qualifies for the single-root (clone) fast path. A
|
|
73
|
+
// fragment root (component / multiple roots / text) returns a DocumentFragment;
|
|
74
|
+
// `eachBlock` brackets such a `@for` row with marker comments so the keyed
|
|
75
|
+
// reconciler can still move/remove it as one unit.
|
|
76
|
+
const sole = top.length === 1 && top[0].type === 'element' ? top[0] : null;
|
|
77
|
+
const singleRoot = !!sole && !/^[A-Z]/.test(sole.tag) && sole.tag !== 'slot';
|
|
78
|
+
let html = '';
|
|
79
|
+
const stmts = [];
|
|
80
|
+
const childDecls = [];
|
|
81
|
+
// Resolve each dynamic node into a local BEFORE any binding runs: a binding
|
|
82
|
+
// inserts nodes, which would shift the child indices later `child()` lookups
|
|
83
|
+
// rely on. Capturing the (stable) node references up front avoids that.
|
|
84
|
+
const nodeDecls = [];
|
|
85
|
+
const nodeVars = new Map();
|
|
86
|
+
let nodeVarN = 0;
|
|
87
|
+
const nodeExpr = (path) => {
|
|
88
|
+
if (path.length === 0)
|
|
89
|
+
return '_r';
|
|
90
|
+
const key = path.join(',');
|
|
91
|
+
let v = nodeVars.get(key);
|
|
92
|
+
if (!v) {
|
|
93
|
+
v = `_n${nodeVarN++}`;
|
|
94
|
+
nodeVars.set(key, v);
|
|
95
|
+
nodeDecls.push(`const ${v} = ${gen.H('child')}(_r, ${path.join(', ')});`);
|
|
96
|
+
}
|
|
97
|
+
return v;
|
|
98
|
+
};
|
|
99
|
+
function emitChildren(children, basePath, sc, isHost = false) {
|
|
100
|
+
let dom = 0;
|
|
101
|
+
// Hoist sibling snippet names so any sibling can `@render` them regardless of
|
|
102
|
+
// declaration order (and so a snippet can be passed as a prop / reference another).
|
|
103
|
+
let cur = sc;
|
|
104
|
+
const snippetNames = children.filter((n) => n.type === 'snippet').map((n) => n.name);
|
|
105
|
+
if (snippetNames.length) {
|
|
106
|
+
cur = new Map(cur);
|
|
107
|
+
for (const nm of snippetNames)
|
|
108
|
+
cur.set(nm, { kind: 'local' });
|
|
109
|
+
}
|
|
110
|
+
for (const node of children) {
|
|
111
|
+
if (node.type === 'let') {
|
|
112
|
+
html += '<!---->'; // placeholder slot keeps child indices stable
|
|
113
|
+
stmts.push(`const ${node.name} = ${gen.Hc('computed')}(() => ${rewrite(node.expr, cur).code});`);
|
|
114
|
+
cur = childScope(cur, { [node.name]: node.name });
|
|
115
|
+
dom++;
|
|
116
|
+
continue;
|
|
117
|
+
}
|
|
118
|
+
if (node.type === 'snippet') {
|
|
119
|
+
emitSnippet(node, cur); // a declaration — no DOM position, no index consumed
|
|
120
|
+
continue;
|
|
121
|
+
}
|
|
122
|
+
emitNode(node, [...basePath, dom], cur, isHost);
|
|
123
|
+
dom++;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
function emitSnippet(node, sc) {
|
|
127
|
+
// Compiles to a named function `name(p1, p2) { … return Node }` (hoisted in the
|
|
128
|
+
// render fn, closing over `ctx`); params are bare locals inside the body.
|
|
129
|
+
const bodyScope = new Map(sc);
|
|
130
|
+
for (const p of node.params)
|
|
131
|
+
bodyScope.set(p, { kind: 'local' });
|
|
132
|
+
childDecls.push(compileFragment(gen, node.children, bodyScope, node.name, node.params.join(', ')));
|
|
133
|
+
}
|
|
134
|
+
function emitRender(node, path, sc) {
|
|
135
|
+
html += '<!---->';
|
|
136
|
+
stmts.push(`${gen.H('mountChild')}(${nodeExpr(path)}, ${rewrite(node.expr, sc).code});`);
|
|
137
|
+
}
|
|
138
|
+
function emitKey(node, path, sc) {
|
|
139
|
+
html += '<!---->';
|
|
140
|
+
const contentFn = gen.fn();
|
|
141
|
+
childDecls.push(compileFragment(gen, node.children, sc, contentFn));
|
|
142
|
+
stmts.push(`${gen.H('keyBlock')}(${nodeExpr(path)}, () => ${rewrite(node.expr, sc).code}, ${contentFn});`);
|
|
143
|
+
}
|
|
144
|
+
function emitNode(node, path, sc, isHost = false) {
|
|
145
|
+
switch (node.type) {
|
|
146
|
+
case 'text':
|
|
147
|
+
html += escapeText(node.value);
|
|
148
|
+
return;
|
|
149
|
+
case 'interp': {
|
|
150
|
+
html += '<!---->';
|
|
151
|
+
const { code, reactive } = rewrite(node.expr, sc);
|
|
152
|
+
stmts.push(reactive
|
|
153
|
+
? `${gen.H('bindText')}(${nodeExpr(path)}, () => ${code});`
|
|
154
|
+
: `${gen.H('setText')}(${nodeExpr(path)}, ${code});`);
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
case 'element':
|
|
158
|
+
emitElement(node, path, sc, isHost);
|
|
159
|
+
return;
|
|
160
|
+
case 'if':
|
|
161
|
+
emitIf(node, path, sc);
|
|
162
|
+
return;
|
|
163
|
+
case 'for':
|
|
164
|
+
emitFor(node, path, sc);
|
|
165
|
+
return;
|
|
166
|
+
case 'switch':
|
|
167
|
+
emitSwitch(node, path, sc);
|
|
168
|
+
return;
|
|
169
|
+
case 'defer':
|
|
170
|
+
emitDefer(node, path, sc);
|
|
171
|
+
return;
|
|
172
|
+
case 'await':
|
|
173
|
+
emitAwait(node, path, sc);
|
|
174
|
+
return;
|
|
175
|
+
case 'render':
|
|
176
|
+
emitRender(node, path, sc);
|
|
177
|
+
return;
|
|
178
|
+
case 'key':
|
|
179
|
+
emitKey(node, path, sc);
|
|
180
|
+
return;
|
|
181
|
+
case 'snippet':
|
|
182
|
+
throw new Error('@snippet is a declaration, handled in emitChildren');
|
|
183
|
+
case 'let':
|
|
184
|
+
throw new Error('@let cannot be a single dynamic node here');
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
function emitElement(node, path, sc, isHost = false) {
|
|
188
|
+
if (node.tag === 'slot')
|
|
189
|
+
return emitSlot(node, path, sc);
|
|
190
|
+
if (node.tag === 'w:element')
|
|
191
|
+
return emitDynamicElement(node, path, sc);
|
|
192
|
+
if (/^[A-Z]/.test(node.tag))
|
|
193
|
+
return emitComponent(node, path, sc);
|
|
194
|
+
html += `<${node.tag}`;
|
|
195
|
+
if (gen.scopeAttr)
|
|
196
|
+
html += ` ${gen.scopeAttr}`; // scoped-CSS marker
|
|
197
|
+
if (isHost && gen.hostAttr)
|
|
198
|
+
html += ` ${gen.hostAttr}`; // `:host` root marker
|
|
199
|
+
for (const attr of node.attrs) {
|
|
200
|
+
if (attr.type === 'static') {
|
|
201
|
+
html += attr.value === '' ? ` ${attr.name}` : ` ${attr.name}="${escapeAttr(attr.value)}"`;
|
|
202
|
+
}
|
|
203
|
+
else {
|
|
204
|
+
emitBinding(attr, nodeExpr(path), sc);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
html += '>';
|
|
208
|
+
if (!node.selfClosing) {
|
|
209
|
+
emitChildren(node.children, path, sc);
|
|
210
|
+
html += `</${node.tag}>`;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* `<w:element this={tag} …>children</w:element>` — a dynamically-tagged element.
|
|
215
|
+
* Emits a `<!---->` anchor + `dynElement(anchor, () => tag, build)`; `build(_el)`
|
|
216
|
+
* wires the (non-`this`) attributes/bindings/children onto the freshly-created
|
|
217
|
+
* element (re-run whenever the tag changes).
|
|
218
|
+
*/
|
|
219
|
+
function emitDynamicElement(node, path, sc) {
|
|
220
|
+
html += '<!---->';
|
|
221
|
+
const anchor = nodeExpr(path);
|
|
222
|
+
let tagExpr = '""';
|
|
223
|
+
const build = [];
|
|
224
|
+
for (const attr of node.attrs) {
|
|
225
|
+
if ((attr.type === 'attr' || attr.type === 'static') && attr.name === 'this') {
|
|
226
|
+
tagExpr = attr.type === 'attr' ? rewrite(attr.expr, sc).code : q(attr.value);
|
|
227
|
+
continue;
|
|
228
|
+
}
|
|
229
|
+
if (attr.type === 'static') {
|
|
230
|
+
build.push(`${gen.H('setAttr')}(_el, ${q(attr.name)}, ${q(attr.value)});`);
|
|
231
|
+
}
|
|
232
|
+
else {
|
|
233
|
+
emitBinding(attr, '_el', sc, build);
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
if (trimTop(node.children).length > 0) {
|
|
237
|
+
const contentFn = gen.fn();
|
|
238
|
+
childDecls.push(compileFragment(gen, node.children, sc, contentFn));
|
|
239
|
+
build.push(`_el.append(${contentFn}());`);
|
|
240
|
+
}
|
|
241
|
+
stmts.push(`${gen.H('dynElement')}(${anchor}, () => ${tagExpr}, (_el) => { ${build.join(' ')} });`);
|
|
242
|
+
}
|
|
243
|
+
// `n` is the target node expression; `sink` collects the statements (defaults to
|
|
244
|
+
// the fragment body, but the dynamic element redirects them into its build fn).
|
|
245
|
+
function emitBinding(attr, n, sc, sink = stmts) {
|
|
246
|
+
switch (attr.type) {
|
|
247
|
+
case 'attr': {
|
|
248
|
+
const { code, reactive } = rewrite(attr.expr, sc);
|
|
249
|
+
sink.push(reactive
|
|
250
|
+
? `${gen.H('bindAttr')}(${n}, ${q(attr.name)}, () => ${code});`
|
|
251
|
+
: `${gen.H('setAttr')}(${n}, ${q(attr.name)}, ${code});`);
|
|
252
|
+
break;
|
|
253
|
+
}
|
|
254
|
+
case 'prop':
|
|
255
|
+
sink.push(`${gen.H('bindProp')}(${n}, ${q(attr.name)}, () => ${rewrite(attr.expr, sc).code});`);
|
|
256
|
+
break;
|
|
257
|
+
case 'class':
|
|
258
|
+
sink.push(`${gen.H('bindClass')}(${n}, ${q(attr.name)}, () => ${rewrite(attr.expr, sc).code});`);
|
|
259
|
+
break;
|
|
260
|
+
case 'show':
|
|
261
|
+
sink.push(`${gen.H('bindShow')}(${n}, () => ${rewrite(attr.expr, sc).code});`);
|
|
262
|
+
break;
|
|
263
|
+
case 'transition': {
|
|
264
|
+
// transition:fn / in:fn / out:fn → transition(el, fn, params, mode). The
|
|
265
|
+
// params are a snapshot (re-read at play time via the fn); the fn resolves to ctx.
|
|
266
|
+
const fn = rewrite(attr.name, sc).code;
|
|
267
|
+
const params = attr.expr !== undefined ? rewrite(attr.expr, sc).code : 'undefined';
|
|
268
|
+
sink.push(`${gen.H('transition')}(${n}, ${fn}, ${params}, ${q(attr.mode)});`);
|
|
269
|
+
break;
|
|
270
|
+
}
|
|
271
|
+
case 'event': {
|
|
272
|
+
const handler = wrapHandler(attr, sc);
|
|
273
|
+
const opts = eventOpts(attr.modifiers);
|
|
274
|
+
sink.push(`${gen.H('listen')}(${n}, ${q(attr.name)}, ${handler}${opts ? `, ${opts}` : ''});`);
|
|
275
|
+
break;
|
|
276
|
+
}
|
|
277
|
+
case 'ref':
|
|
278
|
+
sink.push(`${gen.H('setRef')}(${rewrite(attr.expr, sc).code}, ${n});`);
|
|
279
|
+
break;
|
|
280
|
+
case 'use': {
|
|
281
|
+
// `use:action={arg}` → applyAction(el, action, arg). The action is the
|
|
282
|
+
// `name` identifier (rewritten against ctx); the arg is evaluated eagerly
|
|
283
|
+
// (a snapshot — pass a getter `={() => sig()}` for reactivity).
|
|
284
|
+
const action = rewrite(attr.name, sc).code;
|
|
285
|
+
sink.push(attr.expr !== undefined
|
|
286
|
+
? `${gen.H('applyAction')}(${n}, ${action}, ${rewrite(attr.expr, sc).code});`
|
|
287
|
+
: `${gen.H('applyAction')}(${n}, ${action});`);
|
|
288
|
+
break;
|
|
289
|
+
}
|
|
290
|
+
case 'bind': {
|
|
291
|
+
// bind:value / bind:checked / bind:group → two-way `bindValue`. The
|
|
292
|
+
// expression must resolve to a writable signal (passed by reference, not
|
|
293
|
+
// called): `bind:value={count}` → `bindValue(el, ctx.count, 'value')`.
|
|
294
|
+
const kind = attr.name === 'checked' ? 'checked' : attr.name === 'group' ? 'group' : 'value';
|
|
295
|
+
sink.push(`${gen.H('bindValue')}(${n}, ${rewrite(attr.expr, sc).code}, ${q(kind)});`);
|
|
296
|
+
break;
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
function emitComponent(node, path, sc) {
|
|
301
|
+
html += '<!---->'; // anchor the component mounts before
|
|
302
|
+
const anchorVar = nodeExpr(path);
|
|
303
|
+
// Props: `x="s"` static, `x={expr}` lazy/reactive getter, `on:evt` → onEvt handler.
|
|
304
|
+
const props = [];
|
|
305
|
+
for (const attr of node.attrs) {
|
|
306
|
+
switch (attr.type) {
|
|
307
|
+
case 'static':
|
|
308
|
+
props.push(`${propKey(attr.name)}: ${q(attr.value)}`);
|
|
309
|
+
break;
|
|
310
|
+
case 'attr':
|
|
311
|
+
// getter ⇒ the child re-reads through it, so the prop stays reactive
|
|
312
|
+
props.push(`get ${propKey(attr.name)}() { return ${rewrite(attr.expr, sc).code}; }`);
|
|
313
|
+
break;
|
|
314
|
+
case 'event':
|
|
315
|
+
props.push(`${propKey(onProp(attr.name))}: ${rewrite(attr.expr, sc).code}`);
|
|
316
|
+
break;
|
|
317
|
+
default:
|
|
318
|
+
throw new Error(`'${attr.type}' binding on <${node.tag}> is not supported yet (M5: props + on:event only)`);
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
// Slots: group children by a static `slot="name"` (default otherwise); strip the attr.
|
|
322
|
+
const groups = new Map();
|
|
323
|
+
for (const child of node.children) {
|
|
324
|
+
let target = child;
|
|
325
|
+
let slotName = 'default';
|
|
326
|
+
if (child.type === 'element') {
|
|
327
|
+
const i = child.attrs.findIndex((a) => a.type === 'static' && a.name === 'slot');
|
|
328
|
+
if (i >= 0) {
|
|
329
|
+
slotName = child.attrs[i].value;
|
|
330
|
+
target = { ...child, attrs: child.attrs.filter((_, k) => k !== i) };
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
let arr = groups.get(slotName);
|
|
334
|
+
if (!arr) {
|
|
335
|
+
arr = [];
|
|
336
|
+
groups.set(slotName, arr);
|
|
337
|
+
}
|
|
338
|
+
arr.push(target);
|
|
339
|
+
}
|
|
340
|
+
const slots = [];
|
|
341
|
+
for (const [name, children] of groups) {
|
|
342
|
+
if (trimTop(children).length === 0)
|
|
343
|
+
continue; // whitespace-only group → no slot
|
|
344
|
+
const slotFn = gen.fn('_s');
|
|
345
|
+
childDecls.push(compileFragment(gen, children, sc, slotFn));
|
|
346
|
+
slots.push(`${propKey(name)}: ${slotFn}`);
|
|
347
|
+
}
|
|
348
|
+
const propsObj = props.length ? `{ ${props.join(', ')} }` : '{}';
|
|
349
|
+
const slotsObj = slots.length ? `{ ${slots.join(', ')} }` : '{}';
|
|
350
|
+
stmts.push(`${gen.H('mountChild')}(${anchorVar}, ${gen.Comp(node.tag)}(${propsObj}, ${slotsObj}));`);
|
|
351
|
+
}
|
|
352
|
+
function emitSlot(node, path, sc) {
|
|
353
|
+
html += '<!---->';
|
|
354
|
+
const anchorVar = nodeExpr(path);
|
|
355
|
+
const nameAttr = node.attrs.find((a) => a.type === 'static' && a.name === 'name');
|
|
356
|
+
const name = nameAttr ? nameAttr.value : 'default';
|
|
357
|
+
let fallback = 'null';
|
|
358
|
+
if (trimTop(node.children).length > 0) {
|
|
359
|
+
const fbFn = gen.fn('_f');
|
|
360
|
+
childDecls.push(compileFragment(gen, node.children, sc, fbFn));
|
|
361
|
+
fallback = `${fbFn}()`;
|
|
362
|
+
}
|
|
363
|
+
stmts.push(`{ const _sf = slots[${q(name)}]; ${gen.H('mountChild')}(${anchorVar}, _sf ? _sf() : ${fallback}); }`);
|
|
364
|
+
}
|
|
365
|
+
function emitIf(node, path, sc) {
|
|
366
|
+
html += '<!---->';
|
|
367
|
+
const head = node.branches[0];
|
|
368
|
+
let aliasVar;
|
|
369
|
+
if (head.alias) {
|
|
370
|
+
aliasVar = gen.fn('_a');
|
|
371
|
+
stmts.push(`const ${aliasVar} = ${gen.Hc('computed')}(() => ${rewrite(head.cond ?? 'undefined', sc).code});`);
|
|
372
|
+
}
|
|
373
|
+
const branchNames = node.branches.map(() => gen.fn());
|
|
374
|
+
node.branches.forEach((br, i) => {
|
|
375
|
+
const bScope = i === 0 && head.alias && aliasVar
|
|
376
|
+
? childScope(sc, { [head.alias]: aliasVar })
|
|
377
|
+
: sc;
|
|
378
|
+
childDecls.push(compileFragment(gen, br.children, bScope, branchNames[i]));
|
|
379
|
+
});
|
|
380
|
+
const lines = [];
|
|
381
|
+
node.branches.forEach((br, i) => {
|
|
382
|
+
if (i === 0 && aliasVar)
|
|
383
|
+
lines.push(`if (${aliasVar}()) return ${branchNames[i]};`);
|
|
384
|
+
else if (br.cond !== undefined)
|
|
385
|
+
lines.push(`if (${rewrite(br.cond, sc).code}) return ${branchNames[i]};`);
|
|
386
|
+
else
|
|
387
|
+
lines.push(`return ${branchNames[i]};`);
|
|
388
|
+
});
|
|
389
|
+
const hasElse = node.branches[node.branches.length - 1].cond === undefined;
|
|
390
|
+
if (!hasElse)
|
|
391
|
+
lines.push('return null;');
|
|
392
|
+
stmts.push(`${gen.H('ifBlock')}(${nodeExpr(path)}, () => { ${lines.join(' ')} });`);
|
|
393
|
+
}
|
|
394
|
+
function emitSwitch(node, path, sc) {
|
|
395
|
+
html += '<!---->';
|
|
396
|
+
const names = node.cases.map(() => gen.fn());
|
|
397
|
+
node.cases.forEach((c, i) => childDecls.push(compileFragment(gen, c.children, sc, names[i])));
|
|
398
|
+
const lines = [`const _v = ${rewrite(node.expr, sc).code};`];
|
|
399
|
+
node.cases.forEach((c, i) => {
|
|
400
|
+
if (c.test !== undefined)
|
|
401
|
+
lines.push(`if (_v === ${rewrite(c.test, sc).code}) return ${names[i]};`);
|
|
402
|
+
else
|
|
403
|
+
lines.push(`return ${names[i]};`);
|
|
404
|
+
});
|
|
405
|
+
if (!node.cases.some((c) => c.test === undefined))
|
|
406
|
+
lines.push('return null;');
|
|
407
|
+
stmts.push(`${gen.H('ifBlock')}(${nodeExpr(path)}, () => { ${lines.join(' ')} });`);
|
|
408
|
+
}
|
|
409
|
+
function emitDefer(node, path, sc) {
|
|
410
|
+
html += '<!---->';
|
|
411
|
+
const contentFn = gen.fn();
|
|
412
|
+
childDecls.push(compileFragment(gen, node.children, sc, contentFn));
|
|
413
|
+
let phArg = 'undefined';
|
|
414
|
+
if (node.placeholder && trimTop(node.placeholder).length > 0) {
|
|
415
|
+
const phFn = gen.fn();
|
|
416
|
+
childDecls.push(compileFragment(gen, node.placeholder, sc, phFn));
|
|
417
|
+
phArg = phFn;
|
|
418
|
+
}
|
|
419
|
+
const trig = deferTriggerExpr(node.trigger, sc);
|
|
420
|
+
stmts.push(`${gen.H('deferBlock')}(${nodeExpr(path)}, ${trig}, ${contentFn}, ${phArg});`);
|
|
421
|
+
}
|
|
422
|
+
function emitAwait(node, path, sc) {
|
|
423
|
+
html += '<!---->';
|
|
424
|
+
const anchorVar = nodeExpr(path);
|
|
425
|
+
const source = `() => (${rewrite(node.expr, sc).code})`;
|
|
426
|
+
// each part → a fragment fn; @then/@catch take their alias as a parameter so
|
|
427
|
+
// the resolved value / error resolves to the bare name inside the branch.
|
|
428
|
+
const branchFn = (children, alias) => {
|
|
429
|
+
if (!children || trimTop(children).length === 0)
|
|
430
|
+
return 'undefined';
|
|
431
|
+
const fn = gen.fn();
|
|
432
|
+
// the alias is a real function PARAMETER holding the resolved value/error —
|
|
433
|
+
// a plain local (bare name), not an auto-called accessor like @for/@if.
|
|
434
|
+
const scope = alias ? new Map(sc).set(alias, { kind: 'local' }) : sc;
|
|
435
|
+
childDecls.push(compileFragment(gen, children, scope, fn, alias ?? ''));
|
|
436
|
+
return fn;
|
|
437
|
+
};
|
|
438
|
+
const pendingArg = branchFn(node.pending);
|
|
439
|
+
const thenArg = branchFn(node.then?.children, node.then?.alias);
|
|
440
|
+
const catchArg = branchFn(node.catch?.children, node.catch?.alias);
|
|
441
|
+
stmts.push(`${gen.H('awaitBlock')}(${anchorVar}, ${source}, ${pendingArg}, ${thenArg}, ${catchArg});`);
|
|
442
|
+
}
|
|
443
|
+
function deferTriggerExpr(t, sc) {
|
|
444
|
+
switch (t.kind) {
|
|
445
|
+
case 'when':
|
|
446
|
+
return `{ on: "when", when: () => ${rewrite(t.expr, sc).code} }`;
|
|
447
|
+
case 'timer':
|
|
448
|
+
return `{ on: "timer", ms: ${rewrite(t.ms, sc).code} }`;
|
|
449
|
+
case 'idle':
|
|
450
|
+
case 'viewport':
|
|
451
|
+
case 'interaction':
|
|
452
|
+
case 'hover':
|
|
453
|
+
case 'immediate':
|
|
454
|
+
return `{ on: ${q(t.kind)} }`;
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
function emitFor(node, path, sc) {
|
|
458
|
+
html += '<!---->';
|
|
459
|
+
const rowFn = gen.fn();
|
|
460
|
+
const forScope = childScope(sc, {
|
|
461
|
+
[node.item]: '_row.item',
|
|
462
|
+
$index: '_row.index',
|
|
463
|
+
$count: '_row.count',
|
|
464
|
+
$first: '_row.first',
|
|
465
|
+
$last: '_row.last',
|
|
466
|
+
$even: '_row.even',
|
|
467
|
+
$odd: '_row.odd',
|
|
468
|
+
});
|
|
469
|
+
childDecls.push(compileFragment(gen, node.children, forScope, rowFn, '_row'));
|
|
470
|
+
let emptyArg = '';
|
|
471
|
+
if (node.empty) {
|
|
472
|
+
const emptyFn = gen.fn();
|
|
473
|
+
childDecls.push(compileFragment(gen, node.empty, sc, emptyFn));
|
|
474
|
+
emptyArg = `, ${emptyFn}`;
|
|
475
|
+
}
|
|
476
|
+
const list = rewrite(node.list, sc).code;
|
|
477
|
+
const track = node.track ? rewrite(node.track, sc).code : '$index';
|
|
478
|
+
const keyFn = `(${node.item}, $index) => ${track}`;
|
|
479
|
+
stmts.push(`${gen.H('eachBlock')}(${nodeExpr(path)}, () => ${list}, ${keyFn}, ${rowFn}${emptyArg});`);
|
|
480
|
+
}
|
|
481
|
+
// walk
|
|
482
|
+
if (singleRoot)
|
|
483
|
+
emitElement(sole, [], scope, isHost);
|
|
484
|
+
else
|
|
485
|
+
emitChildren(top, [], scope, isHost);
|
|
486
|
+
const ctor = singleRoot ? gen.H('clone') : gen.H('cloneFragment');
|
|
487
|
+
const tplVar = gen.tpl(html);
|
|
488
|
+
const body = [
|
|
489
|
+
`const _r = ${ctor}(${tplVar});`,
|
|
490
|
+
...nodeDecls,
|
|
491
|
+
...stmts,
|
|
492
|
+
'return _r;',
|
|
493
|
+
...childDecls,
|
|
494
|
+
];
|
|
495
|
+
return `function ${name}(${param}) {\n${body.map((l) => ' ' + l).join('\n')}\n}`;
|
|
496
|
+
}
|
|
497
|
+
/* ──────────── helpers ──────────── */
|
|
498
|
+
function wrapHandler(attr, scope) {
|
|
499
|
+
const expr = rewrite(attr.expr, scope).code;
|
|
500
|
+
const guards = [];
|
|
501
|
+
for (const m of attr.modifiers) {
|
|
502
|
+
if (m === 'preventDefault')
|
|
503
|
+
guards.push('$e.preventDefault();');
|
|
504
|
+
else if (m === 'stopPropagation')
|
|
505
|
+
guards.push('$e.stopPropagation();');
|
|
506
|
+
else if (m === 'self')
|
|
507
|
+
guards.push('if ($e.target !== $e.currentTarget) return;');
|
|
508
|
+
}
|
|
509
|
+
if (guards.length === 0)
|
|
510
|
+
return expr;
|
|
511
|
+
return `($e) => { ${guards.join(' ')} (${expr})($e); }`;
|
|
512
|
+
}
|
|
513
|
+
function eventOpts(modifiers) {
|
|
514
|
+
const opts = [];
|
|
515
|
+
if (modifiers.includes('once'))
|
|
516
|
+
opts.push('once: true');
|
|
517
|
+
if (modifiers.includes('capture'))
|
|
518
|
+
opts.push('capture: true');
|
|
519
|
+
if (modifiers.includes('passive'))
|
|
520
|
+
opts.push('passive: true');
|
|
521
|
+
return opts.length ? `{ ${opts.join(', ')} }` : '';
|
|
522
|
+
}
|
|
523
|
+
function trimTop(nodes) {
|
|
524
|
+
return nodes.filter((n) => !(n.type === 'text' && n.value.trim() === ''));
|
|
525
|
+
}
|
|
526
|
+
function q(s) {
|
|
527
|
+
return JSON.stringify(s);
|
|
528
|
+
}
|
|
529
|
+
/** Object-literal key: bare when a valid identifier, quoted otherwise. */
|
|
530
|
+
function propKey(name) {
|
|
531
|
+
return /^[A-Za-z_$][\w$]*$/.test(name) ? name : JSON.stringify(name);
|
|
532
|
+
}
|
|
533
|
+
/** `on:select` → `onSelect` (the prop the child receives). */
|
|
534
|
+
function onProp(event) {
|
|
535
|
+
return 'on' + event.charAt(0).toUpperCase() + event.slice(1);
|
|
536
|
+
}
|
|
537
|
+
function escapeText(s) {
|
|
538
|
+
return s.replace(/&/g, '&').replace(/</g, '<');
|
|
539
|
+
}
|
|
540
|
+
function escapeAttr(s) {
|
|
541
|
+
return s.replace(/&/g, '&').replace(/"/g, '"');
|
|
542
|
+
}
|
|
543
|
+
//# sourceMappingURL=codegen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codegen.js","sourceRoot":"","sources":["../src/codegen.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAK5C,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAA4B,MAAM,YAAY,CAAC;AAcrF,MAAM,GAAG;IAQE;IACA;IACA;IATT,IAAI,GAAgB,IAAI,GAAG,EAAU,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C,WAAW,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAC/D,CAAC;AAED,SAAS,UAAU,CAAC,CAAS;IAC3B,OAAO,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;AACxD,CAAC;AAED,SAAS,UAAU,CAAC,CAAS;IAC3B,OAAO,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AAC1D,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Component loader — composes the three pieces of a component (script / template
|
|
3
|
+
* / styles) into one ES module. The same hash drives both the template's scope
|
|
4
|
+
* attribute and the scoped CSS, so a single `compileComponent` call keeps them
|
|
5
|
+
* in lockstep (no cross-file coordination).
|
|
6
|
+
*
|
|
7
|
+
* Authoring contract: the script EXPORTS `setup` (a named export); the loader
|
|
8
|
+
* appends the compiled `render` and synthesizes the default export
|
|
9
|
+
* `defineComponent(render, setup)` — append-only, never edits user code.
|
|
10
|
+
*
|
|
11
|
+
* Both authoring forms reduce here: a `.weave` SFC is split by {@link parseSfc}
|
|
12
|
+
* into the same `{ script, template, styles }` triple the separate-file path
|
|
13
|
+
* passes directly.
|
|
14
|
+
*/
|
|
15
|
+
export interface ComponentSource {
|
|
16
|
+
/** Setup module — user imports + `export function setup(props) { … return bindings }`. */
|
|
17
|
+
script?: string;
|
|
18
|
+
/** Template markup. */
|
|
19
|
+
template: string;
|
|
20
|
+
/** Component CSS (scoped to this component). */
|
|
21
|
+
styles?: string;
|
|
22
|
+
}
|
|
23
|
+
export interface ComponentOptions {
|
|
24
|
+
/** Shared scope hash; defaults to a hash of `filename` (else the template). */
|
|
25
|
+
hash?: string;
|
|
26
|
+
/** Resolved component path — used for the default hash and debugging. */
|
|
27
|
+
filename?: string;
|
|
28
|
+
}
|
|
29
|
+
export interface CompiledComponent {
|
|
30
|
+
/** The component ES module. */
|
|
31
|
+
code: string;
|
|
32
|
+
/** Scoped CSS — the esbuild plugin collects these into one stylesheet. */
|
|
33
|
+
css: string;
|
|
34
|
+
/** The scope hash both halves share. */
|
|
35
|
+
hash: string;
|
|
36
|
+
}
|
|
37
|
+
/** Compile a `{ script, template, styles }` triple into a component module + scoped CSS. */
|
|
38
|
+
export declare function compileComponent(src: ComponentSource, opts?: ComponentOptions): CompiledComponent;
|
|
39
|
+
/**
|
|
40
|
+
* Location-faithful SFC split for `@weave-framework/check`. Unlike {@link parseSfc}, the
|
|
41
|
+
* returned `template` keeps the SFC's exact character offsets: the `<script>`
|
|
42
|
+
* and `<style>` blocks are *blanked* (every non-newline char → a space, newlines
|
|
43
|
+
* kept) rather than removed, so an offset reported by {@link parseTemplate} maps
|
|
44
|
+
* straight back to a `.weave` line:col. `scriptLine` is the 0-based SFC line where
|
|
45
|
+
* the (trimmed) script body begins, used to map type errors in user code.
|
|
46
|
+
*/
|
|
47
|
+
export interface ComponentSourceLoc {
|
|
48
|
+
script?: string;
|
|
49
|
+
scriptLine: number;
|
|
50
|
+
/** char offset in `source` where the (trimmed) script body begins (0 if no script). */
|
|
51
|
+
scriptOffset: number;
|
|
52
|
+
template: string;
|
|
53
|
+
/** char offset in `source` where the (trimmed) style body begins (0 if no style). */
|
|
54
|
+
styleOffset: number;
|
|
55
|
+
styles?: string;
|
|
56
|
+
}
|
|
57
|
+
export declare function parseSfcLoc(source: string): ComponentSourceLoc;
|
|
58
|
+
/** Split a `.weave` SFC into its `{ script, template, styles }` triple. */
|
|
59
|
+
export declare function parseSfc(source: string): ComponentSource;
|
|
60
|
+
//# sourceMappingURL=component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../src/component.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAOH,MAAM,WAAW,eAAe;IAC9B,0FAA0F;IAC1F,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,uBAAuB;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,gDAAgD;IAChD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,gBAAgB;IAC/B,+EAA+E;IAC/E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,yEAAyE;IACzE,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,iBAAiB;IAChC,+BAA+B;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,0EAA0E;IAC1E,GAAG,EAAE,MAAM,CAAC;IACZ,wCAAwC;IACxC,IAAI,EAAE,MAAM,CAAC;CACd;AAID,4FAA4F;AAC5F,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,eAAe,EAAE,IAAI,GAAE,gBAAqB,GAAG,iBAAiB,CAyBrG;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,kBAAkB;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,uFAAuF;IACvF,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,qFAAqF;IACrF,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,kBAAkB,CAe9D;AAuCD,2EAA2E;AAC3E,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,eAAe,CAYxD"}
|