@powerlines/plugin-alloy 0.15.1 → 0.15.2

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 (148) hide show
  1. package/dist/builtin-file-BDc5-4_L.mjs +43 -0
  2. package/dist/{builtin-file-CIBzJ6jy.d.mts → builtin-file-CUUY0eVB.d.cts} +4 -4
  3. package/dist/{builtin-file-DLVCgiye.cjs → builtin-file-Cey2cJy9.cjs} +20 -14
  4. package/dist/{builtin-file-C-AX3Zai.d.cts → builtin-file-EfQHLZ8F.d.mts} +2 -2
  5. package/dist/{capnp-CbBwObRD.d.mts → capnp-DkidugOV.d.mts} +1 -1
  6. package/dist/{components-IB9A7YaB.d.mts → components-ixU_ICbr.d.mts} +5 -5
  7. package/dist/{context-D-UHaRnr.d.mts → context-BApo1nhP.d.mts} +1 -1
  8. package/dist/{context-0Spyyas6.d.mts → context-DXy7MPku.d.mts} +0 -2
  9. package/dist/core/components/index.cjs +3 -3
  10. package/dist/core/components/index.d.cts +3 -3
  11. package/dist/core/components/index.d.mts +5 -5
  12. package/dist/core/components/index.mjs +3 -3
  13. package/dist/core/components/output.cjs +1 -1
  14. package/dist/core/components/output.d.cts +1 -1
  15. package/dist/core/components/output.d.mts +2 -2
  16. package/dist/core/components/output.mjs +1 -1
  17. package/dist/core/components/single-line-comment.cjs +1 -1
  18. package/dist/core/components/single-line-comment.d.cts +1 -1
  19. package/dist/core/components/single-line-comment.d.mts +3 -3
  20. package/dist/core/components/single-line-comment.mjs +1 -1
  21. package/dist/core/components/source-file.cjs +1 -1
  22. package/dist/core/components/source-file.d.cts +1 -1
  23. package/dist/core/components/source-file.d.mts +3 -3
  24. package/dist/core/components/source-file.mjs +1 -1
  25. package/dist/core/contexts/context.d.mts +2 -2
  26. package/dist/core/contexts/index.d.mts +4 -4
  27. package/dist/core/contexts/reflection.d.mts +3 -3
  28. package/dist/core/index.cjs +3 -3
  29. package/dist/core/index.d.cts +3 -3
  30. package/dist/core/index.d.mts +7 -7
  31. package/dist/core/index.mjs +3 -3
  32. package/dist/{dynamic-import-statement-DO0ewx0l.d.cts → dynamic-import-statement-BhY2a13r.d.cts} +2 -2
  33. package/dist/{dynamic-import-statement-DoTHSt57.mjs → dynamic-import-statement-CWK5I_yt.mjs} +2 -6
  34. package/dist/{dynamic-import-statement-tQyMvDe7.d.mts → dynamic-import-statement-D6f1SnIf.d.mts} +2 -2
  35. package/dist/{dynamic-import-statement-JVLyMPXr.cjs → dynamic-import-statement-DVGp5Cvq.cjs} +2 -6
  36. package/dist/{entry-file-BgTZY0YN.d.mts → entry-file-B46yUHra.d.mts} +4 -4
  37. package/dist/{entry-file-BEHDg4dR.d.cts → entry-file-DSW6oClr.d.cts} +3 -3
  38. package/dist/{entry-file-BA75rAwb.cjs → entry-file-DijEelFv.cjs} +10 -7
  39. package/dist/{entry-file-Bw1mgMP3.mjs → entry-file-DtjJPVZY.mjs} +10 -7
  40. package/dist/helpers/capnp.d.mts +2 -2
  41. package/dist/helpers/index.d.mts +2 -2
  42. package/dist/index.cjs +61 -230
  43. package/dist/index.d.cts +9 -9
  44. package/dist/index.d.mts +19 -19
  45. package/dist/index.mjs +60 -224
  46. package/dist/markdown/components/index.cjs +4 -4
  47. package/dist/markdown/components/index.d.cts +3 -3
  48. package/dist/markdown/components/index.d.mts +5 -5
  49. package/dist/markdown/components/index.mjs +4 -4
  50. package/dist/markdown/components/markdown-file.cjs +3 -3
  51. package/dist/markdown/components/markdown-file.d.cts +2 -2
  52. package/dist/markdown/components/markdown-file.d.mts +4 -4
  53. package/dist/markdown/components/markdown-file.mjs +3 -3
  54. package/dist/markdown/components/markdown-table.cjs +1 -1
  55. package/dist/markdown/components/markdown-table.d.cts +1 -1
  56. package/dist/markdown/components/markdown-table.d.mts +3 -3
  57. package/dist/markdown/components/markdown-table.mjs +1 -1
  58. package/dist/markdown/index.cjs +4 -4
  59. package/dist/markdown/index.d.cts +3 -3
  60. package/dist/markdown/index.d.mts +5 -5
  61. package/dist/markdown/index.mjs +4 -4
  62. package/dist/markdown-file-BVSRcpXO.cjs +128 -0
  63. package/dist/{markdown-file-BjhcGybj.d.cts → markdown-file-C72aDdPi.d.cts} +4 -4
  64. package/dist/markdown-file-Clh5iU1_.mjs +116 -0
  65. package/dist/{markdown-file-BhMk-_1z.d.mts → markdown-file-DIkSXG43.d.mts} +5 -5
  66. package/dist/{markdown-table-DxL06EFD.d.mts → markdown-table-3trTm6Ef.d.mts} +5 -5
  67. package/dist/{markdown-table-DFaNSBRn.cjs → markdown-table-B40X-Kp1.cjs} +49 -28
  68. package/dist/{markdown-table-BUxH6aRh.mjs → markdown-table-D-YnljE7.mjs} +49 -28
  69. package/dist/{markdown-table-DhDqQVt_.d.cts → markdown-table-ZiuZZY5T.d.cts} +4 -4
  70. package/dist/{output-Cos2Dz1j.d.mts → output-BKZklKl1.d.mts} +1 -1
  71. package/dist/{output-CnofBsl0.cjs → output-BlHZS50Y.cjs} +19 -12
  72. package/dist/{output-C2C9L6Ho.d.cts → output-BmJnrELo.d.cts} +2 -2
  73. package/dist/{output-DEdXZ94G.mjs → output-CNnPjQlW.mjs} +19 -12
  74. package/dist/{plugin-DmLCIqx0.d.mts → plugin-LknisCLa.d.mts} +3 -3
  75. package/dist/{reflection-BiWgd3An.d.mts → reflection-DLJST1Z7.d.mts} +1 -1
  76. package/dist/{single-line-comment-C5CtHQhi.mjs → single-line-comment-Biwa95Py.mjs} +6 -4
  77. package/dist/{single-line-comment-CuFhTxLD.d.cts → single-line-comment-CYYKKXc2.d.cts} +2 -2
  78. package/dist/{single-line-comment-DRU3a4Qy.d.mts → single-line-comment-DGby6ABI.d.mts} +1 -1
  79. package/dist/{single-line-comment-BMPq6OR0.cjs → single-line-comment-DvU69OGj.cjs} +6 -4
  80. package/dist/{source-file-dpP3BrmV.d.mts → source-file-B2MkzzGR.d.mts} +4 -4
  81. package/dist/{source-file-DK_PJbR-.d.cts → source-file-BrxGhMOh.d.cts} +2 -2
  82. package/dist/{source-file-DTd1KgD5.cjs → source-file-DK_nFwAK.cjs} +10 -6
  83. package/dist/{source-file-CCYwl5pI.mjs → source-file-Dna2E0ro.mjs} +10 -6
  84. package/dist/tsdoc-B0TNs3dK.cjs +576 -0
  85. package/dist/{tsdoc-DzCqaUAX.d.mts → tsdoc-QH5nHvck.d.mts} +1 -1
  86. package/dist/tsdoc-XXdq_9iS.mjs +456 -0
  87. package/dist/{tsdoc-reflection-BbLwFCUm.d.mts → tsdoc-reflection-Bhk9KvVe.d.mts} +1 -1
  88. package/dist/tsdoc-reflection-BizVi_gn.cjs +188 -0
  89. package/dist/tsdoc-reflection-IWtPMJjw.mjs +170 -0
  90. package/dist/types/components.d.mts +2 -2
  91. package/dist/types/index.d.mts +3 -3
  92. package/dist/types/plugin.d.mts +2 -2
  93. package/dist/typescript/components/builtin-file.cjs +5 -5
  94. package/dist/typescript/components/builtin-file.d.cts +3 -3
  95. package/dist/typescript/components/builtin-file.d.mts +6 -6
  96. package/dist/typescript/components/builtin-file.mjs +5 -5
  97. package/dist/typescript/components/dynamic-import-statement.cjs +1 -1
  98. package/dist/typescript/components/dynamic-import-statement.d.cts +1 -1
  99. package/dist/typescript/components/dynamic-import-statement.d.mts +1 -1
  100. package/dist/typescript/components/dynamic-import-statement.mjs +1 -1
  101. package/dist/typescript/components/entry-file.cjs +4 -4
  102. package/dist/typescript/components/entry-file.d.cts +3 -3
  103. package/dist/typescript/components/entry-file.d.mts +5 -5
  104. package/dist/typescript/components/entry-file.mjs +4 -4
  105. package/dist/typescript/components/index.cjs +10 -10
  106. package/dist/typescript/components/index.d.cts +5 -5
  107. package/dist/typescript/components/index.d.mts +11 -11
  108. package/dist/typescript/components/index.mjs +10 -10
  109. package/dist/typescript/components/tsdoc-reflection.cjs +2 -2
  110. package/dist/typescript/components/tsdoc-reflection.d.mts +4 -4
  111. package/dist/typescript/components/tsdoc-reflection.mjs +2 -2
  112. package/dist/typescript/components/tsdoc.cjs +1 -1
  113. package/dist/typescript/components/tsdoc.d.mts +3 -3
  114. package/dist/typescript/components/tsdoc.mjs +1 -1
  115. package/dist/typescript/components/typescript-file.cjs +3 -3
  116. package/dist/typescript/components/typescript-file.d.cts +2 -2
  117. package/dist/typescript/components/typescript-file.d.mts +4 -4
  118. package/dist/typescript/components/typescript-file.mjs +3 -3
  119. package/dist/typescript/components/typescript-interface.cjs +3 -3
  120. package/dist/typescript/components/typescript-interface.d.mts +3 -3
  121. package/dist/typescript/components/typescript-interface.mjs +3 -3
  122. package/dist/typescript/components/typescript-object.cjs +3 -3
  123. package/dist/typescript/components/typescript-object.d.mts +3 -3
  124. package/dist/typescript/components/typescript-object.mjs +3 -3
  125. package/dist/typescript/index.cjs +10 -10
  126. package/dist/typescript/index.d.cts +5 -5
  127. package/dist/typescript/index.d.mts +11 -11
  128. package/dist/typescript/index.mjs +10 -10
  129. package/dist/{typescript-file-BjpHsTUl.d.cts → typescript-file-BK8Ohw9s.d.cts} +1 -1
  130. package/dist/{typescript-file-CxHfiE2u.d.mts → typescript-file-CFNjXsdz.d.mts} +2 -2
  131. package/dist/typescript-file-CLL-ELi0.mjs +190 -0
  132. package/dist/typescript-file-HsAUWnQY.cjs +208 -0
  133. package/dist/{typescript-interface-Codd49Sl.cjs → typescript-interface-DwHJ9in_.cjs} +38 -23
  134. package/dist/{typescript-interface-AydoCmGY.mjs → typescript-interface-FVDsEsu0.mjs} +38 -23
  135. package/dist/{typescript-interface-D8u8bgxN.d.mts → typescript-interface-XIwwFVdf.d.mts} +1 -1
  136. package/dist/{typescript-object-qZFhyXJU.d.mts → typescript-object-BTawaBJa.d.mts} +1 -1
  137. package/dist/{typescript-object-DOrJkpcM.cjs → typescript-object-D8MHeFId.cjs} +75 -45
  138. package/dist/{typescript-object-C-BmpHfk.mjs → typescript-object-Ju07nQg9.mjs} +75 -45
  139. package/package.json +11 -11
  140. package/dist/builtin-file-CkwxD4el.mjs +0 -37
  141. package/dist/markdown-file-BFbbzD59.mjs +0 -90
  142. package/dist/markdown-file-CzGNj_Ex.cjs +0 -102
  143. package/dist/tsdoc-BFPYF-Fh.cjs +0 -487
  144. package/dist/tsdoc-BmyOQBxT.mjs +0 -367
  145. package/dist/tsdoc-reflection-3hSdGY1e.mjs +0 -97
  146. package/dist/tsdoc-reflection-BQN8iUG1.cjs +0 -115
  147. package/dist/typescript-file-6Y81yLyB.cjs +0 -157
  148. package/dist/typescript-file-y6oF016h.mjs +0 -139
