@powerlines/plugin-react 0.1.105 → 0.1.107

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 (218) hide show
  1. package/dist/{_virtual/rolldown_runtime.mjs → chunk-CF6LXmkI.mjs} +1 -1
  2. package/dist/components/index.cjs +1 -1
  3. package/dist/components/index.d.cts +2 -1
  4. package/dist/components/index.d.mts +2 -1
  5. package/dist/components/index.mjs +1 -1
  6. package/dist/components/react-optimized.cjs +1 -1
  7. package/dist/components/react-optimized.d.cts +1 -13
  8. package/dist/components/react-optimized.d.mts +1 -13
  9. package/dist/components/react-optimized.mjs +1 -1
  10. package/dist/components-BWLXb7a2.cjs +0 -0
  11. package/dist/components-MTvNCZDU.mjs +1 -0
  12. package/dist/index-C-svZlpj.d.mts +1 -0
  13. package/dist/index-CtCMUyZA.d.cts +1 -0
  14. package/dist/index-DEHBdV_z.d.mts +1 -0
  15. package/dist/index-_wQ5ClJU.d.cts +1 -0
  16. package/dist/index.cjs +63 -1
  17. package/dist/index.d.cts +7 -6
  18. package/dist/index.d.mts +7 -9
  19. package/dist/index.mjs +60 -1
  20. package/dist/{deepkit/schemas/reflection.d.mts → plugin-C1nLepnu.d.cts} +322 -1
  21. package/dist/{deepkit/schemas/reflection.d.cts → plugin-CCWbVJ0P.d.mts} +321 -1
  22. package/dist/plugin-G4qbpIjB.mjs +1 -0
  23. package/dist/plugin-pBKbb5K9.cjs +0 -0
  24. package/dist/react-optimized-Btf0j0ZP.cjs +1 -0
  25. package/dist/react-optimized-C8ZBC6OY.mjs +1 -0
  26. package/dist/react-optimized-DmMl-ZEI.d.cts +14 -0
  27. package/dist/react-optimized-Y1x3FeDm.d.mts +14 -0
  28. package/dist/runtime-BNQjyQ7l.d.cts +2495 -0
  29. package/dist/runtime-Bp9G0scd.cjs +0 -0
  30. package/dist/runtime-CKObV75t.d.cts +15 -0
  31. package/dist/runtime-CKyYLoHU.d.mts +15 -0
  32. package/dist/runtime-CbWds61u.d.mts +2497 -0
  33. package/dist/runtime-cDYyRPa0.mjs +1 -0
  34. package/dist/types/index.cjs +1 -0
  35. package/dist/types/index.d.cts +4 -2
  36. package/dist/types/index.d.mts +4 -2
  37. package/dist/types/index.mjs +1 -1
  38. package/dist/types/plugin.cjs +1 -0
  39. package/dist/types/plugin.d.cts +2 -72
  40. package/dist/types/plugin.d.mts +2 -72
  41. package/dist/types/plugin.mjs +1 -1
  42. package/dist/types/runtime.cjs +1 -0
  43. package/dist/types/runtime.d.cts +2 -14
  44. package/dist/types/runtime.d.mts +2 -14
  45. package/dist/types/runtime.mjs +1 -1
  46. package/dist/types-C5ggNT4K.mjs +1 -0
  47. package/dist/types-a8gm_IaQ.cjs +0 -0
  48. package/package.json +13 -9
  49. package/dist/_virtual/rolldown_runtime.cjs +0 -1
  50. package/dist/alloy/src/core/components/output.cjs +0 -1
  51. package/dist/alloy/src/core/components/output.mjs +0 -1
  52. package/dist/alloy/src/core/components/single-line-comment.cjs +0 -1
  53. package/dist/alloy/src/core/components/single-line-comment.mjs +0 -1
  54. package/dist/alloy/src/core/components/source-file.cjs +0 -1
  55. package/dist/alloy/src/core/components/source-file.d.cts +0 -22
  56. package/dist/alloy/src/core/components/source-file.d.mts +0 -22
  57. package/dist/alloy/src/core/components/source-file.mjs +0 -1
  58. package/dist/alloy/src/core/contexts/context.cjs +0 -1
  59. package/dist/alloy/src/core/contexts/context.mjs +0 -1
  60. package/dist/alloy/src/core/contexts/reflection.cjs +0 -1
  61. package/dist/alloy/src/core/contexts/reflection.mjs +0 -1
  62. package/dist/alloy/src/create-plugin.cjs +0 -2
  63. package/dist/alloy/src/create-plugin.mjs +0 -2
  64. package/dist/alloy/src/helpers/refkey.cjs +0 -1
  65. package/dist/alloy/src/helpers/refkey.mjs +0 -1
  66. package/dist/alloy/src/markdown/components/markdown-file.cjs +0 -1
  67. package/dist/alloy/src/markdown/components/markdown-file.mjs +0 -1
  68. package/dist/alloy/src/markdown/components/markdown-table.cjs +0 -1
  69. package/dist/alloy/src/markdown/components/markdown-table.mjs +0 -1
  70. package/dist/alloy/src/markdown/contexts/markdown-table.cjs +0 -1
  71. package/dist/alloy/src/markdown/contexts/markdown-table.mjs +0 -1
  72. package/dist/alloy/src/types/components.d.cts +0 -19
  73. package/dist/alloy/src/types/components.d.mts +0 -23
  74. package/dist/alloy/src/types/plugin.d.cts +0 -15
  75. package/dist/alloy/src/types/plugin.d.mts +0 -15
  76. package/dist/alloy/src/typescript/components/builtin-file.cjs +0 -1
  77. package/dist/alloy/src/typescript/components/builtin-file.d.cts +0 -25
  78. package/dist/alloy/src/typescript/components/builtin-file.d.mts +0 -26
  79. package/dist/alloy/src/typescript/components/builtin-file.mjs +0 -1
  80. package/dist/alloy/src/typescript/components/tsdoc-reflection.cjs +0 -1
  81. package/dist/alloy/src/typescript/components/tsdoc-reflection.mjs +0 -1
  82. package/dist/alloy/src/typescript/components/tsdoc.cjs +0 -1
  83. package/dist/alloy/src/typescript/components/tsdoc.d.cts +0 -27
  84. package/dist/alloy/src/typescript/components/tsdoc.d.mts +0 -28
  85. package/dist/alloy/src/typescript/components/tsdoc.mjs +0 -1
  86. package/dist/alloy/src/typescript/components/typescript-file.cjs +0 -1
  87. package/dist/alloy/src/typescript/components/typescript-file.d.cts +0 -14
  88. package/dist/alloy/src/typescript/components/typescript-file.d.mts +0 -15
  89. package/dist/alloy/src/typescript/components/typescript-file.mjs +0 -1
  90. package/dist/alloy/src/typescript/components/typescript-interface.cjs +0 -1
  91. package/dist/alloy/src/typescript/components/typescript-interface.mjs +0 -1
  92. package/dist/alloy/src/typescript/components/typescript-object.cjs +0 -1
  93. package/dist/alloy/src/typescript/components/typescript-object.mjs +0 -1
  94. package/dist/deepkit/schemas/reflection.cjs +0 -1
  95. package/dist/deepkit/schemas/reflection.mjs +0 -1
  96. package/dist/deepkit/schemas/reflection2.cjs +0 -1
  97. package/dist/deepkit/schemas/reflection2.mjs +0 -1
  98. package/dist/deepkit/src/capnp.cjs +0 -1
  99. package/dist/deepkit/src/capnp.mjs +0 -1
  100. package/dist/deepkit/src/esbuild-plugin.cjs +0 -4
  101. package/dist/deepkit/src/esbuild-plugin.mjs +0 -4
  102. package/dist/deepkit/src/reflect-type.cjs +0 -1
  103. package/dist/deepkit/src/reflect-type.mjs +0 -1
  104. package/dist/deepkit/src/resolve-reflections.cjs +0 -1
  105. package/dist/deepkit/src/resolve-reflections.mjs +0 -1
  106. package/dist/deepkit/src/transformer.cjs +0 -1
  107. package/dist/deepkit/src/transformer.mjs +0 -1
  108. package/dist/deepkit/src/transpile.cjs +0 -1
  109. package/dist/deepkit/src/transpile.mjs +0 -1
  110. package/dist/deepkit/src/types.d.cts +0 -10
  111. package/dist/deepkit/src/types.d.mts +0 -10
  112. package/dist/deepkit/src/utilities.cjs +0 -1
  113. package/dist/deepkit/src/utilities.mjs +0 -1
  114. package/dist/deepkit/src/vendor/type-compiler/index.cjs +0 -1
  115. package/dist/deepkit/src/vendor/type-compiler/index.mjs +0 -1
  116. package/dist/deepkit/src/vendor/type.cjs +0 -1
  117. package/dist/deepkit/src/vendor/type.d.cts +0 -7
  118. package/dist/deepkit/src/vendor/type.d.mts +0 -7
  119. package/dist/deepkit/src/vendor/type.mjs +0 -1
  120. package/dist/plugin-automd/src/index.cjs +0 -1
  121. package/dist/plugin-automd/src/index.mjs +0 -1
  122. package/dist/plugin-automd/src/types/plugin.d.cts +0 -38
  123. package/dist/plugin-automd/src/types/plugin.d.mts +0 -40
  124. package/dist/plugin-automd/src/types/toc.d.cts +0 -33
  125. package/dist/plugin-automd/src/types/toc.d.mts +0 -33
  126. package/dist/plugin-babel/src/helpers/ast-utils.cjs +0 -1
  127. package/dist/plugin-babel/src/helpers/ast-utils.mjs +0 -1
  128. package/dist/plugin-babel/src/helpers/create-plugin.cjs +0 -1
  129. package/dist/plugin-babel/src/helpers/create-plugin.mjs +0 -1
  130. package/dist/plugin-babel/src/helpers/filters.cjs +0 -1
  131. package/dist/plugin-babel/src/helpers/filters.mjs +0 -1
  132. package/dist/plugin-babel/src/helpers/index.cjs +0 -1
  133. package/dist/plugin-babel/src/helpers/index.mjs +0 -1
  134. package/dist/plugin-babel/src/helpers/module-helpers.cjs +0 -1
  135. package/dist/plugin-babel/src/helpers/module-helpers.mjs +0 -1
  136. package/dist/plugin-babel/src/helpers/options.cjs +0 -1
  137. package/dist/plugin-babel/src/helpers/options.mjs +0 -1
  138. package/dist/plugin-babel/src/index.cjs +0 -1
  139. package/dist/plugin-babel/src/index.mjs +0 -1
  140. package/dist/plugin-babel/src/types/index.d.mts +0 -1
  141. package/dist/plugin-babel/src/types/plugin.d.cts +0 -15
  142. package/dist/plugin-babel/src/types/plugin.d.mts +0 -15
  143. package/dist/plugin-env/src/babel/index.cjs +0 -1
  144. package/dist/plugin-env/src/babel/index.mjs +0 -1
  145. package/dist/plugin-env/src/babel/plugin.cjs +0 -5
  146. package/dist/plugin-env/src/babel/plugin.mjs +0 -5
  147. package/dist/plugin-env/src/components/docs.cjs +0 -1
  148. package/dist/plugin-env/src/components/docs.mjs +0 -1
  149. package/dist/plugin-env/src/components/env.cjs +0 -34
  150. package/dist/plugin-env/src/components/env.mjs +0 -31
  151. package/dist/plugin-env/src/components/index.cjs +0 -1
  152. package/dist/plugin-env/src/components/index.mjs +0 -1
  153. package/dist/plugin-env/src/helpers/automd-generator.cjs +0 -1
  154. package/dist/plugin-env/src/helpers/automd-generator.mjs +0 -1
  155. package/dist/plugin-env/src/helpers/create-reflection-resource.cjs +0 -1
  156. package/dist/plugin-env/src/helpers/create-reflection-resource.mjs +0 -1
  157. package/dist/plugin-env/src/helpers/index.cjs +0 -1
  158. package/dist/plugin-env/src/helpers/index.mjs +0 -1
  159. package/dist/plugin-env/src/helpers/load.cjs +0 -1
  160. package/dist/plugin-env/src/helpers/load.mjs +0 -1
  161. package/dist/plugin-env/src/helpers/persistence.cjs +0 -1
  162. package/dist/plugin-env/src/helpers/persistence.mjs +0 -1
  163. package/dist/plugin-env/src/helpers/reflect.cjs +0 -1
  164. package/dist/plugin-env/src/helpers/reflect.mjs +0 -1
  165. package/dist/plugin-env/src/helpers/source-file-env.cjs +0 -1
  166. package/dist/plugin-env/src/helpers/source-file-env.mjs +0 -1
  167. package/dist/plugin-env/src/helpers/template-helpers.cjs +0 -1
  168. package/dist/plugin-env/src/helpers/template-helpers.mjs +0 -1
  169. package/dist/plugin-env/src/index.cjs +0 -10
  170. package/dist/plugin-env/src/index.mjs +0 -10
  171. package/dist/plugin-env/src/types/plugin.d.cts +0 -143
  172. package/dist/plugin-env/src/types/plugin.d.mts +0 -144
  173. package/dist/plugin-env/src/types/runtime.d.cts +0 -792
  174. package/dist/plugin-env/src/types/runtime.d.mts +0 -792
  175. package/dist/plugin-plugin/src/types/plugin.d.cts +0 -21
  176. package/dist/plugin-plugin/src/types/plugin.d.mts +0 -24
  177. package/dist/powerlines/schemas/fs.d.mts +0 -1
  178. package/dist/powerlines/src/api.d.mts +0 -7
  179. package/dist/powerlines/src/index.d.mts +0 -12
  180. package/dist/powerlines/src/internal/helpers/hooks.d.mts +0 -5
  181. package/dist/powerlines/src/lib/build/esbuild.cjs +0 -14
  182. package/dist/powerlines/src/lib/build/esbuild.mjs +0 -14
  183. package/dist/powerlines/src/lib/entry.cjs +0 -1
  184. package/dist/powerlines/src/lib/entry.mjs +0 -1
  185. package/dist/powerlines/src/lib/logger.cjs +0 -1
  186. package/dist/powerlines/src/lib/logger.mjs +0 -1
  187. package/dist/powerlines/src/lib/typescript/tsconfig.cjs +0 -1
  188. package/dist/powerlines/src/lib/typescript/tsconfig.mjs +0 -1
  189. package/dist/powerlines/src/lib/utilities/bundle.cjs +0 -1
  190. package/dist/powerlines/src/lib/utilities/bundle.mjs +0 -1
  191. package/dist/powerlines/src/lib/utilities/resolve.cjs +0 -1
  192. package/dist/powerlines/src/lib/utilities/resolve.mjs +0 -1
  193. package/dist/powerlines/src/plugin-utils/helpers.cjs +0 -1
  194. package/dist/powerlines/src/plugin-utils/helpers.mjs +0 -1
  195. package/dist/powerlines/src/plugin-utils/paths.cjs +0 -1
  196. package/dist/powerlines/src/plugin-utils/paths.mjs +0 -1
  197. package/dist/powerlines/src/types/api.d.mts +0 -5
  198. package/dist/powerlines/src/types/babel.d.cts +0 -22
  199. package/dist/powerlines/src/types/babel.d.mts +0 -22
  200. package/dist/powerlines/src/types/build.d.cts +0 -145
  201. package/dist/powerlines/src/types/build.d.mts +0 -147
  202. package/dist/powerlines/src/types/commands.d.cts +0 -8
  203. package/dist/powerlines/src/types/commands.d.mts +0 -9
  204. package/dist/powerlines/src/types/config.d.cts +0 -368
  205. package/dist/powerlines/src/types/config.d.mts +0 -369
  206. package/dist/powerlines/src/types/context.d.cts +0 -373
  207. package/dist/powerlines/src/types/context.d.mts +0 -375
  208. package/dist/powerlines/src/types/fs.d.cts +0 -458
  209. package/dist/powerlines/src/types/fs.d.mts +0 -458
  210. package/dist/powerlines/src/types/hooks.d.mts +0 -2
  211. package/dist/powerlines/src/types/index.d.mts +0 -12
  212. package/dist/powerlines/src/types/plugin.d.cts +0 -232
  213. package/dist/powerlines/src/types/plugin.d.mts +0 -232
  214. package/dist/powerlines/src/types/resolved.d.cts +0 -82
  215. package/dist/powerlines/src/types/resolved.d.mts +0 -83
  216. package/dist/powerlines/src/types/tsconfig.d.cts +0 -69
  217. package/dist/powerlines/src/types/tsconfig.d.mts +0 -69
  218. package/dist/powerlines/src/types/unplugin.d.mts +0 -7
