@powerlines/plugin-react 0.1.58 → 0.1.59

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 (189) hide show
  1. package/dist/_virtual/rolldown_runtime.cjs +1 -0
  2. package/dist/_virtual/rolldown_runtime.mjs +1 -0
  3. package/dist/alloy/src/core/components/output.cjs +1 -0
  4. package/dist/alloy/src/core/components/output.mjs +1 -0
  5. package/dist/alloy/src/core/components/single-line-comment.cjs +1 -0
  6. package/dist/alloy/src/core/components/single-line-comment.mjs +1 -0
  7. package/dist/alloy/src/core/components/source-file.cjs +1 -0
  8. package/dist/alloy/src/core/components/source-file.d.cts +22 -0
  9. package/dist/alloy/src/core/components/source-file.d.mts +22 -0
  10. package/dist/alloy/src/core/components/source-file.mjs +1 -0
  11. package/dist/alloy/src/core/contexts/context.cjs +1 -0
  12. package/dist/alloy/src/core/contexts/context.mjs +1 -0
  13. package/dist/alloy/src/core/contexts/reflection.cjs +1 -0
  14. package/dist/alloy/src/core/contexts/reflection.mjs +1 -0
  15. package/dist/alloy/src/create-plugin.cjs +2 -0
  16. package/dist/alloy/src/create-plugin.mjs +2 -0
  17. package/dist/alloy/src/helpers/refkey.cjs +1 -0
  18. package/dist/alloy/src/helpers/refkey.mjs +1 -0
  19. package/dist/alloy/src/markdown/components/markdown-file.cjs +1 -0
  20. package/dist/alloy/src/markdown/components/markdown-file.mjs +1 -0
  21. package/dist/alloy/src/markdown/components/markdown-table.cjs +1 -0
  22. package/dist/alloy/src/markdown/components/markdown-table.mjs +1 -0
  23. package/dist/alloy/src/markdown/contexts/markdown-table.cjs +1 -0
  24. package/dist/alloy/src/markdown/contexts/markdown-table.mjs +1 -0
  25. package/dist/alloy/src/types/components.d.cts +19 -0
  26. package/dist/alloy/src/types/components.d.mts +23 -0
  27. package/dist/alloy/src/types/plugin.d.cts +15 -0
  28. package/dist/alloy/src/types/plugin.d.mts +15 -0
  29. package/dist/alloy/src/typescript/components/builtin-file.cjs +1 -0
  30. package/dist/alloy/src/typescript/components/builtin-file.d.cts +25 -0
  31. package/dist/alloy/src/typescript/components/builtin-file.d.mts +26 -0
  32. package/dist/alloy/src/typescript/components/builtin-file.mjs +1 -0
  33. package/dist/alloy/src/typescript/components/tsdoc-reflection.cjs +1 -0
  34. package/dist/alloy/src/typescript/components/tsdoc-reflection.mjs +1 -0
  35. package/dist/alloy/src/typescript/components/tsdoc.cjs +1 -0
  36. package/dist/alloy/src/typescript/components/tsdoc.d.cts +27 -0
  37. package/dist/alloy/src/typescript/components/tsdoc.d.mts +28 -0
  38. package/dist/alloy/src/typescript/components/tsdoc.mjs +1 -0
  39. package/dist/alloy/src/typescript/components/typescript-file.cjs +1 -0
  40. package/dist/alloy/src/typescript/components/typescript-file.d.cts +13 -0
  41. package/dist/alloy/src/typescript/components/typescript-file.d.mts +14 -0
  42. package/dist/alloy/src/typescript/components/typescript-file.mjs +1 -0
  43. package/dist/alloy/src/typescript/components/typescript-interface.cjs +1 -0
  44. package/dist/alloy/src/typescript/components/typescript-interface.mjs +1 -0
  45. package/dist/alloy/src/typescript/components/typescript-object.cjs +1 -0
  46. package/dist/alloy/src/typescript/components/typescript-object.mjs +1 -0
  47. package/dist/components/index.cjs +1 -0
  48. package/dist/components/index.d.cts +2 -0
  49. package/dist/components/index.d.mts +2 -0
  50. package/dist/components/index.mjs +1 -0
  51. package/dist/components/react-optimized.cjs +1 -0
  52. package/dist/components/react-optimized.d.cts +14 -0
  53. package/dist/components/react-optimized.d.mts +14 -0
  54. package/dist/components/react-optimized.mjs +1 -0
  55. package/dist/deepkit/schemas/reflection.cjs +1 -0
  56. package/dist/{plugin-COGfriOy.d.cts → deepkit/schemas/reflection.d.cts} +1 -220
  57. package/dist/{plugin-Yn4TFYsd.d.mts → deepkit/schemas/reflection.d.mts} +1 -220
  58. package/dist/deepkit/schemas/reflection.mjs +1 -0
  59. package/dist/deepkit/schemas/reflection2.cjs +1 -0
  60. package/dist/deepkit/schemas/reflection2.mjs +1 -0
  61. package/dist/deepkit/src/capnp.cjs +1 -0
  62. package/dist/deepkit/src/capnp.mjs +1 -0
  63. package/dist/deepkit/src/reflect-type.cjs +1 -0
  64. package/dist/deepkit/src/reflect-type.mjs +1 -0
  65. package/dist/deepkit/src/resolve-reflections.cjs +1 -0
  66. package/dist/deepkit/src/resolve-reflections.mjs +1 -0
  67. package/dist/deepkit/src/types.d.cts +10 -0
  68. package/dist/deepkit/src/types.d.mts +10 -0
  69. package/dist/deepkit/src/utilities.cjs +1 -0
  70. package/dist/deepkit/src/utilities.mjs +1 -0
  71. package/dist/deepkit/src/vendor/type.cjs +1 -0
  72. package/dist/deepkit/src/vendor/type.d.cts +7 -0
  73. package/dist/deepkit/src/vendor/type.d.mts +7 -0
  74. package/dist/deepkit/src/vendor/type.mjs +1 -0
  75. package/dist/index.cjs +1 -1
  76. package/dist/index.d.cts +13 -4
  77. package/dist/index.d.mts +16 -4
  78. package/dist/index.mjs +1 -1
  79. package/dist/plugin-babel/src/helpers/ast-utils.cjs +1 -0
  80. package/dist/plugin-babel/src/helpers/ast-utils.mjs +1 -0
  81. package/dist/plugin-babel/src/helpers/create-plugin.cjs +1 -0
  82. package/dist/plugin-babel/src/helpers/create-plugin.mjs +1 -0
  83. package/dist/plugin-babel/src/helpers/filters.cjs +1 -0
  84. package/dist/plugin-babel/src/helpers/filters.mjs +1 -0
  85. package/dist/plugin-babel/src/helpers/index.cjs +1 -0
  86. package/dist/plugin-babel/src/helpers/index.mjs +1 -0
  87. package/dist/plugin-babel/src/helpers/module-helpers.cjs +1 -0
  88. package/dist/plugin-babel/src/helpers/module-helpers.mjs +1 -0
  89. package/dist/plugin-babel/src/helpers/options.cjs +1 -0
  90. package/dist/plugin-babel/src/helpers/options.mjs +1 -0
  91. package/dist/plugin-babel/src/index.cjs +1 -0
  92. package/dist/plugin-babel/src/index.mjs +1 -0
  93. package/dist/plugin-babel/src/types/index.d.mts +1 -0
  94. package/dist/plugin-babel/src/types/plugin.d.cts +15 -0
  95. package/dist/plugin-babel/src/types/plugin.d.mts +15 -0
  96. package/dist/plugin-env/src/babel/index.cjs +1 -0
  97. package/dist/plugin-env/src/babel/index.mjs +1 -0
  98. package/dist/plugin-env/src/babel/plugin.cjs +5 -0
  99. package/dist/plugin-env/src/babel/plugin.mjs +5 -0
  100. package/dist/plugin-env/src/components/docs.cjs +1 -0
  101. package/dist/plugin-env/src/components/docs.mjs +1 -0
  102. package/dist/plugin-env/src/components/env.cjs +34 -0
  103. package/dist/plugin-env/src/components/env.mjs +31 -0
  104. package/dist/plugin-env/src/components/index.cjs +1 -0
  105. package/dist/plugin-env/src/components/index.mjs +1 -0
  106. package/dist/plugin-env/src/helpers/create-reflection-resource.cjs +1 -0
  107. package/dist/plugin-env/src/helpers/create-reflection-resource.mjs +1 -0
  108. package/dist/plugin-env/src/helpers/index.cjs +1 -0
  109. package/dist/plugin-env/src/helpers/index.mjs +1 -0
  110. package/dist/plugin-env/src/helpers/load.cjs +1 -0
  111. package/dist/plugin-env/src/helpers/load.mjs +1 -0
  112. package/dist/plugin-env/src/helpers/persistence.cjs +1 -0
  113. package/dist/plugin-env/src/helpers/persistence.mjs +1 -0
  114. package/dist/plugin-env/src/helpers/reflect.cjs +1 -0
  115. package/dist/plugin-env/src/helpers/reflect.mjs +1 -0
  116. package/dist/plugin-env/src/helpers/source-file-env.cjs +1 -0
  117. package/dist/plugin-env/src/helpers/source-file-env.mjs +1 -0
  118. package/dist/plugin-env/src/helpers/template-helpers.cjs +1 -0
  119. package/dist/plugin-env/src/helpers/template-helpers.mjs +1 -0
  120. package/dist/plugin-env/src/index.cjs +16 -0
  121. package/dist/plugin-env/src/index.mjs +16 -0
  122. package/dist/plugin-env/src/types/plugin.d.cts +135 -0
  123. package/dist/plugin-env/src/types/plugin.d.mts +136 -0
  124. package/dist/plugin-env/src/types/runtime.d.cts +792 -0
  125. package/dist/plugin-env/src/types/runtime.d.mts +792 -0
  126. package/dist/plugin-plugin/src/types/plugin.d.cts +21 -0
  127. package/dist/plugin-plugin/src/types/plugin.d.mts +23 -0
  128. package/dist/powerlines/src/internal/helpers/hooks.d.mts +5 -0
  129. package/dist/powerlines/src/lib/build/esbuild.cjs +14 -0
  130. package/dist/powerlines/src/lib/build/esbuild.mjs +14 -0
  131. package/dist/powerlines/src/lib/entry.cjs +1 -0
  132. package/dist/powerlines/src/lib/entry.mjs +1 -0
  133. package/dist/powerlines/src/lib/logger.cjs +1 -0
  134. package/dist/powerlines/src/lib/logger.mjs +1 -0
  135. package/dist/powerlines/src/lib/typescript/tsconfig.cjs +1 -0
  136. package/dist/powerlines/src/lib/typescript/tsconfig.mjs +1 -0
  137. package/dist/powerlines/src/lib/utilities/bundle.cjs +1 -0
  138. package/dist/powerlines/src/lib/utilities/bundle.mjs +1 -0
  139. package/dist/powerlines/src/lib/utilities/resolve.cjs +1 -0
  140. package/dist/powerlines/src/lib/utilities/resolve.mjs +1 -0
  141. package/dist/powerlines/src/plugin-utils/helpers.cjs +1 -0
  142. package/dist/powerlines/src/plugin-utils/helpers.mjs +1 -0
  143. package/dist/powerlines/src/plugin-utils/paths.cjs +1 -0
  144. package/dist/powerlines/src/plugin-utils/paths.mjs +1 -0
  145. package/dist/powerlines/src/types/api.d.mts +5 -0
  146. package/dist/powerlines/src/types/babel.d.cts +22 -0
  147. package/dist/powerlines/src/types/babel.d.mts +22 -0
  148. package/dist/powerlines/src/types/build.d.cts +139 -0
  149. package/dist/powerlines/src/types/build.d.mts +139 -0
  150. package/dist/powerlines/src/types/commands.d.cts +8 -0
  151. package/dist/powerlines/src/types/commands.d.mts +9 -0
  152. package/dist/powerlines/src/types/config.d.cts +356 -0
  153. package/dist/powerlines/src/types/config.d.mts +357 -0
  154. package/dist/powerlines/src/types/context.d.cts +358 -0
  155. package/dist/powerlines/src/types/context.d.mts +360 -0
  156. package/dist/powerlines/src/types/fs.d.cts +458 -0
  157. package/dist/powerlines/src/types/fs.d.mts +458 -0
  158. package/dist/powerlines/src/types/hooks.d.mts +2 -0
  159. package/dist/powerlines/src/types/index.d.mts +12 -0
  160. package/dist/powerlines/src/types/plugin.d.cts +232 -0
  161. package/dist/powerlines/src/types/plugin.d.mts +232 -0
  162. package/dist/powerlines/src/types/resolved.d.cts +82 -0
  163. package/dist/powerlines/src/types/resolved.d.mts +82 -0
  164. package/dist/powerlines/src/types/tsconfig.d.cts +69 -0
  165. package/dist/powerlines/src/types/tsconfig.d.mts +69 -0
  166. package/dist/powerlines/src/types/unplugin.d.mts +6 -0
  167. package/dist/types/index.d.cts +3 -0
  168. package/dist/types/index.d.mts +3 -0
  169. package/dist/types/plugin.d.cts +73 -0
  170. package/dist/types/plugin.d.mts +73 -0
  171. package/dist/types/runtime.cjs +0 -0
  172. package/dist/{runtime-DZq3obYY.d.cts → types/runtime.d.cts} +2 -2
  173. package/dist/{runtime-eM-3Gqcv.d.mts → types/runtime.d.mts} +2 -2
  174. package/dist/types/runtime.mjs +1 -0
  175. package/package.json +14 -70
  176. package/dist/plugin.cjs +0 -1
  177. package/dist/plugin.d.cts +0 -3
  178. package/dist/plugin.d.mts +0 -3
  179. package/dist/plugin.mjs +0 -1
  180. package/dist/runtime-DkTIzjuD.d.cts +0 -2463
  181. package/dist/runtime-KAmWxruO.d.mts +0 -2463
  182. package/dist/runtime.cjs +0 -1
  183. package/dist/runtime.d.cts +0 -3
  184. package/dist/runtime.d.mts +0 -3
  185. package/dist/runtime.mjs +0 -1
  186. /package/dist/{plugin-DHXHjv16.cjs → types/index.cjs} +0 -0
  187. /package/dist/{plugin-DzeYlbKJ.mjs → types/index.mjs} +0 -0
  188. /package/dist/{runtime-D4zTdSwv.cjs → types/plugin.cjs} +0 -0
  189. /package/dist/{runtime-2grn5p5x.mjs → types/plugin.mjs} +0 -0
