@powerlines/plugin-alloy 0.26.123 → 0.26.124
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/components/infrastructure-file.d.cts +3 -4
- package/dist/core/components/infrastructure-file.d.cts.map +1 -1
- package/dist/core/components/infrastructure-file.d.mts +3 -4
- package/dist/core/components/infrastructure-file.d.mts.map +1 -1
- package/dist/core/components/infrastructure-file.mjs.map +1 -1
- package/dist/core/components/output.d.cts +2 -3
- package/dist/core/components/output.d.cts.map +1 -1
- package/dist/core/components/output.d.mts +2 -3
- package/dist/core/components/output.d.mts.map +1 -1
- package/dist/core/components/output.mjs.map +1 -1
- package/dist/core/components/single-line-comment.d.cts +1 -2
- package/dist/core/components/single-line-comment.d.cts.map +1 -1
- package/dist/core/components/single-line-comment.d.mts +1 -2
- package/dist/core/components/single-line-comment.d.mts.map +1 -1
- package/dist/core/components/single-line-comment.mjs.map +1 -1
- package/dist/core/components/source-file.d.cts +1 -2
- package/dist/core/components/source-file.d.cts.map +1 -1
- package/dist/core/components/source-file.d.mts +1 -2
- package/dist/core/components/source-file.d.mts.map +1 -1
- package/dist/core/components/source-file.mjs.map +1 -1
- package/dist/core/components/spacing.d.cts +1 -3
- package/dist/core/components/spacing.d.cts.map +1 -1
- package/dist/core/components/spacing.d.mts +1 -3
- package/dist/core/components/spacing.d.mts.map +1 -1
- package/dist/core/components/spacing.mjs.map +1 -1
- package/dist/core/contexts/context.d.cts.map +1 -1
- package/dist/core/contexts/context.d.mts.map +1 -1
- package/dist/core/contexts/context.mjs.map +1 -1
- package/dist/core/contexts/meta.d.cts.map +1 -1
- package/dist/core/contexts/meta.d.mts.map +1 -1
- package/dist/core/contexts/meta.mjs.map +1 -1
- package/dist/core/contexts/reflection.d.cts.map +1 -1
- package/dist/core/contexts/reflection.d.mts.map +1 -1
- package/dist/core/contexts/reflection.mjs.map +1 -1
- package/dist/core/helpers/code.d.cts.map +1 -1
- package/dist/core/helpers/code.d.mts.map +1 -1
- package/dist/core/helpers/code.mjs.map +1 -1
- package/dist/hcl/components/block-declaration.d.cts +1 -2
- package/dist/hcl/components/block-declaration.d.cts.map +1 -1
- package/dist/hcl/components/block-declaration.d.mts +1 -2
- package/dist/hcl/components/block-declaration.d.mts.map +1 -1
- package/dist/hcl/components/block-declaration.mjs.map +1 -1
- package/dist/hcl/components/hcl-file.mjs.map +1 -1
- package/dist/hcl/components/packer-file.d.cts +1 -2
- package/dist/hcl/components/packer-file.d.cts.map +1 -1
- package/dist/hcl/components/packer-file.d.mts +1 -2
- package/dist/hcl/components/packer-file.d.mts.map +1 -1
- package/dist/hcl/components/packer-file.mjs.map +1 -1
- package/dist/hcl/components/terraform-file.d.cts +1 -2
- package/dist/hcl/components/terraform-file.d.cts.map +1 -1
- package/dist/hcl/components/terraform-file.d.mts +1 -2
- package/dist/hcl/components/terraform-file.d.mts.map +1 -1
- package/dist/hcl/components/terraform-file.mjs.map +1 -1
- package/dist/helpers/capnp.d.cts.map +1 -1
- package/dist/helpers/capnp.d.mts.map +1 -1
- package/dist/helpers/capnp.mjs.map +1 -1
- package/dist/helpers/create-builtin.mjs.map +1 -1
- package/dist/helpers/refkey.d.cts.map +1 -1
- package/dist/helpers/refkey.d.mts.map +1 -1
- package/dist/helpers/refkey.mjs.map +1 -1
- package/dist/helpers/typescript.d.cts.map +1 -1
- package/dist/helpers/typescript.d.mts.map +1 -1
- package/dist/helpers/typescript.mjs.map +1 -1
- package/dist/index.cjs +2 -6
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +2 -6
- package/dist/index.mjs.map +1 -1
- package/dist/markdown/components/front-matter.d.cts +1 -3
- package/dist/markdown/components/front-matter.d.cts.map +1 -1
- package/dist/markdown/components/front-matter.d.mts +1 -3
- package/dist/markdown/components/front-matter.d.mts.map +1 -1
- package/dist/markdown/components/front-matter.mjs.map +1 -1
- package/dist/markdown/components/heading.d.cts +1 -2
- package/dist/markdown/components/heading.d.cts.map +1 -1
- package/dist/markdown/components/heading.d.mts +1 -2
- package/dist/markdown/components/heading.d.mts.map +1 -1
- package/dist/markdown/components/heading.mjs.map +1 -1
- package/dist/markdown/components/markdown-file.d.cts +4 -5
- package/dist/markdown/components/markdown-file.d.cts.map +1 -1
- package/dist/markdown/components/markdown-file.d.mts +4 -5
- package/dist/markdown/components/markdown-file.d.mts.map +1 -1
- package/dist/markdown/components/markdown-file.mjs.map +1 -1
- package/dist/markdown/components/markdown-table.d.cts +3 -4
- package/dist/markdown/components/markdown-table.d.cts.map +1 -1
- package/dist/markdown/components/markdown-table.d.mts +3 -4
- package/dist/markdown/components/markdown-table.d.mts.map +1 -1
- package/dist/markdown/components/markdown-table.mjs.map +1 -1
- package/dist/markdown/contexts/markdown-table.d.cts.map +1 -1
- package/dist/markdown/contexts/markdown-table.d.mts.map +1 -1
- package/dist/markdown/contexts/markdown-table.mjs.map +1 -1
- package/dist/render.d.cts.map +1 -1
- package/dist/render.d.mts.map +1 -1
- package/dist/render.mjs.map +1 -1
- package/dist/types/components.d.cts.map +1 -1
- package/dist/types/components.d.mts.map +1 -1
- package/dist/types/plugin.d.cts +1 -20
- package/dist/types/plugin.d.cts.map +1 -1
- package/dist/types/plugin.d.mts +1 -20
- package/dist/types/plugin.d.mts.map +1 -1
- package/dist/typescript/components/builtin-file.d.cts +1 -2
- package/dist/typescript/components/builtin-file.d.cts.map +1 -1
- package/dist/typescript/components/builtin-file.d.mts +1 -2
- package/dist/typescript/components/builtin-file.d.mts.map +1 -1
- package/dist/typescript/components/builtin-file.mjs.map +1 -1
- package/dist/typescript/components/class-declaration.d.cts.map +1 -1
- package/dist/typescript/components/class-declaration.d.mts.map +1 -1
- package/dist/typescript/components/class-declaration.mjs.map +1 -1
- package/dist/typescript/components/dynamic-import-statement.d.cts +1 -2
- package/dist/typescript/components/dynamic-import-statement.d.cts.map +1 -1
- package/dist/typescript/components/dynamic-import-statement.d.mts +1 -2
- package/dist/typescript/components/dynamic-import-statement.d.mts.map +1 -1
- package/dist/typescript/components/dynamic-import-statement.mjs.map +1 -1
- package/dist/typescript/components/entry-file.d.cts +1 -2
- package/dist/typescript/components/entry-file.d.cts.map +1 -1
- package/dist/typescript/components/entry-file.d.mts +1 -2
- package/dist/typescript/components/entry-file.d.mts.map +1 -1
- package/dist/typescript/components/entry-file.mjs.map +1 -1
- package/dist/typescript/components/interface-declaration.d.cts +1 -2
- package/dist/typescript/components/interface-declaration.d.cts.map +1 -1
- package/dist/typescript/components/interface-declaration.d.mts +1 -2
- package/dist/typescript/components/interface-declaration.d.mts.map +1 -1
- package/dist/typescript/components/interface-declaration.mjs.map +1 -1
- package/dist/typescript/components/object-declaration.d.cts +2 -3
- package/dist/typescript/components/object-declaration.d.cts.map +1 -1
- package/dist/typescript/components/object-declaration.d.mts +2 -3
- package/dist/typescript/components/object-declaration.d.mts.map +1 -1
- package/dist/typescript/components/object-declaration.mjs.map +1 -1
- package/dist/typescript/components/property-name.d.cts +1 -3
- package/dist/typescript/components/property-name.d.cts.map +1 -1
- package/dist/typescript/components/property-name.d.mts +1 -3
- package/dist/typescript/components/property-name.d.mts.map +1 -1
- package/dist/typescript/components/property-name.mjs.map +1 -1
- package/dist/typescript/components/record-expression.d.cts.map +1 -1
- package/dist/typescript/components/record-expression.d.mts.map +1 -1
- package/dist/typescript/components/record-expression.mjs.map +1 -1
- package/dist/typescript/components/tsdoc-reflection.d.cts +6 -7
- package/dist/typescript/components/tsdoc-reflection.d.cts.map +1 -1
- package/dist/typescript/components/tsdoc-reflection.d.mts +6 -7
- package/dist/typescript/components/tsdoc-reflection.d.mts.map +1 -1
- package/dist/typescript/components/tsdoc-reflection.mjs.map +1 -1
- package/dist/typescript/components/tsdoc.d.cts.map +1 -1
- package/dist/typescript/components/tsdoc.d.mts.map +1 -1
- package/dist/typescript/components/tsdoc.mjs.map +1 -1
- package/dist/typescript/components/type-declaration.d.cts +1 -2
- package/dist/typescript/components/type-declaration.d.cts.map +1 -1
- package/dist/typescript/components/type-declaration.d.mts +1 -2
- package/dist/typescript/components/type-declaration.d.mts.map +1 -1
- package/dist/typescript/components/type-declaration.mjs.map +1 -1
- package/dist/typescript/components/type-parameters.d.cts.map +1 -1
- package/dist/typescript/components/type-parameters.d.mts.map +1 -1
- package/dist/typescript/components/type-parameters.mjs.map +1 -1
- package/dist/typescript/components/typescript-file.mjs.map +1 -1
- package/dist/typescript/contexts/lexical-scope.d.cts +1 -2
- package/dist/typescript/contexts/lexical-scope.d.cts.map +1 -1
- package/dist/typescript/contexts/lexical-scope.d.mts +1 -2
- package/dist/typescript/contexts/lexical-scope.d.mts.map +1 -1
- package/dist/typescript/contexts/lexical-scope.mjs.map +1 -1
- package/dist/typescript/contexts/member-scope.d.cts.map +1 -1
- package/dist/typescript/contexts/member-scope.d.mts.map +1 -1
- package/dist/typescript/contexts/member-scope.mjs.map +1 -1
- package/dist/typescript/helpers/get-call-signature-props.mjs.map +1 -1
- package/dist/typescript/helpers/utilities.d.cts.map +1 -1
- package/dist/typescript/helpers/utilities.d.mts.map +1 -1
- package/dist/typescript/helpers/utilities.mjs.map +1 -1
- package/dist/yaml/components/yaml-file.d.cts.map +1 -1
- package/dist/yaml/components/yaml-file.d.mts.map +1 -1
- package/dist/yaml/components/yaml-file.mjs.map +1 -1
- package/package.json +6 -6
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import { ComponentProps, SourceFileHeaderProps } from "../../types/components.cjs";
|
|
2
|
-
import { SourceFileProps
|
|
2
|
+
import { SourceFileProps } from "../../core/components/source-file.cjs";
|
|
3
3
|
import { FrontMatterProps } from "./front-matter.cjs";
|
|
4
|
-
import * as _$_alloy_js_core0 from "@alloy-js/core";
|
|
5
4
|
|
|
6
5
|
//#region src/markdown/components/markdown-file.d.ts
|
|
7
|
-
type MarkdownFileProps = Omit<SourceFileProps
|
|
6
|
+
type MarkdownFileProps = Omit<SourceFileProps, "filetype"> & ComponentProps & MarkdownFileHeaderProps;
|
|
8
7
|
/**
|
|
9
8
|
* A base component representing a Powerlines generated markdown source file.
|
|
10
9
|
*
|
|
11
10
|
* @param props - The properties for the source file.
|
|
12
11
|
* @returns The rendered source file component.
|
|
13
12
|
*/
|
|
14
|
-
declare function MarkdownFile(props: MarkdownFileProps):
|
|
13
|
+
declare function MarkdownFile(props: MarkdownFileProps): import("@alloy-js/core").Children;
|
|
15
14
|
type MarkdownFileHeaderProps = SourceFileHeaderProps & {
|
|
16
15
|
frontMatter?: FrontMatterProps["data"];
|
|
17
16
|
};
|
|
@@ -21,7 +20,7 @@ type MarkdownFileHeaderProps = SourceFileHeaderProps & {
|
|
|
21
20
|
* @param props - The properties for the source file header.
|
|
22
21
|
* @returns The rendered source file header.
|
|
23
22
|
*/
|
|
24
|
-
declare function MarkdownFileHeader(props: MarkdownFileHeaderProps):
|
|
23
|
+
declare function MarkdownFileHeader(props: MarkdownFileHeaderProps): import("@alloy-js/core").Children;
|
|
25
24
|
//#endregion
|
|
26
25
|
export { MarkdownFile, MarkdownFileHeader, MarkdownFileHeaderProps, MarkdownFileProps };
|
|
27
26
|
//# sourceMappingURL=markdown-file.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markdown-file.d.cts","names":[],"sources":["../../../src/markdown/components/markdown-file.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"markdown-file.d.cts","names":[],"sources":["../../../src/markdown/components/markdown-file.tsx"],"mappings":";;;;;KA6BY,iBAAA,GAAoB,IAAA,CAAK,eAAA,gBACnC,cAAA,GACA,uBAAA;;AAFF;;;;;iBAUgB,YAAA,CAAa,KAAA,EAAO,iBAAiB,4BAAA,QAAA;AAAA,KAmBzC,uBAAA,GAA0B,qBAAA;EACpC,WAAA,GAAc,gBAAgB;AAAA;;;;;;AA5BP;iBAqCT,kBAAA,CAAmB,KAAA,EAAO,uBAAuB,4BAAA,QAAA"}
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import { ComponentProps, SourceFileHeaderProps } from "../../types/components.mjs";
|
|
2
|
-
import { SourceFileProps
|
|
2
|
+
import { SourceFileProps } from "../../core/components/source-file.mjs";
|
|
3
3
|
import { FrontMatterProps } from "./front-matter.mjs";
|
|
4
|
-
import * as _$_alloy_js_core0 from "@alloy-js/core";
|
|
5
4
|
|
|
6
5
|
//#region src/markdown/components/markdown-file.d.ts
|
|
7
|
-
type MarkdownFileProps = Omit<SourceFileProps
|
|
6
|
+
type MarkdownFileProps = Omit<SourceFileProps, "filetype"> & ComponentProps & MarkdownFileHeaderProps;
|
|
8
7
|
/**
|
|
9
8
|
* A base component representing a Powerlines generated markdown source file.
|
|
10
9
|
*
|
|
11
10
|
* @param props - The properties for the source file.
|
|
12
11
|
* @returns The rendered source file component.
|
|
13
12
|
*/
|
|
14
|
-
declare function MarkdownFile(props: MarkdownFileProps):
|
|
13
|
+
declare function MarkdownFile(props: MarkdownFileProps): import("@alloy-js/core").Children;
|
|
15
14
|
type MarkdownFileHeaderProps = SourceFileHeaderProps & {
|
|
16
15
|
frontMatter?: FrontMatterProps["data"];
|
|
17
16
|
};
|
|
@@ -21,7 +20,7 @@ type MarkdownFileHeaderProps = SourceFileHeaderProps & {
|
|
|
21
20
|
* @param props - The properties for the source file header.
|
|
22
21
|
* @returns The rendered source file header.
|
|
23
22
|
*/
|
|
24
|
-
declare function MarkdownFileHeader(props: MarkdownFileHeaderProps):
|
|
23
|
+
declare function MarkdownFileHeader(props: MarkdownFileHeaderProps): import("@alloy-js/core").Children;
|
|
25
24
|
//#endregion
|
|
26
25
|
export { MarkdownFile, MarkdownFileHeader, MarkdownFileHeaderProps, MarkdownFileProps };
|
|
27
26
|
//# sourceMappingURL=markdown-file.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markdown-file.d.mts","names":[],"sources":["../../../src/markdown/components/markdown-file.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"markdown-file.d.mts","names":[],"sources":["../../../src/markdown/components/markdown-file.tsx"],"mappings":";;;;;KA6BY,iBAAA,GAAoB,IAAA,CAAK,eAAA,gBACnC,cAAA,GACA,uBAAA;;AAFF;;;;;iBAUgB,YAAA,CAAa,KAAA,EAAO,iBAAiB,4BAAA,QAAA;AAAA,KAmBzC,uBAAA,GAA0B,qBAAA;EACpC,WAAA,GAAc,gBAAgB;AAAA;;;;;;AA5BP;iBAqCT,kBAAA,CAAmB,KAAA,EAAO,uBAAuB,4BAAA,QAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markdown-file.mjs","names":[],"sources":["../../../src/markdown/components/markdown-file.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { Show, splitProps } from \"@alloy-js/core\";\nimport { Link } from \"@alloy-js/markdown\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport { isSetObject } from \"@stryke/type-checks\";\nimport { getFileHeaderWarning } from \"powerlines/utils\";\nimport { SingleLineComment } from \"../../core/components/single-line-comment\";\nimport { SourceFile, SourceFileProps } from \"../../core/components/source-file\";\nimport { usePowerlinesSafe } from \"../../core/contexts/context\";\nimport { ComponentProps, SourceFileHeaderProps } from \"../../types/components\";\nimport { FrontMatter, FrontMatterProps } from \"./front-matter\";\n\nexport type MarkdownFileProps = Omit<SourceFileProps, \"filetype\"> &\n ComponentProps &\n MarkdownFileHeaderProps;\n\n/**\n * A base component representing a Powerlines generated markdown source file.\n *\n * @param props - The properties for the source file.\n * @returns The rendered source file component.\n */\nexport function MarkdownFile(props: MarkdownFileProps) {\n const [{ children, storage, frontMatter }, rest] = splitProps(props, [\n \"children\",\n \"storage\",\n \"frontMatter\"\n ]);\n\n return (\n <SourceFile\n header={<MarkdownFileHeader frontMatter={frontMatter} />}\n {...rest}\n filetype=\"md\"\n reference={Link}\n storage={storage}>\n <Show when={Boolean(children)}>{children}</Show>\n </SourceFile>\n );\n}\n\nexport type MarkdownFileHeaderProps = SourceFileHeaderProps & {\n frontMatter?: FrontMatterProps[\"data\"];\n};\n\n/**\n * Renders the header for a Powerlines Typescript source file.\n *\n * @param props - The properties for the source file header.\n * @returns The rendered source file header.\n */\nexport function MarkdownFileHeader(props: MarkdownFileHeaderProps) {\n const [\n {\n children,\n disableEslint = true,\n disableBiome = true,\n disablePrettier = false,\n frontMatter\n }\n ] = splitProps(props, [\n \"children\",\n \"disableEslint\",\n \"disableBiome\",\n \"disablePrettier\",\n \"frontMatter\"\n ]);\n\n const context = usePowerlinesSafe();\n\n return (\n <>\n <Show\n when={isSetObject(frontMatter) && Object.keys(frontMatter).length > 0}>\n <FrontMatter data={frontMatter!} />\n </Show>\n <Show when={Boolean(disableEslint)}>\n <SingleLineComment variant=\"markdown\">\n {\"eslint-disable\"}\n </SingleLineComment>\n <hbr />\n </Show>\n <Show when={Boolean(disablePrettier)}>\n <SingleLineComment variant=\"markdown\">\n {\"prettier-ignore\"}\n </SingleLineComment>\n <hbr />\n </Show>\n <Show when={Boolean(disableBiome)}>\n <SingleLineComment variant=\"markdown\">\n {\"biome-ignore lint: disable\"}\n </SingleLineComment>\n <hbr />\n </Show>\n <Show\n when={\n Boolean(disableEslint) ||\n Boolean(disablePrettier) ||\n Boolean(disableBiome)\n }>\n <hbr />\n </Show>\n <Show when={Boolean(children)}>\n <>\n {children}\n <hbr />\n </>\n </Show>\n <SingleLineComment variant=\"markdown\">{`Generated by ${\n titleCase(context?.config?.framework?.name) || \"Powerlines\"\n }`}</SingleLineComment>\n <hbr />\n <SingleLineComment variant=\"markdown\">\n {getFileHeaderWarning(context!)}\n </SingleLineComment>\n <hbr />\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAmCA,SAAC,aAAA,OAAA;CACC,MAAE,CAAK,EACL,UACF,SACF,eACE,QAAS,WAAU,OAAS;EAAA;EAAc;EAAS;
|
|
1
|
+
{"version":3,"file":"markdown-file.mjs","names":[],"sources":["../../../src/markdown/components/markdown-file.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { Show, splitProps } from \"@alloy-js/core\";\nimport { Link } from \"@alloy-js/markdown\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport { isSetObject } from \"@stryke/type-checks\";\nimport { getFileHeaderWarning } from \"powerlines/utils\";\nimport { SingleLineComment } from \"../../core/components/single-line-comment\";\nimport { SourceFile, SourceFileProps } from \"../../core/components/source-file\";\nimport { usePowerlinesSafe } from \"../../core/contexts/context\";\nimport { ComponentProps, SourceFileHeaderProps } from \"../../types/components\";\nimport { FrontMatter, FrontMatterProps } from \"./front-matter\";\n\nexport type MarkdownFileProps = Omit<SourceFileProps, \"filetype\"> &\n ComponentProps &\n MarkdownFileHeaderProps;\n\n/**\n * A base component representing a Powerlines generated markdown source file.\n *\n * @param props - The properties for the source file.\n * @returns The rendered source file component.\n */\nexport function MarkdownFile(props: MarkdownFileProps) {\n const [{ children, storage, frontMatter }, rest] = splitProps(props, [\n \"children\",\n \"storage\",\n \"frontMatter\"\n ]);\n\n return (\n <SourceFile\n header={<MarkdownFileHeader frontMatter={frontMatter} />}\n {...rest}\n filetype=\"md\"\n reference={Link}\n storage={storage}>\n <Show when={Boolean(children)}>{children}</Show>\n </SourceFile>\n );\n}\n\nexport type MarkdownFileHeaderProps = SourceFileHeaderProps & {\n frontMatter?: FrontMatterProps[\"data\"];\n};\n\n/**\n * Renders the header for a Powerlines Typescript source file.\n *\n * @param props - The properties for the source file header.\n * @returns The rendered source file header.\n */\nexport function MarkdownFileHeader(props: MarkdownFileHeaderProps) {\n const [\n {\n children,\n disableEslint = true,\n disableBiome = true,\n disablePrettier = false,\n frontMatter\n }\n ] = splitProps(props, [\n \"children\",\n \"disableEslint\",\n \"disableBiome\",\n \"disablePrettier\",\n \"frontMatter\"\n ]);\n\n const context = usePowerlinesSafe();\n\n return (\n <>\n <Show\n when={isSetObject(frontMatter) && Object.keys(frontMatter).length > 0}>\n <FrontMatter data={frontMatter!} />\n </Show>\n <Show when={Boolean(disableEslint)}>\n <SingleLineComment variant=\"markdown\">\n {\"eslint-disable\"}\n </SingleLineComment>\n <hbr />\n </Show>\n <Show when={Boolean(disablePrettier)}>\n <SingleLineComment variant=\"markdown\">\n {\"prettier-ignore\"}\n </SingleLineComment>\n <hbr />\n </Show>\n <Show when={Boolean(disableBiome)}>\n <SingleLineComment variant=\"markdown\">\n {\"biome-ignore lint: disable\"}\n </SingleLineComment>\n <hbr />\n </Show>\n <Show\n when={\n Boolean(disableEslint) ||\n Boolean(disablePrettier) ||\n Boolean(disableBiome)\n }>\n <hbr />\n </Show>\n <Show when={Boolean(children)}>\n <>\n {children}\n <hbr />\n </>\n </Show>\n <SingleLineComment variant=\"markdown\">{`Generated by ${\n titleCase(context?.config?.framework?.name) || \"Powerlines\"\n }`}</SingleLineComment>\n <hbr />\n <SingleLineComment variant=\"markdown\">\n {getFileHeaderWarning(context!)}\n </SingleLineComment>\n <hbr />\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAmCA,SAAC,aAAA,OAAA;CACC,MAAE,CAAK,EACL,UACF,SACF,eACE,QAAS,WAAU,OAAS;EAAA;EAAc;EAAS;CAAW,CA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AA,CAAA,CAAA;GAC9B;EACF,CAAC;EAAG,gBAAY,MAAY;GAC1B,IAAI,OAAC;IACH,OAAO,QAAC,aAAA,KAAA,QAAA,eAAA,KAAA,QAAA,YAAA;GACV;GACA,IAAG,WAAW;IACZ,OAAG,gBAAA,OAAA,CAAA,CAAA;GACL;EACF,CAAC;EAAG,gBAAU,MAAA;GACZ,IAAI,OAAE;IACJ,OAAM,QAAA,QAAA;GACR;GACA,IAAI,WAAU;IACZ,OAAK,CAAA,UAAA,gBAAiB,OAAA,CAAA,CAAA,CAAA;GACxB;EACF,CAAC;EAAG,gBAAkB,mBAAmB;GACvC,SAAK;GACL,IAAI,WAAA;IACF,OAAM,gBAAA,UAAA,SAAA,QAAA,WAAA,IAAA,KAAA;GACR;EACF,CAAC;EAAA,gBAAA,OAAA,CAAA,CAAA;EAAA,gBAAA,mBAAA;GACH,SAAA"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ComponentProps } from "../../types/components.cjs";
|
|
2
2
|
import { MarkdownTableColumnContextInterface } from "../contexts/markdown-table.cjs";
|
|
3
|
-
import * as _$_alloy_js_core0 from "@alloy-js/core";
|
|
4
3
|
|
|
5
4
|
//#region src/markdown/components/markdown-table.d.ts
|
|
6
5
|
interface MarkdownTableProps<T extends Record<string, any> = Record<string, any>> extends ComponentProps {
|
|
@@ -9,18 +8,18 @@ interface MarkdownTableProps<T extends Record<string, any> = Record<string, any>
|
|
|
9
8
|
/**
|
|
10
9
|
* Component that provides a context for rendering markdown tables.
|
|
11
10
|
*/
|
|
12
|
-
declare function MarkdownTable<T extends Record<string, any> = Record<string, any>>(props: MarkdownTableProps<T>):
|
|
11
|
+
declare function MarkdownTable<T extends Record<string, any> = Record<string, any>>(props: MarkdownTableProps<T>): import("@alloy-js/core").Children;
|
|
13
12
|
type MarkdownTableColumnProps = ComponentProps & Partial<Pick<MarkdownTableColumnContextInterface, "align">> & Required<Pick<MarkdownTableColumnContextInterface, "name">> & {
|
|
14
13
|
width?: number;
|
|
15
14
|
};
|
|
16
15
|
/**
|
|
17
16
|
* Component that provides a context for rendering markdown tables.
|
|
18
17
|
*/
|
|
19
|
-
declare function MarkdownTableColumn(props: MarkdownTableColumnProps):
|
|
18
|
+
declare function MarkdownTableColumn(props: MarkdownTableColumnProps): import("@alloy-js/core").Children;
|
|
20
19
|
/**
|
|
21
20
|
* Component that provides a context for rendering markdown tables.
|
|
22
21
|
*/
|
|
23
|
-
declare function MarkdownTableColumnHeader(props: MarkdownTableColumnProps):
|
|
22
|
+
declare function MarkdownTableColumnHeader(props: MarkdownTableColumnProps): import("@alloy-js/core").Children;
|
|
24
23
|
//#endregion
|
|
25
24
|
export { MarkdownTable, MarkdownTableColumn, MarkdownTableColumnHeader, MarkdownTableColumnProps, MarkdownTableProps };
|
|
26
25
|
//# sourceMappingURL=markdown-table.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markdown-table.d.cts","names":[],"sources":["../../../src/markdown/components/markdown-table.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"markdown-table.d.cts","names":[],"sources":["../../../src/markdown/components/markdown-table.tsx"],"mappings":";;;;UA4BiB,kBAAA,WACL,MAAA,gBAAsB,MAAA,uBACxB,cAAA;EACR,IAAA,EAAM,CAAA;AAAA;;;;iBAMQ,aAAA,WACJ,MAAA,gBAAsB,MAAA,cAAA,CAChC,KAAA,EAAO,kBAAA,CAAmB,CAAA,6BAAE,QAAA;AAAA,KAmBlB,wBAAA,GAA2B,cAAA,GACrC,OAAA,CAAQ,IAAA,CAAK,mCAAA,cACb,QAAA,CAAS,IAAA,CAAK,mCAAA;EACZ,KAAA;AAAA;;;;iBAMY,mBAAA,CAAoB,KAAA,EAAO,wBAAwB,4BAAA,QAAA;;;;iBA6CnD,yBAAA,CAA0B,KAAA,EAAO,wBAAwB,4BAAA,QAAA"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ComponentProps } from "../../types/components.mjs";
|
|
2
2
|
import { MarkdownTableColumnContextInterface } from "../contexts/markdown-table.mjs";
|
|
3
|
-
import * as _$_alloy_js_core0 from "@alloy-js/core";
|
|
4
3
|
|
|
5
4
|
//#region src/markdown/components/markdown-table.d.ts
|
|
6
5
|
interface MarkdownTableProps<T extends Record<string, any> = Record<string, any>> extends ComponentProps {
|
|
@@ -9,18 +8,18 @@ interface MarkdownTableProps<T extends Record<string, any> = Record<string, any>
|
|
|
9
8
|
/**
|
|
10
9
|
* Component that provides a context for rendering markdown tables.
|
|
11
10
|
*/
|
|
12
|
-
declare function MarkdownTable<T extends Record<string, any> = Record<string, any>>(props: MarkdownTableProps<T>):
|
|
11
|
+
declare function MarkdownTable<T extends Record<string, any> = Record<string, any>>(props: MarkdownTableProps<T>): import("@alloy-js/core").Children;
|
|
13
12
|
type MarkdownTableColumnProps = ComponentProps & Partial<Pick<MarkdownTableColumnContextInterface, "align">> & Required<Pick<MarkdownTableColumnContextInterface, "name">> & {
|
|
14
13
|
width?: number;
|
|
15
14
|
};
|
|
16
15
|
/**
|
|
17
16
|
* Component that provides a context for rendering markdown tables.
|
|
18
17
|
*/
|
|
19
|
-
declare function MarkdownTableColumn(props: MarkdownTableColumnProps):
|
|
18
|
+
declare function MarkdownTableColumn(props: MarkdownTableColumnProps): import("@alloy-js/core").Children;
|
|
20
19
|
/**
|
|
21
20
|
* Component that provides a context for rendering markdown tables.
|
|
22
21
|
*/
|
|
23
|
-
declare function MarkdownTableColumnHeader(props: MarkdownTableColumnProps):
|
|
22
|
+
declare function MarkdownTableColumnHeader(props: MarkdownTableColumnProps): import("@alloy-js/core").Children;
|
|
24
23
|
//#endregion
|
|
25
24
|
export { MarkdownTable, MarkdownTableColumn, MarkdownTableColumnHeader, MarkdownTableColumnProps, MarkdownTableProps };
|
|
26
25
|
//# sourceMappingURL=markdown-table.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markdown-table.d.mts","names":[],"sources":["../../../src/markdown/components/markdown-table.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"markdown-table.d.mts","names":[],"sources":["../../../src/markdown/components/markdown-table.tsx"],"mappings":";;;;UA4BiB,kBAAA,WACL,MAAA,gBAAsB,MAAA,uBACxB,cAAA;EACR,IAAA,EAAM,CAAA;AAAA;;;;iBAMQ,aAAA,WACJ,MAAA,gBAAsB,MAAA,cAAA,CAChC,KAAA,EAAO,kBAAA,CAAmB,CAAA,6BAAE,QAAA;AAAA,KAmBlB,wBAAA,GAA2B,cAAA,GACrC,OAAA,CAAQ,IAAA,CAAK,mCAAA,cACb,QAAA,CAAS,IAAA,CAAK,mCAAA;EACZ,KAAA;AAAA;;;;iBAMY,mBAAA,CAAoB,KAAA,EAAO,wBAAwB,4BAAA,QAAA;;;;iBA6CnD,yBAAA,CAA0B,KAAA,EAAO,wBAAwB,4BAAA,QAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markdown-table.mjs","names":[],"sources":["../../../src/markdown/components/markdown-table.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { code, computed, Prose, Show, splitProps } from \"@alloy-js/core\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport { isUndefined } from \"@stryke/type-checks/is-undefined\";\nimport { ComponentProps } from \"../../types/components\";\nimport {\n MarkdownTableColumnContextInterface,\n MarkdownTableContext,\n useMarkdownTable\n} from \"../contexts/markdown-table\";\n\nexport interface MarkdownTableProps<\n T extends Record<string, any> = Record<string, any>\n> extends ComponentProps {\n data: T[];\n}\n\n/**\n * Component that provides a context for rendering markdown tables.\n */\nexport function MarkdownTable<\n T extends Record<string, any> = Record<string, any>\n>(props: MarkdownTableProps<T>) {\n const [{ children, data }] = splitProps(props, [\"children\", \"data\"]);\n\n const columns = computed(() =>\n Object.keys(data).map((name: string, index: number) => ({\n index,\n name,\n align: \"left\" as const,\n width: 20\n }))\n );\n\n return (\n <MarkdownTableContext.Provider value={{ columns: columns.value, data }}>\n <Show when={Boolean(children)}>{children}</Show>\n </MarkdownTableContext.Provider>\n );\n}\n\nexport type MarkdownTableColumnProps = ComponentProps &\n Partial<Pick<MarkdownTableColumnContextInterface, \"align\">> &\n Required<Pick<MarkdownTableColumnContextInterface, \"name\">> & {\n width?: number;\n };\n\n/**\n * Component that provides a context for rendering markdown tables.\n */\nexport function MarkdownTableColumn(props: MarkdownTableColumnProps) {\n const [{ children, width, align, name }] = splitProps(props, [\n \"children\",\n \"width\",\n \"align\",\n \"name\"\n ]);\n\n const tableContext = useMarkdownTable();\n const columnRef = computed(() =>\n tableContext?.columns.find(c => c.name === name)\n );\n\n const indexRef = computed(() => columnRef.value?.index ?? 0);\n const alignRef = computed(() => columnRef.value?.align ?? align ?? \"left\");\n const widthRef = computed(() => columnRef.value?.width ?? width ?? 20);\n\n const textLength = computed(() => {\n const content = children ? children.toString() : \"\";\n\n return content.length;\n });\n\n return (\n <Prose>\n <Show when={indexRef.value === 0}>{\"|\"}</Show>\n <Show when={Boolean(children)}>\n <Prose>{code`${\n alignRef.value === \"left\"\n ? \" \".repeat(widthRef.value - textLength.value - 1)\n : \" \"\n }${children}${\n alignRef.value === \"right\"\n ? \" \".repeat(widthRef.value - textLength.value - 1)\n : \" \"\n }`}</Prose>\n </Show>\n {\"|\"}\n </Prose>\n );\n}\n\n/**\n * Component that provides a context for rendering markdown tables.\n */\nexport function MarkdownTableColumnHeader(props: MarkdownTableColumnProps) {\n const [{ children, name }, rest] = splitProps(props, [\"children\", \"name\"]);\n\n return (\n <>\n <MarkdownTableColumn {...rest} name={name}>\n <Show\n fallback={titleCase(name, {\n useDescriptions: false\n })}\n when={!isUndefined(children)}>\n {children}\n </Show>\n </MarkdownTableColumn>\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;CA4BA,MAAO,CAAA,EACH,UACF,UACK,WAAI,OAAA,CAAA,YAAA,
|
|
1
|
+
{"version":3,"file":"markdown-table.mjs","names":[],"sources":["../../../src/markdown/components/markdown-table.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { code, computed, Prose, Show, splitProps } from \"@alloy-js/core\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport { isUndefined } from \"@stryke/type-checks/is-undefined\";\nimport { ComponentProps } from \"../../types/components\";\nimport {\n MarkdownTableColumnContextInterface,\n MarkdownTableContext,\n useMarkdownTable\n} from \"../contexts/markdown-table\";\n\nexport interface MarkdownTableProps<\n T extends Record<string, any> = Record<string, any>\n> extends ComponentProps {\n data: T[];\n}\n\n/**\n * Component that provides a context for rendering markdown tables.\n */\nexport function MarkdownTable<\n T extends Record<string, any> = Record<string, any>\n>(props: MarkdownTableProps<T>) {\n const [{ children, data }] = splitProps(props, [\"children\", \"data\"]);\n\n const columns = computed(() =>\n Object.keys(data).map((name: string, index: number) => ({\n index,\n name,\n align: \"left\" as const,\n width: 20\n }))\n );\n\n return (\n <MarkdownTableContext.Provider value={{ columns: columns.value, data }}>\n <Show when={Boolean(children)}>{children}</Show>\n </MarkdownTableContext.Provider>\n );\n}\n\nexport type MarkdownTableColumnProps = ComponentProps &\n Partial<Pick<MarkdownTableColumnContextInterface, \"align\">> &\n Required<Pick<MarkdownTableColumnContextInterface, \"name\">> & {\n width?: number;\n };\n\n/**\n * Component that provides a context for rendering markdown tables.\n */\nexport function MarkdownTableColumn(props: MarkdownTableColumnProps) {\n const [{ children, width, align, name }] = splitProps(props, [\n \"children\",\n \"width\",\n \"align\",\n \"name\"\n ]);\n\n const tableContext = useMarkdownTable();\n const columnRef = computed(() =>\n tableContext?.columns.find(c => c.name === name)\n );\n\n const indexRef = computed(() => columnRef.value?.index ?? 0);\n const alignRef = computed(() => columnRef.value?.align ?? align ?? \"left\");\n const widthRef = computed(() => columnRef.value?.width ?? width ?? 20);\n\n const textLength = computed(() => {\n const content = children ? children.toString() : \"\";\n\n return content.length;\n });\n\n return (\n <Prose>\n <Show when={indexRef.value === 0}>{\"|\"}</Show>\n <Show when={Boolean(children)}>\n <Prose>{code`${\n alignRef.value === \"left\"\n ? \" \".repeat(widthRef.value - textLength.value - 1)\n : \" \"\n }${children}${\n alignRef.value === \"right\"\n ? \" \".repeat(widthRef.value - textLength.value - 1)\n : \" \"\n }`}</Prose>\n </Show>\n {\"|\"}\n </Prose>\n );\n}\n\n/**\n * Component that provides a context for rendering markdown tables.\n */\nexport function MarkdownTableColumnHeader(props: MarkdownTableColumnProps) {\n const [{ children, name }, rest] = splitProps(props, [\"children\", \"name\"]);\n\n return (\n <>\n <MarkdownTableColumn {...rest} name={name}>\n <Show\n fallback={titleCase(name, {\n useDescriptions: false\n })}\n when={!isUndefined(children)}>\n {children}\n </Show>\n </MarkdownTableColumn>\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;CA4BA,MAAO,CAAA,EACH,UACF,UACK,WAAI,OAAA,CAAA,YAAA,MAAA,CAAA;CACX,MAAA,UAAA,eAAA,OAAA,KAAA,IAAA,EAAA,KAAA,MAAA,WAAA;;EAEE;EACC,OAAA;EACD,OAAA;CACF,EAAA,CAAA;CACE,OAAE,gBAAuB,qBAAqB,UAAI;EAClD,IA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Ac,UAAU,MAAE,EAC3B,iBAAA,MACK,CAAA;IACC;;KAEC,OAAA,CAAA,YAAA,QAAA;IACJ;IACE;GACD,CAAC;EACH;CACF,CAAC,CAAC,CAAC;AACL"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markdown-table.d.cts","names":[],"sources":["../../../src/markdown/contexts/markdown-table.ts"],"mappings":";;;UAqBiB,mCAAA,WACL,MAAA,gBAAsB,MAAA;EAEhC,KAAA;EACA,IAAA,QAAY,CAAA;EACZ,KAAA;EACA,KAAA;AAAA;;;;cAMW,0BAAA,EAA4B,
|
|
1
|
+
{"version":3,"file":"markdown-table.d.cts","names":[],"sources":["../../../src/markdown/contexts/markdown-table.ts"],"mappings":";;;UAqBiB,mCAAA,WACL,MAAA,gBAAsB,MAAA;EAEhC,KAAA;EACA,IAAA,QAAY,CAAA;EACZ,KAAA;EACA,KAAA;AAAA;;;;cAMW,0BAAA,EAA4B,gBAAgB,CAAC,mCAAA;;;;;;iBAW1C,sBAAA,CAAA,GAAsB,mCAAA,CAAA,MAAA;AAAA,UAMrB,6BAAA,WACL,MAAA,gBAAsB,MAAA;EAEhC,OAAA,EAAS,mCAAA,CAAoC,CAAA;EAC7C,IAAA,EAAM,CAAA;AAAA;AArBR;;;AAAA,cA2Ba,oBAAA,EAAsB,gBAAgB,CAAC,6BAAA;AA3ByC;AAW7F;;;;AAX6F,iBAsC7E,gBAAA,CAAA,GAAgB,6BAAA,CAAA,MAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markdown-table.d.mts","names":[],"sources":["../../../src/markdown/contexts/markdown-table.ts"],"mappings":";;;UAqBiB,mCAAA,WACL,MAAA,gBAAsB,MAAA;EAEhC,KAAA;EACA,IAAA,QAAY,CAAA;EACZ,KAAA;EACA,KAAA;AAAA;;;;cAMW,0BAAA,EAA4B,
|
|
1
|
+
{"version":3,"file":"markdown-table.d.mts","names":[],"sources":["../../../src/markdown/contexts/markdown-table.ts"],"mappings":";;;UAqBiB,mCAAA,WACL,MAAA,gBAAsB,MAAA;EAEhC,KAAA;EACA,IAAA,QAAY,CAAA;EACZ,KAAA;EACA,KAAA;AAAA;;;;cAMW,0BAAA,EAA4B,gBAAgB,CAAC,mCAAA;;;;;;iBAW1C,sBAAA,CAAA,GAAsB,mCAAA,CAAA,MAAA;AAAA,UAMrB,6BAAA,WACL,MAAA,gBAAsB,MAAA;EAEhC,OAAA,EAAS,mCAAA,CAAoC,CAAA;EAC7C,IAAA,EAAM,CAAA;AAAA;AArBR;;;AAAA,cA2Ba,oBAAA,EAAsB,gBAAgB,CAAC,6BAAA;AA3ByC;AAW7F;;;;AAX6F,iBAsC7E,gBAAA,CAAA,GAAgB,6BAAA,CAAA,MAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markdown-table.mjs","names":[],"sources":["../../../src/markdown/contexts/markdown-table.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type { ComponentContext } from \"@alloy-js/core\";\nimport { createContext, createNamedContext, useContext } from \"@alloy-js/core\";\n\nexport interface MarkdownTableColumnContextInterface<\n T extends Record<string, any> = Record<string, any>\n> {\n index: number;\n name: keyof T;\n align: \"left\" | \"right\" | \"center\";\n width: number;\n}\n\n/**\n * The Powerlines context used in template rendering.\n */\nexport const MarkdownTableColumnContext: ComponentContext<MarkdownTableColumnContextInterface> =\n createNamedContext<MarkdownTableColumnContextInterface>(\n \"MarkdownTableColumn\",\n {} as MarkdownTableColumnContextInterface\n );\n\n/**\n * Hook to access the Powerlines Context.\n *\n * @returns The Context.\n */\nexport function useMarkdownTableColumn() {\n return useContext<MarkdownTableColumnContextInterface>(\n MarkdownTableColumnContext\n );\n}\n\nexport interface MarkdownTableContextInterface<\n T extends Record<string, any> = Record<string, any>\n> {\n columns: MarkdownTableColumnContextInterface<T>[];\n data: T[];\n}\n\n/**\n * The Powerlines context used in template rendering.\n */\nexport const MarkdownTableContext: ComponentContext<MarkdownTableContextInterface> =\n createContext<MarkdownTableContextInterface>({\n columns: [],\n data: []\n });\n\n/**\n * Hook to access the Powerlines Context.\n *\n * @returns The Context.\n */\nexport function useMarkdownTable() {\n return useContext<MarkdownTableContextInterface>(MarkdownTableContext);\n}\n"],"mappings":";;;;;;AAsBA,MAAY,6BAA6B,mBAAW,uBAAA,
|
|
1
|
+
{"version":3,"file":"markdown-table.mjs","names":[],"sources":["../../../src/markdown/contexts/markdown-table.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type { ComponentContext } from \"@alloy-js/core\";\nimport { createContext, createNamedContext, useContext } from \"@alloy-js/core\";\n\nexport interface MarkdownTableColumnContextInterface<\n T extends Record<string, any> = Record<string, any>\n> {\n index: number;\n name: keyof T;\n align: \"left\" | \"right\" | \"center\";\n width: number;\n}\n\n/**\n * The Powerlines context used in template rendering.\n */\nexport const MarkdownTableColumnContext: ComponentContext<MarkdownTableColumnContextInterface> =\n createNamedContext<MarkdownTableColumnContextInterface>(\n \"MarkdownTableColumn\",\n {} as MarkdownTableColumnContextInterface\n );\n\n/**\n * Hook to access the Powerlines Context.\n *\n * @returns The Context.\n */\nexport function useMarkdownTableColumn() {\n return useContext<MarkdownTableColumnContextInterface>(\n MarkdownTableColumnContext\n );\n}\n\nexport interface MarkdownTableContextInterface<\n T extends Record<string, any> = Record<string, any>\n> {\n columns: MarkdownTableColumnContextInterface<T>[];\n data: T[];\n}\n\n/**\n * The Powerlines context used in template rendering.\n */\nexport const MarkdownTableContext: ComponentContext<MarkdownTableContextInterface> =\n createContext<MarkdownTableContextInterface>({\n columns: [],\n data: []\n });\n\n/**\n * Hook to access the Powerlines Context.\n *\n * @returns The Context.\n */\nexport function useMarkdownTable() {\n return useContext<MarkdownTableContextInterface>(MarkdownTableContext);\n}\n"],"mappings":";;;;;;AAsBA,MAAY,6BAA6B,mBAAW,uBAAA,CAAA,CAAA;;;;;;;CAQlD,OAAA,WAAA,0BAAA;AACF;;;;AAIA,MAAK,uBAAoB,cAAA;CACvB,SAAQ,CAAA;CACR,MAAC,CAAA;;;;;;;AAQH,SAAS,mBAAW;CAClB,OAAE,WAAA,oBAAA;AACJ"}
|
package/dist/render.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render.d.cts","names":[],"sources":["../src/render.tsx"],"mappings":";;;;;;AA4CA;;;;;;;;;;;;iBAAsB,MAAA,kBAAwB,aAAA,CAAA,CAC5C,OAAA,EAAS,QAAA,EACT,QAAA,EAAU,QAAA,GAAQ,OAAA
|
|
1
|
+
{"version":3,"file":"render.d.cts","names":[],"sources":["../src/render.tsx"],"mappings":";;;;;;AA4CA;;;;;;;;;;;;iBAAsB,MAAA,kBAAwB,aAAA,CAAA,CAC5C,OAAA,EAAS,QAAA,EACT,QAAA,EAAU,QAAA,GAAQ,OAAA;;;;;AAAA;AA2FpB;;;;;;;;;;iBAAgB,YAAA,kBAA8B,aAAA,CAAA,CAC5C,OAAA,EAAS,QAAA,EACT,QAAA,EAAU,QAAA,EACV,OAAA,GAAU,gBAAA"}
|
package/dist/render.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render.d.mts","names":[],"sources":["../src/render.tsx"],"mappings":";;;;;;AA4CA;;;;;;;;;;;;iBAAsB,MAAA,kBAAwB,aAAA,CAAA,CAC5C,OAAA,EAAS,QAAA,EACT,QAAA,EAAU,QAAA,GAAQ,OAAA
|
|
1
|
+
{"version":3,"file":"render.d.mts","names":[],"sources":["../src/render.tsx"],"mappings":";;;;;;AA4CA;;;;;;;;;;;;iBAAsB,MAAA,kBAAwB,aAAA,CAAA,CAC5C,OAAA,EAAS,QAAA,EACT,QAAA,EAAU,QAAA,GAAQ,OAAA;;;;;AAAA;AA2FpB;;;;;;;;;;iBAAgB,YAAA,kBAA8B,aAAA,CAAA,CAC5C,OAAA,EAAS,QAAA,EACT,QAAA,EAAU,QAAA,EACV,OAAA,GAAU,gBAAA"}
|
package/dist/render.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render.mjs","names":[],"sources":["../src/render.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport {\n Children,\n printTree,\n PrintTreeOptions,\n renderAsync,\n renderTree,\n traverseOutput\n} from \"@alloy-js/core\";\nimport { findFileExtension } from \"@stryke/path/file-path-fns\";\nimport { PluginContext } from \"powerlines\";\nimport { MetaItem, Output } from \"./core\";\n\n/**\n * A function to render children components within the [Alloy](https://alloy-framework.github.io) context, and write any saved content to the file system.\n *\n * @example\n * ```tsx\n * import { render } from \"@powerlines/plugin-alloy/render\";\n *\n * await render(context, <> ... </>);\n * ```\n *\n * @param context - The Powerlines plugin context.\n * @param children - The children components to render.\n * @returns A promise that resolves when rendering is complete.\n */\nexport async function render<TContext extends PluginContext>(\n context: TContext,\n children: Children\n) {\n const meta = {} as Record<string, MetaItem>;\n const output = await renderAsync(\n <Output<TContext> context={context} meta={meta}>\n {children}\n </Output>\n );\n\n if (!Object.keys(output).length) {\n context.debug(\n \"No output files were rendered by Alloy-js component templates.\"\n );\n } else {\n context.debug(\n `Processing ${\n Object.keys(output).length\n } rendered output files from Alloy-js component templates.`\n );\n\n await traverseOutput(output, {\n visitDirectory: directory => {\n if (context.fs.existsSync(directory.path)) {\n return;\n }\n\n context.fs.mkdirSync(directory.path);\n },\n visitFile: file => {\n if (\"contents\" in file) {\n const metadata = meta[file.path] ?? {};\n if (metadata.kind === \"builtin\") {\n if (!metadata.id) {\n throw new Error(\n `Built-in file \"${\n file.path\n }\" is missing its ID in the render metadata.`\n );\n }\n\n context.emitBuiltinSync(file.contents, metadata.id, {\n skipFormat: metadata.skipFormat,\n storage: metadata.storage,\n extension: findFileExtension(file.path)\n });\n } else if (metadata.kind === \"entry\") {\n context.emitEntrySync(file.contents, file.path, {\n skipFormat: metadata.skipFormat,\n storage: metadata.storage,\n ...(metadata.typeDefinition ?? {})\n });\n } else if (metadata.kind === \"infrastructure\") {\n if (!metadata.id) {\n throw new Error(\n `Infrastructure file \"${\n file.path\n }\" is missing its ID in the render metadata.`\n );\n }\n\n context.emitInfrastructureSync(file.contents, metadata.id, {\n skipFormat: metadata.skipFormat,\n storage: metadata.storage,\n extension: findFileExtension(file.path)\n });\n } else {\n context.emitSync(file.contents, file.path, metadata);\n }\n } else {\n context.fs.copySync(file.sourcePath, file.path);\n }\n }\n });\n }\n}\n\n/**\n * A function to render children components within the [Alloy](https://alloy-framework.github.io) context and return the rendered output as a string.\n *\n * @example\n * ```tsx\n * import { renderString } from \"@powerlines/plugin-alloy/render\";\n *\n * const output = await renderString(context, <> ... </>);\n * ```\n *\n * @param context - The Powerlines plugin context.\n * @param children - The children components to render.\n * @param options - Optional print tree options.\n * @returns The rendered output as a string.\n */\nexport function renderString<TContext extends PluginContext>(\n context: TContext,\n children: Children,\n options?: PrintTreeOptions\n) {\n const tree = renderTree(\n <Output<TContext> context={context}>{children}</Output>\n );\n\n return printTree(tree, options);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAsCA,eAAK,OAAA,SAAA,UAAA;CACJ,MAAA,OAAA,
|
|
1
|
+
{"version":3,"file":"render.mjs","names":[],"sources":["../src/render.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport {\n Children,\n printTree,\n PrintTreeOptions,\n renderAsync,\n renderTree,\n traverseOutput\n} from \"@alloy-js/core\";\nimport { findFileExtension } from \"@stryke/path/file-path-fns\";\nimport { PluginContext } from \"powerlines\";\nimport { MetaItem, Output } from \"./core\";\n\n/**\n * A function to render children components within the [Alloy](https://alloy-framework.github.io) context, and write any saved content to the file system.\n *\n * @example\n * ```tsx\n * import { render } from \"@powerlines/plugin-alloy/render\";\n *\n * await render(context, <> ... </>);\n * ```\n *\n * @param context - The Powerlines plugin context.\n * @param children - The children components to render.\n * @returns A promise that resolves when rendering is complete.\n */\nexport async function render<TContext extends PluginContext>(\n context: TContext,\n children: Children\n) {\n const meta = {} as Record<string, MetaItem>;\n const output = await renderAsync(\n <Output<TContext> context={context} meta={meta}>\n {children}\n </Output>\n );\n\n if (!Object.keys(output).length) {\n context.debug(\n \"No output files were rendered by Alloy-js component templates.\"\n );\n } else {\n context.debug(\n `Processing ${\n Object.keys(output).length\n } rendered output files from Alloy-js component templates.`\n );\n\n await traverseOutput(output, {\n visitDirectory: directory => {\n if (context.fs.existsSync(directory.path)) {\n return;\n }\n\n context.fs.mkdirSync(directory.path);\n },\n visitFile: file => {\n if (\"contents\" in file) {\n const metadata = meta[file.path] ?? {};\n if (metadata.kind === \"builtin\") {\n if (!metadata.id) {\n throw new Error(\n `Built-in file \"${\n file.path\n }\" is missing its ID in the render metadata.`\n );\n }\n\n context.emitBuiltinSync(file.contents, metadata.id, {\n skipFormat: metadata.skipFormat,\n storage: metadata.storage,\n extension: findFileExtension(file.path)\n });\n } else if (metadata.kind === \"entry\") {\n context.emitEntrySync(file.contents, file.path, {\n skipFormat: metadata.skipFormat,\n storage: metadata.storage,\n ...(metadata.typeDefinition ?? {})\n });\n } else if (metadata.kind === \"infrastructure\") {\n if (!metadata.id) {\n throw new Error(\n `Infrastructure file \"${\n file.path\n }\" is missing its ID in the render metadata.`\n );\n }\n\n context.emitInfrastructureSync(file.contents, metadata.id, {\n skipFormat: metadata.skipFormat,\n storage: metadata.storage,\n extension: findFileExtension(file.path)\n });\n } else {\n context.emitSync(file.contents, file.path, metadata);\n }\n } else {\n context.fs.copySync(file.sourcePath, file.path);\n }\n }\n });\n }\n}\n\n/**\n * A function to render children components within the [Alloy](https://alloy-framework.github.io) context and return the rendered output as a string.\n *\n * @example\n * ```tsx\n * import { renderString } from \"@powerlines/plugin-alloy/render\";\n *\n * const output = await renderString(context, <> ... </>);\n * ```\n *\n * @param context - The Powerlines plugin context.\n * @param children - The children components to render.\n * @param options - Optional print tree options.\n * @returns The rendered output as a string.\n */\nexport function renderString<TContext extends PluginContext>(\n context: TContext,\n children: Children,\n options?: PrintTreeOptions\n) {\n const tree = renderTree(\n <Output<TContext> context={context}>{children}</Output>\n );\n\n return printTree(tree, options);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAsC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gBAAA,UAAA;EACF;EACA;CACV,CAAC,CACY,GAAA,OAAA;AACf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components.d.cts","names":[],"sources":["../../src/types/components.ts"],"mappings":";;;;;UAsBiB,cAAA;EACf,IAAA;EACA,IAAA;EACA,UAAA;;;;;;;EAQA,MAAA,GAAS,
|
|
1
|
+
{"version":3,"file":"components.d.cts","names":[],"sources":["../../src/types/components.ts"],"mappings":";;;;;UAsBiB,cAAA;EACf,IAAA;EACA,IAAA;EACA,UAAA;;;;;;;EAQA,MAAA,GAAS,aAAa;AAAA;AAAA,UAGP,eAAA;EACf,IAAA;EACA,IAAA;EACA,QAAA;EACA,QAAA;EAHA;;;;;;EAWA,MAAA,GAAS,aAAa;AAAA;AAAA,KAGZ,UAAA,IACP,eAAA;EAAoB,IAAA;AAAA,MACpB,eAAA;EACC,IAAA;EACA,cAAA,GAAiB,2BAAA;AAAA,MAElB,eAAA;EAAoB,IAAA;EAAiB,EAAA;AAAA,KACtC,cAAA;AAAA,UAEa,eAAA;EACf,IAAA;EACA,IAAA;EACA,QAAA,GAAW,eAAA,GAAkB,UAAU;AAAA;AAAA,UAGxB,kBAAA;EACf,cAAA,EAAgB,2BAA2B;AAAA;AAAA,UAG5B,oBAAA;EACf,EAAE;AAAA;AAAA,UAGa,mBAAA;EACf,IAAA,GAAO,aAAa;AAAA;AAAA,UAGL,qBAAA;EACf,IAAA;EACA,UAAU;AAAA;AAAA,UAGK,aAAA,SAAsB,OAAA;EACrC,IAAA;IACE,QAAA,GAAW,qBAAA;IAtBgB;;AAAU;IA2BrC,OAAA,GAAU,oBAAA;IAxBqB;;;IA6B/B,KAAA,GAAQ,kBAAA;IAzBK;;;IA8Bb,MAAA,GAAS,mBAAA;EAAA,IACP,MAAA;AAAA;;;;UAMW,cAAA;EACf,QAAA,GAAW,QAAQ;AAAA;;;AA5BT;KAkCA,0BAAA,GAA6B,IAAA,CAAK,cAAA,gBAC5C,QAAA,CAAS,IAAA,CAAK,cAAA;AAAA,UAEC,wBAAA,SAAiC,iBAAiB;;;;EAIjE,EAAE;AAAA;AAAA,UAGa,2BAAA;EACf,IAAA,YAAgB,QAAA;EAChB,IAAA,YAAgB,QAAA;EAChB,OAAA;EACA,YAAA,GAAe,OAAA,CAAQ,CAAA;AAAA;AAAA,UAGR,wBAAA;EACf,IAAA;EACA,OAAA;EACA,KAAA;EACA,IAAA;AAAA;AAAA,KAGU,qBAAA,GAAwB,MAAA,yBAElB,KAAA,CAAM,wBAAA;AAAA,UAGP,qBAAA,SAA8B,cAAc;EA1CvD;;AAAM;AAMZ;;EA0CE,aAAA;EAzCA;AAAmB;AAMrB;;;EA0CE,YAAA;EA1CuC;;;;;EAiDvC,eAAA;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components.d.mts","names":[],"sources":["../../src/types/components.ts"],"mappings":";;;;;UAsBiB,cAAA;EACf,IAAA;EACA,IAAA;EACA,UAAA;;;;;;;EAQA,MAAA,GAAS,
|
|
1
|
+
{"version":3,"file":"components.d.mts","names":[],"sources":["../../src/types/components.ts"],"mappings":";;;;;UAsBiB,cAAA;EACf,IAAA;EACA,IAAA;EACA,UAAA;;;;;;;EAQA,MAAA,GAAS,aAAa;AAAA;AAAA,UAGP,eAAA;EACf,IAAA;EACA,IAAA;EACA,QAAA;EACA,QAAA;EAHA;;;;;;EAWA,MAAA,GAAS,aAAa;AAAA;AAAA,KAGZ,UAAA,IACP,eAAA;EAAoB,IAAA;AAAA,MACpB,eAAA;EACC,IAAA;EACA,cAAA,GAAiB,2BAAA;AAAA,MAElB,eAAA;EAAoB,IAAA;EAAiB,EAAA;AAAA,KACtC,cAAA;AAAA,UAEa,eAAA;EACf,IAAA;EACA,IAAA;EACA,QAAA,GAAW,eAAA,GAAkB,UAAU;AAAA;AAAA,UAGxB,kBAAA;EACf,cAAA,EAAgB,2BAA2B;AAAA;AAAA,UAG5B,oBAAA;EACf,EAAE;AAAA;AAAA,UAGa,mBAAA;EACf,IAAA,GAAO,aAAa;AAAA;AAAA,UAGL,qBAAA;EACf,IAAA;EACA,UAAU;AAAA;AAAA,UAGK,aAAA,SAAsB,OAAA;EACrC,IAAA;IACE,QAAA,GAAW,qBAAA;IAtBgB;;AAAU;IA2BrC,OAAA,GAAU,oBAAA;IAxBqB;;;IA6B/B,KAAA,GAAQ,kBAAA;IAzBK;;;IA8Bb,MAAA,GAAS,mBAAA;EAAA,IACP,MAAA;AAAA;;;;UAMW,cAAA;EACf,QAAA,GAAW,QAAQ;AAAA;;;AA5BT;KAkCA,0BAAA,GAA6B,IAAA,CAAK,cAAA,gBAC5C,QAAA,CAAS,IAAA,CAAK,cAAA;AAAA,UAEC,wBAAA,SAAiC,mBAAiB;;;;EAIjE,EAAE;AAAA;AAAA,UAGa,2BAAA;EACf,IAAA,YAAgB,QAAA;EAChB,IAAA,YAAgB,QAAA;EAChB,OAAA;EACA,YAAA,GAAe,OAAA,CAAQ,CAAA;AAAA;AAAA,UAGR,wBAAA;EACf,IAAA;EACA,OAAA;EACA,KAAA;EACA,IAAA;AAAA;AAAA,KAGU,qBAAA,GAAwB,MAAA,yBAElB,KAAA,CAAM,wBAAA;AAAA,UAGP,qBAAA,SAA8B,cAAc;EA1CvD;;AAAM;AAMZ;;EA0CE,aAAA;EAzCA;AAAmB;AAMrB;;;EA0CE,YAAA;EA1CuC;;;;;EAiDvC,eAAA;AAAA"}
|
package/dist/types/plugin.d.cts
CHANGED
|
@@ -3,26 +3,7 @@ import { PluginContext } from "powerlines";
|
|
|
3
3
|
import { BabelPluginResolvedConfig, BabelPluginUserConfig } from "@powerlines/plugin-babel/types/plugin";
|
|
4
4
|
|
|
5
5
|
//#region src/types/plugin.d.ts
|
|
6
|
-
type AlloyPluginOptions = Partial<PrintTreeOptions
|
|
7
|
-
/**
|
|
8
|
-
* If true, the Alloy framework is used to generate Typescript output files.
|
|
9
|
-
*
|
|
10
|
-
* @defaultValue true
|
|
11
|
-
*/
|
|
12
|
-
typescript?: boolean;
|
|
13
|
-
/**
|
|
14
|
-
* If true, the Alloy framework is used to generate JSON output files.
|
|
15
|
-
*
|
|
16
|
-
* @defaultValue false
|
|
17
|
-
*/
|
|
18
|
-
json?: boolean;
|
|
19
|
-
/**
|
|
20
|
-
* If true, the Alloy framework is used to generate Markdown output files.
|
|
21
|
-
*
|
|
22
|
-
* @defaultValue false
|
|
23
|
-
*/
|
|
24
|
-
markdown?: boolean;
|
|
25
|
-
};
|
|
6
|
+
type AlloyPluginOptions = Partial<PrintTreeOptions>;
|
|
26
7
|
type AlloyPluginUserConfig = BabelPluginUserConfig & {
|
|
27
8
|
alloy?: AlloyPluginOptions;
|
|
28
9
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;;KAyBY,kBAAA,GAAqB,
|
|
1
|
+
{"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;;KAyBY,kBAAA,GAAqB,OAAO,CAAC,gBAAA;AAAA,KAE7B,qBAAA,GAAwB,qBAAA;EAClC,KAAA,GAAQ,kBAAkB;AAAA;AAAA,KAGhB,yBAAA,GAA4B,yBAAA;EACtC,KAAA,EAAO,kBAAkB;AAAA;AAAA,KAGf,kBAAA,yBACc,yBAAA,GAA4B,yBAAA,IAClD,aAAA,CAAc,eAAA"}
|
package/dist/types/plugin.d.mts
CHANGED
|
@@ -3,26 +3,7 @@ import { PluginContext } from "powerlines";
|
|
|
3
3
|
import { BabelPluginResolvedConfig, BabelPluginUserConfig } from "@powerlines/plugin-babel/types/plugin";
|
|
4
4
|
|
|
5
5
|
//#region src/types/plugin.d.ts
|
|
6
|
-
type AlloyPluginOptions = Partial<PrintTreeOptions
|
|
7
|
-
/**
|
|
8
|
-
* If true, the Alloy framework is used to generate Typescript output files.
|
|
9
|
-
*
|
|
10
|
-
* @defaultValue true
|
|
11
|
-
*/
|
|
12
|
-
typescript?: boolean;
|
|
13
|
-
/**
|
|
14
|
-
* If true, the Alloy framework is used to generate JSON output files.
|
|
15
|
-
*
|
|
16
|
-
* @defaultValue false
|
|
17
|
-
*/
|
|
18
|
-
json?: boolean;
|
|
19
|
-
/**
|
|
20
|
-
* If true, the Alloy framework is used to generate Markdown output files.
|
|
21
|
-
*
|
|
22
|
-
* @defaultValue false
|
|
23
|
-
*/
|
|
24
|
-
markdown?: boolean;
|
|
25
|
-
};
|
|
6
|
+
type AlloyPluginOptions = Partial<PrintTreeOptions>;
|
|
26
7
|
type AlloyPluginUserConfig = BabelPluginUserConfig & {
|
|
27
8
|
alloy?: AlloyPluginOptions;
|
|
28
9
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;;KAyBY,kBAAA,GAAqB,
|
|
1
|
+
{"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;;KAyBY,kBAAA,GAAqB,OAAO,CAAC,gBAAA;AAAA,KAE7B,qBAAA,GAAwB,qBAAA;EAClC,KAAA,GAAQ,kBAAkB;AAAA;AAAA,KAGhB,yBAAA,GAA4B,yBAAA;EACtC,KAAA,EAAO,kBAAkB;AAAA;AAAA,KAGf,kBAAA,yBACc,yBAAA,GAA4B,yBAAA,IAClD,aAAA,CAAc,eAAA"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { TSDocModuleProps } from "./tsdoc.cjs";
|
|
2
2
|
import { TypescriptFileProps } from "./typescript-file.cjs";
|
|
3
|
-
import * as _$_alloy_js_core0 from "@alloy-js/core";
|
|
4
3
|
|
|
5
4
|
//#region src/typescript/components/builtin-file.d.ts
|
|
6
5
|
type BuiltinFileProps = Omit<TypescriptFileProps, "path"> & Omit<TSDocModuleProps, "name"> & {
|
|
@@ -28,7 +27,7 @@ type BuiltinFileProps = Omit<TypescriptFileProps, "path"> & Omit<TSDocModuleProp
|
|
|
28
27
|
* @param props - The properties for the source file.
|
|
29
28
|
* @returns The rendered source file component.
|
|
30
29
|
*/
|
|
31
|
-
declare function BuiltinFile(props: BuiltinFileProps):
|
|
30
|
+
declare function BuiltinFile(props: BuiltinFileProps): import("@alloy-js/core").Children;
|
|
32
31
|
//#endregion
|
|
33
32
|
export { BuiltinFile, BuiltinFileProps };
|
|
34
33
|
//# sourceMappingURL=builtin-file.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builtin-file.d.cts","names":[],"sources":["../../../src/typescript/components/builtin-file.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"builtin-file.d.cts","names":[],"sources":["../../../src/typescript/components/builtin-file.tsx"],"mappings":";;;;KAgCY,gBAAA,GAAmB,IAAA,CAAK,mBAAA,YAClC,IAAA,CAAK,gBAAA;;AADP;;;;;EAQI,EAAA;EAPF;;;EAYE,WAAA;EAbgC;;;;;EAoBhC,GAAA;AAAA;AAAG;AASP;;;;;AATO,iBASS,WAAA,CAAY,KAAA,EAAO,gBAAgB,4BAAA,QAAA"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { TSDocModuleProps } from "./tsdoc.mjs";
|
|
2
2
|
import { TypescriptFileProps } from "./typescript-file.mjs";
|
|
3
|
-
import * as _$_alloy_js_core0 from "@alloy-js/core";
|
|
4
3
|
|
|
5
4
|
//#region src/typescript/components/builtin-file.d.ts
|
|
6
5
|
type BuiltinFileProps = Omit<TypescriptFileProps, "path"> & Omit<TSDocModuleProps, "name"> & {
|
|
@@ -28,7 +27,7 @@ type BuiltinFileProps = Omit<TypescriptFileProps, "path"> & Omit<TSDocModuleProp
|
|
|
28
27
|
* @param props - The properties for the source file.
|
|
29
28
|
* @returns The rendered source file component.
|
|
30
29
|
*/
|
|
31
|
-
declare function BuiltinFile(props: BuiltinFileProps):
|
|
30
|
+
declare function BuiltinFile(props: BuiltinFileProps): import("@alloy-js/core").Children;
|
|
32
31
|
//#endregion
|
|
33
32
|
export { BuiltinFile, BuiltinFileProps };
|
|
34
33
|
//# sourceMappingURL=builtin-file.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builtin-file.d.mts","names":[],"sources":["../../../src/typescript/components/builtin-file.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"builtin-file.d.mts","names":[],"sources":["../../../src/typescript/components/builtin-file.tsx"],"mappings":";;;;KAgCY,gBAAA,GAAmB,IAAA,CAAK,mBAAA,YAClC,IAAA,CAAK,gBAAA;;AADP;;;;;EAQI,EAAA;EAPF;;;EAYE,WAAA;EAbgC;;;;;EAoBhC,GAAA;AAAA;AAAG;AASP;;;;;AATO,iBASS,WAAA,CAAY,KAAA,EAAO,gBAAgB,4BAAA,QAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builtin-file.mjs","names":[],"sources":["../../../src/typescript/components/builtin-file.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { computed, splitProps } from \"@alloy-js/core\";\nimport { hasFileExtension } from \"@stryke/path/file-path-fns\";\nimport { replaceExtension, replacePath } from \"@stryke/path/replace\";\nimport { isSet } from \"@stryke/type-checks/is-set\";\nimport { usePowerlinesSafe } from \"../../core/contexts/context\";\nimport type { TSDocModuleProps } from \"./tsdoc\";\nimport { TSDocModule } from \"./tsdoc\";\nimport {\n TypescriptFile,\n TypescriptFileHeader,\n TypescriptFileHeaderImports,\n TypescriptFileProps\n} from \"./typescript-file\";\n\nexport type BuiltinFileProps = Omit<TypescriptFileProps, \"path\"> &\n Omit<TSDocModuleProps, \"name\"> & {\n /**\n * The runtime module identifier.\n *\n * @remarks\n * This value will be included after the \\`storm:\\` prefix in the import statement.\n */\n id: string;\n\n /**\n * The description for the builtin module.\n */\n description?: string;\n\n /**\n * Whether the file is a TSX file.\n *\n * @defaultValue false\n */\n tsx?: boolean;\n };\n\n/**\n * A base component representing a Powerlines generated Typescript source file.\n *\n * @param props - The properties for the source file.\n * @returns The rendered source file component.\n */\nexport function BuiltinFile(props: BuiltinFileProps) {\n const [{ children, imports, builtinImports, id, description, tsx }, rest] =\n splitProps(props, [\n \"children\",\n \"imports\",\n \"builtinImports\",\n \"id\",\n \"description\",\n \"tsx\"\n ]);\n\n const context = usePowerlinesSafe();\n const path = computed(() =>\n replacePath(\n `${!isSet(tsx) ? id : replaceExtension(id)}${\n hasFileExtension(id) && !isSet(tsx) ? \"\" : tsx ? \".tsx\" : \".ts\"\n }`,\n context?.builtinsPath\n )\n );\n\n return (\n <TypescriptFile\n header={\n <TypescriptFileHeader\n header={<TSDocModule name={id}>{description}</TSDocModule>}>\n <TypescriptFileHeaderImports\n imports={imports}\n builtinImports={builtinImports}\n />\n </TypescriptFileHeader>\n }\n meta={{\n kind: \"builtin\",\n extension: tsx ? \"tsx\" : \"ts\",\n id: replaceExtension(id)\n }}\n {...rest}\n path={path.value}>\n {children}\n </TypescriptFile>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAgCA,SAAY,YAAgB,OAAO;CACjC,MAAK,CAAA,EACH,UACA,SACA,gBACA,IACA,aACA,OACA,QAAI,WAAM,OAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;
|
|
1
|
+
{"version":3,"file":"builtin-file.mjs","names":[],"sources":["../../../src/typescript/components/builtin-file.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { computed, splitProps } from \"@alloy-js/core\";\nimport { hasFileExtension } from \"@stryke/path/file-path-fns\";\nimport { replaceExtension, replacePath } from \"@stryke/path/replace\";\nimport { isSet } from \"@stryke/type-checks/is-set\";\nimport { usePowerlinesSafe } from \"../../core/contexts/context\";\nimport type { TSDocModuleProps } from \"./tsdoc\";\nimport { TSDocModule } from \"./tsdoc\";\nimport {\n TypescriptFile,\n TypescriptFileHeader,\n TypescriptFileHeaderImports,\n TypescriptFileProps\n} from \"./typescript-file\";\n\nexport type BuiltinFileProps = Omit<TypescriptFileProps, \"path\"> &\n Omit<TSDocModuleProps, \"name\"> & {\n /**\n * The runtime module identifier.\n *\n * @remarks\n * This value will be included after the \\`storm:\\` prefix in the import statement.\n */\n id: string;\n\n /**\n * The description for the builtin module.\n */\n description?: string;\n\n /**\n * Whether the file is a TSX file.\n *\n * @defaultValue false\n */\n tsx?: boolean;\n };\n\n/**\n * A base component representing a Powerlines generated Typescript source file.\n *\n * @param props - The properties for the source file.\n * @returns The rendered source file component.\n */\nexport function BuiltinFile(props: BuiltinFileProps) {\n const [{ children, imports, builtinImports, id, description, tsx }, rest] =\n splitProps(props, [\n \"children\",\n \"imports\",\n \"builtinImports\",\n \"id\",\n \"description\",\n \"tsx\"\n ]);\n\n const context = usePowerlinesSafe();\n const path = computed(() =>\n replacePath(\n `${!isSet(tsx) ? id : replaceExtension(id)}${\n hasFileExtension(id) && !isSet(tsx) ? \"\" : tsx ? \".tsx\" : \".ts\"\n }`,\n context?.builtinsPath\n )\n );\n\n return (\n <TypescriptFile\n header={\n <TypescriptFileHeader\n header={<TSDocModule name={id}>{description}</TSDocModule>}>\n <TypescriptFileHeaderImports\n imports={imports}\n builtinImports={builtinImports}\n />\n </TypescriptFileHeader>\n }\n meta={{\n kind: \"builtin\",\n extension: tsx ? \"tsx\" : \"ts\",\n id: replaceExtension(id)\n }}\n {...rest}\n path={path.value}>\n {children}\n </TypescriptFile>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAgCA,SAAY,YAAgB,OAAO;CACjC,MAAK,CAAA,EACH,UACA,SACA,gBACA,IACA,aACA,OACA,QAAI,WAAM,OAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;CAAA,CAAA;;CAEZ,MAAI,OAAA,eAAA,YAAA,GAAA,CAAA,MAAA,GAAA,IAAA,KAAA,iBAAA,EAAA,IAAA,iBAAA,EAAA,KAAA,CAAA,MAAA,GAAA,IAAA,KAAA,MAAA,SAAA,SAAA,SAAA,YAAA,CAAA;CACJ,OAAK,gBAAoB,gBAAY,WAAM;EACzC,IAAE,SAAA;GACF,OAAA,gBAAoB,sBAAA;;KAElB,OAAA,gBAAA,aAAA;MACC,MAAW;MACb,UAAA;KACG,CAAA;IACF;IACE,IAAE,WAAO;KACd,OAAA,gBAAA,6BAAA;;MAED;KACQ,CAAA;IACT;GACG,CAAA;EACA;EACF,IAAA,OAAA;GACI,OAAC;IACC,MAAG;IACP,WAAW,MAAO,QAAA;IACf,IAAA,iBAAS,EAAA;GACV;EACF;CACF,GAAG,MAAK;EACN,IAAG,OAAA;GACD,OAAI,KAAA;EACN;;CAEF,CAAA,CAAA;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"class-declaration.d.cts","names":[],"sources":["../../../src/typescript/components/class-declaration.tsx"],"mappings":";;;;;;;;UAoDiB,qBAAA,SAA8B,sBAAA;EAAR;;;EAIrC,QAAA;EAeiB;;;EAVjB,OAAA,GAAU,QAAA;EATmC;;;EAc7C,UAAA,GAAa,QAAA;EAAb;;;EAKA,cAAA,GAAiB,uBAAA;AAAA
|
|
1
|
+
{"version":3,"file":"class-declaration.d.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AgB,QAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"class-declaration.d.mts","names":[],"sources":["../../../src/typescript/components/class-declaration.tsx"],"mappings":";;;;;;;;UAoDiB,qBAAA,SAA8B,sBAAA;EAAR;;;EAIrC,QAAA;EAeiB;;;EAVjB,OAAA,GAAU,QAAA;EATmC;;;EAc7C,UAAA,GAAa,QAAA;EAAb;;;EAKA,cAAA,GAAiB,uBAAA;AAAA
|
|
1
|
+
{"version":3,"file":"class-declaration.d.mts","names":[],"sources":["../../../src/typescript/components/class-declaration.tsx"],"mappings":";;;;;;;;UAoDiB,qBAAA,SAA8B,sBAAA;EAAR;;;EAIrC,QAAA;EAeiB;;;EAVjB,OAAA,GAAU,QAAA;EATmC;;;EAc7C,UAAA,GAAa,QAAA;EAAb;;;EAKA,cAAA,GAAiB,uBAAA;AAAA;AAAuB;AAiC1C;;;;;;;;AAA6D;;;;;;AA4C7D;;;;;;;;;;;;;;;AA7E0C,iBAiC1B,gBAAA,CAAiB,KAAA,EAAO,qBAAA,GAAqB,QAAA;AAAA,kBAA7C,gBAAA;EAAA,2BAAgB,cAAA;AAAA;;;;UA4Cf,gBAAA;EACf,IAAA,WAAe,OAAA;EACf,MAAA,GAAS,MAAA;EACT,MAAA;EACA,OAAA;EACA,SAAA;EACA,SAAA;EACA,MAAA;EACA,QAAA;EACA,QAAA,GAAW,QAAA;EACX,GAAA,GAAM,QAAA;EACN,OAAA;EACA,QAAA;AAAA;AA0CF;;;;;;AAAA,iBAjCgB,WAAA,CAAY,KAAA,EAAO,gBAAA,GAAgB,QAAA;;;;UAiClC,eAAA,SAAwB,gBAAA;EACvC,IAAA;EACA,IAAA,GAAO,QAAA;EACP,QAAA;EACA,QAAA,GAAW,QAAA;EACX,eAAA;AAAA;AAAe;AASjB;;;;;AATiB,iBASD,UAAA,CAAW,KAAA,EAAO,eAAA,GAAe,QAAA;;;AAAA;UAyBhC,kBAAA,SAA2B,gBAAA;EAC1C,IAAA;EACA,IAAA,GAAO,QAAA;EACP,QAAA,GAAW,QAAA;AAAA;;;;;;;iBASG,gBAAA,CAAiB,KAAA,EAAO,kBAAA,GAAkB,QAAA;;;;AATrC;AASrB;;iBA4BgB,gBAAA,CAAiB,KAAA,EAAO,kBAAA,GAAkB,QAAA;;;;UAkBzC,gBAAA,SAAyB,gBAAA,EAAkB,kBAAA;EAC1D,KAAA;EACA,QAAA,GAAW,QAAA;AAAA;;;;;;;iBASG,WAAA,CAAY,KAAA,EAAO,gBAAA,GAAgB,QAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"class-declaration.mjs","names":[],"sources":["../../../src/typescript/components/class-declaration.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport {\n Block,\n Children,\n code,\n For,\n MemberDeclaration,\n Name,\n Namekey,\n Refkey,\n Show,\n splitProps\n} from \"@alloy-js/core\";\nimport {\n CallSignature,\n CallSignatureProps,\n CommonDeclarationProps,\n createMemberSymbol,\n createTypeAndValueSymbol,\n Declaration,\n TSSymbolFlags,\n TypeParameterDescriptor,\n TypeRefContext,\n useTSNamePolicy\n} from \"@alloy-js/typescript\";\nimport { LexicalScope } from \"../contexts\";\nimport { MemberScope } from \"../contexts/member-scope\";\nimport { getCallSignatureProps } from \"../helpers\";\nimport { PropertyName } from \"./property-name\";\nimport { TSDoc, TSDocParams } from \"./tsdoc\";\nimport { TypeParameters } from \"./type-parameters\";\n\n/**\n * Props for the ClassDeclaration component, which represents a TypeScript class declaration\n */\nexport interface ClassDeclarationProps extends CommonDeclarationProps {\n /**\n * An indication of whether this class is abstract\n */\n abstract?: boolean;\n\n /**\n * An optional class that this class extends. This will be rendered as an `extends` clause in the class declaration\n */\n extends?: Children;\n\n /**\n * Optional interfaces that this class implements. This will be rendered as an `implements` clause in the class declaration\n */\n implements?: Children[];\n\n /**\n * The generic type parameters of the class.\n */\n typeParameters?: TypeParameterDescriptor[] | string[];\n}\n\n/**\n * Create a TypeScript class declaration.\n *\n * @example\n * ```tsx\n * const myPetRefkey = refkey();\n * const Animal = refkey();\n * const staticMember = refkey();\n * const instanceMember = refkey();\n *\n * <ClassDeclaration name=\"Animal\" refkey={Animal}>\n * <ClassMember public static name=\"something\" type=\"string\" refkey={staticMember}>\n * \"hello\"\n * </ClassMember>\n * <ClassMember public name=\"kind\" type=\"string\" />\n * <ClassMember public name=\"name\" type=\"string\" refkey={instanceMember} />\n * <ClassConstructor parameters=\"name: string\">\n * this.name = name;\n * </ClassConstructor>\n * </ClassDeclaration>\n *\n * <VarDeclaration const name=\"myPet\" refkey={myPetRefkey}>\n * new {Animal}();\n * </VarDeclaration>\n *\n * {staticMember}; // Animal.something\n * <MemberReference path={[myPetRefkey, instanceMember]} /> // myPet.name\n * {memberRefkey(myPetRefkey, instanceMember)}\n * ```\n */\nexport function ClassDeclaration(props: ClassDeclarationProps) {\n const extendsPart = props.extends && <> extends {props.extends}</>;\n const implementsPart = props.implements && props.implements.length > 0 && (\n <>\n {\" \"}\n implements{\" \"}\n <For each={props.implements} comma space>\n {implement => implement}\n </For>\n </>\n );\n const sym = createTypeAndValueSymbol(props.name, {\n refkeys: props.refkey,\n export: props.export,\n default: props.default,\n metadata: props.metadata,\n hasInstanceMembers: true,\n namePolicy: useTSNamePolicy().for(\"class\")\n });\n\n return (\n <>\n <Show when={Boolean(props.doc)}>\n <TSDoc heading={props.doc} />\n </Show>\n <Declaration symbol={sym} export={props.export} default={props.default}>\n <MemberScope ownerSymbol={sym}>\n {props.abstract && code`abstract `} class <Name />\n {props.typeParameters && (\n <TypeParameters parameters={props.typeParameters} />\n )}\n {extendsPart}\n {implementsPart} <Block>{props.children}</Block>\n </MemberScope>\n </Declaration>\n </>\n );\n}\n\nClassDeclaration.TypeParameters = TypeParameters;\n\n/**\n * Generates a TypeScript class member declaration for the given reflection class.\n */\nexport interface ClassMemberProps {\n name: string | Namekey;\n refkey?: Refkey;\n public?: boolean;\n private?: boolean;\n protected?: boolean;\n jsPrivate?: boolean;\n static?: boolean;\n abstract?: boolean;\n children?: Children;\n doc?: Children;\n nullish?: boolean;\n override?: boolean;\n}\n\n/**\n * Generates a TypeScript class member declaration for the given reflection class.\n *\n * @param props - The properties of the class member, including its name, visibility, and other modifiers.\n * @returns A JSX element representing the class member declaration, which can be used within a ClassDeclaration component.\n */\nexport function ClassMember(props: ClassMemberProps) {\n let tsFlags = TSSymbolFlags.None;\n if (props.nullish) {\n tsFlags |= TSSymbolFlags.Nullish;\n }\n\n const sym = createMemberSymbol(props.name, props, {\n refkeys: props.refkey,\n tsFlags,\n namePolicy: useTSNamePolicy().for(\"class-member-data\")\n });\n\n return (\n <>\n <Show when={Boolean(props.doc)}>\n <TSDoc heading={props.doc} />\n </Show>\n <MemberDeclaration symbol={sym}>\n {props.public && \"public \"}\n {props.private && \"private \"}\n {props.protected && \"protected \"}\n {props.abstract && \"abstract \"}\n {props.override && \"override \"}\n {props.static && \"static \"}\n {props.children}\n </MemberDeclaration>\n </>\n );\n}\n\n/**\n * Props for a class field, which is a specific type of class member that represents a property of the class.\n */\nexport interface ClassFieldProps extends ClassMemberProps {\n name: string;\n type?: Children;\n optional?: boolean;\n children?: Children;\n isPrivateMember?: boolean;\n}\n\n/**\n * Generates a TypeScript class field declaration for the given reflection class.\n *\n * @param props - The properties of the class field, including its name, type, optionality, and other modifiers.\n * @returns A JSX element representing the class field declaration, which can be used within a ClassDeclaration component.\n */\nexport function ClassField(props: ClassFieldProps) {\n const optionality = props.optional ? \"?\" : \"\";\n const typeSection = props.type && (\n <>\n {optionality}: <TypeRefContext>{props.type}</TypeRefContext>\n </>\n );\n const initializerSection = props.children && <> = {props.children}</>;\n const nullish = props.nullish ?? props.optional;\n\n return (\n <ClassMember {...props} nullish={nullish}>\n <PropertyName\n private={props.isPrivateMember}\n name={props.isPrivateMember ? props.name : undefined}\n />\n {typeSection}\n {initializerSection}\n </ClassMember>\n );\n}\n\n/**\n * Props for a class field, which is a specific type of class member that represents a property of the class.\n */\nexport interface ClassPropertyProps extends ClassMemberProps {\n name: string;\n type?: Children;\n children?: Children;\n}\n\n/**\n * Generates a TypeScript class property setter declaration for the given reflection class.\n *\n * @param props - The properties of the class property, including its name, type, and other modifiers.\n * @returns A JSX element representing the class property setter declaration, which can be used within a ClassDeclaration component.\n */\nexport function ClassPropertySet(props: ClassPropertyProps) {\n return (\n <>\n <ClassMember {...props}>\n {\"set \"}\n <PropertyName name={props.name} />\n <LexicalScope>\n <CallSignature\n parameters={[\n {\n name: \"value\",\n type: <TypeRefContext>{props.type}</TypeRefContext>\n }\n ]}\n />{\" \"}\n <Block>{props.children}</Block>\n </LexicalScope>\n </ClassMember>\n </>\n );\n}\n\n/**\n * Generates a TypeScript class property getter declaration for the given reflection class.\n *\n * @param props - The properties of the class property, including its name, type, and other modifiers.\n * @returns A JSX element representing the class property getter declaration, which can be used within a ClassDeclaration component.\n */\nexport function ClassPropertyGet(props: ClassPropertyProps) {\n return (\n <ClassMember {...props}>\n {\"get \"}\n <PropertyName name={props.name} />\n <LexicalScope>\n <CallSignature\n returnType={<TypeRefContext>{props.type}</TypeRefContext>}\n />{\" \"}\n <Block>{props.children}</Block>\n </LexicalScope>\n </ClassMember>\n );\n}\n\n/**\n * Props for a class method, which is a specific type of class member that represents a function defined within the class.\n */\nexport interface ClassMethodProps extends ClassMemberProps, CallSignatureProps {\n async?: boolean;\n children?: Children;\n}\n\n/**\n * Generates a TypeScript class method declaration for the given reflection class.\n *\n * @param props - The properties of the class method, including its name, visibility, and other modifiers.\n * @returns A JSX element representing the class method declaration, which can be used within a ClassDeclaration component.\n */\nexport function ClassMethod(props: ClassMethodProps) {\n const callProps = getCallSignatureProps(props);\n const [_, rest] = splitProps(props, [\"doc\"]);\n\n return (\n <>\n <Show when={Boolean(props.doc)}>\n <TSDoc heading={props.doc}>\n {Array.isArray(rest.parameters) && (\n <TSDocParams parameters={rest.parameters} />\n )}\n </TSDoc>\n </Show>\n <ClassMember {...rest}>\n {props.async && \"async \"}\n <PropertyName />\n <LexicalScope>\n <CallSignature {...callProps} /> <Block>{props.children}</Block>\n </LexicalScope>\n </ClassMember>\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+DE,MAAE,cAAA,MAAA,WAAA,CAAA,aAAA,WAAA,MAAA,QAAA,CAAA;CACF,MAAG,iBAAoB,MAAK,cAAW,MAAU,WAAW,SAAI,KAAS;EAAE;EAAK;EAAY;EAAO,gBAAa,KAAA;GAC9G,IAAA,OAAA;AACF,WAAW,MAAE;;GAEX,OAAA;GACA,OAAK;GACL,WAAA,cAAA;GACF,CAAA;EAAA;CACF,MAAA,MAAA,yBAAA,MAAA,MAAA;;EAEE,QAAA,MAAA;EACC,SAAS,MAAA;EACX,UAAA,MAAA;EACG,oBAAA;EACA,YAAE,iBAAA,CAAA,IAAA,QAAA;EACH,CAAA;AACD,QAAO,CAAA,gBAAiB,MAAA;EACvB,IAAK,OAAC;AACN,UAAM,QAAA,MAAiB,IAAA;;EAEtB,IAAA,WAAA;AACE,UAAA,gBAAyB,OAAO,EAC9B,IAAA,UAAK;AACN,WAAA,MAAW;MAEZ,CAAA;;EAEH,CAAC,EAAE,gBAAiB,eAAA;EACnB,QAAG;EACH,KAAC,YAAgB;AACpB,UAAA,MAAA;;EAEG,KAAK,aAAU;AACd,UAAA,MAAc;;EAEf,IAAA,WAAe;AACf,UAAA,gBAAuB,eAAa;IACpC,aAAa;IACZ,IAAA,WAAA;AACH,YAAA;MAAA,WAAA,MAAA,YAAA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,CAAA,GAAQ,QAAM,WAAQ,OAAY,CAAC,MAAI,CAAA;AACzC,QAAA,CAAA,gBAAA,MAAA;EACF,IAAO,OAAQ;AACb,UAAO,QAAA,MAAA,IAAA;;EAEL,IAAI,WAAK;AACP,UAAC,gBAAwB,OAAO;IAC/B,IAAA,UAAY;AACV,YAAA,MAAA;;IAED,IAAI,WAAE;AACL,YAAO,WAAc,CAAC,CAAC,MAAM,QAAA,KAAA,WAAA,CAAA,EAAA,IAAA,gBAAA,aAAA,EAC9B,IAAA,aAAY;AACd,aAAW,KAAA;QAEjB,CAAA;;IAEE,CAAA;;EAEA,CAAA,EAAA,gBAAA,aAAA,WAAA,MAAA,EACF,IAAO,WAAU;AACf,SAAQ;GAAA,WAAO,MAAA,SAAA,SAAA;GAAA,gBAAA,cAAA,EAAA,CAAA;GAAA,gBAAA,cAAA,EACf,IAAU,WAAS;AACrB,WAAA;KAAA,gBAAA,eAAA,UAAA;KAAA;KAAA,gBAAA,OAAA;AAEE,aAAA,MAAA;QAED,CAAA;KAAA;MAEG,CAAA;GAAA;IAEJ,CAAA,CAAA,CAAM"}
|
|
1
|
+
{"version":3,"file":"class-declaration.mjs","names":[],"sources":["../../../src/typescript/components/class-declaration.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport {\n Block,\n Children,\n code,\n For,\n MemberDeclaration,\n Name,\n Namekey,\n Refkey,\n Show,\n splitProps\n} from \"@alloy-js/core\";\nimport {\n CallSignature,\n CallSignatureProps,\n CommonDeclarationProps,\n createMemberSymbol,\n createTypeAndValueSymbol,\n Declaration,\n TSSymbolFlags,\n TypeParameterDescriptor,\n TypeRefContext,\n useTSNamePolicy\n} from \"@alloy-js/typescript\";\nimport { LexicalScope } from \"../contexts\";\nimport { MemberScope } from \"../contexts/member-scope\";\nimport { getCallSignatureProps } from \"../helpers\";\nimport { PropertyName } from \"./property-name\";\nimport { TSDoc, TSDocParams } from \"./tsdoc\";\nimport { TypeParameters } from \"./type-parameters\";\n\n/**\n * Props for the ClassDeclaration component, which represents a TypeScript class declaration\n */\nexport interface ClassDeclarationProps extends CommonDeclarationProps {\n /**\n * An indication of whether this class is abstract\n */\n abstract?: boolean;\n\n /**\n * An optional class that this class extends. This will be rendered as an `extends` clause in the class declaration\n */\n extends?: Children;\n\n /**\n * Optional interfaces that this class implements. This will be rendered as an `implements` clause in the class declaration\n */\n implements?: Children[];\n\n /**\n * The generic type parameters of the class.\n */\n typeParameters?: TypeParameterDescriptor[] | string[];\n}\n\n/**\n * Create a TypeScript class declaration.\n *\n * @example\n * ```tsx\n * const myPetRefkey = refkey();\n * const Animal = refkey();\n * const staticMember = refkey();\n * const instanceMember = refkey();\n *\n * <ClassDeclaration name=\"Animal\" refkey={Animal}>\n * <ClassMember public static name=\"something\" type=\"string\" refkey={staticMember}>\n * \"hello\"\n * </ClassMember>\n * <ClassMember public name=\"kind\" type=\"string\" />\n * <ClassMember public name=\"name\" type=\"string\" refkey={instanceMember} />\n * <ClassConstructor parameters=\"name: string\">\n * this.name = name;\n * </ClassConstructor>\n * </ClassDeclaration>\n *\n * <VarDeclaration const name=\"myPet\" refkey={myPetRefkey}>\n * new {Animal}();\n * </VarDeclaration>\n *\n * {staticMember}; // Animal.something\n * <MemberReference path={[myPetRefkey, instanceMember]} /> // myPet.name\n * {memberRefkey(myPetRefkey, instanceMember)}\n * ```\n */\nexport function ClassDeclaration(props: ClassDeclarationProps) {\n const extendsPart = props.extends && <> extends {props.extends}</>;\n const implementsPart = props.implements && props.implements.length > 0 && (\n <>\n {\" \"}\n implements{\" \"}\n <For each={props.implements} comma space>\n {implement => implement}\n </For>\n </>\n );\n const sym = createTypeAndValueSymbol(props.name, {\n refkeys: props.refkey,\n export: props.export,\n default: props.default,\n metadata: props.metadata,\n hasInstanceMembers: true,\n namePolicy: useTSNamePolicy().for(\"class\")\n });\n\n return (\n <>\n <Show when={Boolean(props.doc)}>\n <TSDoc heading={props.doc} />\n </Show>\n <Declaration symbol={sym} export={props.export} default={props.default}>\n <MemberScope ownerSymbol={sym}>\n {props.abstract && code`abstract `} class <Name />\n {props.typeParameters && (\n <TypeParameters parameters={props.typeParameters} />\n )}\n {extendsPart}\n {implementsPart} <Block>{props.children}</Block>\n </MemberScope>\n </Declaration>\n </>\n );\n}\n\nClassDeclaration.TypeParameters = TypeParameters;\n\n/**\n * Generates a TypeScript class member declaration for the given reflection class.\n */\nexport interface ClassMemberProps {\n name: string | Namekey;\n refkey?: Refkey;\n public?: boolean;\n private?: boolean;\n protected?: boolean;\n jsPrivate?: boolean;\n static?: boolean;\n abstract?: boolean;\n children?: Children;\n doc?: Children;\n nullish?: boolean;\n override?: boolean;\n}\n\n/**\n * Generates a TypeScript class member declaration for the given reflection class.\n *\n * @param props - The properties of the class member, including its name, visibility, and other modifiers.\n * @returns A JSX element representing the class member declaration, which can be used within a ClassDeclaration component.\n */\nexport function ClassMember(props: ClassMemberProps) {\n let tsFlags = TSSymbolFlags.None;\n if (props.nullish) {\n tsFlags |= TSSymbolFlags.Nullish;\n }\n\n const sym = createMemberSymbol(props.name, props, {\n refkeys: props.refkey,\n tsFlags,\n namePolicy: useTSNamePolicy().for(\"class-member-data\")\n });\n\n return (\n <>\n <Show when={Boolean(props.doc)}>\n <TSDoc heading={props.doc} />\n </Show>\n <MemberDeclaration symbol={sym}>\n {props.public && \"public \"}\n {props.private && \"private \"}\n {props.protected && \"protected \"}\n {props.abstract && \"abstract \"}\n {props.override && \"override \"}\n {props.static && \"static \"}\n {props.children}\n </MemberDeclaration>\n </>\n );\n}\n\n/**\n * Props for a class field, which is a specific type of class member that represents a property of the class.\n */\nexport interface ClassFieldProps extends ClassMemberProps {\n name: string;\n type?: Children;\n optional?: boolean;\n children?: Children;\n isPrivateMember?: boolean;\n}\n\n/**\n * Generates a TypeScript class field declaration for the given reflection class.\n *\n * @param props - The properties of the class field, including its name, type, optionality, and other modifiers.\n * @returns A JSX element representing the class field declaration, which can be used within a ClassDeclaration component.\n */\nexport function ClassField(props: ClassFieldProps) {\n const optionality = props.optional ? \"?\" : \"\";\n const typeSection = props.type && (\n <>\n {optionality}: <TypeRefContext>{props.type}</TypeRefContext>\n </>\n );\n const initializerSection = props.children && <> = {props.children}</>;\n const nullish = props.nullish ?? props.optional;\n\n return (\n <ClassMember {...props} nullish={nullish}>\n <PropertyName\n private={props.isPrivateMember}\n name={props.isPrivateMember ? props.name : undefined}\n />\n {typeSection}\n {initializerSection}\n </ClassMember>\n );\n}\n\n/**\n * Props for a class field, which is a specific type of class member that represents a property of the class.\n */\nexport interface ClassPropertyProps extends ClassMemberProps {\n name: string;\n type?: Children;\n children?: Children;\n}\n\n/**\n * Generates a TypeScript class property setter declaration for the given reflection class.\n *\n * @param props - The properties of the class property, including its name, type, and other modifiers.\n * @returns A JSX element representing the class property setter declaration, which can be used within a ClassDeclaration component.\n */\nexport function ClassPropertySet(props: ClassPropertyProps) {\n return (\n <>\n <ClassMember {...props}>\n {\"set \"}\n <PropertyName name={props.name} />\n <LexicalScope>\n <CallSignature\n parameters={[\n {\n name: \"value\",\n type: <TypeRefContext>{props.type}</TypeRefContext>\n }\n ]}\n />{\" \"}\n <Block>{props.children}</Block>\n </LexicalScope>\n </ClassMember>\n </>\n );\n}\n\n/**\n * Generates a TypeScript class property getter declaration for the given reflection class.\n *\n * @param props - The properties of the class property, including its name, type, and other modifiers.\n * @returns A JSX element representing the class property getter declaration, which can be used within a ClassDeclaration component.\n */\nexport function ClassPropertyGet(props: ClassPropertyProps) {\n return (\n <ClassMember {...props}>\n {\"get \"}\n <PropertyName name={props.name} />\n <LexicalScope>\n <CallSignature\n returnType={<TypeRefContext>{props.type}</TypeRefContext>}\n />{\" \"}\n <Block>{props.children}</Block>\n </LexicalScope>\n </ClassMember>\n );\n}\n\n/**\n * Props for a class method, which is a specific type of class member that represents a function defined within the class.\n */\nexport interface ClassMethodProps extends ClassMemberProps, CallSignatureProps {\n async?: boolean;\n children?: Children;\n}\n\n/**\n * Generates a TypeScript class method declaration for the given reflection class.\n *\n * @param props - The properties of the class method, including its name, visibility, and other modifiers.\n * @returns A JSX element representing the class method declaration, which can be used within a ClassDeclaration component.\n */\nexport function ClassMethod(props: ClassMethodProps) {\n const callProps = getCallSignatureProps(props);\n const [_, rest] = splitProps(props, [\"doc\"]);\n\n return (\n <>\n <Show when={Boolean(props.doc)}>\n <TSDoc heading={props.doc}>\n {Array.isArray(rest.parameters) && (\n <TSDocParams parameters={rest.parameters} />\n )}\n </TSDoc>\n </Show>\n <ClassMember {...rest}>\n {props.async && \"async \"}\n <PropertyName />\n <LexicalScope>\n <CallSignature {...callProps} /> <Block>{props.children}</Block>\n </LexicalScope>\n </ClassMember>\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+DE,MAAE,cAAA,MAAA,WAAA,CAAA,aAAA,WAAA,MAAA,OAAA,CAAA;CACF,MAAG,iBAAoB,MAAK,cAAW,MAAU,WAAW,SAAI,KAAS;EAAE;EAAK;EAAY;EAAO,gBAAa,KAAA;GAC9G,IAAA,OAAA;IACF,OAAW,MAAE;;GAEX,OAAA;GACA,OAAK;GACL,WAAA,cAAA;EACF,CAAA;CAAA;CACF,MAAA,MAAA,yBAAA,MAAA,MAAA;;EAEE,QAAA,MAAA;EACC,SAAS,MAAA;EACX,UAAA,MAAA;EACG,oBAAA;EACA,YAAE,gBAAA,EAAA,IAAA,OAAA;CACJ,CAAC;CACD,OAAO,CAAA,gBAAiB,MAAA;EACvB,IAAK,OAAC;GACN,OAAM,QAAA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|
2
1
|
import { VarDeclarationProps } from "@alloy-js/typescript";
|
|
3
2
|
|
|
4
3
|
//#region src/typescript/components/dynamic-import-statement.d.ts
|
|
@@ -26,7 +25,7 @@ interface DynamicImportStatementProps extends Omit<VarDeclarationProps, "initial
|
|
|
26
25
|
* @param props - The properties for the dynamic import statement.
|
|
27
26
|
* @returns A `VarDeclaration` component representing the dynamic import statement.
|
|
28
27
|
*/
|
|
29
|
-
declare function DynamicImportStatement(props: DynamicImportStatementProps):
|
|
28
|
+
declare function DynamicImportStatement(props: DynamicImportStatementProps): import("@alloy-js/core").Children;
|
|
30
29
|
//#endregion
|
|
31
30
|
export { DynamicImportStatement, DynamicImportStatementProps };
|
|
32
31
|
//# sourceMappingURL=dynamic-import-statement.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dynamic-import-statement.d.cts","names":[],"sources":["../../../src/typescript/components/dynamic-import-statement.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"dynamic-import-statement.d.cts","names":[],"sources":["../../../src/typescript/components/dynamic-import-statement.tsx"],"mappings":";;;UAqBiB,2BAAA,SAAoC,IAAI,CACvD,mBAAA;;AADF;;EAOE,UAAA;EAPuD;;;;;EAcvD,UAAA;AAAA;AAeF;;;;;;;;AAAyE;;;;AAAzE,iBAAgB,sBAAA,CAAuB,KAAA,EAAO,2BAA2B,4BAAA,QAAA"}
|