@powerlines/plugin-alloy 0.26.25 → 0.26.27

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 (105) hide show
  1. package/dist/core/components/infrastructure-file.cjs +13 -8
  2. package/dist/core/components/infrastructure-file.mjs +13 -8
  3. package/dist/core/components/infrastructure-file.mjs.map +1 -1
  4. package/dist/core/components/output.cjs +17 -10
  5. package/dist/core/components/output.mjs +17 -10
  6. package/dist/core/components/output.mjs.map +1 -1
  7. package/dist/core/components/single-line-comment.cjs +6 -4
  8. package/dist/core/components/single-line-comment.mjs +6 -4
  9. package/dist/core/components/single-line-comment.mjs.map +1 -1
  10. package/dist/core/components/source-file.cjs +10 -6
  11. package/dist/core/components/source-file.mjs +10 -6
  12. package/dist/core/components/source-file.mjs.map +1 -1
  13. package/dist/core/components/spacing.cjs +6 -4
  14. package/dist/core/components/spacing.mjs +6 -4
  15. package/dist/core/components/spacing.mjs.map +1 -1
  16. package/dist/core/contexts/context.mjs.map +1 -1
  17. package/dist/core/contexts/meta.mjs.map +1 -1
  18. package/dist/core/contexts/reflection.mjs.map +1 -1
  19. package/dist/core/helpers/code.mjs.map +1 -1
  20. package/dist/hcl/components/block-declaration.cjs +12 -8
  21. package/dist/hcl/components/block-declaration.mjs +12 -8
  22. package/dist/hcl/components/block-declaration.mjs.map +1 -1
  23. package/dist/hcl/components/hcl-file.cjs +35 -21
  24. package/dist/hcl/components/hcl-file.mjs +36 -22
  25. package/dist/hcl/components/hcl-file.mjs.map +1 -1
  26. package/dist/hcl/components/packer-file.cjs +8 -8
  27. package/dist/hcl/components/packer-file.mjs +8 -8
  28. package/dist/hcl/components/packer-file.mjs.map +1 -1
  29. package/dist/hcl/components/terraform-file.cjs +8 -8
  30. package/dist/hcl/components/terraform-file.mjs +8 -8
  31. package/dist/hcl/components/terraform-file.mjs.map +1 -1
  32. package/dist/helpers/capnp.mjs.map +1 -1
  33. package/dist/helpers/create-builtin.mjs.map +1 -1
  34. package/dist/helpers/refkey.mjs.map +1 -1
  35. package/dist/helpers/typescript.mjs.map +1 -1
  36. package/dist/index.cjs +16 -8
  37. package/dist/index.d.cts.map +1 -1
  38. package/dist/index.d.mts.map +1 -1
  39. package/dist/index.mjs +15 -8
  40. package/dist/index.mjs.map +1 -1
  41. package/dist/markdown/components/front-matter.cjs +9 -7
  42. package/dist/markdown/components/front-matter.mjs +9 -7
  43. package/dist/markdown/components/front-matter.mjs.map +1 -1
  44. package/dist/markdown/components/markdown-file.cjs +76 -44
  45. package/dist/markdown/components/markdown-file.mjs +76 -44
  46. package/dist/markdown/components/markdown-file.mjs.map +1 -1
  47. package/dist/markdown/components/markdown-table.cjs +49 -28
  48. package/dist/markdown/components/markdown-table.mjs +49 -28
  49. package/dist/markdown/components/markdown-table.mjs.map +1 -1
  50. package/dist/markdown/contexts/markdown-table.mjs.map +1 -1
  51. package/dist/render.cjs +3 -3
  52. package/dist/render.mjs +4 -4
  53. package/dist/render.mjs.map +1 -1
  54. package/dist/types/components.cjs +9 -0
  55. package/dist/types/components.mjs +10 -1
  56. package/dist/types/components.mjs.map +1 -0
  57. package/dist/typescript/components/builtin-file.cjs +30 -20
  58. package/dist/typescript/components/builtin-file.mjs +30 -20
  59. package/dist/typescript/components/builtin-file.mjs.map +1 -1
  60. package/dist/typescript/components/class-declaration.cjs +180 -100
  61. package/dist/typescript/components/class-declaration.mjs +180 -100
  62. package/dist/typescript/components/class-declaration.mjs.map +1 -1
  63. package/dist/typescript/components/dynamic-import-statement.cjs +2 -6
  64. package/dist/typescript/components/dynamic-import-statement.mjs +2 -6
  65. package/dist/typescript/components/dynamic-import-statement.mjs.map +1 -1
  66. package/dist/typescript/components/entry-file.cjs +10 -7
  67. package/dist/typescript/components/entry-file.mjs +10 -7
  68. package/dist/typescript/components/entry-file.mjs.map +1 -1
  69. package/dist/typescript/components/interface-declaration.cjs +127 -74
  70. package/dist/typescript/components/interface-declaration.mjs +127 -74
  71. package/dist/typescript/components/interface-declaration.mjs.map +1 -1
  72. package/dist/typescript/components/object-declaration.cjs +84 -50
  73. package/dist/typescript/components/object-declaration.mjs +84 -50
  74. package/dist/typescript/components/object-declaration.mjs.map +1 -1
  75. package/dist/typescript/components/property-name.cjs +3 -3
  76. package/dist/typescript/components/property-name.mjs +3 -3
  77. package/dist/typescript/components/property-name.mjs.map +1 -1
  78. package/dist/typescript/components/record-expression.mjs.map +1 -1
  79. package/dist/typescript/components/tsdoc-reflection.cjs +241 -108
  80. package/dist/typescript/components/tsdoc-reflection.mjs +241 -108
  81. package/dist/typescript/components/tsdoc-reflection.mjs.map +1 -1
  82. package/dist/typescript/components/tsdoc.cjs +265 -168
  83. package/dist/typescript/components/tsdoc.mjs +265 -168
  84. package/dist/typescript/components/tsdoc.mjs.map +1 -1
  85. package/dist/typescript/components/type-declaration.cjs +20 -15
  86. package/dist/typescript/components/type-declaration.mjs +20 -15
  87. package/dist/typescript/components/type-declaration.mjs.map +1 -1
  88. package/dist/typescript/components/type-parameters.cjs +56 -29
  89. package/dist/typescript/components/type-parameters.mjs +56 -29
  90. package/dist/typescript/components/type-parameters.mjs.map +1 -1
  91. package/dist/typescript/components/typescript-file.cjs +135 -74
  92. package/dist/typescript/components/typescript-file.mjs +135 -74
  93. package/dist/typescript/components/typescript-file.mjs.map +1 -1
  94. package/dist/typescript/contexts/lexical-scope.cjs +5 -3
  95. package/dist/typescript/contexts/lexical-scope.mjs +5 -3
  96. package/dist/typescript/contexts/lexical-scope.mjs.map +1 -1
  97. package/dist/typescript/contexts/member-scope.cjs +5 -3
  98. package/dist/typescript/contexts/member-scope.mjs +5 -3
  99. package/dist/typescript/contexts/member-scope.mjs.map +1 -1
  100. package/dist/typescript/helpers/get-call-signature-props.mjs.map +1 -1
  101. package/dist/typescript/helpers/utilities.mjs.map +1 -1
  102. package/dist/yaml/components/yaml-file.cjs +92 -47
  103. package/dist/yaml/components/yaml-file.mjs +92 -47
  104. package/dist/yaml/components/yaml-file.mjs.map +1 -1
  105. package/package.json +6 -6
@@ -2,13 +2,13 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
3
3
  const require_core_contexts_context = require('../contexts/context.cjs');
4
4
  const require_core_components_source_file = require('./source-file.cjs');
5
- let _alloy_js_core = require("@alloy-js/core");
6
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");
7
8
  let _stryke_path_append = require("@stryke/path/append");
8
9
  let _stryke_path_replace = require("@stryke/path/replace");
9
10
  let defu = require("defu");
10
11
  defu = require_runtime.__toESM(defu);
11
- let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
12
12
 
13
13
  //#region src/core/components/infrastructure-file.tsx
