@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.
Files changed (168) hide show
  1. package/README.md +1 -1
  2. package/dist/core/components/index.cjs +3 -1
  3. package/dist/core/components/index.d.cts +3 -2
  4. package/dist/core/components/index.d.mts +3 -2
  5. package/dist/core/components/index.mjs +3 -2
  6. package/dist/core/components/infrastructure-file.cjs +48 -0
  7. package/dist/core/components/infrastructure-file.d.cts +28 -0
  8. package/dist/core/components/infrastructure-file.d.cts.map +1 -0
  9. package/dist/core/components/infrastructure-file.d.mts +28 -0
  10. package/dist/core/components/infrastructure-file.d.mts.map +1 -0
  11. package/dist/core/components/infrastructure-file.mjs +46 -0
  12. package/dist/core/components/infrastructure-file.mjs.map +1 -0
  13. package/dist/core/components/output.d.cts +2 -2
  14. package/dist/core/components/output.d.cts.map +1 -1
  15. package/dist/core/components/output.d.mts +2 -2
  16. package/dist/core/components/output.d.mts.map +1 -1
  17. package/dist/core/components/single-line-comment.cjs +1 -1
  18. package/dist/core/components/single-line-comment.d.cts +3 -3
  19. package/dist/core/components/single-line-comment.d.cts.map +1 -1
  20. package/dist/core/components/single-line-comment.d.mts +3 -3
  21. package/dist/core/components/single-line-comment.d.mts.map +1 -1
  22. package/dist/core/components/single-line-comment.mjs +1 -1
  23. package/dist/core/components/single-line-comment.mjs.map +1 -1
  24. package/dist/core/components/source-file.d.cts +2 -2
  25. package/dist/core/components/source-file.d.cts.map +1 -1
  26. package/dist/core/components/source-file.d.mts +2 -2
  27. package/dist/core/components/source-file.d.mts.map +1 -1
  28. package/dist/core/components/spacing.d.cts +2 -2
  29. package/dist/core/components/spacing.d.cts.map +1 -1
  30. package/dist/core/components/spacing.d.mts +2 -2
  31. package/dist/core/components/spacing.d.mts.map +1 -1
  32. package/dist/core/contexts/index.cjs +2 -1
  33. package/dist/core/contexts/index.d.cts +2 -2
  34. package/dist/core/contexts/index.d.mts +2 -2
  35. package/dist/core/contexts/index.mjs +2 -2
  36. package/dist/core/contexts/reflection.cjs +13 -2
  37. package/dist/core/contexts/reflection.d.cts +14 -3
  38. package/dist/core/contexts/reflection.d.cts.map +1 -1
  39. package/dist/core/contexts/reflection.d.mts +14 -3
  40. package/dist/core/contexts/reflection.d.mts.map +1 -1
  41. package/dist/core/contexts/reflection.mjs +12 -2
  42. package/dist/core/contexts/reflection.mjs.map +1 -1
  43. package/dist/core/index.cjs +5 -2
  44. package/dist/core/index.d.cts +4 -3
  45. package/dist/core/index.d.mts +4 -3
  46. package/dist/core/index.mjs +4 -3
  47. package/dist/hcl/components/block-declaration.cjs +34 -0
  48. package/dist/hcl/components/block-declaration.d.cts +22 -0
  49. package/dist/hcl/components/block-declaration.d.cts.map +1 -0
  50. package/dist/hcl/components/block-declaration.d.mts +22 -0
  51. package/dist/hcl/components/block-declaration.d.mts.map +1 -0
  52. package/dist/hcl/components/block-declaration.mjs +33 -0
  53. package/dist/hcl/components/block-declaration.mjs.map +1 -0
  54. package/dist/hcl/components/hcl-file.cjs +83 -0
  55. package/dist/hcl/components/hcl-file.d.cts +27 -0
  56. package/dist/hcl/components/hcl-file.d.cts.map +1 -0
  57. package/dist/hcl/components/hcl-file.d.mts +27 -0
  58. package/dist/hcl/components/hcl-file.d.mts.map +1 -0
  59. package/dist/hcl/components/hcl-file.mjs +81 -0
  60. package/dist/hcl/components/hcl-file.mjs.map +1 -0
  61. package/dist/hcl/components/index.cjs +11 -0
  62. package/dist/hcl/components/index.d.cts +5 -0
  63. package/dist/hcl/components/index.d.mts +5 -0
  64. package/dist/hcl/components/index.mjs +6 -0
  65. package/dist/hcl/components/packer-file.cjs +29 -0
  66. package/dist/hcl/components/packer-file.d.cts +19 -0
  67. package/dist/hcl/components/packer-file.d.cts.map +1 -0
  68. package/dist/hcl/components/packer-file.d.mts +19 -0
  69. package/dist/hcl/components/packer-file.d.mts.map +1 -0
  70. package/dist/hcl/components/packer-file.mjs +28 -0
  71. package/dist/hcl/components/packer-file.mjs.map +1 -0
  72. package/dist/hcl/components/terraform-file.cjs +30 -0
  73. package/dist/hcl/components/terraform-file.d.cts +20 -0
  74. package/dist/hcl/components/terraform-file.d.cts.map +1 -0
  75. package/dist/hcl/components/terraform-file.d.mts +20 -0
  76. package/dist/hcl/components/terraform-file.d.mts.map +1 -0
  77. package/dist/hcl/components/terraform-file.mjs +29 -0
  78. package/dist/hcl/components/terraform-file.mjs.map +1 -0
  79. package/dist/hcl/index.cjs +12 -0
  80. package/dist/hcl/index.d.cts +5 -0
  81. package/dist/hcl/index.d.mts +5 -0
  82. package/dist/hcl/index.mjs +7 -0
  83. package/dist/helpers/capnp.cjs +2 -2
  84. package/dist/helpers/capnp.mjs +2 -2
  85. package/dist/helpers/typescript.cjs +1 -1
  86. package/dist/helpers/typescript.mjs +1 -1
  87. package/dist/markdown/components/front-matter.d.cts +2 -2
  88. package/dist/markdown/components/front-matter.d.cts.map +1 -1
  89. package/dist/markdown/components/front-matter.d.mts +2 -2
  90. package/dist/markdown/components/front-matter.d.mts.map +1 -1
  91. package/dist/markdown/components/markdown-file.cjs +1 -1
  92. package/dist/markdown/components/markdown-file.d.cts +3 -3
  93. package/dist/markdown/components/markdown-file.d.cts.map +1 -1
  94. package/dist/markdown/components/markdown-file.d.mts +3 -3
  95. package/dist/markdown/components/markdown-file.d.mts.map +1 -1
  96. package/dist/markdown/components/markdown-file.mjs +1 -1
  97. package/dist/markdown/components/markdown-table.d.cts +4 -4
  98. package/dist/markdown/components/markdown-table.d.cts.map +1 -1
  99. package/dist/markdown/components/markdown-table.d.mts +4 -4
  100. package/dist/markdown/components/markdown-table.d.mts.map +1 -1
  101. package/dist/typescript/components/builtin-file.d.cts +2 -2
  102. package/dist/typescript/components/builtin-file.d.cts.map +1 -1
  103. package/dist/typescript/components/builtin-file.d.mts +2 -2
  104. package/dist/typescript/components/builtin-file.d.mts.map +1 -1
  105. package/dist/typescript/components/dynamic-import-statement.d.cts +2 -2
  106. package/dist/typescript/components/dynamic-import-statement.d.cts.map +1 -1
  107. package/dist/typescript/components/dynamic-import-statement.d.mts +2 -2
  108. package/dist/typescript/components/dynamic-import-statement.d.mts.map +1 -1
  109. package/dist/typescript/components/entry-file.cjs +1 -1
  110. package/dist/typescript/components/entry-file.d.cts +2 -2
  111. package/dist/typescript/components/entry-file.d.cts.map +1 -1
  112. package/dist/typescript/components/entry-file.d.mts +2 -2
  113. package/dist/typescript/components/entry-file.d.mts.map +1 -1
  114. package/dist/typescript/components/entry-file.mjs +1 -1
  115. package/dist/typescript/components/index.cjs +0 -2
  116. package/dist/typescript/components/index.d.cts +1 -2
  117. package/dist/typescript/components/index.d.mts +1 -2
  118. package/dist/typescript/components/index.mjs +1 -2
  119. package/dist/typescript/components/interface-declaration.cjs +16 -6
  120. package/dist/typescript/components/interface-declaration.d.cts +6 -5
  121. package/dist/typescript/components/interface-declaration.d.cts.map +1 -1
  122. package/dist/typescript/components/interface-declaration.d.mts +5 -4
  123. package/dist/typescript/components/interface-declaration.d.mts.map +1 -1
  124. package/dist/typescript/components/interface-declaration.mjs +16 -6
  125. package/dist/typescript/components/interface-declaration.mjs.map +1 -1
  126. package/dist/typescript/components/object-declaration.cjs +8 -2
  127. package/dist/typescript/components/object-declaration.d.cts +7 -7
  128. package/dist/typescript/components/object-declaration.d.cts.map +1 -1
  129. package/dist/typescript/components/object-declaration.d.mts +6 -6
  130. package/dist/typescript/components/object-declaration.d.mts.map +1 -1
  131. package/dist/typescript/components/object-declaration.mjs +8 -2
  132. package/dist/typescript/components/object-declaration.mjs.map +1 -1
  133. package/dist/typescript/components/property-name.d.cts +2 -2
  134. package/dist/typescript/components/property-name.d.cts.map +1 -1
  135. package/dist/typescript/components/property-name.d.mts +2 -2
  136. package/dist/typescript/components/property-name.d.mts.map +1 -1
  137. package/dist/typescript/components/tsdoc-reflection.cjs +15 -4
  138. package/dist/typescript/components/tsdoc-reflection.d.cts +8 -7
  139. package/dist/typescript/components/tsdoc-reflection.d.cts.map +1 -1
  140. package/dist/typescript/components/tsdoc-reflection.d.mts +8 -7
  141. package/dist/typescript/components/tsdoc-reflection.d.mts.map +1 -1
  142. package/dist/typescript/components/tsdoc-reflection.mjs +16 -5
  143. package/dist/typescript/components/tsdoc-reflection.mjs.map +1 -1
  144. package/dist/typescript/components/tsdoc.d.cts +1 -1
  145. package/dist/typescript/components/type-declaration.d.cts +2 -2
  146. package/dist/typescript/components/type-declaration.d.cts.map +1 -1
  147. package/dist/typescript/components/type-declaration.d.mts +2 -2
  148. package/dist/typescript/components/type-declaration.d.mts.map +1 -1
  149. package/dist/typescript/components/typescript-file.cjs +2 -2
  150. package/dist/typescript/components/typescript-file.mjs +2 -2
  151. package/dist/typescript/contexts/lexical-scope.d.cts +2 -2
  152. package/dist/typescript/contexts/lexical-scope.d.cts.map +1 -1
  153. package/dist/typescript/contexts/lexical-scope.d.mts +2 -2
  154. package/dist/typescript/contexts/lexical-scope.d.mts.map +1 -1
  155. package/dist/typescript/index.cjs +0 -2
  156. package/dist/typescript/index.d.cts +1 -2
  157. package/dist/typescript/index.d.mts +1 -2
  158. package/dist/typescript/index.mjs +1 -2
  159. package/dist/yaml/components/yaml-file.cjs +1 -1
  160. package/dist/yaml/components/yaml-file.mjs +1 -1
  161. package/package.json +104 -20
  162. package/dist/typescript/components/infrastructure-file.cjs +0 -40
  163. package/dist/typescript/components/infrastructure-file.d.cts +0 -21
  164. package/dist/typescript/components/infrastructure-file.d.cts.map +0 -1
  165. package/dist/typescript/components/infrastructure-file.d.mts +0 -21
  166. package/dist/typescript/components/infrastructure-file.d.mts.map +0 -1
  167. package/dist/typescript/components/infrastructure-file.mjs +0 -38
  168. 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
