@alloy-js/core 0.4.0 → 0.6.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 +53 -0
- package/babel.config.cjs +4 -1
- package/dist/src/binder.d.ts +20 -13
- package/dist/src/binder.d.ts.map +1 -1
- package/dist/src/binder.js +33 -15
- package/dist/src/binder.js.map +1 -1
- package/dist/src/code.d.ts +2 -2
- package/dist/src/code.d.ts.map +1 -1
- package/dist/src/code.js +4 -4
- package/dist/src/code.js.map +1 -1
- package/dist/src/components/Block.d.ts +25 -0
- package/dist/src/components/Block.d.ts.map +1 -0
- package/dist/src/components/Block.js +25 -0
- package/dist/src/components/Block.js.map +1 -0
- 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 +4 -0
- package/dist/src/components/Declaration.js.map +1 -1
- package/dist/src/components/For.d.ts +44 -0
- package/dist/src/components/For.d.ts.map +1 -0
- package/dist/src/components/For.js +41 -0
- package/dist/src/components/For.js.map +1 -0
- package/dist/src/components/Indent.d.ts +6 -10
- package/dist/src/components/Indent.d.ts.map +1 -1
- package/dist/src/components/Indent.js +7 -18
- package/dist/src/components/Indent.js.map +1 -1
- package/dist/src/components/List.d.ts +38 -0
- package/dist/src/components/List.d.ts.map +1 -0
- package/dist/src/components/List.js +40 -0
- package/dist/src/components/List.js.map +1 -0
- package/dist/src/components/MemberDeclaration.d.ts +1 -1
- package/dist/src/components/MemberDeclaration.d.ts.map +1 -1
- package/dist/src/components/MemberDeclaration.js.map +1 -1
- package/dist/src/components/MemberName.d.ts +1 -1
- package/dist/src/components/MemberName.d.ts.map +1 -1
- package/dist/src/components/MemberName.js +1 -1
- package/dist/src/components/MemberName.js.map +1 -1
- package/dist/src/components/MemberScope.d.ts +1 -1
- package/dist/src/components/MemberScope.d.ts.map +1 -1
- package/dist/src/components/MemberScope.js.map +1 -1
- package/dist/src/components/Name.d.ts +1 -1
- package/dist/src/components/Name.d.ts.map +1 -1
- package/dist/src/components/Name.js +1 -1
- package/dist/src/components/Name.js.map +1 -1
- package/dist/src/components/Output.d.ts +3 -2
- package/dist/src/components/Output.d.ts.map +1 -1
- package/dist/src/components/Output.js +12 -2
- package/dist/src/components/Output.js.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/Scope.js.map +1 -1
- package/dist/src/components/Show.d.ts +8 -0
- package/dist/src/components/Show.d.ts.map +1 -0
- package/dist/src/components/Show.js +4 -0
- package/dist/src/components/Show.js.map +1 -0
- package/dist/src/components/SourceDirectory.d.ts +2 -2
- package/dist/src/components/SourceDirectory.d.ts.map +1 -1
- package/dist/src/components/SourceDirectory.js +1 -0
- package/dist/src/components/SourceDirectory.js.map +1 -1
- package/dist/src/components/SourceFile.d.ts +4 -8
- package/dist/src/components/SourceFile.d.ts.map +1 -1
- package/dist/src/components/SourceFile.js +6 -13
- package/dist/src/components/SourceFile.js.map +1 -1
- package/dist/src/components/StatementList.d.ts +9 -0
- package/dist/src/components/StatementList.d.ts.map +1 -0
- package/dist/src/components/StatementList.js +17 -0
- package/dist/src/components/StatementList.js.map +1 -0
- package/dist/src/components/Switch.d.ts +41 -0
- package/dist/src/components/Switch.d.ts.map +1 -0
- package/dist/src/components/Switch.js +41 -0
- package/dist/src/components/Switch.js.map +1 -0
- package/dist/src/components/Wrap.d.ts +20 -0
- package/dist/src/components/Wrap.d.ts.map +1 -0
- package/dist/src/components/Wrap.js +15 -0
- package/dist/src/components/Wrap.js.map +1 -0
- package/dist/src/components/index.d.ts +8 -1
- package/dist/src/components/index.d.ts.map +1 -1
- package/dist/src/components/index.js +7 -0
- package/dist/src/components/index.js.map +1 -1
- package/dist/src/components/stc/index.d.ts +89 -18
- package/dist/src/components/stc/index.d.ts.map +1 -1
- package/dist/src/components/stc/index.js +17 -1
- package/dist/src/components/stc/index.js.map +1 -1
- package/dist/src/context/index.d.ts +0 -1
- package/dist/src/context/index.d.ts.map +1 -1
- package/dist/src/context/index.js +0 -1
- package/dist/src/context/index.js.map +1 -1
- package/dist/src/context/member-declaration.d.ts +1 -0
- package/dist/src/context/member-declaration.d.ts.map +1 -1
- package/dist/src/context/member-declaration.js +4 -1
- package/dist/src/context/member-declaration.js.map +1 -1
- package/dist/src/context.d.ts.map +1 -1
- package/dist/src/context.js +3 -3
- package/dist/src/context.js.map +1 -1
- package/dist/src/index.browser.d.ts +3 -0
- package/dist/src/index.browser.d.ts.map +1 -0
- package/dist/src/index.browser.js +3 -0
- package/dist/src/index.browser.js.map +1 -0
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +2 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/jsx-runtime.d.ts +151 -7
- package/dist/src/jsx-runtime.d.ts.map +1 -1
- package/dist/src/jsx-runtime.js +113 -12
- package/dist/src/jsx-runtime.js.map +1 -1
- package/dist/src/render.d.ts +107 -132
- package/dist/src/render.d.ts.map +1 -1
- package/dist/src/render.js +272 -178
- package/dist/src/render.js.map +1 -1
- package/dist/src/stc.d.ts +14 -0
- package/dist/src/stc.d.ts.map +1 -0
- package/dist/src/stc.js +52 -0
- package/dist/src/stc.js.map +1 -0
- package/dist/src/tap.d.ts +19 -0
- package/dist/src/tap.d.ts.map +1 -0
- package/dist/src/tap.js +39 -0
- package/dist/src/tap.js.map +1 -0
- package/dist/src/utils.d.ts +22 -15
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/src/utils.js +95 -59
- package/dist/src/utils.js.map +1 -1
- package/dist/test/browser-build.test.d.ts +2 -0
- package/dist/test/browser-build.test.d.ts.map +1 -0
- package/dist/test/components/block.test.d.ts +2 -0
- package/dist/test/components/block.test.d.ts.map +1 -0
- package/dist/test/components/declaration.test.d.ts +2 -0
- package/dist/test/components/declaration.test.d.ts.map +1 -0
- package/dist/test/components/list.test.d.ts +2 -0
- package/dist/test/components/list.test.d.ts.map +1 -0
- package/dist/test/components/wrap.test.d.ts +2 -0
- package/dist/test/components/wrap.test.d.ts.map +1 -0
- package/dist/test/control-flow/for.test.d.ts +2 -0
- package/dist/test/control-flow/for.test.d.ts.map +1 -0
- package/dist/test/control-flow/match.test.d.ts +2 -0
- package/dist/test/control-flow/match.test.d.ts.map +1 -0
- package/dist/test/control-flow/show.test.d.ts +2 -0
- package/dist/test/control-flow/show.test.d.ts.map +1 -0
- package/dist/test/reactivity/cleanup.test.d.ts +2 -0
- package/dist/test/reactivity/cleanup.test.d.ts.map +1 -0
- package/dist/test/reactivity/memo.test.d.ts +2 -0
- package/dist/test/reactivity/memo.test.d.ts.map +1 -0
- package/dist/test/reactivity/untrack.test.d.ts +2 -0
- package/dist/test/reactivity/untrack.test.d.ts.map +1 -0
- package/dist/test/rendering/formatting.test.d.ts +2 -0
- package/dist/test/rendering/formatting.test.d.ts.map +1 -0
- package/dist/test/rendering/memoization.test.d.ts +2 -0
- package/dist/test/rendering/memoization.test.d.ts.map +1 -0
- package/dist/test/split-props.test.d.ts +2 -0
- package/dist/test/split-props.test.d.ts.map +1 -0
- package/dist/test/stc.test.d.ts.map +1 -1
- package/dist/test/utils.test.d.ts.map +1 -1
- package/dist/testing/extend-expect.js +4 -4
- package/dist/testing/extend-expect.js.map +1 -1
- package/dist/testing/render.d.ts +2 -3
- package/dist/testing/render.d.ts.map +1 -1
- package/dist/testing/render.js +2 -4
- package/dist/testing/render.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +8 -9
- package/src/binder.ts +60 -50
- package/src/code.ts +17 -12
- package/src/components/Block.tsx +44 -0
- package/src/components/Declaration.tsx +10 -4
- package/src/components/For.tsx +81 -0
- package/src/components/Indent.tsx +20 -27
- package/src/components/List.tsx +94 -0
- package/src/components/MemberDeclaration.tsx +9 -6
- package/src/components/MemberScope.tsx +4 -2
- package/src/components/Output.tsx +27 -14
- package/src/components/Scope.tsx +4 -2
- package/src/components/Show.tsx +11 -0
- package/src/components/SourceDirectory.tsx +6 -2
- package/src/components/SourceFile.tsx +13 -17
- package/src/components/StatementList.tsx +16 -0
- package/src/components/Switch.tsx +62 -0
- package/src/components/Wrap.tsx +29 -0
- package/src/components/index.tsx +8 -1
- package/src/components/stc/index.ts +18 -1
- package/src/context/index.ts +0 -1
- package/src/context/member-declaration.ts +9 -1
- package/src/context.ts +2 -3
- package/src/index.browser.ts +2 -0
- package/src/index.ts +2 -0
- package/src/jsx-runtime.ts +265 -23
- package/src/render.ts +382 -200
- package/src/stc.ts +95 -0
- package/src/tap.ts +69 -0
- package/src/utils.ts +162 -95
- package/temp/api.json +8042 -1886
- package/test/browser-build.test.ts +91 -0
- package/test/children.test.tsx +8 -10
- package/test/components/block.test.tsx +48 -0
- package/test/components/declaration.test.tsx +37 -0
- package/test/components/list.test.tsx +91 -0
- package/test/components/slot.test.tsx +31 -25
- package/test/components/source-file.test.tsx +11 -31
- package/test/components/wrap.test.tsx +42 -0
- package/test/control-flow/for.test.tsx +194 -0
- package/test/control-flow/match.test.tsx +49 -0
- package/test/control-flow/show.test.tsx +25 -0
- package/test/name-policy.test.tsx +5 -5
- package/test/reactivity/cleanup.test.tsx +91 -0
- package/test/reactivity/memo.test.tsx +17 -0
- package/test/reactivity/ref-rendering.test.tsx +3 -8
- package/test/reactivity/test.test.tsx +7 -6
- package/test/reactivity/untrack.test.ts +33 -0
- package/test/rendering/basic.test.tsx +25 -47
- package/test/rendering/code.test.tsx +3 -3
- package/test/rendering/formatting.test.tsx +487 -0
- package/test/rendering/indent.test.tsx +42 -529
- package/test/rendering/memoization.test.tsx +30 -0
- package/test/split-props.test.ts +87 -0
- package/test/stc.test.tsx +29 -8
- package/test/symbols.test.ts +132 -3
- package/test/utils.test.tsx +129 -20
- package/testing/extend-expect.ts +14 -4
- package/testing/render.ts +2 -4
- package/testing/vitest.d.ts +6 -1
- package/vitest.config.ts +1 -1
- package/dist/src/context/indent.d.ts +0 -5
- package/dist/src/context/indent.d.ts.map +0 -1
- package/dist/src/context/indent.js +0 -8
- package/dist/src/context/indent.js.map +0 -1
- package/dist/test/rendering/linebreaks.test.d.ts +0 -2
- package/dist/test/rendering/linebreaks.test.d.ts.map +0 -1
- package/src/context/indent.ts +0 -17
- package/test/rendering/linebreaks.test.tsx +0 -72
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Children, ComponentDefinition } from "@alloy-js/core/jsx-runtime";
|
|
2
|
+
export interface WrapProps<TProps> {
|
|
3
|
+
/**
|
|
4
|
+
* When true, the children will be wrapped with the provided component.
|
|
5
|
+
* Otherwise, the children will be rendered as is.
|
|
6
|
+
*/
|
|
7
|
+
when: boolean;
|
|
8
|
+
/** Children to be wrapped. */
|
|
9
|
+
children: Children;
|
|
10
|
+
/** Component to be used for wrapping. */
|
|
11
|
+
with: ComponentDefinition<TProps>;
|
|
12
|
+
/** Props to pass to the wrapper component. */
|
|
13
|
+
props?: Omit<TProps, "children">;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Conditionally wrap the children of this component with the component given to
|
|
17
|
+
* `with` and passing `props` to it.
|
|
18
|
+
*/
|
|
19
|
+
export declare function Wrap<TProps>(props: WrapProps<TProps>): Children;
|
|
20
|
+
//# sourceMappingURL=Wrap.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Wrap.d.ts","sourceRoot":"","sources":["../../../src/components/Wrap.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAE3E,MAAM,WAAW,SAAS,CAAC,MAAM;IAC/B;;;OAGG;IACH,IAAI,EAAE,OAAO,CAAC;IAEd,8BAA8B;IAC9B,QAAQ,EAAE,QAAQ,CAAC;IAEnB,yCAAyC;IACzC,IAAI,EAAE,mBAAmB,CAAC,MAAM,CAAC,CAAC;IAElC,8CAA8C;IAC9C,KAAK,CAAC,EAAE,IAAI,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;CAClC;AAED;;;GAGG;AACH,wBAAgB,IAAI,CAAC,MAAM,EAAE,KAAK,EAAE,SAAS,CAAC,MAAM,CAAC,YAKpD"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
|
|
2
|
+
import { mergeProps as _$mergeProps } from "@alloy-js/core/jsx-runtime";
|
|
3
|
+
/**
|
|
4
|
+
* Conditionally wrap the children of this component with the component given to
|
|
5
|
+
* `with` and passing `props` to it.
|
|
6
|
+
*/
|
|
7
|
+
export function Wrap(props) {
|
|
8
|
+
const Wrapper = props.with;
|
|
9
|
+
return props.when ? _$createComponent(Wrapper, _$mergeProps(() => props.props ?? {}, {
|
|
10
|
+
get children() {
|
|
11
|
+
return props.children;
|
|
12
|
+
}
|
|
13
|
+
})) : props.children;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=Wrap.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Wrap.js","names":["Wrap","props","Wrapper","with","when","_$createComponent","_$mergeProps","children"],"sources":["../../../src/components/Wrap.tsx"],"sourcesContent":[null],"mappings":";;AAmBA;AACA;AACA;AACA;AACA,OAAO,SAASA,IAAIA,CAASC,KAAwB,EAAE;EACrD,MAAMC,OAAO,GAAGD,KAAK,CAACE,IAAW;EACjC,OAAOF,KAAK,CAACG,IAAI,GAAAC,iBAAA,CACZH,OAAO,EAAAI,YAAA,OAAML,KAAK,CAACA,KAAK,IAAI,CAAC,CAAC;IAAA,IAAAM,SAAA;MAAA,OAAIN,KAAK,CAACM,QAAQ;IAAA;EAAA,MACjDN,KAAK,CAACM,QAAQ;AACpB","ignoreList":[]}
|
|
@@ -1,11 +1,18 @@
|
|
|
1
|
+
export * from "./Block.js";
|
|
1
2
|
export * from "./Declaration.js";
|
|
2
|
-
export * from "./
|
|
3
|
+
export * from "./For.js";
|
|
4
|
+
export * from "./Indent.jsx";
|
|
5
|
+
export * from "./List.jsx";
|
|
3
6
|
export * from "./MemberDeclaration.jsx";
|
|
4
7
|
export * from "./MemberName.jsx";
|
|
5
8
|
export * from "./MemberScope.jsx";
|
|
6
9
|
export * from "./Name.jsx";
|
|
7
10
|
export * from "./Output.js";
|
|
8
11
|
export * from "./Scope.js";
|
|
12
|
+
export * from "./Show.jsx";
|
|
9
13
|
export * from "./SourceDirectory.js";
|
|
10
14
|
export * from "./SourceFile.js";
|
|
15
|
+
export * from "./StatementList.jsx";
|
|
16
|
+
export * from "./Switch.jsx";
|
|
17
|
+
export * from "./Wrap.jsx";
|
|
11
18
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.tsx"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,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,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,11 +1,18 @@
|
|
|
1
|
+
export * from "./Block.js";
|
|
1
2
|
export * from "./Declaration.js";
|
|
3
|
+
export * from "./For.js";
|
|
2
4
|
export * from "./Indent.js";
|
|
5
|
+
export * from "./List.js";
|
|
3
6
|
export * from "./MemberDeclaration.js";
|
|
4
7
|
export * from "./MemberName.js";
|
|
5
8
|
export * from "./MemberScope.js";
|
|
6
9
|
export * from "./Name.js";
|
|
7
10
|
export * from "./Output.js";
|
|
8
11
|
export * from "./Scope.js";
|
|
12
|
+
export * from "./Show.js";
|
|
9
13
|
export * from "./SourceDirectory.js";
|
|
10
14
|
export * from "./SourceFile.js";
|
|
15
|
+
export * from "./StatementList.js";
|
|
16
|
+
export * from "./Switch.js";
|
|
17
|
+
export * from "./Wrap.js";
|
|
11
18
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/components/index.tsx"],"sourcesContent":[null],"mappings":"AAAA,cAAc,kBAAkB;AAChC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/components/index.tsx"],"sourcesContent":[null],"mappings":"AAAA,cAAc,YAAY;AAC1B,cAAc,kBAAkB;AAChC,cAAc,UAAU;AACxB;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,aAAa;AAC3B,cAAc,YAAY;AAC1B;AACA,cAAc,sBAAsB;AACpC,cAAc,iBAAiB;AAC/B;AACA;AACA","ignoreList":[]}
|
|
@@ -1,26 +1,97 @@
|
|
|
1
1
|
import * as base from "../index.js";
|
|
2
|
-
export declare const
|
|
3
|
-
code(template: TemplateStringsArray, ...substitutions: import("
|
|
4
|
-
children(...children: import("
|
|
2
|
+
export declare const Block: (props?: (Omit<base.BlockProps, "children"> & Partial<Pick<base.BlockProps, "children">>) | undefined) => import("@alloy-js/core/jsx-runtime").ComponentCreator<base.BlockProps> & {
|
|
3
|
+
code(template: TemplateStringsArray, ...substitutions: import("@alloy-js/core/jsx-runtime").Children[]): import("@alloy-js/core/jsx-runtime").ComponentCreator<base.BlockProps>;
|
|
4
|
+
children(...children: import("@alloy-js/core/jsx-runtime").Children[]): import("@alloy-js/core/jsx-runtime").ComponentCreator<base.BlockProps>;
|
|
5
5
|
};
|
|
6
|
-
export declare const
|
|
7
|
-
code(template: TemplateStringsArray, ...substitutions: import("
|
|
8
|
-
children(...children: import("
|
|
6
|
+
export declare const Declaration: (props?: (Omit<base.DeclarationProps, "children"> & Partial<Pick<base.DeclarationProps, "children">>) | undefined) => import("@alloy-js/core/jsx-runtime").ComponentCreator<base.DeclarationProps> & {
|
|
7
|
+
code(template: TemplateStringsArray, ...substitutions: import("@alloy-js/core/jsx-runtime").Children[]): import("@alloy-js/core/jsx-runtime").ComponentCreator<base.DeclarationProps>;
|
|
8
|
+
children(...children: import("@alloy-js/core/jsx-runtime").Children[]): import("@alloy-js/core/jsx-runtime").ComponentCreator<base.DeclarationProps>;
|
|
9
9
|
};
|
|
10
|
-
export declare const
|
|
11
|
-
code(template: TemplateStringsArray, ...substitutions: import("
|
|
12
|
-
children(...children: import("
|
|
10
|
+
export declare const For: <T extends base.ForSupportedCollections | (() => base.ForSupportedCollections) | import("@vue/reactivity").Ref<base.ForSupportedCollections>, U extends import("@alloy-js/core/jsx-runtime").Children>(props: Omit<base.ForProps<T, U>, "children"> & Partial<Pick<base.ForProps<T, U>, "children">>) => import("@alloy-js/core/jsx-runtime").ComponentCreator<base.ForProps<T, U>> & {
|
|
11
|
+
code(template: TemplateStringsArray, ...substitutions: import("@alloy-js/core/jsx-runtime").Children[]): import("@alloy-js/core/jsx-runtime").ComponentCreator<base.ForProps<T, U>>;
|
|
12
|
+
children(...children: import("@alloy-js/core/jsx-runtime").Children[]): import("@alloy-js/core/jsx-runtime").ComponentCreator<base.ForProps<T, U>>;
|
|
13
13
|
};
|
|
14
|
-
export declare const
|
|
15
|
-
code(template: TemplateStringsArray, ...substitutions: import("
|
|
16
|
-
children(...children: import("
|
|
14
|
+
export declare const Indent: (props?: (Omit<base.IndentProps, "children"> & Partial<Pick<base.IndentProps, "children">>) | undefined) => import("@alloy-js/core/jsx-runtime").ComponentCreator<base.IndentProps> & {
|
|
15
|
+
code(template: TemplateStringsArray, ...substitutions: import("@alloy-js/core/jsx-runtime").Children[]): import("@alloy-js/core/jsx-runtime").ComponentCreator<base.IndentProps>;
|
|
16
|
+
children(...children: import("@alloy-js/core/jsx-runtime").Children[]): import("@alloy-js/core/jsx-runtime").ComponentCreator<base.IndentProps>;
|
|
17
17
|
};
|
|
18
|
-
export declare const
|
|
19
|
-
code(template: TemplateStringsArray, ...substitutions: import("
|
|
20
|
-
children(...children: import("
|
|
18
|
+
export declare const List: (props?: (Omit<base.ListProps, "children"> & Partial<Pick<base.ListProps, "children">>) | undefined) => import("@alloy-js/core/jsx-runtime").ComponentCreator<base.ListProps> & {
|
|
19
|
+
code(template: TemplateStringsArray, ...substitutions: import("@alloy-js/core/jsx-runtime").Children[]): import("@alloy-js/core/jsx-runtime").ComponentCreator<base.ListProps>;
|
|
20
|
+
children(...children: import("@alloy-js/core/jsx-runtime").Children[]): import("@alloy-js/core/jsx-runtime").ComponentCreator<base.ListProps>;
|
|
21
21
|
};
|
|
22
|
-
export declare const
|
|
23
|
-
code(template: TemplateStringsArray, ...substitutions: import("
|
|
24
|
-
children(...children: import("
|
|
22
|
+
export declare const MemberDeclaration: (props?: (Omit<base.MemberDeclarationProps, "children"> & Partial<Pick<base.MemberDeclarationProps, "children">>) | undefined) => import("@alloy-js/core/jsx-runtime").ComponentCreator<base.MemberDeclarationProps> & {
|
|
23
|
+
code(template: TemplateStringsArray, ...substitutions: import("@alloy-js/core/jsx-runtime").Children[]): import("@alloy-js/core/jsx-runtime").ComponentCreator<base.MemberDeclarationProps>;
|
|
24
|
+
children(...children: import("@alloy-js/core/jsx-runtime").Children[]): import("@alloy-js/core/jsx-runtime").ComponentCreator<base.MemberDeclarationProps>;
|
|
25
|
+
};
|
|
26
|
+
export declare const MemberName: (props?: (Omit<{}, "children"> & Partial<Pick<{}, "children">>) | undefined) => import("@alloy-js/core/jsx-runtime").ComponentCreator<{}> & {
|
|
27
|
+
code(template: TemplateStringsArray, ...substitutions: import("@alloy-js/core/jsx-runtime").Children[]): import("@alloy-js/core/jsx-runtime").ComponentCreator<{}>;
|
|
28
|
+
children(...children: import("@alloy-js/core/jsx-runtime").Children[]): import("@alloy-js/core/jsx-runtime").ComponentCreator<{}>;
|
|
29
|
+
};
|
|
30
|
+
export declare const MemberScope: (props: Omit<base.MemberScopeProps, "children"> & Partial<Pick<base.MemberScopeProps, "children">>) => import("@alloy-js/core/jsx-runtime").ComponentCreator<base.MemberScopeProps> & {
|
|
31
|
+
code(template: TemplateStringsArray, ...substitutions: import("@alloy-js/core/jsx-runtime").Children[]): import("@alloy-js/core/jsx-runtime").ComponentCreator<base.MemberScopeProps>;
|
|
32
|
+
children(...children: import("@alloy-js/core/jsx-runtime").Children[]): import("@alloy-js/core/jsx-runtime").ComponentCreator<base.MemberScopeProps>;
|
|
33
|
+
};
|
|
34
|
+
export declare const Name: (props?: (Omit<{}, "children"> & Partial<Pick<{}, "children">>) | undefined) => import("@alloy-js/core/jsx-runtime").ComponentCreator<{}> & {
|
|
35
|
+
code(template: TemplateStringsArray, ...substitutions: import("@alloy-js/core/jsx-runtime").Children[]): import("@alloy-js/core/jsx-runtime").ComponentCreator<{}>;
|
|
36
|
+
children(...children: import("@alloy-js/core/jsx-runtime").Children[]): import("@alloy-js/core/jsx-runtime").ComponentCreator<{}>;
|
|
37
|
+
};
|
|
38
|
+
export declare const Output: (props?: (Omit<base.OutputProps, "children"> & Partial<Pick<base.OutputProps, "children">>) | undefined) => import("@alloy-js/core/jsx-runtime").ComponentCreator<base.OutputProps> & {
|
|
39
|
+
code(template: TemplateStringsArray, ...substitutions: import("@alloy-js/core/jsx-runtime").Children[]): import("@alloy-js/core/jsx-runtime").ComponentCreator<base.OutputProps>;
|
|
40
|
+
children(...children: import("@alloy-js/core/jsx-runtime").Children[]): import("@alloy-js/core/jsx-runtime").ComponentCreator<base.OutputProps>;
|
|
41
|
+
};
|
|
42
|
+
export declare const Scope: (props?: (Omit<base.ScopeProps, "children"> & Partial<Pick<base.ScopeProps, "children">>) | undefined) => import("@alloy-js/core/jsx-runtime").ComponentCreator<base.ScopeProps> & {
|
|
43
|
+
code(template: TemplateStringsArray, ...substitutions: import("@alloy-js/core/jsx-runtime").Children[]): import("@alloy-js/core/jsx-runtime").ComponentCreator<base.ScopeProps>;
|
|
44
|
+
children(...children: import("@alloy-js/core/jsx-runtime").Children[]): import("@alloy-js/core/jsx-runtime").ComponentCreator<base.ScopeProps>;
|
|
45
|
+
};
|
|
46
|
+
export declare const Show: (props: Omit<base.ShowProps, "children"> & Partial<Pick<base.ShowProps, "children">>) => import("@alloy-js/core/jsx-runtime").ComponentCreator<base.ShowProps> & {
|
|
47
|
+
code(template: TemplateStringsArray, ...substitutions: import("@alloy-js/core/jsx-runtime").Children[]): import("@alloy-js/core/jsx-runtime").ComponentCreator<base.ShowProps>;
|
|
48
|
+
children(...children: import("@alloy-js/core/jsx-runtime").Children[]): import("@alloy-js/core/jsx-runtime").ComponentCreator<base.ShowProps>;
|
|
49
|
+
};
|
|
50
|
+
export declare const StatementList: (props?: (Omit<base.StatementListProps, "children"> & Partial<Pick<base.StatementListProps, "children">>) | undefined) => import("@alloy-js/core/jsx-runtime").ComponentCreator<base.StatementListProps> & {
|
|
51
|
+
code(template: TemplateStringsArray, ...substitutions: import("@alloy-js/core/jsx-runtime").Children[]): import("@alloy-js/core/jsx-runtime").ComponentCreator<base.StatementListProps>;
|
|
52
|
+
children(...children: import("@alloy-js/core/jsx-runtime").Children[]): import("@alloy-js/core/jsx-runtime").ComponentCreator<base.StatementListProps>;
|
|
53
|
+
};
|
|
54
|
+
export declare const SourceDirectory: (props: Omit<base.SourceDirectoryProps, "children"> & Partial<Pick<base.SourceDirectoryProps, "children">>) => import("@alloy-js/core/jsx-runtime").ComponentCreator<base.SourceDirectoryProps> & {
|
|
55
|
+
code(template: TemplateStringsArray, ...substitutions: import("@alloy-js/core/jsx-runtime").Children[]): import("@alloy-js/core/jsx-runtime").ComponentCreator<base.SourceDirectoryProps>;
|
|
56
|
+
children(...children: import("@alloy-js/core/jsx-runtime").Children[]): import("@alloy-js/core/jsx-runtime").ComponentCreator<base.SourceDirectoryProps>;
|
|
57
|
+
};
|
|
58
|
+
export declare const SourceFile: (props: Omit<base.SourceFileProps, "children"> & Partial<Pick<base.SourceFileProps, "children">>) => import("@alloy-js/core/jsx-runtime").ComponentCreator<base.SourceFileProps> & {
|
|
59
|
+
code(template: TemplateStringsArray, ...substitutions: import("@alloy-js/core/jsx-runtime").Children[]): import("@alloy-js/core/jsx-runtime").ComponentCreator<base.SourceFileProps>;
|
|
60
|
+
children(...children: import("@alloy-js/core/jsx-runtime").Children[]): import("@alloy-js/core/jsx-runtime").ComponentCreator<base.SourceFileProps>;
|
|
61
|
+
};
|
|
62
|
+
export declare const Switch: (props?: (Omit<base.SwitchProps, "children"> & Partial<Pick<base.SwitchProps, "children">>) | undefined) => import("@alloy-js/core/jsx-runtime").ComponentCreator<base.SwitchProps> & {
|
|
63
|
+
code(template: TemplateStringsArray, ...substitutions: import("@alloy-js/core/jsx-runtime").Children[]): import("@alloy-js/core/jsx-runtime").ComponentCreator<base.SwitchProps>;
|
|
64
|
+
children(...children: import("@alloy-js/core/jsx-runtime").Children[]): import("@alloy-js/core/jsx-runtime").ComponentCreator<base.SwitchProps>;
|
|
65
|
+
};
|
|
66
|
+
export declare const Wrap: <TProps>(props: Omit<base.WrapProps<TProps>, "children"> & Partial<Pick<base.WrapProps<TProps>, "children">>) => import("@alloy-js/core/jsx-runtime").ComponentCreator<base.WrapProps<TProps>> & {
|
|
67
|
+
code(template: TemplateStringsArray, ...substitutions: import("@alloy-js/core/jsx-runtime").Children[]): import("@alloy-js/core/jsx-runtime").ComponentCreator<base.WrapProps<TProps>>;
|
|
68
|
+
children(...children: import("@alloy-js/core/jsx-runtime").Children[]): import("@alloy-js/core/jsx-runtime").ComponentCreator<base.WrapProps<TProps>>;
|
|
69
|
+
};
|
|
70
|
+
export declare const indent: (props?: {
|
|
71
|
+
children: import("@alloy-js/core/jsx-runtime").Children;
|
|
72
|
+
} | undefined) => {
|
|
73
|
+
(): import("@alloy-js/core/jsx-runtime").IntrinsicElementBase<"indent">;
|
|
74
|
+
children(...children: import("@alloy-js/core/jsx-runtime").Children[]): () => import("@alloy-js/core/jsx-runtime").IntrinsicElementBase<"indent">;
|
|
75
|
+
code(template: TemplateStringsArray, ...substitutions: import("@alloy-js/core/jsx-runtime").Children[]): () => import("@alloy-js/core/jsx-runtime").IntrinsicElementBase<"indent">;
|
|
76
|
+
};
|
|
77
|
+
export declare const hbr: (props?: {} | undefined) => {
|
|
78
|
+
(): import("@alloy-js/core/jsx-runtime").IntrinsicElementBase<"hbr">;
|
|
79
|
+
children(...children: import("@alloy-js/core/jsx-runtime").Children[]): () => import("@alloy-js/core/jsx-runtime").IntrinsicElementBase<"hbr">;
|
|
80
|
+
code(template: TemplateStringsArray, ...substitutions: import("@alloy-js/core/jsx-runtime").Children[]): () => import("@alloy-js/core/jsx-runtime").IntrinsicElementBase<"hbr">;
|
|
81
|
+
};
|
|
82
|
+
export declare const sbr: (props?: {} | undefined) => {
|
|
83
|
+
(): import("@alloy-js/core/jsx-runtime").IntrinsicElementBase<"sbr">;
|
|
84
|
+
children(...children: import("@alloy-js/core/jsx-runtime").Children[]): () => import("@alloy-js/core/jsx-runtime").IntrinsicElementBase<"sbr">;
|
|
85
|
+
code(template: TemplateStringsArray, ...substitutions: import("@alloy-js/core/jsx-runtime").Children[]): () => import("@alloy-js/core/jsx-runtime").IntrinsicElementBase<"sbr">;
|
|
86
|
+
};
|
|
87
|
+
export declare const lbr: (props?: {} | undefined) => {
|
|
88
|
+
(): import("@alloy-js/core/jsx-runtime").IntrinsicElementBase<"lbr">;
|
|
89
|
+
children(...children: import("@alloy-js/core/jsx-runtime").Children[]): () => import("@alloy-js/core/jsx-runtime").IntrinsicElementBase<"lbr">;
|
|
90
|
+
code(template: TemplateStringsArray, ...substitutions: import("@alloy-js/core/jsx-runtime").Children[]): () => import("@alloy-js/core/jsx-runtime").IntrinsicElementBase<"lbr">;
|
|
91
|
+
};
|
|
92
|
+
export declare const br: (props?: {} | undefined) => {
|
|
93
|
+
(): import("@alloy-js/core/jsx-runtime").IntrinsicElementBase<"br">;
|
|
94
|
+
children(...children: import("@alloy-js/core/jsx-runtime").Children[]): () => import("@alloy-js/core/jsx-runtime").IntrinsicElementBase<"br">;
|
|
95
|
+
code(template: TemplateStringsArray, ...substitutions: import("@alloy-js/core/jsx-runtime").Children[]): () => import("@alloy-js/core/jsx-runtime").IntrinsicElementBase<"br">;
|
|
25
96
|
};
|
|
26
97
|
//# 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,WAAW;;;CAAwB,CAAC;AACjD,eAAO,MAAM,MAAM;;;CAAmB,CAAC;AACvC,eAAO,MAAM,MAAM;;;CAAmB,CAAC;AACvC,eAAO,MAAM,KAAK;;;CAAkB,CAAC;AACrC,eAAO,MAAM,eAAe;;;CAA4B,CAAC;AACzD,eAAO,MAAM,UAAU;;;CAAuB,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;;;CAAkB,CAAC;AACrC,eAAO,MAAM,WAAW;;;CAAwB,CAAC;AACjD,eAAO,MAAM,GAAG;;;CAAgB,CAAC;AACjC,eAAO,MAAM,MAAM;;;CAAmB,CAAC;AACvC,eAAO,MAAM,IAAI;;;CAAiB,CAAC;AACnC,eAAO,MAAM,iBAAiB;;;CAA8B,CAAC;AAC7D,eAAO,MAAM,UAAU;;;CAAuB,CAAC;AAC/C,eAAO,MAAM,WAAW;;;CAAwB,CAAC;AACjD,eAAO,MAAM,IAAI;;;CAAiB,CAAC;AACnC,eAAO,MAAM,MAAM;;;CAAmB,CAAC;AACvC,eAAO,MAAM,KAAK;;;CAAkB,CAAC;AACrC,eAAO,MAAM,IAAI;;;CAAiB,CAAC;AACnC,eAAO,MAAM,aAAa;;;CAA0B,CAAC;AACrD,eAAO,MAAM,eAAe;;;CAA4B,CAAC;AACzD,eAAO,MAAM,UAAU;;;CAAuB,CAAC;AAC/C,eAAO,MAAM,MAAM;;;CAAmB,CAAC;AACvC,eAAO,MAAM,IAAI;;;CAAiB,CAAC;AAEnC,eAAO,MAAM,MAAM;;;;;;CAAgB,CAAC;AACpC,eAAO,MAAM,GAAG;;;;CAAa,CAAC;AAC9B,eAAO,MAAM,GAAG;;;;CAAa,CAAC;AAC9B,eAAO,MAAM,GAAG;;;;CAAa,CAAC;AAC9B,eAAO,MAAM,EAAE;;;;CAAY,CAAC"}
|
|
@@ -1,9 +1,25 @@
|
|
|
1
|
-
import { stc } from "../../
|
|
1
|
+
import { stc, sti } from "../../stc.js";
|
|
2
2
|
import * as base from "../index.js";
|
|
3
|
+
export const Block = stc(base.Block);
|
|
3
4
|
export const Declaration = stc(base.Declaration);
|
|
5
|
+
export const For = stc(base.For);
|
|
4
6
|
export const Indent = stc(base.Indent);
|
|
7
|
+
export const List = stc(base.List);
|
|
8
|
+
export const MemberDeclaration = stc(base.MemberDeclaration);
|
|
9
|
+
export const MemberName = stc(base.MemberName);
|
|
10
|
+
export const MemberScope = stc(base.MemberScope);
|
|
11
|
+
export const Name = stc(base.Name);
|
|
5
12
|
export const Output = stc(base.Output);
|
|
6
13
|
export const Scope = stc(base.Scope);
|
|
14
|
+
export const Show = stc(base.Show);
|
|
15
|
+
export const StatementList = stc(base.StatementList);
|
|
7
16
|
export const SourceDirectory = stc(base.SourceDirectory);
|
|
8
17
|
export const SourceFile = stc(base.SourceFile);
|
|
18
|
+
export const Switch = stc(base.Switch);
|
|
19
|
+
export const Wrap = stc(base.Wrap);
|
|
20
|
+
export const indent = sti("indent");
|
|
21
|
+
export const hbr = sti("hbr");
|
|
22
|
+
export const sbr = sti("sbr");
|
|
23
|
+
export const lbr = sti("lbr");
|
|
24
|
+
export const br = sti("br");
|
|
9
25
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +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,
|
|
1
|
+
{"version":3,"file":"index.js","names":["stc","sti","base","Block","Declaration","For","Indent","List","MemberDeclaration","MemberName","MemberScope","Name","Output","Scope","Show","StatementList","SourceDirectory","SourceFile","Switch","Wrap","indent","hbr","sbr","lbr","br"],"sources":["../../../../src/components/stc/index.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,GAAG,EAAEC,GAAG,QAAQ,cAAc;AACvC,OAAO,KAAKC,IAAI,MAAM,aAAa;AAEnC,OAAO,MAAMC,KAAK,GAAGH,GAAG,CAACE,IAAI,CAACC,KAAK,CAAC;AACpC,OAAO,MAAMC,WAAW,GAAGJ,GAAG,CAACE,IAAI,CAACE,WAAW,CAAC;AAChD,OAAO,MAAMC,GAAG,GAAGL,GAAG,CAACE,IAAI,CAACG,GAAG,CAAC;AAChC,OAAO,MAAMC,MAAM,GAAGN,GAAG,CAACE,IAAI,CAACI,MAAM,CAAC;AACtC,OAAO,MAAMC,IAAI,GAAGP,GAAG,CAACE,IAAI,CAACK,IAAI,CAAC;AAClC,OAAO,MAAMC,iBAAiB,GAAGR,GAAG,CAACE,IAAI,CAACM,iBAAiB,CAAC;AAC5D,OAAO,MAAMC,UAAU,GAAGT,GAAG,CAACE,IAAI,CAACO,UAAU,CAAC;AAC9C,OAAO,MAAMC,WAAW,GAAGV,GAAG,CAACE,IAAI,CAACQ,WAAW,CAAC;AAChD,OAAO,MAAMC,IAAI,GAAGX,GAAG,CAACE,IAAI,CAACS,IAAI,CAAC;AAClC,OAAO,MAAMC,MAAM,GAAGZ,GAAG,CAACE,IAAI,CAACU,MAAM,CAAC;AACtC,OAAO,MAAMC,KAAK,GAAGb,GAAG,CAACE,IAAI,CAACW,KAAK,CAAC;AACpC,OAAO,MAAMC,IAAI,GAAGd,GAAG,CAACE,IAAI,CAACY,IAAI,CAAC;AAClC,OAAO,MAAMC,aAAa,GAAGf,GAAG,CAACE,IAAI,CAACa,aAAa,CAAC;AACpD,OAAO,MAAMC,eAAe,GAAGhB,GAAG,CAACE,IAAI,CAACc,eAAe,CAAC;AACxD,OAAO,MAAMC,UAAU,GAAGjB,GAAG,CAACE,IAAI,CAACe,UAAU,CAAC;AAC9C,OAAO,MAAMC,MAAM,GAAGlB,GAAG,CAACE,IAAI,CAACgB,MAAM,CAAC;AACtC,OAAO,MAAMC,IAAI,GAAGnB,GAAG,CAACE,IAAI,CAACiB,IAAI,CAAC;AAElC,OAAO,MAAMC,MAAM,GAAGnB,GAAG,CAAC,QAAQ,CAAC;AACnC,OAAO,MAAMoB,GAAG,GAAGpB,GAAG,CAAC,KAAK,CAAC;AAC7B,OAAO,MAAMqB,GAAG,GAAGrB,GAAG,CAAC,KAAK,CAAC;AAC7B,OAAO,MAAMsB,GAAG,GAAGtB,GAAG,CAAC,KAAK,CAAC;AAC7B,OAAO,MAAMuB,EAAE,GAAGvB,GAAG,CAAC,IAAI,CAAC","ignoreList":[]}
|
|
@@ -1 +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,
|
|
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,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC"}
|
|
@@ -1 +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,
|
|
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,yBAAyB;AACvC,cAAc,mBAAmB;AACjC,cAAc,kBAAkB;AAChC,cAAc,YAAY;AAC1B,cAAc,uBAAuB;AACrC,cAAc,kBAAkB","ignoreList":[]}
|
|
@@ -6,4 +6,5 @@ import { ComponentContext } from "../context.js";
|
|
|
6
6
|
* @see {@link DeclarationContext} for getting the symbol for the current non-member declaration.
|
|
7
7
|
*/
|
|
8
8
|
export declare const MemberDeclarationContext: ComponentContext<OutputSymbol>;
|
|
9
|
+
export declare function useMemberDeclaration(): OutputSymbol | undefined;
|
|
9
10
|
//# sourceMappingURL=member-declaration.d.ts.map
|
|
@@ -1 +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,
|
|
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,EACL,gBAAgB,EAGjB,MAAM,eAAe,CAAC;AAEvB;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,EAAE,gBAAgB,CAAC,YAAY,CAC3B,CAAC;AAE1C,wBAAgB,oBAAoB,6BAEnC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createNamedContext } from "../context.js";
|
|
1
|
+
import { createNamedContext, useContext } from "../context.js";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Provides the symbol for the member currently being declared.
|
|
@@ -6,4 +6,7 @@ import { createNamedContext } from "../context.js";
|
|
|
6
6
|
* @see {@link DeclarationContext} for getting the symbol for the current non-member declaration.
|
|
7
7
|
*/
|
|
8
8
|
export const MemberDeclarationContext = createNamedContext("MemberDeclaration");
|
|
9
|
+
export function useMemberDeclaration() {
|
|
10
|
+
return useContext(MemberDeclarationContext);
|
|
11
|
+
}
|
|
9
12
|
//# sourceMappingURL=member-declaration.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"member-declaration.js","names":["createNamedContext","MemberDeclarationContext"],"sources":["../../../src/context/member-declaration.ts"],"sourcesContent":[null],"mappings":"AACA,
|
|
1
|
+
{"version":3,"file":"member-declaration.js","names":["createNamedContext","useContext","MemberDeclarationContext","useMemberDeclaration"],"sources":["../../../src/context/member-declaration.ts"],"sourcesContent":[null],"mappings":"AACA,SAEEA,kBAAkB,EAClBC,UAAU,QACL,eAAe;;AAEtB;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,wBAAwD,GACnEF,kBAAkB,CAAC,mBAAmB,CAAC;AAEzC,OAAO,SAASG,oBAAoBA,CAAA,EAAG;EACrC,OAAOF,UAAU,CAACC,wBAAwB,CAAC;AAC7C","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/context.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EACR,mBAAmB,
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/context.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EACR,mBAAmB,EAGpB,MAAM,kBAAkB,CAAC;AAE1B,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;IACvD,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;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,eAAO,MAAM,aAAa,oCAA2C,CAAC;AAEtE,wBAAgB,aAAa,CAAC,CAAC,GAAG,OAAO,EACvC,YAAY,CAAC,EAAE,CAAC,EAChB,IAAI,CAAC,EAAE,MAAM,GACZ,gBAAgB,CAAC,CAAC,CAAC,CAoBrB;AAED,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,CAAC,uBAEnE"}
|
package/dist/src/context.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { shallowRef } from "@vue/reactivity";
|
|
2
|
-
import { effect, getContext
|
|
2
|
+
import { effect, getContext } from "./jsx-runtime.js";
|
|
3
3
|
export function useContext(context) {
|
|
4
4
|
// context must come from a parent
|
|
5
5
|
let current = getContext();
|
|
@@ -23,8 +23,8 @@ export function createContext(defaultValue, name) {
|
|
|
23
23
|
const rendered = shallowRef();
|
|
24
24
|
effect(() => {
|
|
25
25
|
context.context[id] = props.value;
|
|
26
|
-
rendered.value =
|
|
27
|
-
});
|
|
26
|
+
rendered.value = () => props.children;
|
|
27
|
+
}, undefined);
|
|
28
28
|
return rendered.value;
|
|
29
29
|
}
|
|
30
30
|
};
|
package/dist/src/context.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","names":["shallowRef","effect","getContext","
|
|
1
|
+
{"version":3,"file":"context.js","names":["shallowRef","effect","getContext","useContext","context","current","Object","hasOwn","id","owner","default","contextsByKey","Map","createContext","defaultValue","name","Symbol","ctx","Provider","props","rendered","value","children","undefined","set","createNamedContext"],"sources":["../../src/context.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,UAAU,QAAQ,iBAAiB;AAC5C,SAGEC,MAAM,EACNC,UAAU,QACL,kBAAkB;AAczB,OAAO,SAASC,UAAUA,CAAIC,OAA4B,EAAiB;EACzE;EACA,IAAIC,OAAO,GAAGH,UAAU,CAAC,CAAC;EAC1B,OAAOG,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,MAAMC,aAAa,GAAG,IAAIC,GAAG,CAAgC,CAAC;AAErE,OAAO,SAASC,aAAaA,CAC3BC,YAAgB,EAChBC,IAAa,EACQ;EACrB,MAAMP,EAAE,GAAGQ,MAAM,CAACD,IAAI,IAAI,SAAS,CAAC;EACpC,MAAME,GAAG,GAAG;IACVT,EAAE;IACFE,OAAO,EAAEI,YAAY;IACrBC,IAAI;IACJG,QAAQA,CAACC,KAA8B,EAAE;MACvC,MAAMf,OAAO,GAAGF,UAAU,CAAC,CAAC;MAE5B,MAAMkB,QAAQ,GAAGpB,UAAU,CAAC,CAAC;MAC7BC,MAAM,CAAC,MAAM;QACXG,OAAO,CAAEA,OAAO,CAAEI,EAAE,CAAC,GAAGW,KAAK,CAACE,KAAK;QACnCD,QAAQ,CAACC,KAAK,GAAG,MAAMF,KAAK,CAACG,QAAQ;MACvC,CAAC,EAAEC,SAAS,CAAC;MAEb,OAAOH,QAAQ,CAACC,KAAK;IACvB;EACF,CAAC;EACDV,aAAa,CAACa,GAAG,CAAChB,EAAE,EAAES,GAAG,CAAC;EAC1B,OAAOA,GAAG;AACZ;AAEA,OAAO,SAASQ,kBAAkBA,CAAIV,IAAY,EAAED,YAAgB,EAAE;EACpE,OAAOD,aAAa,CAAIC,YAAY,EAAEC,IAAI,CAAC;AAC7C","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.browser.d.ts","sourceRoot":"","sources":["../../src/index.browser.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.browser.js","names":["writeOutput"],"sources":["../../src/index.browser.ts"],"sourcesContent":[null],"mappings":"AAAA,cAAc,YAAY,CAAC,CAAC;AAC5B,SAASA,WAAW,QAAQ,2BAA2B,CAAC,CAAC","ignoreList":[]}
|
package/dist/src/index.d.ts
CHANGED
|
@@ -8,6 +8,8 @@ export * from "./jsx-runtime.js";
|
|
|
8
8
|
export * from "./name-policy.js";
|
|
9
9
|
export * from "./refkey.js";
|
|
10
10
|
export * from "./render.js";
|
|
11
|
+
export * from "./stc.js";
|
|
12
|
+
export * from "./tap.js";
|
|
11
13
|
export * from "./utils.js";
|
|
12
14
|
export * from "./write-output.js";
|
|
13
15
|
import "./debug.js";
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,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;AAC3B,cAAc,mBAAmB,CAAC;AAClC,OAAO,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,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,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,OAAO,YAAY,CAAC"}
|
package/dist/src/index.js
CHANGED
|
@@ -8,6 +8,8 @@ export * from "./jsx-runtime.js";
|
|
|
8
8
|
export * from "./name-policy.js";
|
|
9
9
|
export * from "./refkey.js";
|
|
10
10
|
export * from "./render.js";
|
|
11
|
+
export * from "./stc.js";
|
|
12
|
+
export * from "./tap.js";
|
|
11
13
|
export * from "./utils.js";
|
|
12
14
|
export * from "./write-output.js";
|
|
13
15
|
import "./debug.js";
|
package/dist/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["computed","isProxy","reactive","ref","shallowReactive","shallowRef","toRaw"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,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;AAC1B,cAAc,mBAAmB;AACjC,OAAO,YAAY","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"index.js","names":["computed","isProxy","reactive","ref","shallowReactive","shallowRef","toRaw"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,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,UAAU;AACxB,cAAc,UAAU;AACxB,cAAc,YAAY;AAC1B,cAAc,mBAAmB;AACjC,OAAO,YAAY","ignoreList":[]}
|