@powerlines/plugin-date 0.12.140 → 0.12.142

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 (204) hide show
  1. package/dist/index-CA4VvAY_.d.mts +1 -0
  2. package/dist/index-CmCelmEL.d.cts +1 -0
  3. package/dist/index.cjs +13844 -17
  4. package/dist/index.d.cts +40 -7
  5. package/dist/index.d.mts +40 -9
  6. package/dist/index.mjs +13800 -6
  7. package/dist/plugin-BUfZ6cT1.d.cts +4432 -0
  8. package/dist/plugin-CuNMs4r-.d.mts +4434 -0
  9. package/dist/plugin-DHXHjv16.cjs +0 -0
  10. package/dist/plugin-ufqFO5xS.mjs +1 -0
  11. package/dist/runtime-B7WoCmC4.mjs +1 -0
  12. package/dist/runtime-B8LVkjWB.d.cts +711 -0
  13. package/dist/runtime-CiYq8JJ6.d.mts +711 -0
  14. package/dist/runtime-D4zTdSwv.cjs +0 -0
  15. package/dist/types/index.cjs +3 -0
  16. package/dist/types/index.d.cts +3 -2
  17. package/dist/types/index.d.mts +3 -2
  18. package/dist/types/index.mjs +4 -0
  19. package/dist/types/plugin.cjs +1 -0
  20. package/dist/types/plugin.d.cts +1 -42
  21. package/dist/types/plugin.d.mts +1 -42
  22. package/dist/types/plugin.mjs +2 -0
  23. package/dist/types/runtime.cjs +1 -0
  24. package/dist/types/runtime.d.cts +1 -710
  25. package/dist/types/runtime.d.mts +1 -710
  26. package/dist/types/runtime.mjs +2 -0
  27. package/dist/types-BReKsBV6.mjs +1 -0
  28. package/dist/types-CBTc19th.cjs +0 -0
  29. package/package.json +3 -3
  30. package/dist/_virtual/rolldown_runtime.cjs +0 -37
  31. package/dist/_virtual/rolldown_runtime.mjs +0 -29
  32. package/dist/components/date-fns.cjs +0 -527
  33. package/dist/components/date-fns.d.cts +0 -13
  34. package/dist/components/date-fns.d.mts +0 -13
  35. package/dist/components/date-fns.mjs +0 -527
  36. package/dist/components/dayjs.cjs +0 -472
  37. package/dist/components/dayjs.d.cts +0 -13
  38. package/dist/components/dayjs.d.mts +0 -13
  39. package/dist/components/dayjs.mjs +0 -472
  40. package/dist/components/index.cjs +0 -4
  41. package/dist/components/index.d.mts +0 -4
  42. package/dist/components/index.mjs +0 -6
  43. package/dist/components/luxon.cjs +0 -476
  44. package/dist/components/luxon.d.cts +0 -13
  45. package/dist/components/luxon.d.mts +0 -13
  46. package/dist/components/luxon.mjs +0 -476
  47. package/dist/components/moment.cjs +0 -462
  48. package/dist/components/moment.d.cts +0 -13
  49. package/dist/components/moment.d.mts +0 -13
  50. package/dist/components/moment.mjs +0 -462
  51. package/dist/deepkit/schemas/reflection.cjs +0 -3998
  52. package/dist/deepkit/schemas/reflection.d.cts +0 -1560
  53. package/dist/deepkit/schemas/reflection.d.mts +0 -1560
  54. package/dist/deepkit/schemas/reflection.mjs +0 -3996
  55. package/dist/deepkit/schemas/reflection2.cjs +0 -4112
  56. package/dist/deepkit/schemas/reflection2.mjs +0 -4110
  57. package/dist/deepkit/src/capnp.cjs +0 -913
  58. package/dist/deepkit/src/capnp.mjs +0 -911
  59. package/dist/deepkit/src/esbuild-plugin.cjs +0 -47
  60. package/dist/deepkit/src/esbuild-plugin.mjs +0 -46
  61. package/dist/deepkit/src/reflect-type.cjs +0 -22
  62. package/dist/deepkit/src/reflect-type.mjs +0 -20
  63. package/dist/deepkit/src/resolve-reflections.cjs +0 -16
  64. package/dist/deepkit/src/resolve-reflections.mjs +0 -15
  65. package/dist/deepkit/src/transformer.cjs +0 -52
  66. package/dist/deepkit/src/transformer.mjs +0 -49
  67. package/dist/deepkit/src/transpile.cjs +0 -29
  68. package/dist/deepkit/src/transpile.mjs +0 -27
  69. package/dist/deepkit/src/types.d.cts +0 -10
  70. package/dist/deepkit/src/types.d.mts +0 -10
  71. package/dist/deepkit/src/utilities.cjs +0 -66
  72. package/dist/deepkit/src/utilities.mjs +0 -65
  73. package/dist/deepkit/src/vendor/type-compiler/index.cjs +0 -38
  74. package/dist/deepkit/src/vendor/type-compiler/index.mjs +0 -19
  75. package/dist/deepkit/src/vendor/type.cjs +0 -20
  76. package/dist/deepkit/src/vendor/type.d.cts +0 -7
  77. package/dist/deepkit/src/vendor/type.d.mts +0 -7
  78. package/dist/deepkit/src/vendor/type.mjs +0 -11
  79. package/dist/plugin-alloy/src/core/components/output.cjs +0 -38
  80. package/dist/plugin-alloy/src/core/components/output.mjs +0 -37
  81. package/dist/plugin-alloy/src/core/components/single-line-comment.cjs +0 -20
  82. package/dist/plugin-alloy/src/core/components/single-line-comment.mjs +0 -19
  83. package/dist/plugin-alloy/src/core/components/source-file.cjs +0 -60
  84. package/dist/plugin-alloy/src/core/components/source-file.mjs +0 -58
  85. package/dist/plugin-alloy/src/core/contexts/context.cjs +0 -60
  86. package/dist/plugin-alloy/src/core/contexts/context.mjs +0 -54
  87. package/dist/plugin-alloy/src/core/contexts/index.cjs +0 -2
  88. package/dist/plugin-alloy/src/core/contexts/index.mjs +0 -4
  89. package/dist/plugin-alloy/src/core/contexts/reflection.cjs +0 -46
  90. package/dist/plugin-alloy/src/core/contexts/reflection.mjs +0 -42
  91. package/dist/plugin-alloy/src/helpers/refkey.cjs +0 -16
  92. package/dist/plugin-alloy/src/helpers/refkey.mjs +0 -15
  93. package/dist/plugin-alloy/src/index.cjs +0 -90
  94. package/dist/plugin-alloy/src/index.mjs +0 -88
  95. package/dist/plugin-alloy/src/markdown/components/markdown-file.cjs +0 -7
  96. package/dist/plugin-alloy/src/markdown/components/markdown-file.mjs +0 -9
  97. package/dist/plugin-alloy/src/markdown/components/markdown-table.cjs +0 -5
  98. package/dist/plugin-alloy/src/markdown/components/markdown-table.mjs +0 -7
  99. package/dist/plugin-alloy/src/markdown/contexts/markdown-table.cjs +0 -17
  100. package/dist/plugin-alloy/src/markdown/contexts/markdown-table.mjs +0 -17
  101. package/dist/plugin-alloy/src/types/components.d.mts +0 -4
  102. package/dist/plugin-alloy/src/types/index.d.mts +0 -2
  103. package/dist/plugin-alloy/src/types/plugin.d.cts +0 -37
  104. package/dist/plugin-alloy/src/types/plugin.d.mts +0 -37
  105. package/dist/plugin-alloy/src/typescript/components/builtin-file.cjs +0 -47
  106. package/dist/plugin-alloy/src/typescript/components/builtin-file.mjs +0 -46
  107. package/dist/plugin-alloy/src/typescript/components/tsdoc-reflection.cjs +0 -75
  108. package/dist/plugin-alloy/src/typescript/components/tsdoc-reflection.mjs +0 -73
  109. package/dist/plugin-alloy/src/typescript/components/tsdoc.cjs +0 -359
  110. package/dist/plugin-alloy/src/typescript/components/tsdoc.mjs +0 -350
  111. package/dist/plugin-alloy/src/typescript/components/typescript-file.cjs +0 -143
  112. package/dist/plugin-alloy/src/typescript/components/typescript-file.mjs +0 -140
  113. package/dist/plugin-alloy/src/typescript/components/typescript-interface.cjs +0 -53
  114. package/dist/plugin-alloy/src/typescript/components/typescript-interface.mjs +0 -52
  115. package/dist/plugin-alloy/src/typescript/components/typescript-object.cjs +0 -94
  116. package/dist/plugin-alloy/src/typescript/components/typescript-object.mjs +0 -93
  117. package/dist/plugin-automd/src/index.cjs +0 -101
  118. package/dist/plugin-automd/src/index.mjs +0 -98
  119. package/dist/plugin-automd/src/types/plugin.d.cts +0 -38
  120. package/dist/plugin-automd/src/types/plugin.d.mts +0 -40
  121. package/dist/plugin-automd/src/types/toc.d.cts +0 -33
  122. package/dist/plugin-automd/src/types/toc.d.mts +0 -33
  123. package/dist/plugin-babel/src/helpers/ast-utils.cjs +0 -10
  124. package/dist/plugin-babel/src/helpers/ast-utils.mjs +0 -9
  125. package/dist/plugin-babel/src/helpers/create-plugin.cjs +0 -41
  126. package/dist/plugin-babel/src/helpers/create-plugin.mjs +0 -39
  127. package/dist/plugin-babel/src/helpers/filters.cjs +0 -23
  128. package/dist/plugin-babel/src/helpers/filters.mjs +0 -21
  129. package/dist/plugin-babel/src/helpers/index.cjs +0 -5
  130. package/dist/plugin-babel/src/helpers/index.mjs +0 -7
  131. package/dist/plugin-babel/src/helpers/module-helpers.cjs +0 -38
  132. package/dist/plugin-babel/src/helpers/module-helpers.mjs +0 -35
  133. package/dist/plugin-babel/src/helpers/options.cjs +0 -50
  134. package/dist/plugin-babel/src/helpers/options.mjs +0 -47
  135. package/dist/plugin-babel/src/index.cjs +0 -91
  136. package/dist/plugin-babel/src/index.mjs +0 -89
  137. package/dist/plugin-babel/src/types/index.d.mts +0 -1
  138. package/dist/plugin-babel/src/types/plugin.d.cts +0 -15
  139. package/dist/plugin-babel/src/types/plugin.d.mts +0 -15
  140. package/dist/plugin-env/src/babel/index.cjs +0 -1
  141. package/dist/plugin-env/src/babel/index.mjs +0 -3
  142. package/dist/plugin-env/src/babel/plugin.cjs +0 -121
  143. package/dist/plugin-env/src/babel/plugin.mjs +0 -119
  144. package/dist/plugin-env/src/components/docs.cjs +0 -9
  145. package/dist/plugin-env/src/components/docs.mjs +0 -11
  146. package/dist/plugin-env/src/components/env.cjs +0 -487
  147. package/dist/plugin-env/src/components/env.mjs +0 -484
  148. package/dist/plugin-env/src/components/index.cjs +0 -2
  149. package/dist/plugin-env/src/components/index.mjs +0 -4
  150. package/dist/plugin-env/src/helpers/automd-generator.cjs +0 -22
  151. package/dist/plugin-env/src/helpers/automd-generator.mjs +0 -21
  152. package/dist/plugin-env/src/helpers/create-reflection-resource.cjs +0 -55
  153. package/dist/plugin-env/src/helpers/create-reflection-resource.mjs +0 -54
  154. package/dist/plugin-env/src/helpers/index.cjs +0 -6
  155. package/dist/plugin-env/src/helpers/index.mjs +0 -8
  156. package/dist/plugin-env/src/helpers/load.cjs +0 -83
  157. package/dist/plugin-env/src/helpers/load.mjs +0 -80
  158. package/dist/plugin-env/src/helpers/persistence.cjs +0 -200
  159. package/dist/plugin-env/src/helpers/persistence.mjs +0 -189
  160. package/dist/plugin-env/src/helpers/reflect.cjs +0 -125
  161. package/dist/plugin-env/src/helpers/reflect.mjs +0 -117
  162. package/dist/plugin-env/src/helpers/source-file-env.cjs +0 -24
  163. package/dist/plugin-env/src/helpers/source-file-env.mjs +0 -23
  164. package/dist/plugin-env/src/helpers/template-helpers.cjs +0 -2
  165. package/dist/plugin-env/src/helpers/template-helpers.mjs +0 -4
  166. package/dist/plugin-env/src/index.cjs +0 -172
  167. package/dist/plugin-env/src/index.mjs +0 -170
  168. package/dist/plugin-env/src/types/plugin.d.cts +0 -151
  169. package/dist/plugin-env/src/types/plugin.d.mts +0 -153
  170. package/dist/plugin-env/src/types/runtime.d.cts +0 -792
  171. package/dist/plugin-env/src/types/runtime.d.mts +0 -792
  172. package/dist/powerlines/src/lib/build/esbuild.cjs +0 -102
  173. package/dist/powerlines/src/lib/build/esbuild.mjs +0 -100
  174. package/dist/powerlines/src/lib/entry.cjs +0 -12
  175. package/dist/powerlines/src/lib/entry.mjs +0 -14
  176. package/dist/powerlines/src/lib/logger.cjs +0 -41
  177. package/dist/powerlines/src/lib/logger.mjs +0 -39
  178. package/dist/powerlines/src/lib/utilities/bundle.cjs +0 -35
  179. package/dist/powerlines/src/lib/utilities/bundle.mjs +0 -34
  180. package/dist/powerlines/src/lib/utilities/file-header.cjs +0 -22
  181. package/dist/powerlines/src/lib/utilities/file-header.mjs +0 -21
  182. package/dist/powerlines/src/lib/utilities/resolve.cjs +0 -30
  183. package/dist/powerlines/src/lib/utilities/resolve.mjs +0 -29
  184. package/dist/powerlines/src/plugin-utils/paths.cjs +0 -1
  185. package/dist/powerlines/src/plugin-utils/paths.mjs +0 -3
  186. package/dist/powerlines/src/types/babel.d.cts +0 -22
  187. package/dist/powerlines/src/types/babel.d.mts +0 -22
  188. package/dist/powerlines/src/types/build.d.cts +0 -145
  189. package/dist/powerlines/src/types/build.d.mts +0 -147
  190. package/dist/powerlines/src/types/commands.d.cts +0 -8
  191. package/dist/powerlines/src/types/commands.d.mts +0 -9
  192. package/dist/powerlines/src/types/config.d.cts +0 -380
  193. package/dist/powerlines/src/types/config.d.mts +0 -381
  194. package/dist/powerlines/src/types/context.d.cts +0 -414
  195. package/dist/powerlines/src/types/context.d.mts +0 -416
  196. package/dist/powerlines/src/types/fs.d.cts +0 -486
  197. package/dist/powerlines/src/types/fs.d.mts +0 -486
  198. package/dist/powerlines/src/types/hooks.d.mts +0 -2
  199. package/dist/powerlines/src/types/plugin.d.cts +0 -231
  200. package/dist/powerlines/src/types/plugin.d.mts +0 -231
  201. package/dist/powerlines/src/types/resolved.d.cts +0 -82
  202. package/dist/powerlines/src/types/resolved.d.mts +0 -83
  203. package/dist/powerlines/src/types/tsconfig.d.cts +0 -69
  204. package/dist/powerlines/src/types/tsconfig.d.mts +0 -69
