@fluixi/compiler 1.0.0-alpha.83 → 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.
Files changed (241) hide show
  1. package/dist/analyze/expr-shape.cjs +62 -1
  2. package/dist/analyze/expr-shape.d.cts +14 -0
  3. package/dist/analyze/expr-shape.d.ts +2 -2
  4. package/dist/analyze/expr-shape.js +1 -1
  5. package/dist/analyze/expr-shape.mjs +41 -1
  6. package/dist/analyze/intrinsics.cjs +80 -1
  7. package/dist/analyze/intrinsics.d.cts +66 -0
  8. package/dist/analyze/intrinsics.d.ts +7 -7
  9. package/dist/analyze/intrinsics.d.ts.map +1 -1
  10. package/dist/analyze/intrinsics.js +3 -3
  11. package/dist/analyze/intrinsics.mjs +59 -1
  12. package/dist/analyze/paren.cjs +134 -0
  13. package/dist/analyze/paren.d.cts +23 -0
  14. package/dist/analyze/paren.d.ts +24 -0
  15. package/dist/analyze/paren.d.ts.map +1 -0
  16. package/dist/analyze/paren.js +168 -0
  17. package/dist/analyze/paren.mjs +113 -0
  18. package/dist/analyze/props-destructure.cjs +226 -1
  19. package/dist/analyze/props-destructure.d.cts +83 -0
  20. package/dist/analyze/props-destructure.d.ts +3 -3
  21. package/dist/analyze/props-destructure.d.ts.map +1 -1
  22. package/dist/analyze/props-destructure.js +4 -4
  23. package/dist/analyze/props-destructure.mjs +205 -1
  24. package/dist/analyze/reactive-bindings.cjs +190 -1
  25. package/dist/analyze/reactive-bindings.d.cts +42 -0
  26. package/dist/analyze/reactive-bindings.d.ts +1 -1
  27. package/dist/analyze/reactive-bindings.js +2 -2
  28. package/dist/analyze/reactive-bindings.mjs +167 -1
  29. package/dist/analyze/reactive-expr.cjs +38 -1
  30. package/dist/analyze/reactive-expr.d.cts +38 -0
  31. package/dist/analyze/reactive-expr.d.ts +4 -4
  32. package/dist/analyze/reactive-expr.d.ts.map +1 -1
  33. package/dist/analyze/reactive-expr.js +2 -2
  34. package/dist/analyze/reactive-expr.mjs +17 -1
  35. package/dist/analyze/static-graph.cjs +811 -1
  36. package/dist/analyze/static-graph.d.cts +102 -0
  37. package/dist/analyze/static-graph.d.ts +1 -1
  38. package/dist/analyze/static-graph.d.ts.map +1 -1
  39. package/dist/analyze/static-graph.js +11 -11
  40. package/dist/analyze/static-graph.mjs +793 -1
  41. package/dist/babel-TGY76XJ7.mjs +636 -0
  42. package/dist/chunk-4PLHS2FP.mjs +158 -0
  43. package/dist/chunk-6DB5FXS4.mjs +1718 -0
  44. package/dist/chunk-F74GFKSL.mjs +16 -0
  45. package/dist/chunk-G6QC2WRJ.mjs +11 -0
  46. package/dist/chunk-RUDJDZAA.mjs +1078 -0
  47. package/dist/codegen/backend.cjs +18 -1
  48. package/dist/codegen/backend.d.cts +35 -0
  49. package/dist/codegen/backends/imperative.cjs +542 -1
  50. package/dist/codegen/backends/imperative.d.cts +11 -0
  51. package/dist/codegen/backends/imperative.d.ts +1 -1
  52. package/dist/codegen/backends/imperative.d.ts.map +1 -1
  53. package/dist/codegen/backends/imperative.js +24 -20
  54. package/dist/codegen/backends/imperative.mjs +519 -1
  55. package/dist/codegen/contract.cjs +52 -1
  56. package/dist/codegen/contract.d.cts +24 -0
  57. package/dist/codegen/contract.d.ts +2 -2
  58. package/dist/codegen/contract.js +2 -2
  59. package/dist/codegen/contract.mjs +31 -1
  60. package/dist/codegen/partial-template.cjs +176 -1
  61. package/dist/codegen/partial-template.d.cts +61 -0
  62. package/dist/codegen/partial-template.d.ts +4 -4
  63. package/dist/codegen/partial-template.js +0 -0
  64. package/dist/codegen/partial-template.mjs +153 -1
  65. package/dist/codegen/serialize-static.cjs +125 -1
  66. package/dist/codegen/serialize-static.d.cts +38 -0
  67. package/dist/codegen/serialize-static.d.ts +3 -3
  68. package/dist/codegen/serialize-static.js +6 -6
  69. package/dist/codegen/serialize-static.mjs +104 -1
  70. package/dist/frontend/babel/build-ir-lit.cjs +1509 -1
  71. package/dist/frontend/babel/build-ir-lit.d.cts +26 -0
  72. package/dist/frontend/babel/build-ir-lit.d.ts +2 -2
  73. package/dist/frontend/babel/build-ir-lit.mjs +1478 -1
  74. package/dist/frontend/babel/build-ir.cjs +1524 -1
  75. package/dist/frontend/babel/build-ir.d.cts +35 -0
  76. package/dist/frontend/babel/build-ir.d.ts +2 -2
  77. package/dist/frontend/babel/build-ir.js +2 -2
  78. package/dist/frontend/babel/build-ir.mjs +1495 -1
  79. package/dist/frontend/babel/index.cjs +2186 -1
  80. package/dist/frontend/babel/index.d.cts +33 -0
  81. package/dist/frontend/babel/index.d.ts +1 -1
  82. package/dist/frontend/babel/index.js +1 -1
  83. package/dist/frontend/babel/index.mjs +2156 -1
  84. package/dist/frontend/babel/lower-template.cjs +1507 -1
  85. package/dist/frontend/babel/lower-template.d.cts +23 -0
  86. package/dist/frontend/babel/lower-template.d.ts +1 -1
  87. package/dist/frontend/babel/lower-template.js +2 -2
  88. package/dist/frontend/babel/lower-template.mjs +1478 -1
  89. package/dist/frontend/babel/plugin.cjs +2132 -1
  90. package/dist/frontend/babel/plugin.d.cts +95 -0
  91. package/dist/frontend/babel/plugin.d.ts +5 -5
  92. package/dist/frontend/babel/plugin.d.ts.map +1 -1
  93. package/dist/frontend/babel/plugin.js +14 -14
  94. package/dist/frontend/babel/plugin.mjs +2103 -1
  95. package/dist/frontend/babel/server-functions.cjs +110 -1
  96. package/dist/frontend/babel/server-functions.d.cts +10 -0
  97. package/dist/frontend/babel/server-functions.mjs +89 -1
  98. package/dist/frontend/babel/types.cjs +18 -1
  99. package/dist/frontend/babel/types.d.cts +33 -0
  100. package/dist/frontend/types.cjs +18 -1
  101. package/dist/frontend/types.d.cts +25 -0
  102. package/dist/frontend/vocabulary.cjs +98 -0
  103. package/dist/frontend/vocabulary.d.cts +79 -0
  104. package/dist/frontend/vocabulary.d.ts +80 -0
  105. package/dist/frontend/vocabulary.d.ts.map +1 -0
  106. package/dist/frontend/vocabulary.js +124 -0
  107. package/dist/frontend/vocabulary.mjs +77 -0
  108. package/dist/index.cjs +1595 -14
  109. package/dist/index.d.cts +27 -0
  110. package/dist/index.d.ts +1 -1
  111. package/dist/index.js +4 -4
  112. package/dist/index.mjs +1575 -14
  113. package/dist/integrations.cjs +4312 -26
  114. package/dist/integrations.d.cts +215 -0
  115. package/dist/integrations.d.ts +9 -9
  116. package/dist/integrations.d.ts.map +1 -1
  117. package/dist/integrations.js +29 -8
  118. package/dist/integrations.mjs +536 -18
  119. package/dist/ir/nodes.cjs +18 -1
  120. package/dist/ir/nodes.d.cts +168 -0
  121. package/dist/ir/nodes.d.ts +6 -6
  122. package/dist/lower/compile-template.cjs +1356 -1
  123. package/dist/lower/compile-template.d.cts +69 -0
  124. package/dist/lower/compile-template.d.ts +3 -3
  125. package/dist/lower/compile-template.js +1 -1
  126. package/dist/lower/compile-template.mjs +1336 -1
  127. package/dist/lower/jsx.cjs +529 -1
  128. package/dist/lower/jsx.d.cts +25 -0
  129. package/dist/lower/jsx.d.ts +1 -1
  130. package/dist/lower/jsx.d.ts.map +1 -1
  131. package/dist/lower/jsx.js +6 -5
  132. package/dist/lower/jsx.mjs +506 -1
  133. package/dist/lower/template.cjs +1061 -1
  134. package/dist/lower/template.d.cts +53 -0
  135. package/dist/lower/template.d.ts +3 -3
  136. package/dist/lower/template.d.ts.map +1 -1
  137. package/dist/lower/template.js +12 -11
  138. package/dist/lower/template.mjs +1042 -1
  139. package/dist/lower/text.cjs +42 -1
  140. package/dist/lower/text.d.cts +10 -0
  141. package/dist/lower/text.d.ts +2 -2
  142. package/dist/lower/text.d.ts.map +1 -1
  143. package/dist/lower/text.js +2 -2
  144. package/dist/lower/text.mjs +21 -1
  145. package/dist/optimize/analyze-static.cjs +112 -1
  146. package/dist/optimize/analyze-static.d.cts +39 -0
  147. package/dist/optimize/analyze-static.d.ts +2 -2
  148. package/dist/optimize/analyze-static.js +2 -2
  149. package/dist/optimize/analyze-static.mjs +91 -1
  150. package/dist/optimize/collapse-strategies.cjs +90 -1
  151. package/dist/optimize/collapse-strategies.d.cts +30 -0
  152. package/dist/optimize/collapse-strategies.d.ts +3 -3
  153. package/dist/optimize/collapse-strategies.mjs +67 -1
  154. package/dist/options.cjs +33 -1
  155. package/dist/options.d.cts +39 -0
  156. package/dist/options.d.ts +2 -2
  157. package/dist/options.mjs +12 -1
  158. package/dist/resolve/builtins.cjs +73 -1
  159. package/dist/resolve/builtins.d.cts +68 -0
  160. package/dist/resolve/builtins.d.ts +8 -8
  161. package/dist/resolve/builtins.d.ts.map +1 -1
  162. package/dist/resolve/builtins.js +4 -4
  163. package/dist/resolve/builtins.mjs +53 -1
  164. package/dist/resolve/component-globals.cjs +234 -14
  165. package/dist/resolve/component-globals.d.cts +80 -0
  166. package/dist/resolve/component-globals.d.ts +5 -5
  167. package/dist/resolve/component-globals.js +10 -10
  168. package/dist/resolve/component-globals.mjs +211 -14
  169. package/dist/resolve/component-resolver.cjs +80 -1
  170. package/dist/resolve/component-resolver.d.cts +68 -0
  171. package/dist/resolve/component-resolver.d.ts +3 -3
  172. package/dist/resolve/component-resolver.d.ts.map +1 -1
  173. package/dist/resolve/component-resolver.js +3 -3
  174. package/dist/resolve/component-resolver.mjs +59 -1
  175. package/dist/resolve/load-directive.cjs +93 -1
  176. package/dist/resolve/load-directive.d.cts +53 -0
  177. package/dist/resolve/load-directive.d.ts +5 -5
  178. package/dist/resolve/load-directive.js +6 -6
  179. package/dist/resolve/load-directive.mjs +72 -1
  180. package/dist/resolve/resolve-ir.cjs +108 -1
  181. package/dist/resolve/resolve-ir.d.cts +53 -0
  182. package/dist/resolve/resolve-ir.d.ts +6 -6
  183. package/dist/resolve/resolve-ir.d.ts.map +1 -1
  184. package/dist/resolve/resolve-ir.js +1 -1
  185. package/dist/resolve/resolve-ir.mjs +85 -1
  186. package/dist/resolve/write-globals.cjs +319 -14
  187. package/dist/resolve/write-globals.d.cts +30 -0
  188. package/dist/resolve/write-globals.js +2 -2
  189. package/dist/resolve/write-globals.mjs +298 -14
  190. package/dist/server-fns-ZYWQTSZU.mjs +78 -0
  191. package/dist/server-functions-PCERFA7A.mjs +82 -0
  192. package/dist/transform/bindings.cjs +71 -1
  193. package/dist/transform/bindings.d.cts +16 -0
  194. package/dist/transform/bindings.d.ts +1 -1
  195. package/dist/transform/bindings.js +1 -1
  196. package/dist/transform/bindings.mjs +50 -1
  197. package/dist/transform/index.cjs +2732 -8
  198. package/dist/transform/index.d.cts +15 -0
  199. package/dist/transform/index.mjs +3773 -17
  200. package/dist/transform/intrinsics.cjs +216 -3
  201. package/dist/transform/intrinsics.d.cts +21 -0
  202. package/dist/transform/intrinsics.js +1 -1
  203. package/dist/transform/intrinsics.mjs +193 -3
  204. package/dist/transform/props.cjs +441 -3
  205. package/dist/transform/props.d.cts +45 -0
  206. package/dist/transform/props.d.ts +1 -1
  207. package/dist/transform/props.d.ts.map +1 -1
  208. package/dist/transform/props.js +4 -4
  209. package/dist/transform/props.mjs +1482 -12
  210. package/dist/transform/server-fn-id.cjs +35 -1
  211. package/dist/transform/server-fn-id.d.cts +9 -0
  212. package/dist/transform/server-fn-id.d.ts +1 -1
  213. package/dist/transform/server-fn-id.js +2 -2
  214. package/dist/transform/server-fn-id.mjs +14 -1
  215. package/dist/transform/server-fns.cjs +114 -2
  216. package/dist/transform/server-fns.d.cts +12 -0
  217. package/dist/transform/server-fns.js +3 -3
  218. package/dist/transform/server-fns.mjs +1155 -11
  219. package/dist/transform/source-locations.cjs +330 -1
  220. package/dist/transform/source-locations.d.cts +43 -0
  221. package/dist/transform/source-locations.d.ts +1 -1
  222. package/dist/transform/source-locations.js +5 -5
  223. package/dist/transform/source-locations.mjs +307 -1
  224. package/dist/transform/templates.cjs +2701 -7
  225. package/dist/transform/templates.d.cts +69 -0
  226. package/dist/transform/templates.d.ts +2 -2
  227. package/dist/transform/templates.d.ts.map +1 -1
  228. package/dist/transform/templates.js +7 -7
  229. package/dist/transform/templates.mjs +3743 -16
  230. package/dist/transform-RWDTQUF5.mjs +893 -0
  231. package/dist/tsconfig.lib.tsbuildinfo +1 -1
  232. package/package.json +6 -5
  233. package/dist/babel-VXKH6MRQ.mjs +0 -1
  234. package/dist/chunk-3SAEGOMQ.mjs +0 -1
  235. package/dist/chunk-5KMMN5QP.mjs +0 -1
  236. package/dist/chunk-IBRM4W7I.mjs +0 -10
  237. package/dist/chunk-OHHZCYIQ.mjs +0 -1
  238. package/dist/chunk-YKZ54NVE.mjs +0 -1
  239. package/dist/server-fns-6QM243HC.mjs +0 -2
  240. package/dist/server-functions-E3LKCZ4R.mjs +0 -1
  241. package/dist/transform-C4ZXRVGP.mjs +0 -8