@@ -1,9 +1,9 @@
1
1
  import { i as ReflectionPropertyContext, t as ReflectionClassContext } from "./reflection-CBMQ1FQo.mjs";
2
- import { r as TSDocReflectionProperty, t as TSDocReflectionClass } from "./tsdoc-reflection-3hSdGY1e.mjs";
2
+ import { r as TSDocReflectionProperty, t as TSDocReflectionClass } from "./tsdoc-reflection-IWtPMJjw.mjs";
3
+ import { createComponent, mergeProps } from "@alloy-js/core/jsx-runtime";
3
4
  import { For, computed, splitProps } from "@alloy-js/core";
4
5
  import { stringifyType } from "@powerlines/deepkit/vendor/type";
5
6
  import { isString } from "@stryke/type-checks/is-string";
6
- import { jsx, jsxs } from "@alloy-js/core/jsx-runtime";
7
7
  import { InterfaceDeclaration, InterfaceMember } from "@alloy-js/typescript";
8
8
  import { pascalCase } from "@stryke/string-format/pascal-case";
9
9
 
@@ -15,19 +15,23 @@ function TypeScriptInterface(props) {
15
15
  const [{ name, reflection }, rest] = splitProps(props, ["name", "reflection"]);
16
16
  const interfaceName = computed(() => pascalCase((isString(name) ? name : name.toString()) || reflection.getName()));
17
17
  const properties = reflection.getProperties().filter((item) => !item.isIgnored()).sort((a, b) => a.isReadonly() && b.isReadonly() || !a.isReadonly() && !b.isReadonly() ? a.getNameAsString().localeCompare(b.getNameAsString()) : a.isReadonly() ? 1 : -1);
18
- return /* @__PURE__ */ jsxs(ReflectionClassContext.Provider, {
18
+ return createComponent(ReflectionClassContext.Provider, {
19
19
  value: { reflection },
20
- children: [/* @__PURE__ */ jsx(TSDocReflectionClass, {}), /* @__PURE__ */ jsx(InterfaceDeclaration, {
21
- export: true,
22
- name: interfaceName.value,
23
- ...rest,
24
- children: /* @__PURE__ */ jsx(For, {
25
- each: properties,
26
- doubleHardline: true,
27
- semicolon: true,
28
- children: (prop) => /* @__PURE__ */ jsx(TypescriptInterfaceProperty, { property: prop })
29
- })
30
- })]
20
+ get children() {
21
+ return [createComponent(TSDocReflectionClass, {}), createComponent(InterfaceDeclaration, mergeProps({
22
+ "export": true,
23
+ get name() {
24
+ return interfaceName.value;
25
+ }
26
+ }, rest, { get children() {
27
+ return createComponent(For, {
28
+ each: properties,
29
+ doubleHardline: true,
30
+ semicolon: true,
31
+ children: (prop) => createComponent(TypescriptInterfaceProperty, { property: prop })
32
+ });
33
+ } }))];
34
+ }
31
35
  });
32
36
  }
33
37
  /**
@@ -35,16 +39,27 @@ function TypeScriptInterface(props) {
35
39
  */
36
40
  function TypescriptInterfaceProperty(props) {
37
41
  const [{ property }, rest] = splitProps(props, ["property"]);
38
- return /* @__PURE__ */ jsxs(ReflectionPropertyContext.Provider, {
42
+ return createComponent(ReflectionPropertyContext.Provider, {
39
43
  value: property,
40
- children: [/* @__PURE__ */ jsx(TSDocReflectionProperty, {}), /* @__PURE__ */ jsx(InterfaceMember, {
41
- name: property.getNameAsString(),
42
- readonly: property.isReadonly(),
43
- optional: property.isOptional(),
44
- nullish: property.isNullable(),
45
- type: stringifyType(property.getType()),
46
- ...rest
47
- })]
44
+ get children() {
45
+ return [createComponent(TSDocReflectionProperty, {}), createComponent(InterfaceMember, mergeProps({
46
+ get name() {
47
+ return property.getNameAsString();
48
+ },
49
+ get readonly() {
50
+ return property.isReadonly();
51
+ },
52
+ get optional() {
53
+ return property.isOptional();
54
+ },
55
+ get nullish() {
56
+ return property.isNullable();
57
+ },
58
+ get type() {
59
+ return stringifyType(property.getType());
60
+ }
61
+ }, rest))];
62
+ }
48
63
  });
49
64
  }
50
65
 
@@ -1,4 +1,4 @@
1
- import { n as ComponentProps } from "./components-IB9A7YaB.mjs";
1
+ import { n as ComponentProps } from "./components-ixU_ICbr.mjs";
2
2
  import * as _alloy_js_core1 from "@alloy-js/core";
3
3
  import { ReflectionClass, ReflectionProperty } from "@powerlines/deepkit/vendor/type";
4
4
  import { InterfaceDeclarationProps, InterfaceMemberProps } from "@alloy-js/typescript";
@@ -1,4 +1,4 @@
1
- import { n as ComponentProps } from "./components-IB9A7YaB.mjs";
1
+ import { n as ComponentProps } from "./components-ixU_ICbr.mjs";
2
2
  import * as _alloy_js_core0 from "@alloy-js/core";
3
3
  import { ReflectionClass, ReflectionProperty } from "@powerlines/deepkit/vendor/type";
4
4
  import { VarDeclarationProps } from "@alloy-js/typescript";
@@ -1,11 +1,11 @@
1
1
  const require_chunk = require('./chunk-CbDLau6x.cjs');
2
2
  const require_utilities = require('./utilities-llRqOC4l.cjs');
3
3
  const require_reflection = require('./reflection-BSbFFYZO.cjs');
4
- const require_tsdoc_reflection = require('./tsdoc-reflection-BQN8iUG1.cjs');
4
+ const require_tsdoc_reflection = require('./tsdoc-reflection-BizVi_gn.cjs');
5
+ let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
5
6
  let __alloy_js_core = require("@alloy-js/core");
6
7
  let __stryke_type_checks_is_string = require("@stryke/type-checks/is-string");
7
8
  let __stryke_type_checks_is_undefined = require("@stryke/type-checks/is-undefined");
8
- let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
9
9
  let __alloy_js_typescript = require("@alloy-js/typescript");
10
10
  let __stryke_string_format_pascal_case = require("@stryke/string-format/pascal-case");
11
11
  let __stryke_string_format_camel_case = require("@stryke/string-format/camel-case");
@@ -35,41 +35,65 @@ function TypescriptObject(props) {
35
35
  });
36
36
  if (!props.type) ValueTypeSymbolSlot.moveMembersTo(sym);
37
37
  const keyword = props.var ? "var" : props.let ? "let" : "const";
38
- const type = props.type ? /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsxs)(__alloy_js_typescript.TypeRefContext, { children: [": ", /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(TypeSymbolSlot, { children: props.type })] }) : void 0;
39
- return /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(__alloy_js_core.Show, {
40
- when: !!props.reflection.value,
41
- children: /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsxs)(require_reflection.ReflectionClassContext.Provider, {
42
- value: {
43
- reflection: props.reflection.value,
44
- override: {
45
- name: objectName.value,
46
- type: objectType.value,
47
- defaultValue: props.defaultValue?.value
38
+ const type = props.type ? (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.TypeRefContext, { get children() {
39
+ return [": ", (0, __alloy_js_core_jsx_runtime.createComponent)(TypeSymbolSlot, { get children() {
40
+ return props.type;
41
+ } })];
42
+ } }) : void 0;
43
+ return (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
44
+ get when() {
45
+ return !!props.reflection.value;
46
+ },
47
+ get children() {
48
+ return (0, __alloy_js_core_jsx_runtime.createComponent)(require_reflection.ReflectionClassContext.Provider, {
49
+ get value() {
50
+ return {
51
+ reflection: props.reflection.value,
52
+ override: {
53
+ name: objectName.value,
54
+ type: objectType.value,
55
+ defaultValue: props.defaultValue?.value
56
+ }
57
+ };
58
+ },
59
+ get children() {
60
+ return [(0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
61
+ get when() {
62
+ return !!objectName.value && !!objectType.value;
63
+ },
64
+ get children() {
65
+ return [(0, __alloy_js_core_jsx_runtime.createComponent)(require_tsdoc_reflection.TSDocReflectionClass, {}), (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Declaration, {
66
+ symbol: sym,
67
+ get children() {
68
+ return [
69
+ (0, __alloy_js_core_jsx_runtime.memo)(() => props.export ? "export " : ""),
70
+ (0, __alloy_js_core_jsx_runtime.memo)(() => props.default ? "default " : ""),
71
+ keyword,
72
+ " ",
73
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Name, {}),
74
+ type,
75
+ " =",
76
+ " ",
77
+ (0, __alloy_js_core_jsx_runtime.createComponent)(ValueTypeSymbolSlot, { get children() {
78
+ return props.initializer ?? props.children ?? (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.ObjectExpression, { get children() {
79
+ return (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.For, {
80
+ get each() {
81
+ return properties.value ?? [];
82
+ },
83
+ comma: true,
84
+ doubleHardline: true,
85
+ children: (prop) => (0, __alloy_js_core_jsx_runtime.createComponent)(TypescriptObjectProperty, { property: prop })
86
+ });
87
+ } });
88
+ } })
89
+ ];
90
+ }
91
+ })];
92
+ }
93
+ }), (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})];
48
94
  }
49
- },
50
- children: [/* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsxs)(__alloy_js_core.Show, {
51
- when: !!objectName.value && !!objectType.value,
52
- children: [/* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(require_tsdoc_reflection.TSDocReflectionClass, {}), /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsxs)(__alloy_js_core.Declaration, {
53
- symbol: sym,
54
- children: [
55
- props.export ? "export " : "",
56
- props.default ? "default " : "",
57
- keyword,
58
- " ",
59
- /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(__alloy_js_core.Name, {}),
60
- type,
61
- " =",
62
- " ",
63
- /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(ValueTypeSymbolSlot, { children: props.initializer ?? props.children ?? /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(__alloy_js_typescript.ObjectExpression, { children: /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(__alloy_js_core.For, {
64
- each: properties.value ?? [],
65
- comma: true,
66
- doubleHardline: true,
67
- children: (prop) => /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(TypescriptObjectProperty, { property: prop })
68
- }) }) })
69
- ]
70
- })]
71
- }), /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)("hbr", {})]
72
- })
95
+ });
96
+ }
73
97
  });
74
98
  }
75
99
  /**
@@ -77,16 +101,22 @@ function TypescriptObject(props) {
77
101
  */
78
102
  function TypescriptObjectProperty(props) {
79
103
  const [{ property }] = (0, __alloy_js_core.splitProps)(props, ["property"]);
80
- return /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsxs)(require_reflection.ReflectionPropertyContext.Provider, {
104
+ return (0, __alloy_js_core_jsx_runtime.createComponent)(require_reflection.ReflectionPropertyContext.Provider, {
81
105
  value: property,
82
- children: [
83
- /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(require_tsdoc_reflection.TSDocReflectionProperty, {}),
84
- /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(__alloy_js_typescript.ObjectProperty, {
85
- name: property.getNameAsString(),
86
- value: require_utilities.stringifyDefaultValue(property)
87
- }),
88
- /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)("hbr", {})
89
- ]
106
+ get children() {
107
+ return [
108
+ (0, __alloy_js_core_jsx_runtime.createComponent)(require_tsdoc_reflection.TSDocReflectionProperty, {}),
109
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.ObjectProperty, {
110
+ get name() {
111
+ return property.getNameAsString();
112
+ },
113
+ get value() {
114
+ return require_utilities.stringifyDefaultValue(property);
115
+ }
116
+ }),
117
+ (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})
118
+ ];
119
+ }
90
120
  });
91
121
  }
92
122
 
@@ -1,10 +1,10 @@
1
1
  import { r as stringifyDefaultValue } from "./utilities-CnaPrauh.mjs";
2
2
  import { i as ReflectionPropertyContext, t as ReflectionClassContext } from "./reflection-CBMQ1FQo.mjs";
3
- import { r as TSDocReflectionProperty, t as TSDocReflectionClass } from "./tsdoc-reflection-3hSdGY1e.mjs";
3
+ import { r as TSDocReflectionProperty, t as TSDocReflectionClass } from "./tsdoc-reflection-IWtPMJjw.mjs";
4
+ import { createComponent, createIntrinsic, memo } from "@alloy-js/core/jsx-runtime";
4
5
  import { Declaration, For, Name, Show, computed, createSymbolSlot, splitProps } from "@alloy-js/core";
5
6
  import { isString } from "@stryke/type-checks/is-string";
6
7
  import { isUndefined } from "@stryke/type-checks/is-undefined";
7
- import { jsx, jsxs } from "@alloy-js/core/jsx-runtime";
8
8
  import { ObjectExpression, ObjectProperty, TSSymbolFlags, TypeRefContext, createValueSymbol, useTSNamePolicy } from "@alloy-js/typescript";
9
9
  import { pascalCase } from "@stryke/string-format/pascal-case";
10
10
  import { camelCase } from "@stryke/string-format/camel-case";
@@ -34,41 +34,65 @@ function TypescriptObject(props) {
34
34
  });
35
35
  if (!props.type) ValueTypeSymbolSlot.moveMembersTo(sym);
36
36
  const keyword = props.var ? "var" : props.let ? "let" : "const";
37
- const type = props.type ? /* @__PURE__ */ jsxs(TypeRefContext, { children: [": ", /* @__PURE__ */ jsx(TypeSymbolSlot, { children: props.type })] }) : void 0;
38
- return /* @__PURE__ */ jsx(Show, {
39
- when: !!props.reflection.value,
40
- children: /* @__PURE__ */ jsxs(ReflectionClassContext.Provider, {
41
- value: {
42
- reflection: props.reflection.value,
43
- override: {
44
- name: objectName.value,
45
- type: objectType.value,
46
- defaultValue: props.defaultValue?.value
37
+ const type = props.type ? createComponent(TypeRefContext, { get children() {
38
+ return [": ", createComponent(TypeSymbolSlot, { get children() {
39
+ return props.type;
40
+ } })];
41
+ } }) : void 0;
42
+ return createComponent(Show, {
43
+ get when() {
44
+ return !!props.reflection.value;
45
+ },
46
+ get children() {
47
+ return createComponent(ReflectionClassContext.Provider, {
48
+ get value() {
49
+ return {
50
+ reflection: props.reflection.value,
51
+ override: {
52
+ name: objectName.value,
53
+ type: objectType.value,
54
+ defaultValue: props.defaultValue?.value
55
+ }
56
+ };
57
+ },
58
+ get children() {
59
+ return [createComponent(Show, {
60
+ get when() {
61
+ return !!objectName.value && !!objectType.value;
62
+ },
63
+ get children() {
64
+ return [createComponent(TSDocReflectionClass, {}), createComponent(Declaration, {
65
+ symbol: sym,
66
+ get children() {
67
+ return [
68
+ memo(() => props.export ? "export " : ""),
69
+ memo(() => props.default ? "default " : ""),
70
+ keyword,
71
+ " ",
72
+ createComponent(Name, {}),
73
+ type,
74
+ " =",
75
+ " ",
76
+ createComponent(ValueTypeSymbolSlot, { get children() {
77
+ return props.initializer ?? props.children ?? createComponent(ObjectExpression, { get children() {
78
+ return createComponent(For, {
79
+ get each() {
80
+ return properties.value ?? [];
81
+ },
82
+ comma: true,
83
+ doubleHardline: true,
84
+ children: (prop) => createComponent(TypescriptObjectProperty, { property: prop })
85
+ });
86
+ } });
87
+ } })
88
+ ];
89
+ }
90
+ })];
91
+ }
92
+ }), createIntrinsic("hbr", {})];
47
93
  }
48
- },
49
- children: [/* @__PURE__ */ jsxs(Show, {
50
- when: !!objectName.value && !!objectType.value,
51
- children: [/* @__PURE__ */ jsx(TSDocReflectionClass, {}), /* @__PURE__ */ jsxs(Declaration, {
52
- symbol: sym,
53
- children: [
54
- props.export ? "export " : "",
55
- props.default ? "default " : "",
56
- keyword,
57
- " ",
58
- /* @__PURE__ */ jsx(Name, {}),
59
- type,
60
- " =",
61
- " ",
62
- /* @__PURE__ */ jsx(ValueTypeSymbolSlot, { children: props.initializer ?? props.children ?? /* @__PURE__ */ jsx(ObjectExpression, { children: /* @__PURE__ */ jsx(For, {
63
- each: properties.value ?? [],
64
- comma: true,
65
- doubleHardline: true,
66
- children: (prop) => /* @__PURE__ */ jsx(TypescriptObjectProperty, { property: prop })
67
- }) }) })
68
- ]
69
- })]
70
- }), /* @__PURE__ */ jsx("hbr", {})]
71
- })
94
+ });
95
+ }
72
96
  });
73
97
  }
74
98
  /**
@@ -76,16 +100,22 @@ function TypescriptObject(props) {
76
100
  */
77
101
  function TypescriptObjectProperty(props) {
78
102
  const [{ property }] = splitProps(props, ["property"]);
79
- return /* @__PURE__ */ jsxs(ReflectionPropertyContext.Provider, {
103
+ return createComponent(ReflectionPropertyContext.Provider, {
80
104
  value: property,
81
- children: [
82
- /* @__PURE__ */ jsx(TSDocReflectionProperty, {}),
83
- /* @__PURE__ */ jsx(ObjectProperty, {
84
- name: property.getNameAsString(),
85
- value: stringifyDefaultValue(property)
86
- }),
87
- /* @__PURE__ */ jsx("hbr", {})
88
- ]
105
+ get children() {
106
+ return [
107
+ createComponent(TSDocReflectionProperty, {}),
108
+ createComponent(ObjectProperty, {
109
+ get name() {
110
+ return property.getNameAsString();
111
+ },
112
+ get value() {
113
+ return stringifyDefaultValue(property);
114
+ }
115
+ }),
116
+ createIntrinsic("hbr", {})
117
+ ];
118
+ }
89
119
  });
90
120
  }
91
121
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-alloy",
3
- "version": "0.15.1",
3
+ "version": "0.15.2",
4
4
  "type": "module",
5
5
  "description": "A package containing various Alloy framework components and helper utilities.",
6
6
  "repository": {
@@ -372,16 +372,16 @@
372
372
  "@alloy-js/rollup-plugin": "^0.1.0",
373
373
  "@alloy-js/babel-plugin": "^0.2.1",
374
374
  "@alloy-js/babel-plugin-jsx-dom-expressions": "^0.39.1",
375
- "@alloy-js/core": "^0.21.0",
376
- "@alloy-js/json": "^0.21.0",
377
- "@alloy-js/markdown": "^0.21.0",
378
- "@alloy-js/typescript": "^0.21.0",
375
+ "@alloy-js/core": "^0.22.0",
376
+ "@alloy-js/json": "^0.22.0",
377
+ "@alloy-js/markdown": "^0.22.0",
378
+ "@alloy-js/typescript": "^0.22.0",
379
379
  "@babel/plugin-syntax-jsx": "^7.27.1",
380
380
  "@babel/plugin-syntax-typescript": "^7.27.1",
381
381
  "@babel/plugin-transform-typescript": "^7.28.5",
382
- "@powerlines/deepkit": "^0.5.19",
383
- "@powerlines/plugin-plugin": "^0.12.56",
384
- "@powerlines/plugin-babel": "^0.12.113",
382
+ "@powerlines/deepkit": "^0.5.20",
383
+ "@powerlines/plugin-plugin": "^0.12.57",
384
+ "@powerlines/plugin-babel": "^0.12.114",
385
385
  "@storm-software/config-tools": "^1.188.74",
386
386
  "@stryke/capnp": "^0.12.51",
387
387
  "@stryke/convert": "^0.6.29",
@@ -396,16 +396,16 @@
396
396
  "@vue/reactivity": "^3.5.26",
397
397
  "defu": "^6.1.4",
398
398
  "jiti": "^2.6.1",
399
- "powerlines": "^0.36.9",
399
+ "powerlines": "^0.36.10",
400
400
  "prettier": "^3.7.4"
401
401
  },
402
402
  "devDependencies": {
403
403
  "@babel/core": "^7.28.5",
404
- "@powerlines/nx": "^0.11.35",
404
+ "@powerlines/nx": "^0.11.36",
405
405
  "@storm-software/tsup": "^0.2.72",
406
406
  "@rollup/plugin-babel": "^6.1.0",
407
407
  "@types/node": "^24.10.4"
408
408
  },
409
409
  "publishConfig": { "access": "public" },
410
- "gitHead": "e9fb959df894f1aa67074af9fbb126978a450a45"
410
+ "gitHead": "ab50afb5bed1d2d55072e7375c6425980e3d03ad"
411
411
  }
@@ -1,37 +0,0 @@
1
- import { d as TSDocModule } from "./tsdoc-BmyOQBxT.mjs";
2
- import { n as TypescriptFileHeader, r as TypescriptFileHeaderImports, t as TypescriptFile } from "./typescript-file-y6oF016h.mjs";
3
- import { splitProps } from "@alloy-js/core";
4
- import { jsx } from "@alloy-js/core/jsx-runtime";
5
-
6
- //#region src/typescript/components/builtin-file.tsx
7
- /**
8
- * A base component representing a Powerlines generated Typescript source file.
9
- *
10
- * @param props - The properties for the source file.
11
- * @returns The rendered source file component.
12
- */
13
- function BuiltinFile(props) {
14
- const [{ children, imports, id, description, tsx }, rest] = splitProps(props, [
15
- "children",
16
- "imports",
17
- "id",
18
- "description",
19
- "tsx"
20
- ]);
21
- return /* @__PURE__ */ jsx(TypescriptFile, {
22
- header: /* @__PURE__ */ jsx(TypescriptFileHeader, {
23
- header: /* @__PURE__ */ jsx(TSDocModule, {
24
- name: id,
25
- children: description
26
- }),
27
- children: /* @__PURE__ */ jsx(TypescriptFileHeaderImports, { imports })
28
- }),
29
- meta: { builtin: { id } },
30
- ...rest,
31
- path: `${id}${tsx ? ".tsx" : ".ts"}`,
32
- children
33
- });
34
- }
35
-
36
- //#endregion
37
- export { BuiltinFile as t };
@@ -1,90 +0,0 @@
1
- import { n as usePowerlines } from "./context-Cx38_mgI.mjs";
2
- import { t as SingleLineComment } from "./single-line-comment-C5CtHQhi.mjs";
3
- import { t as SourceFile } from "./source-file-CCYwl5pI.mjs";
4
- import { Show, code, getContext, splitProps } from "@alloy-js/core";
5
- import { Fragment, jsx, jsxs } from "@alloy-js/core/jsx-runtime";
6
- import { titleCase } from "@stryke/string-format/title-case";
7
- import { Link } from "@alloy-js/markdown";
8
-
9
- //#region src/markdown/components/markdown-file.tsx
10
- /**
11
- * A base component representing a Powerlines generated markdown source file.
12
- *
13
- * @param props - The properties for the source file.
14
- * @returns The rendered source file component.
15
- */
16
- function MarkdownFile(props) {
17
- const [{ children, preset }, rest] = splitProps(props, ["children", "preset"]);
18
- const nodeContext = getContext();
19
- nodeContext.meta ??= {};
20
- nodeContext.meta.output = { preset };
21
- return /* @__PURE__ */ jsx(SourceFile, {
22
- header: /* @__PURE__ */ jsx(MarkdownFileHeader, {}),
23
- ...rest,
24
- filetype: "md",
25
- reference: Link,
26
- children: /* @__PURE__ */ jsx(Show, {
27
- when: Boolean(children),
28
- children
29
- })
30
- });
31
- }
32
- /**
33
- * Renders the header for a Powerlines Typescript source file.
34
- *
35
- * @param props - The properties for the source file header.
36
- * @returns The rendered source file header.
37
- */
38
- function MarkdownFileHeader(props) {
39
- const [{ children, disableEslint = true, disableBiome = true, disablePrettier = false }] = splitProps(props, [
40
- "children",
41
- "disableEslint",
42
- "disableBiome",
43
- "disablePrettier"
44
- ]);
45
- const context = usePowerlines();
46
- return /* @__PURE__ */ jsxs(Fragment, { children: [
47
- /* @__PURE__ */ jsxs(Show, {
48
- when: Boolean(disableEslint),
49
- children: [/* @__PURE__ */ jsx(SingleLineComment, {
50
- variant: "markdown",
51
- children: "eslint-disable"
52
- }), /* @__PURE__ */ jsx("hbr", {})]
53
- }),
54
- /* @__PURE__ */ jsxs(Show, {
55
- when: Boolean(disablePrettier),
56
- children: [/* @__PURE__ */ jsx(SingleLineComment, {
57
- variant: "markdown",
58
- children: "prettier-ignore"
59
- }), /* @__PURE__ */ jsx("hbr", {})]
60
- }),
61
- /* @__PURE__ */ jsxs(Show, {
62
- when: Boolean(disableBiome),
63
- children: [/* @__PURE__ */ jsx(SingleLineComment, {
64
- variant: "markdown",
65
- children: "biome-ignore lint: disable"
66
- }), /* @__PURE__ */ jsx("hbr", {})]
67
- }),
68
- /* @__PURE__ */ jsx(Show, {
69
- when: Boolean(disableEslint) || Boolean(disablePrettier) || Boolean(disableBiome),
70
- children: /* @__PURE__ */ jsx("hbr", {})
71
- }),
72
- /* @__PURE__ */ jsx(Show, {
73
- when: Boolean(children),
74
- children: /* @__PURE__ */ jsxs(Fragment, { children: [children, /* @__PURE__ */ jsx("hbr", {})] })
75
- }),
76
- /* @__PURE__ */ jsx(SingleLineComment, {
77
- variant: "markdown",
78
- children: code`Generated by ${titleCase(context?.config.framework) || "Powerlines"}`
79
- }),
80
- /* @__PURE__ */ jsx("hbr", {}),
81
- /* @__PURE__ */ jsx(SingleLineComment, {
82
- variant: "markdown",
83
- children: code`NOTE: Do not edit this file manually - it will be overwritten automatically by the "prepare" command`
84
- }),
85
- /* @__PURE__ */ jsx("hbr", {})
86
- ] });
87
- }
88
-
89
- //#endregion
90
- export { MarkdownFileHeader as n, MarkdownFile as t };