@@ -0,0 +1 @@
1
+ export{};
@@ -0,0 +1 @@
1
+ require(`../plugin-pBKbb5K9.cjs`),require(`../runtime-Bp9G0scd.cjs`),require(`../types-a8gm_IaQ.cjs`);
@@ -1,3 +1,5 @@
1
- import { ReactCompilerOptions, ReactPluginContext, ReactPluginOptions, ReactPluginResolvedConfig, ReactPluginUserConfig, __ΩReactCompilerOptions, __ΩReactPluginContext, __ΩReactPluginOptions, __ΩReactPluginResolvedConfig, __ΩReactPluginUserConfig } from "./plugin.cjs";
2
- import { ReactEnvInterface, __ΩReactEnvInterface } from "./runtime.cjs";
1
+ import { a as ReactPluginUserConfig, c as __ΩReactPluginOptions, i as ReactPluginResolvedConfig, l as __ΩReactPluginResolvedConfig, n as ReactPluginContext, o as __ΩReactCompilerOptions, r as ReactPluginOptions, s as __ΩReactPluginContext, t as ReactCompilerOptions, u as __ΩReactPluginUserConfig } from "../plugin-C1nLepnu.cjs";
2
+ import "../runtime-BNQjyQ7l.cjs";
3
+ import { n as __ΩReactEnvInterface, t as ReactEnvInterface } from "../runtime-CKObV75t.cjs";
4
+ import "../index-CtCMUyZA.cjs";
3
5
  export { ReactCompilerOptions, ReactEnvInterface, ReactPluginContext, ReactPluginOptions, ReactPluginResolvedConfig, ReactPluginUserConfig, __ΩReactCompilerOptions, __ΩReactEnvInterface, __ΩReactPluginContext, __ΩReactPluginOptions, __ΩReactPluginResolvedConfig, __ΩReactPluginUserConfig };
@@ -1,3 +1,5 @@
1
- import { ReactCompilerOptions, ReactPluginContext, ReactPluginOptions, ReactPluginResolvedConfig, ReactPluginUserConfig, __ΩReactCompilerOptions, __ΩReactPluginContext, __ΩReactPluginOptions, __ΩReactPluginResolvedConfig, __ΩReactPluginUserConfig } from "./plugin.mjs";
2
- import { ReactEnvInterface, __ΩReactEnvInterface } from "./runtime.mjs";
1
+ import "../runtime-CbWds61u.mjs";
2
+ import { a as ReactPluginUserConfig, c as __ΩReactPluginOptions, i as ReactPluginResolvedConfig, l as __ΩReactPluginResolvedConfig, n as ReactPluginContext, o as __ΩReactCompilerOptions, r as ReactPluginOptions, s as __ΩReactPluginContext, t as ReactCompilerOptions, u as __ΩReactPluginUserConfig } from "../plugin-CCWbVJ0P.mjs";
3
+ import { n as __ΩReactEnvInterface, t as ReactEnvInterface } from "../runtime-CKyYLoHU.mjs";
4
+ import "../index-C-svZlpj.mjs";
3
5
  export { ReactCompilerOptions, ReactEnvInterface, ReactPluginContext, ReactPluginOptions, ReactPluginResolvedConfig, ReactPluginUserConfig, __ΩReactCompilerOptions, __ΩReactEnvInterface, __ΩReactPluginContext, __ΩReactPluginOptions, __ΩReactPluginResolvedConfig, __ΩReactPluginUserConfig };
