@alloy-js/core 0.1.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/LICENSE.txt +7 -0
- package/api-extractor.json +11 -0
- package/babel.config.cjs +4 -0
- package/dist/src/binder.d.ts +333 -0
- package/dist/src/binder.d.ts.map +1 -0
- package/dist/src/binder.js +444 -0
- package/dist/src/binder.js.map +1 -0
- package/dist/src/code.d.ts +3 -0
- package/dist/src/code.d.ts.map +1 -0
- package/dist/src/code.js +156 -0
- package/dist/src/code.js.map +1 -0
- package/dist/src/components/Declaration.d.ts +29 -0
- package/dist/src/components/Declaration.d.ts.map +1 -0
- package/dist/src/components/Declaration.js +47 -0
- package/dist/src/components/Declaration.js.map +1 -0
- package/dist/src/components/Indent.d.ts +13 -0
- package/dist/src/components/Indent.d.ts.map +1 -0
- package/dist/src/components/Indent.js +23 -0
- package/dist/src/components/Indent.js.map +1 -0
- package/dist/src/components/MemberDeclaration.d.ts +30 -0
- package/dist/src/components/MemberDeclaration.d.ts.map +1 -0
- package/dist/src/components/MemberDeclaration.js +52 -0
- package/dist/src/components/MemberDeclaration.js.map +1 -0
- package/dist/src/components/MemberName.d.ts +2 -0
- package/dist/src/components/MemberName.d.ts.map +1 -0
- package/dist/src/components/MemberName.js +11 -0
- package/dist/src/components/MemberName.js.map +1 -0
- package/dist/src/components/MemberScope.d.ts +27 -0
- package/dist/src/components/MemberScope.d.ts.map +1 -0
- package/dist/src/components/MemberScope.js +28 -0
- package/dist/src/components/MemberScope.js.map +1 -0
- package/dist/src/components/Name.d.ts +2 -0
- package/dist/src/components/Name.d.ts.map +1 -0
- package/dist/src/components/Name.js +11 -0
- package/dist/src/components/Name.js.map +1 -0
- package/dist/src/components/Output.d.ts +31 -0
- package/dist/src/components/Output.d.ts.map +1 -0
- package/dist/src/components/Output.js +44 -0
- package/dist/src/components/Output.js.map +1 -0
- package/dist/src/components/Scope.d.ts +10 -0
- package/dist/src/components/Scope.d.ts.map +1 -0
- package/dist/src/components/Scope.js +25 -0
- package/dist/src/components/Scope.js.map +1 -0
- package/dist/src/components/SourceDirectory.d.ts +7 -0
- package/dist/src/components/SourceDirectory.d.ts.map +1 -0
- package/dist/src/components/SourceDirectory.js +38 -0
- package/dist/src/components/SourceDirectory.js.map +1 -0
- package/dist/src/components/SourceFile.d.ts +12 -0
- package/dist/src/components/SourceFile.d.ts.map +1 -0
- package/dist/src/components/SourceFile.js +26 -0
- package/dist/src/components/SourceFile.js.map +1 -0
- package/dist/src/components/index.d.ts +11 -0
- package/dist/src/components/index.d.ts.map +1 -0
- package/dist/src/components/index.js +11 -0
- package/dist/src/components/index.js.map +1 -0
- package/dist/src/components/stc/index.d.ts +26 -0
- package/dist/src/components/stc/index.d.ts.map +1 -0
- package/dist/src/components/stc/index.js +9 -0
- package/dist/src/components/stc/index.js.map +1 -0
- package/dist/src/context/assignment.d.ts +39 -0
- package/dist/src/context/assignment.d.ts.map +1 -0
- package/dist/src/context/assignment.js +39 -0
- package/dist/src/context/assignment.js.map +1 -0
- package/dist/src/context/binder.d.ts +9 -0
- package/dist/src/context/binder.d.ts.map +1 -0
- package/dist/src/context/binder.js +12 -0
- package/dist/src/context/binder.js.map +1 -0
- package/dist/src/context/declaration.d.ts +4 -0
- package/dist/src/context/declaration.d.ts.map +1 -0
- package/dist/src/context/declaration.js +3 -0
- package/dist/src/context/declaration.js.map +1 -0
- package/dist/src/context/indent.d.ts +5 -0
- package/dist/src/context/indent.d.ts.map +1 -0
- package/dist/src/context/indent.js +8 -0
- package/dist/src/context/indent.js.map +1 -0
- package/dist/src/context/index.d.ts +11 -0
- package/dist/src/context/index.d.ts.map +1 -0
- package/dist/src/context/index.js +11 -0
- package/dist/src/context/index.js.map +1 -0
- package/dist/src/context/member-declaration.d.ts +9 -0
- package/dist/src/context/member-declaration.d.ts.map +1 -0
- package/dist/src/context/member-declaration.js +9 -0
- package/dist/src/context/member-declaration.js.map +1 -0
- package/dist/src/context/member-scope.d.ts +13 -0
- package/dist/src/context/member-scope.d.ts.map +1 -0
- package/dist/src/context/member-scope.js +12 -0
- package/dist/src/context/member-scope.js.map +1 -0
- package/dist/src/context/name-policy.d.ts +5 -0
- package/dist/src/context/name-policy.d.ts.map +1 -0
- package/dist/src/context/name-policy.js +10 -0
- package/dist/src/context/name-policy.js.map +1 -0
- package/dist/src/context/scope.d.ts +5 -0
- package/dist/src/context/scope.d.ts.map +1 -0
- package/dist/src/context/scope.js +6 -0
- package/dist/src/context/scope.js.map +1 -0
- package/dist/src/context/source-directory.d.ts +9 -0
- package/dist/src/context/source-directory.d.ts.map +1 -0
- package/dist/src/context/source-directory.js +3 -0
- package/dist/src/context/source-directory.js.map +1 -0
- package/dist/src/context/source-file.d.ts +12 -0
- package/dist/src/context/source-file.d.ts.map +1 -0
- package/dist/src/context/source-file.js +3 -0
- package/dist/src/context/source-file.js.map +1 -0
- package/dist/src/context.d.ts +13 -0
- package/dist/src/context.d.ts.map +1 -0
- package/dist/src/context.js +30 -0
- package/dist/src/context.js.map +1 -0
- package/dist/src/index.d.ts +13 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +13 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/jsx-runtime.d.ts +43 -0
- package/dist/src/jsx-runtime.d.ts.map +1 -0
- package/dist/src/jsx-runtime.js +172 -0
- package/dist/src/jsx-runtime.js.map +1 -0
- package/dist/src/name-policy.d.ts +5 -0
- package/dist/src/name-policy.d.ts.map +1 -0
- package/dist/src/name-policy.js +8 -0
- package/dist/src/name-policy.js.map +1 -0
- package/dist/src/refkey.d.ts +9 -0
- package/dist/src/refkey.d.ts.map +1 -0
- package/dist/src/refkey.js +44 -0
- package/dist/src/refkey.js.map +1 -0
- package/dist/src/render.d.ts +147 -0
- package/dist/src/render.d.ts.map +1 -0
- package/dist/src/render.js +317 -0
- package/dist/src/render.js.map +1 -0
- package/dist/src/tsdoc-metadata.json +11 -0
- package/dist/src/utils.d.ts +80 -0
- package/dist/src/utils.d.ts.map +1 -0
- package/dist/src/utils.js +219 -0
- package/dist/src/utils.js.map +1 -0
- package/dist/test/children.test.d.ts +2 -0
- package/dist/test/children.test.d.ts.map +1 -0
- package/dist/test/components/source-file.test.d.ts +2 -0
- package/dist/test/components/source-file.test.d.ts.map +1 -0
- package/dist/test/name-policy.test.d.ts +2 -0
- package/dist/test/name-policy.test.d.ts.map +1 -0
- package/dist/test/reactivity/ref-rendering.test.d.ts +2 -0
- package/dist/test/reactivity/ref-rendering.test.d.ts.map +1 -0
- package/dist/test/reactivity/test.test.d.ts +2 -0
- package/dist/test/reactivity/test.test.d.ts.map +1 -0
- package/dist/test/refkey.test.d.ts +2 -0
- package/dist/test/refkey.test.d.ts.map +1 -0
- package/dist/test/rendering/basic.test.d.ts +2 -0
- package/dist/test/rendering/basic.test.d.ts.map +1 -0
- package/dist/test/rendering/code.test.d.ts +2 -0
- package/dist/test/rendering/code.test.d.ts.map +1 -0
- package/dist/test/rendering/indent.test.d.ts +2 -0
- package/dist/test/rendering/indent.test.d.ts.map +1 -0
- package/dist/test/rendering/linebreaks.test.d.ts +2 -0
- package/dist/test/rendering/linebreaks.test.d.ts.map +1 -0
- package/dist/test/rendering/refkeys.test.d.ts +2 -0
- package/dist/test/rendering/refkeys.test.d.ts.map +1 -0
- package/dist/test/stc.test.d.ts +2 -0
- package/dist/test/stc.test.d.ts.map +1 -0
- package/dist/test/symbols.test.d.ts +2 -0
- package/dist/test/symbols.test.d.ts.map +1 -0
- package/dist/test/utils.test.d.ts +2 -0
- package/dist/test/utils.test.d.ts.map +1 -0
- package/dist/testing/extend-expect.d.ts +2 -0
- package/dist/testing/extend-expect.d.ts.map +1 -0
- package/dist/testing/extend-expect.js +22 -0
- package/dist/testing/extend-expect.js.map +1 -0
- package/dist/testing/index.d.ts +3 -0
- package/dist/testing/index.d.ts.map +1 -0
- package/dist/testing/index.js +3 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/testing/render.d.ts +7 -0
- package/dist/testing/render.d.ts.map +1 -0
- package/dist/testing/render.js +25 -0
- package/dist/testing/render.js.map +1 -0
- package/dist/testing/vitest.d.js +1 -0
- package/dist/testing/vitest.d.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +64 -0
- package/src/binder.ts +838 -0
- package/src/code.ts +220 -0
- package/src/components/Declaration.tsx +53 -0
- package/src/components/Indent.tsx +33 -0
- package/src/components/MemberDeclaration.tsx +62 -0
- package/src/components/MemberName.tsx +11 -0
- package/src/components/MemberScope.tsx +40 -0
- package/src/components/Name.tsx +11 -0
- package/src/components/Output.tsx +69 -0
- package/src/components/Scope.tsx +27 -0
- package/src/components/SourceDirectory.tsx +43 -0
- package/src/components/SourceFile.tsx +33 -0
- package/src/components/index.tsx +10 -0
- package/src/components/stc/index.ts +9 -0
- package/src/context/assignment.ts +57 -0
- package/src/context/binder.ts +14 -0
- package/src/context/declaration.ts +5 -0
- package/src/context/indent.ts +10 -0
- package/src/context/index.ts +10 -0
- package/src/context/member-declaration.ts +10 -0
- package/src/context/member-scope.ts +17 -0
- package/src/context/name-policy.ts +13 -0
- package/src/context/scope.ts +8 -0
- package/src/context/source-directory.ts +11 -0
- package/src/context/source-file.ts +12 -0
- package/src/context.ts +53 -0
- package/src/index.ts +21 -0
- package/src/jsx-runtime.ts +266 -0
- package/src/name-policy.ts +13 -0
- package/src/refkey.ts +62 -0
- package/src/render.ts +389 -0
- package/src/utils.ts +288 -0
- package/temp/api.json +8840 -0
- package/test/children.test.tsx +33 -0
- package/test/components/source-file.test.tsx +45 -0
- package/test/name-policy.test.tsx +19 -0
- package/test/reactivity/ref-rendering.test.tsx +50 -0
- package/test/reactivity/test.test.tsx +83 -0
- package/test/refkey.test.ts +32 -0
- package/test/rendering/basic.test.tsx +156 -0
- package/test/rendering/code.test.tsx +62 -0
- package/test/rendering/indent.test.tsx +608 -0
- package/test/rendering/linebreaks.test.tsx +72 -0
- package/test/rendering/refkeys.test.tsx +35 -0
- package/test/stc.test.tsx +21 -0
- package/test/symbols.test.ts +406 -0
- package/test/utils.test.tsx +150 -0
- package/testing/extend-expect.ts +20 -0
- package/testing/index.ts +2 -0
- package/testing/render.ts +37 -0
- package/testing/vitest.d.ts +10 -0
- package/tsconfig.json +17 -0
- package/vitest.config.ts +18 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["stc","base","Declaration","Indent","Output","Scope","SourceDirectory","SourceFile"],"sources":["../../../../src/components/stc/index.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,GAAG,QAAQ,gBAAgB;AACpC,OAAO,KAAKC,IAAI,MAAM,aAAa;AAEnC,OAAO,MAAMC,WAAW,GAAGF,GAAG,CAACC,IAAI,CAACC,WAAW,CAAC;AAChD,OAAO,MAAMC,MAAM,GAAGH,GAAG,CAACC,IAAI,CAACE,MAAM,CAAC;AACtC,OAAO,MAAMC,MAAM,GAAGJ,GAAG,CAACC,IAAI,CAACG,MAAM,CAAC;AACtC,OAAO,MAAMC,KAAK,GAAGL,GAAG,CAACC,IAAI,CAACI,KAAK,CAAC;AACpC,OAAO,MAAMC,eAAe,GAAGN,GAAG,CAACC,IAAI,CAACK,eAAe,CAAC;AACxD,OAAO,MAAMC,UAAU,GAAGP,GAAG,CAACC,IAAI,CAACM,UAAU,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { OutputSymbol } from "../binder.js";
|
|
2
|
+
import { ComponentContext } from "../context.js";
|
|
3
|
+
export interface AssignmentContext {
|
|
4
|
+
/**
|
|
5
|
+
* The symbol that is the target of the current assignment.
|
|
6
|
+
*/
|
|
7
|
+
target: OutputSymbol;
|
|
8
|
+
/**
|
|
9
|
+
* Whether the symbol has had a value assigned to it. Once the symbol has been
|
|
10
|
+
* assigned, subsequent assignments will have no effect.
|
|
11
|
+
*/
|
|
12
|
+
isAssigned: boolean;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* AssignmentContext provides the symbol that is the target of the current
|
|
16
|
+
* assignment.
|
|
17
|
+
*
|
|
18
|
+
* @remarks
|
|
19
|
+
*
|
|
20
|
+
* When a variable is declared, the symbol for the variable doesn't yet know
|
|
21
|
+
* what value it will hold, because that depends on the assignment to the
|
|
22
|
+
* variable in the variable declaration's initializer. This context provides the
|
|
23
|
+
* symbol that is the target of the current assignment, so that children of an
|
|
24
|
+
* assignment or initializer can provide additional symbol information.
|
|
25
|
+
*
|
|
26
|
+
* For example, when assigning an object value expression to a variable, the
|
|
27
|
+
* object value expression should use assignment context to provide the member
|
|
28
|
+
* symbols for the object value's properties.
|
|
29
|
+
*/
|
|
30
|
+
export declare const AssignmentContext: ComponentContext<AssignmentContext>;
|
|
31
|
+
/**
|
|
32
|
+
* Creates a new {@link (AssignmentContext:interface)}.
|
|
33
|
+
*
|
|
34
|
+
* @param target - The symbol that is the target of the current assignment.
|
|
35
|
+
* @returns A new {@link (AssignmentContext:interface)}.
|
|
36
|
+
*/
|
|
37
|
+
export declare function createAssignmentContext(target: OutputSymbol): AssignmentContext;
|
|
38
|
+
export declare function getAssignmentSymbol(): OutputSymbol | undefined;
|
|
39
|
+
//# sourceMappingURL=assignment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assignment.d.ts","sourceRoot":"","sources":["../../../src/context/assignment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAA6B,MAAM,eAAe,CAAC;AAE5E,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,MAAM,EAAE,YAAY,CAAC;IAErB;;;OAGG;IACH,UAAU,EAAE,OAAO,CAAC;CACrB;AAED;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,iBAAiB,EAAE,gBAAgB,CAAC,iBAAiB,CACjD,CAAC;AAElB;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,YAAY,GACnB,iBAAiB,CAKnB;AAED,wBAAgB,mBAAmB,6BAMlC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { createContext, useContext } from "../context.js";
|
|
2
|
+
/**
|
|
3
|
+
* AssignmentContext provides the symbol that is the target of the current
|
|
4
|
+
* assignment.
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
*
|
|
8
|
+
* When a variable is declared, the symbol for the variable doesn't yet know
|
|
9
|
+
* what value it will hold, because that depends on the assignment to the
|
|
10
|
+
* variable in the variable declaration's initializer. This context provides the
|
|
11
|
+
* symbol that is the target of the current assignment, so that children of an
|
|
12
|
+
* assignment or initializer can provide additional symbol information.
|
|
13
|
+
*
|
|
14
|
+
* For example, when assigning an object value expression to a variable, the
|
|
15
|
+
* object value expression should use assignment context to provide the member
|
|
16
|
+
* symbols for the object value's properties.
|
|
17
|
+
*/
|
|
18
|
+
export const AssignmentContext = createContext();
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Creates a new {@link (AssignmentContext:interface)}.
|
|
22
|
+
*
|
|
23
|
+
* @param target - The symbol that is the target of the current assignment.
|
|
24
|
+
* @returns A new {@link (AssignmentContext:interface)}.
|
|
25
|
+
*/
|
|
26
|
+
export function createAssignmentContext(target) {
|
|
27
|
+
return {
|
|
28
|
+
isAssigned: false,
|
|
29
|
+
target
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
export function getAssignmentSymbol() {
|
|
33
|
+
const assignmentContext = useContext(AssignmentContext);
|
|
34
|
+
if (assignmentContext) {
|
|
35
|
+
return assignmentContext.target;
|
|
36
|
+
}
|
|
37
|
+
return undefined;
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=assignment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assignment.js","names":["createContext","useContext","AssignmentContext","createAssignmentContext","target","isAssigned","getAssignmentSymbol","assignmentContext","undefined"],"sources":["../../../src/context/assignment.ts"],"sourcesContent":[null],"mappings":"AACA,SAA2BA,aAAa,EAAEC,UAAU,QAAQ,eAAe;AAe3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,iBAAsD,GACjEF,aAAa,CAAC,CAAC;;AAEjB;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASG,uBAAuBA,CACrCC,MAAoB,EACD;EACnB,OAAO;IACLC,UAAU,EAAE,KAAK;IACjBD;EACF,CAAC;AACH;AAEA,OAAO,SAASE,mBAAmBA,CAAA,EAAG;EACpC,MAAMC,iBAAiB,GAAGN,UAAU,CAACC,iBAAiB,CAAC;EACvD,IAAIK,iBAAiB,EAAE;IACrB,OAAOA,iBAAiB,CAACH,MAAM;EACjC;EACA,OAAOI,SAAS;AAClB","ignoreList":[]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Binder } from "../binder.js";
|
|
2
|
+
import { ComponentContext } from "../context.js";
|
|
3
|
+
/**
|
|
4
|
+
* The binder context provides the binder instance to all components. This
|
|
5
|
+
* context is provided by the {@link Output | output component}.
|
|
6
|
+
*/
|
|
7
|
+
export declare const BinderContext: ComponentContext<Binder>;
|
|
8
|
+
export declare function useBinder(): Binder;
|
|
9
|
+
//# sourceMappingURL=binder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"binder.d.ts","sourceRoot":"","sources":["../../../src/context/binder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAA6B,MAAM,eAAe,CAAC;AAI5E;;;GAGG;AACH,eAAO,MAAM,aAAa,EAAE,gBAAgB,CAAC,MAAM,CAAmB,CAAC;AAEvE,wBAAgB,SAAS,WAExB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createContext, useContext } from "../context.js";
|
|
2
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The binder context provides the binder instance to all components. This
|
|
6
|
+
* context is provided by the {@link Output | output component}.
|
|
7
|
+
*/
|
|
8
|
+
export const BinderContext = createContext();
|
|
9
|
+
export function useBinder() {
|
|
10
|
+
return useContext(BinderContext);
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=binder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"binder.js","names":["createContext","useContext","BinderContext","useBinder"],"sources":["../../../src/context/binder.ts"],"sourcesContent":[null],"mappings":"AACA,SAA2BA,aAAa,EAAEC,UAAU,QAAQ,eAAe;AAC3E;;AAGA;AACA;AACA;AACA;AACA,OAAO,MAAMC,aAAuC,GAAGF,aAAa,CAAC,CAAC;AAEtE,OAAO,SAASG,SAASA,CAAA,EAAG;EAC1B,OAAOF,UAAU,CAACC,aAAa,CAAC;AAClC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"declaration.d.ts","sourceRoot":"","sources":["../../../src/context/declaration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAiB,MAAM,eAAe,CAAC;AAEhE,eAAO,MAAM,kBAAkB,EAAE,gBAAgB,CAAC,YAAY,CAC7C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"declaration.js","names":["createContext","DeclarationContext"],"sources":["../../../src/context/declaration.ts"],"sourcesContent":[null],"mappings":"AACA,SAA2BA,aAAa,QAAQ,eAAe;AAE/D,OAAO,MAAMC,kBAAkD,GAC7DD,aAAa,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { IndentState } from "../components/Indent.jsx";
|
|
2
|
+
import { ComponentContext } from "../context.js";
|
|
3
|
+
export declare const IndentContext: ComponentContext<IndentState>;
|
|
4
|
+
export declare const TestContext: ComponentContext<string>;
|
|
5
|
+
//# sourceMappingURL=indent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"indent.d.ts","sourceRoot":"","sources":["../../../src/context/indent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAiB,MAAM,eAAe,CAAC;AAEhE,eAAO,MAAM,aAAa,EAAE,gBAAgB,CAAC,WAAW,CAItD,CAAC;AAEH,eAAO,MAAM,WAAW,EAAE,gBAAgB,CAAC,MAAM,CAAyB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"indent.js","names":["createContext","IndentContext","level","indent","indentString","TestContext"],"sources":["../../../src/context/indent.ts"],"sourcesContent":[null],"mappings":"AACA,SAA2BA,aAAa,QAAQ,eAAe;AAE/D,OAAO,MAAMC,aAA4C,GAAGD,aAAa,CAAC;EACxEE,KAAK,EAAE,CAAC;EACRC,MAAM,EAAE,IAAI;EACZC,YAAY,EAAE;AAChB,CAAC,CAAC;AAEF,OAAO,MAAMC,WAAqC,GAAGL,aAAa,CAAC,MAAM,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from "./assignment.js";
|
|
2
|
+
export * from "./binder.js";
|
|
3
|
+
export * from "./declaration.js";
|
|
4
|
+
export * from "./indent.js";
|
|
5
|
+
export * from "./member-declaration.js";
|
|
6
|
+
export * from "./member-scope.js";
|
|
7
|
+
export * from "./name-policy.js";
|
|
8
|
+
export * from "./scope.js";
|
|
9
|
+
export * from "./source-directory.js";
|
|
10
|
+
export * from "./source-file.js";
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/context/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from "./assignment.js";
|
|
2
|
+
export * from "./binder.js";
|
|
3
|
+
export * from "./declaration.js";
|
|
4
|
+
export * from "./indent.js";
|
|
5
|
+
export * from "./member-declaration.js";
|
|
6
|
+
export * from "./member-scope.js";
|
|
7
|
+
export * from "./name-policy.js";
|
|
8
|
+
export * from "./scope.js";
|
|
9
|
+
export * from "./source-directory.js";
|
|
10
|
+
export * from "./source-file.js";
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/context/index.ts"],"sourcesContent":[null],"mappings":"AAAA,cAAc,iBAAiB;AAC/B,cAAc,aAAa;AAC3B,cAAc,kBAAkB;AAChC,cAAc,aAAa;AAC3B,cAAc,yBAAyB;AACvC,cAAc,mBAAmB;AACjC,cAAc,kBAAkB;AAChC,cAAc,YAAY;AAC1B,cAAc,uBAAuB;AACrC,cAAc,kBAAkB","ignoreList":[]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { OutputSymbol } from "../binder.js";
|
|
2
|
+
import { ComponentContext } from "../context.js";
|
|
3
|
+
/**
|
|
4
|
+
* Provides the symbol for the member currently being declared.
|
|
5
|
+
*
|
|
6
|
+
* @see {@link DeclarationContext} for getting the symbol for the current non-member declaration.
|
|
7
|
+
*/
|
|
8
|
+
export declare const MemberDeclarationContext: ComponentContext<OutputSymbol>;
|
|
9
|
+
//# sourceMappingURL=member-declaration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"member-declaration.d.ts","sourceRoot":"","sources":["../../../src/context/member-declaration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAiB,MAAM,eAAe,CAAC;AAEhE;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,EAAE,gBAAgB,CAAC,YAAY,CACnD,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { createContext } from "../context.js";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Provides the symbol for the member currently being declared.
|
|
5
|
+
*
|
|
6
|
+
* @see {@link DeclarationContext} for getting the symbol for the current non-member declaration.
|
|
7
|
+
*/
|
|
8
|
+
export const MemberDeclarationContext = createContext();
|
|
9
|
+
//# sourceMappingURL=member-declaration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"member-declaration.js","names":["createContext","MemberDeclarationContext"],"sources":["../../../src/context/member-declaration.ts"],"sourcesContent":[null],"mappings":"AACA,SAA2BA,aAAa,QAAQ,eAAe;;AAE/D;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,wBAAwD,GACnED,aAAa,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { OutputScope } from "../binder.js";
|
|
2
|
+
import { ComponentContext } from "../context.js";
|
|
3
|
+
/**
|
|
4
|
+
* The member scope context provides the instance and static member scopes that
|
|
5
|
+
* are used for member declarations and instance member resolution.
|
|
6
|
+
*/
|
|
7
|
+
export interface MemberScopeContext {
|
|
8
|
+
staticMembers?: OutputScope;
|
|
9
|
+
instanceMembers?: OutputScope;
|
|
10
|
+
}
|
|
11
|
+
export declare const MemberScopeContext: ComponentContext<MemberScopeContext>;
|
|
12
|
+
export declare function useMemberScope(): MemberScopeContext;
|
|
13
|
+
//# sourceMappingURL=member-scope.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"member-scope.d.ts","sourceRoot":"","sources":["../../../src/context/member-scope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAA6B,MAAM,eAAe,CAAC;AAE5E;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,aAAa,CAAC,EAAE,WAAW,CAAC;IAC5B,eAAe,CAAC,EAAE,WAAW,CAAC;CAC/B;AACD,eAAO,MAAM,kBAAkB,EAAE,gBAAgB,CAAC,kBAAkB,CACnD,CAAC;AAElB,wBAAgB,cAAc,uBAE7B"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createContext, useContext } from "../context.js";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The member scope context provides the instance and static member scopes that
|
|
5
|
+
* are used for member declarations and instance member resolution.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
export const MemberScopeContext = createContext();
|
|
9
|
+
export function useMemberScope() {
|
|
10
|
+
return useContext(MemberScopeContext);
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=member-scope.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"member-scope.js","names":["createContext","useContext","MemberScopeContext","useMemberScope"],"sources":["../../../src/context/member-scope.ts"],"sourcesContent":[null],"mappings":"AACA,SAA2BA,aAAa,EAAEC,UAAU,QAAQ,eAAe;;AAE3E;AACA;AACA;AACA;;AAKA,OAAO,MAAMC,kBAAwD,GACnEF,aAAa,CAAC,CAAC;AAEjB,OAAO,SAASG,cAAcA,CAAA,EAAG;EAC/B,OAAOF,UAAU,CAACC,kBAAkB,CAAC;AACvC","ignoreList":[]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ComponentContext } from "../context.js";
|
|
2
|
+
import { NamePolicy } from "../name-policy.js";
|
|
3
|
+
export declare const NamePolicyContext: ComponentContext<NamePolicy<string>>;
|
|
4
|
+
export declare function useNamePolicy(): NamePolicy<string>;
|
|
5
|
+
//# sourceMappingURL=name-policy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"name-policy.d.ts","sourceRoot":"","sources":["../../../src/context/name-policy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAA6B,MAAM,eAAe,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,eAAO,MAAM,iBAAiB,EAAE,gBAAgB,CAAC,UAAU,CAAC,MAAM,CAAC,CAK/D,CAAC;AAEL,wBAAgB,aAAa,uBAE5B"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { createContext, useContext } from "../context.js";
|
|
2
|
+
export const NamePolicyContext = createContext({
|
|
3
|
+
getName(name) {
|
|
4
|
+
return name;
|
|
5
|
+
}
|
|
6
|
+
});
|
|
7
|
+
export function useNamePolicy() {
|
|
8
|
+
return useContext(NamePolicyContext);
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=name-policy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"name-policy.js","names":["createContext","useContext","NamePolicyContext","getName","name","useNamePolicy"],"sources":["../../../src/context/name-policy.ts"],"sourcesContent":[null],"mappings":"AAAA,SAA2BA,aAAa,EAAEC,UAAU,QAAQ,eAAe;AAG3E,OAAO,MAAMC,iBAAuD,GAClEF,aAAa,CAAqB;EAChCG,OAAOA,CAACC,IAAI,EAAE;IACZ,OAAOA,IAAI;EACb;AACF,CAAC,CAAC;AAEJ,OAAO,SAASC,aAAaA,CAAA,EAAG;EAC9B,OAAOJ,UAAU,CAACC,iBAAiB,CAAC;AACtC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope.d.ts","sourceRoot":"","sources":["../../../src/context/scope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAA6B,MAAM,eAAe,CAAC;AAE5E,eAAO,MAAM,YAAY,EAAE,gBAAgB,CAAC,WAAW,CAAmB,CAAC;AAE3E,wBAAgB,QAAQ,gBAEvB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope.js","names":["createContext","useContext","ScopeContext","useScope"],"sources":["../../../src/context/scope.ts"],"sourcesContent":[null],"mappings":"AACA,SAA2BA,aAAa,EAAEC,UAAU,QAAQ,eAAe;AAE3E,OAAO,MAAMC,YAA2C,GAAGF,aAAa,CAAC,CAAC;AAE1E,OAAO,SAASG,QAAQA,CAAA,EAAG;EACzB,OAAOF,UAAU,CAACC,YAAY,CAAC;AACjC","ignoreList":[]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ComponentContext } from "../context.js";
|
|
2
|
+
import { SourceFileContext } from "./source-file.js";
|
|
3
|
+
export interface SourceDirectoryContext {
|
|
4
|
+
contents: (SourceDirectoryContext | SourceFileContext)[];
|
|
5
|
+
addContent(content: SourceDirectoryContext | SourceFileContext): void;
|
|
6
|
+
path: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const SourceDirectoryContext: ComponentContext<SourceDirectoryContext>;
|
|
9
|
+
//# sourceMappingURL=source-directory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"source-directory.d.ts","sourceRoot":"","sources":["../../../src/context/source-directory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAiB,MAAM,eAAe,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAErD,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,CAAC,sBAAsB,GAAG,iBAAiB,CAAC,EAAE,CAAC;IACzD,UAAU,CAAC,OAAO,EAAE,sBAAsB,GAAG,iBAAiB,GAAG,IAAI,CAAC;IACtE,IAAI,EAAE,MAAM,CAAC;CACd;AAED,eAAO,MAAM,sBAAsB,EAAE,gBAAgB,CAAC,sBAAsB,CAC3D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"source-directory.js","names":["createContext","SourceDirectoryContext"],"sources":["../../../src/context/source-directory.ts"],"sourcesContent":[null],"mappings":"AAAA,SAA2BA,aAAa,QAAQ,eAAe;AAS/D,OAAO,MAAMC,sBAAgE,GAC3ED,aAAa,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ComponentContext } from "../context.js";
|
|
2
|
+
import { ComponentDefinition } from "../jsx-runtime.js";
|
|
3
|
+
import { Refkey } from "../refkey.js";
|
|
4
|
+
export interface SourceFileContext {
|
|
5
|
+
path: string;
|
|
6
|
+
filetype: string;
|
|
7
|
+
reference?: ComponentDefinition<{
|
|
8
|
+
refkey: Refkey;
|
|
9
|
+
}>;
|
|
10
|
+
}
|
|
11
|
+
export declare const SourceFileContext: ComponentContext<SourceFileContext>;
|
|
12
|
+
//# sourceMappingURL=source-file.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"source-file.d.ts","sourceRoot":"","sources":["../../../src/context/source-file.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAiB,MAAM,eAAe,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,mBAAmB,CAAC;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACrD;AAED,eAAO,MAAM,iBAAiB,EAAE,gBAAgB,CAAC,iBAAiB,CACjD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"source-file.js","names":["createContext","SourceFileContext"],"sources":["../../../src/context/source-file.ts"],"sourcesContent":[null],"mappings":"AAAA,SAA2BA,aAAa,QAAQ,eAAe;AAU/D,OAAO,MAAMC,iBAAsD,GACjED,aAAa,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Children, ComponentDefinition } from "@alloy-js/core/jsx-runtime";
|
|
2
|
+
export interface ComponentContext<T> {
|
|
3
|
+
id: symbol;
|
|
4
|
+
default: T | undefined;
|
|
5
|
+
Provider: ComponentDefinition<ContextProviderProps<T>>;
|
|
6
|
+
}
|
|
7
|
+
export interface ContextProviderProps<T = unknown> {
|
|
8
|
+
value?: T;
|
|
9
|
+
children?: Children;
|
|
10
|
+
}
|
|
11
|
+
export declare function useContext<T>(context: ComponentContext<T>): T | undefined;
|
|
12
|
+
export declare function createContext<T = unknown>(defaultValue?: T): ComponentContext<T>;
|
|
13
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/context.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,mBAAmB,EAIpB,MAAM,4BAA4B,CAAC;AAGpC,MAAM,WAAW,gBAAgB,CAAC,CAAC;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;IACvB,QAAQ,EAAE,mBAAmB,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC;CACxD;AAED,MAAM,WAAW,oBAAoB,CAAC,CAAC,GAAG,OAAO;IAC/C,KAAK,CAAC,EAAE,CAAC,CAAC;IACV,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAED,wBAAgB,UAAU,CAAC,CAAC,EAAE,OAAO,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,SAAS,CAWzE;AAED,wBAAgB,aAAa,CAAC,CAAC,GAAG,OAAO,EACvC,YAAY,CAAC,EAAE,CAAC,GACf,gBAAgB,CAAC,CAAC,CAAC,CAiBrB"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { effect, getContext, untrack } from "@alloy-js/core/jsx-runtime";
|
|
2
|
+
import { shallowRef } from "@vue/reactivity";
|
|
3
|
+
export function useContext(context) {
|
|
4
|
+
// context must come from a parent
|
|
5
|
+
let current = getContext();
|
|
6
|
+
while (current) {
|
|
7
|
+
if (Object.hasOwn(current.context, context.id)) {
|
|
8
|
+
return current.context[context.id];
|
|
9
|
+
}
|
|
10
|
+
current = current.owner;
|
|
11
|
+
}
|
|
12
|
+
return context.default;
|
|
13
|
+
}
|
|
14
|
+
export function createContext(defaultValue) {
|
|
15
|
+
const id = Symbol("context");
|
|
16
|
+
return {
|
|
17
|
+
id,
|
|
18
|
+
default: defaultValue,
|
|
19
|
+
Provider(props) {
|
|
20
|
+
const context = getContext();
|
|
21
|
+
const rendered = shallowRef();
|
|
22
|
+
effect(() => {
|
|
23
|
+
context.context[id] = props.value;
|
|
24
|
+
rendered.value = untrack(() => props.children);
|
|
25
|
+
});
|
|
26
|
+
return rendered.value;
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.js","names":["effect","getContext","untrack","shallowRef","useContext","context","current","Object","hasOwn","id","owner","default","createContext","defaultValue","Symbol","Provider","props","rendered","value","children"],"sources":["../../src/context.ts"],"sourcesContent":[null],"mappings":"AAAA,SAGEA,MAAM,EACNC,UAAU,EACVC,OAAO,QACF,4BAA4B;AACnC,SAASC,UAAU,QAAQ,iBAAiB;AAa5C,OAAO,SAASC,UAAUA,CAAIC,OAA4B,EAAiB;EACzE;EACA,IAAIC,OAAO,GAAGL,UAAU,CAAC,CAAC;EAC1B,OAAOK,OAAO,EAAE;IACd,IAAIC,MAAM,CAACC,MAAM,CAACF,OAAO,CAACD,OAAO,EAAGA,OAAO,CAACI,EAAE,CAAC,EAAE;MAC/C,OAAOH,OAAO,CAACD,OAAO,CAAEA,OAAO,CAACI,EAAE,CAAC;IACrC;IACAH,OAAO,GAAGA,OAAO,CAACI,KAAK;EACzB;EAEA,OAAOL,OAAO,CAACM,OAAO;AACxB;AAEA,OAAO,SAASC,aAAaA,CAC3BC,YAAgB,EACK;EACrB,MAAMJ,EAAE,GAAGK,MAAM,CAAC,SAAS,CAAC;EAC5B,OAAO;IACLL,EAAE;IACFE,OAAO,EAAEE,YAAY;IACrBE,QAAQA,CAACC,KAA8B,EAAE;MACvC,MAAMX,OAAO,GAAGJ,UAAU,CAAC,CAAC;MAE5B,MAAMgB,QAAQ,GAAGd,UAAU,CAAC,CAAC;MAC7BH,MAAM,CAAC,MAAM;QACXK,OAAO,CAAEA,OAAO,CAAEI,EAAE,CAAC,GAAGO,KAAK,CAACE,KAAK;QACnCD,QAAQ,CAACC,KAAK,GAAGhB,OAAO,CAAC,MAAMc,KAAK,CAACG,QAAQ,CAAC;MAChD,CAAC,CAAC;MAEF,OAAOF,QAAQ,CAACC,KAAK;IACvB;EACF,CAAC;AACH","ignoreList":[]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export * from "@alloy-js/core/jsx-runtime";
|
|
2
|
+
export { computed, isProxy, reactive, ref, shallowReactive, shallowRef, toRaw, type Ref, } from "@vue/reactivity";
|
|
3
|
+
export * from "./binder.js";
|
|
4
|
+
export * from "./code.js";
|
|
5
|
+
export * from "./components/index.js";
|
|
6
|
+
export * from "./context.js";
|
|
7
|
+
export * from "./context/index.js";
|
|
8
|
+
export * from "./jsx-runtime.js";
|
|
9
|
+
export * from "./name-policy.js";
|
|
10
|
+
export * from "./refkey.js";
|
|
11
|
+
export * from "./render.js";
|
|
12
|
+
export * from "./utils.js";
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,OAAO,EACL,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,GAAG,EACH,eAAe,EACf,UAAU,EACV,KAAK,EACL,KAAK,GAAG,GACT,MAAM,iBAAiB,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export * from "@alloy-js/core/jsx-runtime";
|
|
2
|
+
export { computed, isProxy, reactive, ref, shallowReactive, shallowRef, toRaw } from "@vue/reactivity";
|
|
3
|
+
export * from "./binder.js";
|
|
4
|
+
export * from "./code.js";
|
|
5
|
+
export * from "./components/index.js";
|
|
6
|
+
export * from "./context.js";
|
|
7
|
+
export * from "./context/index.js";
|
|
8
|
+
export * from "./jsx-runtime.js";
|
|
9
|
+
export * from "./name-policy.js";
|
|
10
|
+
export * from "./refkey.js";
|
|
11
|
+
export * from "./render.js";
|
|
12
|
+
export * from "./utils.js";
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["computed","isProxy","reactive","ref","shallowReactive","shallowRef","toRaw"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,cAAc,4BAA4B;AAC1C,SACEA,QAAQ,EACRC,OAAO,EACPC,QAAQ,EACRC,GAAG,EACHC,eAAe,EACfC,UAAU,EACVC,KAAK,QAEA,iBAAiB;AACxB,cAAc,aAAa;AAC3B,cAAc,WAAW;AACzB,cAAc,uBAAuB;AACrC,cAAc,cAAc;AAC5B,cAAc,oBAAoB;AAClC,cAAc,kBAAkB;AAChC,cAAc,kBAAkB;AAChC,cAAc,aAAa;AAC3B,cAAc,aAAa;AAC3B,cAAc,YAAY","ignoreList":[]}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Ref } from "@vue/reactivity";
|
|
2
|
+
import { Refkey } from "./refkey.js";
|
|
3
|
+
export interface Disposable {
|
|
4
|
+
(): void;
|
|
5
|
+
}
|
|
6
|
+
export interface Context {
|
|
7
|
+
disposables: Disposable[];
|
|
8
|
+
owner: Context | null;
|
|
9
|
+
context?: Record<symbol, unknown>;
|
|
10
|
+
meta?: Record<string, any>;
|
|
11
|
+
}
|
|
12
|
+
export declare function getContext(): Context | null;
|
|
13
|
+
export declare function root<T>(fn: (d: Disposable) => T, src?: string): T;
|
|
14
|
+
export declare function untrack<T>(fn: () => T): T;
|
|
15
|
+
export declare function memo<T>(fn: () => T, equal?: boolean): () => T;
|
|
16
|
+
export declare function effect<T>(fn: (prev?: T) => T, current?: T): void;
|
|
17
|
+
export type Child = string | boolean | number | undefined | null | (() => Child | Children) | Child[] | Ref | Refkey;
|
|
18
|
+
export type Children = Child | Child[];
|
|
19
|
+
export type Props = Record<string, unknown>;
|
|
20
|
+
export interface ComponentDefinition<TProps = Props> {
|
|
21
|
+
(props: TProps): Child | Children;
|
|
22
|
+
}
|
|
23
|
+
export interface Component<TProps = Props> {
|
|
24
|
+
(props: TProps): Child | Children;
|
|
25
|
+
tag?: symbol;
|
|
26
|
+
}
|
|
27
|
+
export interface ComponentCreator<TProps = Props> {
|
|
28
|
+
component: Component<TProps>;
|
|
29
|
+
(): Child | Children;
|
|
30
|
+
props: Props;
|
|
31
|
+
tag?: symbol;
|
|
32
|
+
}
|
|
33
|
+
export declare const shouldDebug: boolean;
|
|
34
|
+
export declare function pushStack(component: Component<any>, props: Props): void;
|
|
35
|
+
export declare function popStack(): void;
|
|
36
|
+
export declare function printRenderStack(): void;
|
|
37
|
+
export declare function isComponentCreator(item: unknown): item is ComponentCreator;
|
|
38
|
+
export declare function createComponent<TProps extends Props = Props>(C: Component<TProps>, props: TProps): ComponentCreator<TProps>;
|
|
39
|
+
export declare function taggedComponent<TProps = Props>(tag: symbol, component: Component<TProps>): Component<TProps>;
|
|
40
|
+
export declare function mergeProps<T, U>(source: T, source1: U): T & U;
|
|
41
|
+
export declare function mergeProps<T, U, V>(source: T, source1: U, source2: V): T & U & V;
|
|
42
|
+
export declare function mergeProps<T, U, V, W>(source: T, source1: U, source2: V, source3: W): T & U & V & W;
|
|
43
|
+
//# sourceMappingURL=jsx-runtime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsx-runtime.d.ts","sourceRoot":"","sources":["../../src/jsx-runtime.ts"],"names":[],"mappings":"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"}
|