@@ -1 +1,59 @@
1
- var f=r=>"components"in r;function m(r,e){return r.replace(/\$(\d+)/g,(l,i)=>e[Number(i)]??l)}function d(r,e){return typeof e=="string"?{module:e,export:r}:e}function R(r=[]){let e=new Map,l=[],i=[];for(let o of r){if(!f(o)){i.push(o);continue}for(let[n,s]of Object.entries(o.components)){let t=d(n,s),c=e.get(n);if(c&&c.module!==t.module){let u=l.find(a=>a.name===n);u?u.modules.push(t.module):l.push({name:n,modules:[c.module,t.module]});continue}e.set(n,t)}}let p=new Map;return{resolve:o=>{if(p.has(o))return p.get(o);let n=e.get(o);if(!n)for(let s of i){let t=o.match(new RegExp(s.match.source,s.match.flags.replace("g","")));if(t){n={module:m(s.module,t),export:s.export?m(s.export,t):o};break}}return p.set(o,n),n},names:()=>[...e.keys()],conflicts:()=>l}}export{R as createComponentResolver};
1
+ // src/resolve/component-resolver.ts
2
+ var isMapRule = (rule) => "components" in rule;
3
+ function substitute(template, match) {
4
+ return template.replace(/\$(\d+)/g, (whole, index) => {
5
+ const group = match[Number(index)];
6
+ return group ?? whole;
7
+ });
8
+ }
9
+ function normalise(name, entry) {
10
+ return typeof entry === "string" ? { module: entry, export: name } : entry;
11
+ }
12
+ function createComponentResolver(rules = []) {
13
+ const exact = /* @__PURE__ */ new Map();
14
+ const conflicts = [];
15
+ const patterns = [];
16
+ for (const rule of rules) {
17
+ if (!isMapRule(rule)) {
18
+ patterns.push(rule);
19
+ continue;
20
+ }
21
+ for (const [name, entry] of Object.entries(rule.components)) {
22
+ const resolved = normalise(name, entry);
23
+ const existing = exact.get(name);
24
+ if (existing && existing.module !== resolved.module) {
25
+ const conflict = conflicts.find((c) => c.name === name);
26
+ if (conflict) conflict.modules.push(resolved.module);
27
+ else conflicts.push({ name, modules: [existing.module, resolved.module] });
28
+ continue;
29
+ }
30
+ exact.set(name, resolved);
31
+ }
32
+ }
33
+ const cache = /* @__PURE__ */ new Map();
34
+ const resolve = (name) => {
35
+ if (cache.has(name)) return cache.get(name);
36
+ let result = exact.get(name);
37
+ if (!result) {
38
+ for (const rule of patterns) {
39
+ const match = name.match(new RegExp(rule.match.source, rule.match.flags.replace("g", "")));
40
+ if (!match) continue;
41
+ result = {
42
+ module: substitute(rule.module, match),
43
+ export: rule.export ? substitute(rule.export, match) : name
44
+ };
45
+ break;
46
+ }
47
+ }
48
+ cache.set(name, result);
49
+ return result;
50
+ };
51
+ return {
52
+ resolve,
53
+ names: () => [...exact.keys()],
54
+ conflicts: () => conflicts
55
+ };
56
+ }
57
+ export {
58
+ createComponentResolver
59
+ };
@@ -1 +1,93 @@
1
- "use strict";var o=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var k=(e,n)=>{for(var t in n)o(e,t,{get:n[t],enumerable:!0})},p=(e,n,t,a)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of g(n))!u.call(e,r)&&r!==t&&o(e,r,{get:()=>n[r],enumerable:!(a=l(n,r))||a.enumerable});return e};var w=e=>p(o({},"__esModule",{value:!0}),e);var y={};k(y,{DEFAULT_INTERACTION_EVENTS:()=>c,EAGER:()=>d,LoadDirectiveError:()=>i,isDeferred:()=>m,isLoadDirective:()=>v,parseLoadDirective:()=>f,strategyKey:()=>x});module.exports=w(y);var d={kind:"eager"},c=["pointerdown","focusin","keydown"],s=new Set(["eager","idle","visible","interaction","media","never"]),i=class extends Error{};function v(e){return e.startsWith("load:")}function f(e,n){let t=e.slice(5);if(!s.has(t))throw new i(`Unknown load strategy 'load:${t}'. Expected one of ${[...s].join(", ")}.`);switch(t){case"eager":return d;case"idle":return{kind:"idle"};case"never":return{kind:"never"};case"visible":return n?{kind:"visible",rootMargin:n}:{kind:"visible"};case"interaction":return{kind:"interaction",events:n?h(n):[...c]};case"media":if(!n)throw new i(`'load:media' needs a query, e.g. load:media="(min-width: 1024px)".`);return{kind:"media",query:n};default:throw new i(`Unhandled load strategy '${t}'.`)}}function h(e){let n=e.split(/[\s,]+/).map(t=>t.trim()).filter(Boolean);if(n.length===0)throw new i("'load:interaction' was given no event names.");return n}function m(e){return e.kind!=="eager"&&e.kind!=="never"}function x(e){switch(e.kind){case"visible":return`visible:${e.rootMargin??""}`;case"interaction":return`interaction:${[...e.events].sort().join(",")}`;case"media":return`media:${e.query}`;default:return e.kind}}
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/resolve/load-directive.ts
21
+ var load_directive_exports = {};
22
+ __export(load_directive_exports, {
23
+ DEFAULT_INTERACTION_EVENTS: () => DEFAULT_INTERACTION_EVENTS,
24
+ EAGER: () => EAGER,
25
+ LoadDirectiveError: () => LoadDirectiveError,
26
+ isDeferred: () => isDeferred,
27
+ isLoadDirective: () => isLoadDirective,
28
+ parseLoadDirective: () => parseLoadDirective,
29
+ strategyKey: () => strategyKey
30
+ });
31
+ module.exports = __toCommonJS(load_directive_exports);
32
+ var EAGER = { kind: "eager" };
33
+ var DEFAULT_INTERACTION_EVENTS = ["pointerdown", "focusin", "keydown"];
34
+ var STRATEGIES = /* @__PURE__ */ new Set(["eager", "idle", "visible", "interaction", "media", "never"]);
35
+ var LoadDirectiveError = class extends Error {
36
+ };
37
+ function isLoadDirective(name) {
38
+ return name.startsWith("load:");
39
+ }
40
+ function parseLoadDirective(name, value) {
41
+ const strategy = name.slice("load:".length);
42
+ if (!STRATEGIES.has(strategy)) {
43
+ throw new LoadDirectiveError(
44
+ `Unknown load strategy 'load:${strategy}'. Expected one of ${[...STRATEGIES].join(", ")}.`
45
+ );
46
+ }
47
+ switch (strategy) {
48
+ case "eager":
49
+ return EAGER;
50
+ case "idle":
51
+ return { kind: "idle" };
52
+ case "never":
53
+ return { kind: "never" };
54
+ case "visible":
55
+ return value ? { kind: "visible", rootMargin: value } : { kind: "visible" };
56
+ case "interaction":
57
+ return {
58
+ kind: "interaction",
59
+ events: value ? splitEvents(value) : [...DEFAULT_INTERACTION_EVENTS]
60
+ };
61
+ case "media":
62
+ if (!value) {
63
+ throw new LoadDirectiveError(
64
+ `'load:media' needs a query, e.g. load:media="(min-width: 1024px)".`
65
+ );
66
+ }
67
+ return { kind: "media", query: value };
68
+ default:
69
+ throw new LoadDirectiveError(`Unhandled load strategy '${strategy}'.`);
70
+ }
71
+ }
72
+ function splitEvents(value) {
73
+ const events = value.split(/[\s,]+/).map((e) => e.trim()).filter(Boolean);
74
+ if (events.length === 0) {
75
+ throw new LoadDirectiveError(`'load:interaction' was given no event names.`);
76
+ }
77
+ return events;
78
+ }
79
+ function isDeferred(strategy) {
80
+ return strategy.kind !== "eager" && strategy.kind !== "never";
81
+ }
82
+ function strategyKey(strategy) {
83
+ switch (strategy.kind) {
84
+ case "visible":
85
+ return `visible:${strategy.rootMargin ?? ""}`;
86
+ case "interaction":
87
+ return `interaction:${[...strategy.events].sort().join(",")}`;
88
+ case "media":
89
+ return `media:${strategy.query}`;
90
+ default:
91
+ return strategy.kind;
92
+ }
93
+ }
@@ -0,0 +1,53 @@
1
+ /**
2
+ * The `load:` directive: when a component's code is fetched.
3
+ *
4
+ * Resolution decides *where* a component comes from; this decides *when*. They are
5
+ * separate because they vary independently: the location of `<RevenueChart>` is the
6
+ * same everywhere and belongs in config, while whether this particular usage should
7
+ * wait for the viewport is a property of the usage. Fusing them, `<Chart lazy="./Chart">`
8
+ *: was rejected for exactly that reason.
9
+ *
10
+ * `load:` joins the existing `use:`/`prop:`/`attr:`/`bool:` namespace, so it cannot
11
+ * collide with a real prop and the parser already has a directive taxonomy to hang it on.
12
+ *
13
+ * One parser for both frontends. `load:visible` is already a valid `JSXNamespacedName`,
14
+ * so JSX needs no parser change, and the html`` path produces a `LoadDirective` node ,
15
+ * but both funnel through {@link parseLoadDirective}, so the two syntaxes cannot drift.
16
+ */
17
+ /** When a component's module is fetched. */
18
+ export type IRLoadStrategy = {
19
+ kind: 'eager';
20
+ } | {
21
+ kind: 'idle';
22
+ } | {
23
+ kind: 'visible';
24
+ rootMargin?: string;
25
+ } | {
26
+ kind: 'interaction';
27
+ events: string[];
28
+ } | {
29
+ kind: 'media';
30
+ query: string;
31
+ } | {
32
+ kind: 'never';
33
+ };
34
+ /** Everything is eager unless a directive says otherwise. */
35
+ export declare const EAGER: IRLoadStrategy;
36
+ /** Events that trigger an `interaction` load when none are named. */
37
+ export declare const DEFAULT_INTERACTION_EVENTS: readonly ["pointerdown", "focusin", "keydown"];
38
+ export declare class LoadDirectiveError extends Error {
39
+ }
40
+ /** True for an attribute name in the `load:` namespace. */
41
+ export declare function isLoadDirective(name: string): boolean;
42
+ /**
43
+ * Parse `load:<strategy>` plus its optional value into a strategy.
44
+ *
45
+ * `value` is the attribute's literal text: `load:visible="200px"`, or null for a bare
46
+ * directive. A `${…}` hole is rejected: the strategy has to be known at compile time
47
+ * because it decides how the module is emitted, and a runtime value cannot.
48
+ */
49
+ export declare function parseLoadDirective(name: string, value: string | null): IRLoadStrategy;
50
+ /** True when the strategy means "not in the parent chunk". */
51
+ export declare function isDeferred(strategy: IRLoadStrategy): boolean;
52
+ /** A stable key for grouping references that share a strategy. */
53
+ export declare function strategyKey(strategy: IRLoadStrategy): string;
@@ -1,17 +1,17 @@
1
1
  /**
2
- * The `load:` directive when a component's code is fetched.
2
+ * The `load:` directive: when a component's code is fetched.
3
3
  *
4
4
  * Resolution decides *where* a component comes from; this decides *when*. They are
5
5
  * separate because they vary independently: the location of `<RevenueChart>` is the
6
6
  * same everywhere and belongs in config, while whether this particular usage should
7
- * wait for the viewport is a property of the usage. Fusing them `<Chart lazy="./Chart">`
8
- * was rejected for exactly that reason.
7
+ * wait for the viewport is a property of the usage. Fusing them, `<Chart lazy="./Chart">`
8
+ *: was rejected for exactly that reason.
9
9
  *
10
10
  * `load:` joins the existing `use:`/`prop:`/`attr:`/`bool:` namespace, so it cannot
11
11
  * collide with a real prop and the parser already has a directive taxonomy to hang it on.
12
12
  *
13
13
  * One parser for both frontends. `load:visible` is already a valid `JSXNamespacedName`,
14
- * so JSX needs no parser change, and the html`` path produces a `LoadDirective` node
14
+ * so JSX needs no parser change, and the html`` path produces a `LoadDirective` node ,
15
15
  * but both funnel through {@link parseLoadDirective}, so the two syntaxes cannot drift.
16
16
  */