14
14
  /**
@@ -30,13 +30,18 @@ function InfrastructureFile(props) {
30
30
  const path = (0, _alloy_js_core.computed)(() => {
31
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.config.cwd)) : id), filetype.value);
32
32
  });
33
- return /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(require_core_components_source_file.SourceFile, {
34
- ...rest,
35
- filetype: filetype.value,
36
- path: path.value,
37
- meta: (0, defu.default)({ kind: "infrastructure" }, meta ?? {}),
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
+ },
38
43
  children
39
- });
44
+ }));
40
45
  }
41
46
 
42
47
  //#endregion
@@ -1,11 +1,11 @@
1
1
  import { usePowerlinesSafe } from "../contexts/context.mjs";
2
2
  import { SourceFile } from "./source-file.mjs";
3
- import { computed, splitProps } from "@alloy-js/core";
4
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";
5
6
  import { appendExtension, appendPath } from "@stryke/path/append";
6
7
  import { replaceExtension, replacePath } from "@stryke/path/replace";
7
8
  import defu from "defu";
8
- import { jsx } from "@alloy-js/core/jsx-runtime";
9
9
 
10
10
  //#region src/core/components/infrastructure-file.tsx
11
11
  /**
@@ -27,13 +27,18 @@ function InfrastructureFile(props) {
27
27
  const path = computed(() => {
28
28
  return appendExtension(replaceExtension(context ? appendPath(id, replacePath(context.infrastructurePath, context.config.cwd)) : id), filetype.value);
29
29
  });
30
- return /* @__PURE__ */ jsx(SourceFile, {
31
- ...rest,
32
- filetype: filetype.value,
33
- path: path.value,
34
- meta: defu({ kind: "infrastructure" }, meta ?? {}),
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
+ },
35
40
  children
36
- });
41
+ }));
37
42
  }
38
43
 
39
44
  //#endregion
@@ -1 +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(context.infrastructurePath, context.config.cwd)\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":";;;;;;;;;;;;;;;;AAkDA,SAAgB,mBAAmB,OAAgC;CACjE,MAAM,CAAC,EAAE,UAAU,MAAM,IAAI,WAAW,UAAU,aAAa,QAC7D,WAAW,OAAO;EAAC;EAAY;EAAQ;EAAM;EAAa;EAAW,CAAC;CAExE,MAAM,UAAU,mBAAmB;CACnC,MAAM,WAAW,eAEb,aACA,WAAW,QAAQ,QAAQ,GAAG,KAC7B,iBAAiB,GAAG,GAAG,sBAAsB,GAAG,GAAG,IACvD;CACD,MAAM,OAAO,eAAe;AAQ1B,SAAO,gBAAgB,iBAPT,UACV,WACE,IACA,YAAY,QAAQ,oBAAoB,QAAQ,OAAO,IAAI,CAC5D,GACD,GAE0C,EAAE,SAAS,MAAM;GAC/D;AAEF,QACE,oBAAC,YAAD;EACE,GAAI;EACJ,UAAU,SAAS;EACnB,MAAM,KAAK;EACX,MAAM,KACJ,EACE,MAAM,kBACP,EACD,QAAQ,EAAE,CACX;EACA;EACU"}
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(context.infrastructurePath, context.config.cwd)\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":";;;;;;;;;;;;;;;;AAgCA,SAAI,mBAAA,OAAA;CACF,MAAI,CAAA,YAEF,MACA,IACD,WACC,UAAE,aACD,QAAQ,WAAW,OAAM;EAAA;EAAc;EAAQ;EAAC;EAAkB;EAAO,CAAA;CAC5E,MAAE,UAAA,mBAAA;CACF,MAAA,WAAY,eAAM,aAAA,WAAA,QAAA,QAAA,GAAA,KAAA,iBAAA,GAAA,GAAA,sBAAA,GAAA,GAAA,IAAA;CACnB,MAAA,OAAA,eAAA;AAEC,SAAA,gBAAA,4GAAA,EAAA,SAAA,MAAA;GACE;AACH,QAAA,gBAAA,YAAA,WAAA,MAAA;EACG,IAAA,WAAc;AACd,UAAQ,SAAI;;EAEhB,IAAO,OAAQ;AACb,UAAS,KAAA;;;AAGT,UAAM,KAAU,EACV,MAAA,kBACD,EAAC,QAAA,EAAA,CAAA;;EAEF;EACH,CAAC,CAAC"}
@@ -3,8 +3,8 @@ const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
3
3
  const require_core_contexts_context = require('../contexts/context.cjs');
4
4
  const require_core_contexts_meta = require('../contexts/meta.cjs');
5
5
  require('../contexts/index.cjs');
6
- let _alloy_js_core = require("@alloy-js/core");
7
6
  let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
7
+ let _alloy_js_core = require("@alloy-js/core");
8
8
 
9
9
  //#region src/core/components/output.tsx