@@ -1 +1 @@
1
- export{};
1
+ import"../plugin-G4qbpIjB.mjs";import"../runtime-cDYyRPa0.mjs";import"../types-C5ggNT4K.mjs";export{};
@@ -0,0 +1 @@
1
+ require(`../plugin-pBKbb5K9.cjs`);
@@ -1,73 +1,3 @@
1
- import { BabelPluginOptions } from "../plugin-babel/src/types/plugin.cjs";
2
- import { EnvPluginContext, EnvPluginOptions, EnvPluginResolvedConfig, EnvPluginUserConfig } from "../plugin-env/src/types/plugin.cjs";
3
- import { PluginOptions } from "babel-plugin-react-compiler";
4
-
5
- //#region src/types/plugin.d.ts
6
- type ReactCompilerOptions = Omit<PluginOptions, "logger">;
7
- interface ReactPluginOptions {
8
- /**
9
- * Control where the JSX factory is imported from.
10
- *
11
- * @see https://esbuild.github.io/api/#jsx-import-source
12
- *
13
- * @defaultValue "react"
14
- */
15
- jsxImportSource?: string;
16
- /**
17
- * Control how JSX is transformed.
18
- *
19
- * @remarks
20
- * Skipping React import with classic runtime is not supported from v4
21
- *
22
- * @defaultValue "automatic"
23
- */
24
- jsxRuntime?: "classic" | "automatic";
25
- /**
26
- * Options provided to the [React Compiler](https://npmjs.com/package/babel-plugin-react-compiler).
27
- *
28
- * @see https://github.com/facebook/react/blob/main/compiler/packages/babel-plugin-react-compiler/src/Entrypoint/Options.ts#L55
29
- * @see https://react.dev/blog/2025/04/21/react-compiler-rc
30
- *
31
- * @remarks
32
- * Set to `false` to disable the React Compiler. By default, the React Compiler is enabled and target is set to React 19.
33
- */
34
- compiler?: ReactCompilerOptions | false;
35
- /**
36
- * React Fast Refresh runtime URL prefix.
37
- *
38
- * @remarks
39
- * Useful in a module federation context to enable HMR by specifying the host application URL in the Vite config of a remote application.
40
- *
41
- * @example
42
- * reactRefreshHost: 'http://localhost:3000'
43
- */
44
- reactRefreshHost?: string;
45
- /**
46
- * Options to pass to the [Babel plugin](https://npmjs.com/package/\@powerlines/plugin-babel).
47
- */
48
- babel?: Partial<BabelPluginOptions>;
49
- /**
50
- * Options to pass to the [Env plugin](https://npmjs.com/package/\@powerlines/plugin-env).
51
- */
52
- env?: Partial<Omit<EnvPluginOptions, "babel">>;
53
- }
54
- type ReactPluginUserConfig = EnvPluginUserConfig & {
55
- /**
56
- * Options for the React plugin.
57
- */
58
- react?: ReactPluginOptions;
59
- };
60
- type ReactPluginResolvedConfig = EnvPluginResolvedConfig & {
61
- /**
62
- * Options for the React plugin.
63
- */
64
- react: ReactPluginOptions;
65
- };
66
- interface ReactPluginContext<TResolvedConfig extends ReactPluginResolvedConfig = ReactPluginResolvedConfig> extends EnvPluginContext<TResolvedConfig> {}
67
- declare type __ΩReactCompilerOptions = any[];
68
- declare type __ΩReactPluginOptions = any[];
69
- declare type __ΩReactPluginUserConfig = any[];
70
- declare type __ΩReactPluginResolvedConfig = any[];
71
- declare type __ΩReactPluginContext = any[];
72
- //#endregion
1
+ import { a as ReactPluginUserConfig, c as __ΩReactPluginOptions, i as ReactPluginResolvedConfig, l as __ΩReactPluginResolvedConfig, n as ReactPluginContext, o as __ΩReactCompilerOptions, r as ReactPluginOptions, s as __ΩReactPluginContext, t as ReactCompilerOptions, u as __ΩReactPluginUserConfig } from "../plugin-C1nLepnu.cjs";
2
+ import "../runtime-BNQjyQ7l.cjs";
73
3
  export { ReactCompilerOptions, ReactPluginContext, ReactPluginOptions, ReactPluginResolvedConfig, ReactPluginUserConfig, __ΩReactCompilerOptions, __ΩReactPluginContext, __ΩReactPluginOptions, __ΩReactPluginResolvedConfig, __ΩReactPluginUserConfig };
@@ -1,73 +1,3 @@
1
- import { BabelPluginOptions } from "../plugin-babel/src/types/plugin.mjs";
2
- import { EnvPluginContext, EnvPluginOptions, EnvPluginResolvedConfig, EnvPluginUserConfig } from "../plugin-env/src/types/plugin.mjs";
3
- import { PluginOptions } from "babel-plugin-react-compiler";
4
-
5
- //#region src/types/plugin.d.ts
6
- type ReactCompilerOptions = Omit<PluginOptions, "logger">;
7
- interface ReactPluginOptions {
8
- /**
9
- * Control where the JSX factory is imported from.
10
- *
11
- * @see https://esbuild.github.io/api/#jsx-import-source
12
- *
13
- * @defaultValue "react"
14
- */
15
- jsxImportSource?: string;
16
- /**
17
- * Control how JSX is transformed.
18
- *
19
- * @remarks
20
- * Skipping React import with classic runtime is not supported from v4
21
- *
22
- * @defaultValue "automatic"
23
- */
24
- jsxRuntime?: "classic" | "automatic";
25
- /**
26
- * Options provided to the [React Compiler](https://npmjs.com/package/babel-plugin-react-compiler).
27
- *
28
- * @see https://github.com/facebook/react/blob/main/compiler/packages/babel-plugin-react-compiler/src/Entrypoint/Options.ts#L55
29
- * @see https://react.dev/blog/2025/04/21/react-compiler-rc
30
- *
31
- * @remarks
32
- * Set to `false` to disable the React Compiler. By default, the React Compiler is enabled and target is set to React 19.
33
- */
34
- compiler?: ReactCompilerOptions | false;
35
- /**
36
- * React Fast Refresh runtime URL prefix.
37
- *
38
- * @remarks
39
- * Useful in a module federation context to enable HMR by specifying the host application URL in the Vite config of a remote application.
40
- *
41
- * @example
42
- * reactRefreshHost: 'http://localhost:3000'
43
- */
44
- reactRefreshHost?: string;
45
- /**
46
- * Options to pass to the [Babel plugin](https://npmjs.com/package/\@powerlines/plugin-babel).
47
- */
48
- babel?: Partial<BabelPluginOptions>;
49
- /**
50
- * Options to pass to the [Env plugin](https://npmjs.com/package/\@powerlines/plugin-env).
51
- */
52
- env?: Partial<Omit<EnvPluginOptions, "babel">>;
53
- }
54
- type ReactPluginUserConfig = EnvPluginUserConfig & {
55
- /**
56
- * Options for the React plugin.
57
- */
58
- react?: ReactPluginOptions;
59
- };
60
- type ReactPluginResolvedConfig = EnvPluginResolvedConfig & {
61
- /**
62
- * Options for the React plugin.
63
- */
64
- react: ReactPluginOptions;
65
- };
66
- interface ReactPluginContext<TResolvedConfig extends ReactPluginResolvedConfig = ReactPluginResolvedConfig> extends EnvPluginContext<TResolvedConfig> {}
67
- declare type __ΩReactCompilerOptions = any[];
68
- declare type __ΩReactPluginOptions = any[];
69
- declare type __ΩReactPluginUserConfig = any[];
70
- declare type __ΩReactPluginResolvedConfig = any[];
71
- declare type __ΩReactPluginContext = any[];
72
- //#endregion
1
+ import "../runtime-CbWds61u.mjs";
2
+ import { a as ReactPluginUserConfig, c as __ΩReactPluginOptions, i as ReactPluginResolvedConfig, l as __ΩReactPluginResolvedConfig, n as ReactPluginContext, o as __ΩReactCompilerOptions, r as ReactPluginOptions, s as __ΩReactPluginContext, t as ReactCompilerOptions, u as __ΩReactPluginUserConfig } from "../plugin-CCWbVJ0P.mjs";
73
3
  export { ReactCompilerOptions, ReactPluginContext, ReactPluginOptions, ReactPluginResolvedConfig, ReactPluginUserConfig, __ΩReactCompilerOptions, __ΩReactPluginContext, __ΩReactPluginOptions, __ΩReactPluginResolvedConfig, __ΩReactPluginUserConfig };
@@ -1 +1 @@
1
- export{};
1
+ import"../plugin-G4qbpIjB.mjs";export{};
@@ -0,0 +1 @@
1
+ require(`../runtime-Bp9G0scd.cjs`);
@@ -1,15 +1,3 @@
1
- import { EnvInterface } from "../plugin-env/src/types/runtime.cjs";
2
-
3
- //#region src/types/runtime.d.ts
4
- interface ReactEnvInterface extends EnvInterface {
5
- /**
6
- * Disables the React compiler optimizations when set to true.
7
- *
8
- * @remarks
9
- * This environment variable can be used to turn off the optimizations provided by the React compiler, which may be useful for debugging or development purposes.
10
- */
11
- DISABLE_REACT_COMPILER: boolean;
12
- }
13
- declare type __ΩReactEnvInterface = any[];
14
- //#endregion
1
+ import "../runtime-BNQjyQ7l.cjs";
2
+ import { n as __ΩReactEnvInterface, t as ReactEnvInterface } from "../runtime-CKObV75t.cjs";
15
3
  export { ReactEnvInterface, __ΩReactEnvInterface };