@@ -1,359 +0,0 @@
1
- const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
2
- const require_context = require('../../core/contexts/context.cjs');
3
- const require_utilities = require('../../../../deepkit/src/utilities.cjs');
4
- let __alloy_js_core = require("@alloy-js/core");
5
- let react_jsx_runtime = require("react/jsx-runtime");
6
- let __stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
7
- let __stryke_type_checks_is_undefined = require("@stryke/type-checks/is-undefined");
8
-
9
- //#region ../plugin-alloy/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, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
16
- "/**",
17
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("align", {
18
- string: " * ",
19
- children: [
20
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("hbr", {}),
21
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__alloy_js_core.Show, {
22
- when: !(0, __stryke_type_checks_is_undefined.isUndefined)(heading),
23
- children: [
24
- heading,
25
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("hbr", {}),
26
- /* @__PURE__ */ (0, react_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, react_jsx_runtime.jsx)("hbr", {})
29
- })
30
- ]
31
- }),
32
- /* @__PURE__ */ (0, react_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, react_jsx_runtime.jsx)(__alloy_js_core.List, { children: (0, __alloy_js_core.childrenArray)(() => children) })
35
- })
36
- ]
37
- }),
38
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("hbr", {}),
39
- ` */`,
40
- /* @__PURE__ */ (0, react_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, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
49
- `@${tag} `,
50
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.Show, {
51
- when: Boolean(children),
52
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("align", {
53
- width: 2,
54
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.Prose, { children })
55
- })
56
- }),
57
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("hbr", {})
58
- ] });
59
- }
60
- /**
61
- * Create a TSDoc `@title` tag.
62
- */
63
- function TSDocTitle(props) {
64
- const [{ children }, rest] = (0, __alloy_js_core.splitProps)(props, ["children"]);
65
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TSDocTag, {
66
- ...rest,
67
- tag: "title",
68
- children
69
- });
70
- }
71
- /**
72
- * Create a TSDoc `@domain` tag.
73
- */
74
- function TSDocDomain(props) {
75
- const [{ children }, rest] = (0, __alloy_js_core.splitProps)(props, ["children"]);
76
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TSDocTag, {
77
- ...rest,
78
- tag: "domain",
79
- children
80
- });
81
- }
82
- /**
83
- * Create a TSDoc `@alias` tag.
84
- */
85
- function TSDocAlias(props) {
86
- const [{ children }, rest] = (0, __alloy_js_core.splitProps)(props, ["children"]);
87
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TSDocTag, {
88
- ...rest,
89
- tag: "alias",
90
- children
91
- });
92
- }
93
- /**
94
- * Create a TSDoc `@permission` tag.
95
- */
96
- function TSDocPermission(props) {
97
- const [{ children }, rest] = (0, __alloy_js_core.splitProps)(props, ["children"]);
98
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TSDocTag, {
99
- ...rest,
100
- tag: "permission",
101
- children
102
- });
103
- }
104
- /**
105
- * Create a TSDoc `@defaultValue` tag.
106
- */
107
- function TSDocDefaultValue(props) {
108
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
109
- "@defaultValue ",
110
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.Show, {
111
- when: !(0, __stryke_type_checks_is_undefined.isUndefined)(props.value),
112
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("align", {
113
- width: 2,
114
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.Prose, { children: require_utilities.stringifyDefaultValue(props.value) })
115
- })
116
- }),
117
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("hbr", {})
118
- ] });
119
- }
120
- /**
121
- * Create a TSDoc `@remarks` tag.
122
- */
123
- function TSDocRemarks(props) {
124
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
125
- "@remarks ",
126
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("hbr", {}),
127
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.List, {
128
- hardline: true,
129
- children: (0, __alloy_js_core.childrenArray)(() => props.children)
130
- })
131
- ] });
132
- }
133
- /**
134
- * Create a TSDoc `@see` tag.
135
- */
136
- function TSDocLink(props) {
137
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TSDocTag, {
138
- ...props,
139
- tag: "see"
140
- });
141
- }
142
- /**
143
- * Create a TSDoc `@example` tag.
144
- */
145
- function TSDocExample(props) {
146
- const [{ tsx, fenced = true, language, children }] = (0, __alloy_js_core.splitProps)(props, [
147
- "tsx",
148
- "fenced",
149
- "language",
150
- "children"
151
- ]);
152
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
153
- "@example ",
154
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("hbr", {}),
155
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__alloy_js_core.Show, {
156
- when: fenced,
157
- children: [
158
- "```",
159
- language || (tsx ? "tsx" : "ts"),
160
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("hbr", {})
161
- ]
162
- }),
163
- children,
164
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__alloy_js_core.Show, {
165
- when: fenced,
166
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("hbr", {}), "```"]
167
- })
168
- ] });
169
- }
170
- /**
171
- * Create a TSDoc `@readonly` tag.
172
- */
173
- function TSDocReadonly() {
174
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TSDocTag, { tag: "readonly" });
175
- }
176
- /**
177
- * Create a TSDoc `@internal` tag.
178
- */
179
- function TSDocInternal() {
180
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TSDocTag, { tag: "internal" });
181
- }
182
- /**
183
- * Create a TSDoc `@ignore` tag.
184
- */
185
- function TSDocIgnore() {
186
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TSDocTag, { tag: "ignore" });
187
- }
188
- /**
189
- * Create a TSDoc `@hidden` tag.
190
- */
191
- function TSDocHidden() {
192
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TSDocTag, { tag: "hidden" });
193
- }
194
- /**
195
- * Generates a TypeScript interface property for the given reflection class.
196
- */
197
- function TSDocAttributesTags(props) {
198
- const [{ title, alias, permission, domain, readonly, internal, ignore, hidden, defaultValue }] = (0, __alloy_js_core.splitProps)(props, [
199
- "title",
200
- "alias",
201
- "permission",
202
- "domain",
203
- "readonly",
204
- "internal",
205
- "ignore",
206
- "hidden",
207
- "defaultValue"
208
- ]);
209
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
210
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.Show, {
211
- when: (0, __stryke_type_checks_is_set_string.isSetString)(title),
212
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TSDocTitle, { children: title })
213
- }),
214
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.Show, {
215
- when: !(0, __stryke_type_checks_is_undefined.isUndefined)(alias) && alias.length > 0,
216
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.For, {
217
- each: alias ?? [],
218
- children: (alias$1) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TSDocAlias, { children: alias$1 })
219
- })
220
- }),
221
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.Show, {
222
- when: (0, __stryke_type_checks_is_set_string.isSetString)(domain),
223
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TSDocDomain, { children: domain })
224
- }),
225
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.Show, {
226
- when: !(0, __stryke_type_checks_is_undefined.isUndefined)(permission) && permission.length > 0,
227
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.For, {
228
- each: permission ?? [],
229
- children: (permission$1) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TSDocPermission, { children: permission$1 })
230
- })
231
- }),
232
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.Show, {
233
- when: readonly === true,
234
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TSDocReadonly, {})
235
- }),
236
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.Show, {
237
- when: internal === true,
238
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TSDocInternal, {})
239
- }),
240
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.Show, {
241
- when: ignore === true,
242
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TSDocIgnore, {})
243
- }),
244
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.Show, {
245
- when: hidden === true,
246
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TSDocHidden, {})
247
- }),
248
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.Show, {
249
- when: !(0, __stryke_type_checks_is_undefined.isUndefined)(defaultValue),
250
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TSDocDefaultValue, { value: defaultValue })
251
- })
252
- ] });
253
- }
254
- /**
255
- * Create a TSDoc parameter set off with `@param`.
256
- */
257
- function TSDocParam(props) {
258
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
259
- "@param ",
260
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TSDocParamName, {
261
- name: props.name,
262
- optional: props.optional,
263
- defaultValue: props.defaultValue
264
- }),
265
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TSDocParamDescription, { children: props.children })
266
- ] });
267
- }
268
- function TSDocParamName(props) {
269
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
270
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.Show, {
271
- when: props.optional,
272
- children: "["
273
- }),
274
- props.name,
275
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__alloy_js_core.Show, {
276
- when: Boolean(props.defaultValue),
277
- children: ["=", props.defaultValue]
278
- }),
279
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.Show, {
280
- when: props.optional,
281
- children: "]"
282
- })
283
- ] });
284
- }
285
- function TSDocParamDescription(props) {
286
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__alloy_js_core.Show, {
287
- when: Boolean(props.children),
288
- children: [" - ", /* @__PURE__ */ (0, react_jsx_runtime.jsx)("align", {
289
- width: 2,
290
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.Prose, { children: props.children })
291
- })]
292
- });
293
- }
294
- /**
295
- * Create a TSDoc `@returns` tag.
296
- */
297
- function TSDocReturns(props) {
298
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TSDocTag, {
299
- ...props,
300
- tag: "returns"
301
- });
302
- }
303
- /**
304
- * Create a TSDoc `@throws` tag.
305
- */
306
- function TSDocThrows(props) {
307
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TSDocTag, {
308
- ...props,
309
- tag: "throws"
310
- });
311
- }
312
- /**
313
- * Generates a TSDoc `@module` tag for the given module name.
314
- */
315
- function TSDocModule(props) {
316
- const [{ children, name, prefix }] = (0, __alloy_js_core.splitProps)(props, [
317
- "children",
318
- "name",
319
- "prefix"
320
- ]);
321
- const context = require_context.usePowerlines();
322
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
323
- "/**",
324
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("align", {
325
- string: " * ",
326
- children: [
327
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("hbr", {}),
328
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__alloy_js_core.Show, {
329
- when: Boolean(children),
330
- children: [
331
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.List, {
332
- hardline: true,
333
- children: (0, __alloy_js_core.childrenArray)(() => children)
334
- }),
335
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("hbr", {}),
336
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("hbr", {})
337
- ]
338
- }),
339
- "@module ",
340
- prefix || context?.config.output.builtinPrefix,
341
- ":",
342
- name
343
- ]
344
- }),
345
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("hbr", {}),
346
- ` */`
347
- ] });
348
- }
349
-
350
- //#endregion
351
- exports.TSDoc = TSDoc;
352
- exports.TSDocAttributesTags = TSDocAttributesTags;
353
- exports.TSDocExample = TSDocExample;
354
- exports.TSDocLink = TSDocLink;
355
- exports.TSDocModule = TSDocModule;
356
- exports.TSDocParam = TSDocParam;
357
- exports.TSDocRemarks = TSDocRemarks;
358
- exports.TSDocReturns = TSDocReturns;
359
- exports.TSDocThrows = TSDocThrows;
@@ -1,350 +0,0 @@
1
- import { usePowerlines } from "../../core/contexts/context.mjs";
2
- import { stringifyDefaultValue } from "../../../../deepkit/src/utilities.mjs";
3
- import { For, List, Prose, Show, childrenArray, splitProps } from "@alloy-js/core";
4
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
- import { isSetString } from "@stryke/type-checks/is-set-string";
6
- import { isUndefined } from "@stryke/type-checks/is-undefined";
7
-
8
- //#region ../plugin-alloy/src/typescript/components/tsdoc.tsx
9
- /**
10
- * Generates a TypeScript interface for the given reflection class.
11
- */
12
- function TSDoc(props) {
13
- const [{ children, heading }] = splitProps(props, ["children", "heading"]);
14
- return /* @__PURE__ */ jsxs(Fragment, { children: [
15
- "/**",
16
- /* @__PURE__ */ jsxs("align", {
17
- string: " * ",
18
- children: [
19
- /* @__PURE__ */ jsx("hbr", {}),
20
- /* @__PURE__ */ jsxs(Show, {
21
- when: !isUndefined(heading),
22
- children: [
23
- heading,
24
- /* @__PURE__ */ jsx("hbr", {}),
25
- /* @__PURE__ */ jsx(Show, {
26
- when: !isUndefined(children) && childrenArray(() => children).length > 0,
27
- children: /* @__PURE__ */ jsx("hbr", {})
28
- })
29
- ]
30
- }),
31
- /* @__PURE__ */ jsx(Show, {
32
- when: !isUndefined(children) && childrenArray(() => children).length > 0,
33
- children: /* @__PURE__ */ jsx(List, { children: childrenArray(() => children) })
34
- })
35
- ]
36
- }),
37
- /* @__PURE__ */ jsx("hbr", {}),
38
- ` */`,
39
- /* @__PURE__ */ jsx("hbr", {})
40
- ] });
41
- }
42
- /**
43
- * Create a TSDoc `@<props.tag>` tag.
44
- */
45
- function TSDocTag(props) {
46
- const [{ children, tag }] = splitProps(props, ["children", "tag"]);
47
- return /* @__PURE__ */ jsxs(Fragment, { children: [
48
- `@${tag} `,
49
- /* @__PURE__ */ jsx(Show, {
50
- when: Boolean(children),
51
- children: /* @__PURE__ */ jsx("align", {
52
- width: 2,
53
- children: /* @__PURE__ */ jsx(Prose, { children })
54
- })
55
- }),
56
- /* @__PURE__ */ jsx("hbr", {})
57
- ] });
58
- }
59
- /**
60
- * Create a TSDoc `@title` tag.
61
- */
62
- function TSDocTitle(props) {
63
- const [{ children }, rest] = splitProps(props, ["children"]);
64
- return /* @__PURE__ */ jsx(TSDocTag, {
65
- ...rest,
66
- tag: "title",
67
- children
68
- });
69
- }
70
- /**
71
- * Create a TSDoc `@domain` tag.
72
- */
73
- function TSDocDomain(props) {
74
- const [{ children }, rest] = splitProps(props, ["children"]);
75
- return /* @__PURE__ */ jsx(TSDocTag, {
76
- ...rest,
77
- tag: "domain",
78
- children
79
- });
80
- }
81
- /**
82
- * Create a TSDoc `@alias` tag.
83
- */
84
- function TSDocAlias(props) {
85
- const [{ children }, rest] = splitProps(props, ["children"]);
86
- return /* @__PURE__ */ jsx(TSDocTag, {
87
- ...rest,
88
- tag: "alias",
89
- children
90
- });
91
- }
92
- /**
93
- * Create a TSDoc `@permission` tag.
94
- */
95
- function TSDocPermission(props) {
96
- const [{ children }, rest] = splitProps(props, ["children"]);
97
- return /* @__PURE__ */ jsx(TSDocTag, {
98
- ...rest,
99
- tag: "permission",
100
- children
101
- });
102
- }
103
- /**
104
- * Create a TSDoc `@defaultValue` tag.
105
- */
106
- function TSDocDefaultValue(props) {
107
- return /* @__PURE__ */ jsxs(Fragment, { children: [
108
- "@defaultValue ",
109
- /* @__PURE__ */ jsx(Show, {
110
- when: !isUndefined(props.value),
111
- children: /* @__PURE__ */ jsx("align", {
112
- width: 2,
113
- children: /* @__PURE__ */ jsx(Prose, { children: stringifyDefaultValue(props.value) })
114
- })
115
- }),
116
- /* @__PURE__ */ jsx("hbr", {})
117
- ] });
118
- }
119
- /**
120
- * Create a TSDoc `@remarks` tag.
121
- */
122
- function TSDocRemarks(props) {
123
- return /* @__PURE__ */ jsxs(Fragment, { children: [
124
- "@remarks ",
125
- /* @__PURE__ */ jsx("hbr", {}),
126
- /* @__PURE__ */ jsx(List, {
127
- hardline: true,
128
- children: childrenArray(() => props.children)
129
- })
130
- ] });
131
- }
132
- /**
133
- * Create a TSDoc `@see` tag.
134
- */
135
- function TSDocLink(props) {
136
- return /* @__PURE__ */ jsx(TSDocTag, {
137
- ...props,
138
- tag: "see"
139
- });
140
- }
141
- /**
142
- * Create a TSDoc `@example` tag.
143
- */
144
- function TSDocExample(props) {
145
- const [{ tsx, fenced = true, language, children }] = splitProps(props, [
146
- "tsx",
147
- "fenced",
148
- "language",
149
- "children"
150
- ]);
151
- return /* @__PURE__ */ jsxs(Fragment, { children: [
152
- "@example ",
153
- /* @__PURE__ */ jsx("hbr", {}),
154
- /* @__PURE__ */ jsxs(Show, {
155
- when: fenced,
156
- children: [
157
- "```",
158
- language || (tsx ? "tsx" : "ts"),
159
- /* @__PURE__ */ jsx("hbr", {})
160
- ]
161
- }),
162
- children,
163
- /* @__PURE__ */ jsxs(Show, {
164
- when: fenced,
165
- children: [/* @__PURE__ */ jsx("hbr", {}), "```"]
166
- })
167
- ] });
168
- }
169
- /**
170
- * Create a TSDoc `@readonly` tag.
171
- */
172
- function TSDocReadonly() {
173
- return /* @__PURE__ */ jsx(TSDocTag, { tag: "readonly" });
174
- }
175
- /**
176
- * Create a TSDoc `@internal` tag.
177
- */
178
- function TSDocInternal() {
179
- return /* @__PURE__ */ jsx(TSDocTag, { tag: "internal" });
180
- }
181
- /**
182
- * Create a TSDoc `@ignore` tag.
183
- */
184
- function TSDocIgnore() {
185
- return /* @__PURE__ */ jsx(TSDocTag, { tag: "ignore" });
186
- }
187
- /**
188
- * Create a TSDoc `@hidden` tag.
189
- */
190
- function TSDocHidden() {
191
- return /* @__PURE__ */ jsx(TSDocTag, { tag: "hidden" });
192
- }
193
- /**
194
- * Generates a TypeScript interface property for the given reflection class.
195
- */
196
- function TSDocAttributesTags(props) {
197
- const [{ title, alias, permission, domain, readonly, internal, ignore, hidden, defaultValue }] = splitProps(props, [
198
- "title",
199
- "alias",
200
- "permission",
201
- "domain",
202
- "readonly",
203
- "internal",
204
- "ignore",
205
- "hidden",
206
- "defaultValue"
207
- ]);
208
- return /* @__PURE__ */ jsxs(Fragment, { children: [
209
- /* @__PURE__ */ jsx(Show, {
210
- when: isSetString(title),
211
- children: /* @__PURE__ */ jsx(TSDocTitle, { children: title })
212
- }),
213
- /* @__PURE__ */ jsx(Show, {
214
- when: !isUndefined(alias) && alias.length > 0,
215
- children: /* @__PURE__ */ jsx(For, {
216
- each: alias ?? [],
217
- children: (alias$1) => /* @__PURE__ */ jsx(TSDocAlias, { children: alias$1 })
218
- })
219
- }),
220
- /* @__PURE__ */ jsx(Show, {
221
- when: isSetString(domain),
222
- children: /* @__PURE__ */ jsx(TSDocDomain, { children: domain })
223
- }),
224
- /* @__PURE__ */ jsx(Show, {
225
- when: !isUndefined(permission) && permission.length > 0,
226
- children: /* @__PURE__ */ jsx(For, {
227
- each: permission ?? [],
228
- children: (permission$1) => /* @__PURE__ */ jsx(TSDocPermission, { children: permission$1 })
229
- })
230
- }),
231
- /* @__PURE__ */ jsx(Show, {
232
- when: readonly === true,
233
- children: /* @__PURE__ */ jsx(TSDocReadonly, {})
234
- }),
235
- /* @__PURE__ */ jsx(Show, {
236
- when: internal === true,
237
- children: /* @__PURE__ */ jsx(TSDocInternal, {})
238
- }),
239
- /* @__PURE__ */ jsx(Show, {
240
- when: ignore === true,
241
- children: /* @__PURE__ */ jsx(TSDocIgnore, {})
242
- }),
243
- /* @__PURE__ */ jsx(Show, {
244
- when: hidden === true,
245
- children: /* @__PURE__ */ jsx(TSDocHidden, {})
246
- }),
247
- /* @__PURE__ */ jsx(Show, {
248
- when: !isUndefined(defaultValue),
249
- children: /* @__PURE__ */ jsx(TSDocDefaultValue, { value: defaultValue })
250
- })
251
- ] });
252
- }
253
- /**
254
- * Create a TSDoc parameter set off with `@param`.
255
- */
256
- function TSDocParam(props) {
257
- return /* @__PURE__ */ jsxs(Fragment, { children: [
258
- "@param ",
259
- /* @__PURE__ */ jsx(TSDocParamName, {
260
- name: props.name,
261
- optional: props.optional,
262
- defaultValue: props.defaultValue
263
- }),
264
- /* @__PURE__ */ jsx(TSDocParamDescription, { children: props.children })
265
- ] });
266
- }
267
- function TSDocParamName(props) {
268
- return /* @__PURE__ */ jsxs(Fragment, { children: [
269
- /* @__PURE__ */ jsx(Show, {
270
- when: props.optional,
271
- children: "["
272
- }),
273
- props.name,
274
- /* @__PURE__ */ jsxs(Show, {
275
- when: Boolean(props.defaultValue),
276
- children: ["=", props.defaultValue]
277
- }),
278
- /* @__PURE__ */ jsx(Show, {
279
- when: props.optional,
280
- children: "]"
281
- })
282
- ] });
283
- }
284
- function TSDocParamDescription(props) {
285
- return /* @__PURE__ */ jsxs(Show, {
286
- when: Boolean(props.children),
287
- children: [" - ", /* @__PURE__ */ jsx("align", {
288
- width: 2,
289
- children: /* @__PURE__ */ jsx(Prose, { children: props.children })
290
- })]
291
- });
292
- }
293
- /**
294
- * Create a TSDoc `@returns` tag.
295
- */
296
- function TSDocReturns(props) {
297
- return /* @__PURE__ */ jsx(TSDocTag, {
298
- ...props,
299
- tag: "returns"
300
- });
301
- }
302
- /**
303
- * Create a TSDoc `@throws` tag.
304
- */
305
- function TSDocThrows(props) {
306
- return /* @__PURE__ */ jsx(TSDocTag, {
307
- ...props,
308
- tag: "throws"
309
- });
310
- }
311
- /**
312
- * Generates a TSDoc `@module` tag for the given module name.
313
- */
314
- function TSDocModule(props) {
315
- const [{ children, name, prefix }] = splitProps(props, [
316
- "children",
317
- "name",
318
- "prefix"
319
- ]);
320
- const context = usePowerlines();
321
- return /* @__PURE__ */ jsxs(Fragment, { children: [
322
- "/**",
323
- /* @__PURE__ */ jsxs("align", {
324
- string: " * ",
325
- children: [
326
- /* @__PURE__ */ jsx("hbr", {}),
327
- /* @__PURE__ */ jsxs(Show, {
328
- when: Boolean(children),
329
- children: [
330
- /* @__PURE__ */ jsx(List, {
331
- hardline: true,
332
- children: childrenArray(() => children)
333
- }),
334
- /* @__PURE__ */ jsx("hbr", {}),
335
- /* @__PURE__ */ jsx("hbr", {})
336
- ]
337
- }),
338
- "@module ",
339
- prefix || context?.config.output.builtinPrefix,
340
- ":",
341
- name
342
- ]
343
- }),
344
- /* @__PURE__ */ jsx("hbr", {}),
345
- ` */`
346
- ] });
347
- }
348
-
349
- //#endregion
350
- export { TSDoc, TSDocAttributesTags, TSDocExample, TSDocLink, TSDocModule, TSDocParam, TSDocRemarks, TSDocReturns, TSDocThrows };