10
10
  /**
@@ -17,16 +17,23 @@ function Output(props) {
17
17
  "meta"
18
18
  ]);
19
19
  const contextRef = (0, _alloy_js_core.computed)(() => context);
20
- return /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(require_core_contexts_meta.MetaContext.Provider, {
20
+ return (0, _alloy_js_core_jsx_runtime.createComponent)(require_core_contexts_meta.MetaContext.Provider, {
21
21
  value: meta,
22
- children: /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(require_core_contexts_context.PowerlinesContext.Provider, {
23
- value: contextRef.value,
24
- children: /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(_alloy_js_core.Output, {
25
- ...rest,
26
- basePath: contextRef.value.config.cwd,
27
- children
28
- })
29
- })
22
+ get children() {
23
+ return (0, _alloy_js_core_jsx_runtime.createComponent)(require_core_contexts_context.PowerlinesContext.Provider, {
24
+ get value() {
25
+ return contextRef.value;
26
+ },
27
+ get children() {
28
+ return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Output, (0, _alloy_js_core_jsx_runtime.mergeProps)(rest, {
29
+ get basePath() {
30
+ return contextRef.value.config.cwd;
31
+ },
32
+ children
33
+ }));
34
+ }
35
+ });
36
+ }
30
37
  });
31
38
  }
32
39
 
@@ -1,8 +1,8 @@
1
1
  import { PowerlinesContext } from "../contexts/context.mjs";
2
2
  import { MetaContext } from "../contexts/meta.mjs";
3
3
  import "../contexts/index.mjs";
4
+ import { createComponent, mergeProps } from "@alloy-js/core/jsx-runtime";
4
5
  import { Output as Output$1, computed, splitProps } from "@alloy-js/core";
5
- import { jsx } from "@alloy-js/core/jsx-runtime";
6
6
 
7
7
  //#region src/core/components/output.tsx
8
8
  /**
@@ -15,16 +15,23 @@ function Output(props) {
15
15
  "meta"
16
16
  ]);
17
17
  const contextRef = computed(() => context);
18
- return /* @__PURE__ */ jsx(MetaContext.Provider, {
18
+ return createComponent(MetaContext.Provider, {
19
19
  value: meta,
20
- children: /* @__PURE__ */ jsx(PowerlinesContext.Provider, {
21
- value: contextRef.value,
22
- children: /* @__PURE__ */ jsx(Output$1, {
23
- ...rest,
24
- basePath: contextRef.value.config.cwd,
25
- children
26
- })
27
- })
20
+ get children() {
21
+ return createComponent(PowerlinesContext.Provider, {
22
+ get value() {
23
+ return contextRef.value;
24
+ },
25
+ get children() {
26
+ return createComponent(Output$1, mergeProps(rest, {
27
+ get basePath() {
28
+ return contextRef.value.config.cwd;
29
+ },
30
+ children
31
+ }));
32
+ }
33
+ });
34
+ }
28
35
  });
29
36
  }
30
37
 
@@ -1 +1 @@
1
- {"version":3,"file":"output.mjs","names":["OutputExternal"],"sources":["../../../src/core/components/output.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 type { OutputProps as OutputPropsExternal } from \"@alloy-js/core\";\nimport { computed, Output as OutputExternal, splitProps } from \"@alloy-js/core\";\nimport type { PluginContext } from \"@powerlines/core\";\nimport { MetaContext, MetaItem } from \"../contexts\";\nimport { PowerlinesContext } from \"../contexts/context\";\n\nexport interface OutputProps<\n TContext extends PluginContext = PluginContext\n> extends Omit<OutputPropsExternal, \"basePath\"> {\n /**\n * The current Powerlines process context.\n */\n context: TContext;\n\n /**\n * The file metadata collected during rendering.\n */\n meta?: Record<string, MetaItem>;\n}\n\n/**\n * Output component for rendering the Powerlines plugin's output files via templates.\n */\nexport function Output<TContext extends PluginContext = PluginContext>(\n props: OutputProps<TContext>\n) {\n const [{ children, context, meta = {} }, rest] = splitProps(props, [\n \"children\",\n \"context\",\n \"meta\"\n ]);\n\n const contextRef = computed(() => context);\n\n return (\n <MetaContext.Provider value={meta}>\n <PowerlinesContext.Provider value={contextRef.value}>\n <OutputExternal {...rest} basePath={contextRef.value.config.cwd}>\n {children}\n </OutputExternal>\n </PowerlinesContext.Provider>\n </MetaContext.Provider>\n );\n}\n"],"mappings":";;;;;;;;;;AAyCA,SAAgB,OACd,OACA;CACA,MAAM,CAAC,EAAE,UAAU,SAAS,OAAO,EAAE,IAAI,QAAQ,WAAW,OAAO;EACjE;EACA;EACA;EACD,CAAC;CAEF,MAAM,aAAa,eAAe,QAAQ;AAE1C,QACE,oBAAC,YAAY,UAAb;EAAsB,OAAO;YAC3B,oBAAC,kBAAkB,UAAnB;GAA4B,OAAO,WAAW;aAC5C,oBAACA,UAAD;IAAgB,GAAI;IAAM,UAAU,WAAW,MAAM,OAAO;IACzD;IACc;GACU;EACR"}
1
+ {"version":3,"file":"output.mjs","names":[],"sources":["../../../src/core/components/output.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 type { OutputProps as OutputPropsExternal } from \"@alloy-js/core\";\nimport { computed, Output as OutputExternal, splitProps } from \"@alloy-js/core\";\nimport type { PluginContext } from \"@powerlines/core\";\nimport { MetaContext, MetaItem } from \"../contexts\";\nimport { PowerlinesContext } from \"../contexts/context\";\n\nexport interface OutputProps<\n TContext extends PluginContext = PluginContext\n> extends Omit<OutputPropsExternal, \"basePath\"> {\n /**\n * The current Powerlines process context.\n */\n context: TContext;\n\n /**\n * The file metadata collected during rendering.\n */\n meta?: Record<string, MetaItem>;\n}\n\n/**\n * Output component for rendering the Powerlines plugin's output files via templates.\n */\nexport function Output<TContext extends PluginContext = PluginContext>(\n props: OutputProps<TContext>\n) {\n const [{ children, context, meta = {} }, rest] = splitProps(props, [\n \"children\",\n \"context\",\n \"meta\"\n ]);\n\n const contextRef = computed(() => context);\n\n return (\n <MetaContext.Provider value={meta}>\n <PowerlinesContext.Provider value={contextRef.value}>\n <OutputExternal {...rest} basePath={contextRef.value.config.cwd}>\n {children}\n </OutputExternal>\n </PowerlinesContext.Provider>\n </MetaContext.Provider>\n );\n}\n"],"mappings":";;;;;;;;;;AAyBA,SAAW,OAAQ,OAAA;CACjB,MAAA,CAAO,EACL,UACA,SACA,OAAA,EAAA,IACF,QAAS,WAAQ,OAAA;EAAA;EAAA;EAAA;EAAA,CAAA;;AAEjB,QAAE,gBAAA,YAAA,UAAA;EACA,OAAK;EACL,IAAA,WAAA;AACE,UAAG,gBAAe,kBAAS,UAAA;IACjC,IAAA,QAAA;;;IAGG,IAAO,WAAa;AACrB,YAAA,gBAAA,UAAA,WAAA,MAAA;MACK,IAAS,WAAO;AACd,cAAY,WAAQ,MAAA,OAAA;;MAER;MAChB,CAAA,CAAQ;;IAER,CAAA"}
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
3
- let _alloy_js_core = require("@alloy-js/core");
4
3
  let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
4
+ let _alloy_js_core = require("@alloy-js/core");
5
5
 
6
6
  //#region src/core/components/single-line-comment.tsx
7
7
  /**
@@ -11,10 +11,12 @@ let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
11
11
  function SingleLineComment(props) {
12
12
  const { variant = "double-slash", children } = props;
13
13
  const commentStart = variant === "slash-star" ? "/* " : variant === "slash-star-star" ? "/** " : variant === "triple-slash" ? "/// " : variant === "markdown" ? "<!-- " : variant === "yaml" || variant === "hcl" ? "# " : "// ";
14
- return /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsxs)(_alloy_js_core_jsx_runtime.Fragment, { children: [commentStart, /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsxs)("align", {
14
+ return [commentStart, (0, _alloy_js_core_jsx_runtime.createIntrinsic)("align", {
15
15
  string: commentStart,
16
- children: [/* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(_alloy_js_core.Prose, { children }), variant === "slash-star" || variant === "slash-star-star" ? " */ " : variant === "markdown" ? " -->" : ""]
17
- })] });
16
+ get children() {
17
+ return [(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Prose, { children }), variant === "slash-star" || variant === "slash-star-star" ? " */ " : variant === "markdown" ? " -->" : ""];
18
+ }
19
+ })];
18
20
  }
19
21
 
20
22
  //#endregion
@@ -1,5 +1,5 @@
1
+ import { createComponent, createIntrinsic } from "@alloy-js/core/jsx-runtime";
1
2
  import { Prose } from "@alloy-js/core";
2
- import { Fragment, jsx, jsxs } from "@alloy-js/core/jsx-runtime";
3
3
 
4
4
  //#region src/core/components/single-line-comment.tsx
5
5
  /**
@@ -9,10 +9,12 @@ import { Fragment, jsx, jsxs } from "@alloy-js/core/jsx-runtime";
9
9
  function SingleLineComment(props) {
10
10
  const { variant = "double-slash", children } = props;
11
11
  const commentStart = variant === "slash-star" ? "/* " : variant === "slash-star-star" ? "/** " : variant === "triple-slash" ? "/// " : variant === "markdown" ? "<!-- " : variant === "yaml" || variant === "hcl" ? "# " : "// ";
12
- return /* @__PURE__ */ jsxs(Fragment, { children: [commentStart, /* @__PURE__ */ jsxs("align", {
12
+ return [commentStart, createIntrinsic("align", {
13
13
  string: commentStart,
14
- children: [/* @__PURE__ */ jsx(Prose, { children }), variant === "slash-star" || variant === "slash-star-star" ? " */ " : variant === "markdown" ? " -->" : ""]
15
- })] });
14
+ get children() {
15
+ return [createComponent(Prose, { children }), variant === "slash-star" || variant === "slash-star-star" ? " */ " : variant === "markdown" ? " -->" : ""];
16
+ }
17
+ })];
16
18
  }
17
19
 
18
20
  //#endregion
@@ -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 | \"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":";;;;;;;;AA2CA,SAAgB,kBAAkB,OAA+B;CAC/D,MAAM,EAAE,UAAU,gBAAgB,aAAa;CAE/C,MAAM,eACJ,YAAY,eACR,QACA,YAAY,oBACV,SACA,YAAY,iBACV,SACA,YAAY,aACV,UACA,YAAY,UAAU,YAAY,QAChC,OACA;AAEd,QACE,4CACG,cACD,qBAAC,SAAD;EAAO,QAAQ;YAAf,CACE,oBAAC,OAAD,EAAQ,UAAiB,GAExB,YAAY,gBAAgB,YAAY,oBACrC,SACA,YAAY,aACV,SACA,GACA;IACP"}
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":";;;;;;;;AAyBA,SAAgB,kBAAI,OAAA;CAClB,MAAG,EACD,UAAK,gBACL;CAEJ,MAAO,eAAU,YAAA,eAA+B,QAAA,YAAe,oBAAA,SAAA,YAAA,iBAAA,SAAA,YAAA,aAAA,UAAA,YAAA,UAAA,YAAA,QAAA,OAAA;AAC7D,QAAE,CAAA,cAAA,gBAAA,SAAA;EACA,QAAK;EACN,IAAA,WAAA;AACG,UAAA,CAAA,gBAA0B,OAAA,EAC5B,UACF,CAAA,EAAQ,YAAE,gBAAwB,YAAA,oBAAA,SAAA,YAAA,aAAA,SAAA,GAAA"}
@@ -1,11 +1,11 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
3
3
  const require_core_contexts_meta = require('../contexts/meta.cjs');