17
17
  /** When a component's module is fetched. */
@@ -42,7 +42,7 @@ export declare function isLoadDirective(name: string): boolean;
42
42
  /**
43
43
  * Parse `load:<strategy>` plus its optional value into a strategy.
44
44
  *
45
- * `value` is the attribute's literal text `load:visible="200px"` or null for a bare
45
+ * `value` is the attribute's literal text: `load:visible="200px"`, or null for a bare
46
46
  * directive. A `${…}` hole is rejected: the strategy has to be known at compile time
47
47
  * because it decides how the module is emitted, and a runtime value cannot.
48
48
  */
@@ -1,17 +1,17 @@
1
1
  /**
2
- * The `load:` directive when a component's code is fetched.
2
+ * The `load:` directive: when a component's code is fetched.
3
3
  *
4
4
  * Resolution decides *where* a component comes from; this decides *when*. They are
5
5
  * separate because they vary independently: the location of `<RevenueChart>` is the
6
6
  * same everywhere and belongs in config, while whether this particular usage should
7
- * wait for the viewport is a property of the usage. Fusing them `<Chart lazy="./Chart">`
8
- * was rejected for exactly that reason.
7
+ * wait for the viewport is a property of the usage. Fusing them, `<Chart lazy="./Chart">`
8
+ *: was rejected for exactly that reason.
9
9
  *
10
10
  * `load:` joins the existing `use:`/`prop:`/`attr:`/`bool:` namespace, so it cannot
11
11
  * collide with a real prop and the parser already has a directive taxonomy to hang it on.
12
12
  *
13
13
  * One parser for both frontends. `load:visible` is already a valid `JSXNamespacedName`,
14
- * so JSX needs no parser change, and the html`` path produces a `LoadDirective` node
14
+ * so JSX needs no parser change, and the html`` path produces a `LoadDirective` node ,
15
15
  * but both funnel through {@link parseLoadDirective}, so the two syntaxes cannot drift.
16
16
  */
