@fluixi/compiler 1.0.0-alpha.82 → 1.0.0-alpha.84
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.cjs +62 -1
- package/dist/analyze/expr-shape.d.cts +14 -0
- package/dist/analyze/expr-shape.mjs +41 -1
- package/dist/analyze/intrinsics.cjs +80 -1
- package/dist/analyze/intrinsics.d.cts +66 -0
- package/dist/analyze/intrinsics.mjs +59 -1
- package/dist/analyze/paren.cjs +134 -0
- package/dist/analyze/paren.d.cts +23 -0
- package/dist/analyze/paren.d.ts +24 -0
- package/dist/analyze/paren.d.ts.map +1 -0
- package/dist/analyze/paren.js +168 -0
- package/dist/analyze/paren.mjs +113 -0
- package/dist/analyze/props-destructure.cjs +226 -1
- package/dist/analyze/props-destructure.d.cts +83 -0
- package/dist/analyze/props-destructure.mjs +205 -1
- package/dist/analyze/reactive-bindings.cjs +190 -1
- package/dist/analyze/reactive-bindings.d.cts +42 -0
- package/dist/analyze/reactive-bindings.mjs +167 -1
- package/dist/analyze/reactive-expr.cjs +38 -1
- package/dist/analyze/reactive-expr.d.cts +38 -0
- package/dist/analyze/reactive-expr.mjs +17 -1
- package/dist/analyze/static-graph.cjs +811 -0
- package/dist/analyze/static-graph.d.cts +102 -0
- package/dist/analyze/static-graph.d.ts +103 -0
- package/dist/analyze/static-graph.d.ts.map +1 -0
- package/dist/analyze/static-graph.js +869 -0
- package/dist/analyze/static-graph.mjs +793 -0
- package/dist/babel-NRW4EFTG.mjs +636 -0
- package/dist/chunk-3YKZ4GNH.mjs +11 -0
- package/dist/chunk-EZR7NZOY.mjs +1718 -0
- package/dist/chunk-FSSWUXUR.mjs +16 -0
- package/dist/chunk-MJV3UXIL.mjs +158 -0
- package/dist/chunk-R2VHAZAX.mjs +1078 -0
- package/dist/codegen/backend.cjs +18 -1
- package/dist/codegen/backend.d.cts +35 -0
- package/dist/codegen/backends/imperative.cjs +542 -1
- package/dist/codegen/backends/imperative.d.cts +11 -0
- package/dist/codegen/backends/imperative.d.ts.map +1 -1
- package/dist/codegen/backends/imperative.js +68 -13
- package/dist/codegen/backends/imperative.mjs +519 -1
- package/dist/codegen/contract.cjs +52 -1
- package/dist/codegen/contract.d.cts +24 -0
- package/dist/codegen/contract.mjs +31 -1
- package/dist/codegen/partial-template.cjs +176 -1
- package/dist/codegen/partial-template.d.cts +61 -0
- package/dist/codegen/partial-template.mjs +153 -1
- package/dist/codegen/serialize-static.cjs +125 -1
- package/dist/codegen/serialize-static.d.cts +38 -0
- package/dist/codegen/serialize-static.d.ts +16 -0
- package/dist/codegen/serialize-static.d.ts.map +1 -1
- package/dist/codegen/serialize-static.js +25 -0
- package/dist/codegen/serialize-static.mjs +104 -1
- package/dist/frontend/babel/build-ir-lit.cjs +1509 -1
- package/dist/frontend/babel/build-ir-lit.d.cts +26 -0
- package/dist/frontend/babel/build-ir-lit.mjs +1478 -1
- package/dist/frontend/babel/build-ir.cjs +1524 -1
- package/dist/frontend/babel/build-ir.d.cts +35 -0
- package/dist/frontend/babel/build-ir.mjs +1495 -1
- package/dist/frontend/babel/index.cjs +2186 -1
- package/dist/frontend/babel/index.d.cts +33 -0
- package/dist/frontend/babel/index.mjs +2156 -1
- package/dist/frontend/babel/lower-template.cjs +1507 -1
- package/dist/frontend/babel/lower-template.d.cts +23 -0
- package/dist/frontend/babel/lower-template.mjs +1478 -1
- package/dist/frontend/babel/plugin.cjs +2132 -1
- package/dist/frontend/babel/plugin.d.cts +95 -0
- package/dist/frontend/babel/plugin.mjs +2103 -1
- package/dist/frontend/babel/server-functions.cjs +110 -1
- package/dist/frontend/babel/server-functions.d.cts +10 -0
- package/dist/frontend/babel/server-functions.mjs +89 -1
- package/dist/frontend/babel/types.cjs +18 -1
- package/dist/frontend/babel/types.d.cts +33 -0
- package/dist/frontend/types.cjs +18 -1
- package/dist/frontend/types.d.cts +25 -0
- package/dist/frontend/vocabulary.cjs +98 -0
- package/dist/frontend/vocabulary.d.cts +79 -0
- package/dist/frontend/vocabulary.d.ts +80 -0
- package/dist/frontend/vocabulary.d.ts.map +1 -0
- package/dist/frontend/vocabulary.js +124 -0
- package/dist/frontend/vocabulary.mjs +77 -0
- package/dist/index.cjs +1594 -13
- package/dist/index.d.cts +27 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.mjs +1574 -13
- package/dist/integrations.cjs +4307 -25
- package/dist/integrations.d.cts +215 -0
- package/dist/integrations.d.ts +16 -0
- package/dist/integrations.d.ts.map +1 -1
- package/dist/integrations.js +21 -2
- package/dist/integrations.mjs +531 -17
- package/dist/ir/nodes.cjs +18 -1
- package/dist/ir/nodes.d.cts +168 -0
- package/dist/ir/nodes.d.ts +46 -0
- package/dist/ir/nodes.d.ts.map +1 -1
- package/dist/lower/compile-template.cjs +1356 -1
- package/dist/lower/compile-template.d.cts +69 -0
- package/dist/lower/compile-template.d.ts +12 -0
- package/dist/lower/compile-template.d.ts.map +1 -1
- package/dist/lower/compile-template.js +5 -1
- package/dist/lower/compile-template.mjs +1336 -1
- package/dist/lower/jsx.cjs +529 -1
- package/dist/lower/jsx.d.cts +25 -0
- package/dist/lower/jsx.d.ts +2 -0
- package/dist/lower/jsx.d.ts.map +1 -1
- package/dist/lower/jsx.js +27 -4
- package/dist/lower/jsx.mjs +506 -1
- package/dist/lower/template.cjs +1061 -1
- package/dist/lower/template.d.cts +53 -0
- package/dist/lower/template.d.ts +14 -1
- package/dist/lower/template.d.ts.map +1 -1
- package/dist/lower/template.js +106 -19
- package/dist/lower/template.mjs +1042 -1
- package/dist/lower/text.cjs +42 -1
- package/dist/lower/text.d.cts +10 -0
- package/dist/lower/text.mjs +21 -1
- package/dist/optimize/analyze-static.cjs +112 -1
- package/dist/optimize/analyze-static.d.cts +39 -0
- package/dist/optimize/analyze-static.mjs +91 -1
- package/dist/optimize/collapse-strategies.cjs +90 -1
- package/dist/optimize/collapse-strategies.d.cts +30 -0
- package/dist/optimize/collapse-strategies.mjs +67 -1
- package/dist/options.cjs +33 -1
- package/dist/options.d.cts +39 -0
- package/dist/options.mjs +12 -1
- package/dist/resolve/builtins.cjs +73 -1
- package/dist/resolve/builtins.d.cts +68 -0
- package/dist/resolve/builtins.mjs +53 -1
- package/dist/resolve/component-globals.cjs +233 -13
- package/dist/resolve/component-globals.d.cts +80 -0
- package/dist/resolve/component-globals.mjs +210 -13
- package/dist/resolve/component-resolver.cjs +80 -1
- package/dist/resolve/component-resolver.d.cts +68 -0
- package/dist/resolve/component-resolver.mjs +59 -1
- package/dist/resolve/load-directive.cjs +93 -1
- package/dist/resolve/load-directive.d.cts +53 -0
- package/dist/resolve/load-directive.mjs +72 -1
- package/dist/resolve/resolve-ir.cjs +108 -1
- package/dist/resolve/resolve-ir.d.cts +53 -0
- package/dist/resolve/resolve-ir.mjs +85 -1
- package/dist/resolve/write-globals.cjs +318 -13
- package/dist/resolve/write-globals.d.cts +30 -0
- package/dist/resolve/write-globals.mjs +297 -13
- package/dist/server-fns-4ZXN6DYU.mjs +78 -0
- package/dist/server-functions-V6D6DRIA.mjs +82 -0
- package/dist/transform/bindings.cjs +71 -1
- package/dist/transform/bindings.d.cts +16 -0
- package/dist/transform/bindings.mjs +50 -1
- package/dist/transform/index.cjs +2732 -8
- package/dist/transform/index.d.cts +15 -0
- package/dist/transform/index.mjs +3773 -17
- package/dist/transform/intrinsics.cjs +216 -3
- package/dist/transform/intrinsics.d.cts +21 -0
- package/dist/transform/intrinsics.mjs +193 -3
- package/dist/transform/props.cjs +441 -3
- package/dist/transform/props.d.cts +45 -0
- package/dist/transform/props.mjs +1482 -12
- package/dist/transform/server-fn-id.cjs +35 -1
- package/dist/transform/server-fn-id.d.cts +9 -0
- package/dist/transform/server-fn-id.mjs +14 -1
- package/dist/transform/server-fns.cjs +114 -2
- package/dist/transform/server-fns.d.cts +12 -0
- package/dist/transform/server-fns.mjs +1155 -11
- package/dist/transform/source-locations.cjs +330 -0
- package/dist/transform/source-locations.d.cts +43 -0
- package/dist/transform/source-locations.d.ts +44 -0
- package/dist/transform/source-locations.d.ts.map +1 -0
- package/dist/transform/source-locations.js +238 -0
- package/dist/transform/source-locations.mjs +307 -0
- package/dist/transform/templates.cjs +2701 -7
- package/dist/transform/templates.d.cts +69 -0
- package/dist/transform/templates.d.ts +12 -4
- package/dist/transform/templates.d.ts.map +1 -1
- package/dist/transform/templates.js +72 -7
- package/dist/transform/templates.mjs +3743 -16
- package/dist/transform-BT4MMASR.mjs +893 -0
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/package.json +6 -5
- package/dist/babel-4JUDAR2G.mjs +0 -1
- package/dist/chunk-3SAEGOMQ.mjs +0 -1
- package/dist/chunk-IBRM4W7I.mjs +0 -10
- package/dist/chunk-OHHZCYIQ.mjs +0 -1
- package/dist/chunk-PVR2SN3B.mjs +0 -1
- package/dist/chunk-QUIYULS2.mjs +0 -1
- package/dist/chunk-YR3SAEO7.mjs +0 -1
- package/dist/server-fns-6QM243HC.mjs +0 -2
- package/dist/server-functions-E3LKCZ4R.mjs +0 -1
- package/dist/transform-5WC4FWJE.mjs +0 -8
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Normalized, host-agnostic IR. Both the babel and (future) swc front-ends
|
|
3
|
+
* produce this; codegen backends consume it. This is the stable contract
|
|
4
|
+
* between parsing and code generation — the layer your own improvements
|
|
5
|
+
* (hoisting, islands, resumability hints) transform.
|
|
6
|
+
*/
|
|
7
|
+
import type { IRLoadStrategy } from '../resolve/load-directive.cjs';
|
|
8
|
+
export type { IRLoadStrategy };
|
|
9
|
+
export interface SourceSpan {
|
|
10
|
+
start: number;
|
|
11
|
+
end: number;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Where a hole was written. Carried as data because the source map cannot say: a template is
|
|
15
|
+
* emitted as one overwrite, so every hole in it traces back to the line the root opens at.
|
|
16
|
+
*/
|
|
17
|
+
export interface HolePosition {
|
|
18
|
+
line: number;
|
|
19
|
+
column: number;
|
|
20
|
+
}
|
|
21
|
+
export type IRNode = IRElement | IRComponent | IRText | IRExpression | IRControl | IRFragment;
|
|
22
|
+
export type IRPropKind = 'attr' | 'prop' | 'event' | 'ref' | 'class' | 'style' | 'spread';
|
|
23
|
+
export interface IRProp {
|
|
24
|
+
/** prop/attribute name (already normalized, e.g. class -> className). Empty for spreads. */
|
|
25
|
+
name: string;
|
|
26
|
+
kind: IRPropKind;
|
|
27
|
+
/**
|
|
28
|
+
* A static literal value. Mutually exclusive with `expr`. Used for things like
|
|
29
|
+
* `id="x"` (string), `tabindex={3}` (number) or a valueless attr (boolean true).
|
|
30
|
+
*/
|
|
31
|
+
literal?: string | number | boolean | null;
|
|
32
|
+
/** Raw JS expression code. Mutually exclusive with `literal`. */
|
|
33
|
+
expr?: string;
|
|
34
|
+
/** When true, `expr` must be wired reactively (emitted as a `() => expr` thunk). */
|
|
35
|
+
reactive?: boolean;
|
|
36
|
+
/** Where the expression was written. Only kept when the host asked for source locations. */
|
|
37
|
+
at?: HolePosition;
|
|
38
|
+
/**
|
|
39
|
+
* The directive this prop was written as, when it is not recoverable at runtime.
|
|
40
|
+
* `bind:value` becomes an ordinary value plus an input handler, and nothing downstream
|
|
41
|
+
* could tell it from the two written by hand.
|
|
42
|
+
*/
|
|
43
|
+
directive?: string;
|
|
44
|
+
/**
|
|
45
|
+
* `expr` is an inline JSX element/fragment passed as a component prop (e.g.
|
|
46
|
+
* `<Suspense fallback={<div/>}>`). Emitted as a LAZY getter — like children — so the DOM is
|
|
47
|
+
* built only when the component reads the prop, not eagerly when the props object is
|
|
48
|
+
* constructed (which during hydration would walk the cursor and duplicate the tree).
|
|
49
|
+
*/
|
|
50
|
+
jsxElement?: boolean;
|
|
51
|
+
/** For kind 'event': the DOM event name + whether it is delegated. */
|
|
52
|
+
event?: {
|
|
53
|
+
name: string;
|
|
54
|
+
delegated: boolean;
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
export interface IRElement {
|
|
58
|
+
kind: 'element';
|
|
59
|
+
tag: string;
|
|
60
|
+
svg: boolean;
|
|
61
|
+
props: IRProp[];
|
|
62
|
+
children: IRNode[];
|
|
63
|
+
/** analyze/statics: subtree has no dynamic parts → hoistable (template-clone) */
|
|
64
|
+
static: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* Where the tag was written, when the transform was asked for source locations. A
|
|
67
|
+
* template is emitted as one string, so this is the only record of where each element in
|
|
68
|
+
* it came from.
|
|
69
|
+
*/
|
|
70
|
+
at?: {
|
|
71
|
+
file: string;
|
|
72
|
+
line: number;
|
|
73
|
+
column: number;
|
|
74
|
+
};
|
|
75
|
+
loc?: SourceSpan;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Where a component reference comes from, attached to the reference itself.
|
|
79
|
+
*
|
|
80
|
+
* A capitalised tag with no binding in the file is supplied by the compiler — from a
|
|
81
|
+
* `resolve` rule, or from the built-in control-flow/router sets. That decision used to
|
|
82
|
+
* live only in the Babel plugin's state, which meant the IR could not see which
|
|
83
|
+
* components a template referenced: no pass could vary a decision per usage, group
|
|
84
|
+
* references into chunks, or drop a subtree it knows is server-only. Recording it on
|
|
85
|
+
* the node is what turns resolution from a convenience into something later passes can
|
|
86
|
+
* read.
|
|
87
|
+
*
|
|
88
|
+
* `origin` distinguishes the two suppliers because they behave differently: a `rule`
|
|
89
|
+
* is configuration and may be overridden or re-targeted, while a `builtin` control-flow
|
|
90
|
+
* name also selects codegen and cannot be re-pointed at another module.
|
|
91
|
+
*/
|
|
92
|
+
export interface IRComponentSource {
|
|
93
|
+
module: string;
|
|
94
|
+
/** The export to import, or `default`. */
|
|
95
|
+
export: string;
|
|
96
|
+
origin: 'rule' | 'builtin';
|
|
97
|
+
/**
|
|
98
|
+
* When the module is fetched. Set from a `load:` directive at the usage site, and
|
|
99
|
+
* `eager` otherwise — resolution decides where a component comes from, this decides
|
|
100
|
+
* when, and the two vary independently.
|
|
101
|
+
*/
|
|
102
|
+
loading: IRLoadStrategy;
|
|
103
|
+
/** Assigned by the optimizer once references are grouped. */
|
|
104
|
+
chunk?: string;
|
|
105
|
+
}
|
|
106
|
+
export interface IRComponent {
|
|
107
|
+
kind: 'component';
|
|
108
|
+
name: string;
|
|
109
|
+
props: IRProp[];
|
|
110
|
+
children: IRNode[];
|
|
111
|
+
/**
|
|
112
|
+
* Set by the resolve pass when the compiler supplies this reference. Absent when the
|
|
113
|
+
* name is bound in the file — an ordinary import the author wrote — or when nothing
|
|
114
|
+
* claims it, which is a diagnostic rather than a resolution.
|
|
115
|
+
*/
|
|
116
|
+
source?: IRComponentSource;
|
|
117
|
+
/**
|
|
118
|
+
* Where the tag was written, when the transform was asked for source locations. Distinct
|
|
119
|
+
* from `source`, which says where the component reference was resolved from.
|
|
120
|
+
*/
|
|
121
|
+
at?: {
|
|
122
|
+
file: string;
|
|
123
|
+
line: number;
|
|
124
|
+
column: number;
|
|
125
|
+
};
|
|
126
|
+
/**
|
|
127
|
+
* Where the `${…}` that drives this subtree was written — the condition of an `if=`,
|
|
128
|
+
* the list of an `each=`. The insert that adds and removes the subtree is a reactive
|
|
129
|
+
* binding, and this is the position it reports. Distinct from `at`, which marks the
|
|
130
|
+
* node itself rather than the binding that places it.
|
|
131
|
+
*/
|
|
132
|
+
bindAt?: HolePosition;
|
|
133
|
+
/**
|
|
134
|
+
* A `load:` strategy read off the tag by the frontend. The resolve pass folds it into
|
|
135
|
+
* `source.loading`; it lives here first because the frontend knows the directive and
|
|
136
|
+
* the resolve pass knows whether the name is deferrable at all.
|
|
137
|
+
*/
|
|
138
|
+
load?: IRLoadStrategy;
|
|
139
|
+
loc?: SourceSpan;
|
|
140
|
+
}
|
|
141
|
+
export interface IRText {
|
|
142
|
+
kind: 'text';
|
|
143
|
+
value: string;
|
|
144
|
+
loc?: SourceSpan;
|
|
145
|
+
}
|
|
146
|
+
export interface IRExpression {
|
|
147
|
+
kind: 'expr';
|
|
148
|
+
code: string;
|
|
149
|
+
reactive: boolean;
|
|
150
|
+
loc?: SourceSpan;
|
|
151
|
+
/** Where the expression was written. Only kept when the host asked for source locations. */
|
|
152
|
+
at?: HolePosition;
|
|
153
|
+
}
|
|
154
|
+
export interface IRFragment {
|
|
155
|
+
kind: 'fragment';
|
|
156
|
+
children: IRNode[];
|
|
157
|
+
loc?: SourceSpan;
|
|
158
|
+
}
|
|
159
|
+
export type ControlKind = 'show' | 'for' | 'index' | 'switch' | 'match' | 'dynamic' | 'errorBoundary' | 'suspense';
|
|
160
|
+
export interface IRControl {
|
|
161
|
+
kind: 'control';
|
|
162
|
+
control: ControlKind;
|
|
163
|
+
props: IRProp[];
|
|
164
|
+
children: IRNode[];
|
|
165
|
+
/** As on IRComponent: where the hole driving this subtree was written. */
|
|
166
|
+
bindAt?: HolePosition;
|
|
167
|
+
loc?: SourceSpan;
|
|
168
|
+
}
|
package/dist/ir/nodes.d.ts
CHANGED
|
@@ -10,6 +10,14 @@ export interface SourceSpan {
|
|
|
10
10
|
start: number;
|
|
11
11
|
end: number;
|
|
12
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* Where a hole was written. Carried as data because the source map cannot say: a template is
|
|
15
|
+
* emitted as one overwrite, so every hole in it traces back to the line the root opens at.
|
|
16
|
+
*/
|
|
17
|
+
export interface HolePosition {
|
|
18
|
+
line: number;
|
|
19
|
+
column: number;
|
|
20
|
+
}
|
|
13
21
|
export type IRNode = IRElement | IRComponent | IRText | IRExpression | IRControl | IRFragment;
|
|
14
22
|
export type IRPropKind = 'attr' | 'prop' | 'event' | 'ref' | 'class' | 'style' | 'spread';
|
|
15
23
|
export interface IRProp {
|
|
@@ -25,6 +33,14 @@ export interface IRProp {
|
|
|
25
33
|
expr?: string;
|
|
26
34
|
/** When true, `expr` must be wired reactively (emitted as a `() => expr` thunk). */
|
|
27
35
|
reactive?: boolean;
|
|
36
|
+
/** Where the expression was written. Only kept when the host asked for source locations. */
|
|
37
|
+
at?: HolePosition;
|
|
38
|
+
/**
|
|
39
|
+
* The directive this prop was written as, when it is not recoverable at runtime.
|
|
40
|
+
* `bind:value` becomes an ordinary value plus an input handler, and nothing downstream
|
|
41
|
+
* could tell it from the two written by hand.
|
|
42
|
+
*/
|
|
43
|
+
directive?: string;
|
|
28
44
|
/**
|
|
29
45
|
* `expr` is an inline JSX element/fragment passed as a component prop (e.g.
|
|
30
46
|
* `<Suspense fallback={<div/>}>`). Emitted as a LAZY getter — like children — so the DOM is
|
|
@@ -46,6 +62,16 @@ export interface IRElement {
|
|
|
46
62
|
children: IRNode[];
|
|
47
63
|
/** analyze/statics: subtree has no dynamic parts → hoistable (template-clone) */
|
|
48
64
|
static: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* Where the tag was written, when the transform was asked for source locations. A
|
|
67
|
+
* template is emitted as one string, so this is the only record of where each element in
|
|
68
|
+
* it came from.
|
|
69
|
+
*/
|
|
70
|
+
at?: {
|
|
71
|
+
file: string;
|
|
72
|
+
line: number;
|
|
73
|
+
column: number;
|
|
74
|
+
};
|
|
49
75
|
loc?: SourceSpan;
|
|
50
76
|
}
|
|
51
77
|
/**
|
|
@@ -88,6 +114,22 @@ export interface IRComponent {
|
|
|
88
114
|
* claims it, which is a diagnostic rather than a resolution.
|
|
89
115
|
*/
|
|
90
116
|
source?: IRComponentSource;
|
|
117
|
+
/**
|
|
118
|
+
* Where the tag was written, when the transform was asked for source locations. Distinct
|
|
119
|
+
* from `source`, which says where the component reference was resolved from.
|
|
120
|
+
*/
|
|
121
|
+
at?: {
|
|
122
|
+
file: string;
|
|
123
|
+
line: number;
|
|
124
|
+
column: number;
|
|
125
|
+
};
|
|
126
|
+
/**
|
|
127
|
+
* Where the `${…}` that drives this subtree was written — the condition of an `if=`,
|
|
128
|
+
* the list of an `each=`. The insert that adds and removes the subtree is a reactive
|
|
129
|
+
* binding, and this is the position it reports. Distinct from `at`, which marks the
|
|
130
|
+
* node itself rather than the binding that places it.
|
|
131
|
+
*/
|
|
132
|
+
bindAt?: HolePosition;
|
|
91
133
|
/**
|
|
92
134
|
* A `load:` strategy read off the tag by the frontend. The resolve pass folds it into
|
|
93
135
|
* `source.loading`; it lives here first because the frontend knows the directive and
|
|
@@ -106,6 +148,8 @@ export interface IRExpression {
|
|
|
106
148
|
code: string;
|
|
107
149
|
reactive: boolean;
|
|
108
150
|
loc?: SourceSpan;
|
|
151
|
+
/** Where the expression was written. Only kept when the host asked for source locations. */
|
|
152
|
+
at?: HolePosition;
|
|
109
153
|
}
|
|
110
154
|
export interface IRFragment {
|
|
111
155
|
kind: 'fragment';
|
|
@@ -118,6 +162,8 @@ export interface IRControl {
|
|
|
118
162
|
control: ControlKind;
|
|
119
163
|
props: IRProp[];
|
|
120
164
|
children: IRNode[];
|
|
165
|
+
/** As on IRComponent: where the hole driving this subtree was written. */
|
|
166
|
+
bindAt?: HolePosition;
|
|
121
167
|
loc?: SourceSpan;
|
|
122
168
|
}
|
|
123
169
|
//# sourceMappingURL=nodes.d.ts.map
|
package/dist/ir/nodes.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nodes.d.ts","sourceRoot":"","sources":["../../src/ir/nodes.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAEnE,YAAY,EAAE,cAAc,EAAE,CAAC;AAE/B,MAAM,WAAW,UAAU;IAAG,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;CAAE;AAE3D,MAAM,MAAM,MAAM,GACd,SAAS,GACT,WAAW,GACX,MAAM,GACN,YAAY,GACZ,SAAS,GACT,UAAU,CAAC;AAEf,MAAM,MAAM,UAAU,GAClB,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,OAAO,GAAG,OAAO,GAAG,QAAQ,CAAC;AAErE,MAAM,WAAW,MAAM;IACrB,4FAA4F;IAC5F,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,UAAU,CAAC;IACjB;;;OAGG;IACH,OAA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