@powerlines/plugin-alloy 0.25.32 → 0.25.34
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/README.md +1 -1
- package/dist/core/components/output.cjs +17 -10
- package/dist/core/components/output.mjs +18 -12
- package/dist/core/components/single-line-comment.cjs +6 -4
- package/dist/core/components/single-line-comment.mjs +7 -6
- package/dist/core/components/source-file.cjs +10 -6
- package/dist/core/components/source-file.mjs +11 -8
- package/dist/core/components/spacing.cjs +6 -4
- package/dist/core/components/spacing.mjs +7 -6
- package/dist/core/contexts/context.mjs +1 -2
- package/dist/core/contexts/meta.mjs +1 -2
- package/dist/core/contexts/reflection.mjs +1 -2
- package/dist/core/helpers/code.mjs +1 -2
- package/dist/helpers/capnp.mjs +1 -2
- package/dist/helpers/create-builtin.mjs +1 -2
- package/dist/helpers/refkey.mjs +1 -2
- package/dist/helpers/typescript.mjs +1 -2
- package/dist/index.cjs +8 -18
- package/dist/index.mjs +8 -19
- package/dist/markdown/components/front-matter.cjs +9 -7
- package/dist/markdown/components/front-matter.mjs +10 -9
- package/dist/markdown/components/markdown-file.cjs +76 -44
- package/dist/markdown/components/markdown-file.mjs +77 -46
- package/dist/markdown/components/markdown-table.cjs +49 -28
- package/dist/markdown/components/markdown-table.mjs +50 -30
- package/dist/markdown/contexts/markdown-table.mjs +1 -2
- package/dist/render.cjs +3 -3
- package/dist/render.mjs +4 -5
- package/dist/typescript/components/builtin-file.cjs +29 -19
- package/dist/typescript/components/builtin-file.mjs +30 -21
- package/dist/typescript/components/class-declaration.cjs +165 -100
- package/dist/typescript/components/class-declaration.mjs +166 -102
- package/dist/typescript/components/dynamic-import-statement.cjs +2 -6
- package/dist/typescript/components/dynamic-import-statement.mjs +3 -8
- package/dist/typescript/components/entry-file.cjs +9 -6
- package/dist/typescript/components/entry-file.mjs +10 -8
- package/dist/typescript/components/infrastructure-file.cjs +9 -6
- package/dist/typescript/components/infrastructure-file.mjs +10 -8
- package/dist/typescript/components/interface-declaration.cjs +121 -70
- package/dist/typescript/components/interface-declaration.mjs +122 -72
- package/dist/typescript/components/object-declaration.cjs +76 -44
- package/dist/typescript/components/object-declaration.mjs +77 -46
- package/dist/typescript/components/property-name.cjs +3 -3
- package/dist/typescript/components/property-name.mjs +4 -5
- package/dist/typescript/components/record-expression.mjs +1 -2
- package/dist/typescript/components/tsdoc-reflection.cjs +225 -104
- package/dist/typescript/components/tsdoc-reflection.mjs +226 -106
- package/dist/typescript/components/tsdoc.cjs +255 -160
- package/dist/typescript/components/tsdoc.mjs +256 -162
- package/dist/typescript/components/type-declaration.cjs +20 -15
- package/dist/typescript/components/type-declaration.mjs +21 -17
- package/dist/typescript/components/type-parameters.cjs +55 -29
- package/dist/typescript/components/type-parameters.mjs +56 -31
- package/dist/typescript/components/typescript-file.cjs +146 -80
- package/dist/typescript/components/typescript-file.mjs +148 -83
- package/dist/typescript/contexts/lexical-scope.cjs +5 -3
- package/dist/typescript/contexts/lexical-scope.mjs +6 -5
- package/dist/typescript/contexts/member-scope.cjs +5 -3
- package/dist/typescript/contexts/member-scope.mjs +6 -5
- package/dist/typescript/helpers/get-call-signature-props.mjs +1 -2
- package/dist/typescript/helpers/utilities.mjs +1 -2
- package/dist/yaml/components/yaml-file.cjs +92 -47
- package/dist/yaml/components/yaml-file.mjs +93 -49
- package/package.json +16 -17
- package/dist/core/components/index.d.cts +0 -5
- package/dist/core/components/index.d.mts +0 -5
- package/dist/core/components/output.d.cts +0 -24
- package/dist/core/components/output.d.cts.map +0 -1
- package/dist/core/components/output.d.mts +0 -24
- package/dist/core/components/output.d.mts.map +0 -1
- package/dist/core/components/output.mjs.map +0 -1
- package/dist/core/components/single-line-comment.d.cts +0 -23
- package/dist/core/components/single-line-comment.d.cts.map +0 -1
- package/dist/core/components/single-line-comment.d.mts +0 -23
- package/dist/core/components/single-line-comment.d.mts.map +0 -1
- package/dist/core/components/single-line-comment.mjs.map +0 -1
- package/dist/core/components/source-file.d.cts +0 -33
- package/dist/core/components/source-file.d.cts.map +0 -1
- package/dist/core/components/source-file.d.mts +0 -33
- package/dist/core/components/source-file.d.mts.map +0 -1
- package/dist/core/components/source-file.mjs.map +0 -1
- package/dist/core/components/spacing.d.cts +0 -24
- package/dist/core/components/spacing.d.cts.map +0 -1
- package/dist/core/components/spacing.d.mts +0 -24
- package/dist/core/components/spacing.d.mts.map +0 -1
- package/dist/core/components/spacing.mjs.map +0 -1
- package/dist/core/contexts/context.d.cts +0 -29
- package/dist/core/contexts/context.d.cts.map +0 -1
- package/dist/core/contexts/context.d.mts +0 -29
- package/dist/core/contexts/context.d.mts.map +0 -1
- package/dist/core/contexts/context.mjs.map +0 -1
- package/dist/core/contexts/index.d.cts +0 -4
- package/dist/core/contexts/index.d.mts +0 -4
- package/dist/core/contexts/meta.d.cts +0 -48
- package/dist/core/contexts/meta.d.cts.map +0 -1
- package/dist/core/contexts/meta.d.mts +0 -48
- package/dist/core/contexts/meta.d.mts.map +0 -1
- package/dist/core/contexts/meta.mjs.map +0 -1
- package/dist/core/contexts/reflection.d.cts +0 -53
- package/dist/core/contexts/reflection.d.cts.map +0 -1
- package/dist/core/contexts/reflection.d.mts +0 -53
- package/dist/core/contexts/reflection.d.mts.map +0 -1
- package/dist/core/contexts/reflection.mjs.map +0 -1
- package/dist/core/helpers/code.d.cts +0 -29
- package/dist/core/helpers/code.d.cts.map +0 -1
- package/dist/core/helpers/code.d.mts +0 -29
- package/dist/core/helpers/code.d.mts.map +0 -1
- package/dist/core/helpers/code.mjs.map +0 -1
- package/dist/core/helpers/index.d.cts +0 -2
- package/dist/core/helpers/index.d.mts +0 -2
- package/dist/core/index.d.cts +0 -9
- package/dist/core/index.d.mts +0 -9
- package/dist/helpers/capnp.d.cts +0 -87
- package/dist/helpers/capnp.d.cts.map +0 -1
- package/dist/helpers/capnp.d.mts +0 -87
- package/dist/helpers/capnp.d.mts.map +0 -1
- package/dist/helpers/capnp.mjs.map +0 -1
- package/dist/helpers/create-builtin.d.cts +0 -16
- package/dist/helpers/create-builtin.d.cts.map +0 -1
- package/dist/helpers/create-builtin.d.mts +0 -16
- package/dist/helpers/create-builtin.d.mts.map +0 -1
- package/dist/helpers/create-builtin.mjs.map +0 -1
- package/dist/helpers/index.d.cts +0 -5
- package/dist/helpers/index.d.mts +0 -5
- package/dist/helpers/refkey.d.cts +0 -13
- package/dist/helpers/refkey.d.cts.map +0 -1
- package/dist/helpers/refkey.d.mts +0 -13
- package/dist/helpers/refkey.d.mts.map +0 -1
- package/dist/helpers/refkey.mjs.map +0 -1
- package/dist/helpers/typescript.d.cts +0 -26
- package/dist/helpers/typescript.d.cts.map +0 -1
- package/dist/helpers/typescript.d.mts +0 -26
- package/dist/helpers/typescript.d.mts.map +0 -1
- package/dist/helpers/typescript.mjs.map +0 -1
- package/dist/index.d.cts +0 -19
- package/dist/index.d.cts.map +0 -1
- package/dist/index.d.mts +0 -19
- package/dist/index.d.mts.map +0 -1
- package/dist/index.mjs.map +0 -1
- package/dist/markdown/components/front-matter.d.cts +0 -16
- package/dist/markdown/components/front-matter.d.cts.map +0 -1
- package/dist/markdown/components/front-matter.d.mts +0 -16
- package/dist/markdown/components/front-matter.d.mts.map +0 -1
- package/dist/markdown/components/front-matter.mjs.map +0 -1
- package/dist/markdown/components/index.d.cts +0 -4
- package/dist/markdown/components/index.d.mts +0 -4
- package/dist/markdown/components/markdown-file.d.cts +0 -29
- package/dist/markdown/components/markdown-file.d.cts.map +0 -1
- package/dist/markdown/components/markdown-file.d.mts +0 -29
- package/dist/markdown/components/markdown-file.d.mts.map +0 -1
- package/dist/markdown/components/markdown-file.mjs.map +0 -1
- package/dist/markdown/components/markdown-table.d.cts +0 -28
- package/dist/markdown/components/markdown-table.d.cts.map +0 -1
- package/dist/markdown/components/markdown-table.d.mts +0 -28
- package/dist/markdown/components/markdown-table.d.mts.map +0 -1
- package/dist/markdown/components/markdown-table.mjs.map +0 -1
- package/dist/markdown/contexts/index.d.cts +0 -2
- package/dist/markdown/contexts/index.d.mts +0 -2
- package/dist/markdown/contexts/markdown-table.d.cts +0 -38
- package/dist/markdown/contexts/markdown-table.d.cts.map +0 -1
- package/dist/markdown/contexts/markdown-table.d.mts +0 -38
- package/dist/markdown/contexts/markdown-table.d.mts.map +0 -1
- package/dist/markdown/contexts/markdown-table.mjs.map +0 -1
- package/dist/markdown/index.d.cts +0 -5
- package/dist/markdown/index.d.mts +0 -5
- package/dist/render.d.cts +0 -38
- package/dist/render.d.cts.map +0 -1
- package/dist/render.d.mts +0 -38
- package/dist/render.d.mts.map +0 -1
- package/dist/render.mjs.map +0 -1
- package/dist/types/components.d.cts +0 -142
- package/dist/types/components.d.cts.map +0 -1
- package/dist/types/components.d.mts +0 -142
- package/dist/types/components.d.mts.map +0 -1
- package/dist/types/index.d.cts +0 -3
- package/dist/types/index.d.mts +0 -3
- package/dist/types/plugin.d.cts +0 -39
- package/dist/types/plugin.d.cts.map +0 -1
- package/dist/types/plugin.d.mts +0 -39
- package/dist/types/plugin.d.mts.map +0 -1
- package/dist/typescript/components/builtin-file.d.cts +0 -35
- package/dist/typescript/components/builtin-file.d.cts.map +0 -1
- package/dist/typescript/components/builtin-file.d.mts +0 -35
- package/dist/typescript/components/builtin-file.d.mts.map +0 -1
- package/dist/typescript/components/builtin-file.mjs.map +0 -1
- package/dist/typescript/components/class-declaration.d.cts +0 -145
- package/dist/typescript/components/class-declaration.d.cts.map +0 -1
- package/dist/typescript/components/class-declaration.d.mts +0 -145
- package/dist/typescript/components/class-declaration.d.mts.map +0 -1
- package/dist/typescript/components/class-declaration.mjs.map +0 -1
- package/dist/typescript/components/dynamic-import-statement.d.cts +0 -33
- package/dist/typescript/components/dynamic-import-statement.d.cts.map +0 -1
- package/dist/typescript/components/dynamic-import-statement.d.mts +0 -33
- package/dist/typescript/components/dynamic-import-statement.d.mts.map +0 -1
- package/dist/typescript/components/dynamic-import-statement.mjs.map +0 -1
- package/dist/typescript/components/entry-file.d.cts +0 -28
- package/dist/typescript/components/entry-file.d.cts.map +0 -1
- package/dist/typescript/components/entry-file.d.mts +0 -28
- package/dist/typescript/components/entry-file.d.mts.map +0 -1
- package/dist/typescript/components/entry-file.mjs.map +0 -1
- package/dist/typescript/components/index.d.cts +0 -15
- package/dist/typescript/components/index.d.mts +0 -15
- package/dist/typescript/components/infrastructure-file.d.cts +0 -21
- package/dist/typescript/components/infrastructure-file.d.cts.map +0 -1
- package/dist/typescript/components/infrastructure-file.d.mts +0 -21
- package/dist/typescript/components/infrastructure-file.d.mts.map +0 -1
- package/dist/typescript/components/infrastructure-file.mjs.map +0 -1
- package/dist/typescript/components/interface-declaration.d.cts +0 -86
- package/dist/typescript/components/interface-declaration.d.cts.map +0 -1
- package/dist/typescript/components/interface-declaration.d.mts +0 -86
- package/dist/typescript/components/interface-declaration.d.mts.map +0 -1
- package/dist/typescript/components/interface-declaration.mjs.map +0 -1
- package/dist/typescript/components/object-declaration.d.cts +0 -30
- package/dist/typescript/components/object-declaration.d.cts.map +0 -1
- package/dist/typescript/components/object-declaration.d.mts +0 -30
- package/dist/typescript/components/object-declaration.d.mts.map +0 -1
- package/dist/typescript/components/object-declaration.mjs.map +0 -1
- package/dist/typescript/components/property-name.d.cts +0 -24
- package/dist/typescript/components/property-name.d.cts.map +0 -1
- package/dist/typescript/components/property-name.d.mts +0 -24
- package/dist/typescript/components/property-name.d.mts.map +0 -1
- package/dist/typescript/components/property-name.mjs.map +0 -1
- package/dist/typescript/components/record-expression.d.cts +0 -13
- package/dist/typescript/components/record-expression.d.cts.map +0 -1
- package/dist/typescript/components/record-expression.d.mts +0 -13
- package/dist/typescript/components/record-expression.d.mts.map +0 -1
- package/dist/typescript/components/record-expression.mjs.map +0 -1
- package/dist/typescript/components/tsdoc-reflection.d.cts +0 -44
- package/dist/typescript/components/tsdoc-reflection.d.cts.map +0 -1
- package/dist/typescript/components/tsdoc-reflection.d.mts +0 -44
- package/dist/typescript/components/tsdoc-reflection.d.mts.map +0 -1
- package/dist/typescript/components/tsdoc-reflection.mjs.map +0 -1
- package/dist/typescript/components/tsdoc.d.cts +0 -164
- package/dist/typescript/components/tsdoc.d.cts.map +0 -1
- package/dist/typescript/components/tsdoc.d.mts +0 -164
- package/dist/typescript/components/tsdoc.d.mts.map +0 -1
- package/dist/typescript/components/tsdoc.mjs.map +0 -1
- package/dist/typescript/components/type-declaration.d.cts +0 -18
- package/dist/typescript/components/type-declaration.d.cts.map +0 -1
- package/dist/typescript/components/type-declaration.d.mts +0 -18
- package/dist/typescript/components/type-declaration.d.mts.map +0 -1
- package/dist/typescript/components/type-declaration.mjs.map +0 -1
- package/dist/typescript/components/type-parameters.d.cts +0 -24
- package/dist/typescript/components/type-parameters.d.cts.map +0 -1
- package/dist/typescript/components/type-parameters.d.mts +0 -24
- package/dist/typescript/components/type-parameters.d.mts.map +0 -1
- package/dist/typescript/components/type-parameters.mjs.map +0 -1
- package/dist/typescript/components/typescript-file.d.cts +0 -50
- package/dist/typescript/components/typescript-file.d.cts.map +0 -1
- package/dist/typescript/components/typescript-file.d.mts +0 -50
- package/dist/typescript/components/typescript-file.d.mts.map +0 -1
- package/dist/typescript/components/typescript-file.mjs.map +0 -1
- package/dist/typescript/contexts/index.d.cts +0 -2
- package/dist/typescript/contexts/index.d.mts +0 -2
- package/dist/typescript/contexts/lexical-scope.d.cts +0 -17
- package/dist/typescript/contexts/lexical-scope.d.cts.map +0 -1
- package/dist/typescript/contexts/lexical-scope.d.mts +0 -17
- package/dist/typescript/contexts/lexical-scope.d.mts.map +0 -1
- package/dist/typescript/contexts/lexical-scope.mjs.map +0 -1
- package/dist/typescript/contexts/member-scope.d.cts +0 -20
- package/dist/typescript/contexts/member-scope.d.cts.map +0 -1
- package/dist/typescript/contexts/member-scope.d.mts +0 -20
- package/dist/typescript/contexts/member-scope.d.mts.map +0 -1
- package/dist/typescript/contexts/member-scope.mjs.map +0 -1
- package/dist/typescript/helpers/get-call-signature-props.d.cts +0 -14
- package/dist/typescript/helpers/get-call-signature-props.d.cts.map +0 -1
- package/dist/typescript/helpers/get-call-signature-props.d.mts +0 -14
- package/dist/typescript/helpers/get-call-signature-props.d.mts.map +0 -1
- package/dist/typescript/helpers/get-call-signature-props.mjs.map +0 -1
- package/dist/typescript/helpers/index.d.cts +0 -3
- package/dist/typescript/helpers/index.d.mts +0 -3
- package/dist/typescript/helpers/utilities.d.cts +0 -11
- package/dist/typescript/helpers/utilities.d.cts.map +0 -1
- package/dist/typescript/helpers/utilities.d.mts +0 -11
- package/dist/typescript/helpers/utilities.d.mts.map +0 -1
- package/dist/typescript/helpers/utilities.mjs.map +0 -1
- package/dist/typescript/index.d.cts +0 -18
- package/dist/typescript/index.d.mts +0 -18
- package/dist/yaml/components/index.d.cts +0 -2
- package/dist/yaml/components/index.d.mts +0 -2
- package/dist/yaml/components/yaml-file.d.cts +0 -34
- package/dist/yaml/components/yaml-file.d.cts.map +0 -1
- package/dist/yaml/components/yaml-file.d.mts +0 -34
- package/dist/yaml/components/yaml-file.d.mts.map +0 -1
- package/dist/yaml/components/yaml-file.mjs.map +0 -1
- package/dist/yaml/index.d.cts +0 -2
- package/dist/yaml/index.d.mts +0 -2
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { SymbolCreator } from "@alloy-js/core";
|
|
2
|
-
import { CreatePackageProps, PackageDescriptor, PackageRefkeys } from "@alloy-js/typescript";
|
|
3
|
-
|
|
4
|
-
//#region src/helpers/create-builtin.d.ts
|
|
5
|
-
type CreateBuiltinOptions<T extends PackageDescriptor> = Omit<CreatePackageProps<T>, "builtin">;
|
|
6
|
-
/**
|
|
7
|
-
* Creates a built-in representation of a package based on the provided descriptor.
|
|
8
|
-
*
|
|
9
|
-
* @param options - Properties to define the package, excluding the 'builtin' flag which is set to true.
|
|
10
|
-
* @returns An object containing reference keys for the package and a symbol creator function.
|
|
11
|
-
*/
|
|
12
|
-
declare function createBuiltin<const T extends PackageDescriptor>(options: CreateBuiltinOptions<T>): PackageRefkeys<T> & SymbolCreator;
|
|
13
|
-
declare type __ΩCreateBuiltinOptions = any[];
|
|
14
|
-
//#endregion
|
|
15
|
-
export { CreateBuiltinOptions, __ΩCreateBuiltinOptions, createBuiltin };
|
|
16
|
-
//# sourceMappingURL=create-builtin.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-builtin.d.cts","names":[],"sources":["../../src/helpers/create-builtin.ts"],"mappings":";;;;KA0BY,oBAAA,WAA+B,iBAAA,IAAqB,IAAA,CAC9D,kBAAA,CAAmB,CAAA;;AADrB;;;;;iBAWgB,aAAA,iBAA8B,iBAAA,CAAA,CAC5C,OAAA,EAAS,oBAAA,CAAqB,CAAA,IAC7B,cAAA,CAAe,CAAA,IAAK,aAAA;AAAA"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { SymbolCreator } from "@alloy-js/core";
|
|
2
|
-
import { CreatePackageProps, PackageDescriptor, PackageRefkeys } from "@alloy-js/typescript";
|
|
3
|
-
|
|
4
|
-
//#region src/helpers/create-builtin.d.ts
|
|
5
|
-
type CreateBuiltinOptions<T extends PackageDescriptor> = Omit<CreatePackageProps<T>, "builtin">;
|
|
6
|
-
/**
|
|
7
|
-
* Creates a built-in representation of a package based on the provided descriptor.
|
|
8
|
-
*
|
|
9
|
-
* @param options - Properties to define the package, excluding the 'builtin' flag which is set to true.
|
|
10
|
-
* @returns An object containing reference keys for the package and a symbol creator function.
|
|
11
|
-
*/
|
|
12
|
-
declare function createBuiltin<const T extends PackageDescriptor>(options: CreateBuiltinOptions<T>): PackageRefkeys<T> & SymbolCreator;
|
|
13
|
-
declare type __ΩCreateBuiltinOptions = any[];
|
|
14
|
-
//#endregion
|
|
15
|
-
export { CreateBuiltinOptions, __ΩCreateBuiltinOptions, createBuiltin };
|
|
16
|
-
//# sourceMappingURL=create-builtin.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-builtin.d.mts","names":[],"sources":["../../src/helpers/create-builtin.ts"],"mappings":";;;;KA0BY,oBAAA,WAA+B,iBAAA,IAAqB,IAAA,CAC9D,kBAAA,CAAmB,CAAA;;AADrB;;;;;iBAWgB,aAAA,iBAA8B,iBAAA,CAAA,CAC5C,OAAA,EAAS,oBAAA,CAAqB,CAAA,IAC7B,cAAA,CAAe,CAAA,IAAK,aAAA;AAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-builtin.mjs","names":[],"sources":["../../src/helpers/create-builtin.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 { SymbolCreator } from \"@alloy-js/core\";\nimport {\n createPackage,\n CreatePackageProps,\n PackageDescriptor,\n PackageRefkeys\n} from \"@alloy-js/typescript\";\n\nexport type CreateBuiltinOptions<T extends PackageDescriptor> = Omit<\n CreatePackageProps<T>,\n \"builtin\"\n>;\n\n/**\n * Creates a built-in representation of a package based on the provided descriptor.\n *\n * @param options - Properties to define the package, excluding the 'builtin' flag which is set to true.\n * @returns An object containing reference keys for the package and a symbol creator function.\n */\nexport function createBuiltin<const T extends PackageDescriptor>(\n options: CreateBuiltinOptions<T>\n): PackageRefkeys<T> & SymbolCreator {\n // const refkeys: any = {\n // [getSymbolCreatorSymbol()](binder: Binder) {\n // createSymbols(binder, props, refkeys);\n // }\n // };\n\n // for (const [path, symbols] of Object.entries(props.descriptor)) {\n // const keys = path === \".\" ? refkeys : (refkeys[path] = {});\n\n // if (symbols.default) {\n // keys.default = refkey(props.descriptor, path, \"default\");\n // }\n\n // for (const named of symbols.named ?? []) {\n // const namedObj = typeof named === \"string\" ? { name: named } : named;\n // keys[namedObj.name] = refkey();\n\n // if (namedObj.staticMembers?.length) {\n // createRefkeysForMembers(\n // namedObj.staticMembers,\n // keys[namedObj.name],\n // \"static\"\n // );\n // }\n\n // if (namedObj.instanceMembers?.length) {\n // createRefkeysForMembers(\n // namedObj.instanceMembers,\n // keys[namedObj.name],\n // \"instance\"\n // );\n // }\n\n // keys[namedObj.name][getSymbolCreatorSymbol()] = (\n // binder: Binder,\n // parentSym: TSOutputSymbol\n // ) => {\n // if (namedObj.staticMembers?.length) {\n // assignMembers(\n // binder,\n // parentSym,\n // namedObj.staticMembers,\n // keys[namedObj.name],\n // true\n // );\n // }\n // if (namedObj.instanceMembers?.length) {\n // assignMembers(\n // binder,\n // parentSym,\n // namedObj.instanceMembers,\n // keys[namedObj.name],\n // false\n // );\n // }\n // };\n // }\n // }\n\n // return refkeys;\n\n return createPackage({ ...options, builtin: true });\n}\n"],"mappings":";;;;;;;;;AAqCA,SAAgB,cACd,SACmC;AA8DnC,QAAO,cAAc;EAAE,GAAG;EAAS,SAAS;EAAM,CAAC"}
|
package/dist/helpers/index.d.cts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { GenerateCapnpOptions, GenerateCapnpStructOptions, IOType, LARGE_BUFFER, StdioOptions, __ΩGenerateCapnpOptions, __ΩGenerateCapnpStructOptions, __ΩIOType, __ΩStdioOptions, compile, generateCapnp, generateCapnpEnumSchema, generateCapnpId, generateCapnpInterface, generateCapnpMethodSchema, generateCapnpPrimitive, generateCapnpSchema, generateCapnpStruct, getCapnpEnumTypes, getCapnpUnionTypes, isCapnpStringUnion, isVoidType, stringifyCapnpDefaultValue, stringifyCapnpValue } from "./capnp.cjs";
|
|
2
|
-
import { CreateBuiltinOptions, __ΩCreateBuiltinOptions, createBuiltin } from "./create-builtin.cjs";
|
|
3
|
-
import { refkey } from "./refkey.cjs";
|
|
4
|
-
import { GenerateInterfaceDeclarationOptions, GenerateObjectDeclarationOptions, __ΩGenerateInterfaceDeclarationOptions, __ΩGenerateObjectDeclarationOptions, generateObjectDeclaration } from "./typescript.cjs";
|
|
5
|
-
export { CreateBuiltinOptions, GenerateCapnpOptions, GenerateCapnpStructOptions, GenerateInterfaceDeclarationOptions, GenerateObjectDeclarationOptions, IOType, LARGE_BUFFER, StdioOptions, __ΩCreateBuiltinOptions, __ΩGenerateCapnpOptions, __ΩGenerateCapnpStructOptions, __ΩGenerateInterfaceDeclarationOptions, __ΩGenerateObjectDeclarationOptions, __ΩIOType, __ΩStdioOptions, compile, createBuiltin, generateCapnp, generateCapnpEnumSchema, generateCapnpId, generateCapnpInterface, generateCapnpMethodSchema, generateCapnpPrimitive, generateCapnpSchema, generateCapnpStruct, generateObjectDeclaration, getCapnpEnumTypes, getCapnpUnionTypes, isCapnpStringUnion, isVoidType, refkey, stringifyCapnpDefaultValue, stringifyCapnpValue };
|
package/dist/helpers/index.d.mts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { GenerateCapnpOptions, GenerateCapnpStructOptions, IOType, LARGE_BUFFER, StdioOptions, __ΩGenerateCapnpOptions, __ΩGenerateCapnpStructOptions, __ΩIOType, __ΩStdioOptions, compile, generateCapnp, generateCapnpEnumSchema, generateCapnpId, generateCapnpInterface, generateCapnpMethodSchema, generateCapnpPrimitive, generateCapnpSchema, generateCapnpStruct, getCapnpEnumTypes, getCapnpUnionTypes, isCapnpStringUnion, isVoidType, stringifyCapnpDefaultValue, stringifyCapnpValue } from "./capnp.mjs";
|
|
2
|
-
import { CreateBuiltinOptions, __ΩCreateBuiltinOptions, createBuiltin } from "./create-builtin.mjs";
|
|
3
|
-
import { refkey } from "./refkey.mjs";
|
|
4
|
-
import { GenerateInterfaceDeclarationOptions, GenerateObjectDeclarationOptions, __ΩGenerateInterfaceDeclarationOptions, __ΩGenerateObjectDeclarationOptions, generateObjectDeclaration } from "./typescript.mjs";
|
|
5
|
-
export { CreateBuiltinOptions, GenerateCapnpOptions, GenerateCapnpStructOptions, GenerateInterfaceDeclarationOptions, GenerateObjectDeclarationOptions, IOType, LARGE_BUFFER, StdioOptions, __ΩCreateBuiltinOptions, __ΩGenerateCapnpOptions, __ΩGenerateCapnpStructOptions, __ΩGenerateInterfaceDeclarationOptions, __ΩGenerateObjectDeclarationOptions, __ΩIOType, __ΩStdioOptions, compile, createBuiltin, generateCapnp, generateCapnpEnumSchema, generateCapnpId, generateCapnpInterface, generateCapnpMethodSchema, generateCapnpPrimitive, generateCapnpSchema, generateCapnpStruct, generateObjectDeclaration, getCapnpEnumTypes, getCapnpUnionTypes, isCapnpStringUnion, isVoidType, refkey, stringifyCapnpDefaultValue, stringifyCapnpValue };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Refkey } from "@alloy-js/core";
|
|
2
|
-
|
|
3
|
-
//#region src/helpers/refkey.d.ts
|
|
4
|
-
/**
|
|
5
|
-
* Create a refkey for the provided arguments. Passing no arguments returns a fresh refkey that is guaranteed to be unique. Otherwise, the arguments passed will be used to create a refkey for those values. Providing the same arguments will always return the same refkey.
|
|
6
|
-
*
|
|
7
|
-
* @remarks
|
|
8
|
-
* Values are compared using the SameValueZero algorithm, which considers objects the same if they are reference identical, and primitives the same if they are the same value, with the exception of `NaN`, which is always considered equal to other `NaN` values, and `-0`, which is considered identical to `+0`
|
|
9
|
-
*/
|
|
10
|
-
declare function refkey(...args: unknown[]): Refkey;
|
|
11
|
-
//#endregion
|
|
12
|
-
export { refkey };
|
|
13
|
-
//# sourceMappingURL=refkey.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"refkey.d.cts","names":[],"sources":["../../src/helpers/refkey.ts"],"mappings":";;;;;AA0BA;;;;iBAAgB,MAAA,CAAA,GAAU,IAAA,cAAkB,MAAA"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Refkey } from "@alloy-js/core";
|
|
2
|
-
|
|
3
|
-
//#region src/helpers/refkey.d.ts
|
|
4
|
-
/**
|
|
5
|
-
* Create a refkey for the provided arguments. Passing no arguments returns a fresh refkey that is guaranteed to be unique. Otherwise, the arguments passed will be used to create a refkey for those values. Providing the same arguments will always return the same refkey.
|
|
6
|
-
*
|
|
7
|
-
* @remarks
|
|
8
|
-
* Values are compared using the SameValueZero algorithm, which considers objects the same if they are reference identical, and primitives the same if they are the same value, with the exception of `NaN`, which is always considered equal to other `NaN` values, and `-0`, which is considered identical to `+0`
|
|
9
|
-
*/
|
|
10
|
-
declare function refkey(...args: unknown[]): Refkey;
|
|
11
|
-
//#endregion
|
|
12
|
-
export { refkey };
|
|
13
|
-
//# sourceMappingURL=refkey.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"refkey.d.mts","names":[],"sources":["../../src/helpers/refkey.ts"],"mappings":";;;;;AA0BA;;;;iBAAgB,MAAA,CAAA,GAAU,IAAA,cAAkB,MAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"refkey.mjs","names":["refkeyExternal"],"sources":["../../src/helpers/refkey.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 { Refkey, refkey as refkeyExternal } from \"@alloy-js/core\";\n\n/**\n * Create a refkey for the provided arguments. Passing no arguments returns a fresh refkey that is guaranteed to be unique. Otherwise, the arguments passed will be used to create a refkey for those values. Providing the same arguments will always return the same refkey.\n *\n * @remarks\n * Values are compared using the SameValueZero algorithm, which considers objects the same if they are reference identical, and primitives the same if they are the same value, with the exception of `NaN`, which is always considered equal to other `NaN` values, and `-0`, which is considered identical to `+0`\n */\nexport function refkey(...args: unknown[]): Refkey {\n return refkeyExternal(\"powerlines\", ...args);\n}\n"],"mappings":";;;;;;;;;AA0BA,SAAgB,OAAO,GAAG,MAAyB;AACjD,QAAOA,SAAe,cAAc,GAAG,KAAK"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { ReflectionClass } from "@powerlines/deepkit/vendor/type";
|
|
2
|
-
|
|
3
|
-
//#region src/helpers/typescript.d.ts
|
|
4
|
-
interface GenerateInterfaceDeclarationOptions<T> {
|
|
5
|
-
overrideName?: string;
|
|
6
|
-
overrideExtends?: string | false;
|
|
7
|
-
defaultValues?: Partial<T>;
|
|
8
|
-
}
|
|
9
|
-
interface GenerateObjectDeclarationOptions<T> {
|
|
10
|
-
overrideName?: string;
|
|
11
|
-
overrideExtends?: string | false;
|
|
12
|
-
defaultValues?: Partial<T>;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Generates a TypeScript object for the given reflection class.
|
|
16
|
-
*
|
|
17
|
-
* @param reflection - The reflection class to generate the object for.
|
|
18
|
-
* @param options - Options for generating the object.
|
|
19
|
-
* @returns A string containing the TypeScript object definition.
|
|
20
|
-
*/
|
|
21
|
-
declare function generateObjectDeclaration<T extends Record<string, any>>(reflection: ReflectionClass<T>, options?: GenerateObjectDeclarationOptions<T>): string;
|
|
22
|
-
declare type __ΩGenerateInterfaceDeclarationOptions = any[];
|
|
23
|
-
declare type __ΩGenerateObjectDeclarationOptions = any[];
|
|
24
|
-
//#endregion
|
|
25
|
-
export { GenerateInterfaceDeclarationOptions, GenerateObjectDeclarationOptions, __ΩGenerateInterfaceDeclarationOptions, __ΩGenerateObjectDeclarationOptions, generateObjectDeclaration };
|
|
26
|
-
//# sourceMappingURL=typescript.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"typescript.d.cts","names":[],"sources":["../../src/helpers/typescript.ts"],"mappings":";;;UAwBiB,mCAAA;EACf,YAAA;EACA,eAAA;EACA,aAAA,GAAgB,OAAA,CAAQ,CAAA;AAAA;AAAA,UAqJT,gCAAA;EACf,YAAA;EACA,eAAA;EACA,aAAA,GAAgB,OAAA,CAAQ,CAAA;AAAA;;;;;AAH1B;;;iBAagB,yBAAA,WAAoC,MAAA,cAAA,CAClD,UAAA,EAAY,eAAA,CAAgB,CAAA,GAC5B,OAAA,GAAS,gCAAA,CAAiC,CAAA;AAAA"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { ReflectionClass } from "@powerlines/deepkit/vendor/type";
|
|
2
|
-
|
|
3
|
-
//#region src/helpers/typescript.d.ts
|
|
4
|
-
interface GenerateInterfaceDeclarationOptions<T> {
|
|
5
|
-
overrideName?: string;
|
|
6
|
-
overrideExtends?: string | false;
|
|
7
|
-
defaultValues?: Partial<T>;
|
|
8
|
-
}
|
|
9
|
-
interface GenerateObjectDeclarationOptions<T> {
|
|
10
|
-
overrideName?: string;
|
|
11
|
-
overrideExtends?: string | false;
|
|
12
|
-
defaultValues?: Partial<T>;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Generates a TypeScript object for the given reflection class.
|
|
16
|
-
*
|
|
17
|
-
* @param reflection - The reflection class to generate the object for.
|
|
18
|
-
* @param options - Options for generating the object.
|
|
19
|
-
* @returns A string containing the TypeScript object definition.
|
|
20
|
-
*/
|
|
21
|
-
declare function generateObjectDeclaration<T extends Record<string, any>>(reflection: ReflectionClass<T>, options?: GenerateObjectDeclarationOptions<T>): string;
|
|
22
|
-
declare type __ΩGenerateInterfaceDeclarationOptions = any[];
|
|
23
|
-
declare type __ΩGenerateObjectDeclarationOptions = any[];
|
|
24
|
-
//#endregion
|
|
25
|
-
export { GenerateInterfaceDeclarationOptions, GenerateObjectDeclarationOptions, __ΩGenerateInterfaceDeclarationOptions, __ΩGenerateObjectDeclarationOptions, generateObjectDeclaration };
|
|
26
|
-
//# sourceMappingURL=typescript.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"typescript.d.mts","names":[],"sources":["../../src/helpers/typescript.ts"],"mappings":";;;UAwBiB,mCAAA;EACf,YAAA;EACA,eAAA;EACA,aAAA,GAAgB,OAAA,CAAQ,CAAA;AAAA;AAAA,UAqJT,gCAAA;EACf,YAAA;EACA,eAAA;EACA,aAAA,GAAgB,OAAA,CAAQ,CAAA;AAAA;;;;;AAH1B;;;iBAagB,yBAAA,WAAoC,MAAA,cAAA,CAClD,UAAA,EAAY,eAAA,CAAgB,CAAA,GAC5B,OAAA,GAAS,gCAAA,CAAiC,CAAA;AAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"typescript.mjs","names":[],"sources":["../../src/helpers/typescript.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 { stringifyValue } from \"@powerlines/deepkit/utilities\";\nimport type { ReflectionClass } from \"@powerlines/deepkit/vendor/type\";\nimport { camelCase } from \"@stryke/string-format/camel-case\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport { isUndefined } from \"@stryke/type-checks/is-undefined\";\n\nexport interface GenerateInterfaceDeclarationOptions<T> {\n overrideName?: string;\n overrideExtends?: string | false;\n defaultValues?: Partial<T>;\n}\n\n// /**\n// * Generates a TypeScript interface for the given reflection class.\n// *\n// * @param reflection - The reflection class to generate the interface for.\n// * @returns A string containing the TypeScript interface definition.\n// */\n// export function InterfaceDeclaration<T>(\n// reflection: ReflectionClass<T>,\n// options: GenerateInterfaceDeclarationOptions<T> = {}\n// ): string {\n// if (!reflection) {\n// return \"\";\n// }\n\n// return `\n// /**\n// * Interface for ${reflection.getTitle() || titleCase(options.overrideName || reflection.getName())}.\n// *\n// * @title ${reflection.getTitle() || titleCase(reflection.getName())}${\n// reflection.getAlias().length\n// ? ` ${reflection\n// .getAlias()\n// .map(alias => ` * @alias ${alias}`)\n// .join(\"\\n\")}`\n// : \"\"\n// }${reflection.getDomain() ? ` * @domain ${reflection.getDomain()}` : \"\"}${\n// reflection.getPermission().length\n// ? `\n// ${reflection\n// .getPermission()\n// .map(permission => ` * @permission ${permission}`)\n// .join(\"\\n\")}`\n// : \"\"\n// }${\n// reflection.isInternal()\n// ? `\n// * @internal`\n// : \"\"\n// }${\n// reflection.isReadonly()\n// ? `\n// * @readonly`\n// : \"\"\n// }${\n// reflection.isIgnored()\n// ? `\n// * @ignored`\n// : \"\"\n// }${\n// reflection.isHidden()\n// ? `\n// * @hidden`\n// : \"\"\n// }\n// */\n// export interface ${pascalCase(options.overrideName || reflection.getName())}${\n// options.overrideExtends !== false &&\n// (options.overrideExtends || reflection.getSuperReflectionClass()?.getName())\n// ? ` extends ${options.overrideExtends || reflection.getSuperReflectionClass()?.getName()}`\n// : \"\"\n// } {\n// ${reflection\n// .getProperties()\n// .filter(item => !item.isIgnored())\n// .sort((a, b) =>\n// (a.isReadonly() && b.isReadonly()) || (!a.isReadonly() && !b.isReadonly())\n// ? a.getNameAsString().localeCompare(b.getNameAsString())\n// : a.isReadonly()\n// ? 1\n// : -1\n// )\n// .map(\n// item =>\n// ` /**\n// * ${\n// item.getDescription() ||\n// item.getTitle() ||\n// titleCase(item.getNameAsString())\n// }\n// *\n// * @title ${item.getTitle() || titleCase(item.getNameAsString())}${\n// item.getAlias().length\n// ? `\n// ${item\n// .getAlias()\n// .map(alias => ` * @alias ${alias}`)\n// .join(\"\\n\")}`\n// : \"\"\n// }${\n// item.getDomain()\n// ? `\n// * @domain ${item.getDomain()}`\n// : \"\"\n// }${\n// item.getPermission().length\n// ? `\n// ${item\n// .getPermission()\n// .map(permission => ` * @permission ${permission}`)\n// .join(\"\\n\")}`\n// : \"\"\n// }${\n// !isUndefined(item.getDefaultValue()) && item.getDefaultValue() !== \"\"\n// ? `\n// * @defaultValue ${item.getDefaultValue()}`\n// : \"\"\n// }${\n// item.isInternal()\n// ? `\n// * @internal`\n// : \"\"\n// }${\n// item.isReadonly()\n// ? `\n// * @readonly`\n// : \"\"\n// }${\n// item.isHidden()\n// ? `\n// * @hidden`\n// : \"\"\n// }\n// */\n// ${item.isReadonly() ? \"readonly \" : \"\"}${item.getNameAsString()}${\n// isUndefined(\n// (options.defaultValues as Record<string, any>)?.[item.getNameAsString()]\n// ) &&\n// isUndefined(item.getDefaultValue()) &&\n// !item\n// .getAlias()\n// .some(\n// alias =>\n// !isUndefined(\n// (options.defaultValues as Record<string, any>)?.[alias]\n// )\n// ) &&\n// item.isOptional()\n// ? \"?\"\n// : \"\"\n// }: ${stringifyType(item.getType())}`\n// )\n// .join(\", \\n\")}\n// }\n// `;\n// }\n\nexport interface GenerateObjectDeclarationOptions<T> {\n overrideName?: string;\n overrideExtends?: string | false;\n defaultValues?: Partial<T>;\n}\n\n/**\n * Generates a TypeScript object for the given reflection class.\n *\n * @param reflection - The reflection class to generate the object for.\n * @param options - Options for generating the object.\n * @returns A string containing the TypeScript object definition.\n */\nexport function generateObjectDeclaration<T extends Record<string, any>>(\n reflection: ReflectionClass<T>,\n options: GenerateObjectDeclarationOptions<T> = {}\n) {\n if (!reflection) {\n return \"\";\n }\n\n return `\n/**\n * ${\n reflection.getDescription() ||\n `${titleCase(options.overrideName || reflection.getClassName() || reflection.getName())} object instance`\n }.\n */\nexport const ${camelCase(options.overrideName || reflection.getName())}${\n options.overrideExtends !== false &&\n (options.overrideExtends || reflection.getSuperReflectionClass()?.getName())\n ? `: ${options.overrideExtends || reflection.getSuperReflectionClass()?.getName()}`\n : \"\"\n } = {\n ${reflection\n .getProperties()\n .filter(\n item =>\n !item.isIgnored() &&\n !isUndefined(\n options.defaultValues?.[item.getNameAsString()] ??\n item.getAlias().reduce((ret, alias) => {\n if (\n isUndefined(ret) &&\n !isUndefined(\n (options.defaultValues as Record<string, any>)?.[alias]\n )\n ) {\n return (options.defaultValues as Record<string, any>)?.[alias];\n }\n\n return ret;\n }, undefined) ??\n item.getDefaultValue()\n )\n )\n .sort((a, b) =>\n (a.isReadonly() && b.isReadonly()) || (!a.isReadonly() && !b.isReadonly())\n ? a.getNameAsString().localeCompare(b.getNameAsString())\n : a.isReadonly()\n ? 1\n : -1\n )\n .map(\n item =>\n ` /**\n * ${\n item.getDescription() ||\n item.getTitle() ||\n titleCase(item.getNameAsString())\n }\n *\n * @title ${item.getTitle() || titleCase(item.getNameAsString())}${\n item.getAlias().length\n ? `\n ${item\n .getAlias()\n .map(alias => ` * @alias ${alias}`)\n .join(\"\\n\")}`\n : \"\"\n }${\n item.getDomain()\n ? `\n * @domain ${item.getDomain()}`\n : \"\"\n }${\n item.getPermission().length\n ? `\n ${item\n .getPermission()\n .map(permission => ` * @permission ${permission}`)\n .join(\"\\n\")}`\n : \"\"\n }${\n item.isInternal()\n ? `\n * @internal`\n : \"\"\n }${\n item.isReadonly()\n ? `\n * @readonly`\n : \"\"\n }${\n item.isIgnored()\n ? `\n * @ignored`\n : \"\"\n }${\n item.isHidden()\n ? `\n * @hidden`\n : \"\"\n }\n */\n ${item.getNameAsString()}: ${stringifyValue(\n item.getType(),\n options.defaultValues?.[item.getNameAsString()] ??\n item.getAlias().reduce((ret, alias) => {\n if (\n isUndefined(ret) &&\n !isUndefined((options.defaultValues as Record<string, any>)?.[alias])\n ) {\n return (options.defaultValues as Record<string, any>)?.[alias];\n }\n\n return ret;\n }, undefined) ??\n item.getDefaultValue()\n )}`\n )\n .join(\", \\n\")}\n};\n`;\n}\n"],"mappings":";;;;;;;;;;;;;AA6LA,SAAgB,0BACd,YACA,UAA+C,EAAE,EACjD;AACA,KAAI,CAAC,WACH,QAAO;AAGT,QAAO;;KAGN,WAAW,gBAAgB,IAC3B,GAAG,UAAU,QAAQ,gBAAgB,WAAW,cAAc,IAAI,WAAW,SAAS,CAAC,CAAC,kBACzF;;eAEa,UAAU,QAAQ,gBAAgB,WAAW,SAAS,CAAC,GAClE,QAAQ,oBAAoB,UAC3B,QAAQ,mBAAmB,WAAW,yBAAyB,EAAE,SAAS,IACvE,KAAK,QAAQ,mBAAmB,WAAW,yBAAyB,EAAE,SAAS,KAC/E,GACL;IACC,WACC,eAAe,CACf,QACC,SACE,CAAC,KAAK,WAAW,IACjB,CAAC,YACC,QAAQ,gBAAgB,KAAK,iBAAiB,KAC5C,KAAK,UAAU,CAAC,QAAQ,KAAK,UAAU;AACrC,MACE,YAAY,IAAI,IAChB,CAAC,YACE,QAAQ,gBAAwC,OAClD,CAED,QAAQ,QAAQ,gBAAwC;AAG1D,SAAO;IACN,OAAU,IACb,KAAK,iBAAiB,CACzB,CACJ,CACA,MAAM,GAAG,MACP,EAAE,YAAY,IAAI,EAAE,YAAY,IAAM,CAAC,EAAE,YAAY,IAAI,CAAC,EAAE,YAAY,GACrE,EAAE,iBAAiB,CAAC,cAAc,EAAE,iBAAiB,CAAC,GACtD,EAAE,YAAY,GACZ,IACA,GACP,CACA,KACC,SACE;MAEJ,KAAK,gBAAgB,IACrB,KAAK,UAAU,IACf,UAAU,KAAK,iBAAiB,CAAC,CAClC;;aAEU,KAAK,UAAU,IAAI,UAAU,KAAK,iBAAiB,CAAC,GAC7D,KAAK,UAAU,CAAC,SACZ;IACJ,KACC,UAAU,CACV,KAAI,UAAS,aAAa,QAAQ,CAClC,KAAK,KAAK,KACP,KAEJ,KAAK,WAAW,GACZ;cACM,KAAK,WAAW,KACtB,KAEJ,KAAK,eAAe,CAAC,SACjB;IACJ,KACC,eAAe,CACf,KAAI,eAAc,mBAAmB,aAAa,CAClD,KAAK,KAAK,KACP,KAEJ,KAAK,YAAY,GACb;iBAEA,KAEJ,KAAK,YAAY,GACb;iBAEA,KAEJ,KAAK,WAAW,GACZ;gBAEA,KAEJ,KAAK,UAAU,GACX;eAEA,GACL;;IAEC,KAAK,iBAAiB,CAAC,IAAI,eAC3B,KAAK,SAAS,EACd,QAAQ,gBAAgB,KAAK,iBAAiB,KAC5C,KAAK,UAAU,CAAC,QAAQ,KAAK,UAAU;AACrC,MACE,YAAY,IAAI,IAChB,CAAC,YAAa,QAAQ,gBAAwC,OAAO,CAErE,QAAQ,QAAQ,gBAAwC;AAG1D,SAAO;IACN,OAAU,IACb,KAAK,iBAAiB,CACzB,GACE,CACA,KAAK,OAAO,CAAC"}
|
package/dist/index.d.cts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { AlloyPluginContext, AlloyPluginOptions } from "./types/plugin.cjs";
|
|
2
|
-
import { Plugin } from "powerlines";
|
|
3
|
-
|
|
4
|
-
//#region src/index.d.ts
|
|
5
|
-
declare module "powerlines" {
|
|
6
|
-
interface Config {
|
|
7
|
-
alloy?: AlloyPluginOptions;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Alloy-js plugin for Powerlines.
|
|
12
|
-
*
|
|
13
|
-
* @param options - The Alloy-js plugin user configuration options.
|
|
14
|
-
* @returns A Powerlines plugin that integrates Alloy-js transformations.
|
|
15
|
-
*/
|
|
16
|
-
declare const plugin: <TContext extends AlloyPluginContext = AlloyPluginContext>(options?: AlloyPluginOptions) => Plugin<TContext>[];
|
|
17
|
-
//#endregion
|
|
18
|
-
export { plugin as default, plugin };
|
|
19
|
-
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.cts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.tsx"],"mappings":";;;;;YAyBY,MAAA;IACR,KAAA,GAAQ,kBAAA;EAAA;AAAA;;;;;;;cAUC,MAAA,oBACM,kBAAA,GAAqB,kBAAA,EAEtC,OAAA,GAAS,kBAAA,KAuEJ,MAAA,CAAO,QAAA"}
|
package/dist/index.d.mts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { AlloyPluginContext, AlloyPluginOptions } from "./types/plugin.mjs";
|
|
2
|
-
import { Plugin } from "powerlines";
|
|
3
|
-
|
|
4
|
-
//#region src/index.d.ts
|
|
5
|
-
declare module "powerlines" {
|
|
6
|
-
interface Config {
|
|
7
|
-
alloy?: AlloyPluginOptions;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Alloy-js plugin for Powerlines.
|
|
12
|
-
*
|
|
13
|
-
* @param options - The Alloy-js plugin user configuration options.
|
|
14
|
-
* @returns A Powerlines plugin that integrates Alloy-js transformations.
|
|
15
|
-
*/
|
|
16
|
-
declare const plugin: <TContext extends AlloyPluginContext = AlloyPluginContext>(options?: AlloyPluginOptions) => Plugin<TContext>[];
|
|
17
|
-
//#endregion
|
|
18
|
-
export { plugin as default, plugin };
|
|
19
|
-
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.d.mts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.tsx"],"mappings":";;;;;YAyBY,MAAA;IACR,KAAA,GAAQ,kBAAA;EAAA;AAAA;;;;;;;cAUC,MAAA,oBACM,kBAAA,GAAqB,kBAAA,EAEtC,OAAA,GAAS,kBAAA,KAuEJ,MAAA,CAAO,QAAA"}
|
package/dist/index.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../src/index.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 rollupPlugin from \"@alloy-js/rollup-plugin\";\nimport { isDuplicatePlugin } from \"@powerlines/plugin-babel/helpers\";\nimport { StormJSON } from \"@stryke/json/storm-json\";\nimport type { Plugin } from \"powerlines\";\nimport type { AlloyPluginContext, AlloyPluginOptions } from \"./types/plugin\";\n\ndeclare module \"powerlines\" {\n interface Config {\n alloy?: AlloyPluginOptions;\n }\n}\n\n/**\n * Alloy-js plugin for Powerlines.\n *\n * @param options - The Alloy-js plugin user configuration options.\n * @returns A Powerlines plugin that integrates Alloy-js transformations.\n */\nexport const plugin = <\n TContext extends AlloyPluginContext = AlloyPluginContext\n>(\n options: AlloyPluginOptions = {}\n) => {\n return [\n {\n name: \"alloy\",\n config() {\n this.debug(\n \"Updating configuration options to support Alloy-js builds.\"\n );\n\n return {\n alloy: {\n typescript: true,\n ...options\n },\n resolve: {\n external: [/^@alloy-js\\//]\n },\n tsdown: {\n inputOptions: {\n transform: {\n jsx: {\n runtime: \"automatic\",\n importSource: \"@alloy-js/core\"\n }\n }\n },\n plugins: [rollupPlugin()]\n }\n };\n },\n async configResolved() {\n this.debug(\"Ensuring TypeScript configuration is set up for Alloy-js.\");\n if (\n this.tsconfig.tsconfigJson.compilerOptions?.jsx !== \"react-jsx\" ||\n this.tsconfig.tsconfigJson.compilerOptions?.jsxImportSource !==\n \"@alloy-js/core\"\n ) {\n this.tsconfig.tsconfigJson.compilerOptions ??= {};\n\n if (this.tsconfig.tsconfigJson.compilerOptions.jsx !== \"react-jsx\") {\n this.tsconfig.tsconfigJson.compilerOptions.jsx = \"react-jsx\";\n }\n\n if (\n this.tsconfig.tsconfigJson.compilerOptions.jsxImportSource !==\n \"@alloy-js/core\"\n ) {\n this.tsconfig.tsconfigJson.compilerOptions.jsxImportSource =\n \"@alloy-js/core\";\n }\n\n await this.fs.write(\n this.tsconfig.tsconfigFilePath,\n StormJSON.stringify(this.tsconfig.tsconfigJson)\n );\n }\n\n if (\n this.config.babel &&\n (!this.config.babel.plugins ||\n !isDuplicatePlugin(\n this.config.babel.plugins,\n \"@babel/plugin-syntax-jsx\"\n ))\n ) {\n this.config.babel.plugins ??= [];\n this.config.babel.plugins.push(\"@babel/plugin-syntax-jsx\");\n }\n }\n }\n ] as Plugin<TContext>[];\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;AAoCA,MAAa,UAGX,UAA8B,EAAE,KAC7B;AACH,QAAO,CACL;EACE,MAAM;EACN,SAAS;AACP,QAAK,MACH,6DACD;AAED,UAAO;IACL,OAAO;KACL,YAAY;KACZ,GAAG;KACJ;IACD,SAAS,EACP,UAAU,CAAC,eAAe,EAC3B;IACD,QAAQ;KACN,cAAc,EACZ,WAAW,EACT,KAAK;MACH,SAAS;MACT,cAAc;MACf,EACF,EACF;KACD,SAAS,CAAC,cAAc,CAAC;KAC1B;IACF;;EAEH,MAAM,iBAAiB;AACrB,QAAK,MAAM,4DAA4D;AACvE,OACE,KAAK,SAAS,aAAa,iBAAiB,QAAQ,eACpD,KAAK,SAAS,aAAa,iBAAiB,oBAC1C,kBACF;AACA,SAAK,SAAS,aAAa,oBAAoB,EAAE;AAEjD,QAAI,KAAK,SAAS,aAAa,gBAAgB,QAAQ,YACrD,MAAK,SAAS,aAAa,gBAAgB,MAAM;AAGnD,QACE,KAAK,SAAS,aAAa,gBAAgB,oBAC3C,iBAEA,MAAK,SAAS,aAAa,gBAAgB,kBACzC;AAGJ,UAAM,KAAK,GAAG,MACZ,KAAK,SAAS,kBACd,UAAU,UAAU,KAAK,SAAS,aAAa,CAChD;;AAGH,OACE,KAAK,OAAO,UACX,CAAC,KAAK,OAAO,MAAM,WAClB,CAAC,kBACC,KAAK,OAAO,MAAM,SAClB,2BACD,GACH;AACA,SAAK,OAAO,MAAM,YAAY,EAAE;AAChC,SAAK,OAAO,MAAM,QAAQ,KAAK,2BAA2B;;;EAG/D,CACF"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import * as _alloy_js_core0 from "@alloy-js/core";
|
|
2
|
-
|
|
3
|
-
//#region src/markdown/components/front-matter.d.ts
|
|
4
|
-
interface FrontMatterProps {
|
|
5
|
-
data: Record<string, any>;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* Renders YAML front matter for a markdown file.
|
|
9
|
-
*
|
|
10
|
-
* @see https://jekyllrb.com/docs/front-matter/
|
|
11
|
-
*/
|
|
12
|
-
declare function FrontMatter(props: FrontMatterProps): _alloy_js_core0.Children;
|
|
13
|
-
declare type __ΩFrontMatterProps = any[];
|
|
14
|
-
//#endregion
|
|
15
|
-
export { FrontMatter, FrontMatterProps, __ΩFrontMatterProps };
|
|
16
|
-
//# sourceMappingURL=front-matter.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"front-matter.d.cts","names":[],"sources":["../../../src/markdown/components/front-matter.tsx"],"mappings":";;;UAoBiB,gBAAA;EACf,IAAA,EAAM,MAAA;AAAA;AADR;;;;;AAAA,iBASgB,WAAA,CAAY,KAAA,EAAO,gBAAA,GAAgB,eAAA,CAAA,QAAA;AAAA"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import * as _alloy_js_core0 from "@alloy-js/core";
|
|
2
|
-
|
|
3
|
-
//#region src/markdown/components/front-matter.d.ts
|
|
4
|
-
interface FrontMatterProps {
|
|
5
|
-
data: Record<string, any>;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* Renders YAML front matter for a markdown file.
|
|
9
|
-
*
|
|
10
|
-
* @see https://jekyllrb.com/docs/front-matter/
|
|
11
|
-
*/
|
|
12
|
-
declare function FrontMatter(props: FrontMatterProps): _alloy_js_core0.Children;
|
|
13
|
-
declare type __ΩFrontMatterProps = any[];
|
|
14
|
-
//#endregion
|
|
15
|
-
export { FrontMatter, FrontMatterProps, __ΩFrontMatterProps };
|
|
16
|
-
//# sourceMappingURL=front-matter.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"front-matter.d.mts","names":[],"sources":["../../../src/markdown/components/front-matter.tsx"],"mappings":";;;UAoBiB,gBAAA;EACf,IAAA,EAAM,MAAA;AAAA;AADR;;;;;AAAA,iBASgB,WAAA,CAAY,KAAA,EAAO,gBAAA,GAAgB,eAAA,CAAA,QAAA;AAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"front-matter.mjs","names":[],"sources":["../../../src/markdown/components/front-matter.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, For } from \"@alloy-js/core\";\n\nexport interface FrontMatterProps {\n data: Record<string, any>;\n}\n\n/**\n * Renders YAML front matter for a markdown file.\n *\n * @see https://jekyllrb.com/docs/front-matter/\n */\nexport function FrontMatter(props: FrontMatterProps) {\n return (\n <>\n {\"---\"}\n <hbr />\n <For each={Object.entries(props.data)} hardline>\n {([key, value]) => code`${key}: ${JSON.stringify(value)}`}\n </For>\n {\"---\"}\n <hbr />\n </>\n );\n}\n"],"mappings":";;;;;;;;;AA6BA,SAAgB,YAAY,OAAyB;AACnD,QACE;EACG;EACD,oBAAC,OAAD,EAAO;EACP,oBAAC,KAAD;GAAK,MAAM,OAAO,QAAQ,MAAM,KAAK;GAAE;cACnC,CAAC,KAAK,WAAW,IAAI,GAAG,IAAI,IAAI,KAAK,UAAU,MAAM;GACnD;EACL;EACD,oBAAC,OAAD,EAAO;EACN"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { FrontMatter, FrontMatterProps, __ΩFrontMatterProps } from "./front-matter.cjs";
|
|
2
|
-
import { MarkdownFile, MarkdownFileHeader, MarkdownFileHeaderProps, MarkdownFileProps, __ΩMarkdownFileHeaderProps, __ΩMarkdownFileProps } from "./markdown-file.cjs";
|
|
3
|
-
import { MarkdownTable, MarkdownTableColumn, MarkdownTableColumnHeader, MarkdownTableColumnProps, MarkdownTableProps, __ΩMarkdownTableColumnProps, __ΩMarkdownTableProps } from "./markdown-table.cjs";
|
|
4
|
-
export { FrontMatter, FrontMatterProps, MarkdownFile, MarkdownFileHeader, MarkdownFileHeaderProps, MarkdownFileProps, MarkdownTable, MarkdownTableColumn, MarkdownTableColumnHeader, MarkdownTableColumnProps, MarkdownTableProps, __ΩFrontMatterProps, __ΩMarkdownFileHeaderProps, __ΩMarkdownFileProps, __ΩMarkdownTableColumnProps, __ΩMarkdownTableProps };
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { FrontMatter, FrontMatterProps, __ΩFrontMatterProps } from "./front-matter.mjs";
|
|
2
|
-
import { MarkdownFile, MarkdownFileHeader, MarkdownFileHeaderProps, MarkdownFileProps, __ΩMarkdownFileHeaderProps, __ΩMarkdownFileProps } from "./markdown-file.mjs";
|
|
3
|
-
import { MarkdownTable, MarkdownTableColumn, MarkdownTableColumnHeader, MarkdownTableColumnProps, MarkdownTableProps, __ΩMarkdownTableColumnProps, __ΩMarkdownTableProps } from "./markdown-table.mjs";
|
|
4
|
-
export { FrontMatter, FrontMatterProps, MarkdownFile, MarkdownFileHeader, MarkdownFileHeaderProps, MarkdownFileProps, MarkdownTable, MarkdownTableColumn, MarkdownTableColumnHeader, MarkdownTableColumnProps, MarkdownTableProps, __ΩFrontMatterProps, __ΩMarkdownFileHeaderProps, __ΩMarkdownFileProps, __ΩMarkdownTableColumnProps, __ΩMarkdownTableProps };
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { ComponentProps, SourceFileHeaderProps } from "../../types/components.cjs";
|
|
2
|
-
import { SourceFileProps as SourceFileProps$1 } from "../../core/components/source-file.cjs";
|
|
3
|
-
import { FrontMatterProps } from "./front-matter.cjs";
|
|
4
|
-
import * as _alloy_js_core0 from "@alloy-js/core";
|
|
5
|
-
|
|
6
|
-
//#region src/markdown/components/markdown-file.d.ts
|
|
7
|
-
type MarkdownFileProps = Omit<SourceFileProps$1, "filetype"> & ComponentProps & MarkdownFileHeaderProps;
|
|
8
|
-
/**
|
|
9
|
-
* A base component representing a Powerlines generated markdown source file.
|
|
10
|
-
*
|
|
11
|
-
* @param props - The properties for the source file.
|
|
12
|
-
* @returns The rendered source file component.
|
|
13
|
-
*/
|
|
14
|
-
declare function MarkdownFile(props: MarkdownFileProps): _alloy_js_core0.Children;
|
|
15
|
-
type MarkdownFileHeaderProps = SourceFileHeaderProps & {
|
|
16
|
-
frontMatter?: FrontMatterProps["data"];
|
|
17
|
-
};
|
|
18
|
-
/**
|
|
19
|
-
* Renders the header for a Powerlines Typescript source file.
|
|
20
|
-
*
|
|
21
|
-
* @param props - The properties for the source file header.
|
|
22
|
-
* @returns The rendered source file header.
|
|
23
|
-
*/
|
|
24
|
-
declare function MarkdownFileHeader(props: MarkdownFileHeaderProps): _alloy_js_core0.Children;
|
|
25
|
-
declare type __ΩMarkdownFileProps = any[];
|
|
26
|
-
declare type __ΩMarkdownFileHeaderProps = any[];
|
|
27
|
-
//#endregion
|
|
28
|
-
export { MarkdownFile, MarkdownFileHeader, MarkdownFileHeaderProps, MarkdownFileProps, __ΩMarkdownFileHeaderProps, __ΩMarkdownFileProps };
|
|
29
|
-
//# sourceMappingURL=markdown-file.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"markdown-file.d.cts","names":[],"sources":["../../../src/markdown/components/markdown-file.tsx"],"mappings":";;;;;;KA6BY,iBAAA,GAAoB,IAAA,CAAK,iBAAA,gBACnC,cAAA,GACA,uBAAA;;;AAFF;;;;iBAUgB,YAAA,CAAa,KAAA,EAAO,iBAAA,GAAiB,eAAA,CAAA,QAAA;AAAA,KAmBzC,uBAAA,GAA0B,qBAAA;EACpC,WAAA,GAAc,gBAAA;AAAA;;;;;;;iBASA,kBAAA,CAAmB,KAAA,EAAO,uBAAA,GAAuB,eAAA,CAAA,QAAA;AAAA"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { ComponentProps, SourceFileHeaderProps } from "../../types/components.mjs";
|
|
2
|
-
import { SourceFileProps as SourceFileProps$1 } from "../../core/components/source-file.mjs";
|
|
3
|
-
import { FrontMatterProps } from "./front-matter.mjs";
|
|
4
|
-
import * as _alloy_js_core0 from "@alloy-js/core";
|
|
5
|
-
|
|
6
|
-
//#region src/markdown/components/markdown-file.d.ts
|
|
7
|
-
type MarkdownFileProps = Omit<SourceFileProps$1, "filetype"> & ComponentProps & MarkdownFileHeaderProps;
|
|
8
|
-
/**
|
|
9
|
-
* A base component representing a Powerlines generated markdown source file.
|
|
10
|
-
*
|
|
11
|
-
* @param props - The properties for the source file.
|
|
12
|
-
* @returns The rendered source file component.
|
|
13
|
-
*/
|
|
14
|
-
declare function MarkdownFile(props: MarkdownFileProps): _alloy_js_core0.Children;
|
|
15
|
-
type MarkdownFileHeaderProps = SourceFileHeaderProps & {
|
|
16
|
-
frontMatter?: FrontMatterProps["data"];
|
|
17
|
-
};
|
|
18
|
-
/**
|
|
19
|
-
* Renders the header for a Powerlines Typescript source file.
|
|
20
|
-
*
|
|
21
|
-
* @param props - The properties for the source file header.
|
|
22
|
-
* @returns The rendered source file header.
|
|
23
|
-
*/
|
|
24
|
-
declare function MarkdownFileHeader(props: MarkdownFileHeaderProps): _alloy_js_core0.Children;
|
|
25
|
-
declare type __ΩMarkdownFileProps = any[];
|
|
26
|
-
declare type __ΩMarkdownFileHeaderProps = any[];
|
|
27
|
-
//#endregion
|
|
28
|
-
export { MarkdownFile, MarkdownFileHeader, MarkdownFileHeaderProps, MarkdownFileProps, __ΩMarkdownFileHeaderProps, __ΩMarkdownFileProps };
|
|
29
|
-
//# sourceMappingURL=markdown-file.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"markdown-file.d.mts","names":[],"sources":["../../../src/markdown/components/markdown-file.tsx"],"mappings":";;;;;;KA6BY,iBAAA,GAAoB,IAAA,CAAK,iBAAA,gBACnC,cAAA,GACA,uBAAA;;;AAFF;;;;iBAUgB,YAAA,CAAa,KAAA,EAAO,iBAAA,GAAiB,eAAA,CAAA,QAAA;AAAA,KAmBzC,uBAAA,GAA0B,qBAAA;EACpC,WAAA,GAAc,gBAAA;AAAA;;;;;;;iBASA,kBAAA,CAAmB,KAAA,EAAO,uBAAA,GAAuB,eAAA,CAAA,QAAA;AAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
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) || \"Powerlines\"\n }`}</SingleLineComment>\n <hbr />\n <SingleLineComment variant=\"markdown\">\n {getFileHeaderWarning(context!)}\n </SingleLineComment>\n <hbr />\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAuCA,SAAgB,aAAa,OAA0B;CACrD,MAAM,CAAC,EAAE,UAAU,SAAS,eAAe,QAAQ,WAAW,OAAO;EACnE;EACA;EACA;EACD,CAAC;AAEF,QACE,oBAAC,YAAD;EACE,QAAQ,oBAAC,oBAAD,EAAiC,aAAe;EACxD,GAAI;EACJ,UAAS;EACT,WAAW;EACF;YACT,oBAAC,MAAD;GAAM,MAAM,QAAQ,SAAS;GAAG;GAAgB;EACrC;;;;;;;;AAcjB,SAAgB,mBAAmB,OAAgC;CACjE,MAAM,CACJ,EACE,UACA,gBAAgB,MAChB,eAAe,MACf,kBAAkB,OAClB,iBAEA,WAAW,OAAO;EACpB;EACA;EACA;EACA;EACA;EACD,CAAC;CAEF,MAAM,UAAU,mBAAmB;AAEnC,QACE;EACE,oBAAC,MAAD;GACE,MAAM,YAAY,YAAY,IAAI,OAAO,KAAK,YAAY,CAAC,SAAS;aACpE,oBAAC,aAAD,EAAa,MAAM,aAAgB;GAC9B;EACP,qBAAC,MAAD;GAAM,MAAM,QAAQ,cAAc;aAAlC,CACE,oBAAC,mBAAD;IAAmB,SAAQ;cACxB;IACiB,GACpB,oBAAC,OAAD,EAAO,EACF;;EACP,qBAAC,MAAD;GAAM,MAAM,QAAQ,gBAAgB;aAApC,CACE,oBAAC,mBAAD;IAAmB,SAAQ;cACxB;IACiB,GACpB,oBAAC,OAAD,EAAO,EACF;;EACP,qBAAC,MAAD;GAAM,MAAM,QAAQ,aAAa;aAAjC,CACE,oBAAC,mBAAD;IAAmB,SAAQ;cACxB;IACiB,GACpB,oBAAC,OAAD,EAAO,EACF;;EACP,oBAAC,MAAD;GACE,MACE,QAAQ,cAAc,IACtB,QAAQ,gBAAgB,IACxB,QAAQ,aAAa;aAEvB,oBAAC,OAAD,EAAO;GACF;EACP,oBAAC,MAAD;GAAM,MAAM,QAAQ,SAAS;aAC3B,4CACG,UACD,oBAAC,OAAD,EAAO,EACN;GACE;EACP,oBAAC,mBAAD;GAAmB,SAAQ;aAAY,gBACrC,UAAU,SAAS,QAAQ,UAAU,IAAI;GACpB;EACvB,oBAAC,OAAD,EAAO;EACP,oBAAC,mBAAD;GAAmB,SAAQ;aACxB,qBAAqB,QAAS;GACb;EACpB,oBAAC,OAAD,EAAO;EACN"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { ComponentProps } from "../../types/components.cjs";
|
|
2
|
-
import { MarkdownTableColumnContextInterface } from "../contexts/markdown-table.cjs";
|
|
3
|
-
import * as _alloy_js_core0 from "@alloy-js/core";
|
|
4
|
-
|
|
5
|
-
//#region src/markdown/components/markdown-table.d.ts
|
|
6
|
-
interface MarkdownTableProps<T extends Record<string, any> = Record<string, any>> extends ComponentProps {
|
|
7
|
-
data: T[];
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Component that provides a context for rendering markdown tables.
|
|
11
|
-
*/
|
|
12
|
-
declare function MarkdownTable<T extends Record<string, any> = Record<string, any>>(props: MarkdownTableProps<T>): _alloy_js_core0.Children;
|
|
13
|
-
type MarkdownTableColumnProps = ComponentProps & Partial<Pick<MarkdownTableColumnContextInterface, "align">> & Required<Pick<MarkdownTableColumnContextInterface, "name">> & {
|
|
14
|
-
width?: number;
|
|
15
|
-
};
|
|
16
|
-
/**
|
|
17
|
-
* Component that provides a context for rendering markdown tables.
|
|
18
|
-
*/
|
|
19
|
-
declare function MarkdownTableColumn(props: MarkdownTableColumnProps): _alloy_js_core0.Children;
|
|
20
|
-
/**
|
|
21
|
-
* Component that provides a context for rendering markdown tables.
|
|
22
|
-
*/
|
|
23
|
-
declare function MarkdownTableColumnHeader(props: MarkdownTableColumnProps): _alloy_js_core0.Children;
|
|
24
|
-
declare type __ΩMarkdownTableProps = any[];
|
|
25
|
-
declare type __ΩMarkdownTableColumnProps = any[];
|
|
26
|
-
//#endregion
|
|
27
|
-
export { MarkdownTable, MarkdownTableColumn, MarkdownTableColumnHeader, MarkdownTableColumnProps, MarkdownTableProps, __ΩMarkdownTableColumnProps, __ΩMarkdownTableProps };
|
|
28
|
-
//# sourceMappingURL=markdown-table.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
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;AAHR;;;AAAA,iBASgB,aAAA,WACJ,MAAA,gBAAsB,MAAA,cAAA,CAChC,KAAA,EAAO,kBAAA,CAAmB,CAAA,IAAD,eAAA,CAAG,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,wBAAA,GAAwB,eAAA,CAAA,QAAA;;;;iBA6CnD,yBAAA,CAA0B,KAAA,EAAO,wBAAA,GAAwB,eAAA,CAAA,QAAA;AAAA"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { ComponentProps } from "../../types/components.mjs";
|
|
2
|
-
import { MarkdownTableColumnContextInterface } from "../contexts/markdown-table.mjs";
|
|
3
|
-
import * as _alloy_js_core0 from "@alloy-js/core";
|
|
4
|
-
|
|
5
|
-
//#region src/markdown/components/markdown-table.d.ts
|
|
6
|
-
interface MarkdownTableProps<T extends Record<string, any> = Record<string, any>> extends ComponentProps {
|
|
7
|
-
data: T[];
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Component that provides a context for rendering markdown tables.
|
|
11
|
-
*/
|
|
12
|
-
declare function MarkdownTable<T extends Record<string, any> = Record<string, any>>(props: MarkdownTableProps<T>): _alloy_js_core0.Children;
|
|
13
|
-
type MarkdownTableColumnProps = ComponentProps & Partial<Pick<MarkdownTableColumnContextInterface, "align">> & Required<Pick<MarkdownTableColumnContextInterface, "name">> & {
|
|
14
|
-
width?: number;
|
|
15
|
-
};
|
|
16
|
-
/**
|
|
17
|
-
* Component that provides a context for rendering markdown tables.
|
|
18
|
-
*/
|
|
19
|
-
declare function MarkdownTableColumn(props: MarkdownTableColumnProps): _alloy_js_core0.Children;
|
|
20
|
-
/**
|
|
21
|
-
* Component that provides a context for rendering markdown tables.
|
|
22
|
-
*/
|
|
23
|
-
declare function MarkdownTableColumnHeader(props: MarkdownTableColumnProps): _alloy_js_core0.Children;
|
|
24
|
-
declare type __ΩMarkdownTableProps = any[];
|
|
25
|
-
declare type __ΩMarkdownTableColumnProps = any[];
|
|
26
|
-
//#endregion
|
|
27
|
-
export { MarkdownTable, MarkdownTableColumn, MarkdownTableColumnHeader, MarkdownTableColumnProps, MarkdownTableProps, __ΩMarkdownTableColumnProps, __ΩMarkdownTableProps };
|
|
28
|
-
//# sourceMappingURL=markdown-table.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
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;AAHR;;;AAAA,iBASgB,aAAA,WACJ,MAAA,gBAAsB,MAAA,cAAA,CAChC,KAAA,EAAO,kBAAA,CAAmB,CAAA,IAAD,eAAA,CAAG,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,wBAAA,GAAwB,eAAA,CAAA,QAAA;;;;iBA6CnD,yBAAA,CAA0B,KAAA,EAAO,wBAAA,GAAwB,eAAA,CAAA,QAAA;AAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
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":";;;;;;;;;;AAqCA,SAAgB,cAEd,OAA8B;CAC9B,MAAM,CAAC,EAAE,UAAU,UAAU,WAAW,OAAO,CAAC,YAAY,OAAO,CAAC;CAEpE,MAAM,UAAU,eACd,OAAO,KAAK,KAAK,CAAC,KAAK,MAAc,WAAmB;EACtD;EACA;EACA,OAAO;EACP,OAAO;EACR,EAAE,CACJ;AAED,QACE,oBAAC,qBAAqB,UAAtB;EAA+B,OAAO;GAAE,SAAS,QAAQ;GAAO;GAAM;YACpE,oBAAC,MAAD;GAAM,MAAM,QAAQ,SAAS;GAAG;GAAgB;EAClB;;;;;AAapC,SAAgB,oBAAoB,OAAiC;CACnE,MAAM,CAAC,EAAE,UAAU,OAAO,OAAO,UAAU,WAAW,OAAO;EAC3D;EACA;EACA;EACA;EACD,CAAC;CAEF,MAAM,eAAe,kBAAkB;CACvC,MAAM,YAAY,eAChB,cAAc,QAAQ,MAAK,MAAK,EAAE,SAAS,KAAK,CACjD;CAED,MAAM,WAAW,eAAe,UAAU,OAAO,SAAS,EAAE;CAC5D,MAAM,WAAW,eAAe,UAAU,OAAO,SAAS,SAAS,OAAO;CAC1E,MAAM,WAAW,eAAe,UAAU,OAAO,SAAS,SAAS,GAAG;CAEtE,MAAM,aAAa,eAAe;AAGhC,UAFgB,WAAW,SAAS,UAAU,GAAG,IAElC;GACf;AAEF,QACE,qBAAC,OAAD;EACE,oBAAC,MAAD;GAAM,MAAM,SAAS,UAAU;aAAI;GAAW;EAC9C,oBAAC,MAAD;GAAM,MAAM,QAAQ,SAAS;aAC3B,oBAAC,OAAD,YAAQ,IAAI,GACV,SAAS,UAAU,SACf,IAAI,OAAO,SAAS,QAAQ,WAAW,QAAQ,EAAE,GACjD,MACH,WACD,SAAS,UAAU,UACf,IAAI,OAAO,SAAS,QAAQ,WAAW,QAAQ,EAAE,GACjD,OACK;GACN;EACN;EACK;;;;;AAOZ,SAAgB,0BAA0B,OAAiC;CACzE,MAAM,CAAC,EAAE,UAAU,QAAQ,QAAQ,WAAW,OAAO,CAAC,YAAY,OAAO,CAAC;AAE1E,QACE,0CACE,oBAAC,qBAAD;EAAqB,GAAI;EAAY;YACnC,oBAAC,MAAD;GACE,UAAU,UAAU,MAAM,EACxB,iBAAiB,OAClB,CAAC;GACF,MAAM,CAAC,YAAY,SAAS;GAC3B;GACI;EACa,GACrB"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { MarkdownTableColumnContext, MarkdownTableColumnContextInterface, MarkdownTableContext, MarkdownTableContextInterface, __ΩMarkdownTableColumnContextInterface, __ΩMarkdownTableContextInterface, useMarkdownTable, useMarkdownTableColumn } from "./markdown-table.cjs";
|
|
2
|
-
export { MarkdownTableColumnContext, MarkdownTableColumnContextInterface, MarkdownTableContext, MarkdownTableContextInterface, __ΩMarkdownTableColumnContextInterface, __ΩMarkdownTableContextInterface, useMarkdownTable, useMarkdownTableColumn };
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { MarkdownTableColumnContext, MarkdownTableColumnContextInterface, MarkdownTableContext, MarkdownTableContextInterface, __ΩMarkdownTableColumnContextInterface, __ΩMarkdownTableContextInterface, useMarkdownTable, useMarkdownTableColumn } from "./markdown-table.mjs";
|
|
2
|
-
export { MarkdownTableColumnContext, MarkdownTableColumnContextInterface, MarkdownTableContext, MarkdownTableContextInterface, __ΩMarkdownTableColumnContextInterface, __ΩMarkdownTableContextInterface, useMarkdownTable, useMarkdownTableColumn };
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { ComponentContext } from "@alloy-js/core";
|
|
2
|
-
|
|
3
|
-
//#region src/markdown/contexts/markdown-table.d.ts
|
|
4
|
-
interface MarkdownTableColumnContextInterface<T extends Record<string, any> = Record<string, any>> {
|
|
5
|
-
index: number;
|
|
6
|
-
name: keyof T;
|
|
7
|
-
align: "left" | "right" | "center";
|
|
8
|
-
width: number;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* The Powerlines context used in template rendering.
|
|
12
|
-
*/
|
|
13
|
-
declare const MarkdownTableColumnContext: ComponentContext<MarkdownTableColumnContextInterface>;
|
|
14
|
-
/**
|
|
15
|
-
* Hook to access the Powerlines Context.
|
|
16
|
-
*
|
|
17
|
-
* @returns The Context.
|
|
18
|
-
*/
|
|
19
|
-
declare function useMarkdownTableColumn(): MarkdownTableColumnContextInterface<Record<string, any>> | undefined;
|
|
20
|
-
interface MarkdownTableContextInterface<T extends Record<string, any> = Record<string, any>> {
|
|
21
|
-
columns: MarkdownTableColumnContextInterface<T>[];
|
|
22
|
-
data: T[];
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* The Powerlines context used in template rendering.
|
|
26
|
-
*/
|
|
27
|
-
declare const MarkdownTableContext: ComponentContext<MarkdownTableContextInterface>;
|
|
28
|
-
/**
|
|
29
|
-
* Hook to access the Powerlines Context.
|
|
30
|
-
*
|
|
31
|
-
* @returns The Context.
|
|
32
|
-
*/
|
|
33
|
-
declare function useMarkdownTable(): MarkdownTableContextInterface<Record<string, any>> | undefined;
|
|
34
|
-
declare type __ΩMarkdownTableColumnContextInterface = any[];
|
|
35
|
-
declare type __ΩMarkdownTableContextInterface = any[];
|
|
36
|
-
//#endregion
|
|
37
|
-
export { MarkdownTableColumnContext, MarkdownTableColumnContextInterface, MarkdownTableContext, MarkdownTableContextInterface, __ΩMarkdownTableColumnContextInterface, __ΩMarkdownTableContextInterface, useMarkdownTable, useMarkdownTableColumn };
|
|
38
|
-
//# sourceMappingURL=markdown-table.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
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,gBAAA,CAAiB,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,gBAAA,CAAiB,6BAAA;;AAhBpD;;;;iBA2BgB,gBAAA,CAAA,GAAgB,6BAAA,CAAA,MAAA;AAAA"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { ComponentContext } from "@alloy-js/core";
|
|
2
|
-
|
|
3
|
-
//#region src/markdown/contexts/markdown-table.d.ts
|
|
4
|
-
interface MarkdownTableColumnContextInterface<T extends Record<string, any> = Record<string, any>> {
|
|
5
|
-
index: number;
|
|
6
|
-
name: keyof T;
|
|
7
|
-
align: "left" | "right" | "center";
|
|
8
|
-
width: number;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* The Powerlines context used in template rendering.
|
|
12
|
-
*/
|
|
13
|
-
declare const MarkdownTableColumnContext: ComponentContext<MarkdownTableColumnContextInterface>;
|
|
14
|
-
/**
|
|
15
|
-
* Hook to access the Powerlines Context.
|
|
16
|
-
*
|
|
17
|
-
* @returns The Context.
|
|
18
|
-
*/
|
|
19
|
-
declare function useMarkdownTableColumn(): MarkdownTableColumnContextInterface<Record<string, any>> | undefined;
|
|
20
|
-
interface MarkdownTableContextInterface<T extends Record<string, any> = Record<string, any>> {
|
|
21
|
-
columns: MarkdownTableColumnContextInterface<T>[];
|
|
22
|
-
data: T[];
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* The Powerlines context used in template rendering.
|
|
26
|
-
*/
|
|
27
|
-
declare const MarkdownTableContext: ComponentContext<MarkdownTableContextInterface>;
|
|
28
|
-
/**
|
|
29
|
-
* Hook to access the Powerlines Context.
|
|
30
|
-
*
|
|
31
|
-
* @returns The Context.
|
|
32
|
-
*/
|
|
33
|
-
declare function useMarkdownTable(): MarkdownTableContextInterface<Record<string, any>> | undefined;
|
|
34
|
-
declare type __ΩMarkdownTableColumnContextInterface = any[];
|
|
35
|
-
declare type __ΩMarkdownTableContextInterface = any[];
|
|
36
|
-
//#endregion
|
|
37
|
-
export { MarkdownTableColumnContext, MarkdownTableColumnContextInterface, MarkdownTableContext, MarkdownTableContextInterface, __ΩMarkdownTableColumnContextInterface, __ΩMarkdownTableContextInterface, useMarkdownTable, useMarkdownTableColumn };
|
|
38
|
-
//# sourceMappingURL=markdown-table.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
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,gBAAA,CAAiB,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,gBAAA,CAAiB,6BAAA;;AAhBpD;;;;iBA2BgB,gBAAA,CAAA,GAAgB,6BAAA,CAAA,MAAA;AAAA"}
|