@alloy-js/core 0.10.0 → 0.12.0
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/CHANGELOG.md +28 -0
- package/dist/src/binder.d.ts.map +1 -1
- package/dist/src/binder.js +100 -19
- package/dist/src/code.js +1 -2
- package/dist/src/components/Block.js +2 -5
- package/dist/src/components/Declaration.js +2 -4
- package/dist/src/components/For.d.ts +2 -2
- package/dist/src/components/For.d.ts.map +1 -1
- package/dist/src/components/For.js +1 -2
- package/dist/src/components/Indent.js +2 -4
- package/dist/src/components/List.js +2 -5
- package/dist/src/components/MemberDeclaration.js +2 -4
- package/dist/src/components/MemberName.js +1 -2
- package/dist/src/components/MemberScope.js +2 -4
- package/dist/src/components/Name.js +1 -2
- package/dist/src/components/Output.js +2 -4
- package/dist/src/components/Prose.js +1 -2
- package/dist/src/components/ReferenceOrContent.d.ts +8 -0
- package/dist/src/components/ReferenceOrContent.d.ts.map +1 -0
- package/dist/src/components/ReferenceOrContent.js +11 -0
- package/dist/src/components/Scope.js +2 -4
- package/dist/src/components/Show.js +1 -2
- package/dist/src/components/SourceDirectory.js +2 -4
- package/dist/src/components/SourceFile.js +2 -5
- package/dist/src/components/StatementList.js +2 -4
- package/dist/src/components/Switch.d.ts +1 -1
- package/dist/src/components/Switch.d.ts.map +1 -1
- package/dist/src/components/Switch.js +1 -2
- package/dist/src/components/Wrap.js +2 -4
- package/dist/src/components/index.d.ts +1 -0
- package/dist/src/components/index.d.ts.map +1 -1
- package/dist/src/components/index.js +2 -2
- package/dist/src/components/stc/index.d.ts +1 -0
- package/dist/src/components/stc/index.d.ts.map +1 -1
- package/dist/src/components/stc/index.js +2 -2
- package/dist/src/components/stc/sti.js +1 -2
- package/dist/src/context/assignment.js +1 -2
- package/dist/src/context/binder.js +1 -2
- package/dist/src/context/declaration.js +1 -2
- package/dist/src/context/index.js +1 -2
- package/dist/src/context/member-declaration.js +1 -2
- package/dist/src/context/member-scope.js +1 -2
- package/dist/src/context/name-policy.js +1 -2
- package/dist/src/context/scope.js +1 -2
- package/dist/src/context/source-directory.js +1 -2
- package/dist/src/context/source-file.js +1 -2
- package/dist/src/context.js +1 -2
- package/dist/src/debug.js +13 -15
- package/dist/src/index.browser.js +1 -2
- package/dist/src/index.js +1 -2
- package/dist/src/jsx-runtime.d.ts +1 -1
- package/dist/src/jsx-runtime.d.ts.map +1 -1
- package/dist/src/jsx-runtime.js +10 -5
- package/dist/src/name-policy.js +1 -2
- package/dist/src/refkey.js +1 -2
- package/dist/src/render.d.ts.map +1 -1
- package/dist/src/render.js +6 -2
- package/dist/src/scheduler.d.ts +8 -0
- package/dist/src/scheduler.d.ts.map +1 -0
- package/dist/src/scheduler.js +17 -0
- package/dist/src/slot.js +1 -2
- package/dist/src/stc.js +1 -2
- package/dist/src/sti.js +1 -2
- package/dist/src/tap.js +1 -2
- package/dist/src/tsdoc-metadata.json +1 -1
- package/dist/src/utils.js +2 -4
- package/dist/src/write-output.browser.js +1 -2
- package/dist/src/write-output.js +1 -2
- package/dist/test/browser-build.test.js +85 -0
- package/dist/test/children.test.js +27 -0
- package/dist/test/components/block.test.js +45 -0
- package/dist/test/components/declaration.test.js +32 -0
- package/dist/test/components/list.test.js +86 -0
- package/dist/test/components/prose.test.js +25 -0
- package/dist/test/components/reference-or-content.test.d.ts +2 -0
- package/dist/test/components/reference-or-content.test.d.ts.map +1 -0
- package/dist/test/components/reference-or-content.test.js +149 -0
- package/dist/test/components/slot.test.js +134 -0
- package/dist/test/components/source-file.test.js +64 -0
- package/dist/test/components/wrap.test.js +35 -0
- package/dist/test/control-flow/for.test.js +219 -0
- package/dist/test/control-flow/match.test.js +67 -0
- package/dist/test/control-flow/show.test.js +29 -0
- package/dist/test/name-policy.test.js +19 -0
- package/dist/test/props-with-defaults.test.js +93 -0
- package/dist/test/reactivity/circular-reactives.test.d.ts +2 -0
- package/dist/test/reactivity/circular-reactives.test.d.ts.map +1 -0
- package/dist/test/reactivity/circular-reactives.test.js +31 -0
- package/dist/test/reactivity/cleanup.test.js +82 -0
- package/dist/test/reactivity/memo.test.js +16 -0
- package/dist/test/reactivity/ref-rendering.test.js +37 -0
- package/dist/test/reactivity/test.test.js +61 -0
- package/dist/test/reactivity/untrack.test.js +26 -0
- package/dist/test/refkey.test.js +25 -0
- package/dist/test/rendering/basic.test.js +96 -0
- package/dist/test/rendering/code.test.js +55 -0
- package/dist/test/rendering/formatting.test.js +402 -0
- package/dist/test/rendering/indent.test.js +90 -0
- package/dist/test/rendering/memoization.test.js +27 -0
- package/dist/test/rendering/refkeys.test.js +32 -0
- package/dist/test/split-props.test.js +77 -0
- package/dist/test/stc.test.js +34 -0
- package/dist/test/symbols.test.js +877 -0
- package/dist/test/utils.test.d.ts.map +1 -1
- package/dist/test/utils.test.js +223 -0
- package/dist/testing/extend-expect.js +1 -2
- package/dist/testing/index.js +1 -2
- package/dist/testing/render.js +1 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +14 -22
- package/src/binder.ts +100 -17
- package/src/components/For.tsx +6 -6
- package/src/components/ReferenceOrContent.tsx +22 -0
- package/src/components/index.tsx +1 -0
- package/src/components/stc/index.ts +1 -0
- package/src/debug.ts +12 -13
- package/src/jsx-runtime.ts +24 -14
- package/src/render.ts +5 -0
- package/src/scheduler.ts +24 -0
- package/temp/api.json +216 -15
- package/test/components/declaration.test.tsx +2 -0
- package/test/components/list.test.tsx +0 -1
- package/test/components/reference-or-content.test.tsx +138 -0
- package/test/control-flow/for.test.tsx +34 -4
- package/test/reactivity/circular-reactives.test.tsx +32 -0
- package/test/reactivity/cleanup.test.tsx +5 -0
- package/test/reactivity/untrack.test.ts +3 -0
- package/test/rendering/memoization.test.tsx +2 -0
- package/test/symbols.test.ts +392 -13
- package/test/utils.test.tsx +2 -0
- package/babel.config.cjs +0 -4
- package/dist/src/binder.js.map +0 -1
- package/dist/src/code.js.map +0 -1
- package/dist/src/components/Block.js.map +0 -1
- package/dist/src/components/Declaration.js.map +0 -1
- package/dist/src/components/For.js.map +0 -1
- package/dist/src/components/Indent.js.map +0 -1
- package/dist/src/components/List.js.map +0 -1
- package/dist/src/components/MemberDeclaration.js.map +0 -1
- package/dist/src/components/MemberName.js.map +0 -1
- package/dist/src/components/MemberScope.js.map +0 -1
- package/dist/src/components/Name.js.map +0 -1
- package/dist/src/components/Output.js.map +0 -1
- package/dist/src/components/Prose.js.map +0 -1
- package/dist/src/components/Scope.js.map +0 -1
- package/dist/src/components/Show.js.map +0 -1
- package/dist/src/components/SourceDirectory.js.map +0 -1
- package/dist/src/components/SourceFile.js.map +0 -1
- package/dist/src/components/StatementList.js.map +0 -1
- package/dist/src/components/Switch.js.map +0 -1
- package/dist/src/components/Wrap.js.map +0 -1
- package/dist/src/components/index.js.map +0 -1
- package/dist/src/components/stc/index.js.map +0 -1
- package/dist/src/components/stc/sti.js.map +0 -1
- package/dist/src/context/assignment.js.map +0 -1
- package/dist/src/context/binder.js.map +0 -1
- package/dist/src/context/declaration.js.map +0 -1
- package/dist/src/context/index.js.map +0 -1
- package/dist/src/context/member-declaration.js.map +0 -1
- package/dist/src/context/member-scope.js.map +0 -1
- package/dist/src/context/name-policy.js.map +0 -1
- package/dist/src/context/scope.js.map +0 -1
- package/dist/src/context/source-directory.js.map +0 -1
- package/dist/src/context/source-file.js.map +0 -1
- package/dist/src/context.js.map +0 -1
- package/dist/src/debug.js.map +0 -1
- package/dist/src/index.browser.js.map +0 -1
- package/dist/src/index.js.map +0 -1
- package/dist/src/jsx-runtime.js.map +0 -1
- package/dist/src/name-policy.js.map +0 -1
- package/dist/src/refkey.js.map +0 -1
- package/dist/src/render.js.map +0 -1
- package/dist/src/slot.js.map +0 -1
- package/dist/src/stc.js.map +0 -1
- package/dist/src/sti.js.map +0 -1
- package/dist/src/tap.js.map +0 -1
- package/dist/src/utils.js.map +0 -1
- package/dist/src/write-output.browser.js.map +0 -1
- package/dist/src/write-output.js.map +0 -1
- package/dist/testing/extend-expect.js.map +0 -1
- package/dist/testing/index.js.map +0 -1
- package/dist/testing/render.js.map +0 -1
- package/dist/testing/vitest.d.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# Changelog - @alloy-js/core
|
|
2
2
|
|
|
3
|
+
## 0.12.0
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
- [#134](https://github.com/alloy-framework/alloy/pull/134) Support readonly collection in `<For>` `each` prop.
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
- [#114](https://github.com/alloy-framework/alloy/pull/114) instantiateSymbolInto now mirrors both instance and static members (including nested static hierarchies), and no longer errors on static-only sources.
|
|
12
|
+
|
|
13
|
+
### Breaking Changes
|
|
14
|
+
|
|
15
|
+
- [#127](https://github.com/alloy-framework/alloy/pull/127) Use a scheduler for effects. Effects are no longer run instantly but are queued to run after the current effect finishes. This significantly reduces effect calls due to coalescing multiple updates and also enables more recursive patterns.
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
## 0.11.0
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
- [#91](https://github.com/alloy-framework/alloy/pull/91) `taggedComponent` return type updated to make tag as a required property
|
|
23
|
+
- [#97](https://github.com/alloy-framework/alloy/pull/97) Update `ForCallbackArgs` to handle arrays early, before unions of arrays are distributed. This mitigates a nasty typechecking bug that appears when the type of elements passed to `For` are a union of arrays.
|
|
24
|
+
|
|
25
|
+
### Features
|
|
26
|
+
|
|
27
|
+
- [#104](https://github.com/alloy-framework/alloy/pull/104) Add new `<ReferenceOrContent />` component
|
|
28
|
+
- [#105](https://github.com/alloy-framework/alloy/pull/105) Updated dependencies
|
|
29
|
+
|
|
30
|
+
|
|
3
31
|
## 0.10.0
|
|
4
32
|
|
|
5
33
|
No changes, version bump only.
|
package/dist/src/binder.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"binder.d.ts","sourceRoot":"","sources":["../../src/binder.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"binder.d.ts","sourceRoot":"","sources":["../../src/binder.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,GAAG,EAGJ,MAAM,iBAAiB,CAAC;AAKzB,OAAO,EAAU,MAAM,EAAE,MAAM,aAAa,CAAC;AAE7C,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC;AAE9B;;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;;OAEG;IACH,MAAM,KAAgC;CACvC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,KAAK,EAAE,iBAAiB,CAAC;IAEzB;;OAEG;IACH,KAAK,EAAE,WAAW,CAAC;IAEnB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,OAAO,EAAE,MAAM,EAAE,CAAC;IAElB;;;;;;;;;;;OAWG;IACH,mBAAmB,CAAC,EAAE,WAAW,CAAC;IAElC;;;;;;;;OAQG;IACH,iBAAiB,CAAC,EAAE,WAAW,CAAC;IAEhC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACnC;AAED;;GAEG;AACH,oBAAY,gBAAgB;IAC1B,IAAI,IAAI;IAER;;OAEG;IACH,iBAAiB,IAAS;IAE1B;;OAEG;IACH,mBAAmB,IAAS;IAE5B;;;OAGG;IACH,WAAW,IAA0C;CACtD;AAED;;;;;;;;;;;;;;;;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EAAE,OAAO,CAAC,CAAC,CAUxD;AAED,QAAA,MAAM,mBAAmB,EAAE,OAAO,MAAiB,CAAC;AACpD,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,aAAa,GACrB,aAAa,CAAC,OAAO,mBAAmB,CAAC,CAE3C;AAED,wBAAgB,sBAAsB,IAAI,OAAO,mBAAmB,CAEnE;AAED,MAAM,WAAW,aAAa;IAC5B,CAAC,mBAAmB,CAAC,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7C;AAaD;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAC7B,KAAK,GAAE,iBAA0C,2BAelD"}
|
package/dist/src/binder.js
CHANGED
|
@@ -1,19 +1,42 @@
|
|
|
1
|
-
import { computed,
|
|
1
|
+
import { computed, reactive, ref, shallowRef } from "@vue/reactivity";
|
|
2
2
|
import { useBinder } from "./context/binder.js";
|
|
3
3
|
import { useMemberScope } from "./context/member-scope.js";
|
|
4
4
|
import { useScope } from "./context/scope.js";
|
|
5
|
-
import { memo, untrack } from "./jsx-runtime.js";
|
|
5
|
+
import { effect, memo, onCleanup, untrack } from "./jsx-runtime.js";
|
|
6
6
|
import { refkey } from "./refkey.js";
|
|
7
|
+
import { queueJob } from "./scheduler.js";
|
|
7
8
|
/**
|
|
8
9
|
* Flags that describe an output symbol.
|
|
9
10
|
*/
|
|
10
11
|
export let OutputSymbolFlags = /*#__PURE__*/function (OutputSymbolFlags) {
|
|
11
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
|
+
*/
|
|
12
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
|
+
*/
|
|
13
22
|
OutputSymbolFlags[OutputSymbolFlags["StaticMemberContainer"] = 2] = "StaticMemberContainer";
|
|
23
|
+
/**
|
|
24
|
+
* Whether this symbol contains members of any kind.
|
|
25
|
+
*/
|
|
14
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
|
+
*/
|
|
15
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
|
+
*/
|
|
16
36
|
OutputSymbolFlags[OutputSymbolFlags["StaticMember"] = 8] = "StaticMember";
|
|
37
|
+
/**
|
|
38
|
+
* Whether this is an instance member or static member of another symbol.
|
|
39
|
+
*/
|
|
17
40
|
OutputSymbolFlags[OutputSymbolFlags["Member"] = 12] = "Member";
|
|
18
41
|
return OutputSymbolFlags;
|
|
19
42
|
}({});
|
|
@@ -41,8 +64,18 @@ export let OutputSymbolFlags = /*#__PURE__*/function (OutputSymbolFlags) {
|
|
|
41
64
|
*/
|
|
42
65
|
export let OutputScopeFlags = /*#__PURE__*/function (OutputScopeFlags) {
|
|
43
66
|
OutputScopeFlags[OutputScopeFlags["None"] = 0] = "None";
|
|
67
|
+
/**
|
|
68
|
+
* This scope is a static member scope.
|
|
69
|
+
*/
|
|
44
70
|
OutputScopeFlags[OutputScopeFlags["StaticMemberScope"] = 1] = "StaticMemberScope";
|
|
71
|
+
/**
|
|
72
|
+
* This scope is an instance member scope.
|
|
73
|
+
*/
|
|
45
74
|
OutputScopeFlags[OutputScopeFlags["InstanceMemberScope"] = 2] = "InstanceMemberScope";
|
|
75
|
+
/**
|
|
76
|
+
* This scope is a member scope. Scopes with this flag will have an `owner`
|
|
77
|
+
* property that points to the symbol whose member this scope holds.
|
|
78
|
+
*/
|
|
46
79
|
OutputScopeFlags[OutputScopeFlags["MemberScope"] = 3] = "MemberScope";
|
|
47
80
|
return OutputScopeFlags;
|
|
48
81
|
}({});
|
|
@@ -138,6 +171,7 @@ export function createOutputBinder(options = {}) {
|
|
|
138
171
|
const waitingDeclarations = new Map();
|
|
139
172
|
const waitingSymbolNames = new Map();
|
|
140
173
|
const waitingScopeNames = new Map();
|
|
174
|
+
const deconflictJobs = new Map();
|
|
141
175
|
return binder;
|
|
142
176
|
function createScope(args) {
|
|
143
177
|
const {
|
|
@@ -262,23 +296,55 @@ export function createOutputBinder(options = {}) {
|
|
|
262
296
|
}
|
|
263
297
|
}
|
|
264
298
|
function instantiateSymbolInto(source, target) {
|
|
265
|
-
if (
|
|
266
|
-
|
|
299
|
+
if (target.staticMemberScope) {
|
|
300
|
+
return;
|
|
267
301
|
}
|
|
268
|
-
|
|
302
|
+
|
|
303
|
+
// Ensure static member scope exists
|
|
304
|
+
addStaticMembersToSymbol(target);
|
|
269
305
|
effect(() => {
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
flags: sym.flags | OutputSymbolFlags.InstanceMember
|
|
279
|
-
});
|
|
306
|
+
// copy instance members if it's an instance‐container
|
|
307
|
+
if (source.flags & OutputSymbolFlags.InstanceMemberContainer) {
|
|
308
|
+
copyMembers(source.instanceMemberScope.symbols, target, target.staticMemberScope);
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
// copy static members if it's a static‐container
|
|
312
|
+
if (source.flags & OutputSymbolFlags.StaticMemberContainer) {
|
|
313
|
+
copyMembers(source.staticMemberScope.symbols, target, target.staticMemberScope);
|
|
280
314
|
}
|
|
281
315
|
});
|
|
316
|
+
|
|
317
|
+
/**
|
|
318
|
+
* Recursively copy `symbols` from `sourceSym` into `intoScope` of `targetSym`.
|
|
319
|
+
* Always marks each instantiation as StaticMember so lookups use dot notation (e.g. Parent.child)
|
|
320
|
+
* and preserves any StaticMemberContainer flag to auto create newSym.staticMemberScope.
|
|
321
|
+
*/
|
|
322
|
+
function copyMembers(symbols, targetSym, intoScope) {
|
|
323
|
+
for (const srcSym of symbols) {
|
|
324
|
+
untrack(() => {
|
|
325
|
+
const wantKey = refkey(targetSym.refkeys[0], srcSym.refkeys[0]);
|
|
326
|
+
|
|
327
|
+
// create the new symbol. Preserve StaticMemberContainer if present
|
|
328
|
+
const newSym = createSymbol({
|
|
329
|
+
name: srcSym.name,
|
|
330
|
+
scope: intoScope,
|
|
331
|
+
refkey: wantKey,
|
|
332
|
+
flags: srcSym.flags | OutputSymbolFlags.StaticMember
|
|
333
|
+
});
|
|
334
|
+
onCleanup(() => {
|
|
335
|
+
binder.deleteSymbol(newSym);
|
|
336
|
+
});
|
|
337
|
+
|
|
338
|
+
// if the source symbol itself was a container of static members,
|
|
339
|
+
// recurse into the newSym.staticMemberScope that createSymbol just gave us
|
|
340
|
+
if (srcSym.staticMemberScope && srcSym.staticMemberScope.symbols.size > 0) {
|
|
341
|
+
// ensure we have that scope
|
|
342
|
+
addStaticMembersToSymbol(newSym);
|
|
343
|
+
copyMembers(srcSym.staticMemberScope.symbols, newSym, newSym.staticMemberScope);
|
|
344
|
+
}
|
|
345
|
+
});
|
|
346
|
+
}
|
|
347
|
+
}
|
|
282
348
|
}
|
|
283
349
|
function addStaticMembersToSymbol(symbol) {
|
|
284
350
|
if (symbol.flags & OutputSymbolFlags.StaticMemberContainer) {
|
|
@@ -381,12 +447,12 @@ export function createOutputBinder(options = {}) {
|
|
|
381
447
|
}
|
|
382
448
|
function deconflict(symbol) {
|
|
383
449
|
const scope = symbol.scope;
|
|
384
|
-
const existingNames = [...scope.symbols].filter(sym => sym.
|
|
450
|
+
const existingNames = [...scope.symbols].filter(sym => sym.name === symbol.name);
|
|
385
451
|
if (existingNames.length < 2) {
|
|
386
452
|
return;
|
|
387
453
|
}
|
|
388
454
|
if (options.nameConflictResolver) {
|
|
389
|
-
|
|
455
|
+
queueJob(deconflictJobForScopeAndName(scope, symbol.name, options.nameConflictResolver));
|
|
390
456
|
} else {
|
|
391
457
|
// default disambiguation is first-wins
|
|
392
458
|
for (let i = 1; i < existingNames.length; i++) {
|
|
@@ -394,6 +460,22 @@ export function createOutputBinder(options = {}) {
|
|
|
394
460
|
}
|
|
395
461
|
}
|
|
396
462
|
}
|
|
463
|
+
function deconflictJobForScopeAndName(scope, name, handler) {
|
|
464
|
+
if (!deconflictJobs.has(scope)) {
|
|
465
|
+
deconflictJobs.set(scope, new Map());
|
|
466
|
+
}
|
|
467
|
+
const jobs = deconflictJobs.get(scope);
|
|
468
|
+
if (jobs.has(name)) {
|
|
469
|
+
return jobs.get(name);
|
|
470
|
+
}
|
|
471
|
+
const job = () => {
|
|
472
|
+
const conflictedSymbols = [...scope.symbols].filter(sym => sym.name === name);
|
|
473
|
+
handler(name, conflictedSymbols);
|
|
474
|
+
jobs.delete(name);
|
|
475
|
+
};
|
|
476
|
+
jobs.set(name, job);
|
|
477
|
+
return job;
|
|
478
|
+
}
|
|
397
479
|
function getSymbolForRefkey(refkey) {
|
|
398
480
|
const symbol = knownDeclarations.get(refkey);
|
|
399
481
|
if (symbol) {
|
|
@@ -573,5 +655,4 @@ export function useDefaultScope(flags = OutputSymbolFlags.None) {
|
|
|
573
655
|
return memberScope.staticMembers;
|
|
574
656
|
}
|
|
575
657
|
}
|
|
576
|
-
}
|
|
577
|
-
//# sourceMappingURL=binder.js.map
|
|
658
|
+
}
|
package/dist/src/code.js
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { createIntrinsic as _$createIntrinsic } from "@alloy-js/core/jsx-runtime";
|
|
2
|
-
import { createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
|
|
3
|
-
import { memo as _$memo } from "@alloy-js/core/jsx-runtime";
|
|
1
|
+
import { memo as _$memo, createComponent as _$createComponent, createIntrinsic as _$createIntrinsic } from "@alloy-js/core/jsx-runtime";
|
|
4
2
|
import { childrenArray, computed, Indent } from "@alloy-js/core";
|
|
5
3
|
/**
|
|
6
4
|
* Create an indented block of source text. The block has `opener` text which is
|
|
@@ -22,5 +20,4 @@ export function Block(props) {
|
|
|
22
20
|
}), _$memo(() => props.closer ?? "}")];
|
|
23
21
|
}
|
|
24
22
|
});
|
|
25
|
-
}
|
|
26
|
-
//# sourceMappingURL=Block.js.map
|
|
23
|
+
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
|
|
2
|
-
import { memo as _$memo } from "@alloy-js/core/jsx-runtime";
|
|
1
|
+
import { memo as _$memo, createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
|
|
3
2
|
import { useContext } from "../context.js";
|
|
4
3
|
import { BinderContext } from "../context/binder.js";
|
|
5
4
|
import { DeclarationContext } from "../context/declaration.js";
|
|
@@ -55,5 +54,4 @@ export function Declaration(props) {
|
|
|
55
54
|
return props.children;
|
|
56
55
|
}
|
|
57
56
|
});
|
|
58
|
-
}
|
|
59
|
-
//# sourceMappingURL=Declaration.js.map
|
|
57
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Children } from "@alloy-js/core/jsx-runtime";
|
|
2
2
|
import { Ref } from "@vue/reactivity";
|
|
3
3
|
import { BaseListProps } from "./List.jsx";
|
|
4
|
-
export type ForCallbackArgs<T> = T extends Ref<infer U> ? ForCallbackArgs<U> : T extends () => infer U ? ForCallbackArgs<U> : T extends
|
|
4
|
+
export type ForCallbackArgs<T> = number extends keyof T ? [value: T[number]] : T extends Ref<infer U> ? ForCallbackArgs<U> : T extends () => infer U ? ForCallbackArgs<U> : T extends Map<infer U, infer V> ? [key: U, value: V] : T extends Set<infer U> ? [value: U] : T extends IterableIterator<infer U> ? [value: U] : [];
|
|
5
5
|
export interface ForProps<T extends ForSupportedCollections | (() => ForSupportedCollections) | Ref<ForSupportedCollections>, U extends Children> extends BaseListProps {
|
|
6
6
|
/**
|
|
7
7
|
* The array to iterate over.
|
|
@@ -18,7 +18,7 @@ export interface ForProps<T extends ForSupportedCollections | (() => ForSupporte
|
|
|
18
18
|
*/
|
|
19
19
|
skipFalsy?: boolean;
|
|
20
20
|
}
|
|
21
|
-
export type ForSupportedCollections =
|
|
21
|
+
export type ForSupportedCollections = readonly unknown[] | ReadonlyMap<unknown, unknown> | ReadonlySet<unknown> | IterableIterator<unknown>;
|
|
22
22
|
/**
|
|
23
23
|
* The For component iterates over the provided array and invokes the child
|
|
24
24
|
* callback for each item. It can optionally be provided with a `joiner` which
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"For.d.ts","sourceRoot":"","sources":["../../../src/components/For.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAQ,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAS,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAE7C,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C,MAAM,MAAM,eAAe,CAAC,CAAC,IAC3B,
|
|
1
|
+
{"version":3,"file":"For.d.ts","sourceRoot":"","sources":["../../../src/components/For.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAQ,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAS,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAE7C,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C,MAAM,MAAM,eAAe,CAAC,CAAC,IAC3B,MAAM,SAAS,MAAM,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,GACzC,CAAC,SAAS,GAAG,CAAC,MAAM,CAAC,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,GAC3C,CAAC,SAAS,MAAM,MAAM,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,GAC5C,CAAC,SAAS,GAAG,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,GACpD,CAAC,SAAS,GAAG,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC,GACnC,CAAC,SAAS,gBAAgB,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC,GAChD,EAAE,CAAC;AAEP,MAAM,WAAW,QAAQ,CACvB,CAAC,SACG,uBAAuB,GACvB,CAAC,MAAM,uBAAuB,CAAC,GAC/B,GAAG,CAAC,uBAAuB,CAAC,EAChC,CAAC,SAAS,QAAQ,CAClB,SAAQ,aAAa;IACrB;;OAEG;IACH,IAAI,EAAE,CAAC,CAAC;IAER;;OAEG;IACH,QAAQ,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;IAEjE;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,MAAM,uBAAuB,GAC/B,SAAS,OAAO,EAAE,GAClB,WAAW,CAAC,OAAO,EAAE,OAAO,CAAC,GAC7B,WAAW,CAAC,OAAO,CAAC,GACpB,gBAAgB,CAAC,OAAO,CAAC,CAAC;AAC9B;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,GAAG,CACjB,CAAC,SACG,uBAAuB,GACvB,CAAC,MAAM,uBAAuB,CAAC,GAC/B,GAAG,CAAC,uBAAuB,CAAC,EAChC,CAAC,SAAS,QAAQ,EAClB,KAAK,EAAE,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,aAetB"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { memo as _$memo } from "@alloy-js/core/jsx-runtime";
|
|
2
|
-
import { createIntrinsic as _$createIntrinsic } from "@alloy-js/core/jsx-runtime";
|
|
1
|
+
import { createIntrinsic as _$createIntrinsic, memo as _$memo } from "@alloy-js/core/jsx-runtime";
|
|
3
2
|
/**
|
|
4
3
|
* Create an indented block of source text. The indented block starts a new line
|
|
5
4
|
* at the new indentation level and, with `trailingBreak`, ends with a new line
|
|
@@ -13,5 +12,4 @@ export function Indent(props) {
|
|
|
13
12
|
return [breakElem, _$memo(() => props.children)];
|
|
14
13
|
}
|
|
15
14
|
}), _$memo(() => props.trailingBreak && breakElem)];
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=Indent.js.map
|
|
15
|
+
}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
|
|
2
|
-
import { mergeProps as _$mergeProps } from "@alloy-js/core/jsx-runtime";
|
|
3
|
-
import { memo, splitProps } from "@alloy-js/core/jsx-runtime";
|
|
1
|
+
import { memo, splitProps, mergeProps as _$mergeProps, createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
|
|
4
2
|
import { childrenArray } from "../utils.js";
|
|
5
3
|
import { For } from "./For.js";
|
|
6
4
|
/**
|
|
@@ -21,5 +19,4 @@ export function List(props) {
|
|
|
21
19
|
skipFalsy: true,
|
|
22
20
|
children: child => child
|
|
23
21
|
}));
|
|
24
|
-
}
|
|
25
|
-
//# sourceMappingURL=List.js.map
|
|
22
|
+
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
|
|
2
|
-
import { memo as _$memo } from "@alloy-js/core/jsx-runtime";
|
|
1
|
+
import { memo as _$memo, createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
|
|
3
2
|
import { OutputSymbolFlags } from "../binder.js";
|
|
4
3
|
import { useContext } from "../context.js";
|
|
5
4
|
import { BinderContext } from "../context/binder.js";
|
|
@@ -59,5 +58,4 @@ export function MemberDeclaration(props) {
|
|
|
59
58
|
return props.children;
|
|
60
59
|
}
|
|
61
60
|
});
|
|
62
|
-
}
|
|
63
|
-
//# sourceMappingURL=MemberDeclaration.js.map
|
|
61
|
+
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
|
|
2
|
-
import { memo as _$memo } from "@alloy-js/core/jsx-runtime";
|
|
1
|
+
import { memo as _$memo, createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
|
|
3
2
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
4
3
|
|
|
5
4
|
import { MemberScopeContext } from "../context/member-scope.js";
|
|
@@ -26,5 +25,4 @@ export function MemberScope(props) {
|
|
|
26
25
|
return props.children;
|
|
27
26
|
}
|
|
28
27
|
});
|
|
29
|
-
}
|
|
30
|
-
//# sourceMappingURL=MemberScope.js.map
|
|
28
|
+
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { memo as _$memo } from "@alloy-js/core/jsx-runtime";
|
|
2
|
-
import { createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
|
|
1
|
+
import { createComponent as _$createComponent, memo as _$memo } from "@alloy-js/core/jsx-runtime";
|
|
3
2
|
import { createOutputBinder, getSymbolCreator } from "../binder.js";
|
|
4
3
|
import { BinderContext } from "../context/binder.js";
|
|
5
4
|
import { NamePolicyContext } from "../context/name-policy.js";
|
|
@@ -52,5 +51,4 @@ export function Output(props) {
|
|
|
52
51
|
}) : dir)];
|
|
53
52
|
}
|
|
54
53
|
});
|
|
55
|
-
}
|
|
56
|
-
//# sourceMappingURL=Output.js.map
|
|
54
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Children } from "@alloy-js/core/jsx-runtime";
|
|
2
|
+
import type { Refkey } from "../refkey.js";
|
|
3
|
+
export interface ReferenceOrContentProps {
|
|
4
|
+
readonly refkey: Refkey;
|
|
5
|
+
readonly children: Children;
|
|
6
|
+
}
|
|
7
|
+
export declare function ReferenceOrContent(props: ReferenceOrContentProps): import("@vue/reactivity").ComputedRef<Children>;
|
|
8
|
+
//# sourceMappingURL=ReferenceOrContent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReferenceOrContent.d.ts","sourceRoot":"","sources":["../../../src/components/ReferenceOrContent.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAItD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAE3C,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;CAC7B;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,mDAUhE"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { computed } from "@vue/reactivity";
|
|
2
|
+
import { useContext } from "../context.js";
|
|
3
|
+
import { BinderContext } from "../context/binder.js";
|
|
4
|
+
export function ReferenceOrContent(props) {
|
|
5
|
+
const binder = useContext(BinderContext);
|
|
6
|
+
if (!binder) {
|
|
7
|
+
throw new Error("Need binder context to create declarations");
|
|
8
|
+
}
|
|
9
|
+
const sym = binder.getSymbolForRefkey(props.refkey);
|
|
10
|
+
return computed(() => sym.value === undefined ? props.children : props.refkey);
|
|
11
|
+
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
|
|
2
|
-
import { memo as _$memo } from "@alloy-js/core/jsx-runtime";
|
|
1
|
+
import { memo as _$memo, createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
|
|
3
2
|
import { useContext } from "../context.js";
|
|
4
3
|
import { BinderContext } from "../context/binder.js";
|
|
5
4
|
import { ScopeContext } from "../context/scope.js";
|
|
@@ -37,5 +36,4 @@ export function Scope(props) {
|
|
|
37
36
|
return props.children;
|
|
38
37
|
}
|
|
39
38
|
});
|
|
40
|
-
}
|
|
41
|
-
//# sourceMappingURL=Scope.js.map
|
|
39
|
+
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
|
|
2
|
-
import { memo as _$memo } from "@alloy-js/core/jsx-runtime";
|
|
1
|
+
import { memo as _$memo, createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
|
|
3
2
|
import { shallowReactive } from "@vue/reactivity";
|
|
4
3
|
import { join } from "pathe";
|
|
5
4
|
import { useContext } from "../context.js";
|
|
@@ -35,5 +34,4 @@ function createSourceDirectoryContext(path = "./", parentDir) {
|
|
|
35
34
|
parentDir.addContent(context);
|
|
36
35
|
}
|
|
37
36
|
return context;
|
|
38
|
-
}
|
|
39
|
-
//# sourceMappingURL=SourceDirectory.js.map
|
|
37
|
+
}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
|
|
2
|
-
import { createIntrinsic as _$createIntrinsic } from "@alloy-js/core/jsx-runtime";
|
|
3
|
-
import { memo as _$memo } from "@alloy-js/core/jsx-runtime";
|
|
1
|
+
import { memo as _$memo, createIntrinsic as _$createIntrinsic, createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
|
|
4
2
|
import { join } from "pathe";
|
|
5
3
|
import { useContext } from "../context.js";
|
|
6
4
|
import { SourceDirectoryContext } from "../context/source-directory.js";
|
|
@@ -36,5 +34,4 @@ export function SourceFile(props) {
|
|
|
36
34
|
}), _$memo(() => props.children)];
|
|
37
35
|
}
|
|
38
36
|
});
|
|
39
|
-
}
|
|
40
|
-
//# sourceMappingURL=SourceFile.js.map
|
|
37
|
+
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
|
|
2
|
-
import { memo as _$memo } from "@alloy-js/core/jsx-runtime";
|
|
1
|
+
import { memo as _$memo, createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
|
|
3
2
|
import { List } from "@alloy-js/core";
|
|
4
3
|
/**
|
|
5
4
|
* Join child elements with semicolons and hardlines.
|
|
@@ -13,5 +12,4 @@ export function StatementList(props) {
|
|
|
13
12
|
return props.children;
|
|
14
13
|
}
|
|
15
14
|
});
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=StatementList.js.map
|
|
15
|
+
}
|
|
@@ -37,5 +37,5 @@ export declare const matchTag: unique symbol;
|
|
|
37
37
|
* The Match component is used inside of a {@link Switch} component to
|
|
38
38
|
* define conditionally rendered blocks of content.
|
|
39
39
|
*/
|
|
40
|
-
export declare const Match: import("@alloy-js/core/jsx-runtime").Component<MatchProps
|
|
40
|
+
export declare const Match: import("@alloy-js/core/jsx-runtime").Component<MatchProps> & Required<Pick<import("@alloy-js/core/jsx-runtime").Component<MatchProps>, "tag">>;
|
|
41
41
|
//# sourceMappingURL=Switch.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Switch.d.ts","sourceRoot":"","sources":["../../../src/components/Switch.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAyB,MAAM,4BAA4B,CAAC;AAG7E,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,QAAQ,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,WAAW,aAaxC;AAED,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IAEf;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,QAAQ,CAAC;CACpB;AAED,eAAO,MAAM,QAAQ,eAAW,CAAC;AAEjC;;;GAGG;AACH,eAAO,MAAM,KAAK,
|
|
1
|
+
{"version":3,"file":"Switch.d.ts","sourceRoot":"","sources":["../../../src/components/Switch.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAyB,MAAM,4BAA4B,CAAC;AAG7E,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,QAAQ,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,WAAW,aAaxC;AAED,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IAEf;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,QAAQ,CAAC;CACpB;AAED,eAAO,MAAM,QAAQ,eAAW,CAAC;AAEjC;;;GAGG;AACH,eAAO,MAAM,KAAK,gJAEhB,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
|
|
2
|
-
import { mergeProps as _$mergeProps } from "@alloy-js/core/jsx-runtime";
|
|
1
|
+
import { mergeProps as _$mergeProps, createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
|
|
3
2
|
/**
|
|
4
3
|
* Conditionally wrap the children of this component with the component given to
|
|
5
4
|
* `with` and passing `props` to it.
|
|
@@ -11,5 +10,4 @@ export function Wrap(props) {
|
|
|
11
10
|
return props.children;
|
|
12
11
|
}
|
|
13
12
|
})) : props.children;
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=Wrap.js.map
|
|
13
|
+
}
|
|
@@ -9,6 +9,7 @@ export * from "./MemberScope.jsx";
|
|
|
9
9
|
export * from "./Name.jsx";
|
|
10
10
|
export * from "./Output.js";
|
|
11
11
|
export * from "./Prose.jsx";
|
|
12
|
+
export * from "./ReferenceOrContent.jsx";
|
|
12
13
|
export * from "./Scope.js";
|
|
13
14
|
export * from "./Show.jsx";
|
|
14
15
|
export * from "./SourceDirectory.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.tsx"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.tsx"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,0BAA0B,CAAC;AACzC,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC"}
|
|
@@ -9,11 +9,11 @@ export * from "./MemberScope.js";
|
|
|
9
9
|
export * from "./Name.js";
|
|
10
10
|
export * from "./Output.js";
|
|
11
11
|
export * from "./Prose.js";
|
|
12
|
+
export * from "./ReferenceOrContent.js";
|
|
12
13
|
export * from "./Scope.js";
|
|
13
14
|
export * from "./Show.js";
|
|
14
15
|
export * from "./SourceDirectory.js";
|
|
15
16
|
export * from "./SourceFile.js";
|
|
16
17
|
export * from "./StatementList.js";
|
|
17
18
|
export * from "./Switch.js";
|
|
18
|
-
export * from "./Wrap.js";
|
|
19
|
-
//# sourceMappingURL=index.js.map
|
|
19
|
+
export * from "./Wrap.js";
|
|
@@ -17,5 +17,6 @@ export declare const SourceDirectory: import("../../stc.js").StcSignature<base.S
|
|
|
17
17
|
export declare const SourceFile: import("../../stc.js").StcSignature<base.SourceFileProps>;
|
|
18
18
|
export declare const Switch: import("../../stc.js").StcSignature<base.SwitchProps>;
|
|
19
19
|
export declare const Wrap: <TProps>(props: Omit<base.WrapProps<TProps>, "children"> & Partial<Pick<base.WrapProps<TProps>, "children">>) => import("../../stc.js").StcComponentCreator<base.WrapProps<TProps>>;
|
|
20
|
+
export declare const ReferenceOrContent: import("../../stc.js").StcSignature<base.ReferenceOrContentProps>;
|
|
20
21
|
export * from "./sti.js";
|
|
21
22
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/stc/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AAEpC,eAAO,MAAM,KAAK,sDAAkB,CAAC;AACrC,eAAO,MAAM,WAAW,4DAAwB,CAAC;AACjD,eAAO,MAAM,GAAG,0WAAgB,CAAC;AACjC,eAAO,MAAM,MAAM,uDAAmB,CAAC;AACvC,eAAO,MAAM,IAAI,qDAAiB,CAAC;AACnC,eAAO,MAAM,iBAAiB,kEAA8B,CAAC;AAC7D,eAAO,MAAM,UAAU,yCAAuB,CAAC;AAC/C,eAAO,MAAM,WAAW,4DAAwB,CAAC;AACjD,eAAO,MAAM,IAAI,yCAAiB,CAAC;AACnC,eAAO,MAAM,MAAM,uDAAmB,CAAC;AACvC,eAAO,MAAM,KAAK,iDAAkB,CAAC;AACrC,eAAO,MAAM,KAAK,sDAAkB,CAAC;AACrC,eAAO,MAAM,IAAI,qDAAiB,CAAC;AACnC,eAAO,MAAM,aAAa,8DAA0B,CAAC;AACrD,eAAO,MAAM,eAAe,gEAA4B,CAAC;AACzD,eAAO,MAAM,UAAU,2DAAuB,CAAC;AAC/C,eAAO,MAAM,MAAM,uDAAmB,CAAC;AACvC,eAAO,MAAM,IAAI,qLAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/stc/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AAEpC,eAAO,MAAM,KAAK,sDAAkB,CAAC;AACrC,eAAO,MAAM,WAAW,4DAAwB,CAAC;AACjD,eAAO,MAAM,GAAG,0WAAgB,CAAC;AACjC,eAAO,MAAM,MAAM,uDAAmB,CAAC;AACvC,eAAO,MAAM,IAAI,qDAAiB,CAAC;AACnC,eAAO,MAAM,iBAAiB,kEAA8B,CAAC;AAC7D,eAAO,MAAM,UAAU,yCAAuB,CAAC;AAC/C,eAAO,MAAM,WAAW,4DAAwB,CAAC;AACjD,eAAO,MAAM,IAAI,yCAAiB,CAAC;AACnC,eAAO,MAAM,MAAM,uDAAmB,CAAC;AACvC,eAAO,MAAM,KAAK,iDAAkB,CAAC;AACrC,eAAO,MAAM,KAAK,sDAAkB,CAAC;AACrC,eAAO,MAAM,IAAI,qDAAiB,CAAC;AACnC,eAAO,MAAM,aAAa,8DAA0B,CAAC;AACrD,eAAO,MAAM,eAAe,gEAA4B,CAAC;AACzD,eAAO,MAAM,UAAU,2DAAuB,CAAC;AAC/C,eAAO,MAAM,MAAM,uDAAmB,CAAC;AACvC,eAAO,MAAM,IAAI,qLAAiB,CAAC;AACnC,eAAO,MAAM,kBAAkB,mEAA+B,CAAC;AAE/D,cAAc,UAAU,CAAC"}
|
|
@@ -18,5 +18,5 @@ export const SourceDirectory = stc(base.SourceDirectory);
|
|
|
18
18
|
export const SourceFile = stc(base.SourceFile);
|
|
19
19
|
export const Switch = stc(base.Switch);
|
|
20
20
|
export const Wrap = stc(base.Wrap);
|
|
21
|
-
export
|
|
22
|
-
|
|
21
|
+
export const ReferenceOrContent = stc(base.ReferenceOrContent);
|
|
22
|
+
export * from "./sti.js";
|