4
+ let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
4
5
  let _alloy_js_core = require("@alloy-js/core");
5
6
  let _stryke_path_append = require("@stryke/path/append");
6
7
  let defu = require("defu");
7
8
  defu = require_runtime.__toESM(defu);
8
- let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
9
9
 
10
10
  //#region src/core/components/source-file.tsx
11
11
  /**
@@ -47,12 +47,16 @@ function SourceFile(props) {
47
47
  storage,
48
48
  ...meta ?? {}
49
49
  };
50
- return /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsxs)(_alloy_js_core.SourceFileContext.Provider, {
50
+ return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.SourceFileContext.Provider, {
51
51
  value: sourceFile,
52
- children: [/* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsxs)(_alloy_js_core.Show, {
53
- when: header !== void 0,
54
- children: [header, /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)("hbr", {})]
55
- }), children]
52
+ get children() {
53
+ return [(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
54
+ when: header !== void 0,
55
+ get children() {
56
+ return [header, (0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})];
57
+ }
58
+ }), children];
59
+ }
56
60
  });
57
61
  }
58
62
 
@@ -1,8 +1,8 @@
1
1
  import { useMeta } from "../contexts/meta.mjs";
2
+ import { createComponent, createIntrinsic } from "@alloy-js/core/jsx-runtime";
2
3
  import { Show, SourceDirectoryContext, SourceFileContext, getContext, splitProps, useContext, useFormatOptions } from "@alloy-js/core";
3
4
  import { appendPath } from "@stryke/path/append";
4
5
  import defu from "defu";
5
- import { jsx, jsxs } from "@alloy-js/core/jsx-runtime";
6
6
 
7
7
  //#region src/core/components/source-file.tsx
8
8
  /**
@@ -44,12 +44,16 @@ function SourceFile(props) {
44
44
  storage,
45
45
  ...meta ?? {}
46
46
  };
47
- return /* @__PURE__ */ jsxs(SourceFileContext.Provider, {
47
+ return createComponent(SourceFileContext.Provider, {
48
48
  value: sourceFile,
49
- children: [/* @__PURE__ */ jsxs(Show, {
50
- when: header !== void 0,
51
- children: [header, /* @__PURE__ */ jsx("hbr", {})]
52
- }), children]
49
+ get children() {
50
+ return [createComponent(Show, {
51
+ when: header !== void 0,
52
+ get children() {
53
+ return [header, createIntrinsic("hbr", {})];
54
+ }
55
+ }), children];
56
+ }
53
57
  });
54
58
  }
55
59
 
@@ -1 +1 @@
1
- {"version":3,"file":"source-file.mjs","names":[],"sources":["../../../src/core/components/source-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 {\n getContext,\n Show,\n SourceDirectoryContext,\n SourceFileContext,\n SourceFileProps as SourceFilePropsExternal,\n splitProps,\n useContext,\n useFormatOptions\n} from \"@alloy-js/core\";\nimport { appendPath } from \"@stryke/path/append\";\nimport defu from \"defu\";\nimport type { StoragePreset } from \"powerlines\";\nimport { ComponentProps } from \"../../types/components\";\nimport { useMeta } from \"../contexts/meta\";\n\nexport type SourceFileProps = SourceFilePropsExternal &\n ComponentProps & {\n /**\n * The storage preset for the output files.\n *\n * @remarks\n * If not specified, the output mode will be determined by the provided `output.mode` value.\n */\n storage?: StoragePreset;\n\n /**\n * The metadata associated with the source file.\n *\n * @remarks\n * The values stored in the metadata will be available in the rendering context.\n */\n meta?: Record<string, any>;\n };\n\n/**\n * A base component representing a Powerlines generated source file.\n *\n * @param props - The properties for the source file.\n * @returns The rendered source file component.\n */\nexport function SourceFile(props: SourceFileProps) {\n const [{ children, meta, path, header, storage, filetype, reference }] =\n splitProps(props, [\n \"children\",\n \"meta\",\n \"path\",\n \"header\",\n \"storage\",\n \"filetype\",\n \"reference\"\n ]);\n\n const metadata = useMeta();\n const parentDirectory = useContext(SourceDirectoryContext)!;\n\n const sourceFile: SourceFileContext = {\n path: appendPath(path, parentDirectory.path),\n filetype,\n reference\n };\n parentDirectory?.addContent(sourceFile);\n\n const printOptions = useFormatOptions({\n printWidth: props.printWidth,\n tabWidth: props.tabWidth,\n useTabs: props.useTabs,\n insertFinalNewLine: props.insertFinalNewLine\n });\n\n const nodeContext = getContext()!;\n nodeContext.meta = defu(\n {\n sourceFile,\n printOptions\n },\n meta ?? {}\n );\n\n if (metadata) {\n metadata[sourceFile.path] = {\n storage,\n ...(meta ?? {})\n };\n }\n\n return (\n <SourceFileContext.Provider value={sourceFile}>\n <Show when={header !== undefined}>\n {header}\n <hbr />\n </Show>\n {children}\n </SourceFileContext.Provider>\n );\n}\n"],"mappings":";;;;;;;;;;;;;AA2DA,SAAgB,WAAW,OAAwB;CACjD,MAAM,CAAC,EAAE,UAAU,MAAM,MAAM,QAAQ,SAAS,UAAU,eACxD,WAAW,OAAO;EAChB;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CAAC;CAEJ,MAAM,WAAW,SAAS;CAC1B,MAAM,kBAAkB,WAAW,uBAAuB;CAE1D,MAAM,aAAgC;EACpC,MAAM,WAAW,MAAM,gBAAgB,KAAK;EAC5C;EACA;EACD;AACD,kBAAiB,WAAW,WAAW;CAEvC,MAAM,eAAe,iBAAiB;EACpC,YAAY,MAAM;EAClB,UAAU,MAAM;EAChB,SAAS,MAAM;EACf,oBAAoB,MAAM;EAC3B,CAAC;CAEF,MAAM,cAAc,YAAY;AAChC,aAAY,OAAO,KACjB;EACE;EACA;EACD,EACD,QAAQ,EAAE,CACX;AAED,KAAI,SACF,UAAS,WAAW,QAAQ;EAC1B;EACA,GAAI,QAAQ,EAAE;EACf;AAGH,QACE,qBAAC,kBAAkB,UAAnB;EAA4B,OAAO;YAAnC,CACE,qBAAC,MAAD;GAAM,MAAM,WAAW;aAAvB,CACG,QACD,oBAAC,OAAD,EAAO,EACF;MACN,SAC0B"}
1
+ {"version":3,"file":"source-file.mjs","names":[],"sources":["../../../src/core/components/source-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 {\n getContext,\n Show,\n SourceDirectoryContext,\n SourceFileContext,\n SourceFileProps as SourceFilePropsExternal,\n splitProps,\n useContext,\n useFormatOptions\n} from \"@alloy-js/core\";\nimport { appendPath } from \"@stryke/path/append\";\nimport defu from \"defu\";\nimport type { StoragePreset } from \"powerlines\";\nimport { ComponentProps } from \"../../types/components\";\nimport { useMeta } from \"../contexts/meta\";\n\nexport type SourceFileProps = SourceFilePropsExternal &\n ComponentProps & {\n /**\n * The storage preset for the output files.\n *\n * @remarks\n * If not specified, the output mode will be determined by the provided `output.mode` value.\n */\n storage?: StoragePreset;\n\n /**\n * The metadata associated with the source file.\n *\n * @remarks\n * The values stored in the metadata will be available in the rendering context.\n */\n meta?: Record<string, any>;\n };\n\n/**\n * A base component representing a Powerlines generated source file.\n *\n * @param props - The properties for the source file.\n * @returns The rendered source file component.\n */\nexport function SourceFile(props: SourceFileProps) {\n const [{ children, meta, path, header, storage, filetype, reference }] =\n splitProps(props, [\n \"children\",\n \"meta\",\n \"path\",\n \"header\",\n \"storage\",\n \"filetype\",\n \"reference\"\n ]);\n\n const metadata = useMeta();\n const parentDirectory = useContext(SourceDirectoryContext)!;\n\n const sourceFile: SourceFileContext = {\n path: appendPath(path, parentDirectory.path),\n filetype,\n reference\n };\n parentDirectory?.addContent(sourceFile);\n\n const printOptions = useFormatOptions({\n printWidth: props.printWidth,\n tabWidth: props.tabWidth,\n useTabs: props.useTabs,\n insertFinalNewLine: props.insertFinalNewLine\n });\n\n const nodeContext = getContext()!;\n nodeContext.meta = defu(\n {\n sourceFile,\n printOptions\n },\n meta ?? {}\n );\n\n if (metadata) {\n metadata[sourceFile.path] = {\n storage,\n ...(meta ?? {})\n };\n }\n\n return (\n <SourceFileContext.Provider value={sourceFile}>\n <Show when={header !== undefined}>\n {header}\n <hbr />\n </Show>\n {children}\n </SourceFileContext.Provider>\n );\n}\n"],"mappings":";;;;;;;;;;;;;AA8BA,SAAc,WAAa,OAAO;CAClC,MAAQ,CAAC,EACT,gBAEA,MACE,QACE,SACA,UACA,eACG,WAAC,OAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA,CAAA;CACN,MAAK,WAAO,SAAc;CAC1B,MAAI,kBAAA,WAAA,uBAAA;CACJ,MAAE,aAAU;;EAEV;EACA;EACD;AACD,kBAAM,WAAA,WAAA;CACN,MAAK,eAAW,iBAAsB;EACpC,YAAE,MAAA;EACF,UAAO,MAAO;EACf,SAAA,MAAA;;EAED,CAAA;CACA,MAAG,cAAe,YAAc;AACjC,aAAA,OAAA,KAAA;EACG;EACA;EACF,EAAA,QAAA,EAAA,CAAA;AACF,KAAM,SACJ,UAAS,WAAU,QAAW;EAC5B;EACE,GAAC,QAAS,EAAA;EACX;AAEH,QAAK,gBAAO,kBAAA,UAAA;EACV,OAAG;EACH,IAAG,WAAS;AACV,UAAC,CAAA,gBAAS,MAAA;IACV,MAAA,WAAA;;AAEE,YAAS,CAAC,QAAQ,gBAAE,OAAA,EAAA,CAAA,CAAA;;;;EAIzB,CAAC"}
@@ -1,16 +1,18 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
3
- let _alloy_js_core = require("@alloy-js/core");
4
3
  let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
4
+ let _alloy_js_core = require("@alloy-js/core");
5
5
 
6
6
  //#region src/core/components/spacing.tsx
7
7
  /**
8
8
  * A simple component that renders two horizontal breaks to create vertical spacing between elements.
9
9
  */
10
10
  function Spacing({ scale = 1 }) {
11
- return /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(_alloy_js_core.For, {
12
- each: Array.from({ length: scale }),
13
- children: (_) => /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsxs)(_alloy_js_core_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)("hbr", {}), /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)("hbr", {})] })
11
+ return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.For, {
12
+ get each() {
13
+ return Array.from({ length: scale });
14
+ },
15
+ children: (_) => [(0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}), (0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})]
14
16
  });