17
17
  /** Everything is eager unless a directive says otherwise. */
@@ -28,7 +28,7 @@ export function isLoadDirective(name) {
28
28
  /**
29
29
  * Parse `load:<strategy>` plus its optional value into a strategy.
30
30
  *
31
- * `value` is the attribute's literal text `load:visible="200px"` or null for a bare
31
+ * `value` is the attribute's literal text: `load:visible="200px"`, or null for a bare
32
32
  * directive. A `${…}` hole is rejected: the strategy has to be known at compile time
33
33
  * because it decides how the module is emitted, and a runtime value cannot.
34
34
  */
@@ -46,7 +46,7 @@ export function parseLoadDirective(name, value) {
46
46
  return { kind: 'never' };
47
47
  case 'visible':
48
48
  // `load:visible="200px"` starts the fetch before the element reaches the
49
- // viewport, which is usually what you want arriving exactly on intersection
49
+ // viewport, which is usually what you want, arriving exactly on intersection
50
50
  // means the user waits for the network.
51
51
  return value ? { kind: 'visible', rootMargin: value } : { kind: 'visible' };
52
52
  case 'interaction':
@@ -1 +1,72 @@
1
- var o={kind:"eager"},a=["pointerdown","focusin","keydown"],r=new Set(["eager","idle","visible","interaction","media","never"]),i=class extends Error{};function d(e){return e.startsWith("load:")}function c(e,n){let t=e.slice(5);if(!r.has(t))throw new i(`Unknown load strategy 'load:${t}'. Expected one of ${[...r].join(", ")}.`);switch(t){case"eager":return o;case"idle":return{kind:"idle"};case"never":return{kind:"never"};case"visible":return n?{kind:"visible",rootMargin:n}:{kind:"visible"};case"interaction":return{kind:"interaction",events:n?s(n):[...a]};case"media":if(!n)throw new i(`'load:media' needs a query, e.g. load:media="(min-width: 1024px)".`);return{kind:"media",query:n};default:throw new i(`Unhandled load strategy '${t}'.`)}}function s(e){let n=e.split(/[\s,]+/).map(t=>t.trim()).filter(Boolean);if(n.length===0)throw new i("'load:interaction' was given no event names.");return n}function l(e){return e.kind!=="eager"&&e.kind!=="never"}function g(e){switch(e.kind){case"visible":return`visible:${e.rootMargin??""}`;case"interaction":return`interaction:${[...e.events].sort().join(",")}`;case"media":return`media:${e.query}`;default:return e.kind}}export{a as DEFAULT_INTERACTION_EVENTS,o as EAGER,i as LoadDirectiveError,l as isDeferred,d as isLoadDirective,c as parseLoadDirective,g as strategyKey};
1
+ // src/resolve/load-directive.ts
2
+ var EAGER = { kind: "eager" };
3
+ var DEFAULT_INTERACTION_EVENTS = ["pointerdown", "focusin", "keydown"];
4
+ var STRATEGIES = /* @__PURE__ */ new Set(["eager", "idle", "visible", "interaction", "media", "never"]);
5
+ var LoadDirectiveError = class extends Error {
6
+ };
7
+ function isLoadDirective(name) {
8
+ return name.startsWith("load:");
9
+ }
10
+ function parseLoadDirective(name, value) {
11
+ const strategy = name.slice("load:".length);
12
+ if (!STRATEGIES.has(strategy)) {
13
+ throw new LoadDirectiveError(
14
+ `Unknown load strategy 'load:${strategy}'. Expected one of ${[...STRATEGIES].join(", ")}.`
15
+ );
16
+ }
17
+ switch (strategy) {
18
+ case "eager":
19
+ return EAGER;
20
+ case "idle":
21
+ return { kind: "idle" };
22
+ case "never":
23
+ return { kind: "never" };
24
+ case "visible":
25
+ return value ? { kind: "visible", rootMargin: value } : { kind: "visible" };
26
+ case "interaction":
27
+ return {
28
+ kind: "interaction",
29
+ events: value ? splitEvents(value) : [...DEFAULT_INTERACTION_EVENTS]
30
+ };
31
+ case "media":
32
+ if (!value) {
33
+ throw new LoadDirectiveError(
34
+ `'load:media' needs a query, e.g. load:media="(min-width: 1024px)".`
35
+ );
36
+ }
37
+ return { kind: "media", query: value };
38
+ default:
39
+ throw new LoadDirectiveError(`Unhandled load strategy '${strategy}'.`);
40
+ }
41
+ }
42
+ function splitEvents(value) {
43
+ const events = value.split(/[\s,]+/).map((e) => e.trim()).filter(Boolean);
44
+ if (events.length === 0) {
45
+ throw new LoadDirectiveError(`'load:interaction' was given no event names.`);
46
+ }
47
+ return events;
48
+ }
49
+ function isDeferred(strategy) {
50
+ return strategy.kind !== "eager" && strategy.kind !== "never";
51
+ }
52
+ function strategyKey(strategy) {
53
+ switch (strategy.kind) {
54
+ case "visible":
55
+ return `visible:${strategy.rootMargin ?? ""}`;
56
+ case "interaction":
57
+ return `interaction:${[...strategy.events].sort().join(",")}`;
58
+ case "media":
59
+ return `media:${strategy.query}`;
60
+ default:
61
+ return strategy.kind;
62
+ }
63
+ }
64
+ export {
65
+ DEFAULT_INTERACTION_EVENTS,
66
+ EAGER,
67
+ LoadDirectiveError,
68
+ isDeferred,
69
+ isLoadDirective,
70
+ parseLoadDirective,
71
+ strategyKey
72
+ };
@@ -1 +1,108 @@
1
- "use strict";var c=Object.defineProperty;var M=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var I=Object.prototype.hasOwnProperty;var w=(n,e)=>{for(var i in e)c(n,i,{get:e[i],enumerable:!0})},N=(n,e,i,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of y(e))!I.call(n,o)&&o!==i&&c(n,o,{get:()=>e[o],enumerable:!(s=M(e,o))||s.enumerable});return n};var k=n=>N(c({},"__esModule",{value:!0}),n);var h={};w(h,{resolveComponentSources:()=>b,walk:()=>f});module.exports=k(h);var l=["Show","For","Index","Switch","Match","Portal","Dynamic","ErrorBoundary"],p=["Suspense","SuspenseList","Await"],a=["Router","Outlet","Redirect","Link"],L=[...l,...p,...a],m=new Set([...l,...p]);function S(n={}){let{controlFlowModule:e="@fluixi/dom",coreModule:i="@fluixi/core",routerModule:s="@fluixi/core/router"}=n,o={};for(let d of l)o[d]=e;for(let d of p)o[d]=i;for(let d of a)o[d]=s;return o}var R={kind:"eager"};function b(n,e={}){let{resolver:i,isBound:s,modules:o,strategyFor:d}=e,g=S(o),v=new Map,x=new Set,E=t=>{let{name:r}=t;if(!r||r.includes(".")||s?.(r))return;let u=O(r);if(!u){x.add(r);return}let C=u.origin==="builtin"&&m.has(r)?R:d?.(t)??R;t.source={...u,loading:C},v.set(r,t.source)},O=t=>{if(m.has(t))return{module:g[t],export:t,origin:"builtin"};let r=i?.resolve(t);if(r)return{module:r.module,export:r.export,origin:"rule"};if(a.includes(t))return{module:g[t],export:t,origin:"builtin"}};return f(n,t=>{t.kind==="component"&&E(t)}),{resolved:v,unresolved:[...x]}}function f(n,e){let i=Array.isArray(n)?n:[n];for(let s of i){e(s);let o=s.children;o&&f(o,e)}}
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/resolve/resolve-ir.ts
21
+ var resolve_ir_exports = {};
22
+ __export(resolve_ir_exports, {
23
+ resolveComponentSources: () => resolveComponentSources,
24
+ walk: () => walk
25
+ });
26
+ module.exports = __toCommonJS(resolve_ir_exports);
27
+
28
+ // src/resolve/builtins.ts
29
+ var DOM_CONTROL_FLOW = [
30
+ "Show",
31
+ "For",
32
+ "Index",
33
+ "Switch",
34
+ "Match",
35
+ "Portal",
36
+ "Dynamic",
37
+ "ErrorBoundary"
38
+ ];
39
+ var CORE_CONTROL_FLOW = ["Suspense", "SuspenseList", "Await"];
40
+ var ROUTER_COMPONENTS = ["Router", "Outlet", "Redirect", "Link"];
41
+ var BUILTIN_COMPONENTS = [
42
+ ...DOM_CONTROL_FLOW,
43
+ ...CORE_CONTROL_FLOW,
44
+ ...ROUTER_COMPONENTS
45
+ ];
46
+ var RESERVED_COMPONENTS = /* @__PURE__ */ new Set([
47
+ ...DOM_CONTROL_FLOW,
48
+ ...CORE_CONTROL_FLOW
49
+ ]);
50
+ function builtinComponentMap(modules = {}) {
51
+ const {
52
+ controlFlowModule = "@fluixi/dom",
53
+ coreModule = "@fluixi/core",
54
+ routerModule = "@fluixi/core/router"
55
+ } = modules;
56
+ const map = {};
57
+ for (const name of DOM_CONTROL_FLOW) map[name] = controlFlowModule;
58
+ for (const name of CORE_CONTROL_FLOW) map[name] = coreModule;
59
+ for (const name of ROUTER_COMPONENTS) map[name] = routerModule;
60
+ return map;
61
+ }
62
+
63
+ // src/resolve/load-directive.ts
64
+ var EAGER = { kind: "eager" };
65
+
66
+ // src/resolve/resolve-ir.ts
67
+ function resolveComponentSources(root, options = {}) {
68
+ const { resolver, isBound, modules, strategyFor } = options;
69
+ const builtins = builtinComponentMap(modules);
70
+ const resolved = /* @__PURE__ */ new Map();
71
+ const unresolved = /* @__PURE__ */ new Set();
72
+ const annotate = (node) => {
73
+ const { name } = node;
74
+ if (!name || name.includes(".")) return;
75
+ if (isBound?.(name)) return;
76
+ const source = sourceFor(name);
77
+ if (!source) {
78
+ unresolved.add(name);
79
+ return;
80
+ }
81
+ const loading = source.origin === "builtin" && RESERVED_COMPONENTS.has(name) ? EAGER : strategyFor?.(node) ?? EAGER;
82
+ node.source = { ...source, loading };
83
+ resolved.set(name, node.source);
84
+ };
85
+ const sourceFor = (name) => {
86
+ if (RESERVED_COMPONENTS.has(name)) {
87
+ return { module: builtins[name], export: name, origin: "builtin" };
88
+ }
89
+ const rule = resolver?.resolve(name);
90
+ if (rule) return { module: rule.module, export: rule.export, origin: "rule" };
91
+ if (ROUTER_COMPONENTS.includes(name)) {
92
+ return { module: builtins[name], export: name, origin: "builtin" };
93
+ }
94
+ return void 0;
95
+ };
96
+ walk(root, (node) => {
97
+ if (node.kind === "component") annotate(node);
98
+ });
99
+ return { resolved, unresolved: [...unresolved] };
100
+ }
101
+ function walk(root, visit) {
102
+ const nodes = Array.isArray(root) ? root : [root];
103
+ for (const node of nodes) {
104
+ visit(node);
105
+ const children = node.children;
106
+ if (children) walk(children, visit);
107
+ }
108
+ }
@@ -0,0 +1,53 @@
1
+ /**
2
+ * The resolve pass: annotate component references in the IR with where they come from.
3
+ *
4
+ * Runs between the frontends and the optimizer, so every later pass reads provenance off
5
+ * the node instead of re-deriving it. Nothing here emits code, the pass only records a
6
+ * decision, which is what lets the same answer drive import injection, chunk grouping,
7
+ * hint planning and diagnostics without any of them agreeing by coincidence.
8
+ *
9
+ * Two suppliers, in precedence order:
10
+ *
11
+ * 1. **Control flow** (`Show`, `For`, `Switch`, …), the name selects a lowering, so a
12
+ * rule cannot re-point it. Recorded as `builtin` so a later pass can tell the
13
+ * difference between "configured here" and "fixed by the compiler".
14
+ * 2. **Configured rules**, then the **router built-ins**. Router components are only an
15
+ * import, so a project's own `Link` wins; see `builtins.ts`.
16
+ *
17
+ * A name bound in the file is not resolved at all: the author's import always wins, and
18
+ * the caller supplies those bindings via `isBound`.
19
+ */
20
+ import type { IRNode, IRComponent, IRComponentSource } from '../ir/nodes.cjs';
21
+ import type { ComponentResolver } from './component-resolver.cjs';
22
+ import { builtinComponentMap } from './builtins.cjs';
23
+ import { type IRLoadStrategy } from './load-directive.cjs';
24
+ export interface ResolveOptions {
25
+ /** Rules configured for the project. Omit when the project configures none. */
26
+ resolver?: ComponentResolver;
27
+ /** True when the name already has a binding in the file, an import the author wrote. */
28
+ isBound?: (name: string) => boolean;
29
+ /** Module overrides, so `routerModule` and friends are honoured. */
30
+ modules?: Parameters<typeof builtinComponentMap>[0];
31
+ /**
32
+ * The `load:` strategy for a reference, when the frontend found one on the tag.
33
+ * Keyed by node so two usages of the same component can load differently, the
34
+ * whole reason timing lives at the usage site and location does not.
35
+ */
36
+ strategyFor?: (node: IRComponent) => IRLoadStrategy | undefined;
37
+ }
38
+ export interface ResolveReport {
39
+ /** Every reference the pass annotated, by name. */
40
+ resolved: Map<string, IRComponentSource>;
41
+ /**
42
+ * Capitalised tags nothing supplies and nothing binds.
43
+ *
44
+ * These compile to a reference to an identifier that does not exist, the build
45
+ * succeeds and the page throws at runtime: so they are the pass's most useful
46
+ * output for diagnostics.
47
+ */
48
+ unresolved: string[];
49
+ }
50
+ /** Annotate every component reference in `root`, returning what was decided. */
51
+ export declare function resolveComponentSources(root: IRNode | IRNode[], options?: ResolveOptions): ResolveReport;
52
+ /** Depth-first walk over every node that can contain children. */
53
+ export declare function walk(root: IRNode | IRNode[], visit: (node: IRNode) => void): void;
@@ -2,13 +2,13 @@
2
2
  * The resolve pass: annotate component references in the IR with where they come from.
3
3
  *
4
4
  * Runs between the frontends and the optimizer, so every later pass reads provenance off
5
- * the node instead of re-deriving it. Nothing here emits code the pass only records a
5
+ * the node instead of re-deriving it. Nothing here emits code, the pass only records a
6
6
  * decision, which is what lets the same answer drive import injection, chunk grouping,
7
7
  * hint planning and diagnostics without any of them agreeing by coincidence.
8
8
  *
9
9
  * Two suppliers, in precedence order:
10
10
  *
11
- * 1. **Control flow** (`Show`, `For`, `Switch`, …) the name selects a lowering, so a
11
+ * 1. **Control flow** (`Show`, `For`, `Switch`, …), the name selects a lowering, so a
12
12
  * rule cannot re-point it. Recorded as `builtin` so a later pass can tell the
13
13
  * difference between "configured here" and "fixed by the compiler".
14
14
  * 2. **Configured rules**, then the **router built-ins**. Router components are only an
@@ -24,13 +24,13 @@ import { type IRLoadStrategy } from './load-directive.js';
24
24
  export interface ResolveOptions {
25
25
  /** Rules configured for the project. Omit when the project configures none. */
26
26
  resolver?: ComponentResolver;
27
- /** True when the name already has a binding in the file an import the author wrote. */
27
+ /** True when the name already has a binding in the file, an import the author wrote. */
28
28
  isBound?: (name: string) => boolean;
29
29
  /** Module overrides, so `routerModule` and friends are honoured. */
30
30
  modules?: Parameters<typeof builtinComponentMap>[0];
31
31
  /**
32
32
  * The `load:` strategy for a reference, when the frontend found one on the tag.
33
- * Keyed by node so two usages of the same component can load differently the
33
+ * Keyed by node so two usages of the same component can load differently, the
34
34
  * whole reason timing lives at the usage site and location does not.
35
35
  */
36
36
  strategyFor?: (node: IRComponent) => IRLoadStrategy | undefined;
@@ -41,8 +41,8 @@ export interface ResolveReport {
41
41
  /**
42
42
  * Capitalised tags nothing supplies and nothing binds.
43
43
  *
44
- * These compile to a reference to an identifier that does not exist the build
45
- * succeeds and the page throws at runtime so they are the pass's most useful
44
+ * These compile to a reference to an identifier that does not exist, the build
45
+ * succeeds and the page throws at runtime: so they are the pass's most useful
46
46
  * output for diagnostics.
47
47
  */
48
48
  unresolved: string[];
@@ -1 +1 @@
1
- {"version":3,"file":"resolve-ir.d.ts","sourceRoot":"","sources":["../../src/resolve/resolve-ir.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAC7E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAA0C,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAC5F,OAAO,EAAS,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAEjE,MAAM,WAAW,cAAc;IAC7B,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,yFAAyF;IACzF,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;IACpC,oEAAoE;IACpE,OAAO,CAAC,EAAE,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC;IACpD;;;;OAIG;IACH,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,cAAc,GAAG,SAAS,CAAC;CACjE;AAED,MAAM,WAAW,aAAa;IAC5B,mDAAmD;IACnD,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;IACzC;;;;;;OAMG;IACH,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB;AAED,gFAAgF;AAChF,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,EACvB,OAAO,GAAE,cAAmB,GAC3B,aAAa,CA8Cf;AAED,kEAAkE;AAClE,wBAAgB,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAAG,IAAI,CAOjF"}
1
+ {"version":3,"file":"resolve-ir.d.ts","sourceRoot":"","sources":["../../src/resolve/resolve-ir.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAC7E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAA0C,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAC5F,OAAO,EAAS,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAEjE,MAAM,WAAW,cAAc;IAC7B,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,wFAAwF;IACxF,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;IACpC,oEAAoE;IACpE,OAAO,CAAC,EAAE,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC;IACpD;;;;OAIG;IACH,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,cAAc,GAAG,SAAS,CAAC;CACjE;AAED,MAAM,WAAW,aAAa;IAC5B,mDAAmD;IACnD,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;IACzC;;;;;;OAMG;IACH,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB;AAED,gFAAgF;AAChF,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,EACvB,OAAO,GAAE,cAAmB,GAC3B,aAAa,CA8Cf;AAED,kEAAkE;AAClE,wBAAgB,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAAG,IAAI,CAOjF"}
@@ -9,7 +9,7 @@ export function resolveComponentSources(root, options = {}) {
9
9
  const annotate = (node) => {
10
10
  const { name } = node;
11
11
  // A dotted path (`Ctx.Provider`) or a dynamic tag needs its root binding, which is
12
- // an ordinary expression the author wrote nothing to supply.
12
+ // an ordinary expression the author wrote: nothing to supply.
13
13
  if (!name || name.includes('.'))
14
14
  return;
15
15
  if (isBound?.(name))