@fluixi/compiler 1.0.0-alpha.84 → 1.0.0-alpha.86

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.
Files changed (168) hide show
  1. package/dist/analyze/expr-shape.d.cts +2 -2
  2. package/dist/analyze/expr-shape.d.ts +2 -2
  3. package/dist/analyze/expr-shape.js +1 -1
  4. package/dist/analyze/intrinsics.cjs +1 -1
  5. package/dist/analyze/intrinsics.d.cts +7 -7
  6. package/dist/analyze/intrinsics.d.ts +7 -7
  7. package/dist/analyze/intrinsics.d.ts.map +1 -1
  8. package/dist/analyze/intrinsics.js +3 -3
  9. package/dist/analyze/intrinsics.mjs +1 -1
  10. package/dist/analyze/props-destructure.d.cts +3 -3
  11. package/dist/analyze/props-destructure.d.ts +3 -3
  12. package/dist/analyze/props-destructure.d.ts.map +1 -1
  13. package/dist/analyze/props-destructure.js +4 -4
  14. package/dist/analyze/reactive-bindings.cjs +1 -1
  15. package/dist/analyze/reactive-bindings.d.cts +1 -1
  16. package/dist/analyze/reactive-bindings.d.ts +1 -1
  17. package/dist/analyze/reactive-bindings.js +2 -2
  18. package/dist/analyze/reactive-bindings.mjs +1 -1
  19. package/dist/analyze/reactive-expr.d.cts +4 -4
  20. package/dist/analyze/reactive-expr.d.ts +4 -4
  21. package/dist/analyze/reactive-expr.d.ts.map +1 -1
  22. package/dist/analyze/reactive-expr.js +2 -2
  23. package/dist/analyze/static-graph.cjs +2 -2
  24. package/dist/analyze/static-graph.d.cts +1 -1
  25. package/dist/analyze/static-graph.d.ts +1 -1
  26. package/dist/analyze/static-graph.d.ts.map +1 -1
  27. package/dist/analyze/static-graph.js +11 -11
  28. package/dist/analyze/static-graph.mjs +2 -2
  29. package/dist/{babel-NRW4EFTG.mjs → babel-EFKUQT45.mjs} +6 -6
  30. package/dist/{chunk-R2VHAZAX.mjs → chunk-D3ZN6JUI.mjs} +1 -1
  31. package/dist/{chunk-FSSWUXUR.mjs → chunk-DREDGBKD.mjs} +1 -1
  32. package/dist/{chunk-MJV3UXIL.mjs → chunk-H6UK4N32.mjs} +2 -2
  33. package/dist/{chunk-EZR7NZOY.mjs → chunk-LOFOPSDV.mjs} +3 -3
  34. package/dist/{chunk-3YKZ4GNH.mjs → chunk-SYNSZIB2.mjs} +1 -1
  35. package/dist/codegen/backends/imperative.cjs +1 -1
  36. package/dist/codegen/backends/imperative.d.cts +1 -1
  37. package/dist/codegen/backends/imperative.d.ts +1 -1
  38. package/dist/codegen/backends/imperative.js +12 -12
  39. package/dist/codegen/backends/imperative.mjs +1 -1
  40. package/dist/codegen/contract.d.cts +2 -2
  41. package/dist/codegen/contract.d.ts +2 -2
  42. package/dist/codegen/contract.js +2 -2
  43. package/dist/codegen/partial-template.d.cts +4 -4
  44. package/dist/codegen/partial-template.d.ts +4 -4
  45. package/dist/codegen/partial-template.js +0 -0
  46. package/dist/codegen/serialize-static.d.cts +3 -3
  47. package/dist/codegen/serialize-static.d.ts +3 -3
  48. package/dist/codegen/serialize-static.js +6 -6
  49. package/dist/frontend/babel/build-ir-lit.cjs +3 -3
  50. package/dist/frontend/babel/build-ir-lit.d.cts +2 -2
  51. package/dist/frontend/babel/build-ir-lit.d.ts +2 -2
  52. package/dist/frontend/babel/build-ir-lit.mjs +3 -3
  53. package/dist/frontend/babel/build-ir.cjs +3 -3
  54. package/dist/frontend/babel/build-ir.d.cts +2 -2
  55. package/dist/frontend/babel/build-ir.d.ts +2 -2
  56. package/dist/frontend/babel/build-ir.js +2 -2
  57. package/dist/frontend/babel/build-ir.mjs +3 -3
  58. package/dist/frontend/babel/index.cjs +5 -5
  59. package/dist/frontend/babel/index.d.cts +1 -1
  60. package/dist/frontend/babel/index.d.ts +1 -1
  61. package/dist/frontend/babel/index.js +1 -1
  62. package/dist/frontend/babel/index.mjs +5 -5
  63. package/dist/frontend/babel/lower-template.cjs +3 -3
  64. package/dist/frontend/babel/lower-template.d.cts +1 -1
  65. package/dist/frontend/babel/lower-template.d.ts +1 -1
  66. package/dist/frontend/babel/lower-template.js +2 -2
  67. package/dist/frontend/babel/lower-template.mjs +3 -3
  68. package/dist/frontend/babel/plugin.cjs +4 -4
  69. package/dist/frontend/babel/plugin.d.cts +5 -5
  70. package/dist/frontend/babel/plugin.d.ts +5 -5
  71. package/dist/frontend/babel/plugin.d.ts.map +1 -1
  72. package/dist/frontend/babel/plugin.js +14 -14
  73. package/dist/frontend/babel/plugin.mjs +4 -4
  74. package/dist/index.cjs +5 -5
  75. package/dist/index.d.cts +1 -1
  76. package/dist/index.d.ts +1 -1
  77. package/dist/index.js +4 -4
  78. package/dist/index.mjs +5 -5
  79. package/dist/integrations.cjs +12 -8
  80. package/dist/integrations.d.cts +9 -9
  81. package/dist/integrations.d.ts +9 -9
  82. package/dist/integrations.d.ts.map +1 -1
  83. package/dist/integrations.js +29 -8
  84. package/dist/integrations.mjs +15 -11
  85. package/dist/ir/nodes.d.cts +6 -6
  86. package/dist/ir/nodes.d.ts +6 -6
  87. package/dist/lower/compile-template.cjs +3 -3
  88. package/dist/lower/compile-template.d.cts +3 -3
  89. package/dist/lower/compile-template.d.ts +3 -3
  90. package/dist/lower/compile-template.js +1 -1
  91. package/dist/lower/compile-template.mjs +3 -3
  92. package/dist/lower/jsx.d.cts +1 -1
  93. package/dist/lower/jsx.d.ts +1 -1
  94. package/dist/lower/jsx.js +4 -4
  95. package/dist/lower/template.cjs +2 -2
  96. package/dist/lower/template.d.cts +3 -3
  97. package/dist/lower/template.d.ts +3 -3
  98. package/dist/lower/template.d.ts.map +1 -1
  99. package/dist/lower/template.js +7 -7
  100. package/dist/lower/template.mjs +2 -2
  101. package/dist/lower/text.d.cts +2 -2
  102. package/dist/lower/text.d.ts +2 -2
  103. package/dist/lower/text.d.ts.map +1 -1
  104. package/dist/lower/text.js +2 -2
  105. package/dist/optimize/analyze-static.d.cts +2 -2
  106. package/dist/optimize/analyze-static.d.ts +2 -2
  107. package/dist/optimize/analyze-static.js +2 -2
  108. package/dist/optimize/collapse-strategies.d.cts +3 -3
  109. package/dist/optimize/collapse-strategies.d.ts +3 -3
  110. package/dist/options.d.cts +2 -2
  111. package/dist/options.d.ts +2 -2
  112. package/dist/resolve/builtins.cjs +1 -1
  113. package/dist/resolve/builtins.d.cts +8 -8
  114. package/dist/resolve/builtins.d.ts +8 -8
  115. package/dist/resolve/builtins.d.ts.map +1 -1
  116. package/dist/resolve/builtins.js +4 -4
  117. package/dist/resolve/builtins.mjs +1 -1
  118. package/dist/resolve/component-globals.cjs +3 -3
  119. package/dist/resolve/component-globals.d.cts +5 -5
  120. package/dist/resolve/component-globals.d.ts +5 -5
  121. package/dist/resolve/component-globals.js +10 -10
  122. package/dist/resolve/component-globals.mjs +3 -3
  123. package/dist/resolve/component-resolver.d.cts +3 -3
  124. package/dist/resolve/component-resolver.d.ts +3 -3
  125. package/dist/resolve/component-resolver.d.ts.map +1 -1
  126. package/dist/resolve/component-resolver.js +3 -3
  127. package/dist/resolve/load-directive.d.cts +5 -5
  128. package/dist/resolve/load-directive.d.ts +5 -5
  129. package/dist/resolve/load-directive.js +6 -6
  130. package/dist/resolve/resolve-ir.d.cts +6 -6
  131. package/dist/resolve/resolve-ir.d.ts +6 -6
  132. package/dist/resolve/resolve-ir.d.ts.map +1 -1
  133. package/dist/resolve/resolve-ir.js +1 -1
  134. package/dist/resolve/write-globals.cjs +3 -3
  135. package/dist/resolve/write-globals.js +2 -2
  136. package/dist/resolve/write-globals.mjs +3 -3
  137. package/dist/{server-fns-4ZXN6DYU.mjs → server-fns-7I2C3D5P.mjs} +4 -4
  138. package/dist/{server-functions-V6D6DRIA.mjs → server-functions-GMKMN3D7.mjs} +3 -3
  139. package/dist/transform/bindings.d.cts +1 -1
  140. package/dist/transform/bindings.d.ts +1 -1
  141. package/dist/transform/bindings.js +1 -1
  142. package/dist/transform/index.cjs +3 -3
  143. package/dist/transform/index.mjs +3 -3
  144. package/dist/transform/intrinsics.cjs +1 -1
  145. package/dist/transform/intrinsics.js +1 -1
  146. package/dist/transform/intrinsics.mjs +1 -1
  147. package/dist/transform/props.d.cts +1 -1
  148. package/dist/transform/props.d.ts +1 -1
  149. package/dist/transform/props.d.ts.map +1 -1
  150. package/dist/transform/props.js +4 -4
  151. package/dist/transform/server-fn-id.d.cts +1 -1
  152. package/dist/transform/server-fn-id.d.ts +1 -1
  153. package/dist/transform/server-fn-id.js +2 -2
  154. package/dist/transform/server-fns.js +3 -3
  155. package/dist/transform/source-locations.cjs +1 -1
  156. package/dist/transform/source-locations.d.cts +1 -1
  157. package/dist/transform/source-locations.d.ts +1 -1
  158. package/dist/transform/source-locations.js +5 -5
  159. package/dist/transform/source-locations.mjs +1 -1
  160. package/dist/transform/templates.cjs +2 -2
  161. package/dist/transform/templates.d.cts +2 -2
  162. package/dist/transform/templates.d.ts +2 -2
  163. package/dist/transform/templates.d.ts.map +1 -1
  164. package/dist/transform/templates.js +7 -7
  165. package/dist/transform/templates.mjs +2 -2
  166. package/dist/{transform-BT4MMASR.mjs → transform-CRVH2C2I.mjs} +5 -5
  167. package/dist/tsconfig.lib.tsbuildinfo +1 -1
  168. package/package.json +3 -3
