@powerlines/plugin-alloy 0.26.18 → 0.26.20

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 (95) hide show
  1. package/dist/core/components/infrastructure-file.cjs +9 -14
  2. package/dist/core/components/infrastructure-file.mjs +9 -14
  3. package/dist/core/components/infrastructure-file.mjs.map +1 -1
  4. package/dist/core/components/output.cjs +10 -17
  5. package/dist/core/components/output.mjs +10 -17
  6. package/dist/core/components/output.mjs.map +1 -1
  7. package/dist/core/components/single-line-comment.cjs +4 -6
  8. package/dist/core/components/single-line-comment.mjs +4 -6
  9. package/dist/core/components/single-line-comment.mjs.map +1 -1
  10. package/dist/core/components/source-file.cjs +6 -10
  11. package/dist/core/components/source-file.mjs +6 -10
  12. package/dist/core/components/source-file.mjs.map +1 -1
  13. package/dist/core/components/spacing.cjs +4 -6
  14. package/dist/core/components/spacing.mjs +4 -6
  15. package/dist/core/components/spacing.mjs.map +1 -1
  16. package/dist/hcl/components/block-declaration.cjs +8 -12
  17. package/dist/hcl/components/block-declaration.mjs +8 -12
  18. package/dist/hcl/components/block-declaration.mjs.map +1 -1
  19. package/dist/hcl/components/hcl-file.cjs +21 -35
  20. package/dist/hcl/components/hcl-file.mjs +22 -36
  21. package/dist/hcl/components/hcl-file.mjs.map +1 -1
  22. package/dist/hcl/components/packer-file.cjs +8 -8
  23. package/dist/hcl/components/packer-file.mjs +8 -8
  24. package/dist/hcl/components/packer-file.mjs.map +1 -1
  25. package/dist/hcl/components/terraform-file.cjs +8 -8
  26. package/dist/hcl/components/terraform-file.mjs +8 -8
  27. package/dist/hcl/components/terraform-file.mjs.map +1 -1
  28. package/dist/helpers/capnp.cjs +1 -1
  29. package/dist/helpers/capnp.mjs +1 -1
  30. package/dist/helpers/capnp.mjs.map +1 -1
  31. package/dist/index.cjs +7 -12
  32. package/dist/index.d.cts.map +1 -1
  33. package/dist/index.d.mts.map +1 -1
  34. package/dist/index.mjs +7 -11
  35. package/dist/index.mjs.map +1 -1
  36. package/dist/markdown/components/front-matter.cjs +7 -9
  37. package/dist/markdown/components/front-matter.mjs +7 -9
  38. package/dist/markdown/components/front-matter.mjs.map +1 -1
  39. package/dist/markdown/components/markdown-file.cjs +44 -76
  40. package/dist/markdown/components/markdown-file.mjs +44 -76
  41. package/dist/markdown/components/markdown-file.mjs.map +1 -1
  42. package/dist/markdown/components/markdown-table.cjs +28 -49
  43. package/dist/markdown/components/markdown-table.mjs +28 -49
  44. package/dist/markdown/components/markdown-table.mjs.map +1 -1
  45. package/dist/markdown/contexts/markdown-table.mjs.map +1 -1
  46. package/dist/render.cjs +3 -3
  47. package/dist/render.mjs +4 -4
  48. package/dist/render.mjs.map +1 -1
  49. package/dist/typescript/components/builtin-file.cjs +20 -30
  50. package/dist/typescript/components/builtin-file.mjs +20 -30
  51. package/dist/typescript/components/builtin-file.mjs.map +1 -1
  52. package/dist/typescript/components/class-declaration.cjs +100 -165
  53. package/dist/typescript/components/class-declaration.mjs +100 -165
  54. package/dist/typescript/components/class-declaration.mjs.map +1 -1
  55. package/dist/typescript/components/dynamic-import-statement.cjs +6 -2
  56. package/dist/typescript/components/dynamic-import-statement.mjs +6 -2
  57. package/dist/typescript/components/dynamic-import-statement.mjs.map +1 -1
  58. package/dist/typescript/components/entry-file.cjs +8 -11
  59. package/dist/typescript/components/entry-file.mjs +8 -11
  60. package/dist/typescript/components/entry-file.mjs.map +1 -1
  61. package/dist/typescript/components/interface-declaration.cjs +74 -127
  62. package/dist/typescript/components/interface-declaration.mjs +74 -127
  63. package/dist/typescript/components/interface-declaration.mjs.map +1 -1
  64. package/dist/typescript/components/object-declaration.cjs +50 -84
  65. package/dist/typescript/components/object-declaration.mjs +50 -84
  66. package/dist/typescript/components/object-declaration.mjs.map +1 -1
  67. package/dist/typescript/components/property-name.cjs +3 -3
  68. package/dist/typescript/components/property-name.mjs +3 -3
  69. package/dist/typescript/components/property-name.mjs.map +1 -1
  70. package/dist/typescript/components/record-expression.mjs.map +1 -1
  71. package/dist/typescript/components/tsdoc-reflection.cjs +108 -241
  72. package/dist/typescript/components/tsdoc-reflection.mjs +108 -241
  73. package/dist/typescript/components/tsdoc-reflection.mjs.map +1 -1
  74. package/dist/typescript/components/tsdoc.cjs +168 -265
  75. package/dist/typescript/components/tsdoc.mjs +168 -265
  76. package/dist/typescript/components/tsdoc.mjs.map +1 -1
  77. package/dist/typescript/components/type-declaration.cjs +15 -20
  78. package/dist/typescript/components/type-declaration.mjs +15 -20
  79. package/dist/typescript/components/type-declaration.mjs.map +1 -1
  80. package/dist/typescript/components/type-parameters.cjs +29 -55
  81. package/dist/typescript/components/type-parameters.mjs +29 -55
  82. package/dist/typescript/components/type-parameters.mjs.map +1 -1
  83. package/dist/typescript/components/typescript-file.cjs +74 -135
  84. package/dist/typescript/components/typescript-file.mjs +74 -135
  85. package/dist/typescript/components/typescript-file.mjs.map +1 -1
  86. package/dist/typescript/contexts/lexical-scope.cjs +3 -5
  87. package/dist/typescript/contexts/lexical-scope.mjs +3 -5
  88. package/dist/typescript/contexts/lexical-scope.mjs.map +1 -1
  89. package/dist/typescript/contexts/member-scope.cjs +3 -5
  90. package/dist/typescript/contexts/member-scope.mjs +3 -5
  91. package/dist/typescript/contexts/member-scope.mjs.map +1 -1
  92. package/dist/yaml/components/yaml-file.cjs +47 -92
  93. package/dist/yaml/components/yaml-file.mjs +47 -92
  94. package/dist/yaml/components/yaml-file.mjs.map +1 -1
  95. package/package.json +8 -8