@@ -0,0 +1,69 @@
1
+ import { CompilerOptions, TsConfigJson } from "@stryke/types/tsconfig";
2
+ import ts from "typescript";
3
+
4
+ //#region ../powerlines/src/types/tsconfig.d.ts
5
+ type ReflectionMode = "default" | "explicit" | "never";
6
+ type RawReflectionMode = ReflectionMode | "" | boolean | string | string[] | undefined;
7
+ /**
8
+ * Defines the level of reflection to be used during the transpilation process.
9
+ *
10
+ * @remarks
11
+ * The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
12
+ * - `minimal` - Only the essential type information is captured.
13
+ * - `normal` - Additional type information is captured, including some contextual data.
14
+ * - `verbose` - All available type information is captured, including detailed contextual data.
15
+ */
16
+ type ReflectionLevel = "minimal" | "normal" | "verbose";
17
+ interface DeepkitOptions {
18
+ /**
19
+ * Either true to activate reflection for all files compiled using this tsconfig,
20
+ * or a list of globs/file paths relative to this tsconfig.json.
21
+ * Globs/file paths can be prefixed with a ! to exclude them.
22
+ */
23
+ reflection?: RawReflectionMode;
24
+ /**
25
+ * Defines the level of reflection to be used during the transpilation process.
26
+ *
27
+ * @remarks
28
+ * The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
29
+ * - `minimal` - Only the essential type information is captured.
30
+ * - `normal` - Additional type information is captured, including some contextual data.
31
+ * - `verbose` - All available type information is captured, including detailed contextual data.
32
+ */
33
+ reflectionLevel?: ReflectionLevel;
34
+ }
35
+ type TSCompilerOptions = CompilerOptions & DeepkitOptions;
36
+ /**
37
+ * The TypeScript compiler configuration.
38
+ *
39
+ * @see https://www.typescriptlang.org/docs/handbook/tsconfig-json.html
40
+ */
41
+ interface TSConfig extends Omit<TsConfigJson, "reflection"> {
42
+ /**
43
+ * Either true to activate reflection for all files compiled using this tsconfig,
44
+ * or a list of globs/file paths relative to this tsconfig.json.
45
+ * Globs/file paths can be prefixed with a ! to exclude them.
46
+ */
47
+ reflection?: RawReflectionMode;
48
+ /**
49
+ * Defines the level of reflection to be used during the transpilation process.
50
+ *
51
+ * @remarks
52
+ * The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
53
+ * - `minimal` - Only the essential type information is captured.
54
+ * - `normal` - Additional type information is captured, including some contextual data.
55
+ * - `verbose` - All available type information is captured, including detailed contextual data.
56
+ */
57
+ reflectionLevel?: ReflectionLevel;
58
+ /**
59
+ * Instructs the TypeScript compiler how to compile `.ts` files.
60
+ */
61
+ compilerOptions?: TSCompilerOptions;
62
+ }
63
+ type ParsedTypeScriptConfig = ts.ParsedCommandLine & {
64
+ originalTsconfigJson: TsConfigJson;
65
+ tsconfigJson: TSConfig;
66
+ tsconfigFilePath: string;
67
+ };
68
+ //#endregion
69
+ export { ParsedTypeScriptConfig, TSConfig };
@@ -0,0 +1,69 @@
1
+ import ts from "typescript";
2
+ import { CompilerOptions, TsConfigJson } from "@stryke/types/tsconfig";
3
+
4
+ //#region ../powerlines/src/types/tsconfig.d.ts
5
+ type ReflectionMode = "default" | "explicit" | "never";
6
+ type RawReflectionMode = ReflectionMode | "" | boolean | string | string[] | undefined;
7
+ /**
8
+ * Defines the level of reflection to be used during the transpilation process.
9
+ *
10
+ * @remarks
11
+ * The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
12
+ * - `minimal` - Only the essential type information is captured.
13
+ * - `normal` - Additional type information is captured, including some contextual data.
14
+ * - `verbose` - All available type information is captured, including detailed contextual data.
15
+ */
16
+ type ReflectionLevel = "minimal" | "normal" | "verbose";
17
+ interface DeepkitOptions {
18
+ /**
19
+ * Either true to activate reflection for all files compiled using this tsconfig,
20
+ * or a list of globs/file paths relative to this tsconfig.json.
21
+ * Globs/file paths can be prefixed with a ! to exclude them.
22
+ */
23
+ reflection?: RawReflectionMode;
24
+ /**
25
+ * Defines the level of reflection to be used during the transpilation process.
26
+ *
27
+ * @remarks
28
+ * The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
29
+ * - `minimal` - Only the essential type information is captured.
30
+ * - `normal` - Additional type information is captured, including some contextual data.
31
+ * - `verbose` - All available type information is captured, including detailed contextual data.
32
+ */
33
+ reflectionLevel?: ReflectionLevel;
34
+ }
35
+ type TSCompilerOptions = CompilerOptions & DeepkitOptions;
36
+ /**
37
+ * The TypeScript compiler configuration.
38
+ *
39
+ * @see https://www.typescriptlang.org/docs/handbook/tsconfig-json.html
40
+ */
41
+ interface TSConfig extends Omit<TsConfigJson, "reflection"> {
42
+ /**
43
+ * Either true to activate reflection for all files compiled using this tsconfig,
44
+ * or a list of globs/file paths relative to this tsconfig.json.
45
+ * Globs/file paths can be prefixed with a ! to exclude them.
46
+ */
47
+ reflection?: RawReflectionMode;
48
+ /**
49
+ * Defines the level of reflection to be used during the transpilation process.
50
+ *
51
+ * @remarks
52
+ * The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
53
+ * - `minimal` - Only the essential type information is captured.
54
+ * - `normal` - Additional type information is captured, including some contextual data.
55
+ * - `verbose` - All available type information is captured, including detailed contextual data.
56
+ */
57
+ reflectionLevel?: ReflectionLevel;
58
+ /**
59
+ * Instructs the TypeScript compiler how to compile `.ts` files.
60
+ */
61
+ compilerOptions?: TSCompilerOptions;
62
+ }
63
+ type ParsedTypeScriptConfig = ts.ParsedCommandLine & {
64
+ originalTsconfigJson: TsConfigJson;
65
+ tsconfigJson: TSConfig;
66
+ tsconfigFilePath: string;
67
+ };
68
+ //#endregion
69
+ export { DeepkitOptions, ParsedTypeScriptConfig, RawReflectionMode, ReflectionLevel, ReflectionMode, TSCompilerOptions, TSConfig };
@@ -0,0 +1,6 @@
1
+ import "./plugin.mjs";
2
+ import "./context.mjs";
3
+ import "./config.mjs";
4
+ import "./resolved.mjs";
5
+ import "./api.mjs";
6
+ import { UnpluginOptions } from "unplugin";
@@ -0,0 +1,3 @@
1
+ import { ReactCompilerOptions, ReactPluginContext, ReactPluginOptions, ReactPluginResolvedConfig, ReactPluginUserConfig, __ΩReactCompilerOptions, __ΩReactPluginContext, __ΩReactPluginOptions, __ΩReactPluginResolvedConfig, __ΩReactPluginUserConfig } from "./plugin.cjs";
2
+ import { ReactEnvInterface, __ΩReactEnvInterface } from "./runtime.cjs";
3
+ export { ReactCompilerOptions, ReactEnvInterface, ReactPluginContext, ReactPluginOptions, ReactPluginResolvedConfig, ReactPluginUserConfig, __ΩReactCompilerOptions, __ΩReactEnvInterface, __ΩReactPluginContext, __ΩReactPluginOptions, __ΩReactPluginResolvedConfig, __ΩReactPluginUserConfig };
@@ -0,0 +1,3 @@
1
+ import { ReactCompilerOptions, ReactPluginContext, ReactPluginOptions, ReactPluginResolvedConfig, ReactPluginUserConfig, __ΩReactCompilerOptions, __ΩReactPluginContext, __ΩReactPluginOptions, __ΩReactPluginResolvedConfig, __ΩReactPluginUserConfig } from "./plugin.mjs";
2
+ import { ReactEnvInterface, __ΩReactEnvInterface } from "./runtime.mjs";
3
+ export { ReactCompilerOptions, ReactEnvInterface, ReactPluginContext, ReactPluginOptions, ReactPluginResolvedConfig, ReactPluginUserConfig, __ΩReactCompilerOptions, __ΩReactEnvInterface, __ΩReactPluginContext, __ΩReactPluginOptions, __ΩReactPluginResolvedConfig, __ΩReactPluginUserConfig };
@@ -0,0 +1,73 @@
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
73
+ export { ReactCompilerOptions, ReactPluginContext, ReactPluginOptions, ReactPluginResolvedConfig, ReactPluginUserConfig, __ΩReactCompilerOptions, __ΩReactPluginContext, __ΩReactPluginOptions, __ΩReactPluginResolvedConfig, __ΩReactPluginUserConfig };
@@ -0,0 +1,73 @@
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
73
+ export { ReactCompilerOptions, ReactPluginContext, ReactPluginOptions, ReactPluginResolvedConfig, ReactPluginUserConfig, __ΩReactCompilerOptions, __ΩReactPluginContext, __ΩReactPluginOptions, __ΩReactPluginResolvedConfig, __ΩReactPluginUserConfig };
File without changes
@@ -1,4 +1,4 @@
1
- import { t as EnvInterface } from "./runtime-DkTIzjuD.cjs";
1
+ import { EnvInterface } from "../plugin-env/src/types/runtime.cjs";
2
2
 