15
17
  }
16
18
 
@@ -1,14 +1,16 @@
1
+ import { createComponent, createIntrinsic } from "@alloy-js/core/jsx-runtime";
1
2
  import { For } from "@alloy-js/core";
2
- import { Fragment, jsx, jsxs } from "@alloy-js/core/jsx-runtime";
3
3
 
4
4
  //#region src/core/components/spacing.tsx
5
5
  /**
6
6
  * A simple component that renders two horizontal breaks to create vertical spacing between elements.
7
7
  */
8
8
  function Spacing({ scale = 1 }) {
9
- return /* @__PURE__ */ jsx(For, {
10
- each: Array.from({ length: scale }),
11
- children: (_) => /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("hbr", {}), /* @__PURE__ */ jsx("hbr", {})] })
9
+ return createComponent(For, {
10
+ get each() {
11
+ return Array.from({ length: scale });
12
+ },
13
+ children: (_) => [createIntrinsic("hbr", {}), createIntrinsic("hbr", {})]
12
14
  });
13
15
  }
14
16
 
@@ -1 +1 @@
1
- {"version":3,"file":"spacing.mjs","names":[],"sources":["../../../src/core/components/spacing.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 { For } from \"@alloy-js/core\";\n\nexport interface SpacingProps {\n /**\n * A scale factor that determines the amount of vertical space to be added.\n *\n * @remarks\n * The default value is 1, which corresponds to a standard spacing. A value of 2 would double the spacing, while a value of 0.5 would halve it.\n *\n * @defaultValue 1\n */\n scale?: number;\n}\n\n/**\n * A simple component that renders two horizontal breaks to create vertical spacing between elements.\n */\nexport function Spacing({ scale = 1 }: SpacingProps) {\n return (\n <For each={Array.from({ length: scale })}>\n {_ => (\n <>\n <hbr />\n <hbr />\n </>\n )}\n </For>\n );\n}\n"],"mappings":";;;;;;;AAmCA,SAAgB,QAAQ,EAAE,QAAQ,KAAmB;AACnD,QACE,oBAAC,KAAD;EAAK,MAAM,MAAM,KAAK,EAAE,QAAQ,OAAO,CAAC;aACrC,MACC,4CACE,oBAAC,OAAD,EAAO,GACP,oBAAC,OAAD,EAAO,EACN;EAED"}
1
+ {"version":3,"file":"spacing.mjs","names":[],"sources":["../../../src/core/components/spacing.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 { For } from \"@alloy-js/core\";\n\nexport interface SpacingProps {\n /**\n * A scale factor that determines the amount of vertical space to be added.\n *\n * @remarks\n * The default value is 1, which corresponds to a standard spacing. A value of 2 would double the spacing, while a value of 0.5 would halve it.\n *\n * @defaultValue 1\n */\n scale?: number;\n}\n\n/**\n * A simple component that renders two horizontal breaks to create vertical spacing between elements.\n */\nexport function Spacing({ scale = 1 }: SpacingProps) {\n return (\n <For each={Array.from({ length: scale })}>\n {_ => (\n <>\n <hbr />\n <hbr />\n </>\n )}\n </For>\n );\n}\n"],"mappings":";;;;;;;AAuBA,SAAG,QAAA,EACD,QAAI,KACH;AACD,QAAC,gBAAA,KAAA;EACC,IAAE,OAAA;AACF,UAAA,MAAA,KAAA,EACI,QAAQ,OAChB,CAAA;;EAEE,WAAA,MAAA,CAAA,gBAAA,OAAA,EAAA,CAAA,EAAA,gBAAA,OAAA,EAAA,CAAA,CAAA;EACC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"context.mjs","names":[],"sources":["../../../src/core/contexts/context.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport {\n ComponentContext,\n createNamedContext,\n useContext\n} from \"@alloy-js/core\";\nimport type { PluginContext } from \"powerlines\";\n\n/**\n * The Powerlines context used in template rendering.\n */\nexport const PowerlinesContext: ComponentContext<PluginContext> =\n createNamedContext<PluginContext>(\"Powerlines\");\n\n/**\n * Hook to access the Powerlines Context.\n *\n * @returns The Context.\n */\nexport function usePowerlinesContext<\n TContext extends PluginContext = PluginContext\n>(): TContext | undefined {\n return useContext(PowerlinesContext) as TContext | undefined;\n}\n\n/**\n * Hook to safely access the {@link PluginContext | Powerlines context}.\n *\n * @returns The Powerlines context or undefined if not set.\n */\nexport function usePowerlinesSafe<\n TContext extends PluginContext = PluginContext\n>(): TContext | undefined {\n const powerlines = usePowerlinesContext<TContext>();\n\n return powerlines ?? undefined;\n}\n\n/**\n * Hook to access the {@link PluginContext | Powerlines context}.\n *\n * @returns The Powerlines context.\n */\nexport function usePowerlines<\n TContext extends PluginContext = PluginContext\n>(): TContext {\n const powerlines = usePowerlinesSafe<TContext>();\n if (!powerlines) {\n throw new Error(\n \"Powerlines - 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`.\"\n );\n }\n\n return powerlines;\n}\n"],"mappings":";;;;;;AA4BA,MAAa,oBACX,mBAAkC,aAAa;;;;;;AAOjD,SAAgB,uBAEU;AACxB,QAAO,WAAW,kBAAkB;;;;;;;AAQtC,SAAgB,oBAEU;AAGxB,QAFmB,sBAAgC,IAE9B;;;;;;;AAQvB,SAAgB,gBAEF;CACZ,MAAM,aAAa,mBAA6B;AAChD,KAAI,CAAC,WACH,OAAM,IAAI,MACR,sLACD;AAGH,QAAO"}
1
+ {"version":3,"file":"context.mjs","names":[],"sources":["../../../src/core/contexts/context.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport {\n ComponentContext,\n createNamedContext,\n useContext\n} from \"@alloy-js/core\";\nimport type { PluginContext } from \"powerlines\";\n\n/**\n * The Powerlines context used in template rendering.\n */\nexport const PowerlinesContext: ComponentContext<PluginContext> =\n createNamedContext<PluginContext>(\"Powerlines\");\n\n/**\n * Hook to access the Powerlines Context.\n *\n * @returns The Context.\n */\nexport function usePowerlinesContext<\n TContext extends PluginContext = PluginContext\n>(): TContext | undefined {\n return useContext(PowerlinesContext) as TContext | undefined;\n}\n\n/**\n * Hook to safely access the {@link PluginContext | Powerlines context}.\n *\n * @returns The Powerlines context or undefined if not set.\n */\nexport function usePowerlinesSafe<\n TContext extends PluginContext = PluginContext\n>(): TContext | undefined {\n const powerlines = usePowerlinesContext<TContext>();\n\n return powerlines ?? undefined;\n}\n\n/**\n * Hook to access the {@link PluginContext | Powerlines context}.\n *\n * @returns The Powerlines context.\n */\nexport function usePowerlines<\n TContext extends PluginContext = PluginContext\n>(): TContext {\n const powerlines = usePowerlinesSafe<TContext>();\n if (!powerlines) {\n throw new Error(\n \"Powerlines - 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`.\"\n );\n }\n\n return powerlines;\n}\n"],"mappings":";;;;;;AAsBA,MAAS,oBAAc,mBAAA,aAAA;;;;;;AAOvB,SAAE,uBAAmC;;;;;;;;AASrC,SAAgB,oBAAU;AAE1B,QADoB,sBACpB,IAAA;;;;;;;AAQA,SAAW,gBAAqB;CAC9B,MAAG,aAAW,mBAAU;AACxB,KAAA,CAAK;AAGP,QAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"meta.mjs","names":[],"sources":["../../../src/core/contexts/meta.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport {\n ComponentContext,\n createNamedContext,\n useContext\n} from \"@alloy-js/core\";\nimport type { StoragePreset } from \"powerlines\";\n\nexport interface MetaItem {\n /**\n * The kind of metadata item.\n */\n kind?: \"builtin\" | \"entry\" | string;\n\n /**\n * Whether to skip formatting for this output.\n */\n skipFormat?: boolean;\n\n /**\n * The storage preset or adapter name for the output files.\n *\n * @remarks\n * If not specified, the output mode will be determined by the provided `output.mode` value.\n */\n storage?: StoragePreset | string;\n\n [key: string]: any;\n}\n\n/**\n * The Powerlines meta context used to determine metadata of files generated during rendering.\n */\nexport const MetaContext: ComponentContext<Record<string, MetaItem>> =\n createNamedContext<Record<string, MetaItem>>(\"Meta\");\n\n/**\n * Hook to access the Powerlines Context.\n *\n * @returns The Context.\n */\nexport function useMetaContext(): Record<string, MetaItem> | undefined {\n return useContext(MetaContext);\n}\n\n/**\n * Hook to safely access the render context's metadata.\n *\n * @returns The Powerlines context or undefined if not set.\n */\nexport function useMetaSafe(): Record<string, MetaItem> | undefined {\n const meta = useMetaContext();\n\n return meta ?? undefined;\n}\n\n/**\n * Hook to access the render context's metadata.\n *\n * @returns The Powerlines context.\n */\nexport function useMeta(): Record<string, MetaItem> {\n const meta = useMetaSafe();\n if (!meta) {\n throw new Error(\n \"Powerlines metadata is not available in the rendering context. Please make sure the Alloy components are being provided to an invocation of the `render` function added to plugins by `@powerlines/plugin-alloy`.\"\n );\n }\n\n return meta;\n}\n"],"mappings":";;;;;;AAkDA,MAAa,cACX,mBAA6C,OAAO;;;;;;AAOtD,SAAgB,iBAAuD;AACrE,QAAO,WAAW,YAAY;;;;;;;AAQhC,SAAgB,cAAoD;AAGlE,QAFa,gBAAgB,IAEd;;;;;;;AAQjB,SAAgB,UAAoC;CAClD,MAAM,OAAO,aAAa;AAC1B,KAAI,CAAC,KACH,OAAM,IAAI,MACR,oNACD;AAGH,QAAO"}
1
+ {"version":3,"file":"meta.mjs","names":[],"sources":["../../../src/core/contexts/meta.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport {\n ComponentContext,\n createNamedContext,\n useContext\n} from \"@alloy-js/core\";\nimport type { StoragePreset } from \"powerlines\";\n\nexport interface MetaItem {\n /**\n * The kind of metadata item.\n */\n kind?: \"builtin\" | \"entry\" | string;\n\n /**\n * Whether to skip formatting for this output.\n */\n skipFormat?: boolean;\n\n /**\n * The storage preset or adapter name for the output files.\n *\n * @remarks\n * If not specified, the output mode will be determined by the provided `output.mode` value.\n */\n storage?: StoragePreset | string;\n\n [key: string]: any;\n}\n\n/**\n * The Powerlines meta context used to determine metadata of files generated during rendering.\n */\nexport const MetaContext: ComponentContext<Record<string, MetaItem>> =\n createNamedContext<Record<string, MetaItem>>(\"Meta\");\n\n/**\n * Hook to access the Powerlines Context.\n *\n * @returns The Context.\n */\nexport function useMetaContext(): Record<string, MetaItem> | undefined {\n return useContext(MetaContext);\n}\n\n/**\n * Hook to safely access the render context's metadata.\n *\n * @returns The Powerlines context or undefined if not set.\n */\nexport function useMetaSafe(): Record<string, MetaItem> | undefined {\n const meta = useMetaContext();\n\n return meta ?? undefined;\n}\n\n/**\n * Hook to access the render context's metadata.\n *\n * @returns The Powerlines context.\n */\nexport function useMeta(): Record<string, MetaItem> {\n const meta = useMetaSafe();\n if (!meta) {\n throw new Error(\n \"Powerlines metadata is not available in the rendering context. Please make sure the Alloy components are being provided to an invocation of the `render` function added to plugins by `@powerlines/plugin-alloy`.\"\n );\n }\n\n return meta;\n}\n"],"mappings":";;;;;;AAsBA,MAAS,cAAc,mBAAA,OAAA;;;;;;AAOvB,SAAU,iBAAqB;;;;;;;;AAS/B,SAAG,cAAA;AAED,QADI,gBACM,IAAA;;;;;;;AAQZ,SAAO,UAAgB;CACrB,MAAA,OAAA,aAAA;AACF,KAAM,CAAC,KACL,OAAA,IAAA,MAAkB,oNAAkC;AAEpD,QAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"reflection.mjs","names":[],"sources":["../../../src/core/contexts/reflection.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type { ComponentContext } from \"@alloy-js/core\";\nimport { createContext, createNamedContext, useContext } from \"@alloy-js/core\";\nimport type {\n ReflectionClass,\n ReflectionMethod,\n ReflectionParameter,\n ReflectionProperty\n} from \"@powerlines/deepkit/vendor/type\";\nimport { ReflectionOverrideInterface } from \"../../types/components\";\n\nexport interface ReflectionClassContextInterface<\n T extends Record<string, any> = Record<string, any>\n> {\n reflection: ReflectionClass<T>;\n override?: ReflectionOverrideInterface<T>;\n}\n\n/**\n * The reflection class context used in template rendering.\n */\nexport const ReflectionClassContext: ComponentContext<\n ReflectionClassContextInterface<any>\n> = createContext<ReflectionClassContextInterface<any>>();\n\n/**\n * Hook to access the Reflection context.\n *\n * @returns A reactive version of the current reflection.\n */\nexport function useReflectionClass<\n T extends Record<string, any> = Record<string, any>\n>() {\n const context = useContext<ReflectionClassContextInterface<T>>(\n ReflectionClassContext\n )!;\n\n if (!context) {\n throw new Error(\n \"Powerlines - ReflectionClass 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`.\"\n );\n }\n\n return context;\n}\n\nexport interface ReflectionPropertyContextInterface {\n property: ReflectionProperty;\n defaultValue?: any;\n}\n\n/**\n * The reflection property context used in template rendering.\n */\nexport const ReflectionPropertyContext: ComponentContext<ReflectionPropertyContextInterface> =\n createNamedContext<ReflectionPropertyContextInterface>(\"ReflectionProperty\");\n\n/**\n * Hook to access the Reflection Property context.\n *\n * @returns A reactive version of the current reflection.\n */\nexport function useReflectionPropertyContext() {\n const context = useContext<ReflectionPropertyContextInterface>(\n ReflectionPropertyContext\n )!;\n\n if (!context) {\n throw new Error(\n \"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`.\"\n );\n }\n\n return context;\n}\n\n/**\n * Hook to access the Reflection Property context.\n *\n * @returns A reactive version of the current reflection.\n */\nexport function useReflectionProperty() {\n const context = useReflectionPropertyContext();\n\n if (!context) {\n throw new Error(\n \"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`.\"\n );\n }\n\n return context;\n}\n\n/**\n * The reflection method context used in template rendering.\n */\nexport const ReflectionMethodContext: ComponentContext<ReflectionMethod> =\n createNamedContext<ReflectionMethod>(\"ReflectionMethod\");\n\n/**\n * Hook to access the Reflection Method context.\n *\n * @returns A reactive version of the current reflection.\n */\nexport function useReflectionMethod() {\n const context = useContext<ReflectionMethod>(ReflectionMethodContext)!;\n\n if (!context) {\n throw new Error(\n \"Powerlines - Reflection Method 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`.\"\n );\n }\n\n return context;\n}\n\n/**\n * The reflection parameter context used in template rendering.\n */\nexport const ReflectionParameterContext: ComponentContext<ReflectionParameter> =\n createNamedContext<ReflectionParameter>(\"ReflectionParameter\");\n\n/**\n * Hook to access the Reflection Parameter context.\n *\n * @returns A reactive version of the current reflection.\n */\nexport function useReflectionParameter() {\n return useContext<ReflectionParameter>(ReflectionParameterContext)!;\n}\n"],"mappings":";;;;;;AAsCA,MAAa,yBAET,eAAqD;;;;;;AAOzD,SAAgB,qBAEZ;CACF,MAAM,UAAU,WACd,uBACD;AAED,KAAI,CAAC,QACH,OAAM,IAAI,MACR,sMACD;AAGH,QAAO;;;;;AAWT,MAAa,4BACX,mBAAuD,qBAAqB;;;;;;AAO9E,SAAgB,+BAA+B;CAC7C,MAAM,UAAU,WACd,0BACD;AAED,KAAI,CAAC,QACH,OAAM,IAAI,MACR,0MACD;AAGH,QAAO;;;;;;;AAQT,SAAgB,wBAAwB;CACtC,MAAM,UAAU,8BAA8B;AAE9C,KAAI,CAAC,QACH,OAAM,IAAI,MACR,0MACD;AAGH,QAAO;;;;;AAMT,MAAa,0BACX,mBAAqC,mBAAmB;;;;;;AAO1D,SAAgB,sBAAsB;CACpC,MAAM,UAAU,WAA6B,wBAAwB;AAErE,KAAI,CAAC,QACH,OAAM,IAAI,MACR,wMACD;AAGH,QAAO;;;;;AAMT,MAAa,6BACX,mBAAwC,sBAAsB;;;;;;AAOhE,SAAgB,yBAAyB;AACvC,QAAO,WAAgC,2BAA2B"}
1
+ {"version":3,"file":"reflection.mjs","names":[],"sources":["../../../src/core/contexts/reflection.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type { ComponentContext } from \"@alloy-js/core\";\nimport { createContext, createNamedContext, useContext } from \"@alloy-js/core\";\nimport type {\n ReflectionClass,\n ReflectionMethod,\n ReflectionParameter,\n ReflectionProperty\n} from \"@powerlines/deepkit/vendor/type\";\nimport { ReflectionOverrideInterface } from \"../../types/components\";\n\nexport interface ReflectionClassContextInterface<\n T extends Record<string, any> = Record<string, any>\n> {\n reflection: ReflectionClass<T>;\n override?: ReflectionOverrideInterface<T>;\n}\n\n/**\n * The reflection class context used in template rendering.\n */\nexport const ReflectionClassContext: ComponentContext<\n ReflectionClassContextInterface<any>\n> = createContext<ReflectionClassContextInterface<any>>();\n\n/**\n * Hook to access the Reflection context.\n *\n * @returns A reactive version of the current reflection.\n */\nexport function useReflectionClass<\n T extends Record<string, any> = Record<string, any>\n>() {\n const context = useContext<ReflectionClassContextInterface<T>>(\n ReflectionClassContext\n )!;\n\n if (!context) {\n throw new Error(\n \"Powerlines - ReflectionClass 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`.\"\n );\n }\n\n return context;\n}\n\nexport interface ReflectionPropertyContextInterface {\n property: ReflectionProperty;\n defaultValue?: any;\n}\n\n/**\n * The reflection property context used in template rendering.\n */\nexport const ReflectionPropertyContext: ComponentContext<ReflectionPropertyContextInterface> =\n createNamedContext<ReflectionPropertyContextInterface>(\"ReflectionProperty\");\n\n/**\n * Hook to access the Reflection Property context.\n *\n * @returns A reactive version of the current reflection.\n */\nexport function useReflectionPropertyContext() {\n const context = useContext<ReflectionPropertyContextInterface>(\n ReflectionPropertyContext\n )!;\n\n if (!context) {\n throw new Error(\n \"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`.\"\n );\n }\n\n return context;\n}\n\n/**\n * Hook to access the Reflection Property context.\n *\n * @returns A reactive version of the current reflection.\n */\nexport function useReflectionProperty() {\n const context = useReflectionPropertyContext();\n\n if (!context) {\n throw new Error(\n \"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`.\"\n );\n }\n\n return context;\n}\n\n/**\n * The reflection method context used in template rendering.\n */\nexport const ReflectionMethodContext: ComponentContext<ReflectionMethod> =\n createNamedContext<ReflectionMethod>(\"ReflectionMethod\");\n\n/**\n * Hook to access the Reflection Method context.\n *\n * @returns A reactive version of the current reflection.\n */\nexport function useReflectionMethod() {\n const context = useContext<ReflectionMethod>(ReflectionMethodContext)!;\n\n if (!context) {\n throw new Error(\n \"Powerlines - Reflection Method 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`.\"\n );\n }\n\n return context;\n}\n\n/**\n * The reflection parameter context used in template rendering.\n */\nexport const ReflectionParameterContext: ComponentContext<ReflectionParameter> =\n createNamedContext<ReflectionParameter>(\"ReflectionParameter\");\n\n/**\n * Hook to access the Reflection Parameter context.\n *\n * @returns A reactive version of the current reflection.\n */\nexport function useReflectionParameter() {\n return useContext<ReflectionParameter>(ReflectionParameterContext)!;\n}\n"],"mappings":";;;;;;AAuBA,MAAE,yBAAmB,eAAA;;;;;;AAOrB,SAAE,qBAAA;CACA,MAAA,UAAY,WAAe,uBAAG;AAC9B,KAAA,CAAA,QACF,OAAA,IAAA,MAAA,sMAAA;AAEE,QAAA;;;;;AAKF,MAAI,4BAAc,mBAAuC,qBAAA;;;;;;AAOzD,SAAgB,+BAAkB;CAChC,MAAE,UAAc,WAAS,0BAAyB;AAClD,KAAE,CAAA,QACF,OAAM,IAAA,MAAU,0MAA8C;AAE9D,QAAE;;;;;;;AAQJ,SAAgB,wBAAA;CAChB,MAAA,UAAA,8BAAA;cAEA,OAAO,IAAA,MAAU,0MAAmC;AAElD,QAAA;;;;;AAMF,MAAa,0BAA0B,mBAAkB,mBAAA;;;;;;AAOzD,SAAE,sBAAA;CACF,MAAO,UAAS,WAAA,wBAA+B;AAC7C,KAAA,CAAK,QACH,OAAA,IAAA,MAAA,wMAAA;;;;;;;;;;;;AAeJ,SAAc,yBAAwB;AACpC,QAAA,WAAA,2BAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"code.mjs","names":["baseCode"],"sources":["../../../src/core/helpers/code.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { code as baseCode, Children } from \"@alloy-js/core\";\n\n/**\n * Turn the provided string template into Children by replacing literal line\n * breaks with hardlines and automatically indenting indented content. Similar\n * in spirit to the `<code>` element in HTML.\n *\n * @see {@link text} for a similar function which treats whitespace similar to\n * JSX template bodies.\n *\n * @example\n * ```ts\n * code`\n * function greet(name: string) {\n * console.log(\"Hello, \" + name + \"!\");\n * }\n * `\n * ```\n *\n * @param template - The template string to be processed into Children.\n * @param substitutions - Any interpolated values within the template, which will be treated as Children and properly indented.\n * @returns A Children representation of the provided template string, with proper handling of line breaks and indentation.\n * @throws Will throw an error if the provided template contains only whitespace, as this is likely a mistake and would cause a less recognizable \"Cannot read properties of undefined\" exception later in the processing.\n */\nexport function code(\n template: TemplateStringsArray,\n ...substitutions: Children[]\n): Children {\n if (\n template.filter(seg => seg.trim()).length === 0 &&\n substitutions.length === 0\n ) {\n throw new Error(\n \"The `code` function cannot be used with a template that contains only whitespace. Please provide a non-empty template.\"\n );\n }\n\n return baseCode(template, ...substitutions);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA0CA,SAAgB,KACd,UACA,GAAG,eACO;AACV,KACE,SAAS,QAAO,QAAO,IAAI,MAAM,CAAC,CAAC,WAAW,KAC9C,cAAc,WAAW,EAEzB,OAAM,IAAI,MACR,yHACD;AAGH,QAAOA,OAAS,UAAU,GAAG,cAAc"}
1
+ {"version":3,"file":"code.mjs","names":[],"sources":["../../../src/core/helpers/code.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { code as baseCode, Children } from \"@alloy-js/core\";\n\n/**\n * Turn the provided string template into Children by replacing literal line\n * breaks with hardlines and automatically indenting indented content. Similar\n * in spirit to the `<code>` element in HTML.\n *\n * @see {@link text} for a similar function which treats whitespace similar to\n * JSX template bodies.\n *\n * @example\n * ```ts\n * code`\n * function greet(name: string) {\n * console.log(\"Hello, \" + name + \"!\");\n * }\n * `\n * ```\n *\n * @param template - The template string to be processed into Children.\n * @param substitutions - Any interpolated values within the template, which will be treated as Children and properly indented.\n * @returns A Children representation of the provided template string, with proper handling of line breaks and indentation.\n * @throws Will throw an error if the provided template contains only whitespace, as this is likely a mistake and would cause a less recognizable \"Cannot read properties of undefined\" exception later in the processing.\n */\nexport function code(\n template: TemplateStringsArray,\n ...substitutions: Children[]\n): Children {\n if (\n template.filter(seg => seg.trim()).length === 0 &&\n substitutions.length === 0\n ) {\n throw new Error(\n \"The `code` function cannot be used with a template that contains only whitespace. Please provide a non-empty template.\"\n );\n }\n\n return baseCode(template, ...substitutions);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA0CA,SAAgB,KAAI,UAAA,GAAA,eAAA;AAClB,KAAA,SAAU,QAAA,QAAA,IAAoB,MAAA,CAAA,CAAA,WAAA,KAAA,cAAA,WAAA,EAC5B,OAAC,IAAA,MAAe,yHAAS;AAE3B,QAAG,OAAA,UAAA,GAAA,cAAA"}
@@ -1,8 +1,8 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
3
3
  const require_core_helpers_code = require('../../core/helpers/code.cjs');
4
- let _alloy_js_core = require("@alloy-js/core");
5
4
  let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
5
+ let _alloy_js_core = require("@alloy-js/core");
6
6
 
7
7
  //#region src/hcl/components/block-declaration.tsx
8
8
  /**
@@ -16,14 +16,18 @@ let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
16
16
  */
17
17
  function BlockDeclaration(props) {
18
18
  const { children, type, label } = props;
19
- return /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsxs)(_alloy_js_core_jsx_runtime.Fragment, { children: [
20
- require_core_helpers_code.code`${type} ${Array.isArray(label) ? label.join(" ") : label} {`,
21
- /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(_alloy_js_core.Prose, { children: /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(_alloy_js_core.Show, {
22
- when: Boolean(children),
23
- children
24
- }) }),
19
+ return [
20
+ (0, _alloy_js_core_jsx_runtime.memo)(() => require_core_helpers_code.code`${type} ${Array.isArray(label) ? label.join(" ") : label} {`),
21
+ (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Prose, { get children() {
22
+ return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
23
+ get when() {
24
+ return Boolean(children);
25
+ },
26
+ children
27
+ });
28
+ } }),
25
29
  require_core_helpers_code.code`} `
26
- ] });
30
+ ];
27
31
  }