@@ -1,5 +1,5 @@
1
- import { createComponent } from "@alloy-js/core/jsx-runtime";
2
1
  import { Scope } from "@alloy-js/core";
2
+ import { jsx } from "@alloy-js/core/jsx-runtime";
3
3
  import { TSLexicalScope, createLexicalScope } from "@alloy-js/typescript";
4
4
 
5
5
  //#region src/typescript/contexts/lexical-scope.tsx
@@ -12,11 +12,9 @@ function LexicalScope(props) {
12
12
  if (!(props.value instanceof TSLexicalScope)) throw new TypeError("LexicalScope value must be a TSLexicalScope instance");
13
13
  scope = props.value;
14
14
  } else scope = createLexicalScope(props.name ?? "Lexical scope", props);
15
- return createComponent(Scope, {
15
+ return /* @__PURE__ */ jsx(Scope, {
16
16
  value: scope,
17
- get children() {
18
- return props.children;
19
- }
17
+ children: props.children
20
18
  });
21
19
  }
22
20
 
@@ -1 +1 @@
1
- {"version":3,"file":"lexical-scope.mjs","names":[],"sources":["../../../src/typescript/contexts/lexical-scope.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 { Scope, ScopePropsWithInfo, ScopePropsWithValue } from \"@alloy-js/core\";\nimport { createLexicalScope, TSLexicalScope } from \"@alloy-js/typescript\";\n\nexport interface LexicalScopePropsWithScopeValue extends ScopePropsWithValue {}\nexport interface LexicalScopePropsWithScopeInfo extends ScopePropsWithInfo {}\n\nexport type LexicalScopeProps =\n | LexicalScopePropsWithScopeValue\n | LexicalScopePropsWithScopeInfo;\n\n/**\n * A lexical scope for TypeScript, which contains declaration spaces for types and values. Declaration components will create symbols in this scope.\n */\nexport function LexicalScope(props: LexicalScopeProps) {\n let scope;\n if (\"value\" in props) {\n if (!(props.value instanceof TSLexicalScope)) {\n throw new TypeError(\n \"LexicalScope value must be a TSLexicalScope instance\"\n );\n }\n scope = props.value;\n } else {\n scope = createLexicalScope(props.name ?? \"Lexical scope\", props);\n }\n\n return <Scope value={scope}>{props.children}</Scope>;\n}\n"],"mappings":";;;;;;;;AA4BA,SAAE,aAAA,OAAA;CACA,IAAG;AACH,KAAA,WAAA,OAAA;AACF,MAAO,EAAA,MAAS,iBAAa,gBACvB,OAAK,IAAA,UAAA,uDAAA;AAEP,UAAM,MAAM;OAEZ,SAAK,mBAAmB,MAAS,QAAC,iBAAuB,MAAA;AAE3D,QAAE,gBAAA,OAAA;EACA,OAAO;EACP,IAAI,WAAC;AACL,UAAQ,MAAA"}
1
+ {"version":3,"file":"lexical-scope.mjs","names":[],"sources":["../../../src/typescript/contexts/lexical-scope.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 { Scope, ScopePropsWithInfo, ScopePropsWithValue } from \"@alloy-js/core\";\nimport { createLexicalScope, TSLexicalScope } from \"@alloy-js/typescript\";\n\nexport interface LexicalScopePropsWithScopeValue extends ScopePropsWithValue {}\nexport interface LexicalScopePropsWithScopeInfo extends ScopePropsWithInfo {}\n\nexport type LexicalScopeProps =\n | LexicalScopePropsWithScopeValue\n | LexicalScopePropsWithScopeInfo;\n\n/**\n * A lexical scope for TypeScript, which contains declaration spaces for types and values. Declaration components will create symbols in this scope.\n */\nexport function LexicalScope(props: LexicalScopeProps) {\n let scope;\n if (\"value\" in props) {\n if (!(props.value instanceof TSLexicalScope)) {\n throw new TypeError(\n \"LexicalScope value must be a TSLexicalScope instance\"\n );\n }\n scope = props.value;\n } else {\n scope = createLexicalScope(props.name ?? \"Lexical scope\", props);\n }\n\n return <Scope value={scope}>{props.children}</Scope>;\n}\n"],"mappings":";;;;;;;;AA+BA,SAAgB,aAAa,OAA0B;CACrD,IAAI;AACJ,KAAI,WAAW,OAAO;AACpB,MAAI,EAAE,MAAM,iBAAiB,gBAC3B,OAAM,IAAI,UACR,uDACD;AAEH,UAAQ,MAAM;OAEd,SAAQ,mBAAmB,MAAM,QAAQ,iBAAiB,MAAM;AAGlE,QAAO,oBAAC,OAAD;EAAO,OAAO;YAAQ,MAAM;EAAiB"}
@@ -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_jsx_runtime = require("@alloy-js/core/jsx-runtime");
4
3
  let _alloy_js_core = require("@alloy-js/core");
4
+ let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
5
5
  let _alloy_js_typescript = require("@alloy-js/typescript");
6
6
 
7
7
  //#region src/typescript/contexts/member-scope.tsx
@@ -12,11 +12,9 @@ let _alloy_js_typescript = require("@alloy-js/typescript");
12
12
  function MemberScope(props) {
13
13
  const parentScope = (0, _alloy_js_typescript.useTSLexicalScopeIfPresent)();
14
14
  const binder = props.ownerSymbol.binder ?? parentScope?.binder;
15
- return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.MemberScope, {
15
+ return /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(_alloy_js_core.MemberScope, {
16
16
  value: (0, _alloy_js_core.createScope)(_alloy_js_typescript.TSMemberScope, "member-scope", parentScope, props.ownerSymbol, { binder }),
17
- get children() {
18
- return props.children;
19
- }
17
+ children: props.children
20
18
  });
21
19
  }
22
20
 
@@ -1,5 +1,5 @@
1
- import { createComponent } from "@alloy-js/core/jsx-runtime";
2
1
  import { MemberScope as MemberScope$1, createScope } from "@alloy-js/core";
2
+ import { jsx } from "@alloy-js/core/jsx-runtime";
3
3
  import { TSMemberScope, useTSLexicalScopeIfPresent } from "@alloy-js/typescript";
4
4
 
5
5
  //#region src/typescript/contexts/member-scope.tsx
@@ -10,11 +10,9 @@ import { TSMemberScope, useTSLexicalScopeIfPresent } from "@alloy-js/typescript"
10
10
  function MemberScope(props) {
11
11
  const parentScope = useTSLexicalScopeIfPresent();
12
12
  const binder = props.ownerSymbol.binder ?? parentScope?.binder;
13
- return createComponent(MemberScope$1, {
13
+ return /* @__PURE__ */ jsx(MemberScope$1, {
14
14
  value: createScope(TSMemberScope, "member-scope", parentScope, props.ownerSymbol, { binder }),
15
- get children() {
16
- return props.children;
17
- }
15
+ children: props.children
18
16
  });
19
17
  }
20
18
 
@@ -1 +1 @@
1
- {"version":3,"file":"member-scope.mjs","names":[],"sources":["../../../src/typescript/contexts/member-scope.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport {\n Children,\n MemberScope as CoreMemberScope,\n createScope\n} from \"@alloy-js/core\";\nimport {\n TSMemberScope,\n TSOutputSymbol,\n useTSLexicalScopeIfPresent\n} from \"@alloy-js/typescript\";\n\nexport interface MemberScopeProps {\n children: Children;\n\n /**\n * The symbol that this member scope will create member symbols on.\n */\n ownerSymbol: TSOutputSymbol;\n}\n\n/**\n * A member scope for TypeScript. Member declarations will create symbols\n * in this scope, which will be added to the owner symbol's members.\n */\nexport function MemberScope(props: MemberScopeProps) {\n const parentScope = useTSLexicalScopeIfPresent();\n const binder = props.ownerSymbol.binder ?? parentScope?.binder;\n const memberScope = createScope(\n TSMemberScope,\n \"member-scope\",\n parentScope,\n props.ownerSymbol,\n {\n binder\n }\n );\n\n return (\n <CoreMemberScope value={memberScope}>{props.children}</CoreMemberScope>\n );\n}\n"],"mappings":";;;;;;;;;AAkCA,SAAI,YAAA,OAAA;CACF,MAAA,cAAa,4BAAc;CAC7B,MAAA,SAAA,MAAA,YAAA,UAAA,aAAA;AAIE,QAAI,gBAAkB,eAAoB;EAC1C,oFAHA,QACC,CAAC;EAGJ,IAAO,WAAS;AACd,UAAM,MAAW;;EAEjB,CAAA"}
1
+ {"version":3,"file":"member-scope.mjs","names":["CoreMemberScope"],"sources":["../../../src/typescript/contexts/member-scope.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport {\n Children,\n MemberScope as CoreMemberScope,\n createScope\n} from \"@alloy-js/core\";\nimport {\n TSMemberScope,\n TSOutputSymbol,\n useTSLexicalScopeIfPresent\n} from \"@alloy-js/typescript\";\n\nexport interface MemberScopeProps {\n children: Children;\n\n /**\n * The symbol that this member scope will create member symbols on.\n */\n ownerSymbol: TSOutputSymbol;\n}\n\n/**\n * A member scope for TypeScript. Member declarations will create symbols\n * in this scope, which will be added to the owner symbol's members.\n */\nexport function MemberScope(props: MemberScopeProps) {\n const parentScope = useTSLexicalScopeIfPresent();\n const binder = props.ownerSymbol.binder ?? parentScope?.binder;\n const memberScope = createScope(\n TSMemberScope,\n \"member-scope\",\n parentScope,\n props.ownerSymbol,\n {\n binder\n }\n );\n\n return (\n <CoreMemberScope value={memberScope}>{props.children}</CoreMemberScope>\n );\n}\n"],"mappings":";;;;;;;;;AA0CA,SAAgB,YAAY,OAAyB;CACnD,MAAM,cAAc,4BAA4B;CAChD,MAAM,SAAS,MAAM,YAAY,UAAU,aAAa;AAWxD,QACE,oBAACA,eAAD;EAAiB,OAXC,YAClB,eACA,gBACA,aACA,MAAM,aACN,EACE,QACD,CACF;YAGuC,MAAM;EAA2B"}
@@ -3,73 +3,47 @@ const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
3
3
  const require_core_contexts_context = require('../../core/contexts/context.cjs');
4
4
  const require_core_components_source_file = require('../../core/components/source-file.cjs');
5
5
  const require_core_components_single_line_comment = require('../../core/components/single-line-comment.cjs');
6
- let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
7
6
  let _alloy_js_core = require("@alloy-js/core");
7
+ let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
8
8
  let _stryke_string_format_title_case = require("@stryke/string-format/title-case");
9
9
  let powerlines_utils = require("powerlines/utils");
10
10
  let _stryke_type_checks = require("@stryke/type-checks");
11
11
 
12
12
  //#region src/yaml/components/yaml-file.tsx
13
13
  function YamlFileDataItem({ key, value }) {
14
- return [
15
- (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
16
- get when() {
17
- return Boolean(key);
18
- },
14
+ return /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsxs)(_alloy_js_core_jsx_runtime.Fragment, { children: [
15
+ /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(_alloy_js_core.Show, {
16
+ when: Boolean(key),
19
17
  children: _alloy_js_core.code`${key}:`
20
18
  }),
21
- (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
19
+ /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(_alloy_js_core.Show, {
22
20
  when: typeof value === "string" || typeof value === "number" || typeof value === "boolean",
23
- get children() {
24
- return _alloy_js_core.code` ${String(value)}`;
25
- }
21
+ children: _alloy_js_core.code` ${String(value)}`
26
22
  }),
27
- (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
28
- get when() {
29
- return (0, _alloy_js_core_jsx_runtime.memo)(() => !!(0, _stryke_type_checks.isSetObject)(value))() && !Array.isArray(value);
30
- },
31
- get children() {
32
- return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.For, {
33
- get each() {
34
- return Object.entries(value);
35
- },
36
- children: ([nestedKey, nestedValue]) => (0, _alloy_js_core_jsx_runtime.createComponent)(YamlFileDataItem, {
37
- key: nestedKey,
38
- value: nestedValue
39
- })
40
- });
41
- }
23
+ /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(_alloy_js_core.Show, {
24
+ when: (0, _stryke_type_checks.isSetObject)(value) && !Array.isArray(value),
25
+ children: /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(_alloy_js_core.For, {
26
+ each: Object.entries(value),
27
+ children: ([nestedKey, nestedValue]) => /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(YamlFileDataItem, { value: nestedValue }, nestedKey)
28
+ })
42
29
  }),
43
- (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
44
- get when() {
45
- return Array.isArray(value);
46
- },
47
- get children() {
48
- return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.For, {
49
- each: value,
50
- children: (item) => (0, _alloy_js_core_jsx_runtime.createComponent)(YamlFileDataItem, { value: item })
51
- });
52
- }
30
+ /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(_alloy_js_core.Show, {
31
+ when: Array.isArray(value),
32
+ children: /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(_alloy_js_core.For, {
33
+ each: value,
34
+ children: (item) => /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(YamlFileDataItem, { value: item })
35
+ })
53
36
  })
54
- ];
37
+ ] });
55
38
  }
56
39
  function YamlFileData({ data }) {
57
- return [(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
58
- get when() {
59
- return Boolean(data);
60
- },
61
- get children() {
62
- return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.For, {
63
- get each() {
64
- return Object.entries(data ?? {});
65
- },
66
- children: ([key, value]) => (0, _alloy_js_core_jsx_runtime.createComponent)(YamlFileDataItem, {
67
- key,
68
- value
69
- })
70
- });
71
- }
72
- })];
40
+ return /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(_alloy_js_core_jsx_runtime.Fragment, { children: /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(_alloy_js_core.Show, {
41
+ when: Boolean(data),
42
+ children: /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(_alloy_js_core.For, {
43
+ each: Object.entries(data ?? {}),
44
+ children: ([key, value]) => /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(YamlFileDataItem, { value }, key)
45
+ })
46
+ }) });
73
47
  }
74
48
  /**
75
49
  * A base component representing a Powerlines generated YAML source file.
@@ -87,30 +61,19 @@ function YamlFile(props) {
87
61
  "data",
88
62
  "header"
89
63
  ]);
90
- return (0, _alloy_js_core_jsx_runtime.createComponent)(require_core_components_source_file.SourceFile, (0, _alloy_js_core_jsx_runtime.mergeProps)(rest, {
64
+ return /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsxs)(require_core_components_source_file.SourceFile, {
65
+ ...rest,
91
66
  path,
92
- get header() {
93
- return (0, _alloy_js_core_jsx_runtime.createComponent)(YamlFileHeader, { children: header });
94
- },
67
+ header: /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(YamlFileHeader, { children: header }),
95
68
  filetype: "yaml",
96
- get children() {
97
- return [(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
98
- get when() {
99
- return Boolean(data);
100
- },
101
- get children() {
102
- return (0, _alloy_js_core_jsx_runtime.createComponent)(YamlFileData, { data });
103
- }
104
- }), (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
105
- get when() {
106
- return Boolean(children);
107
- },
108
- get children() {
109
- return [children, (0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})];
110
- }
111
- })];
112
- }
113
- }));
69
+ children: [/* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(_alloy_js_core.Show, {
70
+ when: Boolean(data),
71
+ children: /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(YamlFileData, { data })
72
+ }), /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(_alloy_js_core.Show, {
73
+ when: Boolean(children),
74
+ children: /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsxs)(_alloy_js_core_jsx_runtime.Fragment, { children: [children, /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)("hbr", {})] })
75
+ })]
76
+ });
114
77
  }
115
78
  /**
116
79
  * Renders the header for a Powerlines YAML source file.
@@ -121,27 +84,19 @@ function YamlFile(props) {
121
84
  function YamlFileHeader(props) {
122
85
  const { children } = props;
123
86
  const context = require_core_contexts_context.usePowerlinesSafe();
124
- return [
125
- (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
126
- get when() {
127
- return Boolean(children);
128
- },
129
- get children() {
130
- return [children, (0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})];
131
- }
87
+ return /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsxs)(_alloy_js_core_jsx_runtime.Fragment, { children: [
88
+ /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(_alloy_js_core.Show, {
89
+ when: Boolean(children),
90
+ children: /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsxs)(_alloy_js_core_jsx_runtime.Fragment, { children: [children, /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)("hbr", {})] })
132
91
  }),
133
- (0, _alloy_js_core_jsx_runtime.createComponent)(require_core_components_single_line_comment.SingleLineComment, { get children() {
134
- return `Generated by ${(0, _stryke_string_format_title_case.titleCase)(context?.config?.framework) || "Powerlines"}`;
135
- } }),
136
- (0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
137
- (0, _alloy_js_core_jsx_runtime.createComponent)(require_core_components_single_line_comment.SingleLineComment, {
92
+ /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(require_core_components_single_line_comment.SingleLineComment, { children: `Generated by ${(0, _stryke_string_format_title_case.titleCase)(context?.config?.framework) || "Powerlines"}` }),
93
+ /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)("hbr", {}),
94
+ /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(require_core_components_single_line_comment.SingleLineComment, {
138
95
  variant: "yaml",
139
- get children() {
140
- return (0, powerlines_utils.getFileHeaderWarning)(context);
141
- }
96
+ children: (0, powerlines_utils.getFileHeaderWarning)(context)
142
97
  }),
143
- (0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})
144
- ];
98
+ /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)("hbr", {})
99
+ ] });
145
100
  }
146
101
 
147
102
  //#endregion
@@ -1,73 +1,47 @@
1
1
  import { usePowerlinesSafe } from "../../core/contexts/context.mjs";
2
2
  import { SourceFile } from "../../core/components/source-file.mjs";
3
3
  import { SingleLineComment } from "../../core/components/single-line-comment.mjs";
4
- import { createComponent, createIntrinsic, memo, mergeProps } from "@alloy-js/core/jsx-runtime";
5
4
  import { For, Show, code, splitProps } from "@alloy-js/core";
5
+ import { Fragment, jsx, jsxs } from "@alloy-js/core/jsx-runtime";
6
6
  import { titleCase } from "@stryke/string-format/title-case";
7
7
  import { getFileHeaderWarning } from "powerlines/utils";
8
8
  import { isSetObject } from "@stryke/type-checks";
9
9
 
10
10
  //#region src/yaml/components/yaml-file.tsx
11
11
  function YamlFileDataItem({ key, value }) {
12
- return [
13
- createComponent(Show, {
14
- get when() {
15
- return Boolean(key);
16
- },
12
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
13
+ /* @__PURE__ */ jsx(Show, {
14
+ when: Boolean(key),
17
15
  children: code`${key}:`
18
16
  }),
19
- createComponent(Show, {
17
+ /* @__PURE__ */ jsx(Show, {
20
18
  when: typeof value === "string" || typeof value === "number" || typeof value === "boolean",
21
- get children() {
22
- return code` ${String(value)}`;
23
- }
19
+ children: code` ${String(value)}`
24
20
  }),
25
- createComponent(Show, {
26
- get when() {
27
- return memo(() => !!isSetObject(value))() && !Array.isArray(value);
28
- },
29
- get children() {
30
- return createComponent(For, {
31
- get each() {
32
- return Object.entries(value);
33
- },
34
- children: ([nestedKey, nestedValue]) => createComponent(YamlFileDataItem, {
35
- key: nestedKey,
36
- value: nestedValue
37
- })
38
- });
39
- }
21
+ /* @__PURE__ */ jsx(Show, {
22
+ when: isSetObject(value) && !Array.isArray(value),
23
+ children: /* @__PURE__ */ jsx(For, {
24
+ each: Object.entries(value),
25
+ children: ([nestedKey, nestedValue]) => /* @__PURE__ */ jsx(YamlFileDataItem, { value: nestedValue }, nestedKey)
26
+ })
40
27
  }),
41
- createComponent(Show, {
42
- get when() {
43
- return Array.isArray(value);
44
- },
45
- get children() {
46
- return createComponent(For, {
47
- each: value,
48
- children: (item) => createComponent(YamlFileDataItem, { value: item })
49
- });
50
- }
28
+ /* @__PURE__ */ jsx(Show, {
29
+ when: Array.isArray(value),
30
+ children: /* @__PURE__ */ jsx(For, {
31
+ each: value,
32
+ children: (item) => /* @__PURE__ */ jsx(YamlFileDataItem, { value: item })
33
+ })
51
34
  })
52
- ];
35
+ ] });
53
36
  }
54
37
  function YamlFileData({ data }) {
55
- return [createComponent(Show, {
56
- get when() {
57
- return Boolean(data);
58
- },
59
- get children() {
60
- return createComponent(For, {
61
- get each() {
62
- return Object.entries(data ?? {});
63
- },
64
- children: ([key, value]) => createComponent(YamlFileDataItem, {
65
- key,
66
- value
67
- })
68
- });
69
- }
70
- })];
38
+ return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(Show, {
39
+ when: Boolean(data),
40
+ children: /* @__PURE__ */ jsx(For, {
41
+ each: Object.entries(data ?? {}),
42
+ children: ([key, value]) => /* @__PURE__ */ jsx(YamlFileDataItem, { value }, key)
43
+ })
44
+ }) });
71
45
  }
72
46
  /**
73
47
  * A base component representing a Powerlines generated YAML source file.
@@ -85,30 +59,19 @@ function YamlFile(props) {
85
59
  "data",
86
60
  "header"
87
61
  ]);
88
- return createComponent(SourceFile, mergeProps(rest, {
62
+ return /* @__PURE__ */ jsxs(SourceFile, {
63
+ ...rest,
89
64
  path,
90
- get header() {
91
- return createComponent(YamlFileHeader, { children: header });
92
- },
65
+ header: /* @__PURE__ */ jsx(YamlFileHeader, { children: header }),
93
66
  filetype: "yaml",
94
- get children() {
95
- return [createComponent(Show, {
96
- get when() {
97
- return Boolean(data);
98
- },
99
- get children() {
100
- return createComponent(YamlFileData, { data });
101
- }
102
- }), createComponent(Show, {
103
- get when() {
104
- return Boolean(children);
105
- },
106
- get children() {
107
- return [children, createIntrinsic("hbr", {})];
108
- }
109
- })];
110
- }
111
- }));
67
+ children: [/* @__PURE__ */ jsx(Show, {
68
+ when: Boolean(data),
69
+ children: /* @__PURE__ */ jsx(YamlFileData, { data })
70
+ }), /* @__PURE__ */ jsx(Show, {
71
+ when: Boolean(children),
72
+ children: /* @__PURE__ */ jsxs(Fragment, { children: [children, /* @__PURE__ */ jsx("hbr", {})] })
73
+ })]
74
+ });
112
75
  }