@@ -34,7 +34,7 @@ var INTRINSICS = {
34
34
  $store: { export: "store", module: "@fluixi/reactive/store", returns: "store-handle" },
35
35
  $resource: { export: "resource", module: REACTIVE_MODULE, returns: "resource-handle" },
36
36
  // No short runtime form for these yet, so the intrinsic stands for the `create*`
37
- // name. Still worth having no import to write and when a shorter form is
37
+ // name. Still worth having: no import to write, and when a shorter form is
38
38
  // designed, the change is this line rather than a compiler pass.
39
39
  $selector: { export: "createSelector", module: REACTIVE_MODULE, returns: "memo-accessor" },
40
40
  $deferred: { export: "createDeferred", module: REACTIVE_MODULE, returns: "memo-accessor" },
@@ -5,7 +5,7 @@
5
5
  * → const [count, setCount] = createSignal(0); + the import
6
6
  *
7
7
  * Only the callee is rewritten, so arguments keep the author's text and the span stays
8
- * put `$signal(0)` and `createSignal(0)` map to the same place. Imports are collected
8
+ * put: `$signal(0)` and `createSignal(0)` map to the same place. Imports are collected
9
9
  * from what the module actually used, so a file with one `$signal` gets one import.
10
10
  *
11
11
  * A module that binds `$signal` itself keeps its own meaning and is reported instead;
@@ -7,7 +7,7 @@ var INTRINSICS = {
7
7
  $store: { export: "store", module: "@fluixi/reactive/store", returns: "store-handle" },
8
8
  $resource: { export: "resource", module: REACTIVE_MODULE, returns: "resource-handle" },
9
9
  // No short runtime form for these yet, so the intrinsic stands for the `create*`
10
- // name. Still worth having no import to write and when a shorter form is
10
+ // name. Still worth having: no import to write, and when a shorter form is
11
11
  // designed, the change is this line rather than a compiler pass.
12
12
  $selector: { export: "createSelector", module: REACTIVE_MODULE, returns: "memo-accessor" },
13
13
  $deferred: { export: "createDeferred", module: REACTIVE_MODULE, returns: "memo-accessor" },
@@ -31,7 +31,7 @@ export interface PropsEdit {
31
31
  export interface PropsEditsResult {
32
32
  edits: PropsEdit[];
33
33
  diagnostics: PropsDiagnostic[];
34
- /** Runtime symbols the emitted code needs `splitProps`, when a pattern had a rest. */
34
+ /** Runtime symbols the emitted code needs: `splitProps`, when a pattern had a rest. */
35
35
  used: Set<string>;
36
36
  }
37
37
  /**
@@ -31,7 +31,7 @@ export interface PropsEdit {
31
31
  export interface PropsEditsResult {
32
32
  edits: PropsEdit[];
33
33
  diagnostics: PropsDiagnostic[];
34
- /** Runtime symbols the emitted code needs `splitProps`, when a pattern had a rest. */
34
+ /** Runtime symbols the emitted code needs: `splitProps`, when a pattern had a rest. */
35
35
  used: Set<string>;
36
36
  }
37
37
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/transform/props.ts"],"names":[],"mappings":"AAaA,OAAO,WAAW,MAAM,cAAc,CAAC;AACvC,OAAO,EAAqC,KAAK,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAU1G,MAAM,WAAW,eAAe;IAC9B,uCAAuC;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,eAAe,CAAC;IACxB,gCAAgC;IAChC,OA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E,eAAe,CAAC;IACxB,gCAAgC;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,oDAAoD;IACpD,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,qBAAqB;IACpC,yDAAyD;IACzD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,wFAAwF;IACxF,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,UAAU,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,CAAC;IAC5C,WAAW,EAAE,eAAe,EAAE,CAAC;IAC/B,mFAAmF;IACnF,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,qFAAqF;AACrF,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,WAAW,EAAE,eAAe,EAAE,CAAC;IAC/B,uFAAuF;IACvF,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CACnB;AA+ED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,qBAA0B,GAClC,gBAAgB,CAuFlB;AAgBD,qFAAqF;AACrF,wBAAgB,cAAc,CAC5B,IAAI,EAAE,MAAM,EACZ,QAAQ,SAAe,EACvB,OAAO,GAAE,qBAA0B,GAClC,oBAAoB,CA0BtB"}
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * `function Card({ title, size = 'md' })` becomes `function Card(props)` with `title`
5
5
  * rewritten to `props.title` wherever it's used, so the reads stay live. What can't be
6
- * rewritten is left alone and reported see analyze/props-destructure for the rules.
6
+ * rewritten is left alone and reported: see analyze/props-destructure for the rules.
7
7
  *
8
8
  * Source in, source out, spans spliced with magic-string, so the author's formatting
9
9
  * survives and the map comes out of the splice. It runs before templates are compiled,
@@ -133,7 +133,7 @@ export function collectPropsEdits(program, code, options = {}) {
133
133
  edits.push({ start: pattern.start, end: annotation?.start ?? pattern.end, code: parameter });
134
134
  // `...rest` becomes the splitProps call the author would have written. splitProps
135
135
  // carries the getters over instead of reading them, which is the whole reason a
136
- // plain rest can't be rewritten so this hands the job to the runtime helper that
136
+ // plain rest can't be rewritten: so this hands the job to the runtime helper that
137
137
  // does it properly rather than refusing the pattern.
138
138
  if (plan.rest) {
139
139
  const keys = plan.rest.keys.map((k) => JSON.stringify(k)).join(', ');
@@ -170,7 +170,7 @@ export function collectPropsEdits(program, code, options = {}) {
170
170
  edits.push({ start: match.node.start, end: match.node.end, code: match.text });
171
171
  }
172
172
  // Say it in the AST too, not only in the text. Whether a hole is wired reactively
173
- // is decided from the expression's shape, and a bare identifier is not reactive
173
+ // is decided from the expression's shape, and a bare identifier is not reactive ,
174
174
  // so leaving the node as an Identifier emits `props.text` read once, which is the
175
175
  // bug this whole pass exists to remove. A member read is reactive, which is what
176
176
  // the emitted code now is.
@@ -207,7 +207,7 @@ export function transformProps(code, filename = 'module.tsx', options = {}) {
207
207
  else
208
208
  source.overwrite(e.start, e.end, e.code);
209
209
  }
210
- // Standalone, there's no prologue to join, so the import goes in here unless the
210
+ // Standalone, there's no prologue to join, so the import goes in here, unless the
211
211
  // module already has the name bound.
212
212
  if (used.has('splitProps') && !moduleBindings(ast.program).has('splitProps')) {
213
213
  source.prepend(`import { splitProps } from ${JSON.stringify(options.runtimeModule ?? '@fluixi/dom')};\n`);
@@ -2,7 +2,7 @@
2
2
  * The id a server function is registered and called by.
3
3
  *
4
4
  * Client stub and server registration are produced by separate builds of the
5
- * same file, so this has to agree across them exactly same hash, same
5
+ * same file, so this has to agree across them exactly, same hash, same
6
6
  * relative path, same index. Shared rather than duplicated for that reason.
7
7
  */
8
8
  export declare function hash(s: string): string;
@@ -2,7 +2,7 @@
2
2
  * The id a server function is registered and called by.
3
3
  *
4
4
  * Client stub and server registration are produced by separate builds of the
5
- * same file, so this has to agree across them exactly same hash, same
5
+ * same file, so this has to agree across them exactly, same hash, same
6
6
  * relative path, same index. Shared rather than duplicated for that reason.
7
7
  */
8
8
  export declare function hash(s: string): string;
@@ -2,10 +2,10 @@
2
2
  * The id a server function is registered and called by.
3
3
  *
4
4
  * Client stub and server registration are produced by separate builds of the
5
- * same file, so this has to agree across them exactly same hash, same
5
+ * same file, so this has to agree across them exactly, same hash, same
6
6
  * relative path, same index. Shared rather than duplicated for that reason.
7
7
  */
8
- // djb2 tiny, stable, dependency-free. Hex, so the id is a valid identifier suffix.
8
+ // djb2: tiny, stable, dependency-free. Hex, so the id is a valid identifier suffix.
9
9
  export function hash(s) {
10
10
  let h = 5381;
11
11
  for (let i = 0; i < s.length; i++)
@@ -1,5 +1,5 @@
1
1
  /**
2
- * `"use server"` a function carrying the directive runs only on the server and
2
+ * `"use server"`: a function carrying the directive runs only on the server and
3
3
  * is callable from the client over RPC.
4
4
  *
5
5
  * const getUser = async (id) => { 'use server'; return db.users.find(id); };
@@ -32,7 +32,7 @@ function directive(node) {
32
32
  return null;
33
33
  }
34
34
  /**
35
- * Server functions in source order, not descending into one already found a
35
+ * Server functions in source order, not descending into one already found, a
36
36
  * nested `"use server"` belongs to the body that is about to be replaced or
37
37
  * shipped whole, exactly as the babel visitor's `path.skip()` decided.
38
38
  */
@@ -76,7 +76,7 @@ export function transformServerFns(code, options) {
76
76
  const id = serverFnId(options.filename, options.root, index);
77
77
  const declaration = fn.type === 'FunctionDeclaration';
78
78
  if (!options.ssr) {
79
- // The body never reaches the client it is replaced, not emptied.
79
+ // The body never reaches the client: it is replaced, not emptied.
80
80
  const stub = `${helper}(${JSON.stringify(id)})`;
81
81
  out.overwrite(fn.start, fn.end, declaration ? `const ${fn.id.name} = ${stub};` : stub);
82
82
  return;
@@ -40,7 +40,7 @@ var INTRINSICS = {
40
40
  $store: { export: "store", module: "@fluixi/reactive/store", returns: "store-handle" },
41
41
  $resource: { export: "resource", module: REACTIVE_MODULE, returns: "resource-handle" },
42
42
  // No short runtime form for these yet, so the intrinsic stands for the `create*`
43
- // name. Still worth having no import to write and when a shorter form is
43
+ // name. Still worth having: no import to write, and when a shorter form is
44
44
  // designed, the change is this line rather than a compiler pass.
45
45
  $selector: { export: "createSelector", module: REACTIVE_MODULE, returns: "memo-accessor" },
46
46
  $deferred: { export: "createDeferred", module: REACTIVE_MODULE, returns: "memo-accessor" },
@@ -33,7 +33,7 @@ export declare const markHole: (accessor: string, line: number, column: number,
33
33
  *
34
34
  * The props object is built as getters, so nothing in it can carry a position of its own.
35
35
  * The marker takes the object and a name-to-position map, and hands the object straight
36
- * back devtools keeps the map, and a build without it passes the object through.
36
+ * back: devtools keeps the map, and a build without it passes the object through.
37
37
  */
38
38
  export declare const PROPS_MARKER = "__fx_props";
39
39
  /** `_({ get a() {…} }, {"a":[9,25]})`, or the object untouched when nothing is watching. */
@@ -33,7 +33,7 @@ export declare const markHole: (accessor: string, line: number, column: number,
33
33
  *
34
34
  * The props object is built as getters, so nothing in it can carry a position of its own.
35
35
  * The marker takes the object and a name-to-position map, and hands the object straight
36
- * back devtools keeps the map, and a build without it passes the object through.
36
+ * back: devtools keeps the map, and a build without it passes the object through.
37
37
  */
38
38
  export declare const PROPS_MARKER = "__fx_props";
39
39
  /** `_({ get a() {…} }, {"a":[9,25]})`, or the object untouched when nothing is watching. */
@@ -5,7 +5,7 @@
5
5
  * → globalThis.__fx_source?.("src/App.ts",1,14,"count"); const count = signal(0);
6
6
  *
7
7
  * A statement in front of the one that creates the node, not a wrapper round the call: the
8
- * call may already be being rewritten `$signal` becomes `signal` and two passes editing
8
+ * call may already be being rewritten: `$signal` becomes `signal`, and two passes editing
9
9
  * one span is a splice over a splice.
10
10
  *
11
11
  * A global rather than an import, so the author's modules do not each take a dependency on
@@ -13,7 +13,7 @@
13
13
  *
14
14
  * Positions come from the original source, before any pass moves anything.
15
15
  *
16
- * Development only, and one mark per statement the runtime keeps a single slot, so
16
+ * Development only, and one mark per statement: the runtime keeps a single slot, so
17
17
  * marking two calls in one statement would hand the first node the second's location.
18
18
  */
19
19
  import { INTRINSICS, isIntrinsicName } from '../analyze/intrinsics.js';
@@ -43,7 +43,7 @@ export const markHole = (accessor, line, column, name) => `(globalThis.${HOLE_MA
43
43
  *
44
44
  * The props object is built as getters, so nothing in it can carry a position of its own.
45
45
  * The marker takes the object and a name-to-position map, and hands the object straight
46
- * back devtools keeps the map, and a build without it passes the object through.
46
+ * back: devtools keeps the map, and a build without it passes the object through.
47
47
  */
48
48
  export const PROPS_MARKER = '__fx_props';
49
49
  /** `_({ get a() {…} }, {"a":[9,25]})`, or the object untouched when nothing is watching. */
@@ -149,7 +149,7 @@ export function collectSourceEdits(program, filename) {
149
149
  // template pass overwrites.
150
150
  //
151
151
  // Only through what wraps a declaration. Anything else above it is a block or an
152
- // argument list, and a statement appended there lands outside the grammar
152
+ // argument list, and a statement appended there lands outside the grammar ,
153
153
  // `function Page(){}` inside `it('…', () => { … })` ended up between the `}` and the
154
154
  // `)`, which is a syntax error in a file that compiled a moment earlier.
155
155
  let end = node.end;
@@ -201,7 +201,7 @@ export function collectSourceEdits(program, filename) {
201
201
  if (!statement)
202
202
  return;
203
203
  // `export const [cart] = createStore(…)` finds the declaration, which starts after the
204
- // keyword a mark there splits `export` from what it exports.
204
+ // keyword: a mark there splits `export` from what it exports.
205
205
  let start = statement.start;
206
206
  let end = statement.end;
207
207
  for (let i = index - 1; i >= 0; i--) {
@@ -7,7 +7,7 @@ var INTRINSICS = {
7
7
  $store: { export: "store", module: "@fluixi/reactive/store", returns: "store-handle" },
8
8
  $resource: { export: "resource", module: REACTIVE_MODULE, returns: "resource-handle" },
9
9
  // No short runtime form for these yet, so the intrinsic stands for the `create*`
10
- // name. Still worth having no import to write and when a shorter form is
10
+ // name. Still worth having: no import to write, and when a shorter form is
11
11
  // designed, the change is this line rather than a compiler pass.
12
12
  $selector: { export: "createSelector", module: REACTIVE_MODULE, returns: "memo-accessor" },
13
13
  $deferred: { export: "createDeferred", module: REACTIVE_MODULE, returns: "memo-accessor" },
@@ -482,7 +482,7 @@ var INTRINSICS = {
482
482
  $store: { export: "store", module: "@fluixi/reactive/store", returns: "store-handle" },
483
483
  $resource: { export: "resource", module: REACTIVE_MODULE, returns: "resource-handle" },
484
484
  // No short runtime form for these yet, so the intrinsic stands for the `create*`
485
- // name. Still worth having no import to write and when a shorter form is
485
+ // name. Still worth having: no import to write, and when a shorter form is
486
486
  // designed, the change is this line rather than a compiler pass.
487
487
  $selector: { export: "createSelector", module: REACTIVE_MODULE, returns: "memo-accessor" },
488
488
  $deferred: { export: "createDeferred", module: REACTIVE_MODULE, returns: "memo-accessor" },
@@ -1574,7 +1574,7 @@ var Lowerer = class {
1574
1574
  }
1575
1575
  ];
1576
1576
  }
1577
- /** A plain attribute (incl. lit `?bool`, mixed values) old `mkProp` behavior. */
1577
+ /** A plain attribute (incl. lit `?bool`, mixed values), old `mkProp` behavior. */
1578
1578
  plainAttr(a) {
1579
1579
  const v = a.value;
1580
1580
  let name = a.name;
@@ -37,7 +37,7 @@ export interface TransformOptions extends CompileTemplateOptions {
37
37
  */
38
38
  sourceRoot?: string;
39
39
  /**
40
- * Compile the `$` reactive intrinsics `$signal`, `$memo`, `$effect`, `$store` into
40
+ * Compile the `$` reactive intrinsics: `$signal`, `$memo`, `$effect`, `$store`, into
41
41
  * the runtime calls they stand for, importing what they need.
42
42
  * @default true
43
43
  */
@@ -63,7 +63,7 @@ export interface TransformResult {
63
63
  intrinsicDiagnostics?: IntrinsicDiagnostic[];
64
64
  /** `load:` directives that could not take effect, and why. */
65
65
  loadDiagnostics?: LoadDiagnostic[];
66
- /** Capitalised tags nothing supplies they compile to an undefined reference. */
66
+ /** Capitalised tags nothing supplies: they compile to an undefined reference. */
67
67
  unresolvedDiagnostics?: UnresolvedDiagnostic[];
68
68
  }
69
69
  export declare function transformTemplates(code: string, id: string, options?: TransformOptions): TransformResult | null;
@@ -37,7 +37,7 @@ export interface TransformOptions extends CompileTemplateOptions {
37
37
  */
38
38
  sourceRoot?: string;
39
39
  /**
40
- * Compile the `$` reactive intrinsics `$signal`, `$memo`, `$effect`, `$store` into
40
+ * Compile the `$` reactive intrinsics: `$signal`, `$memo`, `$effect`, `$store`, into
41
41
  * the runtime calls they stand for, importing what they need.
42
42
  * @default true
43
43
  */
@@ -63,7 +63,7 @@ export interface TransformResult {
63
63
  intrinsicDiagnostics?: IntrinsicDiagnostic[];
64
64
  /** `load:` directives that could not take effect, and why. */
65
65
  loadDiagnostics?: LoadDiagnostic[];
66
- /** Capitalised tags nothing supplies they compile to an undefined reference. */
66
+ /** Capitalised tags nothing supplies: they compile to an undefined reference. */
67
67
  unresolvedDiagnostics?: UnresolvedDiagnostic[];
68
68
  }
69
69
  export declare function transformTemplates(code: string, id: string, options?: TransformOptions): TransformResult | null;
@@ -1 +1 @@
1
- {"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../src/transform/templates.ts"],"names":[],"mappings":"AASA,OAAO,WAAW,MAAM,cAAc,CAAC;AAEvC,OAAO,EAAiB,KAAK,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAG1F,OAAO,KAAK,EAAqB,cAAc,EAAU,MAAM,gBAAgB,CAAC;AAWhF,OAAO,EAAqB,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AACrE,OAAO,EAA2C,KAAK,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAoBpG,MAAM,WAAW,gBAAiB,SAAQ,sBAAsB;IAC9D;;;;OAIG;IACH,MAAM,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,MAAM,CAAC;IAChC,8DAA8D;IAC9D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,mFAAmF;IACnF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,8EAA8E;IAC9E,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;;;OAMG;IACH,gBAA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qB,GAC7B,eAAe,GAAG,IAAI,CAiNxB"}
@@ -25,7 +25,7 @@ import { collectSourceEdits, mayHaveReactiveCall } from './source-locations.js';
25
25
  import { mayHaveIntrinsic } from '../analyze/intrinsics.js';
26
26
  import { declaredNames } from '../analyze/reactive-bindings.js';
27
27
  import { DOM_CONTROL_FLOW, CORE_CONTROL_FLOW, ROUTER_COMPONENTS } from '../resolve/builtins.js';
28
- // Which builtin comes from which module is published by resolve/builtins.ts
28
+ // Which builtin comes from which module is published by resolve/builtins.ts ,
29
29
  // the same lists the resolve pass and the TS plugin read. Restating them here is
30
30
  // how `Await` ended up imported from the dom runtime, which does not export it.
31
31
  const CONTROL_FLOW = new Set(DOM_CONTROL_FLOW);
@@ -56,7 +56,7 @@ const isJsx = (node) => node.type === 'JSXElement' || node.type === 'JSXFragment
56
56
  /**
57
57
  * A JSX node the transform compiles on its own.
58
58
  *
59
- * A direct child `<li>` in `<ul><li/></ul>` is not one: the builder recurses
59
+ * A direct child: `<li>` in `<ul><li/></ul>`: is not one: the builder recurses
60
60
  * into it, and compiling it separately would splice its output into the middle of
61
61
  * its parent's. JSX reached through an expression or an attribute value *is* one,
62
62
  * because the builder asks for that expression as source text and needs it
@@ -88,7 +88,7 @@ function outermost(list) {
88
88
  * Apply edits to a slice of the source.
89
89
  *
90
90
  * Only the outermost ones: a contained edit was already folded into its
91
- * container's emitted code, and applying both would splice it twice the second
91
+ * container's emitted code, and applying both would splice it twice, the second
92
92
  * write landing at an offset the first has already moved.
93
93
  */
94
94
  function slice(code, start, end, edits) {
@@ -131,7 +131,7 @@ function bindHole(code, expr, edits, keepPosition = false) {
131
131
  *
132
132
  * Hoisted names deliberately do not use the backend's `_tmpl$N` namespace. Roots
133
133
  * are emitted innermost first and spliced into their parent, so by the time the
134
- * outer one is renamed its code already contains hoisted names and with a
134
+ * outer one is renamed its code already contains hoisted names, and with a
135
135
  * shared prefix the rename rewrites those too, pointing two templates at one
136
136
  * string. A separate prefix makes the two impossible to confuse.
137
137
  */
@@ -186,7 +186,7 @@ function collectNeeds(node, out) {
186
186
  * chunk splits like any other.
187
187
  *
188
188
  * Only when the name is used **exclusively as a tag**. JSX element names are
189
- * `JSXIdentifier`, so a component used only in markup has zero `Identifier` references
189
+ * `JSXIdentifier`, so a component used only in markup has zero `Identifier` references ,
190
190
  * which makes the check exact rather than a guess. Anything else (passed to a function,
191
191
  * re-exported, `Chart.displayName`) keeps its import and its warning: replacing the real
192
192
  * binding with a lazy wrapper would change what those sites see.
@@ -221,7 +221,7 @@ function hasNamespaceImport(program, name) {
221
221
  }
222
222
  return false;
223
223
  }
224
- /** Whether `name` is referenced as a value anywhere a tag alone does not count. */
224
+ /** Whether `name` is referenced as a value anywhere, a tag alone does not count. */
225
225
  function usedAsValue(program, name, specifier) {
226
226
  let seen = false;
227
227
  walk(program, (node) => {
@@ -338,7 +338,7 @@ export function transformTemplates(code, id, options = {}) {
338
338
  const sources = options.sourceLocations === true
339
339
  ? collectSourceEdits(ast.program, sourceName)
340
340
  : { edits: [], marked: 0 };
341
- // Nothing to emit still returns a result when there's something to say a shadowed
341
+ // Nothing to emit still returns a result when there's something to say, a shadowed
342
342
  // intrinsic is a diagnostic even though the code comes back untouched.
343
343
  const silent = found.length === 0 &&
344
344
  props.edits.length === 0 &&
@@ -1520,7 +1520,7 @@ var INTRINSICS = {
1520
1520
  $store: { export: "store", module: "@fluixi/reactive/store", returns: "store-handle" },
1521
1521
  $resource: { export: "resource", module: REACTIVE_MODULE, returns: "resource-handle" },
1522
1522
  // No short runtime form for these yet, so the intrinsic stands for the `create*`
1523
- // name. Still worth having no import to write and when a shorter form is
1523
+ // name. Still worth having: no import to write, and when a shorter form is
1524
1524
  // designed, the change is this line rather than a compiler pass.
1525
1525
  $selector: { export: "createSelector", module: REACTIVE_MODULE, returns: "memo-accessor" },
1526
1526
  $deferred: { export: "createDeferred", module: REACTIVE_MODULE, returns: "memo-accessor" },
@@ -2614,7 +2614,7 @@ var Lowerer = class {
2614
2614
  }
2615
2615
  ];
2616
2616
  }
2617
- /** A plain attribute (incl. lit `?bool`, mixed values) old `mkProp` behavior. */
2617
+ /** A plain attribute (incl. lit `?bool`, mixed values), old `mkProp` behavior. */
2618
2618
  plainAttr(a) {
2619
2619
  const v = a.value;
2620
2620
  let name = a.name;
@@ -1,4 +1,4 @@
1
- /*! @fluixi/compiler v1.0.0-alpha.84 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
1
+ /*! @fluixi/compiler v1.0.0-alpha.86 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
2
2
  import {
3
3
  analyzeStatic,
4
4
  buildJsxIR,
@@ -14,7 +14,7 @@ import {
14
14
  resolveComponentSources,
15
15
  resolveReactiveBindings,
16
16
  shapeOf
17
- } from "./chunk-EZR7NZOY.mjs";
17
+ } from "./chunk-LOFOPSDV.mjs";
18
18
  import {
19
19
  CORE_CONTROL_FLOW,
20
20
  DOM_CONTROL_FLOW,
@@ -23,11 +23,11 @@ import {
23
23
  createComponentResolver,
24
24
  isIntrinsicName,
25
25
  mayHaveIntrinsic
26
- } from "./chunk-MJV3UXIL.mjs";
26
+ } from "./chunk-H6UK4N32.mjs";
27
27
  import {
28
28
  MagicString
29
- } from "./chunk-R2VHAZAX.mjs";
30
- import "./chunk-3YKZ4GNH.mjs";
29
+ } from "./chunk-D3ZN6JUI.mjs";
30
+ import "./chunk-SYNSZIB2.mjs";
31
31
 
32
32
  // src/transform/templates.ts
33
33
  import { parse as parse2 } from "@babel/parser";