@fluixi/compiler 1.0.0-alpha.84 → 1.0.0-alpha.85
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/analyze/expr-shape.d.cts +2 -2
- package/dist/analyze/expr-shape.d.ts +2 -2
- package/dist/analyze/expr-shape.js +1 -1
- package/dist/analyze/intrinsics.cjs +1 -1
- package/dist/analyze/intrinsics.d.cts +7 -7
- package/dist/analyze/intrinsics.d.ts +7 -7
- package/dist/analyze/intrinsics.d.ts.map +1 -1
- package/dist/analyze/intrinsics.js +3 -3
- package/dist/analyze/intrinsics.mjs +1 -1
- package/dist/analyze/props-destructure.d.cts +3 -3
- package/dist/analyze/props-destructure.d.ts +3 -3
- package/dist/analyze/props-destructure.d.ts.map +1 -1
- package/dist/analyze/props-destructure.js +4 -4
- package/dist/analyze/reactive-bindings.cjs +1 -1
- package/dist/analyze/reactive-bindings.d.cts +1 -1
- package/dist/analyze/reactive-bindings.d.ts +1 -1
- package/dist/analyze/reactive-bindings.js +2 -2
- package/dist/analyze/reactive-bindings.mjs +1 -1
- package/dist/analyze/reactive-expr.d.cts +4 -4
- package/dist/analyze/reactive-expr.d.ts +4 -4
- package/dist/analyze/reactive-expr.d.ts.map +1 -1
- package/dist/analyze/reactive-expr.js +2 -2
- package/dist/analyze/static-graph.cjs +2 -2
- package/dist/analyze/static-graph.d.cts +1 -1
- package/dist/analyze/static-graph.d.ts +1 -1
- package/dist/analyze/static-graph.d.ts.map +1 -1
- package/dist/analyze/static-graph.js +11 -11
- package/dist/analyze/static-graph.mjs +2 -2
- package/dist/{babel-NRW4EFTG.mjs → babel-TGY76XJ7.mjs} +6 -6
- package/dist/{chunk-MJV3UXIL.mjs → chunk-4PLHS2FP.mjs} +2 -2
- package/dist/{chunk-EZR7NZOY.mjs → chunk-6DB5FXS4.mjs} +3 -3
- package/dist/{chunk-FSSWUXUR.mjs → chunk-F74GFKSL.mjs} +1 -1
- package/dist/{chunk-3YKZ4GNH.mjs → chunk-G6QC2WRJ.mjs} +1 -1
- package/dist/{chunk-R2VHAZAX.mjs → chunk-RUDJDZAA.mjs} +1 -1
- package/dist/codegen/backends/imperative.cjs +1 -1
- package/dist/codegen/backends/imperative.d.cts +1 -1
- package/dist/codegen/backends/imperative.d.ts +1 -1
- package/dist/codegen/backends/imperative.js +12 -12
- package/dist/codegen/backends/imperative.mjs +1 -1
- package/dist/codegen/contract.d.cts +2 -2
- package/dist/codegen/contract.d.ts +2 -2
- package/dist/codegen/contract.js +2 -2
- package/dist/codegen/partial-template.d.cts +4 -4
- package/dist/codegen/partial-template.d.ts +4 -4
- package/dist/codegen/partial-template.js +0 -0
- package/dist/codegen/serialize-static.d.cts +3 -3
- package/dist/codegen/serialize-static.d.ts +3 -3
- package/dist/codegen/serialize-static.js +6 -6
- package/dist/frontend/babel/build-ir-lit.cjs +3 -3
- package/dist/frontend/babel/build-ir-lit.d.cts +2 -2
- package/dist/frontend/babel/build-ir-lit.d.ts +2 -2
- package/dist/frontend/babel/build-ir-lit.mjs +3 -3
- package/dist/frontend/babel/build-ir.cjs +3 -3
- package/dist/frontend/babel/build-ir.d.cts +2 -2
- package/dist/frontend/babel/build-ir.d.ts +2 -2
- package/dist/frontend/babel/build-ir.js +2 -2
- package/dist/frontend/babel/build-ir.mjs +3 -3
- package/dist/frontend/babel/index.cjs +5 -5
- package/dist/frontend/babel/index.d.cts +1 -1
- package/dist/frontend/babel/index.d.ts +1 -1
- package/dist/frontend/babel/index.js +1 -1
- package/dist/frontend/babel/index.mjs +5 -5
- package/dist/frontend/babel/lower-template.cjs +3 -3
- package/dist/frontend/babel/lower-template.d.cts +1 -1
- package/dist/frontend/babel/lower-template.d.ts +1 -1
- package/dist/frontend/babel/lower-template.js +2 -2
- package/dist/frontend/babel/lower-template.mjs +3 -3
- package/dist/frontend/babel/plugin.cjs +4 -4
- package/dist/frontend/babel/plugin.d.cts +5 -5
- package/dist/frontend/babel/plugin.d.ts +5 -5
- package/dist/frontend/babel/plugin.d.ts.map +1 -1
- package/dist/frontend/babel/plugin.js +14 -14
- package/dist/frontend/babel/plugin.mjs +4 -4
- package/dist/index.cjs +5 -5
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -4
- package/dist/index.mjs +5 -5
- package/dist/integrations.cjs +12 -8
- package/dist/integrations.d.cts +9 -9
- package/dist/integrations.d.ts +9 -9
- package/dist/integrations.d.ts.map +1 -1
- package/dist/integrations.js +29 -8
- package/dist/integrations.mjs +15 -11
- package/dist/ir/nodes.d.cts +6 -6
- package/dist/ir/nodes.d.ts +6 -6
- package/dist/lower/compile-template.cjs +3 -3
- package/dist/lower/compile-template.d.cts +3 -3
- package/dist/lower/compile-template.d.ts +3 -3
- package/dist/lower/compile-template.js +1 -1
- package/dist/lower/compile-template.mjs +3 -3
- package/dist/lower/jsx.d.cts +1 -1
- package/dist/lower/jsx.d.ts +1 -1
- package/dist/lower/jsx.js +4 -4
- package/dist/lower/template.cjs +2 -2
- package/dist/lower/template.d.cts +3 -3
- package/dist/lower/template.d.ts +3 -3
- package/dist/lower/template.d.ts.map +1 -1
- package/dist/lower/template.js +7 -7
- package/dist/lower/template.mjs +2 -2
- package/dist/lower/text.d.cts +2 -2
- package/dist/lower/text.d.ts +2 -2
- package/dist/lower/text.d.ts.map +1 -1
- package/dist/lower/text.js +2 -2
- package/dist/optimize/analyze-static.d.cts +2 -2
- package/dist/optimize/analyze-static.d.ts +2 -2
- package/dist/optimize/analyze-static.js +2 -2
- package/dist/optimize/collapse-strategies.d.cts +3 -3
- package/dist/optimize/collapse-strategies.d.ts +3 -3
- package/dist/options.d.cts +2 -2
- package/dist/options.d.ts +2 -2
- package/dist/resolve/builtins.cjs +1 -1
- package/dist/resolve/builtins.d.cts +8 -8
- package/dist/resolve/builtins.d.ts +8 -8
- package/dist/resolve/builtins.d.ts.map +1 -1
- package/dist/resolve/builtins.js +4 -4
- package/dist/resolve/builtins.mjs +1 -1
- package/dist/resolve/component-globals.cjs +3 -3
- package/dist/resolve/component-globals.d.cts +5 -5
- package/dist/resolve/component-globals.d.ts +5 -5
- package/dist/resolve/component-globals.js +10 -10
- package/dist/resolve/component-globals.mjs +3 -3
- package/dist/resolve/component-resolver.d.cts +3 -3
- package/dist/resolve/component-resolver.d.ts +3 -3
- package/dist/resolve/component-resolver.d.ts.map +1 -1
- package/dist/resolve/component-resolver.js +3 -3
- package/dist/resolve/load-directive.d.cts +5 -5
- package/dist/resolve/load-directive.d.ts +5 -5
- package/dist/resolve/load-directive.js +6 -6
- package/dist/resolve/resolve-ir.d.cts +6 -6
- package/dist/resolve/resolve-ir.d.ts +6 -6
- package/dist/resolve/resolve-ir.d.ts.map +1 -1
- package/dist/resolve/resolve-ir.js +1 -1
- package/dist/resolve/write-globals.cjs +3 -3
- package/dist/resolve/write-globals.js +2 -2
- package/dist/resolve/write-globals.mjs +3 -3
- package/dist/{server-fns-4ZXN6DYU.mjs → server-fns-ZYWQTSZU.mjs} +4 -4
- package/dist/{server-functions-V6D6DRIA.mjs → server-functions-PCERFA7A.mjs} +3 -3
- package/dist/transform/bindings.d.cts +1 -1
- package/dist/transform/bindings.d.ts +1 -1
- package/dist/transform/bindings.js +1 -1
- package/dist/transform/index.cjs +3 -3
- package/dist/transform/index.mjs +3 -3
- package/dist/transform/intrinsics.cjs +1 -1
- package/dist/transform/intrinsics.js +1 -1
- package/dist/transform/intrinsics.mjs +1 -1
- package/dist/transform/props.d.cts +1 -1
- package/dist/transform/props.d.ts +1 -1
- package/dist/transform/props.d.ts.map +1 -1
- package/dist/transform/props.js +4 -4
- package/dist/transform/server-fn-id.d.cts +1 -1
- package/dist/transform/server-fn-id.d.ts +1 -1
- package/dist/transform/server-fn-id.js +2 -2
- package/dist/transform/server-fns.js +3 -3
- package/dist/transform/source-locations.cjs +1 -1
- package/dist/transform/source-locations.d.cts +1 -1
- package/dist/transform/source-locations.d.ts +1 -1
- package/dist/transform/source-locations.js +5 -5
- package/dist/transform/source-locations.mjs +1 -1
- package/dist/transform/templates.cjs +2 -2
- package/dist/transform/templates.d.cts +2 -2
- package/dist/transform/templates.d.ts +2 -2
- package/dist/transform/templates.d.ts.map +1 -1
- package/dist/transform/templates.js +7 -7
- package/dist/transform/templates.mjs +2 -2
- package/dist/{transform-BT4MMASR.mjs → transform-RWDTQUF5.mjs} +5 -5
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @fluixi/compiler v1.0.0-alpha.
|
|
1
|
+
/*! @fluixi/compiler v1.0.0-alpha.85 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
|
|
2
2
|
import {
|
|
3
3
|
INTRINSICS,
|
|
4
4
|
RESERVED_COMPONENTS,
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
builtinComponentMap,
|
|
8
8
|
isIntrinsicName,
|
|
9
9
|
isPrimitiveModule
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-4PLHS2FP.mjs";
|
|
11
11
|
|
|
12
12
|
// src/analyze/expr-shape.ts
|
|
13
13
|
var CALL = /* @__PURE__ */ new Set(["CallExpression", "OptionalCallExpression"]);
|
|
@@ -1654,7 +1654,7 @@ var Lowerer = class {
|
|
|
1654
1654
|
}
|
|
1655
1655
|
];
|
|
1656
1656
|
}
|
|
1657
|
-
/** A plain attribute (incl. lit `?bool`, mixed values)
|
|
1657
|
+
/** A plain attribute (incl. lit `?bool`, mixed values), old `mkProp` behavior. */
|
|
1658
1658
|
plainAttr(a) {
|
|
1659
1659
|
const v = a.value;
|
|
1660
1660
|
let name = a.name;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @fluixi/compiler v1.0.0-alpha.
|
|
1
|
+
/*! @fluixi/compiler v1.0.0-alpha.85 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
|
|
2
2
|
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
3
3
|
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
4
4
|
}) : x)(function(x) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @fluixi/compiler v1.0.0-alpha.
|
|
1
|
+
/*! @fluixi/compiler v1.0.0-alpha.85 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
|
|
2
2
|
|
|
3
3
|
// ../../node_modules/.pnpm/@jridgewell+sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs
|
|
4
4
|
var comma = ",".charCodeAt(0);
|
|
@@ -238,7 +238,7 @@ var INTRINSICS = {
|
|
|
238
238
|
$store: { export: "store", module: "@fluixi/reactive/store", returns: "store-handle" },
|
|
239
239
|
$resource: { export: "resource", module: REACTIVE_MODULE, returns: "resource-handle" },
|
|
240
240
|
// No short runtime form for these yet, so the intrinsic stands for the `create*`
|
|
241
|
-
// name. Still worth having
|
|
241
|
+
// name. Still worth having: no import to write, and when a shorter form is
|
|
242
242
|
// designed, the change is this line rather than a compiler pass.
|
|
243
243
|
$selector: { export: "createSelector", module: REACTIVE_MODULE, returns: "memo-accessor" },
|
|
244
244
|
$deferred: { export: "createDeferred", module: REACTIVE_MODULE, returns: "memo-accessor" },
|
|
@@ -2,7 +2,7 @@ import type { CodegenBackend, StaticTemplate } from '../backend.cjs';
|
|
|
2
2
|
/**
|
|
3
3
|
* Substitute template declarations into the code as inline `createTemplate` calls.
|
|
4
4
|
*
|
|
5
|
-
* For hosts that cannot hoist
|
|
5
|
+
* For hosts that cannot hoist: nested JSX lowered inside an expression, where there is
|
|
6
6
|
* no module scope to reach. `createTemplate` caches by HTML string, so this costs a Map
|
|
7
7
|
* lookup per instantiation rather than a re-parse, and is still far cheaper than
|
|
8
8
|
* building the subtree element by element.
|
|
@@ -2,7 +2,7 @@ import type { CodegenBackend, StaticTemplate } from '../backend.js';
|
|
|
2
2
|
/**
|
|
3
3
|
* Substitute template declarations into the code as inline `createTemplate` calls.
|
|
4
4
|
*
|
|
5
|
-
* For hosts that cannot hoist
|
|
5
|
+
* For hosts that cannot hoist: nested JSX lowered inside an expression, where there is
|
|
6
6
|
* no module scope to reach. `createTemplate` caches by HTML string, so this costs a Map
|
|
7
7
|
* lookup per instantiation rather than a re-parse, and is still far cheaper than
|
|
8
8
|
* building the subtree element by element.
|
|
@@ -4,7 +4,7 @@ import { RUNTIME_CONTRACT_V1 } from '../contract.js';
|
|
|
4
4
|
import { markHole, markProps, SOURCE_MARKER } from '../../transform/source-locations.js';
|
|
5
5
|
import { paren } from '../../analyze/paren.js';
|
|
6
6
|
/**
|
|
7
|
-
* Imperative fine-grained backend
|
|
7
|
+
* Imperative fine-grained backend: emits createNativeElement/insert/spread/
|
|
8
8
|
* createComponent (RUNTIME_CONTRACT_V1), the runtime proven by the @fluixi/dom
|
|
9
9
|
* contract tests.
|
|
10
10
|
*
|
|
@@ -53,7 +53,7 @@ function propValue(p) {
|
|
|
53
53
|
/**
|
|
54
54
|
* Component props are passed as VALUES, not thunks (unlike native-element attrs).
|
|
55
55
|
* The whole `createComponent(...)` call sits inside a `createMemo`, so reading a
|
|
56
|
-
* signal in a prop re-evaluates when the memo re-runs
|
|
56
|
+
* signal in a prop re-evaluates when the memo re-runs, no per-prop thunk needed.
|
|
57
57
|
* This matches the inline codegen; wrapping a prop like
|
|
58
58
|
* `history={createMemoryHistory()}` in `() => …` would hand the component a
|
|
59
59
|
* function instead of the value (e.g. `history.get is not a function`).
|
|
@@ -81,7 +81,7 @@ function emitProps(props, childrenExpr, used) {
|
|
|
81
81
|
/**
|
|
82
82
|
* The memo a component lowers to is an accessor, so it takes the same hole mark as any
|
|
83
83
|
* other reactive binding. Without it, the insert that places the subtree reports whatever
|
|
84
|
-
* the runtime stack says
|
|
84
|
+
* the runtime stack says: a position in the compiled file.
|
|
85
85
|
*/
|
|
86
86
|
function markBind(code, at) {
|
|
87
87
|
return at ? markHole(code, at.line, at.column) : code;
|
|
@@ -122,20 +122,20 @@ function emitComponent(name, props, children, used, templates, at) {
|
|
|
122
122
|
propAt[p.name] = [p.at.line, p.at.column];
|
|
123
123
|
if (Object.keys(propAt).length)
|
|
124
124
|
obj = markProps(obj, propAt);
|
|
125
|
-
// The memo never recomputes
|
|
125
|
+
// The memo never recomputes: every prop is a getter, so this callback reads nothing
|
|
126
126
|
// reactive. It is here for what it makes `insert` do, and it cannot be elided.
|
|
127
127
|
//
|
|
128
128
|
// A component whose return value is *itself* bare control flow (`return <Show …/>`)
|
|
129
129
|
// produces a memo, which `createComponent` deliberately does not stamp as a component.
|
|
130
130
|
// Without this wrapper `insert` stops re-reading it, and the subtree goes stale when a
|
|
131
|
-
// sibling updates the context it depends on
|
|
131
|
+
// sibling updates the context it depends on: see `show-context-insert.spec.ts`.
|
|
132
132
|
//
|
|
133
133
|
// Static props are not a sufficient condition for dropping it either: safety depends on
|
|
134
134
|
// what the callee *returns*, which lives in another module and is not visible here.
|
|
135
135
|
//
|
|
136
136
|
// Nor can it be a plain `() => createComponent(...)` thunk. The memo also provides
|
|
137
137
|
// *identity*: it runs once and caches. A thunk is re-invoked by insert's render effect
|
|
138
|
-
// on every run, rebuilding the component with a fresh owner
|
|
138
|
+
// on every run, rebuilding the component with a fresh owner, which loses context,
|
|
139
139
|
// duplicates the tree on hydration and piles up Portals. Measured: dropping the wrapper
|
|
140
140
|
// fails 3 tests, replacing it with a thunk fails 14.
|
|
141
141
|
//
|
|
@@ -179,7 +179,7 @@ function emitNode(node, used, templates) {
|
|
|
179
179
|
return emitChildren(node.children, used, templates);
|
|
180
180
|
case 'component':
|
|
181
181
|
// No reactive prop means no `bindAt`, which is most tags. The insert that places the
|
|
182
|
-
// subtree still has to report somewhere, and the tag itself is where it was written
|
|
182
|
+
// subtree still has to report somewhere, and the tag itself is where it was written ,
|
|
183
183
|
// without this it reports whatever the runtime stack says, a line in the compiled file.
|
|
184
184
|
return markBind(emitComponent(node.name, node.props, node.children, used, templates, node.at), node.bindAt ?? node.at);
|
|
185
185
|
case 'control': {
|
|
@@ -192,7 +192,7 @@ function emitNode(node, used, templates) {
|
|
|
192
192
|
// one cloneNode instead of an createNativeElement + spread per element.
|
|
193
193
|
// SVG is excluded: the runtime wraps SVG template HTML in an <svg> host and
|
|
194
194
|
// `cloneTemplate(t, true)` returns that wrapper, not the serialized element, so
|
|
195
|
-
// cloning would hand back the wrong node. Correctness first
|
|
195
|
+
// cloning would hand back the wrong node. Correctness first, SVG keeps the
|
|
196
196
|
// imperative path until the runtime grows an unwrapping clone.
|
|
197
197
|
if (templates && node.static && !node.svg && isSerializable(node)) {
|
|
198
198
|
used.add('templateNode');
|
|
@@ -205,7 +205,7 @@ function emitNode(node, used, templates) {
|
|
|
205
205
|
? `templateNode(${id}, ${JSON.stringify(node.tag)}, false, false, ${JSON.stringify(at)})`
|
|
206
206
|
: `templateNode(${id}, ${JSON.stringify(node.tag)})`;
|
|
207
207
|
}
|
|
208
|
-
// Structure static, contents dynamic
|
|
208
|
+
// Structure static, contents dynamic: the common shape. One template for the
|
|
209
209
|
// structure, then each hole filled through a reference into the clone. Every
|
|
210
210
|
// reference is read before any insertion, since inserting shifts later positions.
|
|
211
211
|
if (templates && partial) {
|
|
@@ -227,7 +227,7 @@ function emitNode(node, used, templates) {
|
|
|
227
227
|
for (const step of plan.steps)
|
|
228
228
|
lines.push(`const ${step.ref} = ${step.expr};`);
|
|
229
229
|
for (const hole of plan.holes) {
|
|
230
|
-
// The fourth argument is what the hole already holds
|
|
230
|
+
// The fourth argument is what the hole already holds, nothing on a fresh
|
|
231
231
|
// clone, the server's content when hydrating. `insert` reconciles against it,
|
|
232
232
|
// so hydration reuses those nodes rather than building new ones.
|
|
233
233
|
// `holeScope` places the hydration cursor at what the server rendered for
|
|
@@ -255,7 +255,7 @@ function emitNode(node, used, templates) {
|
|
|
255
255
|
if (node.props.length > 0) {
|
|
256
256
|
// Literal attributes are written straight on. `spread` is a generic helper that
|
|
257
257
|
// walks every prop checking for reactivity, events, refs, class/style objects and
|
|
258
|
-
// namespaces
|
|
258
|
+
// namespaces: none of which a compile-time constant needs. Same predicate the
|
|
259
259
|
// template serializer uses, so the two agree on what a plain attribute is.
|
|
260
260
|
if (!node.svg && node.props.every(isPlainLiteralAttr)) {
|
|
261
261
|
for (const p of node.props)
|
|
@@ -287,7 +287,7 @@ function emitNode(node, used, templates) {
|
|
|
287
287
|
/**
|
|
288
288
|
* Substitute template declarations into the code as inline `createTemplate` calls.
|
|
289
289
|
*
|
|
290
|
-
* For hosts that cannot hoist
|
|
290
|
+
* For hosts that cannot hoist: nested JSX lowered inside an expression, where there is
|
|
291
291
|
* no module scope to reach. `createTemplate` caches by HTML string, so this costs a Map
|
|
292
292
|
* lookup per instantiation rather than a re-parse, and is still far cheaper than
|
|
293
293
|
* building the subtree element by element.
|
|
@@ -211,7 +211,7 @@ var INTRINSICS = {
|
|
|
211
211
|
$store: { export: "store", module: "@fluixi/reactive/store", returns: "store-handle" },
|
|
212
212
|
$resource: { export: "resource", module: REACTIVE_MODULE, returns: "resource-handle" },
|
|
213
213
|
// No short runtime form for these yet, so the intrinsic stands for the `create*`
|
|
214
|
-
// name. Still worth having
|
|
214
|
+
// name. Still worth having: no import to write, and when a shorter form is
|
|
215
215
|
// designed, the change is this line rather than a compiler pass.
|
|
216
216
|
$selector: { export: "createSelector", module: REACTIVE_MODULE, returns: "memo-accessor" },
|
|
217
217
|
$deferred: { export: "createDeferred", module: REACTIVE_MODULE, returns: "memo-accessor" },
|
|
@@ -11,13 +11,13 @@ export interface RuntimeContract {
|
|
|
11
11
|
symbols: readonly string[];
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
|
-
* v1
|
|
14
|
+
* v1: the imperative fine-grained runtime, locked by the @fluixi/dom contract
|
|
15
15
|
* tests (createNativeElement/insert/spread/delegateEvents/createComponent + the
|
|
16
16
|
* control-flow components).
|
|
17
17
|
*/
|
|
18
18
|
export declare const RUNTIME_CONTRACT_V1: RuntimeContract;
|
|
19
19
|
/**
|
|
20
|
-
* v2
|
|
20
|
+
* v2: adds the Solid-style (but ours) template-clone primitives. A future
|
|
21
21
|
* template-clone backend targets this contract; the runtime gains template()/
|
|
22
22
|
* cloneTemplate()/walk() at the same time.
|
|
23
23
|
*/
|
|
@@ -11,13 +11,13 @@ export interface RuntimeContract {
|
|
|
11
11
|
symbols: readonly string[];
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
|
-
* v1
|
|
14
|
+
* v1: the imperative fine-grained runtime, locked by the @fluixi/dom contract
|
|
15
15
|
* tests (createNativeElement/insert/spread/delegateEvents/createComponent + the
|
|
16
16
|
* control-flow components).
|
|
17
17
|
*/
|
|
18
18
|
export declare const RUNTIME_CONTRACT_V1: RuntimeContract;
|
|
19
19
|
/**
|
|
20
|
-
* v2
|
|
20
|
+
* v2: adds the Solid-style (but ours) template-clone primitives. A future
|
|
21
21
|
* template-clone backend targets this contract; the runtime gains template()/
|
|
22
22
|
* cloneTemplate()/walk() at the same time.
|
|
23
23
|
*/
|
package/dist/codegen/contract.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* v1
|
|
2
|
+
* v1: the imperative fine-grained runtime, locked by the @fluixi/dom contract
|
|
3
3
|
* tests (createNativeElement/insert/spread/delegateEvents/createComponent + the
|
|
4
4
|
* control-flow components).
|
|
5
5
|
*/
|
|
@@ -19,7 +19,7 @@ export const RUNTIME_CONTRACT_V1 = {
|
|
|
19
19
|
],
|
|
20
20
|
};
|
|
21
21
|
/**
|
|
22
|
-
* v2
|
|
22
|
+
* v2: adds the Solid-style (but ours) template-clone primitives. A future
|
|
23
23
|
* template-clone backend targets this contract; the runtime gains template()/
|
|
24
24
|
* cloneTemplate()/walk() at the same time.
|
|
25
25
|
*/
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Cloning a subtree whose *structure* is static but which contains dynamic holes.
|
|
3
3
|
*
|
|
4
|
-
* The fully-static case is easy: serialize, clone, done. The common case is not static
|
|
5
|
-
* a card wrapper with one reactive value inside
|
|
4
|
+
* The fully-static case is easy: serialize, clone, done. The common case is not static ,
|
|
5
|
+
* a card wrapper with one reactive value inside: and a single hole used to send the
|
|
6
6
|
* whole subtree back to being built an element at a time. This plans the middle ground:
|
|
7
7
|
* the structure becomes one template, and each hole is filled through a reference into
|
|
8
8
|
* the cloned tree.
|
|
9
9
|
*
|
|
10
|
-
* Three things make it correct in all three environments
|
|
10
|
+
* Three things make it correct in all three environments, fresh client render, server
|
|
11
11
|
* render, and hydration:
|
|
12
12
|
*
|
|
13
13
|
* - **Each hole is bracketed by a marker pair.** A hole's content is then, by
|
|
@@ -26,7 +26,7 @@ import type { IRElement, IRNode } from '../ir/nodes.cjs';
|
|
|
26
26
|
* The comments bracketing a hole.
|
|
27
27
|
*
|
|
28
28
|
* Named rather than anonymous so they are recognisable in devtools and in a page's
|
|
29
|
-
* source
|
|
29
|
+
* source: an unexplained `<!---->` is a support question.
|
|
30
30
|
*/
|
|
31
31
|
export declare const HOLE_START = "<!--fx-->";
|
|
32
32
|
export declare const HOLE_END = "<!--fx/-->";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Cloning a subtree whose *structure* is static but which contains dynamic holes.
|
|
3
3
|
*
|
|
4
|
-
* The fully-static case is easy: serialize, clone, done. The common case is not static
|
|
5
|
-
* a card wrapper with one reactive value inside
|
|
4
|
+
* The fully-static case is easy: serialize, clone, done. The common case is not static ,
|
|
5
|
+
* a card wrapper with one reactive value inside: and a single hole used to send the
|
|
6
6
|
* whole subtree back to being built an element at a time. This plans the middle ground:
|
|
7
7
|
* the structure becomes one template, and each hole is filled through a reference into
|
|
8
8
|
* the cloned tree.
|
|
9
9
|
*
|
|
10
|
-
* Three things make it correct in all three environments
|
|
10
|
+
* Three things make it correct in all three environments, fresh client render, server
|
|
11
11
|
* render, and hydration:
|
|
12
12
|
*
|
|
13
13
|
* - **Each hole is bracketed by a marker pair.** A hole's content is then, by
|
|
@@ -26,7 +26,7 @@ import type { IRElement, IRNode } from '../ir/nodes.js';
|
|
|
26
26
|
* The comments bracketing a hole.
|
|
27
27
|
*
|
|
28
28
|
* Named rather than anonymous so they are recognisable in devtools and in a page's
|
|
29
|
-
* source
|
|
29
|
+
* source: an unexplained `<!---->` is a support question.
|
|
30
30
|
*/
|
|
31
31
|
export declare const HOLE_START = "<!--fx-->";
|
|
32
32
|
export declare const HOLE_END = "<!--fx/-->";
|
|
Binary file
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Serialize a static IR subtree to the HTML a `<template>` can be built from.
|
|
3
3
|
*
|
|
4
4
|
* Only called for nodes `analyzeStatic` marked static, so every prop is a literal and
|
|
5
|
-
* every child is text or another static element
|
|
5
|
+
* every child is text or another static element: there is nothing here that could need
|
|
6
6
|
* an expression. That invariant is what makes this safe: the serializer never has to
|
|
7
7
|
* guess, and anything it cannot represent is a bug in the analysis, not a fallback.
|
|
8
8
|
*/
|
|
@@ -12,7 +12,7 @@ export declare function isRawTextElement(tag: string): boolean;
|
|
|
12
12
|
/** The HTML spelling of an IR prop name. */
|
|
13
13
|
export declare function htmlAttrName(name: string): string;
|
|
14
14
|
/**
|
|
15
|
-
* True for a prop that is a plain HTML attribute with a compile-time constant value
|
|
15
|
+
* True for a prop that is a plain HTML attribute with a compile-time constant value ,
|
|
16
16
|
* safe to write straight onto the element, with no runtime interpretation.
|
|
17
17
|
*/
|
|
18
18
|
export declare function isPlainLiteralAttr(prop: IRProp): boolean;
|
|
@@ -24,7 +24,7 @@ export declare function serializeStatic(node: IRElement): string;
|
|
|
24
24
|
* Where each element of a template was written, in the order a clone walks them.
|
|
25
25
|
*
|
|
26
26
|
* A template is emitted as one string, so a source map traces everything in it back to the
|
|
27
|
-
* line the root opens at
|
|
27
|
+
* line the root opens at: every element in a component reports the same place. The order
|
|
28
28
|
* is pre-order over the elements the template contains, which is what
|
|
29
29
|
* `[root, ...root.querySelectorAll('*')]` gives back on the clone, since holes are filled
|
|
30
30
|
* only after it is built.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Serialize a static IR subtree to the HTML a `<template>` can be built from.
|
|
3
3
|
*
|
|
4
4
|
* Only called for nodes `analyzeStatic` marked static, so every prop is a literal and
|
|
5
|
-
* every child is text or another static element
|
|
5
|
+
* every child is text or another static element: there is nothing here that could need
|
|
6
6
|
* an expression. That invariant is what makes this safe: the serializer never has to
|
|
7
7
|
* guess, and anything it cannot represent is a bug in the analysis, not a fallback.
|
|
8
8
|
*/
|
|
@@ -12,7 +12,7 @@ export declare function isRawTextElement(tag: string): boolean;
|
|
|
12
12
|
/** The HTML spelling of an IR prop name. */
|
|
13
13
|
export declare function htmlAttrName(name: string): string;
|
|
14
14
|
/**
|
|
15
|
-
* True for a prop that is a plain HTML attribute with a compile-time constant value
|
|
15
|
+
* True for a prop that is a plain HTML attribute with a compile-time constant value ,
|
|
16
16
|
* safe to write straight onto the element, with no runtime interpretation.
|
|
17
17
|
*/
|
|
18
18
|
export declare function isPlainLiteralAttr(prop: IRProp): boolean;
|
|
@@ -24,7 +24,7 @@ export declare function serializeStatic(node: IRElement): string;
|
|
|
24
24
|
* Where each element of a template was written, in the order a clone walks them.
|
|
25
25
|
*
|
|
26
26
|
* A template is emitted as one string, so a source map traces everything in it back to the
|
|
27
|
-
* line the root opens at
|
|
27
|
+
* line the root opens at: every element in a component reports the same place. The order
|
|
28
28
|
* is pre-order over the elements the template contains, which is what
|
|
29
29
|
* `[root, ...root.querySelectorAll('*')]` gives back on the clone, since holes are filled
|
|
30
30
|
* only after it is built.
|
|
@@ -49,8 +49,8 @@ const PROPERTY_ONLY = new Set([
|
|
|
49
49
|
* Elements whose content the HTML parser does not decode entities inside.
|
|
50
50
|
*
|
|
51
51
|
* Escaping `>` in a `<style>` body would leave a literal `>` in the CSS rather than
|
|
52
|
-
* the character. There is nothing to gain from templating these
|
|
53
|
-
* interesting part, not their structure
|
|
52
|
+
* the character. There is nothing to gain from templating these, their content is the
|
|
53
|
+
* interesting part, not their structure: so they stay on the imperative path.
|
|
54
54
|
*/
|
|
55
55
|
const RAW_TEXT_ELEMENTS = new Set(['script', 'style', 'textarea', 'title']);
|
|
56
56
|
/** True when this element's content must not be entity-escaped. */
|
|
@@ -62,7 +62,7 @@ export function htmlAttrName(name) {
|
|
|
62
62
|
return HTML_NAME[name] ?? name;
|
|
63
63
|
}
|
|
64
64
|
/**
|
|
65
|
-
* True for a prop that is a plain HTML attribute with a compile-time constant value
|
|
65
|
+
* True for a prop that is a plain HTML attribute with a compile-time constant value ,
|
|
66
66
|
* safe to write straight onto the element, with no runtime interpretation.
|
|
67
67
|
*/
|
|
68
68
|
export function isPlainLiteralAttr(prop) {
|
|
@@ -84,7 +84,7 @@ export function isSerializable(node) {
|
|
|
84
84
|
for (const prop of node.props) {
|
|
85
85
|
// Namespaced names (`prop:value`, `attr:x`, `bool:disabled`, `on:click`) are
|
|
86
86
|
// instructions to the runtime, not HTML, and property-only names are assigned
|
|
87
|
-
// rather than set
|
|
87
|
+
// rather than set: both stay on the imperative path.
|
|
88
88
|
if (!isPlainLiteralAttr(prop))
|
|
89
89
|
return false;
|
|
90
90
|
}
|
|
@@ -125,7 +125,7 @@ function serializeProp(prop) {
|
|
|
125
125
|
}
|
|
126
126
|
/**
|
|
127
127
|
* Escaping is deliberately aggressive. This string is assigned to `innerHTML`, so a
|
|
128
|
-
* literal that happens to contain markup would otherwise become elements
|
|
128
|
+
* literal that happens to contain markup would otherwise become elements, a value like
|
|
129
129
|
* `class="a<b"` must stay one attribute.
|
|
130
130
|
*/
|
|
131
131
|
function escapeAttr(value) {
|
|
@@ -142,7 +142,7 @@ function escapeText(value) {
|
|
|
142
142
|
* Where each element of a template was written, in the order a clone walks them.
|
|
143
143
|
*
|
|
144
144
|
* A template is emitted as one string, so a source map traces everything in it back to the
|
|
145
|
-
* line the root opens at
|
|
145
|
+
* line the root opens at: every element in a component reports the same place. The order
|
|
146
146
|
* is pre-order over the elements the template contains, which is what
|
|
147
147
|
* `[root, ...root.querySelectorAll('*')]` gives back on the clone, since holes are filled
|
|
148
148
|
* only after it is built.
|
|
@@ -303,7 +303,7 @@ var INTRINSICS = {
|
|
|
303
303
|
$store: { export: "store", module: "@fluixi/reactive/store", returns: "store-handle" },
|
|
304
304
|
$resource: { export: "resource", module: REACTIVE_MODULE, returns: "resource-handle" },
|
|
305
305
|
// No short runtime form for these yet, so the intrinsic stands for the `create*`
|
|
306
|
-
// name. Still worth having
|
|
306
|
+
// name. Still worth having: no import to write, and when a shorter form is
|
|
307
307
|
// designed, the change is this line rather than a compiler pass.
|
|
308
308
|
$selector: { export: "createSelector", module: REACTIVE_MODULE, returns: "memo-accessor" },
|
|
309
309
|
$deferred: { export: "createDeferred", module: REACTIVE_MODULE, returns: "memo-accessor" },
|
|
@@ -1033,7 +1033,7 @@ var Lowerer = class {
|
|
|
1033
1033
|
}
|
|
1034
1034
|
];
|
|
1035
1035
|
}
|
|
1036
|
-
/** A plain attribute (incl. lit `?bool`, mixed values)
|
|
1036
|
+
/** A plain attribute (incl. lit `?bool`, mixed values), old `mkProp` behavior. */
|
|
1037
1037
|
plainAttr(a) {
|
|
1038
1038
|
const v = a.value;
|
|
1039
1039
|
let name = a.name;
|
|
@@ -1454,7 +1454,7 @@ function buildIR(node, used = /* @__PURE__ */ new Set(), onNested) {
|
|
|
1454
1454
|
const ir = buildJsxIR(node, {
|
|
1455
1455
|
code: (n) => (
|
|
1456
1456
|
// A member-expression tag (`<ns.Foo/>`) is not an Expression, so it cannot go
|
|
1457
|
-
// through the nested-JSX compile
|
|
1457
|
+
// through the nested-JSX compile: it only ever needs printing.
|
|
1458
1458
|
n.type === "JSXMemberExpression" ? gen(n) : genExpr(n, used, onNested)
|
|
1459
1459
|
),
|
|
1460
1460
|
used
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* concerns into one place with no source spans, no diagnostics, and no reuse
|
|
7
7
|
* outside the compiler. It has been split:
|
|
8
8
|
*
|
|
9
|
-
* `@fluixi/template-parser`
|
|
10
|
-
* `./lower-template`
|
|
9
|
+
* `@fluixi/template-parser` : Babel-free tokenizer + parser → Template AST
|
|
10
|
+
* `./lower-template` : Babel-aware lowering: Template AST → IR
|
|
11
11
|
*
|
|
12
12
|
* `buildIRFromLit` keeps its exact signature so every caller (build-ir's nested
|
|
13
13
|
* composition, plugin's `emitLitViaIR`) is unchanged; the shared Template AST
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* concerns into one place with no source spans, no diagnostics, and no reuse
|
|
7
7
|
* outside the compiler. It has been split:
|
|
8
8
|
*
|
|
9
|
-
* `@fluixi/template-parser`
|
|
10
|
-
* `./lower-template`
|
|
9
|
+
* `@fluixi/template-parser` : Babel-free tokenizer + parser → Template AST
|
|
10
|
+
* `./lower-template` : Babel-aware lowering: Template AST → IR
|
|
11
11
|
*
|
|
12
12
|
* `buildIRFromLit` keeps its exact signature so every caller (build-ir's nested
|
|
13
13
|
* composition, plugin's `emitLitViaIR`) is unchanged; the shared Template AST
|
|
@@ -269,7 +269,7 @@ var INTRINSICS = {
|
|
|
269
269
|
$store: { export: "store", module: "@fluixi/reactive/store", returns: "store-handle" },
|
|
270
270
|
$resource: { export: "resource", module: REACTIVE_MODULE, returns: "resource-handle" },
|
|
271
271
|
// No short runtime form for these yet, so the intrinsic stands for the `create*`
|
|
272
|
-
// name. Still worth having
|
|
272
|
+
// name. Still worth having: no import to write, and when a shorter form is
|
|
273
273
|
// designed, the change is this line rather than a compiler pass.
|
|
274
274
|
$selector: { export: "createSelector", module: REACTIVE_MODULE, returns: "memo-accessor" },
|
|
275
275
|
$deferred: { export: "createDeferred", module: REACTIVE_MODULE, returns: "memo-accessor" },
|
|
@@ -999,7 +999,7 @@ var Lowerer = class {
|
|
|
999
999
|
}
|
|
1000
1000
|
];
|
|
1001
1001
|
}
|
|
1002
|
-
/** A plain attribute (incl. lit `?bool`, mixed values)
|
|
1002
|
+
/** A plain attribute (incl. lit `?bool`, mixed values), old `mkProp` behavior. */
|
|
1003
1003
|
plainAttr(a) {
|
|
1004
1004
|
const v = a.value;
|
|
1005
1005
|
let name = a.name;
|
|
@@ -1420,7 +1420,7 @@ function buildIR(node, used = /* @__PURE__ */ new Set(), onNested) {
|
|
|
1420
1420
|
const ir = buildJsxIR(node, {
|
|
1421
1421
|
code: (n) => (
|
|
1422
1422
|
// A member-expression tag (`<ns.Foo/>`) is not an Expression, so it cannot go
|
|
1423
|
-
// through the nested-JSX compile
|
|
1423
|
+
// through the nested-JSX compile: it only ever needs printing.
|
|
1424
1424
|
n.type === "JSXMemberExpression" ? gen(n) : genExpr(n, used, onNested)
|
|
1425
1425
|
),
|
|
1426
1426
|
used
|
|
@@ -252,7 +252,7 @@ var INTRINSICS = {
|
|
|
252
252
|
$store: { export: "store", module: "@fluixi/reactive/store", returns: "store-handle" },
|
|
253
253
|
$resource: { export: "resource", module: REACTIVE_MODULE, returns: "resource-handle" },
|
|
254
254
|
// No short runtime form for these yet, so the intrinsic stands for the `create*`
|
|
255
|
-
// name. Still worth having
|
|
255
|
+
// name. Still worth having: no import to write, and when a shorter form is
|
|
256
256
|
// designed, the change is this line rather than a compiler pass.
|
|
257
257
|
$selector: { export: "createSelector", module: REACTIVE_MODULE, returns: "memo-accessor" },
|
|
258
258
|
$deferred: { export: "createDeferred", module: REACTIVE_MODULE, returns: "memo-accessor" },
|
|
@@ -1038,7 +1038,7 @@ var Lowerer = class {
|
|
|
1038
1038
|
}
|
|
1039
1039
|
];
|
|
1040
1040
|
}
|
|
1041
|
-
/** A plain attribute (incl. lit `?bool`, mixed values)
|
|
1041
|
+
/** A plain attribute (incl. lit `?bool`, mixed values), old `mkProp` behavior. */
|
|
1042
1042
|
plainAttr(a) {
|
|
1043
1043
|
const v = a.value;
|
|
1044
1044
|
let name = a.name;
|
|
@@ -1515,7 +1515,7 @@ function buildIR(node, used = /* @__PURE__ */ new Set(), onNested) {
|
|
|
1515
1515
|
const ir = buildJsxIR(node, {
|
|
1516
1516
|
code: (n) => (
|
|
1517
1517
|
// A member-expression tag (`<ns.Foo/>`) is not an Expression, so it cannot go
|
|
1518
|
-
// through the nested-JSX compile
|
|
1518
|
+
// through the nested-JSX compile: it only ever needs printing.
|
|
1519
1519
|
n.type === "JSXMemberExpression" ? gen2(n) : genExpr(n, used, onNested)
|
|
1520
1520
|
),
|
|
1521
1521
|
used
|
|
@@ -20,7 +20,7 @@ export declare function genExpr(node: t.Expression, used: Set<string>, onNested?
|
|
|
20
20
|
* Called with the IR of JSX (or a template) found inside an expression.
|
|
21
21
|
*
|
|
22
22
|
* That IR is compiled and thrown away during the walk, so anything the module
|
|
23
|
-
* needs because of it
|
|
23
|
+
* needs because of it: a component import, a delegated event, has to be taken
|
|
24
24
|
* off it here or it is lost. Without this, `{(b) => <Input/>}` emitted a
|
|
25
25
|
* reference to `Input` that nothing imported.
|
|
26
26
|
*/
|
|
@@ -29,7 +29,7 @@ export declare const SVG_TAGS: Set<string>;
|
|
|
29
29
|
export declare function isReactiveExpr(node: t.Expression): boolean;
|
|
30
30
|
/**
|
|
31
31
|
* Build IR from a JSX node. The builder is shared (lower/jsx.ts); what this
|
|
32
|
-
* front-end supplies is how an expression becomes source
|
|
32
|
+
* front-end supplies is how an expression becomes source, `genExpr`, which also
|
|
33
33
|
* compiles any JSX or `` html`` `` nested inside it.
|
|
34
34
|
*/
|
|
35
35
|
export declare function buildIR(node: t.JSXElement | t.JSXFragment, used?: Set<string>, onNested?: NestedHook): IRNode;
|
|
@@ -20,7 +20,7 @@ export declare function genExpr(node: t.Expression, used: Set<string>, onNested?
|
|
|
20
20
|
* Called with the IR of JSX (or a template) found inside an expression.
|
|
21
21
|
*
|
|
22
22
|
* That IR is compiled and thrown away during the walk, so anything the module
|
|
23
|
-
* needs because of it
|
|
23
|
+
* needs because of it: a component import, a delegated event, has to be taken
|
|
24
24
|
* off it here or it is lost. Without this, `{(b) => <Input/>}` emitted a
|
|
25
25
|
* reference to `Input` that nothing imported.
|
|
26
26
|
*/
|
|
@@ -29,7 +29,7 @@ export declare const SVG_TAGS: Set<string>;
|
|
|
29
29
|
export declare function isReactiveExpr(node: t.Expression): boolean;
|
|
30
30
|
/**
|
|
31
31
|
* Build IR from a JSX node. The builder is shared (lower/jsx.ts); what this
|
|
32
|
-
* front-end supplies is how an expression becomes source
|
|
32
|
+
* front-end supplies is how an expression becomes source, `genExpr`, which also
|
|
33
33
|
* compiles any JSX or `` html`` `` nested inside it.
|
|
34
34
|
*/
|
|
35
35
|
export declare function buildIR(node: t.JSXElement | t.JSXFragment, used?: Set<string>, onNested?: NestedHook): IRNode;
|
|
@@ -107,14 +107,14 @@ export function isReactiveExpr(node) {
|
|
|
107
107
|
}
|
|
108
108
|
/**
|
|
109
109
|
* Build IR from a JSX node. The builder is shared (lower/jsx.ts); what this
|
|
110
|
-
* front-end supplies is how an expression becomes source
|
|
110
|
+
* front-end supplies is how an expression becomes source, `genExpr`, which also
|
|
111
111
|
* compiles any JSX or `` html`` `` nested inside it.
|
|
112
112
|
*/
|
|
113
113
|
export function buildIR(node, used = new Set(), onNested) {
|
|
114
114
|
const ir = buildJsxIR(node, {
|
|
115
115
|
code: (n) =>
|
|
116
116
|
// A member-expression tag (`<ns.Foo/>`) is not an Expression, so it cannot go
|
|
117
|
-
// through the nested-JSX compile
|
|
117
|
+
// through the nested-JSX compile: it only ever needs printing.
|
|
118
118
|
n.type === 'JSXMemberExpression'
|
|
119
119
|
? gen(n)
|
|
120
120
|
: genExpr(n, used, onNested),
|
|
@@ -215,7 +215,7 @@ var INTRINSICS = {
|
|
|
215
215
|
$store: { export: "store", module: "@fluixi/reactive/store", returns: "store-handle" },
|
|
216
216
|
$resource: { export: "resource", module: REACTIVE_MODULE, returns: "resource-handle" },
|
|
217
217
|
// No short runtime form for these yet, so the intrinsic stands for the `create*`
|
|
218
|
-
// name. Still worth having
|
|
218
|
+
// name. Still worth having: no import to write, and when a shorter form is
|
|
219
219
|
// designed, the change is this line rather than a compiler pass.
|
|
220
220
|
$selector: { export: "createSelector", module: REACTIVE_MODULE, returns: "memo-accessor" },
|
|
221
221
|
$deferred: { export: "createDeferred", module: REACTIVE_MODULE, returns: "memo-accessor" },
|
|
@@ -1003,7 +1003,7 @@ var Lowerer = class {
|
|
|
1003
1003
|
}
|
|
1004
1004
|
];
|
|
1005
1005
|
}
|
|
1006
|
-
/** A plain attribute (incl. lit `?bool`, mixed values)
|
|
1006
|
+
/** A plain attribute (incl. lit `?bool`, mixed values), old `mkProp` behavior. */
|
|
1007
1007
|
plainAttr(a) {
|
|
1008
1008
|
const v = a.value;
|
|
1009
1009
|
let name = a.name;
|
|
@@ -1480,7 +1480,7 @@ function buildIR(node, used = /* @__PURE__ */ new Set(), onNested) {
|
|
|
1480
1480
|
const ir = buildJsxIR(node, {
|
|
1481
1481
|
code: (n) => (
|
|
1482
1482
|
// A member-expression tag (`<ns.Foo/>`) is not an Expression, so it cannot go
|
|
1483
|
-
// through the nested-JSX compile
|
|
1483
|
+
// through the nested-JSX compile: it only ever needs printing.
|
|
1484
1484
|
n.type === "JSXMemberExpression" ? gen2(n) : genExpr(n, used, onNested)
|
|
1485
1485
|
),
|
|
1486
1486
|
used
|