113
76
  /**
114
77
  * Renders the header for a Powerlines YAML source file.
@@ -119,27 +82,19 @@ function YamlFile(props) {
119
82
  function YamlFileHeader(props) {
120
83
  const { children } = props;
121
84
  const context = usePowerlinesSafe();
122
- return [
123
- createComponent(Show, {
124
- get when() {
125
- return Boolean(children);
126
- },
127
- get children() {
128
- return [children, createIntrinsic("hbr", {})];
129
- }
85
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
86
+ /* @__PURE__ */ jsx(Show, {
87
+ when: Boolean(children),
88
+ children: /* @__PURE__ */ jsxs(Fragment, { children: [children, /* @__PURE__ */ jsx("hbr", {})] })
130
89
  }),
131
- createComponent(SingleLineComment, { get children() {
132
- return `Generated by ${titleCase(context?.config?.framework) || "Powerlines"}`;
133
- } }),
134
- createIntrinsic("hbr", {}),
135
- createComponent(SingleLineComment, {
90
+ /* @__PURE__ */ jsx(SingleLineComment, { children: `Generated by ${titleCase(context?.config?.framework) || "Powerlines"}` }),
91
+ /* @__PURE__ */ jsx("hbr", {}),
92
+ /* @__PURE__ */ jsx(SingleLineComment, {
136
93
  variant: "yaml",
137
- get children() {
138
- return getFileHeaderWarning(context);
139
- }
94
+ children: getFileHeaderWarning(context)
140
95
  }),
141
- createIntrinsic("hbr", {})
142
- ];
96
+ /* @__PURE__ */ jsx("hbr", {})
97
+ ] });
143
98
  }
