@powerlines/plugin-alloy 0.15.1 → 0.15.3

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 (152) hide show
  1. package/dist/builtin-file-BDc5-4_L.mjs +43 -0
  2. package/dist/{builtin-file-CIBzJ6jy.d.mts → builtin-file-BxePApb0.d.mts} +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-Cq1ooVDk.d.cts} +3 -3
  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 +2 -2
  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.mts +2 -2
  15. package/dist/core/components/output.mjs +1 -1
  16. package/dist/core/components/single-line-comment.cjs +1 -1
  17. package/dist/core/components/single-line-comment.d.cts +1 -1
  18. package/dist/core/components/single-line-comment.d.mts +3 -3
  19. package/dist/core/components/single-line-comment.mjs +1 -1
  20. package/dist/core/components/source-file.cjs +1 -1
  21. package/dist/core/components/source-file.d.cts +1 -1
  22. package/dist/core/components/source-file.d.mts +3 -3
  23. package/dist/core/components/source-file.mjs +1 -1
  24. package/dist/core/contexts/context.d.mts +2 -2
  25. package/dist/core/contexts/index.d.mts +4 -4
  26. package/dist/core/contexts/reflection.d.mts +3 -3
  27. package/dist/core/index.cjs +3 -3
  28. package/dist/core/index.d.cts +2 -2
  29. package/dist/core/index.d.mts +7 -7
  30. package/dist/core/index.mjs +3 -3
  31. package/dist/{dynamic-import-statement-DoTHSt57.mjs → dynamic-import-statement-CWK5I_yt.mjs} +2 -6
  32. package/dist/{dynamic-import-statement-DO0ewx0l.d.cts → dynamic-import-statement-D6f1SnIf.d.mts} +2 -2
  33. package/dist/{dynamic-import-statement-JVLyMPXr.cjs → dynamic-import-statement-DVGp5Cvq.cjs} +2 -6
  34. package/dist/{dynamic-import-statement-tQyMvDe7.d.mts → dynamic-import-statement-Dk3bSR8x.d.cts} +2 -2
  35. package/dist/{entry-file-BEHDg4dR.d.cts → entry-file-B5YXZbGV.d.cts} +3 -3
  36. package/dist/{entry-file-BA75rAwb.cjs → entry-file-DijEelFv.cjs} +10 -7
  37. package/dist/{entry-file-Bw1mgMP3.mjs → entry-file-DtjJPVZY.mjs} +10 -7
  38. package/dist/{entry-file-BgTZY0YN.d.mts → entry-file-HWtqk30Z.d.mts} +4 -4
  39. package/dist/helpers/capnp.d.mts +2 -2
  40. package/dist/helpers/index.d.mts +2 -2
  41. package/dist/index.cjs +67 -230
  42. package/dist/index.d.cts +11 -11
  43. package/dist/index.d.mts +19 -19
  44. package/dist/index.mjs +66 -224
  45. package/dist/markdown/components/index.cjs +4 -4
  46. package/dist/markdown/components/index.d.cts +3 -3
  47. package/dist/markdown/components/index.d.mts +5 -5
  48. package/dist/markdown/components/index.mjs +4 -4
  49. package/dist/markdown/components/markdown-file.cjs +3 -3
  50. package/dist/markdown/components/markdown-file.d.cts +2 -2
  51. package/dist/markdown/components/markdown-file.d.mts +4 -4
  52. package/dist/markdown/components/markdown-file.mjs +3 -3
  53. package/dist/markdown/components/markdown-table.cjs +1 -1
  54. package/dist/markdown/components/markdown-table.d.cts +1 -1
  55. package/dist/markdown/components/markdown-table.d.mts +3 -3
  56. package/dist/markdown/components/markdown-table.mjs +1 -1
  57. package/dist/markdown/index.cjs +4 -4
  58. package/dist/markdown/index.d.cts +3 -3
  59. package/dist/markdown/index.d.mts +5 -5
  60. package/dist/markdown/index.mjs +4 -4
  61. package/dist/markdown-file-BVSRcpXO.cjs +128 -0
  62. package/dist/{markdown-file-BhMk-_1z.d.mts → markdown-file-CKkjaqpP.d.mts} +5 -5
  63. package/dist/markdown-file-Clh5iU1_.mjs +116 -0
  64. package/dist/{markdown-file-BjhcGybj.d.cts → markdown-file-EKqcnqeE.d.cts} +4 -4
  65. package/dist/{markdown-table-DhDqQVt_.d.cts → markdown-table-83GdY7ag.d.mts} +6 -6
  66. package/dist/{markdown-table-DFaNSBRn.cjs → markdown-table-B40X-Kp1.cjs} +49 -28
  67. package/dist/{markdown-table-DxL06EFD.d.mts → markdown-table-BIRzgtYb.d.cts} +2 -2
  68. package/dist/{markdown-table-BUxH6aRh.mjs → markdown-table-D-YnljE7.mjs} +49 -28
  69. package/dist/{output-CnofBsl0.cjs → output-BlHZS50Y.cjs} +19 -12
  70. package/dist/{output-DEdXZ94G.mjs → output-CNnPjQlW.mjs} +19 -12
  71. package/dist/{output-Cos2Dz1j.d.mts → output-Di6Elv89.d.mts} +3 -3
  72. package/dist/{plugin-DmLCIqx0.d.mts → plugin-LknisCLa.d.mts} +3 -3
  73. package/dist/{reflection-BiWgd3An.d.mts → reflection-DLJST1Z7.d.mts} +1 -1
  74. package/dist/{single-line-comment-DRU3a4Qy.d.mts → single-line-comment-BhEed2Bl.d.cts} +3 -3
  75. package/dist/{single-line-comment-C5CtHQhi.mjs → single-line-comment-Biwa95Py.mjs} +6 -4
  76. package/dist/{single-line-comment-CuFhTxLD.d.cts → single-line-comment-CH3Apcm8.d.mts} +1 -1
  77. package/dist/{single-line-comment-BMPq6OR0.cjs → single-line-comment-DvU69OGj.cjs} +6 -4
  78. package/dist/{source-file-dpP3BrmV.d.mts → source-file-BNEo0iAE.d.mts} +4 -4
  79. package/dist/{source-file-DK_PJbR-.d.cts → source-file-BOgnPw2P.d.cts} +2 -2
  80. package/dist/{source-file-DTd1KgD5.cjs → source-file-DK_nFwAK.cjs} +10 -6
  81. package/dist/{source-file-CCYwl5pI.mjs → source-file-Dna2E0ro.mjs} +10 -6
  82. package/dist/tsdoc-B0TNs3dK.cjs +576 -0
  83. package/dist/{tsdoc-DzCqaUAX.d.mts → tsdoc-QH5nHvck.d.mts} +1 -1
  84. package/dist/tsdoc-XXdq_9iS.mjs +456 -0
  85. package/dist/tsdoc-reflection-BizVi_gn.cjs +188 -0
  86. package/dist/{tsdoc-reflection-BOvlOXzR.d.cts → tsdoc-reflection-DllAx-qb.d.cts} +4 -4
  87. package/dist/{tsdoc-reflection-BbLwFCUm.d.mts → tsdoc-reflection-DtWdO7Hk.d.mts} +5 -5
  88. package/dist/tsdoc-reflection-IWtPMJjw.mjs +170 -0
  89. package/dist/types/components.d.mts +2 -2
  90. package/dist/types/index.d.mts +3 -3
  91. package/dist/types/plugin.d.mts +2 -2
  92. package/dist/typescript/components/builtin-file.cjs +5 -5
  93. package/dist/typescript/components/builtin-file.d.cts +3 -3
  94. package/dist/typescript/components/builtin-file.d.mts +6 -6
  95. package/dist/typescript/components/builtin-file.mjs +5 -5
  96. package/dist/typescript/components/dynamic-import-statement.cjs +1 -1
  97. package/dist/typescript/components/dynamic-import-statement.d.cts +1 -1
  98. package/dist/typescript/components/dynamic-import-statement.d.mts +1 -1
  99. package/dist/typescript/components/dynamic-import-statement.mjs +1 -1
  100. package/dist/typescript/components/entry-file.cjs +4 -4
  101. package/dist/typescript/components/entry-file.d.cts +3 -3
  102. package/dist/typescript/components/entry-file.d.mts +5 -5
  103. package/dist/typescript/components/entry-file.mjs +4 -4
  104. package/dist/typescript/components/index.cjs +10 -10
  105. package/dist/typescript/components/index.d.cts +8 -8
  106. package/dist/typescript/components/index.d.mts +11 -11
  107. package/dist/typescript/components/index.mjs +10 -10
  108. package/dist/typescript/components/tsdoc-reflection.cjs +2 -2
  109. package/dist/typescript/components/tsdoc-reflection.d.cts +1 -1
  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.cts +1 -1
  121. package/dist/typescript/components/typescript-interface.d.mts +3 -3
  122. package/dist/typescript/components/typescript-interface.mjs +3 -3
  123. package/dist/typescript/components/typescript-object.cjs +3 -3
  124. package/dist/typescript/components/typescript-object.d.cts +1 -1
  125. package/dist/typescript/components/typescript-object.d.mts +3 -3
  126. package/dist/typescript/components/typescript-object.mjs +3 -3
  127. package/dist/typescript/index.cjs +10 -10
  128. package/dist/typescript/index.d.cts +8 -8
  129. package/dist/typescript/index.d.mts +11 -11
  130. package/dist/typescript/index.mjs +10 -10
  131. package/dist/{typescript-file-BjpHsTUl.d.cts → typescript-file-BDXTfhtE.d.cts} +1 -1
  132. package/dist/{typescript-file-CxHfiE2u.d.mts → typescript-file-BljeGTrz.d.mts} +2 -2
  133. package/dist/typescript-file-CLL-ELi0.mjs +190 -0
  134. package/dist/typescript-file-HsAUWnQY.cjs +208 -0
  135. package/dist/{typescript-interface-D8u8bgxN.d.mts → typescript-interface-CTt8ULTa.d.mts} +4 -4
  136. package/dist/{typescript-interface-Codd49Sl.cjs → typescript-interface-DwHJ9in_.cjs} +38 -23
  137. package/dist/{typescript-interface-AydoCmGY.mjs → typescript-interface-FVDsEsu0.mjs} +38 -23
  138. package/dist/{typescript-interface-CVB4juPk.d.cts → typescript-interface-raVgIJpX.d.cts} +3 -3
  139. package/dist/{typescript-object-DOrJkpcM.cjs → typescript-object-D8MHeFId.cjs} +75 -45
  140. package/dist/{typescript-object-qZFhyXJU.d.mts → typescript-object-Db0fqsDb.d.cts} +2 -2
  141. package/dist/{typescript-object-C-BmpHfk.mjs → typescript-object-Ju07nQg9.mjs} +75 -45
  142. package/dist/{typescript-object-BPZlvCrZ.d.cts → typescript-object-USS-Xx2b.d.mts} +5 -5
  143. package/package.json +12 -20
  144. package/dist/builtin-file-CkwxD4el.mjs +0 -37
  145. package/dist/markdown-file-BFbbzD59.mjs +0 -90
  146. package/dist/markdown-file-CzGNj_Ex.cjs +0 -102
  147. package/dist/tsdoc-BFPYF-Fh.cjs +0 -487
  148. package/dist/tsdoc-BmyOQBxT.mjs +0 -367
  149. package/dist/tsdoc-reflection-3hSdGY1e.mjs +0 -97
  150. package/dist/tsdoc-reflection-BQN8iUG1.cjs +0 -115
  151. package/dist/typescript-file-6Y81yLyB.cjs +0 -157
  152. package/dist/typescript-file-y6oF016h.mjs +0 -139