28
32
 
29
33
  //#endregion
@@ -1,6 +1,6 @@
1
1
  import { code as code$1 } from "../../core/helpers/code.mjs";
2
+ import { createComponent, memo } from "@alloy-js/core/jsx-runtime";
2
3
  import { Prose, Show } from "@alloy-js/core";
3
- import { Fragment, jsx, jsxs } from "@alloy-js/core/jsx-runtime";
4
4
 
5
5
  //#region src/hcl/components/block-declaration.tsx
6
6
  /**
@@ -14,14 +14,18 @@ import { Fragment, jsx, jsxs } from "@alloy-js/core/jsx-runtime";
14
14
  */
15
15
  function BlockDeclaration(props) {
16
16
  const { children, type, label } = props;
17
- return /* @__PURE__ */ jsxs(Fragment, { children: [
18
- code$1`${type} ${Array.isArray(label) ? label.join(" ") : label} {`,
19
- /* @__PURE__ */ jsx(Prose, { children: /* @__PURE__ */ jsx(Show, {
20
- when: Boolean(children),
21
- children
22
- }) }),
17
+ return [
18
+ memo(() => code$1`${type} ${Array.isArray(label) ? label.join(" ") : label} {`),
19
+ createComponent(Prose, { get children() {
20
+ return createComponent(Show, {
21
+ get when() {
22
+ return Boolean(children);
23
+ },
24
+ children
25
+ });
26
+ } }),
23
27
  code$1`} `
24
- ] });
28
+ ];
25
29
  }
26
30
 
27
31
  //#endregion