144
99
 
145
100
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"yaml-file.mjs","names":[],"sources":["../../../src/yaml/components/yaml-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 type { Children } from \"@alloy-js/core\";\nimport { code, For, Show, splitProps } from \"@alloy-js/core\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport { isSetObject } from \"@stryke/type-checks\";\nimport { getFileHeaderWarning } from \"powerlines/utils\";\nimport { SingleLineComment } from \"../../core/components/single-line-comment\";\nimport { SourceFile, SourceFileProps } from \"../../core/components/source-file\";\nimport { usePowerlinesSafe } from \"../../core/contexts/context\";\nimport { ComponentProps, SourceFileHeaderProps } from \"../../types/components\";\n\nexport interface YamlData {\n [key: string]: string | number | boolean | YamlData | YamlData[];\n}\n\ninterface YamlFileDataItemProps {\n value: string | number | boolean | YamlData | YamlData[];\n key?: string;\n}\n\nfunction YamlFileDataItem({ key, value }: YamlFileDataItemProps) {\n return (\n <>\n <Show when={Boolean(key)}>{code`${key}:`}</Show>\n <Show\n when={\n typeof value === \"string\" ||\n typeof value === \"number\" ||\n typeof value === \"boolean\"\n }>\n {code` ${String(value)}`}\n </Show>\n <Show when={isSetObject(value) && !Array.isArray(value)}>\n <For each={Object.entries(value as YamlData)}>\n {([nestedKey, nestedValue]) => (\n <YamlFileDataItem key={nestedKey} value={nestedValue} />\n )}\n </For>\n </Show>\n <Show when={Array.isArray(value)}>\n <For each={value as YamlData[]}>\n {item => <YamlFileDataItem value={item} />}\n </For>\n </Show>\n </>\n );\n}\n\ninterface YamlFileDataProps {\n data?: YamlData;\n}\n\nfunction YamlFileData({ data }: YamlFileDataProps) {\n return (\n <>\n <Show when={Boolean(data)}>\n <For each={Object.entries(data ?? {})}>\n {([key, value]) => <YamlFileDataItem key={key} value={value} />}\n </For>\n </Show>\n </>\n );\n}\n\nexport type YamlFileProps = Omit<SourceFileProps, \"filetype\"> &\n ComponentProps & {\n header?: Children;\n data?: YamlData;\n };\n\n/**\n * A base component representing a Powerlines generated YAML source file.\n *\n * @remarks\n * The file content can be provided either through the `data` prop, which accepts a nested object representing the YAML structure, or through the `children` prop, which allows for custom YAML content to be rendered. The `header` prop can be used to provide custom header content for the YAML file, which is rendered above the generated file header warning and generation comment.\n *\n * @param props - The properties for the source file.\n * @returns The rendered source file component.\n */\nexport function YamlFile(props: YamlFileProps) {\n const [{ children, path, data, header }, rest] = splitProps(props, [\n \"children\",\n \"path\",\n \"data\",\n \"header\"\n ]);\n\n return (\n <SourceFile\n {...rest}\n path={path}\n header={<YamlFileHeader>{header}</YamlFileHeader>}\n filetype=\"yaml\">\n <Show when={Boolean(data)}>\n <YamlFileData data={data} />\n </Show>\n <Show when={Boolean(children)}>\n <>\n {children}\n <hbr />\n </>\n </Show>\n </SourceFile>\n );\n}\n\n/**\n * Renders the header for a Powerlines YAML source file.\n *\n * @param props - The properties for the source file header.\n * @returns The rendered source file header.\n */\nexport function YamlFileHeader(props: SourceFileHeaderProps) {\n const { children } = props;\n\n const context = usePowerlinesSafe();\n\n return (\n <>\n <Show when={Boolean(children)}>\n <>\n {children}\n <hbr />\n </>\n </Show>\n <SingleLineComment>{`Generated by ${\n titleCase(context?.config?.framework) || \"Powerlines\"\n }`}</SingleLineComment>\n <hbr />\n <SingleLineComment variant=\"yaml\">\n {getFileHeaderWarning(context!)}\n </SingleLineComment>\n <hbr />\n </>\n );\n}\n"],"mappings":";;;;;;;;;;AAmCA,SAAA,iBAAA,OAEA,SACS;AACP,QAAG;EAAA,gBAAA,MAAA;GACD,IAAG,OAAK;AACN,WAAC,QAAA,IAAA;;GAEH,UAAM,IAAO,GAAA,IAAQ;GACtB,CAAC;EAAE,gBAAkB,MAAI;GACxB,MAAM,OAAO,UAAU,YAAQ,OAAA,UAAA,YAAA,OAAA,UAAA;GAC/B,IAAI,WAAC;AACH,WAAO,IAAI,KAAC,OAAO,MAAQ;;GAE9B,CAAC;EAAE,gBAAY,MAAY;GAC1B,IAAI,OAAK;AACP,WAAO,WAAW,CAAA,CAAA,YAAgB,MAAC,CAAA,EAAA,IAAA,CAAA,MAAA,QAAA,MAAA;;GAErC,IAAI,WAAG;AACL,WAAO,gBAAA,KAAA;KACL,IAAI,OAAA;AACL,aAAU,OAAO,QAAQ,MAAO;;KAE/B,WAAW,CAAC,WAAA,iBAA4B,gBAAI,kBAAA;MAC1C,KAAG;MACL,OAAI;MACN,CAAA;KACH,CAAA;;;;GAGH,IAAA,OAAU;AACJ,WAAG,MAAQ,QAAA,MAAA;;;AAGjB,WAAS,gBAAsB,KAAC;KACxB,MAAC;KACJ,WAAA,SAAA,gBAAA,kBAAA,EACE,OAAU,MACR,CAAA;KACF,CAAC;;GAEL,CAAC;EAAC;;AAKL,SAAO,aAAK,EACV,QACmB;AACnB,QAAO,CAAC,gBAAS,MAAA;EAChB,IAAA,OAAA;;;EAGC,IAAC,WAAc;AAClB,UAAA,gBAAA,KAAA;IACG,IAAA,OAAA;AACG,YAAK,OAAY,QAAG,QAAS,EAAM,CAAC;;IAEvC,WAAc,CAAA,KAAI,WAAc,gBAAgB,kBAAA;KACrC;KACb;KACK,CAAA;IACA,CAAC;;EAEL,CAAC,CAAC;;;;;;;;;;;AAgBL,SAAW,SAAQ,OAAA;CACjB,MAAM,CAAC,EACL,UACA,MACA,MACD,UACH,QAAA,WAAA,OAAA;EAAA;EAAA;EAAA;EAAA;EAAA,CAAA;;EAEE;EACC,IAAA,SAAY;AACd,UAAA,gBAAA,gBAAA,EACG,UAAc,QACd,CAAA;;EAEJ,UAAO;EACL,IAAM,WAAW;;IAEX,IAAA,OAAU;;;IAGb,IAAA,WAAA;AACE,YAAU,gBAAkB,cAAC,EAC3B,MACE,CAAA;;IAEJ,CAAC,EAAE,gBAAA,MAAA;IACF,IAAI,OAAA;AACL,YAAA,QAAkB,SAAE;;IAEnB,IAAG,WAAA;AACD,YAAE,CAAA,UAAA,gBAAA,OAAA,EAAA,CAAA,CAAA;;IAEL,CAAC,CAAC;;EAEN,CAAC,CAAC"}
1
+ {"version":3,"file":"yaml-file.mjs","names":[],"sources":["../../../src/yaml/components/yaml-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 type { Children } from \"@alloy-js/core\";\nimport { code, For, Show, splitProps } from \"@alloy-js/core\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport { isSetObject } from \"@stryke/type-checks\";\nimport { getFileHeaderWarning } from \"powerlines/utils\";\nimport { SingleLineComment } from \"../../core/components/single-line-comment\";\nimport { SourceFile, SourceFileProps } from \"../../core/components/source-file\";\nimport { usePowerlinesSafe } from \"../../core/contexts/context\";\nimport { ComponentProps, SourceFileHeaderProps } from \"../../types/components\";\n\nexport interface YamlData {\n [key: string]: string | number | boolean | YamlData | YamlData[];\n}\n\ninterface YamlFileDataItemProps {\n value: string | number | boolean | YamlData | YamlData[];\n key?: string;\n}\n\nfunction YamlFileDataItem({ key, value }: YamlFileDataItemProps) {\n return (\n <>\n <Show when={Boolean(key)}>{code`${key}:`}</Show>\n <Show\n when={\n typeof value === \"string\" ||\n typeof value === \"number\" ||\n typeof value === \"boolean\"\n }>\n {code` ${String(value)}`}\n </Show>\n <Show when={isSetObject(value) && !Array.isArray(value)}>\n <For each={Object.entries(value as YamlData)}>\n {([nestedKey, nestedValue]) => (\n <YamlFileDataItem key={nestedKey} value={nestedValue} />\n )}\n </For>\n </Show>\n <Show when={Array.isArray(value)}>\n <For each={value as YamlData[]}>\n {item => <YamlFileDataItem value={item} />}\n </For>\n </Show>\n </>\n );\n}\n\ninterface YamlFileDataProps {\n data?: YamlData;\n}\n\nfunction YamlFileData({ data }: YamlFileDataProps) {\n return (\n <>\n <Show when={Boolean(data)}>\n <For each={Object.entries(data ?? {})}>\n {([key, value]) => <YamlFileDataItem key={key} value={value} />}\n </For>\n </Show>\n </>\n );\n}\n\nexport type YamlFileProps = Omit<SourceFileProps, \"filetype\"> &\n ComponentProps & {\n header?: Children;\n data?: YamlData;\n };\n\n/**\n * A base component representing a Powerlines generated YAML source file.\n *\n * @remarks\n * The file content can be provided either through the `data` prop, which accepts a nested object representing the YAML structure, or through the `children` prop, which allows for custom YAML content to be rendered. The `header` prop can be used to provide custom header content for the YAML file, which is rendered above the generated file header warning and generation comment.\n *\n * @param props - The properties for the source file.\n * @returns The rendered source file component.\n */\nexport function YamlFile(props: YamlFileProps) {\n const [{ children, path, data, header }, rest] = splitProps(props, [\n \"children\",\n \"path\",\n \"data\",\n \"header\"\n ]);\n\n return (\n <SourceFile\n {...rest}\n path={path}\n header={<YamlFileHeader>{header}</YamlFileHeader>}\n filetype=\"yaml\">\n <Show when={Boolean(data)}>\n <YamlFileData data={data} />\n </Show>\n <Show when={Boolean(children)}>\n <>\n {children}\n <hbr />\n </>\n </Show>\n </SourceFile>\n );\n}\n\n/**\n * Renders the header for a Powerlines YAML source file.\n *\n * @param props - The properties for the source file header.\n * @returns The rendered source file header.\n */\nexport function YamlFileHeader(props: SourceFileHeaderProps) {\n const { children } = props;\n\n const context = usePowerlinesSafe();\n\n return (\n <>\n <Show when={Boolean(children)}>\n <>\n {children}\n <hbr />\n </>\n </Show>\n <SingleLineComment>{`Generated by ${\n titleCase(context?.config?.framework) || \"Powerlines\"\n }`}</SingleLineComment>\n <hbr />\n <SingleLineComment variant=\"yaml\">\n {getFileHeaderWarning(context!)}\n </SingleLineComment>\n <hbr />\n </>\n );\n}\n"],"mappings":";;;;;;;;;;AAqCA,SAAS,iBAAiB,EAAE,KAAK,SAAgC;AAC/D,QACE;EACE,oBAAC,MAAD;GAAM,MAAM,QAAQ,IAAI;aAAG,IAAI,GAAG,IAAI;GAAU;EAChD,oBAAC,MAAD;GACE,MACE,OAAO,UAAU,YACjB,OAAO,UAAU,YACjB,OAAO,UAAU;aAElB,IAAI,KAAK,OAAO,MAAM;GAClB;EACP,oBAAC,MAAD;GAAM,MAAM,YAAY,MAAM,IAAI,CAAC,MAAM,QAAQ,MAAM;aACrD,oBAAC,KAAD;IAAK,MAAM,OAAO,QAAQ,MAAkB;eACxC,CAAC,WAAW,iBACZ,oBAAC,kBAAD,EAAkC,OAAO,aAAe,EAAjC,UAAiC;IAEtD;GACD;EACP,oBAAC,MAAD;GAAM,MAAM,MAAM,QAAQ,MAAM;aAC9B,oBAAC,KAAD;IAAK,MAAM;eACR,SAAQ,oBAAC,kBAAD,EAAkB,OAAO,MAAQ;IACtC;GACD;EACN;;AAQP,SAAS,aAAa,EAAE,QAA2B;AACjD,QACE,0CACE,oBAAC,MAAD;EAAM,MAAM,QAAQ,KAAK;YACvB,oBAAC,KAAD;GAAK,MAAM,OAAO,QAAQ,QAAQ,EAAE,CAAC;cACjC,CAAC,KAAK,WAAW,oBAAC,kBAAD,EAAmC,OAAS,EAArB,IAAqB;GAC3D;EACD,GACN;;;;;;;;;;;AAmBP,SAAgB,SAAS,OAAsB;CAC7C,MAAM,CAAC,EAAE,UAAU,MAAM,MAAM,UAAU,QAAQ,WAAW,OAAO;EACjE;EACA;EACA;EACA;EACD,CAAC;AAEF,QACE,qBAAC,YAAD;EACE,GAAI;EACE;EACN,QAAQ,oBAAC,gBAAD,YAAiB,QAAwB;EACjD,UAAS;YAJX,CAKE,oBAAC,MAAD;GAAM,MAAM,QAAQ,KAAK;aACvB,oBAAC,cAAD,EAAoB,MAAQ;GACvB,GACP,oBAAC,MAAD;GAAM,MAAM,QAAQ,SAAS;aAC3B,4CACG,UACD,oBAAC,OAAD,EAAO,EACN;GACE,EACI;;;;;;;;;AAUjB,SAAgB,eAAe,OAA8B;CAC3D,MAAM,EAAE,aAAa;CAErB,MAAM,UAAU,mBAAmB;AAEnC,QACE;EACE,oBAAC,MAAD;GAAM,MAAM,QAAQ,SAAS;aAC3B,4CACG,UACD,oBAAC,OAAD,EAAO,EACN;GACE;EACP,oBAAC,mBAAD,YAAoB,gBAClB,UAAU,SAAS,QAAQ,UAAU,IAAI,gBACpB;EACvB,oBAAC,OAAD,EAAO;EACP,oBAAC,mBAAD;GAAmB,SAAQ;aACxB,qBAAqB,QAAS;GACb;EACpB,oBAAC,OAAD,EAAO;EACN"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-alloy",
3
- "version": "0.26.18",
3
+ "version": "0.26.20",
4
4
  "type": "module",
5
5
  "description": "A package containing various Alloy framework components and helper utilities.",
6
6
  "repository": {
@@ -893,9 +893,9 @@
893
893
  "@alloy-js/json": "0.23.0-dev.2",
894
894
  "@alloy-js/markdown": "0.23.0-dev.1",
895
895
  "@alloy-js/typescript": "0.23.0-dev.4",
896
- "@powerlines/deepkit": "^0.8.2",
897
- "@powerlines/plugin-babel": "^0.12.394",
898
- "@storm-software/config-tools": "^1.189.76",
896
+ "@powerlines/deepkit": "^0.8.5",
897
+ "@powerlines/plugin-babel": "^0.12.397",
898
+ "@storm-software/config-tools": "^1.189.77",
899
899
  "@stryke/capnp": "^0.12.92",
900
900
  "@stryke/convert": "^0.6.58",
901
901
  "@stryke/fs": "^0.33.66",
@@ -907,14 +907,14 @@
907
907
  "@stryke/types": "^0.11.3",
908
908
  "@stryke/unique-id": "^0.3.77",
909
909
  "defu": "^6.1.7",
910
- "powerlines": "^0.42.40",
911
- "prettier": "^3.8.2",
910
+ "powerlines": "^0.43.1",
911
+ "prettier": "^3.8.3",
912
912
  "unctx": "^2.5.0"
913
913
  },
914
914
  "devDependencies": {
915
- "@powerlines/plugin-plugin": "^0.12.350",
915
+ "@powerlines/plugin-plugin": "^0.12.353",
916
916
  "@types/node": "^25.6.0"
917
917
  },
918
918
  "publishConfig": { "access": "public" },
919
- "gitHead": "53fe118324ce5a30936fc934f219781021d72844"
919
+ "gitHead": "0b0428286336ad582b5c70e69dfd97ba6b586b59"
920
920
  }