@@ -1,15 +1,3 @@
1
- import { EnvInterface } from "../plugin-env/src/types/runtime.mjs";
2
-
3
- //#region src/types/runtime.d.ts
4
- interface ReactEnvInterface extends EnvInterface {
5
- /**
6
- * Disables the React compiler optimizations when set to true.
7
- *
8
- * @remarks
9
- * This environment variable can be used to turn off the optimizations provided by the React compiler, which may be useful for debugging or development purposes.
10
- */
11
- DISABLE_REACT_COMPILER: boolean;
12
- }
13
- declare type __ΩReactEnvInterface = any[];
14
- //#endregion
1
+ import "../runtime-CbWds61u.mjs";
2
+ import { n as __ΩReactEnvInterface, t as ReactEnvInterface } from "../runtime-CKyYLoHU.mjs";
15
3
  export { ReactEnvInterface, __ΩReactEnvInterface };
@@ -1 +1 @@
1
- export{};
1
+ import"../runtime-cDYyRPa0.mjs";export{};
@@ -0,0 +1 @@
1
+ export{};
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-react",
3
- "version": "0.1.105",
3
+ "version": "0.1.107",
4
4
  "type": "module",
5
5
  "description": "A package containing a Powerlines plugin for building a React application.",
6
6
  "repository": {
@@ -136,22 +136,26 @@
136
136
  "react-dom": { "optional": false }
137
137
  },
138
138
  "dependencies": {
139
+ "@powerlines/plugin-alloy": "^0.15.0",
140
+ "@powerlines/plugin-babel": "^0.12.112",
141
+ "@powerlines/plugin-env": "^0.14.6",
139
142
  "@storm-software/config-tools": "^1.188.74",
140
143
  "@stryke/cli": "^0.12.36",
141
144
  "@stryke/convert": "^0.6.29",
142
145
  "@stryke/fs": "^0.33.26",
143
146
  "@stryke/path": "^0.24.0",
144
- "babel-plugin-react-compiler": "^1.0.0",
145
- "@powerlines/alloy": "^0.13.3",
146
- "@powerlines/plugin-babel": "^0.12.110",
147
- "@powerlines/plugin-env": "^0.14.4",
148
- "@powerlines/plugin-plugin": "^0.12.53",
149
147
  "@vitejs/plugin-react": "^5.1.2",
148
+ "babel-plugin-react-compiler": "^1.0.0",
150
149
  "defu": "^6.1.4",
151
- "powerlines": "^0.36.6"
150
+ "powerlines": "^0.36.8"
152
151
  },
153
152
  "devDependencies": {
154
- "@powerlines/nx": "^0.11.32",
153
+ "@alloy-js/core": "^0.21.0",
154
+ "@alloy-js/typescript": "^0.21.0",
155
+ "@babel/core": "^7.28.5",
156
+ "@powerlines/nx": "^0.11.34",
157
+ "@powerlines/plugin-alloy": "^0.15.0",
158
+ "@powerlines/plugin-plugin": "^0.12.55",
155
159
  "@types/node": "^24.10.4",
156
160
  "@types/react": "^19.2.7",
157
161
  "@types/react-dom": "^19.2.3",
@@ -159,5 +163,5 @@
159
163
  "react-dom": "^19.2.3"
160
164
  },
161
165
  "publishConfig": { "access": "public" },
162
- "gitHead": "2175eec0f5ee1cd6cefd06526262dcdac0ddab09"
166
+ "gitHead": "8867c7bf5d0505b507b029ae191bfc2844478c0e"
163
167
  }
