@powerlines/plugin-alloy 0.25.69 → 0.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/core/components/index.cjs +3 -1
- package/dist/core/components/index.d.cts +3 -2
- package/dist/core/components/index.d.mts +3 -2
- package/dist/core/components/index.mjs +3 -2
- package/dist/core/components/infrastructure-file.cjs +48 -0
- package/dist/core/components/infrastructure-file.d.cts +28 -0
- package/dist/core/components/infrastructure-file.d.cts.map +1 -0
- package/dist/core/components/infrastructure-file.d.mts +28 -0
- package/dist/core/components/infrastructure-file.d.mts.map +1 -0
- package/dist/core/components/infrastructure-file.mjs +46 -0
- package/dist/core/components/infrastructure-file.mjs.map +1 -0
- package/dist/core/components/output.d.cts +2 -2
- package/dist/core/components/output.d.cts.map +1 -1
- package/dist/core/components/output.d.mts +2 -2
- package/dist/core/components/output.d.mts.map +1 -1
- package/dist/core/components/single-line-comment.cjs +1 -1
- package/dist/core/components/single-line-comment.d.cts +3 -3
- package/dist/core/components/single-line-comment.d.cts.map +1 -1
- package/dist/core/components/single-line-comment.d.mts +3 -3
- package/dist/core/components/single-line-comment.d.mts.map +1 -1
- package/dist/core/components/single-line-comment.mjs +1 -1
- package/dist/core/components/single-line-comment.mjs.map +1 -1
- package/dist/core/components/source-file.d.cts +2 -2
- package/dist/core/components/source-file.d.cts.map +1 -1
- package/dist/core/components/source-file.d.mts +2 -2
- package/dist/core/components/source-file.d.mts.map +1 -1
- package/dist/core/components/spacing.d.cts +2 -2
- package/dist/core/components/spacing.d.cts.map +1 -1
- package/dist/core/components/spacing.d.mts +2 -2
- package/dist/core/components/spacing.d.mts.map +1 -1
- package/dist/core/contexts/index.cjs +2 -1
- package/dist/core/contexts/index.d.cts +2 -2
- package/dist/core/contexts/index.d.mts +2 -2
- package/dist/core/contexts/index.mjs +2 -2
- package/dist/core/contexts/reflection.cjs +13 -2
- package/dist/core/contexts/reflection.d.cts +14 -3
- package/dist/core/contexts/reflection.d.cts.map +1 -1
- package/dist/core/contexts/reflection.d.mts +14 -3
- package/dist/core/contexts/reflection.d.mts.map +1 -1
- package/dist/core/contexts/reflection.mjs +12 -2
- package/dist/core/contexts/reflection.mjs.map +1 -1
- package/dist/core/index.cjs +5 -2
- package/dist/core/index.d.cts +4 -3
- package/dist/core/index.d.mts +4 -3
- package/dist/core/index.mjs +4 -3
- package/dist/hcl/components/block-declaration.cjs +34 -0
- package/dist/hcl/components/block-declaration.d.cts +22 -0
- package/dist/hcl/components/block-declaration.d.cts.map +1 -0
- package/dist/hcl/components/block-declaration.d.mts +22 -0
- package/dist/hcl/components/block-declaration.d.mts.map +1 -0
- package/dist/hcl/components/block-declaration.mjs +33 -0
- package/dist/hcl/components/block-declaration.mjs.map +1 -0
- package/dist/hcl/components/hcl-file.cjs +83 -0
- package/dist/hcl/components/hcl-file.d.cts +27 -0
- package/dist/hcl/components/hcl-file.d.cts.map +1 -0
- package/dist/hcl/components/hcl-file.d.mts +27 -0
- package/dist/hcl/components/hcl-file.d.mts.map +1 -0
- package/dist/hcl/components/hcl-file.mjs +81 -0
- package/dist/hcl/components/hcl-file.mjs.map +1 -0
- package/dist/hcl/components/index.cjs +11 -0
- package/dist/hcl/components/index.d.cts +5 -0
- package/dist/hcl/components/index.d.mts +5 -0
- package/dist/hcl/components/index.mjs +6 -0
- package/dist/hcl/components/packer-file.cjs +29 -0
- package/dist/hcl/components/packer-file.d.cts +19 -0
- package/dist/hcl/components/packer-file.d.cts.map +1 -0
- package/dist/hcl/components/packer-file.d.mts +19 -0
- package/dist/hcl/components/packer-file.d.mts.map +1 -0
- package/dist/hcl/components/packer-file.mjs +28 -0
- package/dist/hcl/components/packer-file.mjs.map +1 -0
- package/dist/hcl/components/terraform-file.cjs +30 -0
- package/dist/hcl/components/terraform-file.d.cts +20 -0
- package/dist/hcl/components/terraform-file.d.cts.map +1 -0
- package/dist/hcl/components/terraform-file.d.mts +20 -0
- package/dist/hcl/components/terraform-file.d.mts.map +1 -0
- package/dist/hcl/components/terraform-file.mjs +29 -0
- package/dist/hcl/components/terraform-file.mjs.map +1 -0
- package/dist/hcl/index.cjs +12 -0
- package/dist/hcl/index.d.cts +5 -0
- package/dist/hcl/index.d.mts +5 -0
- package/dist/hcl/index.mjs +7 -0
- package/dist/helpers/capnp.cjs +2 -2
- package/dist/helpers/capnp.mjs +2 -2
- package/dist/helpers/typescript.cjs +1 -1
- package/dist/helpers/typescript.mjs +1 -1
- package/dist/markdown/components/front-matter.d.cts +2 -2
- package/dist/markdown/components/front-matter.d.cts.map +1 -1
- package/dist/markdown/components/front-matter.d.mts +2 -2
- package/dist/markdown/components/front-matter.d.mts.map +1 -1
- package/dist/markdown/components/markdown-file.cjs +1 -1
- package/dist/markdown/components/markdown-file.d.cts +3 -3
- package/dist/markdown/components/markdown-file.d.cts.map +1 -1
- package/dist/markdown/components/markdown-file.d.mts +3 -3
- package/dist/markdown/components/markdown-file.d.mts.map +1 -1
- package/dist/markdown/components/markdown-file.mjs +1 -1
- package/dist/markdown/components/markdown-table.d.cts +4 -4
- package/dist/markdown/components/markdown-table.d.cts.map +1 -1
- package/dist/markdown/components/markdown-table.d.mts +4 -4
- package/dist/markdown/components/markdown-table.d.mts.map +1 -1
- package/dist/typescript/components/builtin-file.d.cts +2 -2
- package/dist/typescript/components/builtin-file.d.cts.map +1 -1
- package/dist/typescript/components/builtin-file.d.mts +2 -2
- package/dist/typescript/components/builtin-file.d.mts.map +1 -1
- package/dist/typescript/components/dynamic-import-statement.d.cts +2 -2
- package/dist/typescript/components/dynamic-import-statement.d.cts.map +1 -1
- package/dist/typescript/components/dynamic-import-statement.d.mts +2 -2
- package/dist/typescript/components/dynamic-import-statement.d.mts.map +1 -1
- package/dist/typescript/components/entry-file.cjs +1 -1
- package/dist/typescript/components/entry-file.d.cts +2 -2
- package/dist/typescript/components/entry-file.d.cts.map +1 -1
- package/dist/typescript/components/entry-file.d.mts +2 -2
- package/dist/typescript/components/entry-file.d.mts.map +1 -1
- package/dist/typescript/components/entry-file.mjs +1 -1
- package/dist/typescript/components/index.cjs +0 -2
- package/dist/typescript/components/index.d.cts +1 -2
- package/dist/typescript/components/index.d.mts +1 -2
- package/dist/typescript/components/index.mjs +1 -2
- package/dist/typescript/components/interface-declaration.cjs +16 -6
- package/dist/typescript/components/interface-declaration.d.cts +6 -5
- package/dist/typescript/components/interface-declaration.d.cts.map +1 -1
- package/dist/typescript/components/interface-declaration.d.mts +5 -4
- package/dist/typescript/components/interface-declaration.d.mts.map +1 -1
- package/dist/typescript/components/interface-declaration.mjs +16 -6
- package/dist/typescript/components/interface-declaration.mjs.map +1 -1
- package/dist/typescript/components/object-declaration.cjs +8 -2
- package/dist/typescript/components/object-declaration.d.cts +7 -7
- package/dist/typescript/components/object-declaration.d.cts.map +1 -1
- package/dist/typescript/components/object-declaration.d.mts +6 -6
- package/dist/typescript/components/object-declaration.d.mts.map +1 -1
- package/dist/typescript/components/object-declaration.mjs +8 -2
- package/dist/typescript/components/object-declaration.mjs.map +1 -1
- package/dist/typescript/components/property-name.d.cts +2 -2
- package/dist/typescript/components/property-name.d.cts.map +1 -1
- package/dist/typescript/components/property-name.d.mts +2 -2
- package/dist/typescript/components/property-name.d.mts.map +1 -1
- package/dist/typescript/components/tsdoc-reflection.cjs +15 -4
- package/dist/typescript/components/tsdoc-reflection.d.cts +8 -7
- package/dist/typescript/components/tsdoc-reflection.d.cts.map +1 -1
- package/dist/typescript/components/tsdoc-reflection.d.mts +8 -7
- package/dist/typescript/components/tsdoc-reflection.d.mts.map +1 -1
- package/dist/typescript/components/tsdoc-reflection.mjs +16 -5
- package/dist/typescript/components/tsdoc-reflection.mjs.map +1 -1
- package/dist/typescript/components/tsdoc.d.cts +1 -1
- package/dist/typescript/components/type-declaration.d.cts +2 -2
- package/dist/typescript/components/type-declaration.d.cts.map +1 -1
- package/dist/typescript/components/type-declaration.d.mts +2 -2
- package/dist/typescript/components/type-declaration.d.mts.map +1 -1
- package/dist/typescript/components/typescript-file.cjs +2 -2
- package/dist/typescript/components/typescript-file.mjs +2 -2
- package/dist/typescript/contexts/lexical-scope.d.cts +2 -2
- package/dist/typescript/contexts/lexical-scope.d.cts.map +1 -1
- package/dist/typescript/contexts/lexical-scope.d.mts +2 -2
- package/dist/typescript/contexts/lexical-scope.d.mts.map +1 -1
- package/dist/typescript/index.cjs +0 -2
- package/dist/typescript/index.d.cts +1 -2
- package/dist/typescript/index.d.mts +1 -2
- package/dist/typescript/index.mjs +1 -2
- package/dist/yaml/components/yaml-file.cjs +1 -1
- package/dist/yaml/components/yaml-file.mjs +1 -1
- package/package.json +104 -20
- package/dist/typescript/components/infrastructure-file.cjs +0 -40
- 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 +0 -38
- package/dist/typescript/components/infrastructure-file.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -27,7 +27,7 @@ This package is part of the <b>🔌 Powerlines</b> monorepo. Powerlines is the "
|
|
|
27
27
|
|
|
28
28
|
<h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
|
|
29
29
|
|
|
30
|
-
[](https://stormsoftware.com/projects/powerlines) [](http://commitizen.github.io/cz-cli/)  
|
|
31
31
|
|
|
32
32
|
<!-- prettier-ignore-start -->
|
|
33
33
|
<!-- markdownlint-disable -->
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_core_components_source_file = require('./source-file.cjs');
|
|
3
|
+
const require_core_components_infrastructure_file = require('./infrastructure-file.cjs');
|
|
2
4
|
const require_core_components_output = require('./output.cjs');
|
|
3
5
|
const require_core_components_single_line_comment = require('./single-line-comment.cjs');
|
|
4
|
-
const require_core_components_source_file = require('./source-file.cjs');
|
|
5
6
|
const require_core_components_spacing = require('./spacing.cjs');
|
|
6
7
|
|
|
8
|
+
exports.InfrastructureFile = require_core_components_infrastructure_file.InfrastructureFile;
|
|
7
9
|
exports.Output = require_core_components_output.Output;
|
|
8
10
|
exports.SingleLineComment = require_core_components_single_line_comment.SingleLineComment;
|
|
9
11
|
exports.SourceFile = require_core_components_source_file.SourceFile;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { SourceFile, SourceFileProps, __ΩSourceFileProps } from "./source-file.cjs";
|
|
2
|
+
import { InfrastructureFile, InfrastructureFileProps, __ΩInfrastructureFileProps } from "./infrastructure-file.cjs";
|
|
1
3
|
import { Output, OutputProps, __ΩOutputProps } from "./output.cjs";
|
|
2
4
|
import { SingleLineComment, SingleLineCommentProps, SingleLineCommentVariant, __ΩSingleLineCommentProps, __ΩSingleLineCommentVariant } from "./single-line-comment.cjs";
|
|
3
|
-
import { SourceFile, SourceFileProps, __ΩSourceFileProps } from "./source-file.cjs";
|
|
4
5
|
import { Spacing, SpacingProps, __ΩSpacingProps } from "./spacing.cjs";
|
|
5
|
-
export { Output, OutputProps, SingleLineComment, SingleLineCommentProps, SingleLineCommentVariant, SourceFile, SourceFileProps, Spacing, SpacingProps, __ΩOutputProps, __ΩSingleLineCommentProps, __ΩSingleLineCommentVariant, __ΩSourceFileProps, __ΩSpacingProps };
|
|
6
|
+
export { InfrastructureFile, InfrastructureFileProps, Output, OutputProps, SingleLineComment, SingleLineCommentProps, SingleLineCommentVariant, SourceFile, SourceFileProps, Spacing, SpacingProps, __ΩInfrastructureFileProps, __ΩOutputProps, __ΩSingleLineCommentProps, __ΩSingleLineCommentVariant, __ΩSourceFileProps, __ΩSpacingProps };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { SourceFile, SourceFileProps, __ΩSourceFileProps } from "./source-file.mjs";
|
|
2
|
+
import { InfrastructureFile, InfrastructureFileProps, __ΩInfrastructureFileProps } from "./infrastructure-file.mjs";
|
|
1
3
|
import { Output, OutputProps, __ΩOutputProps } from "./output.mjs";
|
|
2
4
|
import { SingleLineComment, SingleLineCommentProps, SingleLineCommentVariant, __ΩSingleLineCommentProps, __ΩSingleLineCommentVariant } from "./single-line-comment.mjs";
|
|
3
|
-
import { SourceFile, SourceFileProps, __ΩSourceFileProps } from "./source-file.mjs";
|
|
4
5
|
import { Spacing, SpacingProps, __ΩSpacingProps } from "./spacing.mjs";
|
|
5
|
-
export { Output, OutputProps, SingleLineComment, SingleLineCommentProps, SingleLineCommentVariant, SourceFile, SourceFileProps, Spacing, SpacingProps, __ΩOutputProps, __ΩSingleLineCommentProps, __ΩSingleLineCommentVariant, __ΩSourceFileProps, __ΩSpacingProps };
|
|
6
|
+
export { InfrastructureFile, InfrastructureFileProps, Output, OutputProps, SingleLineComment, SingleLineCommentProps, SingleLineCommentVariant, SourceFile, SourceFileProps, Spacing, SpacingProps, __ΩInfrastructureFileProps, __ΩOutputProps, __ΩSingleLineCommentProps, __ΩSingleLineCommentVariant, __ΩSourceFileProps, __ΩSpacingProps };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { SourceFile } from "./source-file.mjs";
|
|
2
|
+
import { InfrastructureFile } from "./infrastructure-file.mjs";
|
|
1
3
|
import { Output } from "./output.mjs";
|
|
2
4
|
import { SingleLineComment } from "./single-line-comment.mjs";
|
|
3
|
-
import { SourceFile } from "./source-file.mjs";
|
|
4
5
|
import { Spacing } from "./spacing.mjs";
|
|
5
6
|
|
|
6
|
-
export { Output, SingleLineComment, SourceFile, Spacing };
|
|
7
|
+
export { InfrastructureFile, Output, SingleLineComment, SourceFile, Spacing };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
|
|
3
|
+
const require_core_contexts_context = require('../contexts/context.cjs');
|
|
4
|
+
const require_core_components_source_file = require('./source-file.cjs');
|
|
5
|
+
let _stryke_path_file_path_fns = require("@stryke/path/file-path-fns");
|
|
6
|
+
let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
7
|
+
let _alloy_js_core = require("@alloy-js/core");
|
|
8
|
+
let _stryke_path_append = require("@stryke/path/append");
|
|
9
|
+
let _stryke_path_replace = require("@stryke/path/replace");
|
|
10
|
+
let defu = require("defu");
|
|
11
|
+
defu = require_runtime.__toESM(defu);
|
|
12
|
+
|
|
13
|
+
//#region src/core/components/infrastructure-file.tsx
|
|
14
|
+
/**
|
|
15
|
+
* A base component representing a Powerlines generated infrastructure file.
|
|
16
|
+
*
|
|
17
|
+
* @param props - The properties for the infrastructure file.
|
|
18
|
+
* @returns The rendered infrastructure file component.
|
|
19
|
+
*/
|
|
20
|
+
function InfrastructureFile(props) {
|
|
21
|
+
const [{ children, meta, id, extension, filetype: _filetype }, rest] = (0, _alloy_js_core.splitProps)(props, [
|
|
22
|
+
"children",
|
|
23
|
+
"meta",
|
|
24
|
+
"id",
|
|
25
|
+
"extension",
|
|
26
|
+
"filetype"
|
|
27
|
+
]);
|
|
28
|
+
const context = require_core_contexts_context.usePowerlinesSafe();
|
|
29
|
+
const filetype = (0, _alloy_js_core.computed)(() => _filetype || extension?.replace(/^\.*/, "") || ((0, _stryke_path_file_path_fns.hasFileExtension)(id) ? (0, _stryke_path_file_path_fns.findFileExtensionSafe)(id) : ""));
|
|
30
|
+
const path = (0, _alloy_js_core.computed)(() => {
|
|
31
|
+
return (0, _stryke_path_append.appendExtension)((0, _stryke_path_replace.replaceExtension)(context ? (0, _stryke_path_append.appendPath)(id, (0, _stryke_path_replace.replacePath)(context.infrastructurePath, context.workspaceConfig.workspaceRoot)) : id), filetype.value);
|
|
32
|
+
});
|
|
33
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(require_core_components_source_file.SourceFile, (0, _alloy_js_core_jsx_runtime.mergeProps)(rest, {
|
|
34
|
+
get filetype() {
|
|
35
|
+
return filetype.value;
|
|
36
|
+
},
|
|
37
|
+
get path() {
|
|
38
|
+
return path.value;
|
|
39
|
+
},
|
|
40
|
+
get meta() {
|
|
41
|
+
return (0, defu.default)({ kind: "infrastructure" }, meta ?? {});
|
|
42
|
+
},
|
|
43
|
+
children
|
|
44
|
+
}));
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
//#endregion
|
|
48
|
+
exports.InfrastructureFile = InfrastructureFile;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { SourceFileProps as SourceFileProps$1 } from "./source-file.cjs";
|
|
2
|
+
import * as _$_alloy_js_core0 from "@alloy-js/core";
|
|
3
|
+
|
|
4
|
+
//#region src/core/components/infrastructure-file.d.ts
|
|
5
|
+
type InfrastructureFileProps = Omit<SourceFileProps$1, "path"> & {
|
|
6
|
+
/**
|
|
7
|
+
* The infrastructure module identifier.
|
|
8
|
+
*/
|
|
9
|
+
id: string;
|
|
10
|
+
/**
|
|
11
|
+
* The extension for the infrastructure file. This is used to determine the file extension if the `id` does not already include one.
|
|
12
|
+
*
|
|
13
|
+
* @remarks
|
|
14
|
+
* If none is provided, the file extension will be determined by the {@link SourceFileProps.filetype | filetype} property.
|
|
15
|
+
*/
|
|
16
|
+
extension?: string;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* A base component representing a Powerlines generated infrastructure file.
|
|
20
|
+
*
|
|
21
|
+
* @param props - The properties for the infrastructure file.
|
|
22
|
+
* @returns The rendered infrastructure file component.
|
|
23
|
+
*/
|
|
24
|
+
declare function InfrastructureFile(props: InfrastructureFileProps): _$_alloy_js_core0.Children;
|
|
25
|
+
declare type __ΩInfrastructureFileProps = any[];
|
|
26
|
+
//#endregion
|
|
27
|
+
export { InfrastructureFile, InfrastructureFileProps, __ΩInfrastructureFileProps };
|
|
28
|
+
//# sourceMappingURL=infrastructure-file.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"infrastructure-file.d.cts","names":[],"sources":["../../../src/core/components/infrastructure-file.tsx"],"mappings":";;;;KA6BY,uBAAA,GAA0B,IAAA,CAAK,iBAAA;;;AAA3C;EAIE,EAAA;;;;;;;EAQA,SAAA;AAAA;AASF;;;;;;AAAA,iBAAgB,kBAAA,CAAmB,KAAA,EAAO,uBAAA,GAAuB,iBAAA,CAAA,QAAA;AAAA"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { SourceFileProps as SourceFileProps$1 } from "./source-file.mjs";
|
|
2
|
+
import * as _$_alloy_js_core0 from "@alloy-js/core";
|
|
3
|
+
|
|
4
|
+
//#region src/core/components/infrastructure-file.d.ts
|
|
5
|
+
type InfrastructureFileProps = Omit<SourceFileProps$1, "path"> & {
|
|
6
|
+
/**
|
|
7
|
+
* The infrastructure module identifier.
|
|
8
|
+
*/
|
|
9
|
+
id: string;
|
|
10
|
+
/**
|
|
11
|
+
* The extension for the infrastructure file. This is used to determine the file extension if the `id` does not already include one.
|
|
12
|
+
*
|
|
13
|
+
* @remarks
|
|
14
|
+
* If none is provided, the file extension will be determined by the {@link SourceFileProps.filetype | filetype} property.
|
|
15
|
+
*/
|
|
16
|
+
extension?: string;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* A base component representing a Powerlines generated infrastructure file.
|
|
20
|
+
*
|
|
21
|
+
* @param props - The properties for the infrastructure file.
|
|
22
|
+
* @returns The rendered infrastructure file component.
|
|
23
|
+
*/
|
|
24
|
+
declare function InfrastructureFile(props: InfrastructureFileProps): _$_alloy_js_core0.Children;
|
|
25
|
+
declare type __ΩInfrastructureFileProps = any[];
|
|
26
|
+
//#endregion
|
|
27
|
+
export { InfrastructureFile, InfrastructureFileProps, __ΩInfrastructureFileProps };
|
|
28
|
+
//# sourceMappingURL=infrastructure-file.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"infrastructure-file.d.mts","names":[],"sources":["../../../src/core/components/infrastructure-file.tsx"],"mappings":";;;;KA6BY,uBAAA,GAA0B,IAAA,CAAK,iBAAA;;;AAA3C;EAIE,EAAA;;;;;;;EAQA,SAAA;AAAA;AASF;;;;;;AAAA,iBAAgB,kBAAA,CAAmB,KAAA,EAAO,uBAAA,GAAuB,iBAAA,CAAA,QAAA;AAAA"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { usePowerlinesSafe } from "../contexts/context.mjs";
|
|
2
|
+
import { SourceFile } from "./source-file.mjs";
|
|
3
|
+
import { findFileExtensionSafe, hasFileExtension } from "@stryke/path/file-path-fns";
|
|
4
|
+
import { createComponent, mergeProps } from "@alloy-js/core/jsx-runtime";
|
|
5
|
+
import { computed, splitProps } from "@alloy-js/core";
|
|
6
|
+
import { appendExtension, appendPath } from "@stryke/path/append";
|
|
7
|
+
import { replaceExtension, replacePath } from "@stryke/path/replace";
|
|
8
|
+
import defu from "defu";
|
|
9
|
+
|
|
10
|
+
//#region src/core/components/infrastructure-file.tsx
|
|
11
|
+
/**
|
|
12
|
+
* A base component representing a Powerlines generated infrastructure file.
|
|
13
|
+
*
|
|
14
|
+
* @param props - The properties for the infrastructure file.
|
|
15
|
+
* @returns The rendered infrastructure file component.
|
|
16
|
+
*/
|
|
17
|
+
function InfrastructureFile(props) {
|
|
18
|
+
const [{ children, meta, id, extension, filetype: _filetype }, rest] = splitProps(props, [
|
|
19
|
+
"children",
|
|
20
|
+
"meta",
|
|
21
|
+
"id",
|
|
22
|
+
"extension",
|
|
23
|
+
"filetype"
|
|
24
|
+
]);
|
|
25
|
+
const context = usePowerlinesSafe();
|
|
26
|
+
const filetype = computed(() => _filetype || extension?.replace(/^\.*/, "") || (hasFileExtension(id) ? findFileExtensionSafe(id) : ""));
|
|
27
|
+
const path = computed(() => {
|
|
28
|
+
return appendExtension(replaceExtension(context ? appendPath(id, replacePath(context.infrastructurePath, context.workspaceConfig.workspaceRoot)) : id), filetype.value);
|
|
29
|
+
});
|
|
30
|
+
return createComponent(SourceFile, mergeProps(rest, {
|
|
31
|
+
get filetype() {
|
|
32
|
+
return filetype.value;
|
|
33
|
+
},
|
|
34
|
+
get path() {
|
|
35
|
+
return path.value;
|
|
36
|
+
},
|
|
37
|
+
get meta() {
|
|
38
|
+
return defu({ kind: "infrastructure" }, meta ?? {});
|
|
39
|
+
},
|
|
40
|
+
children
|
|
41
|
+
}));
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
//#endregion
|
|
45
|
+
export { InfrastructureFile };
|
|
46
|
+
//# sourceMappingURL=infrastructure-file.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"infrastructure-file.mjs","names":[],"sources":["../../../src/core/components/infrastructure-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 { appendExtension, appendPath } from \"@stryke/path/append\";\nimport {\n findFileExtensionSafe,\n hasFileExtension\n} from \"@stryke/path/file-path-fns\";\nimport { replaceExtension, replacePath } from \"@stryke/path/replace\";\nimport defu from \"defu\";\nimport { usePowerlinesSafe } from \"../../core/contexts/context\";\nimport { SourceFile, SourceFileProps } from \"./source-file\";\n\nexport type InfrastructureFileProps = Omit<SourceFileProps, \"path\"> & {\n /**\n * The infrastructure module identifier.\n */\n id: string;\n\n /**\n * The extension for the infrastructure file. This is used to determine the file extension if the `id` does not already include one.\n *\n * @remarks\n * If none is provided, the file extension will be determined by the {@link SourceFileProps.filetype | filetype} property.\n */\n extension?: string;\n};\n\n/**\n * A base component representing a Powerlines generated infrastructure file.\n *\n * @param props - The properties for the infrastructure file.\n * @returns The rendered infrastructure file component.\n */\nexport function InfrastructureFile(props: InfrastructureFileProps) {\n const [{ children, meta, id, extension, filetype: _filetype }, rest] =\n splitProps(props, [\"children\", \"meta\", \"id\", \"extension\", \"filetype\"]);\n\n const context = usePowerlinesSafe();\n const filetype = computed(\n () =>\n _filetype ||\n extension?.replace(/^\\.*/, \"\") ||\n (hasFileExtension(id) ? findFileExtensionSafe(id) : \"\")\n );\n const path = computed(() => {\n const value = context\n ? appendPath(\n id,\n replacePath(\n context.infrastructurePath,\n context.workspaceConfig.workspaceRoot\n )\n )\n : id;\n\n return appendExtension(replaceExtension(value), filetype.value);\n });\n\n return (\n <SourceFile\n {...rest}\n filetype={filetype.value}\n path={path.value}\n meta={defu(\n {\n kind: \"infrastructure\"\n },\n meta ?? {}\n )}>\n {children}\n </SourceFile>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;AA+CA,SAAgB,mBAAiB,OAA2B;CAC1D,MAAE,CAAA,EACF,UACF,MACE,IACE,kCAEF,QAAM,WAAU,OAAA;EAAA;EAAmB;EAAA;EAAA;EAAA;EAAA,CAAA;CACnC,MAAM,UAAU,mBAAS;CACzB,MAAM,WAAA,eAAA,aAAA,WAAA,QAAA,QAAA,GAAA,KAAA,iBAAA,GAAA,GAAA,sBAAA,GAAA,GAAA,IAAA;CACN,MAAI,OAAS,eAAE;AAEb,SAAG,gBAAoB,iBADV,UAAW,WAAU,IAAA,YAAA,QAAA,oBAAA,QAAA,gBAAA,cAAA,CAAA,GAAA,GACR,EAAsB,SAAQ,MAAA;GACzD;AACD,QAAM,gBAAmB,YAAG,WAAA,MAAA;EAC1B,IAAA,WAAc;AACZ,UAAE,SAAU;;EAEd,IAAI,OAAE;AACJ,UAAM,KAAA;;EAER,IAAI,OAAE;AACJ,UAAE,KAAA,EACA,MAAE;;EAGN"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MetaItem } from "../contexts/meta.cjs";
|
|
2
|
-
import * as _alloy_js_core0 from "@alloy-js/core";
|
|
2
|
+
import * as _$_alloy_js_core0 from "@alloy-js/core";
|
|
3
3
|
import { OutputProps as OutputProps$1 } from "@alloy-js/core";
|
|
4
4
|
import { PluginContext } from "@powerlines/core";
|
|
5
5
|
|
|
@@ -17,7 +17,7 @@ interface OutputProps<TContext extends PluginContext = PluginContext> extends Om
|
|
|
17
17
|
/**
|
|
18
18
|
* Output component for rendering the Powerlines plugin's output files via templates.
|
|
19
19
|
*/
|
|
20
|
-
declare function Output<TContext extends PluginContext = PluginContext>(props: OutputProps<TContext>): _alloy_js_core0.Children;
|
|
20
|
+
declare function Output<TContext extends PluginContext = PluginContext>(props: OutputProps<TContext>): _$_alloy_js_core0.Children;
|
|
21
21
|
declare type __ΩOutputProps = any[];
|
|
22
22
|
//#endregion
|
|
23
23
|
export { Output, OutputProps, __ΩOutputProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"output.d.cts","names":[],"sources":["../../../src/core/components/output.tsx"],"mappings":";;;;;;UAwBiB,WAAA,kBACE,aAAA,GAAgB,aAAA,UACzB,IAAA,CAAK,aAAA;;;;EAIb,OAAA,EAAS,QAAA;EANiB;;;EAW1B,IAAA,GAAO,MAAA,SAAe,QAAA;AAAA;;;;iBAMR,MAAA,kBAAwB,aAAA,GAAgB,aAAA,CAAA,CACtD,KAAA,EAAO,WAAA,CAAY,QAAA,IAAD,
|
|
1
|
+
{"version":3,"file":"output.d.cts","names":[],"sources":["../../../src/core/components/output.tsx"],"mappings":";;;;;;UAwBiB,WAAA,kBACE,aAAA,GAAgB,aAAA,UACzB,IAAA,CAAK,aAAA;;;;EAIb,OAAA,EAAS,QAAA;EANiB;;;EAW1B,IAAA,GAAO,MAAA,SAAe,QAAA;AAAA;;;;iBAMR,MAAA,kBAAwB,aAAA,GAAgB,aAAA,CAAA,CACtD,KAAA,EAAO,WAAA,CAAY,QAAA,IAAD,iBAAA,CAAU,QAAA;AAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MetaItem } from "../contexts/meta.mjs";
|
|
2
|
-
import * as _alloy_js_core0 from "@alloy-js/core";
|
|
2
|
+
import * as _$_alloy_js_core0 from "@alloy-js/core";
|
|
3
3
|
import { OutputProps as OutputProps$1 } from "@alloy-js/core";
|
|
4
4
|
import { PluginContext } from "@powerlines/core";
|
|
5
5
|
|
|
@@ -17,7 +17,7 @@ interface OutputProps<TContext extends PluginContext = PluginContext> extends Om
|
|
|
17
17
|
/**
|
|
18
18
|
* Output component for rendering the Powerlines plugin's output files via templates.
|
|
19
19
|
*/
|
|
20
|
-
declare function Output<TContext extends PluginContext = PluginContext>(props: OutputProps<TContext>): _alloy_js_core0.Children;
|
|
20
|
+
declare function Output<TContext extends PluginContext = PluginContext>(props: OutputProps<TContext>): _$_alloy_js_core0.Children;
|
|
21
21
|
declare type __ΩOutputProps = any[];
|
|
22
22
|
//#endregion
|
|
23
23
|
export { Output, OutputProps, __ΩOutputProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"output.d.mts","names":[],"sources":["../../../src/core/components/output.tsx"],"mappings":";;;;;;UAwBiB,WAAA,kBACE,aAAA,GAAgB,aAAA,UACzB,IAAA,CAAK,aAAA;;;;EAIb,OAAA,EAAS,QAAA;EANiB;;;EAW1B,IAAA,GAAO,MAAA,SAAe,QAAA;AAAA;;;;iBAMR,MAAA,kBAAwB,aAAA,GAAgB,aAAA,CAAA,CACtD,KAAA,EAAO,WAAA,CAAY,QAAA,IAAD,
|
|
1
|
+
{"version":3,"file":"output.d.mts","names":[],"sources":["../../../src/core/components/output.tsx"],"mappings":";;;;;;UAwBiB,WAAA,kBACE,aAAA,GAAgB,aAAA,UACzB,IAAA,CAAK,aAAA;;;;EAIb,OAAA,EAAS,QAAA;EANiB;;;EAW1B,IAAA,GAAO,MAAA,SAAe,QAAA;AAAA;;;;iBAMR,MAAA,kBAAwB,aAAA,GAAgB,aAAA,CAAA,CACtD,KAAA,EAAO,WAAA,CAAY,QAAA,IAAD,iBAAA,CAAU,QAAA;AAAA"}
|
|
@@ -10,7 +10,7 @@ let _alloy_js_core = require("@alloy-js/core");
|
|
|
10
10
|
*/
|
|
11
11
|
function SingleLineComment(props) {
|
|
12
12
|
const { variant = "double-slash", children } = props;
|
|
13
|
-
const commentStart = variant === "slash-star" ? "/* " : variant === "slash-star-star" ? "/** " : variant === "triple-slash" ? "/// " : variant === "markdown" ? "<!-- " : variant === "yaml" ? "# " : "// ";
|
|
13
|
+
const commentStart = variant === "slash-star" ? "/* " : variant === "slash-star-star" ? "/** " : variant === "triple-slash" ? "/// " : variant === "markdown" ? "<!-- " : variant === "yaml" || variant === "hcl" ? "# " : "// ";
|
|
14
14
|
return [commentStart, (0, _alloy_js_core_jsx_runtime.createIntrinsic)("align", {
|
|
15
15
|
string: commentStart,
|
|
16
16
|
get children() {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ComponentProps } from "../../types/components.cjs";
|
|
2
|
-
import * as _alloy_js_core0 from "@alloy-js/core";
|
|
2
|
+
import * as _$_alloy_js_core0 from "@alloy-js/core";
|
|
3
3
|
|
|
4
4
|
//#region src/core/components/single-line-comment.d.ts
|
|
5
|
-
type SingleLineCommentVariant = "double-slash" | "triple-slash" | "slash-star" | "slash-star-star" | "markdown" | "yaml";
|
|
5
|
+
type SingleLineCommentVariant = "double-slash" | "triple-slash" | "slash-star" | "slash-star-star" | "markdown" | "yaml" | "hcl";
|
|
6
6
|
interface SingleLineCommentProps extends ComponentProps {
|
|
7
7
|
/**
|
|
8
8
|
* The variant of the single line comment.
|
|
@@ -15,7 +15,7 @@ interface SingleLineCommentProps extends ComponentProps {
|
|
|
15
15
|
* A single line comment block. The children are rendered as a prose element, which means that they
|
|
16
16
|
* are broken into multiple lines
|
|
17
17
|
*/
|
|
18
|
-
declare function SingleLineComment(props: SingleLineCommentProps): _alloy_js_core0.Children;
|
|
18
|
+
declare function SingleLineComment(props: SingleLineCommentProps): _$_alloy_js_core0.Children;
|
|
19
19
|
declare type __ΩSingleLineCommentVariant = any[];
|
|
20
20
|
declare type __ΩSingleLineCommentProps = any[];
|
|
21
21
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"single-line-comment.d.cts","names":[],"sources":["../../../src/core/components/single-line-comment.tsx"],"mappings":";;;;KAqBY,wBAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"single-line-comment.d.cts","names":[],"sources":["../../../src/core/components/single-line-comment.tsx"],"mappings":";;;;KAqBY,wBAAA;AAAA,UASK,sBAAA,SAA+B,cAAA;;AAThD;;;;EAeE,OAAA,GAAU,wBAAA;AAAA;;;;;iBAOI,iBAAA,CAAkB,KAAA,EAAO,sBAAA,GAAsB,iBAAA,CAAA,QAAA;AAAA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ComponentProps } from "../../types/components.mjs";
|
|
2
|
-
import * as _alloy_js_core0 from "@alloy-js/core";
|
|
2
|
+
import * as _$_alloy_js_core0 from "@alloy-js/core";
|
|
3
3
|
|
|
4
4
|
//#region src/core/components/single-line-comment.d.ts
|
|
5
|
-
type SingleLineCommentVariant = "double-slash" | "triple-slash" | "slash-star" | "slash-star-star" | "markdown" | "yaml";
|
|
5
|
+
type SingleLineCommentVariant = "double-slash" | "triple-slash" | "slash-star" | "slash-star-star" | "markdown" | "yaml" | "hcl";
|
|
6
6
|
interface SingleLineCommentProps extends ComponentProps {
|
|
7
7
|
/**
|
|
8
8
|
* The variant of the single line comment.
|
|
@@ -15,7 +15,7 @@ interface SingleLineCommentProps extends ComponentProps {
|
|
|
15
15
|
* A single line comment block. The children are rendered as a prose element, which means that they
|
|
16
16
|
* are broken into multiple lines
|
|
17
17
|
*/
|
|
18
|
-
declare function SingleLineComment(props: SingleLineCommentProps): _alloy_js_core0.Children;
|
|
18
|
+
declare function SingleLineComment(props: SingleLineCommentProps): _$_alloy_js_core0.Children;
|
|
19
19
|
declare type __ΩSingleLineCommentVariant = any[];
|
|
20
20
|
declare type __ΩSingleLineCommentProps = any[];
|
|
21
21
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"single-line-comment.d.mts","names":[],"sources":["../../../src/core/components/single-line-comment.tsx"],"mappings":";;;;KAqBY,wBAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"single-line-comment.d.mts","names":[],"sources":["../../../src/core/components/single-line-comment.tsx"],"mappings":";;;;KAqBY,wBAAA;AAAA,UASK,sBAAA,SAA+B,cAAA;;AAThD;;;;EAeE,OAAA,GAAU,wBAAA;AAAA;;;;;iBAOI,iBAAA,CAAkB,KAAA,EAAO,sBAAA,GAAsB,iBAAA,CAAA,QAAA;AAAA"}
|
|
@@ -8,7 +8,7 @@ import { Prose } from "@alloy-js/core";
|
|
|
8
8
|
*/
|
|
9
9
|
function SingleLineComment(props) {
|
|
10
10
|
const { variant = "double-slash", children } = props;
|
|
11
|
-
const commentStart = variant === "slash-star" ? "/* " : variant === "slash-star-star" ? "/** " : variant === "triple-slash" ? "/// " : variant === "markdown" ? "<!-- " : variant === "yaml" ? "# " : "// ";
|
|
11
|
+
const commentStart = variant === "slash-star" ? "/* " : variant === "slash-star-star" ? "/** " : variant === "triple-slash" ? "/// " : variant === "markdown" ? "<!-- " : variant === "yaml" || variant === "hcl" ? "# " : "// ";
|
|
12
12
|
return [commentStart, createIntrinsic("align", {
|
|
13
13
|
string: commentStart,
|
|
14
14
|
get children() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"single-line-comment.mjs","names":[],"sources":["../../../src/core/components/single-line-comment.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 { Prose } from \"@alloy-js/core\";\nimport { ComponentProps } from \"../../types/components\";\n\nexport type SingleLineCommentVariant =\n | \"double-slash\"\n | \"triple-slash\"\n | \"slash-star\"\n | \"slash-star-star\"\n | \"markdown\"\n | \"yaml\";\n\nexport interface SingleLineCommentProps extends ComponentProps {\n /**\n * The variant of the single line comment.\n *\n * @defaultValue \"double-slash\"\n */\n variant?: SingleLineCommentVariant;\n}\n\n/**\n * A single line comment block. The children are rendered as a prose element, which means that they\n * are broken into multiple lines\n */\nexport function SingleLineComment(props: SingleLineCommentProps) {\n const { variant = \"double-slash\", children } = props;\n\n const commentStart =\n variant === \"slash-star\"\n ? \"/* \"\n : variant === \"slash-star-star\"\n ? \"/** \"\n : variant === \"triple-slash\"\n ? \"/// \"\n : variant === \"markdown\"\n ? \"<!-- \"\n : variant === \"yaml\"\n ? \"# \"\n : \"// \";\n\n return (\n <>\n {commentStart}\n <align string={commentStart}>\n <Prose>{children}</Prose>\n\n {variant === \"slash-star\" || variant === \"slash-star-star\"\n ? \" */ \"\n : variant === \"markdown\"\n ? \" -->\"\n : \"\"}\n </align>\n </>\n );\n}\n"],"mappings":";;;;;;;;AAmCA,
|
|
1
|
+
{"version":3,"file":"single-line-comment.mjs","names":[],"sources":["../../../src/core/components/single-line-comment.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 { Prose } from \"@alloy-js/core\";\nimport { ComponentProps } from \"../../types/components\";\n\nexport type SingleLineCommentVariant =\n | \"double-slash\"\n | \"triple-slash\"\n | \"slash-star\"\n | \"slash-star-star\"\n | \"markdown\"\n | \"yaml\"\n | \"hcl\";\n\nexport interface SingleLineCommentProps extends ComponentProps {\n /**\n * The variant of the single line comment.\n *\n * @defaultValue \"double-slash\"\n */\n variant?: SingleLineCommentVariant;\n}\n\n/**\n * A single line comment block. The children are rendered as a prose element, which means that they\n * are broken into multiple lines\n */\nexport function SingleLineComment(props: SingleLineCommentProps) {\n const { variant = \"double-slash\", children } = props;\n\n const commentStart =\n variant === \"slash-star\"\n ? \"/* \"\n : variant === \"slash-star-star\"\n ? \"/** \"\n : variant === \"triple-slash\"\n ? \"/// \"\n : variant === \"markdown\"\n ? \"<!-- \"\n : variant === \"yaml\" || variant === \"hcl\"\n ? \"# \"\n : \"// \";\n\n return (\n <>\n {commentStart}\n <align string={commentStart}>\n <Prose>{children}</Prose>\n\n {variant === \"slash-star\" || variant === \"slash-star-star\"\n ? \" */ \"\n : variant === \"markdown\"\n ? \" -->\"\n : \"\"}\n </align>\n </>\n );\n}\n"],"mappings":";;;;;;;;AAmCA,SAAI,kBAAA,OAAA;CACF,MAAA,EACF,UAAA,6BAEE;CACA,MAAG,eAAY,YAAkB,eAAc,QAAS,YAAW,oBAAqB,SAAK,YAAA,iBAAA,SAAA,YAAA,aAAA,UAAA,YAAA,UAAA,YAAA,QAAA,OAAA;AAC7F,QAAK,CAAA,cAAY,gBAAS,SAAA;EAC1B,QAAA;EACF,IAAO,WAAS;AACd,UAAQ,CAAA,gBAAkB,OAAQ,YAE7B,CAAC,EAAA,YAAa,gBAAA,YAAA,oBAAA,SAAA,YAAA,aAAA,SAAA,GAAA;;EAElB,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentProps } from "../../types/components.cjs";
|
|
2
|
-
import * as _alloy_js_core0 from "@alloy-js/core";
|
|
2
|
+
import * as _$_alloy_js_core0 from "@alloy-js/core";
|
|
3
3
|
import { SourceFileProps as SourceFileProps$1 } from "@alloy-js/core";
|
|
4
4
|
import { StoragePreset } from "powerlines";
|
|
5
5
|
|
|
@@ -26,7 +26,7 @@ type SourceFileProps = SourceFileProps$1 & ComponentProps & {
|
|
|
26
26
|
* @param props - The properties for the source file.
|
|
27
27
|
* @returns The rendered source file component.
|
|
28
28
|
*/
|
|
29
|
-
declare function SourceFile(props: SourceFileProps): _alloy_js_core0.Children;
|
|
29
|
+
declare function SourceFile(props: SourceFileProps): _$_alloy_js_core0.Children;
|
|
30
30
|
declare type __ΩSourceFileProps = any[];
|
|
31
31
|
//#endregion
|
|
32
32
|
export { SourceFile, SourceFileProps, __ΩSourceFileProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"source-file.d.cts","names":[],"sources":["../../../src/core/components/source-file.tsx"],"mappings":";;;;;;KAkCY,eAAA,GAAkB,iBAAA,GAC5B,cAAA;;;AADF;;;;EAQI,OAAA,GAAU,aAAA;EAAA;;;;;;EAQV,IAAA,GAAO,MAAA;AAAA;;;;;AASX;;iBAAgB,UAAA,CAAW,KAAA,EAAO,eAAA,GAAe,
|
|
1
|
+
{"version":3,"file":"source-file.d.cts","names":[],"sources":["../../../src/core/components/source-file.tsx"],"mappings":";;;;;;KAkCY,eAAA,GAAkB,iBAAA,GAC5B,cAAA;;;AADF;;;;EAQI,OAAA,GAAU,aAAA;EAAA;;;;;;EAQV,IAAA,GAAO,MAAA;AAAA;;;;;AASX;;iBAAgB,UAAA,CAAW,KAAA,EAAO,eAAA,GAAe,iBAAA,CAAA,QAAA;AAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentProps } from "../../types/components.mjs";
|
|
2
|
-
import * as _alloy_js_core0 from "@alloy-js/core";
|
|
2
|
+
import * as _$_alloy_js_core0 from "@alloy-js/core";
|
|
3
3
|
import { SourceFileProps as SourceFileProps$1 } from "@alloy-js/core";
|
|
4
4
|
import { StoragePreset } from "powerlines";
|
|
5
5
|
|
|
@@ -26,7 +26,7 @@ type SourceFileProps = SourceFileProps$1 & ComponentProps & {
|
|
|
26
26
|
* @param props - The properties for the source file.
|
|
27
27
|
* @returns The rendered source file component.
|
|
28
28
|
*/
|
|
29
|
-
declare function SourceFile(props: SourceFileProps): _alloy_js_core0.Children;
|
|
29
|
+
declare function SourceFile(props: SourceFileProps): _$_alloy_js_core0.Children;
|
|
30
30
|
declare type __ΩSourceFileProps = any[];
|
|
31
31
|
//#endregion
|
|
32
32
|
export { SourceFile, SourceFileProps, __ΩSourceFileProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"source-file.d.mts","names":[],"sources":["../../../src/core/components/source-file.tsx"],"mappings":";;;;;;KAkCY,eAAA,GAAkB,iBAAA,GAC5B,cAAA;;;AADF;;;;EAQI,OAAA,GAAU,aAAA;EAAA;;;;;;EAQV,IAAA,GAAO,MAAA;AAAA;;;;;AASX;;iBAAgB,UAAA,CAAW,KAAA,EAAO,eAAA,GAAe,
|
|
1
|
+
{"version":3,"file":"source-file.d.mts","names":[],"sources":["../../../src/core/components/source-file.tsx"],"mappings":";;;;;;KAkCY,eAAA,GAAkB,iBAAA,GAC5B,cAAA;;;AADF;;;;EAQI,OAAA,GAAU,aAAA;EAAA;;;;;;EAQV,IAAA,GAAO,MAAA;AAAA;;;;;AASX;;iBAAgB,UAAA,CAAW,KAAA,EAAO,eAAA,GAAe,iBAAA,CAAA,QAAA;AAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as _alloy_js_core0 from "@alloy-js/core";
|
|
1
|
+
import * as _$_alloy_js_core0 from "@alloy-js/core";
|
|
2
2
|
|
|
3
3
|
//#region src/core/components/spacing.d.ts
|
|
4
4
|
interface SpacingProps {
|
|
@@ -17,7 +17,7 @@ interface SpacingProps {
|
|
|
17
17
|
*/
|
|
18
18
|
declare function Spacing({
|
|
19
19
|
scale
|
|
20
|
-
}: SpacingProps): _alloy_js_core0.Children;
|
|
20
|
+
}: SpacingProps): _$_alloy_js_core0.Children;
|
|
21
21
|
declare type __ΩSpacingProps = any[];
|
|
22
22
|
//#endregion
|
|
23
23
|
export { Spacing, SpacingProps, __ΩSpacingProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spacing.d.cts","names":[],"sources":["../../../src/core/components/spacing.tsx"],"mappings":";;;UAoBiB,YAAA;;;AAAjB;;;;;AAeA;EANE,KAAA;AAAA;;;;iBAMc,OAAA,CAAA;EAAU;AAAA,GAAa,YAAA,GAAY,
|
|
1
|
+
{"version":3,"file":"spacing.d.cts","names":[],"sources":["../../../src/core/components/spacing.tsx"],"mappings":";;;UAoBiB,YAAA;;;AAAjB;;;;;AAeA;EANE,KAAA;AAAA;;;;iBAMc,OAAA,CAAA;EAAU;AAAA,GAAa,YAAA,GAAY,iBAAA,CAAA,QAAA;AAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as _alloy_js_core0 from "@alloy-js/core";
|
|
1
|
+
import * as _$_alloy_js_core0 from "@alloy-js/core";
|
|
2
2
|
|
|
3
3
|
//#region src/core/components/spacing.d.ts
|
|
4
4
|
interface SpacingProps {
|
|
@@ -17,7 +17,7 @@ interface SpacingProps {
|
|
|
17
17
|
*/
|
|
18
18
|
declare function Spacing({
|
|
19
19
|
scale
|
|
20
|
-
}: SpacingProps): _alloy_js_core0.Children;
|
|
20
|
+
}: SpacingProps): _$_alloy_js_core0.Children;
|
|
21
21
|
declare type __ΩSpacingProps = any[];
|
|
22
22
|
//#endregion
|
|
23
23
|
export { Spacing, SpacingProps, __ΩSpacingProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spacing.d.mts","names":[],"sources":["../../../src/core/components/spacing.tsx"],"mappings":";;;UAoBiB,YAAA;;;AAAjB;;;;;AAeA;EANE,KAAA;AAAA;;;;iBAMc,OAAA,CAAA;EAAU;AAAA,GAAa,YAAA,GAAY,
|
|
1
|
+
{"version":3,"file":"spacing.d.mts","names":[],"sources":["../../../src/core/components/spacing.tsx"],"mappings":";;;UAoBiB,YAAA;;;AAAjB;;;;;AAeA;EANE,KAAA;AAAA;;;;iBAMc,OAAA,CAAA;EAAU;AAAA,GAAa,YAAA,GAAY,iBAAA,CAAA,QAAA;AAAA"}
|
|
@@ -18,4 +18,5 @@ exports.usePowerlinesSafe = require_core_contexts_context.usePowerlinesSafe;
|
|
|
18
18
|
exports.useReflectionClass = require_core_contexts_reflection.useReflectionClass;
|
|
19
19
|
exports.useReflectionMethod = require_core_contexts_reflection.useReflectionMethod;
|
|
20
20
|
exports.useReflectionParameter = require_core_contexts_reflection.useReflectionParameter;
|
|
21
|
-
exports.useReflectionProperty = require_core_contexts_reflection.useReflectionProperty;
|
|
21
|
+
exports.useReflectionProperty = require_core_contexts_reflection.useReflectionProperty;
|
|
22
|
+
exports.useReflectionPropertyContext = require_core_contexts_reflection.useReflectionPropertyContext;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { PowerlinesContext, usePowerlines, usePowerlinesContext, usePowerlinesSafe } from "./context.cjs";
|
|
2
2
|
import { MetaContext, MetaItem, __ΩMetaItem, useMeta, useMetaContext, useMetaSafe } from "./meta.cjs";
|
|
3
|
-
import { ReflectionClassContext, ReflectionClassContextInterface, ReflectionMethodContext, ReflectionParameterContext, ReflectionPropertyContext, __ΩReflectionClassContextInterface, useReflectionClass, useReflectionMethod, useReflectionParameter, useReflectionProperty } from "./reflection.cjs";
|
|
4
|
-
export { MetaContext, MetaItem, PowerlinesContext, ReflectionClassContext, ReflectionClassContextInterface, ReflectionMethodContext, ReflectionParameterContext, ReflectionPropertyContext, __ΩMetaItem, __ΩReflectionClassContextInterface, useMeta, useMetaContext, useMetaSafe, usePowerlines, usePowerlinesContext, usePowerlinesSafe, useReflectionClass, useReflectionMethod, useReflectionParameter, useReflectionProperty };
|
|
3
|
+
import { ReflectionClassContext, ReflectionClassContextInterface, ReflectionMethodContext, ReflectionParameterContext, ReflectionPropertyContext, ReflectionPropertyContextInterface, __ΩReflectionClassContextInterface, __ΩReflectionPropertyContextInterface, useReflectionClass, useReflectionMethod, useReflectionParameter, useReflectionProperty, useReflectionPropertyContext } from "./reflection.cjs";
|
|
4
|
+
export { MetaContext, MetaItem, PowerlinesContext, ReflectionClassContext, ReflectionClassContextInterface, ReflectionMethodContext, ReflectionParameterContext, ReflectionPropertyContext, ReflectionPropertyContextInterface, __ΩMetaItem, __ΩReflectionClassContextInterface, __ΩReflectionPropertyContextInterface, useMeta, useMetaContext, useMetaSafe, usePowerlines, usePowerlinesContext, usePowerlinesSafe, useReflectionClass, useReflectionMethod, useReflectionParameter, useReflectionProperty, useReflectionPropertyContext };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { PowerlinesContext, usePowerlines, usePowerlinesContext, usePowerlinesSafe } from "./context.mjs";
|
|
2
2
|
import { MetaContext, MetaItem, __ΩMetaItem, useMeta, useMetaContext, useMetaSafe } from "./meta.mjs";
|
|
3
|
-
import { ReflectionClassContext, ReflectionClassContextInterface, ReflectionMethodContext, ReflectionParameterContext, ReflectionPropertyContext, __ΩReflectionClassContextInterface, useReflectionClass, useReflectionMethod, useReflectionParameter, useReflectionProperty } from "./reflection.mjs";
|
|
4
|
-
export { MetaContext, MetaItem, PowerlinesContext, ReflectionClassContext, ReflectionClassContextInterface, ReflectionMethodContext, ReflectionParameterContext, ReflectionPropertyContext, __ΩMetaItem, __ΩReflectionClassContextInterface, useMeta, useMetaContext, useMetaSafe, usePowerlines, usePowerlinesContext, usePowerlinesSafe, useReflectionClass, useReflectionMethod, useReflectionParameter, useReflectionProperty };
|
|
3
|
+
import { ReflectionClassContext, ReflectionClassContextInterface, ReflectionMethodContext, ReflectionParameterContext, ReflectionPropertyContext, ReflectionPropertyContextInterface, __ΩReflectionClassContextInterface, __ΩReflectionPropertyContextInterface, useReflectionClass, useReflectionMethod, useReflectionParameter, useReflectionProperty, useReflectionPropertyContext } from "./reflection.mjs";
|
|
4
|
+
export { MetaContext, MetaItem, PowerlinesContext, ReflectionClassContext, ReflectionClassContextInterface, ReflectionMethodContext, ReflectionParameterContext, ReflectionPropertyContext, ReflectionPropertyContextInterface, __ΩMetaItem, __ΩReflectionClassContextInterface, __ΩReflectionPropertyContextInterface, useMeta, useMetaContext, useMetaSafe, usePowerlines, usePowerlinesContext, usePowerlinesSafe, useReflectionClass, useReflectionMethod, useReflectionParameter, useReflectionProperty, useReflectionPropertyContext };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PowerlinesContext, usePowerlines, usePowerlinesContext, usePowerlinesSafe } from "./context.mjs";
|
|
2
2
|
import { MetaContext, useMeta, useMetaContext, useMetaSafe } from "./meta.mjs";
|
|
3
|
-
import { ReflectionClassContext, ReflectionMethodContext, ReflectionParameterContext, ReflectionPropertyContext, useReflectionClass, useReflectionMethod, useReflectionParameter, useReflectionProperty } from "./reflection.mjs";
|
|
3
|
+
import { ReflectionClassContext, ReflectionMethodContext, ReflectionParameterContext, ReflectionPropertyContext, useReflectionClass, useReflectionMethod, useReflectionParameter, useReflectionProperty, useReflectionPropertyContext } from "./reflection.mjs";
|
|
4
4
|
|
|
5
|
-
export { MetaContext, PowerlinesContext, ReflectionClassContext, ReflectionMethodContext, ReflectionParameterContext, ReflectionPropertyContext, useMeta, useMetaContext, useMetaSafe, usePowerlines, usePowerlinesContext, usePowerlinesSafe, useReflectionClass, useReflectionMethod, useReflectionParameter, useReflectionProperty };
|
|
5
|
+
export { MetaContext, PowerlinesContext, ReflectionClassContext, ReflectionMethodContext, ReflectionParameterContext, ReflectionPropertyContext, useMeta, useMetaContext, useMetaSafe, usePowerlines, usePowerlinesContext, usePowerlinesSafe, useReflectionClass, useReflectionMethod, useReflectionParameter, useReflectionProperty, useReflectionPropertyContext };
|
|
@@ -26,12 +26,22 @@ const ReflectionPropertyContext = (0, _alloy_js_core.createNamedContext)("Reflec
|
|
|
26
26
|
*
|
|
27
27
|
* @returns A reactive version of the current reflection.
|
|
28
28
|
*/
|
|
29
|
-
function
|
|
29
|
+
function useReflectionPropertyContext() {
|
|
30
30
|
const context = (0, _alloy_js_core.useContext)(ReflectionPropertyContext);
|
|
31
31
|
if (!context) throw new Error("Powerlines - Reflection Property Context is not set. Please make sure the Alloy components are being provided to an invocation of the `render` function added to plugins by `@powerlines/plugin-alloy`.");
|
|
32
32
|
return context;
|
|
33
33
|
}
|
|
34
34
|
/**
|
|
35
|
+
* Hook to access the Reflection Property context.
|
|
36
|
+
*
|
|
37
|
+
* @returns A reactive version of the current reflection.
|
|
38
|
+
*/
|
|
39
|
+
function useReflectionProperty() {
|
|
40
|
+
const context = useReflectionPropertyContext();
|
|
41
|
+
if (!context) throw new Error("Powerlines - Reflection Property Context is not set. Please make sure the Alloy components are being provided to an invocation of the `render` function added to plugins by `@powerlines/plugin-alloy`.");
|
|
42
|
+
return context;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
35
45
|
* The reflection method context used in template rendering.
|
|
36
46
|
*/
|
|
37
47
|
const ReflectionMethodContext = (0, _alloy_js_core.createNamedContext)("ReflectionMethod");
|
|
@@ -66,4 +76,5 @@ exports.ReflectionPropertyContext = ReflectionPropertyContext;
|
|
|
66
76
|
exports.useReflectionClass = useReflectionClass;
|
|
67
77
|
exports.useReflectionMethod = useReflectionMethod;
|
|
68
78
|
exports.useReflectionParameter = useReflectionParameter;
|
|
69
|
-
exports.useReflectionProperty = useReflectionProperty;
|
|
79
|
+
exports.useReflectionProperty = useReflectionProperty;
|
|
80
|
+
exports.useReflectionPropertyContext = useReflectionPropertyContext;
|
|
@@ -17,16 +17,26 @@ declare const ReflectionClassContext: ComponentContext<ReflectionClassContextInt
|
|
|
17
17
|
* @returns A reactive version of the current reflection.
|
|
18
18
|
*/
|
|
19
19
|
declare function useReflectionClass<T extends Record<string, any> = Record<string, any>>(): ReflectionClassContextInterface<T>;
|
|
20
|
+
interface ReflectionPropertyContextInterface {
|
|
21
|
+
property: ReflectionProperty;
|
|
22
|
+
defaultValue?: any;
|
|
23
|
+
}
|
|
20
24
|
/**
|
|
21
25
|
* The reflection property context used in template rendering.
|
|
22
26
|
*/
|
|
23
|
-
declare const ReflectionPropertyContext: ComponentContext<
|
|
27
|
+
declare const ReflectionPropertyContext: ComponentContext<ReflectionPropertyContextInterface>;
|
|
28
|
+
/**
|
|
29
|
+
* Hook to access the Reflection Property context.
|
|
30
|
+
*
|
|
31
|
+
* @returns A reactive version of the current reflection.
|
|
32
|
+
*/
|
|
33
|
+
declare function useReflectionPropertyContext(): ReflectionPropertyContextInterface;
|
|
24
34
|
/**
|
|
25
35
|
* Hook to access the Reflection Property context.
|
|
26
36
|
*
|
|
27
37
|
* @returns A reactive version of the current reflection.
|
|
28
38
|
*/
|
|
29
|
-
declare function useReflectionProperty():
|
|
39
|
+
declare function useReflectionProperty(): ReflectionPropertyContextInterface;
|
|
30
40
|
/**
|
|
31
41
|
* The reflection method context used in template rendering.
|
|
32
42
|
*/
|
|
@@ -48,6 +58,7 @@ declare const ReflectionParameterContext: ComponentContext<ReflectionParameter>;
|
|
|
48
58
|
*/
|
|
49
59
|
declare function useReflectionParameter(): ReflectionParameter;
|
|
50
60
|
declare type __ΩReflectionClassContextInterface = any[];
|
|
61
|
+
declare type __ΩReflectionPropertyContextInterface = any[];
|
|
51
62
|
//#endregion
|
|
52
|
-
export { ReflectionClassContext, ReflectionClassContextInterface, ReflectionMethodContext, ReflectionParameterContext, ReflectionPropertyContext, __ΩReflectionClassContextInterface, useReflectionClass, useReflectionMethod, useReflectionParameter, useReflectionProperty };
|
|
63
|
+
export { ReflectionClassContext, ReflectionClassContextInterface, ReflectionMethodContext, ReflectionParameterContext, ReflectionPropertyContext, ReflectionPropertyContextInterface, __ΩReflectionClassContextInterface, __ΩReflectionPropertyContextInterface, useReflectionClass, useReflectionMethod, useReflectionParameter, useReflectionProperty, useReflectionPropertyContext };
|
|
53
64
|
//# sourceMappingURL=reflection.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reflection.d.cts","names":[],"sources":["../../../src/core/contexts/reflection.ts"],"mappings":";;;;;UA4BiB,+BAAA,WACL,MAAA,gBAAsB,MAAA;EAEhC,UAAA,EAAY,eAAA,CAAgB,CAAA;EAC5B,QAAA,GAAW,2BAAA,CAA4B,CAAA;AAAA;;;;cAM5B,sBAAA,EAAwB,gBAAA,CACnC,+BAAA;;;;;;iBAQc,kBAAA,WACJ,MAAA,gBAAsB,MAAA,cAAA,CAAA,GAAmB,+BAAA,CAAA,CAAA;;;;
|
|
1
|
+
{"version":3,"file":"reflection.d.cts","names":[],"sources":["../../../src/core/contexts/reflection.ts"],"mappings":";;;;;UA4BiB,+BAAA,WACL,MAAA,gBAAsB,MAAA;EAEhC,UAAA,EAAY,eAAA,CAAgB,CAAA;EAC5B,QAAA,GAAW,2BAAA,CAA4B,CAAA;AAAA;;;;cAM5B,sBAAA,EAAwB,gBAAA,CACnC,+BAAA;;;;;;iBAQc,kBAAA,WACJ,MAAA,gBAAsB,MAAA,cAAA,CAAA,GAAmB,+BAAA,CAAA,CAAA;AAAA,UAepC,kCAAA;EACf,QAAA,EAAU,kBAAA;EACV,YAAA;AAAA;;;;cAMW,yBAAA,EAA2B,gBAAA,CAAiB,kCAAA;;;AAjCzD;;;iBAyCgB,4BAAA,CAAA,GAA4B,kCAAA;;AAhC5C;;;;iBAmDgB,qBAAA,CAAA,GAAqB,kCAAA;;;;cAexB,uBAAA,EAAyB,gBAAA,CAAiB,gBAAA;;;;;;iBAQvC,mBAAA,CAAA,GAAmB,gBAAA;;AA1DnC;;cAyEa,0BAAA,EAA4B,gBAAA,CAAiB,mBAAA;;;;;;iBAQ1C,sBAAA,CAAA,GAAsB,mBAAA;AAAA"}
|