@@ -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 };
@@ -1,102 +0,0 @@
1
- const require_chunk = require('./chunk-CbDLau6x.cjs');
2
- const require_context = require('./context-BIduC1bB.cjs');
3
- const require_single_line_comment = require('./single-line-comment-BMPq6OR0.cjs');
4
- const require_source_file = require('./source-file-DTd1KgD5.cjs');
5
- let __alloy_js_core = require("@alloy-js/core");
6
- let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
7
- let __stryke_string_format_title_case = require("@stryke/string-format/title-case");
8
- let __alloy_js_markdown = require("@alloy-js/markdown");
9
-
10
- //#region src/markdown/components/markdown-file.tsx
11
- /**
12
- * A base component representing a Powerlines generated markdown source file.
13
- *
14
- * @param props - The properties for the source file.
15
- * @returns The rendered source file component.
16
- */
17
- function MarkdownFile(props) {
18
- const [{ children, preset }, rest] = (0, __alloy_js_core.splitProps)(props, ["children", "preset"]);
19
- const nodeContext = (0, __alloy_js_core.getContext)();
20
- nodeContext.meta ??= {};
21
- nodeContext.meta.output = { preset };
22
- return /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(require_source_file.SourceFile, {
23
- header: /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(MarkdownFileHeader, {}),
24
- ...rest,
25
- filetype: "md",
26
- reference: __alloy_js_markdown.Link,
27
- children: /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(__alloy_js_core.Show, {
28
- when: Boolean(children),
29
- children
30
- })
31
- });
32
- }
33
- /**
34
- * Renders the header for a Powerlines Typescript source file.
35
- *
36
- * @param props - The properties for the source file header.
37
- * @returns The rendered source file header.
38
- */
39
- function MarkdownFileHeader(props) {
40
- const [{ children, disableEslint = true, disableBiome = true, disablePrettier = false }] = (0, __alloy_js_core.splitProps)(props, [
41
- "children",
42
- "disableEslint",
43
- "disableBiome",
44
- "disablePrettier"
45
- ]);
46
- const context = require_context.usePowerlines();
47
- return /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsxs)(__alloy_js_core_jsx_runtime.Fragment, { children: [
48
- /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsxs)(__alloy_js_core.Show, {
49
- when: Boolean(disableEslint),
50
- children: [/* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(require_single_line_comment.SingleLineComment, {
51
- variant: "markdown",
52
- children: "eslint-disable"
53
- }), /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)("hbr", {})]
54
- }),
55
- /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsxs)(__alloy_js_core.Show, {
56
- when: Boolean(disablePrettier),
57
- children: [/* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(require_single_line_comment.SingleLineComment, {
58
- variant: "markdown",
59
- children: "prettier-ignore"
60
- }), /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)("hbr", {})]
61
- }),
62
- /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsxs)(__alloy_js_core.Show, {
63
- when: Boolean(disableBiome),
64
- children: [/* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(require_single_line_comment.SingleLineComment, {
65
- variant: "markdown",
66
- children: "biome-ignore lint: disable"
67
- }), /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)("hbr", {})]
68
- }),
69
- /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(__alloy_js_core.Show, {
70
- when: Boolean(disableEslint) || Boolean(disablePrettier) || Boolean(disableBiome),
71
- children: /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)("hbr", {})
72
- }),
73
- /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(__alloy_js_core.Show, {
74
- when: Boolean(children),
75
- 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", {})] })
76
- }),
77
- /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(require_single_line_comment.SingleLineComment, {
78
- variant: "markdown",
79
- children: __alloy_js_core.code`Generated by ${(0, __stryke_string_format_title_case.titleCase)(context?.config.framework) || "Powerlines"}`
80
- }),
81
- /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)("hbr", {}),
82
- /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(require_single_line_comment.SingleLineComment, {
83
- variant: "markdown",
84
- children: __alloy_js_core.code`NOTE: Do not edit this file manually - it will be overwritten automatically by the "prepare" command`
85
- }),
86
- /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)("hbr", {})
87
- ] });
88
- }
89
-
90
- //#endregion
91
- Object.defineProperty(exports, 'MarkdownFile', {
92
- enumerable: true,
93
- get: function () {
94
- return MarkdownFile;
95
- }
96
- });
97
- Object.defineProperty(exports, 'MarkdownFileHeader', {
98
- enumerable: true,
99
- get: function () {
100
- return MarkdownFileHeader;
101
- }
102
- });
@@ -1,487 +0,0 @@
1
- const require_chunk = require('./chunk-CbDLau6x.cjs');
2
- const require_utilities = require('./utilities-llRqOC4l.cjs');
3
- const require_context = require('./context-BIduC1bB.cjs');
4
- let __alloy_js_core = require("@alloy-js/core");
5
- let __stryke_type_checks_is_undefined = require("@stryke/type-checks/is-undefined");
6
- let __stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
7
- let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
8
-
9
- //#region src/typescript/components/tsdoc.tsx
10
- /**
11
- * Generates a TypeScript interface for the given reflection class.
12
- */
13
- function TSDoc(props) {
14
- const [{ children, heading }] = (0, __alloy_js_core.splitProps)(props, ["children", "heading"]);
15
- return /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsxs)(__alloy_js_core_jsx_runtime.Fragment, { children: [
16
- "/**",
17
- /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsxs)("align", {
18
- string: " * ",
19
- children: [
20
- /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)("hbr", {}),
21
- /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsxs)(__alloy_js_core.Show, {
22
- when: !(0, __stryke_type_checks_is_undefined.isUndefined)(heading),
23
- children: [
24
- heading,
25
- /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)("hbr", {}),
26
- /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(__alloy_js_core.Show, {
27
- when: !(0, __stryke_type_checks_is_undefined.isUndefined)(children) && (0, __alloy_js_core.childrenArray)(() => children).length > 0,
28
- children: /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)("hbr", {})
29
- })
30
- ]
31
- }),
32
- /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(__alloy_js_core.Show, {
33
- when: !(0, __stryke_type_checks_is_undefined.isUndefined)(children) && (0, __alloy_js_core.childrenArray)(() => children).length > 0,
34
- children: /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(__alloy_js_core.List, { children: (0, __alloy_js_core.childrenArray)(() => children) })
35
- })
36
- ]
37
- }),
38
- /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)("hbr", {}),
39
- ` */`,
40
- /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)("hbr", {})
41
- ] });
42
- }
43
- /**
44
- * Create a TSDoc `@<props.tag>` tag.
45
- */
46
- function TSDocTag(props) {
47
- const [{ children, tag }] = (0, __alloy_js_core.splitProps)(props, ["children", "tag"]);
48
- return /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsxs)(__alloy_js_core_jsx_runtime.Fragment, { children: [
49
- `@${tag} `,
50
- /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(__alloy_js_core.Show, {
51
- when: Boolean(children),
52
- children: /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)("align", {
53
- width: 2,
54
- children: /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(__alloy_js_core.Prose, { children })
55
- })
56
- }),
57
- /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)("hbr", {})
58
- ] });
59
- }
60
- /**
61
- * A component that creates a TSDoc block with `@param` tags for each parameter.
62
- */
63
- function TSDocParams(props) {
64
- return /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(__alloy_js_core.For, {
65
- each: normalizeParametersForDoc(props.parameters),
66
- children: (param) => /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(TSDocParam, {
67
- name: param.name,
68
- optional: param.optional,
69
- children: param.doc
70
- })
71
- });
72
- }
73
- function normalizeParametersForDoc(parameters) {
74
- if (parameters.some((p) => typeof p === "string")) return [];
75
- return parameters;
76
- }
77
- /**
78
- * Create a TSDoc `@title` tag.
79
- */
80
- function TSDocTitle(props) {
81
- const [{ children }, rest] = (0, __alloy_js_core.splitProps)(props, ["children"]);
82
- return /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(TSDocTag, {
83
- ...rest,
84
- tag: "title",
85
- children
86
- });
87
- }
88
- /**
89
- * Create a TSDoc `@domain` tag.
90
- */
91
- function TSDocDomain(props) {
92
- const [{ children }, rest] = (0, __alloy_js_core.splitProps)(props, ["children"]);
93
- return /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(TSDocTag, {
94
- ...rest,
95
- tag: "domain",
96
- children
97
- });
98
- }
99
- /**
100
- * Create a TSDoc `@alias` tag.
101
- */
102
- function TSDocAlias(props) {
103
- const [{ children }, rest] = (0, __alloy_js_core.splitProps)(props, ["children"]);
104
- return /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(TSDocTag, {
105
- ...rest,
106
- tag: "alias",
107
- children
108
- });
109
- }
110
- /**
111
- * Create a TSDoc `@permission` tag.
112
- */
113
- function TSDocPermission(props) {
114
- const [{ children }, rest] = (0, __alloy_js_core.splitProps)(props, ["children"]);
115
- return /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(TSDocTag, {
116
- ...rest,
117
- tag: "permission",
118
- children
119
- });
120
- }
121
- /**
122
- * Create a TSDoc `@defaultValue` tag.
123
- */
124
- function TSDocDefaultValue(props) {
125
- return /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsxs)(__alloy_js_core_jsx_runtime.Fragment, { children: [
126
- "@defaultValue ",
127
- /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(__alloy_js_core.Show, {
128
- when: !(0, __stryke_type_checks_is_undefined.isUndefined)(props.value),
129
- children: /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)("align", {
130
- width: 2,
131
- children: /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(__alloy_js_core.Prose, { children: require_utilities.stringifyDefaultValue(props.value) })
132
- })
133
- }),
134
- /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)("hbr", {})
135
- ] });
136
- }
137
- /**
138
- * Create a TSDoc `@remarks` tag.
139
- */
140
- function TSDocRemarks(props) {
141
- return /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsxs)(__alloy_js_core_jsx_runtime.Fragment, { children: [
142
- "@remarks ",
143
- /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)("hbr", {}),
144
- /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(__alloy_js_core.List, {
145
- hardline: true,
146
- children: (0, __alloy_js_core.childrenArray)(() => props.children)
147
- })
148
- ] });
149
- }
150
- /**
151
- * Create a TSDoc `@see` tag.
152
- */
153
- function TSDocLink(props) {
154
- return /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(TSDocTag, {
155
- ...props,
156
- tag: "see"
157
- });
158
- }
159
- /**
160
- * Create a TSDoc `@example` tag.
161
- */
162
- function TSDocExample(props) {
163
- const [{ tsx, fenced = true, language, children }] = (0, __alloy_js_core.splitProps)(props, [
164
- "tsx",
165
- "fenced",
166
- "language",
167
- "children"
168
- ]);
169
- return /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsxs)(__alloy_js_core_jsx_runtime.Fragment, { children: [
170
- "@example ",
171
- /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)("hbr", {}),
172
- /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsxs)(__alloy_js_core.Show, {
173
- when: fenced,
174
- children: [
175
- "```",
176
- language || (tsx ? "tsx" : "ts"),
177
- /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)("hbr", {})
178
- ]
179
- }),
180
- children,
181
- /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsxs)(__alloy_js_core.Show, {
182
- when: fenced,
183
- children: [/* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)("hbr", {}), "```"]
184
- })
185
- ] });
186
- }
187
- /**
188
- * Create a TSDoc `@readonly` tag.
189
- */
190
- function TSDocReadonly() {
191
- return /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(TSDocTag, { tag: "readonly" });
192
- }
193
- /**
194
- * Create a TSDoc `@internal` tag.
195
- */
196
- function TSDocInternal() {
197
- return /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(TSDocTag, { tag: "internal" });
198
- }
199
- /**
200
- * Create a TSDoc `@ignore` tag.
201
- */
202
- function TSDocIgnore() {
203
- return /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(TSDocTag, { tag: "ignore" });
204
- }
205
- /**
206
- * Create a TSDoc `@hidden` tag.
207
- */
208
- function TSDocHidden() {
209
- return /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(TSDocTag, { tag: "hidden" });
210
- }
211
- /**
212
- * Generates a TypeScript interface property for the given reflection class.
213
- */
214
- function TSDocAttributesTags(props) {
215
- const [{ title, alias, permission, domain, readonly, internal, ignore, hidden, defaultValue }] = (0, __alloy_js_core.splitProps)(props, [
216
- "title",
217
- "alias",
218
- "permission",
219
- "domain",
220
- "readonly",
221
- "internal",
222
- "ignore",
223
- "hidden",
224
- "defaultValue"
225
- ]);
226
- return /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsxs)(__alloy_js_core_jsx_runtime.Fragment, { children: [
227
- /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(__alloy_js_core.Show, {
228
- when: (0, __stryke_type_checks_is_set_string.isSetString)(title),
229
- children: /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(TSDocTitle, { children: title })
230
- }),
231
- /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(__alloy_js_core.Show, {
232
- when: !(0, __stryke_type_checks_is_undefined.isUndefined)(alias) && alias.length > 0,
233
- children: /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(__alloy_js_core.For, {
234
- each: alias ?? [],
235
- children: (alias$1) => /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(TSDocAlias, { children: alias$1 })
236
- })
237
- }),
238
- /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(__alloy_js_core.Show, {
239
- when: (0, __stryke_type_checks_is_set_string.isSetString)(domain),
240
- children: /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(TSDocDomain, { children: domain })
241
- }),
242
- /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(__alloy_js_core.Show, {
243
- when: !(0, __stryke_type_checks_is_undefined.isUndefined)(permission) && permission.length > 0,
244
- children: /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(__alloy_js_core.For, {
245
- each: permission ?? [],
246
- children: (permission$1) => /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(TSDocPermission, { children: permission$1 })
247
- })
248
- }),
249
- /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(__alloy_js_core.Show, {
250
- when: readonly === true,
251
- children: /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(TSDocReadonly, {})
252
- }),
253
- /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(__alloy_js_core.Show, {
254
- when: internal === true,
255
- children: /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(TSDocInternal, {})
256
- }),
257
- /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(__alloy_js_core.Show, {
258
- when: ignore === true,
259
- children: /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(TSDocIgnore, {})
260
- }),
261
- /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(__alloy_js_core.Show, {
262
- when: hidden === true,
263
- children: /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(TSDocHidden, {})
264
- }),
265
- /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(__alloy_js_core.Show, {
266
- when: !(0, __stryke_type_checks_is_undefined.isUndefined)(defaultValue),
267
- children: /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(TSDocDefaultValue, { value: defaultValue })
268
- })
269
- ] });
270
- }
271
- /**
272
- * Create a TSDoc parameter set off with `@param`.
273
- */
274
- function TSDocParam(props) {
275
- return /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsxs)(__alloy_js_core_jsx_runtime.Fragment, { children: [
276
- "@param ",
277
- /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(TSDocParamName, {
278
- name: props.name,
279
- optional: props.optional,
280
- defaultValue: props.defaultValue
281
- }),
282
- /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(TSDocParamDescription, { children: props.children })
283
- ] });
284
- }
285
- function TSDocParamName(props) {
286
- return /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsxs)(__alloy_js_core_jsx_runtime.Fragment, { children: [
287
- /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(__alloy_js_core.Show, {
288
- when: props.optional,
289
- children: "["
290
- }),
291
- props.name,
292
- /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsxs)(__alloy_js_core.Show, {
293
- when: Boolean(props.defaultValue),
294
- children: ["=", props.defaultValue]
295
- }),
296
- /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(__alloy_js_core.Show, {
297
- when: props.optional,
298
- children: "]"
299
- })
300
- ] });
301
- }
302
- function TSDocParamDescription(props) {
303
- return /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsxs)(__alloy_js_core.Show, {
304
- when: Boolean(props.children),
305
- children: [" - ", /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)("align", {
306
- width: 2,
307
- children: /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(__alloy_js_core.Prose, { children: props.children })
308
- })]
309
- });
310
- }
311
- /**
312
- * Create a TSDoc `@returns` tag.
313
- */
314
- function TSDocReturns(props) {
315
- return /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(TSDocTag, {
316
- ...props,
317
- tag: "returns"
318
- });
319
- }
320
- /**
321
- * Create a TSDoc `@throws` tag.
322
- */
323
- function TSDocThrows(props) {
324
- return /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(TSDocTag, {
325
- ...props,
326
- tag: "throws"
327
- });
328
- }
329
- /**
330
- * Generates a TSDoc `@module` tag for the given module name.
331
- */
332
- function TSDocModule(props) {
333
- const [{ children, name, prefix }] = (0, __alloy_js_core.splitProps)(props, [
334
- "children",
335
- "name",
336
- "prefix"
337
- ]);
338
- const context = require_context.usePowerlines();
339
- return /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsxs)(__alloy_js_core_jsx_runtime.Fragment, { children: [
340
- "/**",
341
- /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsxs)("align", {
342
- string: " * ",
343
- children: [
344
- /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)("hbr", {}),
345
- /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsxs)(__alloy_js_core.Show, {
346
- when: Boolean(children),
347
- children: [
348
- /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)(__alloy_js_core.List, {
349
- hardline: true,
350
- children: (0, __alloy_js_core.childrenArray)(() => children)
351
- }),
352
- /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)("hbr", {}),
353
- /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)("hbr", {})
354
- ]
355
- }),
356
- "@module ",
357
- prefix || context?.config.output.builtinPrefix,
358
- ":",
359
- name
360
- ]
361
- }),
362
- /* @__PURE__ */ (0, __alloy_js_core_jsx_runtime.jsx)("hbr", {}),
363
- ` */`
364
- ] });
365
- }
366
-
367
- //#endregion
368
- Object.defineProperty(exports, 'TSDoc', {
369
- enumerable: true,
370
- get: function () {
371
- return TSDoc;
372
- }
373
- });
374
- Object.defineProperty(exports, 'TSDocAlias', {
375
- enumerable: true,
376
- get: function () {
377
- return TSDocAlias;
378
- }
379
- });
380
- Object.defineProperty(exports, 'TSDocAttributesTags', {
381
- enumerable: true,
382
- get: function () {
383
- return TSDocAttributesTags;
384
- }
385
- });
386
- Object.defineProperty(exports, 'TSDocDefaultValue', {
387
- enumerable: true,
388
- get: function () {
389
- return TSDocDefaultValue;
390
- }
391
- });
392
- Object.defineProperty(exports, 'TSDocDomain', {
393
- enumerable: true,
394
- get: function () {
395
- return TSDocDomain;
396
- }
397
- });
398
- Object.defineProperty(exports, 'TSDocExample', {
399
- enumerable: true,
400
- get: function () {
401
- return TSDocExample;
402
- }
403
- });
404
- Object.defineProperty(exports, 'TSDocHidden', {
405
- enumerable: true,
406
- get: function () {
407
- return TSDocHidden;
408
- }
409
- });
410
- Object.defineProperty(exports, 'TSDocIgnore', {
411
- enumerable: true,
412
- get: function () {
413
- return TSDocIgnore;
414
- }
415
- });
416
- Object.defineProperty(exports, 'TSDocInternal', {
417
- enumerable: true,
418
- get: function () {
419
- return TSDocInternal;
420
- }
421
- });
422
- Object.defineProperty(exports, 'TSDocLink', {
423
- enumerable: true,
424
- get: function () {
425
- return TSDocLink;
426
- }
427
- });
428
- Object.defineProperty(exports, 'TSDocModule', {
429
- enumerable: true,
430
- get: function () {
431
- return TSDocModule;
432
- }
433
- });
434
- Object.defineProperty(exports, 'TSDocParam', {
435
- enumerable: true,
436
- get: function () {
437
- return TSDocParam;
438
- }
439
- });
440
- Object.defineProperty(exports, 'TSDocParams', {
441
- enumerable: true,
442
- get: function () {
443
- return TSDocParams;
444
- }
445
- });
446
- Object.defineProperty(exports, 'TSDocPermission', {
447
- enumerable: true,
448
- get: function () {
449
- return TSDocPermission;
450
- }
451
- });
452
- Object.defineProperty(exports, 'TSDocReadonly', {
453
- enumerable: true,
454
- get: function () {
455
- return TSDocReadonly;
456
- }
457
- });
458
- Object.defineProperty(exports, 'TSDocRemarks', {
459
- enumerable: true,
460
- get: function () {
461
- return TSDocRemarks;
462
- }
463
- });
464
- Object.defineProperty(exports, 'TSDocReturns', {
465
- enumerable: true,
466
- get: function () {
467
- return TSDocReturns;
468
- }
469
- });
470
- Object.defineProperty(exports, 'TSDocTag', {
471
- enumerable: true,
472
- get: function () {
473
- return TSDocTag;
474
- }
475
- });
476
- Object.defineProperty(exports, 'TSDocThrows', {
477
- enumerable: true,
478
- get: function () {
479
- return TSDocThrows;
480
- }
481
- });
482
- Object.defineProperty(exports, 'TSDocTitle', {
483
- enumerable: true,
484
- get: function () {
485
- return TSDocTitle;
486
- }
487
- });