@@ -1 +0,0 @@
1
- var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(e,n,r,i)=>{i&&(t(e,Symbol.toStringTag,{value:`Module`}),r&&t(r,Symbol.toStringTag,{value:`Module`})),o(e,n,`default`),r&&o(r,n,`default`)},c=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));exports.__reExport=s,exports.__toESM=c;
@@ -1 +0,0 @@
1
- const e=require(`../../../../_virtual/rolldown_runtime.cjs`),t=require(`../contexts/context.cjs`);let n=require(`@alloy-js/core/jsx-runtime`),r=require(`@alloy-js/core`),i=require(`@stryke/path/replace`);function a(e){let[{children:a,context:o,basePath:s},c]=(0,r.splitProps)(e,[`children`,`context`,`basePath`]),l=(0,r.ref)(o),u=(0,r.computed)(()=>s?(0,i.replacePath)(s,l.value.workspaceConfig.workspaceRoot):l.value.workspaceConfig.workspaceRoot);return(0,n.createComponent)(r.Output,(0,n.mergeProps)(c,{get basePath(){return u.value},get children(){return(0,n.createComponent)(t.PowerlinesContext.Provider,{value:{ref:l},get children(){return(0,n.createComponent)(r.Show,{get when(){return!!l.value},children:a})}})}}))}exports.Output=a;
@@ -1 +0,0 @@
1
- import{PowerlinesContext as e}from"../contexts/context.mjs";import{createComponent as t,mergeProps as n}from"@alloy-js/core/jsx-runtime";import{Output as r,Show as i,computed as a,ref as o,splitProps as s}from"@alloy-js/core";import{replacePath as c}from"@stryke/path/replace";function l(l){let[{children:u,context:d,basePath:f},p]=s(l,[`children`,`context`,`basePath`]),m=o(d),h=a(()=>f?c(f,m.value.workspaceConfig.workspaceRoot):m.value.workspaceConfig.workspaceRoot);return t(r,n(p,{get basePath(){return h.value},get children(){return t(e.Provider,{value:{ref:m},get children(){return t(i,{get when(){return!!m.value},children:u})}})}}))}export{l as Output};
@@ -1 +0,0 @@
1
- const e=require(`../../../../_virtual/rolldown_runtime.cjs`);let t=require(`@alloy-js/core/jsx-runtime`),n=require(`@alloy-js/core`);function r(e){let{variant:r=`double-slash`,children:i}=e,a=r===`slash-star`?`/* `:r===`slash-star-star`?`/** `:r===`triple-slash`?`/// `:r===`markdown`?`<!-- `:`// `;return[a,(0,t.createIntrinsic)(`align`,{string:a,get children(){return[(0,t.createComponent)(n.Prose,{children:i}),r===`slash-star`||r===`slash-star-star`?` */ `:r===`markdown`?` -->`:``]}})]}exports.SingleLineComment=r;
@@ -1 +0,0 @@
1
- import{createComponent as e,createIntrinsic as t}from"@alloy-js/core/jsx-runtime";import{Prose as n}from"@alloy-js/core";function r(r){let{variant:i=`double-slash`,children:a}=r,o=i===`slash-star`?`/* `:i===`slash-star-star`?`/** `:i===`triple-slash`?`/// `:i===`markdown`?`<!-- `:`// `;return[o,t(`align`,{string:o,get children(){return[e(n,{children:a}),i===`slash-star`||i===`slash-star-star`?` */ `:i===`markdown`?` -->`:``]}})]}export{r as SingleLineComment};
@@ -1 +0,0 @@
1
- const e=require(`../../../../_virtual/rolldown_runtime.cjs`);let t=require(`@alloy-js/core/jsx-runtime`),n=require(`@alloy-js/core`),r=require(`@stryke/path/append`),i=require(`defu`);i=e.__toESM(i);function a(e){let[{children:a,meta:o,path:s,header:c,preset:l,filetype:u,reference:d}]=(0,n.splitProps)(e,[`children`,`meta`,`path`,`header`,`preset`,`filetype`,`reference`]),f=(0,n.useContext)(n.SourceDirectoryContext),p={path:(0,r.appendPath)(s,f.path),filetype:u,reference:d};f?.addContent(p);let m=(0,n.useFormatOptions)({printWidth:e.printWidth,tabWidth:e.tabWidth,useTabs:e.useTabs,insertFinalNewLine:e.insertFinalNewLine}),h=(0,n.getContext)();return h.meta=(0,i.default)({sourceFile:p,printOptions:m,output:{preset:l}},o??{}),(0,t.createComponent)(n.SourceFileContext.Provider,{value:p,get children(){return[(0,t.createComponent)(n.Show,{when:c!==void 0,get children(){return[c,(0,t.createIntrinsic)(`hbr`,{})]}}),a]}})}exports.SourceFile=a;
@@ -1,22 +0,0 @@
1
- import { StoragePreset } from "../../../../powerlines/src/types/fs.cjs";
2
- import { ComponentProps } from "../../types/components.cjs";
3
- import { SourceFileProps } from "@alloy-js/core";
4
-
5
- //#region ../alloy/src/core/components/source-file.d.ts
6
- type SourceFileProps$1 = SourceFileProps & ComponentProps & {
7
- /**
8
- * If true, indicates that the file is virtual and should not be written to disk.
9
- *
10
- * @defaultValue false
11
- */
12
- preset?: StoragePreset;
13
- /**
14
- * The metadata associated with the source file.
15
- *
16
- * @remarks
17
- * The values stored in the metadata will be available in the rendering context.
18
- */
19
- meta?: Record<string, any>;
20
- };
21
- //#endregion
22
- export { SourceFileProps$1 as SourceFileProps };
@@ -1,22 +0,0 @@
1
- import { StoragePreset } from "../../../../powerlines/src/types/fs.mjs";
2
- import { ComponentProps } from "../../types/components.mjs";
3
- import { SourceFileProps } from "@alloy-js/core";
4
-
5
- //#region ../alloy/src/core/components/source-file.d.ts
6
- type SourceFileProps$1 = SourceFileProps & ComponentProps & {
7
- /**
8
- * If true, indicates that the file is virtual and should not be written to disk.
9
- *
10
- * @defaultValue false
11
- */
12
- preset?: StoragePreset;
13
- /**
14
- * The metadata associated with the source file.
15
- *
16
- * @remarks
17
- * The values stored in the metadata will be available in the rendering context.
18
- */
19
- meta?: Record<string, any>;
20
- };
21
- //#endregion
22
- export { SourceFileProps$1 as SourceFileProps };
@@ -1 +0,0 @@
1
- import{createComponent as e,createIntrinsic as t}from"@alloy-js/core/jsx-runtime";import{Show as n,SourceDirectoryContext as r,SourceFileContext as i,getContext as a,splitProps as o,useContext as s,useFormatOptions as c}from"@alloy-js/core";import{appendPath as l}from"@stryke/path/append";import u from"defu";function d(d){let[{children:f,meta:p,path:m,header:h,preset:g,filetype:_,reference:v}]=o(d,[`children`,`meta`,`path`,`header`,`preset`,`filetype`,`reference`]),y=s(r),b={path:l(m,y.path),filetype:_,reference:v};y?.addContent(b);let x=c({printWidth:d.printWidth,tabWidth:d.tabWidth,useTabs:d.useTabs,insertFinalNewLine:d.insertFinalNewLine}),S=a();return S.meta=u({sourceFile:b,printOptions:x,output:{preset:g}},p??{}),e(i.Provider,{value:b,get children(){return[e(n,{when:h!==void 0,get children(){return[h,t(`hbr`,{})]}}),f]}})}export{d as SourceFile};
@@ -1 +0,0 @@
1
- const e=require(`../../../../_virtual/rolldown_runtime.cjs`);let t=require(`@alloy-js/core`);const n=(0,t.createContext)();function r(){return(0,t.useContext)(n)}function i(){return r()?.ref?.value}exports.PowerlinesContext=n,exports.usePowerlines=i;
@@ -1 +0,0 @@
1
- import{createContext as e,useContext as t}from"@alloy-js/core";const n=e();function r(){return t(n)}function i(){return r()?.ref?.value}export{n as PowerlinesContext,i as usePowerlines};
@@ -1 +0,0 @@
1
- const e=require(`../../../../_virtual/rolldown_runtime.cjs`);let t=require(`@alloy-js/core`);const n=(0,t.createContext)();function r(){let e=(0,t.useContext)(n);if(!e)throw Error("Powerlines - ReflectionClass Context is not set. Make sure this component is wrapped in a `Output` component or being rendered by the `RenderPlugin` from `@powerlines/devkit`.");return e}const i=(0,t.createNamedContext)(`reflection-property`);function a(){let e=(0,t.useContext)(i);if(!e)throw Error("Powerlines - Reflection Property Context is not set. Make sure this component is wrapped in a `Output` component or being rendered by the `RenderPlugin` from `@powerlines/devkit`.");return e}const o=(0,t.createNamedContext)(`reflection-method`),s=(0,t.createNamedContext)(`reflection-parameter`);exports.ReflectionClassContext=n,exports.ReflectionPropertyContext=i,exports.useReflectionClass=r,exports.useReflectionProperty=a;
@@ -1 +0,0 @@
1
- import{createContext as e,createNamedContext as t,useContext as n}from"@alloy-js/core";const r=e();function i(){let e=n(r);if(!e)throw Error("Powerlines - ReflectionClass Context is not set. Make sure this component is wrapped in a `Output` component or being rendered by the `RenderPlugin` from `@powerlines/devkit`.");return e}const a=t(`reflection-property`);function o(){let e=n(a);if(!e)throw Error("Powerlines - Reflection Property Context is not set. Make sure this component is wrapped in a `Output` component or being rendered by the `RenderPlugin` from `@powerlines/devkit`.");return e}t(`reflection-method`),t(`reflection-parameter`);export{r as ReflectionClassContext,a as ReflectionPropertyContext,i as useReflectionClass,o as useReflectionProperty};
@@ -1,2 +0,0 @@
1
- const e=require(`../../_virtual/rolldown_runtime.cjs`),t=require(`../../powerlines/src/plugin-utils/helpers.cjs`),n=require(`./core/components/output.cjs`);let r=require(`@alloy-js/core/jsx-runtime`),i=require(`@alloy-js/core`),a=require(`@stryke/type-checks/is-set-string`),o=require(`@storm-software/config-tools/types`),s=require(`@stryke/path/is-parent-path`),c=require(`@stryke/path/replace`),l=require(`prettier/doc.js`);function u(e){return a=>{let o=e(a);return{...o,async prepare(){let e=this;if(t.isPluginHook(o.prepare)&&o.enforce!==`post`&&(t.isPluginHookFunction(o.prepare)||t.isPluginHookObject(o.prepare)&&o.prepare.order!==`post`)&&await Promise.resolve(t.getHookHandler(o.prepare).call(this)),t.isPluginHook(o.render)){let t=(0,i.renderTree)((0,r.createComponent)(n.Output,{context:e,get basePath(){return e.workspaceConfig.workspaceRoot},get children(){return o.render.call(e)}}));await d(this,t,a?.alloy)}t.isPluginHook(o.prepare)&&(o.enforce===`post`||t.isPluginHookObject(o.prepare)&&o.prepare.order===`post`)&&await Promise.resolve(t.getHookHandler(o.prepare).call(this))}}}}async function d(e,t,n={}){await(0,i.flushJobsAsync)();let r,l=async(t,a)=>{if(!Array.isArray(a))return;let u=async e=>{for(let t of a)await l(e,t)},d=(0,i.getContextForRenderNode)(a);if(!d)return u(t);if(d.meta?.directory){let e={kind:`directory`,path:d.meta.directory.path,contents:[]};t?t.contents.push(e):r=e,await u(e)}else if(d.meta?.sourceFile){if(!t)throw Error(`Source file doesn't have parent directory. Make sure you have used the Output component.`);let r;if(d.meta?.builtin){if(!d.meta.builtin.id)throw Error("Built-in runtime module doesn't have an ID. Make sure you have used the `<BuiltinFile />` component.");e.log(o.LogLevelLabel.TRACE,`Rendering built-in runtime module with ID: ${d.meta.builtin.id}`),r={kind:`builtin`,id:d.meta.builtin.id,path:(0,c.replacePath)(d.meta.sourceFile.path,e.builtinsPath),filetype:d.meta.sourceFile.filetype,preset:d.meta.output?.mode,contents:await f(e,a,n)}}else d.meta?.entry||(0,s.isParentPath)(e.entryPath,d.meta.sourceFile.path)?(e.log(o.LogLevelLabel.TRACE,`Rendering entry module at path: ${d.meta.sourceFile.path}`),r={kind:`entry`,typeDefinition:d.meta.entry?.typeDefinition,path:d.meta.sourceFile.path,filetype:d.meta.sourceFile.filetype,preset:d.meta.output?.mode,contents:await f(e,a,n)}):(e.log(o.LogLevelLabel.TRACE,`Rendering source file at path: ${d.meta.sourceFile.path}`),r={kind:`file`,path:d.meta.sourceFile.path,filetype:d.meta.sourceFile.filetype,preset:d.meta.output?.mode,contents:await f(e,a,n)});t.contents.push(r)}else if(d.meta?.copyFile){if(!t)throw Error(`Copy file doesn't have parent directory. Make sure you have used the Output component.`);if(e.log(o.LogLevelLabel.TRACE,`Processing copy file operation from "${d.meta.copyFile.sourcePath}" to "${d.meta.copyFile.path}"`),!d.meta.copyFile.sourcePath)throw Error("Copy file doesn't have a source path. Make sure you have provided a `sourcePath` property to the `meta.copyFile` context.");if(!d.meta.copyFile.path)throw Error("Copy file doesn't have a destination path. Make sure you have provided a `path` property to the `meta.copyFile` context.");t.contents.push({kind:`file`,path:d.meta.copyFile.path,sourcePath:d.meta.copyFile.sourcePath,preset:d.meta.output?.preset})}else await u(t)};await l(void 0,t);let u=async(e,t)=>{for(let n of t.contents)if(n.kind===`directory`)await u(e,n);else if(n.kind===`builtin`)await e.emitBuiltin(n.contents,n.id,n.path);else if(n.kind===`entry`)await e.emitEntry(n.contents,n.path,n.typeDefinition);else if(n.kind===`file`)if(`sourcePath`in n&&n.sourcePath){if(!e.fs.existsSync(n.sourcePath))throw Error(`Source file "${n.sourcePath}" for copy operation does not exist.`);let t=await e.fs.read(n.sourcePath);if(!(0,a.isSetString)(t))throw Error(`Source file "${n.sourcePath}" for copy operation is empty.`);await e.fs.write(n.path,t)}else if(`contents`in n&&(0,a.isSetString)(n.contents))await e.fs.write(n.path,n.contents);else throw Error(`Unexpected output extracted from the render tree: \n\n${JSON.stringify(n,null,2)}`)};await u(e,r)}async function f(e,t,n={}){n.printWidth??=160,n.tabWidth??=2,n.useTabs??=!1,n.insertFinalNewLine??=!0,await(0,i.flushJobsAsync)();let r=l.printer.printDocToString(p(t),n).formatted;return n.insertFinalNewLine&&!r.endsWith(`
2
- `)?`${r}\n`:r}function p(e){let t=[];for(let n of e)if(typeof n==`string`){let e=n.split(/\r?\n/).flatMap((e,t,n)=>(n.length-1,[e]));t.push(e)}else (0,i.isPrintHook)(n)?t.push(n.print(n.subtree,p)):t.push(p(n));return t}exports.createAlloyPlugin=u;
@@ -1,2 +0,0 @@
1
- import{getHookHandler as e,isPluginHook as t,isPluginHookFunction as n,isPluginHookObject as r}from"../../powerlines/src/plugin-utils/helpers.mjs";import{Output as i}from"./core/components/output.mjs";import{createComponent as a}from"@alloy-js/core/jsx-runtime";import{flushJobsAsync as o,getContextForRenderNode as s,isPrintHook as c,renderTree as l}from"@alloy-js/core";import{isSetString as u}from"@stryke/type-checks/is-set-string";import{LogLevelLabel as d}from"@storm-software/config-tools/types";import{isParentPath as f}from"@stryke/path/is-parent-path";import{replacePath as p}from"@stryke/path/replace";import{printer as m}from"prettier/doc.js";function h(o){return s=>{let c=o(s);return{...c,async prepare(){let o=this;if(t(c.prepare)&&c.enforce!==`post`&&(n(c.prepare)||r(c.prepare)&&c.prepare.order!==`post`)&&await Promise.resolve(e(c.prepare).call(this)),t(c.render)){let e=l(a(i,{context:o,get basePath(){return o.workspaceConfig.workspaceRoot},get children(){return c.render.call(o)}}));await g(this,e,s?.alloy)}t(c.prepare)&&(c.enforce===`post`||r(c.prepare)&&c.prepare.order===`post`)&&await Promise.resolve(e(c.prepare).call(this))}}}}async function g(e,t,n={}){await o();let r,i=async(t,a)=>{if(!Array.isArray(a))return;let o=async e=>{for(let t of a)await i(e,t)},c=s(a);if(!c)return o(t);if(c.meta?.directory){let e={kind:`directory`,path:c.meta.directory.path,contents:[]};t?t.contents.push(e):r=e,await o(e)}else if(c.meta?.sourceFile){if(!t)throw Error(`Source file doesn't have parent directory. Make sure you have used the Output component.`);let r;if(c.meta?.builtin){if(!c.meta.builtin.id)throw Error("Built-in runtime module doesn't have an ID. Make sure you have used the `<BuiltinFile />` component.");e.log(d.TRACE,`Rendering built-in runtime module with ID: ${c.meta.builtin.id}`),r={kind:`builtin`,id:c.meta.builtin.id,path:p(c.meta.sourceFile.path,e.builtinsPath),filetype:c.meta.sourceFile.filetype,preset:c.meta.output?.mode,contents:await _(e,a,n)}}else c.meta?.entry||f(e.entryPath,c.meta.sourceFile.path)?(e.log(d.TRACE,`Rendering entry module at path: ${c.meta.sourceFile.path}`),r={kind:`entry`,typeDefinition:c.meta.entry?.typeDefinition,path:c.meta.sourceFile.path,filetype:c.meta.sourceFile.filetype,preset:c.meta.output?.mode,contents:await _(e,a,n)}):(e.log(d.TRACE,`Rendering source file at path: ${c.meta.sourceFile.path}`),r={kind:`file`,path:c.meta.sourceFile.path,filetype:c.meta.sourceFile.filetype,preset:c.meta.output?.mode,contents:await _(e,a,n)});t.contents.push(r)}else if(c.meta?.copyFile){if(!t)throw Error(`Copy file doesn't have parent directory. Make sure you have used the Output component.`);if(e.log(d.TRACE,`Processing copy file operation from "${c.meta.copyFile.sourcePath}" to "${c.meta.copyFile.path}"`),!c.meta.copyFile.sourcePath)throw Error("Copy file doesn't have a source path. Make sure you have provided a `sourcePath` property to the `meta.copyFile` context.");if(!c.meta.copyFile.path)throw Error("Copy file doesn't have a destination path. Make sure you have provided a `path` property to the `meta.copyFile` context.");t.contents.push({kind:`file`,path:c.meta.copyFile.path,sourcePath:c.meta.copyFile.sourcePath,preset:c.meta.output?.preset})}else await o(t)};await i(void 0,t);let a=async(e,t)=>{for(let n of t.contents)if(n.kind===`directory`)await a(e,n);else if(n.kind===`builtin`)await e.emitBuiltin(n.contents,n.id,n.path);else if(n.kind===`entry`)await e.emitEntry(n.contents,n.path,n.typeDefinition);else if(n.kind===`file`)if(`sourcePath`in n&&n.sourcePath){if(!e.fs.existsSync(n.sourcePath))throw Error(`Source file "${n.sourcePath}" for copy operation does not exist.`);let t=await e.fs.read(n.sourcePath);if(!u(t))throw Error(`Source file "${n.sourcePath}" for copy operation is empty.`);await e.fs.write(n.path,t)}else if(`contents`in n&&u(n.contents))await e.fs.write(n.path,n.contents);else throw Error(`Unexpected output extracted from the render tree: \n\n${JSON.stringify(n,null,2)}`)};await a(e,r)}async function _(e,t,n={}){n.printWidth??=160,n.tabWidth??=2,n.useTabs??=!1,n.insertFinalNewLine??=!0,await o();let r=m.printDocToString(v(t),n).formatted;return n.insertFinalNewLine&&!r.endsWith(`
2
- `)?`${r}\n`:r}function v(e){let t=[];for(let n of e)if(typeof n==`string`){let e=n.split(/\r?\n/).flatMap((e,t,n)=>(n.length-1,[e]));t.push(e)}else c(n)?t.push(n.print(n.subtree,v)):t.push(v(n));return t}export{h as createAlloyPlugin};
@@ -1 +0,0 @@
1
- const e=require(`../../../_virtual/rolldown_runtime.cjs`);let t=require(`@alloy-js/core`);function n(...e){return(0,t.refkey)(`powerlines`,...e)}exports.refkey=n;
@@ -1 +0,0 @@
1
- import{refkey as e}from"@alloy-js/core";function t(...t){return e(`powerlines`,...t)}export{t as refkey};
@@ -1 +0,0 @@
1
- require(`../../core/contexts/context.cjs`),require(`../../core/components/single-line-comment.cjs`),require(`../../core/components/source-file.cjs`);let e=require(`@alloy-js/core/jsx-runtime`),t=require(`@alloy-js/core`),n=require(`@stryke/string-format/title-case`);require(`@alloy-js/markdown`);
@@ -1 +0,0 @@
1
- import"../../core/contexts/context.mjs";import"../../core/components/single-line-comment.mjs";import"../../core/components/source-file.mjs";import{createComponent as e,createIntrinsic as t,mergeProps as n}from"@alloy-js/core/jsx-runtime";import{Show as r,code as i,getContext as a,splitProps as o}from"@alloy-js/core";import{titleCase as s}from"@stryke/string-format/title-case";import"@alloy-js/markdown";export{};
@@ -1 +0,0 @@
1
- require(`../contexts/markdown-table.cjs`);let e=require(`@alloy-js/core/jsx-runtime`),t=require(`@alloy-js/core`),n=require(`@stryke/type-checks/is-undefined`),r=require(`@stryke/string-format/title-case`);
@@ -1 +0,0 @@
1
- import"../contexts/markdown-table.mjs";import{createComponent as e,mergeProps as t}from"@alloy-js/core/jsx-runtime";import{Prose as n,Show as r,code as i,computed as a,splitProps as o}from"@alloy-js/core";import{isUndefined as s}from"@stryke/type-checks/is-undefined";import{titleCase as c}from"@stryke/string-format/title-case";export{};
@@ -1 +0,0 @@
1
- const e=require(`../../../../_virtual/rolldown_runtime.cjs`);let t=require(`@alloy-js/core`);const n=(0,t.createNamedContext)(`markdown-table-column`,{}),r=(0,t.createContext)({columns:[],data:[]});
@@ -1 +0,0 @@
1
- import{createContext as e,createNamedContext as t,useContext as n}from"@alloy-js/core";t(`markdown-table-column`,{}),e({columns:[],data:[]});export{};
@@ -1,19 +0,0 @@
1
- import { Children as Children$1 } from "@alloy-js/core/jsx-runtime";
2
-
3
- //#region ../alloy/src/types/components.d.ts
4
-
5
- /**
6
- * A type that represents the props of a component that can have children.
7
- */
8
- interface ComponentProps {
9
- children?: Children$1;
10
- }
11
- interface TypescriptFileImportItem {
12
- name: string;
13
- default?: boolean;
14
- alias?: string;
15
- type?: boolean;
16
- }
17
- type TypescriptFileImports = Record<string, null | Array<TypescriptFileImportItem | string>>;
18
- //#endregion
19
- export { ComponentProps, TypescriptFileImports };
@@ -1,23 +0,0 @@
1
- import "../../../powerlines/src/types/fs.mjs";
2
- import "../../../powerlines/src/types/resolved.mjs";
3
- import { Children } from "@alloy-js/core/jsx-runtime";
4
- import "@alloy-js/core";
5
- import { SourceFileContext as SourceFileContext$1 } from "@alloy-js/typescript";
6
-
7
- //#region ../alloy/src/types/components.d.ts
8
-
9
- /**
10
- * A type that represents the props of a component that can have children.
11
- */
12
- interface ComponentProps {
13
- children?: Children;
14
- }
15
- interface TypescriptFileImportItem {
16
- name: string;
17
- default?: boolean;
18
- alias?: string;
19
- type?: boolean;
20
- }
21
- type TypescriptFileImports = Record<string, null | Array<TypescriptFileImportItem | string>>;
22
- //#endregion
23
- export { ComponentProps, TypescriptFileImports };
@@ -1,15 +0,0 @@
1
- import { Plugin } from "../../../powerlines/src/types/plugin.cjs";
2
- import { PluginContext } from "../../../powerlines/src/types/context.cjs";
3
- import { PluginPluginAlloyOptions } from "../../../plugin-plugin/src/types/plugin.cjs";
4
- import { Children } from "@alloy-js/core/jsx-runtime";
5
-
6
- //#region ../alloy/src/types/plugin.d.ts
7
- interface AlloyPluginOptions {
8
- alloy?: PluginPluginAlloyOptions;
9
- }
10
- type AlloyPluginBuilderResult<TContext extends PluginContext = PluginContext> = Plugin<TContext> & {
11
- render: (this: TContext) => Children;
12
- };
13
- type AlloyPluginBuilder<TContext extends PluginContext = PluginContext, TOptions = any> = <T extends TContext>(options: TOptions) => AlloyPluginBuilderResult<T>;
14
- //#endregion
15
- export { AlloyPluginBuilder, AlloyPluginOptions };
@@ -1,15 +0,0 @@
1
- import { Plugin } from "../../../powerlines/src/types/plugin.mjs";
2
- import { PluginContext } from "../../../powerlines/src/types/context.mjs";
3
- import { PluginPluginAlloyOptions } from "../../../plugin-plugin/src/types/plugin.mjs";
4
- import { Children } from "@alloy-js/core/jsx-runtime";
5
-
6
- //#region ../alloy/src/types/plugin.d.ts
7
- interface AlloyPluginOptions {
8
- alloy?: PluginPluginAlloyOptions;
9
- }
10
- type AlloyPluginBuilderResult<TContext extends PluginContext = PluginContext> = Plugin<TContext> & {
11
- render: (this: TContext) => Children;
12
- };
13
- type AlloyPluginBuilder<TContext extends PluginContext = PluginContext, TOptions = any> = <T extends TContext>(options: TOptions) => AlloyPluginBuilderResult<T>;
14
- //#endregion
15
- export { AlloyPluginBuilder, AlloyPluginOptions };
@@ -1 +0,0 @@
1
- const e=require(`../../../../_virtual/rolldown_runtime.cjs`),t=require(`./tsdoc.cjs`),n=require(`./typescript-file.cjs`);let r=require(`@alloy-js/core/jsx-runtime`),i=require(`@alloy-js/core`);function a(e){let[{children:a,imports:o,id:s,description:c,tsx:l},u]=(0,i.splitProps)(e,[`children`,`imports`,`id`,`description`,`tsx`]);return(0,r.createComponent)(n.TypescriptFile,(0,r.mergeProps)({get header(){return(0,r.createComponent)(n.TypescriptFileHeader,{get header(){return(0,r.createComponent)(t.TSDocModule,{name:s,children:c})},get children(){return(0,r.createComponent)(n.TypescriptFileHeaderImports,{imports:o})}})},meta:{builtin:{id:s}}},u,{path:`${s}${l?`.tsx`:`.ts`}`,children:a}))}exports.BuiltinFile=a;
@@ -1,25 +0,0 @@
1
- import { TSDocModuleProps } from "./tsdoc.cjs";
2
- import { TypescriptFileProps } from "./typescript-file.cjs";
3
-
4
- //#region ../alloy/src/typescript/components/builtin-file.d.ts
5
- type BuiltinFileProps = Omit<TypescriptFileProps, "path"> & Omit<TSDocModuleProps, "name"> & {
6
- /**
7
- * The runtime module identifier.
8
- *
9
- * @remarks
10
- * This value will be included after the \`storm:\` prefix in the import statement.
11
- */
12
- id: string;
13
- /**
14
- * The description for the builtin module.
15
- */
16
- description?: string;
17
- /**
18
- * Whether the file is a TSX file.
19
- *
20
- * @defaultValue false
21
- */
22
- tsx?: boolean;
23
- };
24
- //#endregion
25
- export { BuiltinFileProps };
@@ -1,26 +0,0 @@
1
- import { TSDocModuleProps } from "./tsdoc.mjs";
2
- import { TypescriptFileProps } from "./typescript-file.mjs";
3
- import "@alloy-js/core";
4
-
5
- //#region ../alloy/src/typescript/components/builtin-file.d.ts
6
- type BuiltinFileProps = Omit<TypescriptFileProps, "path"> & Omit<TSDocModuleProps, "name"> & {
7
- /**
8
- * The runtime module identifier.
9
- *
10
- * @remarks
11
- * This value will be included after the \`storm:\` prefix in the import statement.
12
- */
13
- id: string;
14
- /**
15
- * The description for the builtin module.
16
- */
17
- description?: string;
18
- /**
19
- * Whether the file is a TSX file.
20
- *
21
- * @defaultValue false
22
- */
23
- tsx?: boolean;
24
- };
25
- //#endregion
26
- export { BuiltinFileProps };
@@ -1 +0,0 @@
1
- import{TSDocModule as e}from"./tsdoc.mjs";import{TypescriptFile as t,TypescriptFileHeader as n,TypescriptFileHeaderImports as r}from"./typescript-file.mjs";import{createComponent as i,mergeProps as a}from"@alloy-js/core/jsx-runtime";import{splitProps as o}from"@alloy-js/core";function s(s){let[{children:c,imports:l,id:u,description:d,tsx:f},p]=o(s,[`children`,`imports`,`id`,`description`,`tsx`]);return i(t,a({get header(){return i(n,{get header(){return i(e,{name:u,children:d})},get children(){return i(r,{imports:l})}})},meta:{builtin:{id:u}}},p,{path:`${u}${f?`.tsx`:`.ts`}`,children:c}))}export{s as BuiltinFile};
@@ -1 +0,0 @@
1
- const e=require(`../../../../_virtual/rolldown_runtime.cjs`),t=require(`./tsdoc.cjs`),n=require(`../../core/contexts/reflection.cjs`);let r=require(`@alloy-js/core/jsx-runtime`),i=require(`@alloy-js/core`),a=require(`@stryke/type-checks/is-string`),o=require(`@stryke/type-checks/is-undefined`),s=require(`@stryke/type-checks/is-set-string`),c=require(`@stryke/string-format/title-case`);function l(e){let[{children:a},l]=(0,i.splitProps)(e,[`children`]),u=n.useReflectionClass(),d=(0,i.computed)(()=>u.reflection.getTitle()||(0,c.titleCase)(u.reflection.getName())),f=(0,i.computed)(()=>u.reflection.getAlias()),p=(0,i.computed)(()=>u.reflection.getDomain()),m=(0,i.computed)(()=>u.reflection.getPermission()),h=(0,i.computed)(()=>u.reflection.isReadonly()),g=(0,i.computed)(()=>u.reflection.isInternal()),_=(0,i.computed)(()=>u.reflection.isIgnored()),v=(0,i.computed)(()=>u.reflection.isHidden());return u.reflection.getName()?(0,r.createComponent)(t.TSDoc,(0,r.mergeProps)(l,{get heading(){return u.reflection.getDescription()},get children(){return[(0,r.createComponent)(i.Show,{get when(){return(0,s.isSetString)(d.value)||!(0,o.isUndefined)(f.value)&&f.value.length>0||!(0,o.isUndefined)(m.value)&&m.value.length>0||(0,s.isSetString)(p.value)||!(0,o.isUndefined)(h.value)||!(0,o.isUndefined)(g.value)||!(0,o.isUndefined)(_.value)||!(0,o.isUndefined)(v.value)},get children(){return(0,r.createComponent)(t.TSDocAttributesTags,{get title(){return d.value},get alias(){return f.value},get domain(){return p.value},get permission(){return m.value},get readonly(){return h.value},get internal(){return g.value},get ignore(){return _.value},get hidden(){return v.value}})}}),(0,r.createComponent)(i.Show,{get when(){return(0,r.memo)(()=>!!a)()&&(0,i.childrenArray)(()=>a).length>0},get children(){return(0,r.createComponent)(i.List,{get children(){return(0,i.childrenArray)(()=>a)}})}})]}})):null}function u(e){let[{children:a},o]=(0,i.splitProps)(e,[`children`]),s=n.useReflectionProperty();return(0,r.createComponent)(t.TSDoc,(0,r.mergeProps)({get heading(){return s.getDescription()}},o,{get children(){return[(0,r.createComponent)(t.TSDocAttributesTags,{get title(){return s.getTitle()},get alias(){return s.getAlias()},get domain(){return s.getDomain()},get permission(){return s.getPermission()},get readonly(){return s.isReadonly()},get internal(){return s.isInternal()},get ignore(){return s.isIgnored()},get hidden(){return s.isHidden()}}),(0,r.createComponent)(i.Show,{get when(){return(0,r.memo)(()=>!!a)()&&(0,i.childrenArray)(()=>a).length>0},get children(){return(0,r.createComponent)(i.List,{get children(){return(0,i.childrenArray)(()=>a)}})}})]}}))}exports.TSDocReflectionClass=l,exports.TSDocReflectionProperty=u;
@@ -1 +0,0 @@
1
- import{TSDoc as e,TSDocAttributesTags as t}from"./tsdoc.mjs";import{useReflectionClass as n,useReflectionProperty as r}from"../../core/contexts/reflection.mjs";import{createComponent as i,memo as a,mergeProps as o}from"@alloy-js/core/jsx-runtime";import{List as s,Show as c,childrenArray as l,code as u,computed as d,splitProps as f}from"@alloy-js/core";import{isString as p}from"@stryke/type-checks/is-string";import{isUndefined as m}from"@stryke/type-checks/is-undefined";import{isSetString as h}from"@stryke/type-checks/is-set-string";import{titleCase as g}from"@stryke/string-format/title-case";function _(r){let[{children:u},p]=f(r,[`children`]),_=n(),v=d(()=>_.reflection.getTitle()||g(_.reflection.getName())),y=d(()=>_.reflection.getAlias()),b=d(()=>_.reflection.getDomain()),x=d(()=>_.reflection.getPermission()),S=d(()=>_.reflection.isReadonly()),C=d(()=>_.reflection.isInternal()),w=d(()=>_.reflection.isIgnored()),T=d(()=>_.reflection.isHidden());return _.reflection.getName()?i(e,o(p,{get heading(){return _.reflection.getDescription()},get children(){return[i(c,{get when(){return h(v.value)||!m(y.value)&&y.value.length>0||!m(x.value)&&x.value.length>0||h(b.value)||!m(S.value)||!m(C.value)||!m(w.value)||!m(T.value)},get children(){return i(t,{get title(){return v.value},get alias(){return y.value},get domain(){return b.value},get permission(){return x.value},get readonly(){return S.value},get internal(){return C.value},get ignore(){return w.value},get hidden(){return T.value}})}}),i(c,{get when(){return a(()=>!!u)()&&l(()=>u).length>0},get children(){return i(s,{get children(){return l(()=>u)}})}})]}})):null}function v(n){let[{children:u},d]=f(n,[`children`]),p=r();return i(e,o({get heading(){return p.getDescription()}},d,{get children(){return[i(t,{get title(){return p.getTitle()},get alias(){return p.getAlias()},get domain(){return p.getDomain()},get permission(){return p.getPermission()},get readonly(){return p.isReadonly()},get internal(){return p.isInternal()},get ignore(){return p.isIgnored()},get hidden(){return p.isHidden()}}),i(c,{get when(){return a(()=>!!u)()&&l(()=>u).length>0},get children(){return i(s,{get children(){return l(()=>u)}})}})]}}))}export{_ as TSDocReflectionClass,v as TSDocReflectionProperty};
@@ -1 +0,0 @@
1
- const e=require(`../../../../_virtual/rolldown_runtime.cjs`),t=require(`../../core/contexts/context.cjs`),n=require(`../../../../deepkit/src/utilities.cjs`);let r=require(`@alloy-js/core/jsx-runtime`),i=require(`@alloy-js/core`),a=require(`@stryke/type-checks/is-undefined`),o=require(`@stryke/type-checks/is-set-string`);function s(e){let[{children:t,heading:n}]=(0,i.splitProps)(e,[`children`,`heading`]);return[`/**`,(0,r.createIntrinsic)(`align`,{string:` * `,get children(){return[(0,r.createIntrinsic)(`hbr`,{}),(0,r.createComponent)(i.Show,{get when(){return!(0,a.isUndefined)(n)},get children(){return[n,(0,r.createIntrinsic)(`hbr`,{}),(0,r.createComponent)(i.Show,{get when(){return(0,r.memo)(()=>!(0,a.isUndefined)(t))()&&(0,i.childrenArray)(()=>t).length>0},get children(){return(0,r.createIntrinsic)(`hbr`,{})}})]}}),(0,r.createComponent)(i.Show,{get when(){return(0,r.memo)(()=>!(0,a.isUndefined)(t))()&&(0,i.childrenArray)(()=>t).length>0},get children(){return(0,r.createComponent)(i.List,{get children(){return(0,i.childrenArray)(()=>t)}})}})]}}),(0,r.createIntrinsic)(`hbr`,{}),` */`,(0,r.createIntrinsic)(`hbr`,{})]}function c(e){let[{children:t,tag:n}]=(0,i.splitProps)(e,[`children`,`tag`]);return[`@${n} `,(0,r.createComponent)(i.Show,{get when(){return!!t},get children(){return(0,r.createIntrinsic)(`align`,{width:2,get children(){return(0,r.createComponent)(i.Prose,{children:t})}})}}),(0,r.createIntrinsic)(`hbr`,{})]}function l(e){let[{children:t},n]=(0,i.splitProps)(e,[`children`]);return(0,r.createComponent)(c,(0,r.mergeProps)(n,{tag:`title`,children:t}))}function u(e){let[{children:t},n]=(0,i.splitProps)(e,[`children`]);return(0,r.createComponent)(c,(0,r.mergeProps)(n,{tag:`domain`,children:t}))}function d(e){let[{children:t},n]=(0,i.splitProps)(e,[`children`]);return(0,r.createComponent)(c,(0,r.mergeProps)(n,{tag:`alias`,children:t}))}function f(e){let[{children:t},n]=(0,i.splitProps)(e,[`children`]);return(0,r.createComponent)(c,(0,r.mergeProps)(n,{tag:`permission`,children:t}))}function p(e){return[`@defaultValue `,(0,r.createComponent)(i.Show,{get when(){return!(0,a.isUndefined)(e.value)},get children(){return(0,r.createIntrinsic)(`align`,{width:2,get children(){return(0,r.createComponent)(i.Prose,{get children(){return n.stringifyDefaultValue(e.value)}})}})}}),(0,r.createIntrinsic)(`hbr`,{})]}function m(e){return[`@remarks `,(0,r.createIntrinsic)(`hbr`,{}),(0,r.createComponent)(i.List,{hardline:!0,get children(){return(0,i.childrenArray)(()=>e.children)}})]}function h(e){return(0,r.createComponent)(c,(0,r.mergeProps)(e,{tag:`see`}))}function g(e){let[{tsx:t,fenced:n=!0,language:a,children:o}]=(0,i.splitProps)(e,[`tsx`,`fenced`,`language`,`children`]);return[`@example `,(0,r.createIntrinsic)(`hbr`,{}),(0,r.createComponent)(i.Show,{when:n,get children(){return["```",a||(t?`tsx`:`ts`),(0,r.createIntrinsic)(`hbr`,{})]}}),o,(0,r.createComponent)(i.Show,{when:n,get children(){return[(0,r.createIntrinsic)(`hbr`,{}),"```"]}})]}function _(){return(0,r.createComponent)(c,{tag:`readonly`})}function v(){return(0,r.createComponent)(c,{tag:`internal`})}function y(){return(0,r.createComponent)(c,{tag:`ignore`})}function b(){return(0,r.createComponent)(c,{tag:`hidden`})}function x(e){let[{title:t,alias:n,permission:s,domain:c,readonly:m,internal:h,ignore:g,hidden:x,defaultValue:S}]=(0,i.splitProps)(e,[`title`,`alias`,`permission`,`domain`,`readonly`,`internal`,`ignore`,`hidden`,`defaultValue`]);return[(0,r.createComponent)(i.Show,{get when(){return(0,o.isSetString)(t)},get children(){return(0,r.createComponent)(l,{children:t})}}),(0,r.createComponent)(i.Show,{get when(){return!(0,a.isUndefined)(n)&&n.length>0},get children(){return(0,r.createComponent)(i.For,{each:n??[],children:e=>(0,r.createComponent)(d,{children:e})})}}),(0,r.createComponent)(i.Show,{get when(){return(0,o.isSetString)(c)},get children(){return(0,r.createComponent)(u,{children:c})}}),(0,r.createComponent)(i.Show,{get when(){return!(0,a.isUndefined)(s)&&s.length>0},get children(){return(0,r.createComponent)(i.For,{each:s??[],children:e=>(0,r.createComponent)(f,{children:e})})}}),(0,r.createComponent)(i.Show,{when:m===!0,get children(){return(0,r.createComponent)(_,{})}}),(0,r.createComponent)(i.Show,{when:h===!0,get children(){return(0,r.createComponent)(v,{})}}),(0,r.createComponent)(i.Show,{when:g===!0,get children(){return(0,r.createComponent)(y,{})}}),(0,r.createComponent)(i.Show,{when:x===!0,get children(){return(0,r.createComponent)(b,{})}}),(0,r.createComponent)(i.Show,{get when(){return!(0,a.isUndefined)(S)},get children(){return(0,r.createComponent)(p,{value:S})}})]}function S(e){return[`@param `,(0,r.createComponent)(C,{get name(){return e.name},get optional(){return e.optional},get defaultValue(){return e.defaultValue}}),(0,r.createComponent)(w,{get children(){return e.children}})]}function C(e){return[(0,r.createComponent)(i.Show,{get when(){return e.optional},children:`[`}),(0,r.memo)(()=>e.name),(0,r.createComponent)(i.Show,{get when(){return!!e.defaultValue},get children(){return[`=`,(0,r.memo)(()=>e.defaultValue)]}}),(0,r.createComponent)(i.Show,{get when(){return e.optional},children:`]`})]}function w(e){return(0,r.createComponent)(i.Show,{get when(){return!!e.children},get children(){return[` - `,(0,r.createIntrinsic)(`align`,{width:2,get children(){return(0,r.createComponent)(i.Prose,{get children(){return e.children}})}})]}})}function T(e){return(0,r.createComponent)(c,(0,r.mergeProps)(e,{tag:`returns`}))}function E(e){return(0,r.createComponent)(c,(0,r.mergeProps)(e,{tag:`throws`}))}function D(e){let[{children:n,name:a,prefix:o}]=(0,i.splitProps)(e,[`children`,`name`,`prefix`]),s=t.usePowerlines();return[`/**`,(0,r.createIntrinsic)(`align`,{string:` * `,get children(){return[(0,r.createIntrinsic)(`hbr`,{}),(0,r.createComponent)(i.Show,{get when(){return!!n},get children(){return[(0,r.createComponent)(i.List,{hardline:!0,get children(){return(0,i.childrenArray)(()=>n)}}),(0,r.createIntrinsic)(`hbr`,{}),(0,r.createIntrinsic)(`hbr`,{})]}}),`@module `,(0,r.memo)(()=>o||s?.config.output.builtinPrefix),`:`,a]}}),(0,r.createIntrinsic)(`hbr`,{}),` */`]}exports.TSDoc=s,exports.TSDocAttributesTags=x,exports.TSDocExample=g,exports.TSDocLink=h,exports.TSDocModule=D,exports.TSDocParam=S,exports.TSDocRemarks=m,exports.TSDocReturns=T,exports.TSDocThrows=E;