@alloy-js/core 0.17.0 → 0.18.0-dev.3
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/src/binder.d.ts +2 -1
- package/dist/src/binder.d.ts.map +1 -1
- package/dist/src/binder.js +2 -2
- package/dist/src/code.d.ts +1 -1
- package/dist/src/code.d.ts.map +1 -1
- package/dist/src/components/Block.d.ts +1 -1
- package/dist/src/components/Block.d.ts.map +1 -1
- package/dist/src/components/Declaration.d.ts +1 -1
- package/dist/src/components/Declaration.d.ts.map +1 -1
- package/dist/src/components/Declaration.js +1 -1
- package/dist/src/components/For.d.ts +1 -1
- package/dist/src/components/For.d.ts.map +1 -1
- package/dist/src/components/For.js +1 -1
- package/dist/src/components/Indent.d.ts +1 -1
- package/dist/src/components/Indent.d.ts.map +1 -1
- package/dist/src/components/List.d.ts +1 -1
- package/dist/src/components/List.d.ts.map +1 -1
- package/dist/src/components/List.js +2 -1
- package/dist/src/components/MemberDeclaration.d.ts +2 -2
- package/dist/src/components/MemberDeclaration.d.ts.map +1 -1
- package/dist/src/components/MemberDeclaration.js +2 -1
- package/dist/src/components/MemberScope.d.ts +2 -2
- package/dist/src/components/MemberScope.d.ts.map +1 -1
- package/dist/src/components/Output.d.ts +1 -1
- package/dist/src/components/Output.d.ts.map +1 -1
- package/dist/src/components/Output.js +1 -1
- package/dist/src/components/Prose.d.ts +1 -1
- package/dist/src/components/Prose.d.ts.map +1 -1
- package/dist/src/components/ReferenceOrContent.d.ts +1 -1
- package/dist/src/components/ReferenceOrContent.d.ts.map +1 -1
- package/dist/src/components/Scope.d.ts +1 -1
- package/dist/src/components/Scope.d.ts.map +1 -1
- package/dist/src/components/Show.d.ts +1 -1
- package/dist/src/components/Show.d.ts.map +1 -1
- package/dist/src/components/SourceDirectory.d.ts +1 -1
- package/dist/src/components/SourceDirectory.d.ts.map +1 -1
- package/dist/src/components/SourceDirectory.js +1 -1
- package/dist/src/components/SourceFile.d.ts +1 -1
- package/dist/src/components/SourceFile.d.ts.map +1 -1
- package/dist/src/components/SourceFile.js +1 -1
- package/dist/src/components/StatementList.d.ts +1 -1
- package/dist/src/components/StatementList.d.ts.map +1 -1
- package/dist/src/components/Switch.d.ts +2 -2
- package/dist/src/components/Switch.d.ts.map +1 -1
- package/dist/src/components/Switch.js +2 -1
- package/dist/src/components/Wrap.d.ts +1 -1
- package/dist/src/components/Wrap.d.ts.map +1 -1
- package/dist/src/context/binder.d.ts +1 -1
- package/dist/src/context/binder.d.ts.map +1 -1
- package/dist/src/context/source-file.d.ts +1 -1
- package/dist/src/context/source-file.d.ts.map +1 -1
- package/dist/src/context.d.ts +2 -2
- package/dist/src/context.d.ts.map +1 -1
- package/dist/src/context.js +1 -1
- package/dist/src/debug.d.ts +1 -0
- package/dist/src/debug.d.ts.map +1 -1
- package/dist/src/debug.js +4 -1
- package/dist/src/index.d.ts +4 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +4 -1
- package/dist/src/jsx-runtime.d.ts +4 -281
- package/dist/src/jsx-runtime.d.ts.map +1 -1
- package/dist/src/jsx-runtime.js +3 -319
- package/dist/src/props-combinators.d.ts +19 -0
- package/dist/src/props-combinators.d.ts.map +1 -0
- package/dist/src/props-combinators.js +108 -0
- package/dist/src/reactive-union-set.d.ts.map +1 -1
- package/dist/src/reactive-union-set.js +1 -1
- package/dist/src/reactivity.d.ts +75 -0
- package/dist/src/reactivity.d.ts.map +1 -0
- package/dist/src/reactivity.js +141 -0
- package/dist/src/render.d.ts +5 -1
- package/dist/src/render.d.ts.map +1 -1
- package/dist/src/render.js +68 -15
- package/dist/src/runtime/component.d.ts +24 -0
- package/dist/src/runtime/component.d.ts.map +1 -0
- package/dist/src/runtime/component.js +19 -0
- package/dist/src/runtime/intrinsic.d.ts +168 -0
- package/dist/src/runtime/intrinsic.d.ts.map +1 -0
- package/dist/src/runtime/intrinsic.js +11 -0
- package/dist/src/slot.d.ts +2 -2
- package/dist/src/slot.d.ts.map +1 -1
- package/dist/src/slot.js +1 -1
- package/dist/src/stc.d.ts +1 -1
- package/dist/src/stc.d.ts.map +1 -1
- package/dist/src/sti.d.ts +7 -6
- package/dist/src/sti.d.ts.map +1 -1
- package/dist/src/sti.js +1 -1
- package/dist/src/symbols/flags.d.ts +70 -0
- package/dist/src/symbols/flags.d.ts.map +1 -0
- package/dist/src/symbols/flags.js +72 -0
- package/dist/src/symbols/index.d.ts +1 -0
- package/dist/src/symbols/index.d.ts.map +1 -1
- package/dist/src/symbols/index.js +1 -0
- package/dist/src/symbols/output-scope.d.ts +2 -24
- package/dist/src/symbols/output-scope.d.ts.map +1 -1
- package/dist/src/symbols/output-scope.js +1 -25
- package/dist/src/symbols/output-symbol.d.ts +2 -47
- package/dist/src/symbols/output-symbol.d.ts.map +1 -1
- package/dist/src/symbols/output-symbol.js +2 -48
- package/dist/src/symbols/symbol-flow.d.ts.map +1 -1
- package/dist/src/symbols/symbol-flow.js +2 -2
- package/dist/src/symbols/symbol-slot.d.ts +1 -1
- package/dist/src/symbols/symbol-slot.d.ts.map +1 -1
- package/dist/src/symbols/symbol-slot.js +1 -1
- package/dist/src/symbols/symbol-table.d.ts +3 -3
- package/dist/src/symbols/symbol-table.d.ts.map +1 -1
- package/dist/src/tap.d.ts +1 -1
- package/dist/src/tap.d.ts.map +1 -1
- package/dist/src/tracer.d.ts +60 -3
- package/dist/src/tracer.d.ts.map +1 -1
- package/dist/src/tracer.js +60 -5
- package/dist/src/utils.d.ts +4 -3
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/src/utils.js +2 -1
- package/dist/test/props-with-defaults.test.js +1 -1
- package/dist/test/reactive-union-set.test.js +1 -1
- package/dist/test/reactivity/cleanup.test.js +2 -1
- package/dist/test/reactivity/memo.test.js +1 -1
- package/dist/test/reactivity/untrack.test.js +1 -1
- package/dist/test/rendering/memoization.test.js +2 -1
- package/dist/test/split-props.test.js +1 -1
- package/dist/test/symbols/output-scope.test.js +2 -1
- package/dist/test/symbols/output-symbol.test.js +4 -3
- package/dist/test/symbols/resolution.test.js +2 -1
- package/dist/test/symbols/utils.d.ts +3 -2
- package/dist/test/symbols/utils.d.ts.map +1 -1
- package/dist/test/symbols/utils.js +2 -1
- package/dist/testing/extend-expect.d.ts +15 -0
- package/dist/testing/extend-expect.d.ts.map +1 -1
- package/dist/testing/extend-expect.js +2 -1
- package/dist/testing/render.d.ts +1 -1
- package/dist/testing/render.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +7 -4
- package/src/binder.ts +3 -5
- package/src/code.ts +1 -1
- package/src/components/Block.tsx +1 -1
- package/src/components/Declaration.tsx +2 -1
- package/src/components/For.tsx +2 -1
- package/src/components/Indent.tsx +1 -1
- package/src/components/List.tsx +3 -1
- package/src/components/MemberDeclaration.tsx +4 -3
- package/src/components/MemberScope.tsx +2 -2
- package/src/components/Output.tsx +2 -1
- package/src/components/Prose.tsx +1 -1
- package/src/components/ReferenceOrContent.tsx +1 -1
- package/src/components/Scope.tsx +1 -1
- package/src/components/Show.tsx +1 -1
- package/src/components/SourceDirectory.tsx +2 -1
- package/src/components/SourceFile.tsx +2 -1
- package/src/components/StatementList.tsx +1 -1
- package/src/components/Switch.tsx +2 -1
- package/src/components/Wrap.tsx +1 -1
- package/src/context/binder.ts +1 -1
- package/src/context/source-file.ts +1 -1
- package/src/context.ts +3 -7
- package/src/debug.ts +5 -1
- package/src/index.ts +4 -1
- package/src/jsx-runtime.ts +15 -690
- package/src/props-combinators.ts +148 -0
- package/src/reactive-union-set.ts +1 -1
- package/src/reactivity.ts +230 -0
- package/src/render.ts +97 -26
- package/src/runtime/component.ts +67 -0
- package/src/runtime/intrinsic.ts +199 -0
- package/src/slot.ts +3 -4
- package/src/stc.ts +2 -2
- package/src/sti.ts +11 -11
- package/src/symbols/flags.ts +82 -0
- package/src/symbols/index.ts +1 -0
- package/src/symbols/output-scope.ts +2 -29
- package/src/symbols/output-symbol.ts +2 -55
- package/src/symbols/symbol-flow.ts +3 -7
- package/src/symbols/symbol-slot.tsx +2 -1
- package/src/symbols/symbol-table.ts +3 -3
- package/src/tap.ts +1 -1
- package/src/tracer.ts +38 -4
- package/src/utils.tsx +7 -5
- package/temp/api.json +984 -1261
- package/test/props-with-defaults.test.ts +1 -1
- package/test/reactive-union-set.test.tsx +1 -1
- package/test/reactivity/cleanup.test.tsx +2 -1
- package/test/reactivity/memo.test.tsx +1 -1
- package/test/reactivity/untrack.test.ts +1 -1
- package/test/rendering/basic.test.tsx +1 -1
- package/test/rendering/memoization.test.tsx +1 -1
- package/test/split-props.test.ts +1 -1
- package/test/symbols/output-scope.test.ts +2 -4
- package/test/symbols/output-symbol.test.ts +4 -7
- package/test/symbols/resolution.test.ts +2 -4
- package/test/symbols/utils.ts +3 -5
- package/test/utils.test.tsx +1 -1
- package/testing/extend-expect.ts +16 -0
- package/testing/render.ts +1 -2
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import type { Children } from "./component.js";
|
|
2
|
+
export interface IntrinsicElements {
|
|
3
|
+
/**
|
|
4
|
+
* Attempt to render the children on a single line if possible. If a group
|
|
5
|
+
* contains `<breakParent />` or a hard line, or if the group exceeds the
|
|
6
|
+
* print width, all linebreaks in the group will be broken.
|
|
7
|
+
*/
|
|
8
|
+
group: {
|
|
9
|
+
shouldBreak?: boolean;
|
|
10
|
+
id?: symbol;
|
|
11
|
+
children: Children;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* A regular line break. This will break if the line exceeds the print
|
|
15
|
+
* width, otherwise it will be a space.
|
|
16
|
+
*/
|
|
17
|
+
line: {};
|
|
18
|
+
/**
|
|
19
|
+
* A regular line break. This will break if the line exceeds the print
|
|
20
|
+
* width, otherwise it will be a space.
|
|
21
|
+
*/
|
|
22
|
+
br: {};
|
|
23
|
+
/**
|
|
24
|
+
* A hard line break. This is a line that will always break, even if the
|
|
25
|
+
* group does not exceed print width.
|
|
26
|
+
*/
|
|
27
|
+
hardline: {};
|
|
28
|
+
/**
|
|
29
|
+
* A hard line break. This is a line that will always break, even if the
|
|
30
|
+
* group does not exceed print width.
|
|
31
|
+
*/
|
|
32
|
+
hbr: {};
|
|
33
|
+
/**
|
|
34
|
+
* A soft line break. This will break if the line exceeds the print width,
|
|
35
|
+
* otherwise it will be be nothing.
|
|
36
|
+
*/
|
|
37
|
+
softline: {};
|
|
38
|
+
/**
|
|
39
|
+
* A soft line break. This will break if the line exceeds the print width,
|
|
40
|
+
* otherwise it will be be nothing.
|
|
41
|
+
*/
|
|
42
|
+
sbr: {};
|
|
43
|
+
/**
|
|
44
|
+
* A literal line break. This will always break, even if the group does not
|
|
45
|
+
* exceed print width. The new line will ignore indentation.
|
|
46
|
+
*/
|
|
47
|
+
literalline: {};
|
|
48
|
+
/**
|
|
49
|
+
* A literal line break. This will always break, even if the group does not
|
|
50
|
+
* exceed print width. The new line will ignore indentation.
|
|
51
|
+
*/
|
|
52
|
+
lbr: {};
|
|
53
|
+
/**
|
|
54
|
+
* Increase the indentation level of the children of this component.
|
|
55
|
+
* Indentation is determined by the print options provided to the Output
|
|
56
|
+
* component or source file.
|
|
57
|
+
*/
|
|
58
|
+
indent: {
|
|
59
|
+
children: Children;
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* Indent the children of this component if the group specified by `groupId`
|
|
63
|
+
* is broken (or not broken if `negate` is passed). The specified group must
|
|
64
|
+
* already be printed.
|
|
65
|
+
*/
|
|
66
|
+
indentIfBreak: {
|
|
67
|
+
children: Children;
|
|
68
|
+
groupId: symbol;
|
|
69
|
+
negate?: boolean;
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* Similar to `group`, but will only place a line break before the last
|
|
73
|
+
* segment to exceed the print width. This is useful for formatting
|
|
74
|
+
* paragraphs of text where breaks are inserted prior to words which would
|
|
75
|
+
* otherwise exceed the print width.
|
|
76
|
+
*/
|
|
77
|
+
fill: {
|
|
78
|
+
children: Children;
|
|
79
|
+
};
|
|
80
|
+
/**
|
|
81
|
+
* Force the parent group to break.
|
|
82
|
+
*/
|
|
83
|
+
breakParent: {};
|
|
84
|
+
/**
|
|
85
|
+
* Print children if the current group or already printed group specified by
|
|
86
|
+
* `groupId` is broken. Otherwise, `flatContents` is printed instead.
|
|
87
|
+
*/
|
|
88
|
+
ifBreak: {
|
|
89
|
+
children: Children;
|
|
90
|
+
flatContents?: Children;
|
|
91
|
+
groupId?: symbol;
|
|
92
|
+
};
|
|
93
|
+
/**
|
|
94
|
+
* Print this content at the end of the line. Useful for things like line
|
|
95
|
+
* comments.
|
|
96
|
+
*/
|
|
97
|
+
lineSuffix: {
|
|
98
|
+
children: Children;
|
|
99
|
+
};
|
|
100
|
+
/**
|
|
101
|
+
* Force any line suffixes to print at this point.
|
|
102
|
+
*/
|
|
103
|
+
lineSuffixBoundary: {};
|
|
104
|
+
/**
|
|
105
|
+
* Decrease the indentation level of the children of this component.
|
|
106
|
+
* Indentation is determined by the print options provided to the Output
|
|
107
|
+
* component or source file.
|
|
108
|
+
*/
|
|
109
|
+
dedent: {
|
|
110
|
+
children: Children;
|
|
111
|
+
};
|
|
112
|
+
/**
|
|
113
|
+
* Indent the children of this component by either the number of characters
|
|
114
|
+
* indicated by the `width` prop, or by the provided string indicated by the
|
|
115
|
+
* `string` prop.
|
|
116
|
+
*/
|
|
117
|
+
align: {
|
|
118
|
+
children: Children;
|
|
119
|
+
width: number;
|
|
120
|
+
} | {
|
|
121
|
+
children: Children;
|
|
122
|
+
string: string;
|
|
123
|
+
};
|
|
124
|
+
/**
|
|
125
|
+
* Mark the current indentation level as "root" for the purposes of literal
|
|
126
|
+
* line breaks and `dedentToRoot`.
|
|
127
|
+
*/
|
|
128
|
+
markAsRoot: {
|
|
129
|
+
children: Children;
|
|
130
|
+
};
|
|
131
|
+
/**
|
|
132
|
+
* Decrease the indentation level to the root level specified by
|
|
133
|
+
* `<markAsRoot />`, or else to no indentation.
|
|
134
|
+
*/
|
|
135
|
+
dedentToRoot: {
|
|
136
|
+
children: Children;
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
export interface IntrinsicElementBase<TKey extends keyof IntrinsicElements = keyof IntrinsicElements> {
|
|
140
|
+
[intrinsicElementKey]: true;
|
|
141
|
+
name: TKey;
|
|
142
|
+
props: IntrinsicElements[TKey];
|
|
143
|
+
}
|
|
144
|
+
export declare function createIntrinsic<TKey extends keyof IntrinsicElements>(name: TKey, props: IntrinsicElements[TKey]): IntrinsicElementBase<TKey>;
|
|
145
|
+
export declare function isIntrinsicElement(type: unknown): type is IntrinsicElement;
|
|
146
|
+
export declare const intrinsicElementKey: unique symbol;
|
|
147
|
+
export type IndentIntrinsicElement = IntrinsicElementBase<"indent">;
|
|
148
|
+
export type IndentIfBreakIntrinsicElement = IntrinsicElementBase<"indentIfBreak">;
|
|
149
|
+
export type BrIntrinsicElement = IntrinsicElementBase<"br">;
|
|
150
|
+
export type LineIntrinsicElement = IntrinsicElementBase<"line">;
|
|
151
|
+
export type HbrIntrinsicElement = IntrinsicElementBase<"hbr">;
|
|
152
|
+
export type HardlineIntrinsicElement = IntrinsicElementBase<"hardline">;
|
|
153
|
+
export type SbrIntrinsicElement = IntrinsicElementBase<"sbr">;
|
|
154
|
+
export type SoftlineIntrinsicElement = IntrinsicElementBase<"softline">;
|
|
155
|
+
export type GroupIntrinsicElement = IntrinsicElementBase<"group">;
|
|
156
|
+
export type AlignIntrinsicElement = IntrinsicElementBase<"align">;
|
|
157
|
+
export type FillIntrinsicElement = IntrinsicElementBase<"fill">;
|
|
158
|
+
export type BreakParentIntrinsicElement = IntrinsicElementBase<"breakParent">;
|
|
159
|
+
export type LineSuffixIntrinsicElement = IntrinsicElementBase<"lineSuffix">;
|
|
160
|
+
export type LineSuffixBoundaryIntrinsicElement = IntrinsicElementBase<"lineSuffixBoundary">;
|
|
161
|
+
export type DedentIntrinsicElement = IntrinsicElementBase<"dedent">;
|
|
162
|
+
export type DedentToRootIntrinsicElement = IntrinsicElementBase<"dedentToRoot">;
|
|
163
|
+
export type MarkAsRootIntrinsicElement = IntrinsicElementBase<"markAsRoot">;
|
|
164
|
+
export type LiterallineIntrinsicElement = IntrinsicElementBase<"literalline">;
|
|
165
|
+
export type LbrIntrinsicElement = IntrinsicElementBase<"lbr">;
|
|
166
|
+
export type IfBreakIntrinsicElement = IntrinsicElementBase<"ifBreak">;
|
|
167
|
+
export type IntrinsicElement = IndentIntrinsicElement | IndentIfBreakIntrinsicElement | BrIntrinsicElement | LineIntrinsicElement | HbrIntrinsicElement | HardlineIntrinsicElement | SbrIntrinsicElement | SoftlineIntrinsicElement | GroupIntrinsicElement | AlignIntrinsicElement | FillIntrinsicElement | BreakParentIntrinsicElement | LineSuffixIntrinsicElement | LineSuffixBoundaryIntrinsicElement | DedentIntrinsicElement | LiterallineIntrinsicElement | LbrIntrinsicElement | DedentToRootIntrinsicElement | MarkAsRootIntrinsicElement | IfBreakIntrinsicElement;
|
|
168
|
+
//# sourceMappingURL=intrinsic.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"intrinsic.d.ts","sourceRoot":"","sources":["../../../src/runtime/intrinsic.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export function createIntrinsic(name, props) {
|
|
2
|
+
return {
|
|
3
|
+
[intrinsicElementKey]: true,
|
|
4
|
+
name,
|
|
5
|
+
props
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
export function isIntrinsicElement(type) {
|
|
9
|
+
return typeof type === "object" && type !== null && intrinsicElementKey in type;
|
|
10
|
+
}
|
|
11
|
+
export const intrinsicElementKey = Symbol();
|
package/dist/src/slot.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Ref } from "@vue/reactivity";
|
|
2
|
-
import { Children, Component, ComponentDefinition } from "./
|
|
3
|
-
import { OutputSymbol } from "./symbols/output-symbol.js";
|
|
2
|
+
import { Children, Component, ComponentDefinition } from "./runtime/component.js";
|
|
3
|
+
import type { OutputSymbol } from "./symbols/output-symbol.js";
|
|
4
4
|
export interface SlotInstance extends ComponentDefinition {
|
|
5
5
|
}
|
|
6
6
|
export interface SlotDefinition<TSlotProps> {
|
package/dist/src/slot.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slot.d.ts","sourceRoot":"","sources":["../../src/slot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,GAAG,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"slot.d.ts","sourceRoot":"","sources":["../../src/slot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAE3C,OAAO,EACL,QAAQ,EACR,SAAS,EACT,mBAAmB,EACpB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE/D,MAAM,WAAW,YAAa,SAAQ,mBAAmB;CAAG;AAE5D,MAAM,WAAW,cAAc,CAAC,UAAU;IACxC,IAAI,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,MAAM,GAAG,CAAC,OAAO,CAAC,CAAC;IAC7C,MAAM,CACJ,GAAG,EAAE,OAAO,EACZ,KAAK,EAAE,UAAU,EACjB,cAAc,CAAC,EAAE,QAAQ,GACxB,mBAAmB,CAAC;CACxB;AAED,MAAM,MAAM,OAAO,GAAG,GAAG,CAAC,OAAO,CAAC,CAAC;AAInC,wBAAgB,UAAU,CACxB,UAAU,EACV,OAAO,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC,OAAO,CAAC,GAAG,OAAO,GAAG,CAC3D,GAAG,IAAI,EAAE,GAAG,EAAE,KACX,GAAG,CAAC,OAAO,CAAC,GAAG,OAAO,EAC3B,MAAM,EAAE,OAAO,GAAG,cAAc,CAAC,UAAU,CAAC,CAsB7C;AAED,eAAO,MAAM,gBAAgB,EAAE,CAAC,MAAM,IAAI,CAAC,EAAO,CAAC;AAEnD,wBAAgB,OAAO,CAAC,CAAC,EACvB,SAAS,EAAE,MAAM,OAAO,EACxB,WAAW,EAAE,SAAS,CAAC,CAAC,CAAC,QAkB1B;AAED,wBAAgB,MAAM,CACpB,SAAS,EAAE,MAAM,GAAG,CAAC,YAAY,GAAG,SAAS,CAAC,EAC9C,OAAO,EAAE,MAAM,QAShB"}
|
package/dist/src/slot.js
CHANGED
package/dist/src/stc.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Children, ComponentCreator, ComponentDefinition } from "./runtime/component.js";
|
|
2
2
|
export type MakeChildrenOptional<T extends object> = T extends {
|
|
3
3
|
children?: any;
|
|
4
4
|
} ? Omit<T, "children"> & Partial<Pick<T, "children">> : T;
|
package/dist/src/stc.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stc.d.ts","sourceRoot":"","sources":["../../src/stc.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"stc.d.ts","sourceRoot":"","sources":["../../src/stc.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EACR,gBAAgB,EAChB,mBAAmB,EACpB,MAAM,wBAAwB,CAAC;AAEhC,MAAM,MAAM,oBAAoB,CAAC,CAAC,SAAS,MAAM,IAC/C,CAAC,SAAS;IAAE,QAAQ,CAAC,EAAE,GAAG,CAAA;CAAE,GAC1B,IAAI,CAAC,CAAC,EAAE,UAAU,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,GAClD,CAAC,CAAC;AAEN,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,EAAE,IAAI,CACvC,GAAG,IAAI,EAAE,OAAO,SAAS,CAAC,GAAG,EAAE,GAC7B,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,oBAAoB,CAAC,CAAC,CAAC,CAAC,GAClE,CAAC,KAAK,EAAE,oBAAoB,CAAC,CAAC,CAAC,CAAC,KAC/B,mBAAmB,CAAC,CAAC,CAAC,CAAC;AAE5B,MAAM,MAAM,mBAAmB,CAAC,CAAC,IAAI,gBAAgB,CAAC,CAAC,CAAC,GAAG;IACzD,IAAI,CACF,QAAQ,EAAE,oBAAoB,EAC9B,GAAG,aAAa,EAAE,QAAQ,EAAE,GAC3B,gBAAgB,CAAC,CAAC,CAAC,CAAC;IACvB,IAAI,CACF,QAAQ,EAAE,oBAAoB,EAC9B,GAAG,aAAa,EAAE,QAAQ,EAAE,GAC3B,gBAAgB,CAAC,CAAC,CAAC,CAAC;IACvB,QAAQ,CAAC,GAAG,QAAQ,EAAE,QAAQ,EAAE,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAAC;CACxD,CAAC;AAEF,wBAAgB,GAAG,CAAC,CAAC,SAAS,EAAE,EAC9B,SAAS,EAAE,mBAAmB,CAAC,CAAC,CAAC,GAChC,YAAY,CAAC,CAAC,CAAC,CAyCjB"}
|
package/dist/src/sti.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { Children } from "./runtime/component.js";
|
|
2
|
+
import { IntrinsicElementBase, IntrinsicElements } from "./runtime/intrinsic.js";
|
|
3
|
+
export type StiSignature<T extends keyof IntrinsicElements> = (...args: unknown extends T ? [] : {} extends Omit<IntrinsicElements[T], "children"> ? [
|
|
4
|
+
props?: IntrinsicElements[T]
|
|
5
|
+
] : [props: IntrinsicElements[T]]) => StiComponentCreator<T>;
|
|
6
|
+
export type StiComponentCreator<T extends keyof IntrinsicElements> = (() => IntrinsicElementBase<T>) & {
|
|
6
7
|
code(template: TemplateStringsArray, ...substitutions: Children[]): () => IntrinsicElementBase<T>;
|
|
7
8
|
text(template: TemplateStringsArray, ...substitutions: Children[]): () => IntrinsicElementBase<T>;
|
|
8
9
|
children(...children: Children[]): () => IntrinsicElementBase<T>;
|
|
9
10
|
};
|
|
10
|
-
export declare function sti<T extends keyof
|
|
11
|
+
export declare function sti<T extends keyof IntrinsicElements>(name: T): StiSignature<T>;
|
|
11
12
|
//# sourceMappingURL=sti.d.ts.map
|
package/dist/src/sti.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sti.d.ts","sourceRoot":"","sources":["../../src/sti.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"sti.d.ts","sourceRoot":"","sources":["../../src/sti.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAEL,oBAAoB,EACpB,iBAAiB,EAClB,MAAM,wBAAwB,CAAC;AAEhC,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,MAAM,iBAAiB,IAAI,CAC5D,GAAG,IAAI,EAAE,OAAO,SAAS,CAAC,GAAG,EAAE,GAC7B,EAAE,SAAS,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,GACjD;IAAC,KAAK,CAAC,EAAE,iBAAiB,CAAC,CAAC,CAAC;CAAC,GAC9B,CAAC,KAAK,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC,KAC5B,mBAAmB,CAAC,CAAC,CAAC,CAAC;AAE5B,MAAM,MAAM,mBAAmB,CAAC,CAAC,SAAS,MAAM,iBAAiB,IAC/D,CAAC,MAAM,oBAAoB,CAAC,CAAC,CAAC,CAAC,GAAG;IAChC,IAAI,CACF,QAAQ,EAAE,oBAAoB,EAC9B,GAAG,aAAa,EAAE,QAAQ,EAAE,GAC3B,MAAM,oBAAoB,CAAC,CAAC,CAAC,CAAC;IACjC,IAAI,CACF,QAAQ,EAAE,oBAAoB,EAC9B,GAAG,aAAa,EAAE,QAAQ,EAAE,GAC3B,MAAM,oBAAoB,CAAC,CAAC,CAAC,CAAC;IACjC,QAAQ,CAAC,GAAG,QAAQ,EAAE,QAAQ,EAAE,GAAG,MAAM,oBAAoB,CAAC,CAAC,CAAC,CAAC;CAClE,CAAC;AAEJ,wBAAgB,GAAG,CAAC,CAAC,SAAS,MAAM,iBAAiB,EACnD,IAAI,EAAE,CAAC,GACN,YAAY,CAAC,CAAC,CAAC,CAgCjB"}
|
package/dist/src/sti.js
CHANGED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Flags that describe an output scope.
|
|
3
|
+
*/
|
|
4
|
+
export declare enum OutputScopeFlags {
|
|
5
|
+
None = 0,
|
|
6
|
+
/**
|
|
7
|
+
* This scope is a static member scope.
|
|
8
|
+
*/
|
|
9
|
+
StaticMemberScope = 1,
|
|
10
|
+
/**
|
|
11
|
+
* This scope is an instance member scope.
|
|
12
|
+
*/
|
|
13
|
+
InstanceMemberScope = 2,
|
|
14
|
+
/**
|
|
15
|
+
* This scope is transient, and only exists to be merged with other scopes.
|
|
16
|
+
*/
|
|
17
|
+
Transient = 4,
|
|
18
|
+
/**
|
|
19
|
+
* This scope is a member scope. Scopes with this flag will have an `owner`
|
|
20
|
+
* property that points to the symbol whose member this scope holds.
|
|
21
|
+
*/
|
|
22
|
+
MemberScope = 3
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Flags that describe an output symbol.
|
|
26
|
+
*/
|
|
27
|
+
export declare enum OutputSymbolFlags {
|
|
28
|
+
None = 0,
|
|
29
|
+
/**
|
|
30
|
+
* The symbol is an instance member container. Symbols with this flag will have a
|
|
31
|
+
* instanceMemberScope property that contains symbols for instance members.
|
|
32
|
+
*/
|
|
33
|
+
InstanceMemberContainer = 1,
|
|
34
|
+
/**
|
|
35
|
+
* The symbol is a static member container. Symbols with this flag will have a
|
|
36
|
+
* staticMemberScope property that contains symbols for static members.
|
|
37
|
+
*/
|
|
38
|
+
StaticMemberContainer = 2,
|
|
39
|
+
/**
|
|
40
|
+
* Whether this symbol contains members of any kind.
|
|
41
|
+
*/
|
|
42
|
+
MemberContainer = 3,
|
|
43
|
+
/**
|
|
44
|
+
* Whether this symbol is an instance member of another symbol (i.e that it is
|
|
45
|
+
* stored in an instance member scope).
|
|
46
|
+
*/
|
|
47
|
+
InstanceMember = 4,
|
|
48
|
+
/**
|
|
49
|
+
* Whether this symbol is a static member of another symbol (i.e that it is
|
|
50
|
+
* stored in a static member scope).
|
|
51
|
+
*/
|
|
52
|
+
StaticMember = 8,
|
|
53
|
+
/**
|
|
54
|
+
* Transient symbols are not added to symbol tables and do not create
|
|
55
|
+
* referencable refkeys. They are used for temporary symbols that are intended
|
|
56
|
+
* to be used to calculate other symbols.
|
|
57
|
+
*/
|
|
58
|
+
Transient = 16,
|
|
59
|
+
/**
|
|
60
|
+
* This symbol aliases another symbol. Only its name, flags, and scope are
|
|
61
|
+
* stored in this symbol. Otherwise, everything else is located on the alias
|
|
62
|
+
* target.
|
|
63
|
+
*/
|
|
64
|
+
Alias = 32,
|
|
65
|
+
/**
|
|
66
|
+
* Whether this is an instance member or static member of another symbol.
|
|
67
|
+
*/
|
|
68
|
+
Member = 12
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=flags.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flags.d.ts","sourceRoot":"","sources":["../../../src/symbols/flags.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,gBAAgB;IAC1B,IAAI,IAAI;IAER;;OAEG;IACH,iBAAiB,IAAS;IAE1B;;OAEG;IACH,mBAAmB,IAAS;IAE5B;;OAEG;IACH,SAAS,IAAS;IAElB;;;OAGG;IACH,WAAW,IAA0C;CACtD;AAED;;GAEG;AACH,oBAAY,iBAAiB;IAC3B,IAAI,IAAI;IAER;;;OAGG;IACH,uBAAuB,IAAS;IAEhC;;;OAGG;IACH,qBAAqB,IAAS;IAE9B;;OAEG;IACH,eAAe,IAAkD;IAEjE;;;OAGG;IACH,cAAc,IAAS;IAEvB;;;OAGG;IACH,YAAY,IAAS;IAErB;;;;OAIG;IACH,SAAS,KAAS;IAElB;;;;OAIG;IACH,KAAK,KAAS;IAEd;;OAEG;IACH,MAAM,KAAgC;CACvC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Flags that describe an output scope.
|
|
3
|
+
*/
|
|
4
|
+
export let OutputScopeFlags = /*#__PURE__*/function (OutputScopeFlags) {
|
|
5
|
+
OutputScopeFlags[OutputScopeFlags["None"] = 0] = "None";
|
|
6
|
+
/**
|
|
7
|
+
* This scope is a static member scope.
|
|
8
|
+
*/
|
|
9
|
+
OutputScopeFlags[OutputScopeFlags["StaticMemberScope"] = 1] = "StaticMemberScope";
|
|
10
|
+
/**
|
|
11
|
+
* This scope is an instance member scope.
|
|
12
|
+
*/
|
|
13
|
+
OutputScopeFlags[OutputScopeFlags["InstanceMemberScope"] = 2] = "InstanceMemberScope";
|
|
14
|
+
/**
|
|
15
|
+
* This scope is transient, and only exists to be merged with other scopes.
|
|
16
|
+
*/
|
|
17
|
+
OutputScopeFlags[OutputScopeFlags["Transient"] = 4] = "Transient";
|
|
18
|
+
/**
|
|
19
|
+
* This scope is a member scope. Scopes with this flag will have an `owner`
|
|
20
|
+
* property that points to the symbol whose member this scope holds.
|
|
21
|
+
*/
|
|
22
|
+
OutputScopeFlags[OutputScopeFlags["MemberScope"] = 3] = "MemberScope";
|
|
23
|
+
return OutputScopeFlags;
|
|
24
|
+
}({});
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Flags that describe an output symbol.
|
|
28
|
+
*/
|
|
29
|
+
export let OutputSymbolFlags = /*#__PURE__*/function (OutputSymbolFlags) {
|
|
30
|
+
OutputSymbolFlags[OutputSymbolFlags["None"] = 0] = "None";
|
|
31
|
+
/**
|
|
32
|
+
* The symbol is an instance member container. Symbols with this flag will have a
|
|
33
|
+
* instanceMemberScope property that contains symbols for instance members.
|
|
34
|
+
*/
|
|
35
|
+
OutputSymbolFlags[OutputSymbolFlags["InstanceMemberContainer"] = 1] = "InstanceMemberContainer";
|
|
36
|
+
/**
|
|
37
|
+
* The symbol is a static member container. Symbols with this flag will have a
|
|
38
|
+
* staticMemberScope property that contains symbols for static members.
|
|
39
|
+
*/
|
|
40
|
+
OutputSymbolFlags[OutputSymbolFlags["StaticMemberContainer"] = 2] = "StaticMemberContainer";
|
|
41
|
+
/**
|
|
42
|
+
* Whether this symbol contains members of any kind.
|
|
43
|
+
*/
|
|
44
|
+
OutputSymbolFlags[OutputSymbolFlags["MemberContainer"] = 3] = "MemberContainer";
|
|
45
|
+
/**
|
|
46
|
+
* Whether this symbol is an instance member of another symbol (i.e that it is
|
|
47
|
+
* stored in an instance member scope).
|
|
48
|
+
*/
|
|
49
|
+
OutputSymbolFlags[OutputSymbolFlags["InstanceMember"] = 4] = "InstanceMember";
|
|
50
|
+
/**
|
|
51
|
+
* Whether this symbol is a static member of another symbol (i.e that it is
|
|
52
|
+
* stored in a static member scope).
|
|
53
|
+
*/
|
|
54
|
+
OutputSymbolFlags[OutputSymbolFlags["StaticMember"] = 8] = "StaticMember";
|
|
55
|
+
/**
|
|
56
|
+
* Transient symbols are not added to symbol tables and do not create
|
|
57
|
+
* referencable refkeys. They are used for temporary symbols that are intended
|
|
58
|
+
* to be used to calculate other symbols.
|
|
59
|
+
*/
|
|
60
|
+
OutputSymbolFlags[OutputSymbolFlags["Transient"] = 16] = "Transient";
|
|
61
|
+
/**
|
|
62
|
+
* This symbol aliases another symbol. Only its name, flags, and scope are
|
|
63
|
+
* stored in this symbol. Otherwise, everything else is located on the alias
|
|
64
|
+
* target.
|
|
65
|
+
*/
|
|
66
|
+
OutputSymbolFlags[OutputSymbolFlags["Alias"] = 32] = "Alias";
|
|
67
|
+
/**
|
|
68
|
+
* Whether this is an instance member or static member of another symbol.
|
|
69
|
+
*/
|
|
70
|
+
OutputSymbolFlags[OutputSymbolFlags["Member"] = 12] = "Member";
|
|
71
|
+
return OutputSymbolFlags;
|
|
72
|
+
}({});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/symbols/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/symbols/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC"}
|
|
@@ -2,31 +2,9 @@ import { ReactiveFlags } from "@vue/reactivity";
|
|
|
2
2
|
import type { Binder } from "../binder.js";
|
|
3
3
|
import type { ReactiveUnionSetOptions } from "../reactive-union-set.js";
|
|
4
4
|
import type { Refkey } from "../refkey.js";
|
|
5
|
-
import {
|
|
5
|
+
import { OutputScopeFlags } from "./flags.js";
|
|
6
|
+
import type { OutputSymbol } from "./output-symbol.js";
|
|
6
7
|
import { SymbolTable } from "./symbol-table.js";
|
|
7
|
-
/**
|
|
8
|
-
* Flags that describe an output scope.
|
|
9
|
-
*/
|
|
10
|
-
export declare enum OutputScopeFlags {
|
|
11
|
-
None = 0,
|
|
12
|
-
/**
|
|
13
|
-
* This scope is a static member scope.
|
|
14
|
-
*/
|
|
15
|
-
StaticMemberScope = 1,
|
|
16
|
-
/**
|
|
17
|
-
* This scope is an instance member scope.
|
|
18
|
-
*/
|
|
19
|
-
InstanceMemberScope = 2,
|
|
20
|
-
/**
|
|
21
|
-
* This scope is transient, and only exists to be merged with other scopes.
|
|
22
|
-
*/
|
|
23
|
-
Transient = 4,
|
|
24
|
-
/**
|
|
25
|
-
* This scope is a member scope. Scopes with this flag will have an `owner`
|
|
26
|
-
* property that points to the symbol whose member this scope holds.
|
|
27
|
-
*/
|
|
28
|
-
MemberScope = 3
|
|
29
|
-
}
|
|
30
8
|
export interface OutputScopeOptions {
|
|
31
9
|
flags?: OutputScopeFlags;
|
|
32
10
|
kind?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"output-scope.d.ts","sourceRoot":"","sources":["../../../src/symbols/output-scope.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,aAAa,EAOd,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAG3C,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AACxE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAQ3C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"output-scope.d.ts","sourceRoot":"","sources":["../../../src/symbols/output-scope.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,aAAa,EAOd,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAG3C,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AACxE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAQ3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIhD,MAAM,WAAW,kBAAkB;IACjC,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,WAAW;;IAGtB;;OAEG;IACH,IAAI,IAAI,IAIO,MAAM,CADpB;IACD,IAAI,IAAI,CAAC,IAAI,EAAE,MAAM,EAIpB;IAGD;;OAEG;IACH,IAAI,EAAE,WAEL;IAID;;;OAGG;IACH,IAAI,IAAI,WAEP;IAGD;;OAEG;IACH,IAAI,KAAK,IAIQ,gBAAgB,CADhC;IACD,IAAI,KAAK,CAAC,KAAK,EAAE,gBAAgB,EAIhC;IAID,IAAI,QAAQ,4BAEX;IAGD;;;;OAIG;IACH,IAAI,MAAM,4BAET;IAGD;;;;OAIG;IACH,IAAI,KAAK,6BAER;IAGD;;OAEG;IACH,IAAI,OAAO,gBAEV;IAGD;;OAEG;IACH,IAAI,eAAe,sCAElB;IAGD,IAAI,WAAW,wBAEd;IAGD;;OAEG;IACH,IAAI,QAAQ,qBAEX;IAGD;;OAEG;IACH,IAAI,MAAM,uBAET;IAED,CAAC,aAAa,CAAC,IAAI,CAAC,OAAQ;gBAEhB,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,kBAAuB;IA6C1D,eAAe,CACb,MAAM,EAAE,WAAW,EACnB,OAAO,CAAC,EAAE,uBAAuB,CAAC,YAAY,CAAC;IAuBjD,eAAe,CACb,MAAM,EAAE,WAAW,EACnB,OAAO,CAAC,EAAE,uBAAuB,CAAC,YAAY,CAAC;IAsBjD,KAAK,CAAC,OAAO,GAAE;QAAE,MAAM,CAAC,EAAE,WAAW,CAAC;QAAC,KAAK,CAAC,EAAE,YAAY,CAAA;KAAO;CAiCnE"}
|
|
@@ -2,32 +2,8 @@ import { reactive, ReactiveFlags, shallowReactive, track, TrackOpTypes, trigger,
|
|
|
2
2
|
import { useBinder } from "../context/binder.js";
|
|
3
3
|
import { useScope } from "../context/scope.js";
|
|
4
4
|
import { formatScope, formatScopeName, trace, traceEffect, TracePhase } from "../tracer.js";
|
|
5
|
+
import { OutputScopeFlags } from "./flags.js";
|
|
5
6
|
import { SymbolTable } from "./symbol-table.js";
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Flags that describe an output scope.
|
|
9
|
-
*/
|
|
10
|
-
export let OutputScopeFlags = /*#__PURE__*/function (OutputScopeFlags) {
|
|
11
|
-
OutputScopeFlags[OutputScopeFlags["None"] = 0] = "None";
|
|
12
|
-
/**
|
|
13
|
-
* This scope is a static member scope.
|
|
14
|
-
*/
|
|
15
|
-
OutputScopeFlags[OutputScopeFlags["StaticMemberScope"] = 1] = "StaticMemberScope";
|
|
16
|
-
/**
|
|
17
|
-
* This scope is an instance member scope.
|
|
18
|
-
*/
|
|
19
|
-
OutputScopeFlags[OutputScopeFlags["InstanceMemberScope"] = 2] = "InstanceMemberScope";
|
|
20
|
-
/**
|
|
21
|
-
* This scope is transient, and only exists to be merged with other scopes.
|
|
22
|
-
*/
|
|
23
|
-
OutputScopeFlags[OutputScopeFlags["Transient"] = 4] = "Transient";
|
|
24
|
-
/**
|
|
25
|
-
* This scope is a member scope. Scopes with this flag will have an `owner`
|
|
26
|
-
* property that points to the symbol whose member this scope holds.
|
|
27
|
-
*/
|
|
28
|
-
OutputScopeFlags[OutputScopeFlags["MemberScope"] = 3] = "MemberScope";
|
|
29
|
-
return OutputScopeFlags;
|
|
30
|
-
}({});
|
|
31
7
|
let scopeCount = 0;
|
|
32
8
|
/**
|
|
33
9
|
* A container of symbols accessible within some scope in your output code.
|
|
@@ -1,53 +1,8 @@
|
|
|
1
1
|
import { ReactiveFlags } from "@vue/reactivity";
|
|
2
2
|
import type { Binder } from "../binder.js";
|
|
3
3
|
import { type Refkey } from "../refkey.js";
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
* Flags that describe an output symbol.
|
|
7
|
-
*/
|
|
8
|
-
export declare enum OutputSymbolFlags {
|
|
9
|
-
None = 0,
|
|
10
|
-
/**
|
|
11
|
-
* The symbol is an instance member container. Symbols with this flag will have a
|
|
12
|
-
* instanceMemberScope property that contains symbols for instance members.
|
|
13
|
-
*/
|
|
14
|
-
InstanceMemberContainer = 1,
|
|
15
|
-
/**
|
|
16
|
-
* The symbol is a static member container. Symbols with this flag will have a
|
|
17
|
-
* staticMemberScope property that contains symbols for static members.
|
|
18
|
-
*/
|
|
19
|
-
StaticMemberContainer = 2,
|
|
20
|
-
/**
|
|
21
|
-
* Whether this symbol contains members of any kind.
|
|
22
|
-
*/
|
|
23
|
-
MemberContainer = 3,
|
|
24
|
-
/**
|
|
25
|
-
* Whether this symbol is an instance member of another symbol (i.e that it is
|
|
26
|
-
* stored in an instance member scope).
|
|
27
|
-
*/
|
|
28
|
-
InstanceMember = 4,
|
|
29
|
-
/**
|
|
30
|
-
* Whether this symbol is a static member of another symbol (i.e that it is
|
|
31
|
-
* stored in a static member scope).
|
|
32
|
-
*/
|
|
33
|
-
StaticMember = 8,
|
|
34
|
-
/**
|
|
35
|
-
* Transient symbols are not added to symbol tables and do not create
|
|
36
|
-
* referencable refkeys. They are used for temporary symbols that are intended
|
|
37
|
-
* to be used to calculate other symbols.
|
|
38
|
-
*/
|
|
39
|
-
Transient = 16,
|
|
40
|
-
/**
|
|
41
|
-
* This symbol aliases another symbol. Only its name, flags, and scope are
|
|
42
|
-
* stored in this symbol. Otherwise, everything else is located on the alias
|
|
43
|
-
* target.
|
|
44
|
-
*/
|
|
45
|
-
Alias = 32,
|
|
46
|
-
/**
|
|
47
|
-
* Whether this is an instance member or static member of another symbol.
|
|
48
|
-
*/
|
|
49
|
-
Member = 12
|
|
50
|
-
}
|
|
4
|
+
import { OutputScopeFlags, OutputSymbolFlags } from "./flags.js";
|
|
5
|
+
import { OutputScope } from "./output-scope.js";
|
|
51
6
|
export interface OutputSymbolOptions {
|
|
52
7
|
binder?: Binder;
|
|
53
8
|
scope?: OutputScope;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"output-symbol.d.ts","sourceRoot":"","sources":["../../../src/symbols/output-symbol.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,aAAa,EAOd,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAI3C,OAAO,EAAoB,KAAK,MAAM,EAAE,MAAM,cAAc,CAAC;AAS7D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"output-symbol.d.ts","sourceRoot":"","sources":["../../../src/symbols/output-symbol.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,aAAa,EAOd,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAI3C,OAAO,EAAoB,KAAK,MAAM,EAAE,MAAM,cAAc,CAAC;AAS7D,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,MAAM,WAAW,mBAAmB;IAClC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,KAAK,CAAC,EAAE,iBAAiB,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,WAAW,CAAC,EAAE,YAAY,CAAC;CAC5B;AAID;;;;;;;;;GASG;AACH,qBAAa,YAAY;;IAEvB,IAAI,YAAY,WAEf;IAGD,IAAI,IAAI,IAIO,MAAM,CADpB;IACD,IAAI,IAAI,CAAC,IAAI,EAAE,MAAM,EASpB;IAGD,IAAI,EAAE,WAEL;IAGD,IAAI,KAAK,IAIQ,iBAAiB,CADjC;IACD,IAAI,KAAK,CAAC,KAAK,EAAE,iBAAiB,EAYjC;IAGD,IAAI,KAAK,IAKQ,WAAW,CAF3B;IAED,IAAI,KAAK,CAAC,KAAK,EAAE,WAAW,EAY3B;IAwBD,IAAI,MAAM,uBAET;IAGD,IAAI,OAAO,IAKU,MAAM,EAAE,CAF5B;IAED,IAAI,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAW5B;IAGD,IAAI,mBAAmB,4BAGtB;IAGD,IAAI,WAAW,6BAEd;IA2BD;;;OAGG;IACH,SAAS,CAAC,iBAAiB,CACzB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE;QACP,KAAK,CAAC,EAAE,YAAY,CAAC;QACrB,KAAK,CAAC,EAAE,gBAAgB,CAAC;KAC1B;IAUH,IAAI,iBAAiB,4BAGpB;IAyBD,IAAI,QAAQ,4BAEX;IAED;;;OAGG;IACH,CAAC,aAAa,CAAC,IAAI,CAAC,UAAQ;gBAEhB,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,mBAAwB;IA+B3D,MAAM;IASN;;;;;;OAMG;IACH,aAAa,CAAC,YAAY,EAAE,YAAY,GAAG,IAAI;IAuC/C;;;;OAIG;IACH,MAAM,CAAC,YAAY,EAAE,YAAY,GAAG,IAAI;IAiBxC;;OAEG;IACH,MAAM,CAAC,YAAY,EAAE,YAAY,GAAG,IAAI;IAqBxC;;;;;;;;;;;;OAYG;IACH,WAAW,CAAC,QAAQ,EAAE,WAAW,EAAE,UAAU,CAAC,EAAE,YAAY,GAAG,YAAY;CA8D5E"}
|
|
@@ -4,54 +4,8 @@ import { useMemberScope } from "../context/member-scope.js";
|
|
|
4
4
|
import { useScope } from "../context/scope.js";
|
|
5
5
|
import { isRefkey, refkey } from "../refkey.js";
|
|
6
6
|
import { formatScopeName, formatSymbol, formatSymbolName, trace, traceEffect, TracePhase } from "../tracer.js";
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
* Flags that describe an output symbol.
|
|
10
|
-
*/
|
|
11
|
-
export let OutputSymbolFlags = /*#__PURE__*/function (OutputSymbolFlags) {
|
|
12
|
-
OutputSymbolFlags[OutputSymbolFlags["None"] = 0] = "None";
|
|
13
|
-
/**
|
|
14
|
-
* The symbol is an instance member container. Symbols with this flag will have a
|
|
15
|
-
* instanceMemberScope property that contains symbols for instance members.
|
|
16
|
-
*/
|
|
17
|
-
OutputSymbolFlags[OutputSymbolFlags["InstanceMemberContainer"] = 1] = "InstanceMemberContainer";
|
|
18
|
-
/**
|
|
19
|
-
* The symbol is a static member container. Symbols with this flag will have a
|
|
20
|
-
* staticMemberScope property that contains symbols for static members.
|
|
21
|
-
*/
|
|
22
|
-
OutputSymbolFlags[OutputSymbolFlags["StaticMemberContainer"] = 2] = "StaticMemberContainer";
|
|
23
|
-
/**
|
|
24
|
-
* Whether this symbol contains members of any kind.
|
|
25
|
-
*/
|
|
26
|
-
OutputSymbolFlags[OutputSymbolFlags["MemberContainer"] = 3] = "MemberContainer";
|
|
27
|
-
/**
|
|
28
|
-
* Whether this symbol is an instance member of another symbol (i.e that it is
|
|
29
|
-
* stored in an instance member scope).
|
|
30
|
-
*/
|
|
31
|
-
OutputSymbolFlags[OutputSymbolFlags["InstanceMember"] = 4] = "InstanceMember";
|
|
32
|
-
/**
|
|
33
|
-
* Whether this symbol is a static member of another symbol (i.e that it is
|
|
34
|
-
* stored in a static member scope).
|
|
35
|
-
*/
|
|
36
|
-
OutputSymbolFlags[OutputSymbolFlags["StaticMember"] = 8] = "StaticMember";
|
|
37
|
-
/**
|
|
38
|
-
* Transient symbols are not added to symbol tables and do not create
|
|
39
|
-
* referencable refkeys. They are used for temporary symbols that are intended
|
|
40
|
-
* to be used to calculate other symbols.
|
|
41
|
-
*/
|
|
42
|
-
OutputSymbolFlags[OutputSymbolFlags["Transient"] = 16] = "Transient";
|
|
43
|
-
/**
|
|
44
|
-
* This symbol aliases another symbol. Only its name, flags, and scope are
|
|
45
|
-
* stored in this symbol. Otherwise, everything else is located on the alias
|
|
46
|
-
* target.
|
|
47
|
-
*/
|
|
48
|
-
OutputSymbolFlags[OutputSymbolFlags["Alias"] = 32] = "Alias";
|
|
49
|
-
/**
|
|
50
|
-
* Whether this is an instance member or static member of another symbol.
|
|
51
|
-
*/
|
|
52
|
-
OutputSymbolFlags[OutputSymbolFlags["Member"] = 12] = "Member";
|
|
53
|
-
return OutputSymbolFlags;
|
|
54
|
-
}({});
|
|
7
|
+
import { OutputScopeFlags, OutputSymbolFlags } from "./flags.js";
|
|
8
|
+
import { OutputScope } from "./output-scope.js";
|
|
55
9
|
let symbolCount = 0;
|
|
56
10
|
|
|
57
11
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"symbol-flow.d.ts","sourceRoot":"","sources":["../../../src/symbols/symbol-flow.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"symbol-flow.d.ts","sourceRoot":"","sources":["../../../src/symbols/symbol-flow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,GAAG,EAAmB,MAAM,iBAAiB,CAAC;AAM9D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,MAAM,WAAW,kBAAkB;IACjC,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAAC;CAC9B;AAED,MAAM,WAAW,mBAAmB;IAClC,CAAC,OAAO,EAAE,GAAG,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC;CACpC;AAED,wBAAgB,WAAW,CAAC,EAAE,CAAC,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI,gEAiB9D;AAED,wBAAgB,UAAU,CACxB,MAAM,EAAE,YAAY,GAAG,GAAG,CAAC,YAAY,GAAG,SAAS,CAAC,QA+CrD;AAED,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,YAAY,QAU1D;AAED,wBAAgB,yBAAyB,CAAC,UAAU,EAAE,YAAY,QAEjE"}
|