3
3
  //#region src/types/runtime.d.ts
4
4
  interface ReactEnvInterface extends EnvInterface {
@@ -12,4 +12,4 @@ interface ReactEnvInterface extends EnvInterface {
12
12
  }
13
13
  declare type __ΩReactEnvInterface = any[];
14
14
  //#endregion
15
- export { __ΩReactEnvInterface as n, ReactEnvInterface as t };
15
+ export { ReactEnvInterface, __ΩReactEnvInterface };
@@ -1,4 +1,4 @@
1
- import { t as EnvInterface } from "./runtime-KAmWxruO.mjs";
1
+ import { EnvInterface } from "../plugin-env/src/types/runtime.mjs";
2
2
 
3
3
  //#region src/types/runtime.d.ts
4
4
  interface ReactEnvInterface extends EnvInterface {
@@ -12,4 +12,4 @@ interface ReactEnvInterface extends EnvInterface {
12
12
  }
13
13
  declare type __ΩReactEnvInterface = any[];
14
14
  //#endregion
15
- export { __ΩReactEnvInterface as n, ReactEnvInterface as t };
15
+ export { ReactEnvInterface, __ΩReactEnvInterface };
@@ -0,0 +1 @@
1
+ export{};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-react",
3
- "version": "0.1.58",
3
+ "version": "0.1.59",
4
4
  "type": "module",
5
5
  "description": "A package containing a Powerlines plugin for building a React application.",
6
6
  "repository": {
@@ -70,62 +70,6 @@
70
70
  "types": "./dist/index.d.mts",
71
71
  "default": "./dist/index.mjs"
72
72
  }
73
- },
74
- "./types": {
75
- "import": {
76
- "types": "./dist/types/index.d.mts",
77
- "default": "./dist/types/index.mjs"
78
- },
79
- "require": {
80
- "types": "./dist/types/index.d.cts",
81
- "default": "./dist/types/index.cjs"
82
- },
83
- "default": {
84
- "types": "./dist/types/index.d.mts",
85
- "default": "./dist/types/index.mjs"
86
- }
87
- },
88
- "./types/*": {
89
- "import": {
90
- "types": "./dist/types/*.d.mts",
91
- "default": "./dist/types/*.mjs"
92
- },
93
- "require": {
94
- "types": "./dist/types/*.d.cts",
95
- "default": "./dist/types/*.cjs"
96
- },
97
- "default": {
98
- "types": "./dist/types/*.d.mts",
99
- "default": "./dist/types/*.mjs"
100
- }
101
- },
102
- "./components": {
103
- "import": {
104
- "types": "./dist/components/index.d.mts",
105
- "default": "./dist/components/index.mjs"
106
- },
107
- "require": {
108
- "types": "./dist/components/index.d.cts",
109
- "default": "./dist/components/index.cjs"
110
- },
111
- "default": {
112
- "types": "./dist/components/index.d.mts",
113
- "default": "./dist/components/index.mjs"
114
- }
115
- },
116
- "./components/*": {
117
- "import": {
118
- "types": "./dist/components/*.d.mts",
119
- "default": "./dist/components/*.mjs"
120
- },
121
- "require": {
122
- "types": "./dist/components/*.d.cts",
123
- "default": "./dist/components/*.cjs"
124
- },
125
- "default": {
126
- "types": "./dist/components/*.d.mts",
127
- "default": "./dist/components/*.mjs"
128
- }
129
73
  }
130
74
  },