- [![Version](https://img.shields.io/badge/version-0.25.67-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://stormsoftware.com/projects/powerlines)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/powerlines/release.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
30
+ [![Version](https://img.shields.io/badge/version-0.25.69-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://stormsoftware.com/projects/powerlines)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/powerlines/release.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
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,eAAA,CAAU,QAAA;AAAA"}
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,eAAA,CAAU,QAAA;AAAA"}
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,UAQK,sBAAA,SAA+B,cAAA;;AARhD;;;;EAcE,OAAA,GAAU,wBAAA;AAAA;;;;;iBAOI,iBAAA,CAAkB,KAAA,EAAO,sBAAA,GAAsB,eAAA,CAAA,QAAA;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,UAQK,sBAAA,SAA+B,cAAA;;AARhD;;;;EAcE,OAAA,GAAU,wBAAA;AAAA;;;;;iBAOI,iBAAA,CAAkB,KAAA,EAAO,sBAAA,GAAsB,eAAA,CAAA,QAAA;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,SAAY,kBAAA,OAAwB;CACpC,MAAA,4BAEE,aACG;CACH,MAAK,eAAY,YAAS,eAAA,QAAA,YAAA,oBAAA,SAAA,YAAA,iBAAA,SAAA,YAAA,aAAA,UAAA,YAAA,SAAA,OAAA;AAC1B,QAAA,CAAA,cAAA,gBAAA,SAAA;EACF,QAAO;EACL,IAAM,WAAW;oCAEX,UACJ,CAAA,EAAA,YAAkB,gBAAK,YAAA,oBAAA,SAAA,YAAA,aAAA,SAAA,GAAA;;EAExB,CAAC,CAAC"}
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,eAAA,CAAA,QAAA;AAAA"}
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,eAAA,CAAA,QAAA;AAAA"}
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,eAAA,CAAA,QAAA;AAAA"}
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,eAAA,CAAA,QAAA;AAAA"}
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 useReflectionProperty() {
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<ReflectionProperty>;
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(): ReflectionProperty;
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;;;;cAkBxC,yBAAA,EAA2B,gBAAA,CAAiB,kBAAA;;;;;;iBAQzC,qBAAA,CAAA,GAAqB,kBAAA;AApCrC;;;AAAA,cAmDa,uBAAA,EAAyB,gBAAA,CAAiB,gBAAA;;AA1CvD;;;;iBAkDgB,mBAAA,CAAA,GAAmB,gBAAA;;;;cAetB,0BAAA,EAA4B,gBAAA,CAAiB,mBAAA;;;;;;iBAQ1C,sBAAA,CAAA,GAAsB,mBAAA;AAAA"}
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"}