131
75
  "files": ["dist/**/*"],
@@ -136,24 +80,24 @@
136
80
  "react-dom": { "optional": false }
137
81
  },
138
82
  "dependencies": {
139
- "@storm-software/config-tools": "^1.188.59",
140
- "@stryke/cli": "^0.12.19",
141
- "@stryke/convert": "^0.6.13",
142
- "@stryke/fs": "^0.33.9",
143
- "@stryke/path": "^0.22.0",
83
+ "@storm-software/config-tools": "^1.188.60",
84
+ "@stryke/cli": "^0.12.30",
85
+ "@stryke/convert": "^0.6.24",
86
+ "@stryke/fs": "^0.33.20",
87
+ "@stryke/path": "^0.22.11",
144
88
  "babel-plugin-react-compiler": "^1.0.0",
145
- "@powerlines/alloy": "^0.11.67",
146
- "@powerlines/plugin-babel": "^0.12.67",
147
- "@powerlines/plugin-env": "^0.13.64",
148
- "@powerlines/plugin-plugin": "^0.12.10",
149
- "@vitejs/plugin-react": "^5.1.1",
89
+ "@powerlines/alloy": "^0.11.68",
90
+ "@powerlines/plugin-babel": "^0.12.68",
91
+ "@powerlines/plugin-env": "^0.13.65",
92
+ "@powerlines/plugin-plugin": "^0.12.11",
93
+ "@vitejs/plugin-react": "^5.1.2",
150
94
  "defu": "^6.1.4",
151
- "powerlines": "^0.30.9"
95
+ "powerlines": "^0.30.10"
152
96
  },
153
97
  "devDependencies": {
154
- "@powerlines/nx": "^0.10.58",
98
+ "@powerlines/nx": "^0.10.59",
155
99
  "@types/node": "^24.10.1"
156
100
  },
157
101
  "publishConfig": { "access": "public" },
158
- "gitHead": "00fa339177561d404892937d2c24fe2a5b3df4e7"
102
+ "gitHead": "1fa17406f69248e0a35ca56c09b1f4589e4d49d7"
159
103
  }
package/dist/plugin.cjs DELETED
@@ -1 +0,0 @@
1
- require(`./plugin-DHXHjv16.cjs`);
package/dist/plugin.d.cts DELETED
@@ -1,3 +0,0 @@
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-COGfriOy.cjs";
2
- import "./runtime-DkTIzjuD.cjs";
3
- export { ReactCompilerOptions, ReactPluginContext, ReactPluginOptions, ReactPluginResolvedConfig, ReactPluginUserConfig, __ΩReactCompilerOptions, __ΩReactPluginContext, __ΩReactPluginOptions, __ΩReactPluginResolvedConfig, __ΩReactPluginUserConfig };
package/dist/plugin.d.mts DELETED
@@ -1,3 +0,0 @@
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-Yn4TFYsd.mjs";
2
- import "./runtime-KAmWxruO.mjs";
3
- export { ReactCompilerOptions, ReactPluginContext, ReactPluginOptions, ReactPluginResolvedConfig, ReactPluginUserConfig, __ΩReactCompilerOptions, __ΩReactPluginContext, __ΩReactPluginOptions, __ΩReactPluginResolvedConfig, __ΩReactPluginUserConfig };
package/dist/plugin.mjs DELETED
@@ -1 +0,0 @@
1
- import"./plugin-DzeYlbKJ.mjs";export{};