@powerlines/plugin-react 0.1.132 → 0.1.134

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 (210) hide show
  1. package/dist/components/index.cjs +3 -2
  2. package/dist/components/index.d.cts +3 -1
  3. package/dist/components/index.d.mts +4 -1
  4. package/dist/components/index.mjs +2 -1
  5. package/dist/components/react-optimized.cjs +2 -48
  6. package/dist/components/react-optimized.d.cts +2 -13
  7. package/dist/components/react-optimized.d.mts +3 -13
  8. package/dist/components/react-optimized.mjs +1 -45
  9. package/dist/components-BWLXb7a2.cjs +0 -0
  10. package/dist/{plugin-alloy/src/types/components.d.cts → components-Bs3-ohmM.d.mts} +2 -1
  11. package/dist/components-D-mbfYAe.mjs +1 -0
  12. package/dist/index-B8OHl-c_.d.mts +1 -0
  13. package/dist/index-CFG0_wK4.d.cts +1 -0
  14. package/dist/index-DNLi60D-.d.mts +1 -0
  15. package/dist/index-_wQ5ClJU.d.cts +1 -0
  16. package/dist/index.cjs +11298 -19
  17. package/dist/index.d.cts +7 -5
  18. package/dist/index.d.mts +8 -6
  19. package/dist/index.mjs +11282 -9
  20. package/dist/{deepkit/schemas/reflection.d.mts → plugin-CJdK9GYW.d.cts} +331 -1
  21. package/dist/{deepkit/schemas/reflection.d.cts → plugin-Noy_HIP5.d.mts} +389 -59
  22. package/dist/plugin-jZ9N9Mz-.mjs +1 -0
  23. package/dist/plugin-pBKbb5K9.cjs +0 -0
  24. package/dist/react-optimized-BpFTLlx0.mjs +937 -0
  25. package/dist/react-optimized-CVXQfO40.d.mts +88 -0
  26. package/dist/react-optimized-Kv14o38g.cjs +1078 -0
  27. package/dist/react-optimized-NGRcJkqA.d.cts +105 -0
  28. package/dist/resolved-CTt23qfE.d.cts +1795 -0
  29. package/dist/resolved-Nive48eM.d.mts +1796 -0
  30. package/dist/runtime-B-KyPHeI.d.mts +15 -0
  31. package/dist/{plugin-env/src/types/runtime.d.mts → runtime-B8Zgz0Kb.d.cts} +2 -2
  32. package/dist/{plugin-env/src/types/runtime.d.cts → runtime-BFnA_zZ8.d.mts} +2 -2
  33. package/dist/runtime-BKY6WvHV.mjs +1 -0
  34. package/dist/runtime-Bp9G0scd.cjs +0 -0
  35. package/dist/runtime-Dm--tkdO.d.cts +15 -0
  36. package/dist/types/index.cjs +3 -0
  37. package/dist/types/index.d.cts +5 -2
  38. package/dist/types/index.d.mts +6 -2
  39. package/dist/types/index.mjs +4 -0
  40. package/dist/types/plugin.cjs +1 -0
  41. package/dist/types/plugin.d.cts +3 -72
  42. package/dist/types/plugin.d.mts +4 -72
  43. package/dist/types/plugin.mjs +2 -0
  44. package/dist/types/runtime.cjs +1 -0
  45. package/dist/types/runtime.d.cts +3 -14
  46. package/dist/types/runtime.d.mts +3 -14
  47. package/dist/types/runtime.mjs +2 -0
  48. package/dist/types--fVOUYBq.mjs +1 -0
  49. package/dist/types-a8gm_IaQ.cjs +0 -0
  50. package/package.json +6 -6
  51. package/dist/_virtual/rolldown_runtime.cjs +0 -37
  52. package/dist/_virtual/rolldown_runtime.mjs +0 -29
  53. package/dist/deepkit/schemas/reflection.cjs +0 -3940
  54. package/dist/deepkit/schemas/reflection.mjs +0 -3938
  55. package/dist/deepkit/schemas/reflection2.cjs +0 -4112
  56. package/dist/deepkit/schemas/reflection2.mjs +0 -4110
  57. package/dist/deepkit/src/capnp.cjs +0 -913
  58. package/dist/deepkit/src/capnp.mjs +0 -911
  59. package/dist/deepkit/src/esbuild-plugin.cjs +0 -47
  60. package/dist/deepkit/src/esbuild-plugin.mjs +0 -46
  61. package/dist/deepkit/src/reflect-type.cjs +0 -22
  62. package/dist/deepkit/src/reflect-type.mjs +0 -20
  63. package/dist/deepkit/src/resolve-reflections.cjs +0 -16
  64. package/dist/deepkit/src/resolve-reflections.mjs +0 -15
  65. package/dist/deepkit/src/transformer.cjs +0 -52
  66. package/dist/deepkit/src/transformer.mjs +0 -49
  67. package/dist/deepkit/src/transpile.cjs +0 -29
  68. package/dist/deepkit/src/transpile.mjs +0 -27
  69. package/dist/deepkit/src/types.d.cts +0 -10
  70. package/dist/deepkit/src/types.d.mts +0 -10
  71. package/dist/deepkit/src/utilities.cjs +0 -66
  72. package/dist/deepkit/src/utilities.mjs +0 -65
  73. package/dist/deepkit/src/vendor/type-compiler/index.cjs +0 -38
  74. package/dist/deepkit/src/vendor/type-compiler/index.mjs +0 -19
  75. package/dist/deepkit/src/vendor/type.cjs +0 -20
  76. package/dist/deepkit/src/vendor/type.d.cts +0 -7
  77. package/dist/deepkit/src/vendor/type.d.mts +0 -7
  78. package/dist/deepkit/src/vendor/type.mjs +0 -11
  79. package/dist/plugin-alloy/src/core/components/output.cjs +0 -45
  80. package/dist/plugin-alloy/src/core/components/output.mjs +0 -44
  81. package/dist/plugin-alloy/src/core/components/single-line-comment.cjs +0 -22
  82. package/dist/plugin-alloy/src/core/components/single-line-comment.mjs +0 -21
  83. package/dist/plugin-alloy/src/core/components/source-file.cjs +0 -64
  84. package/dist/plugin-alloy/src/core/components/source-file.d.cts +0 -23
  85. package/dist/plugin-alloy/src/core/components/source-file.d.mts +0 -23
  86. package/dist/plugin-alloy/src/core/components/source-file.mjs +0 -62
  87. package/dist/plugin-alloy/src/core/contexts/context.cjs +0 -60
  88. package/dist/plugin-alloy/src/core/contexts/context.mjs +0 -54
  89. package/dist/plugin-alloy/src/core/contexts/index.cjs +0 -2
  90. package/dist/plugin-alloy/src/core/contexts/index.mjs +0 -4
  91. package/dist/plugin-alloy/src/core/contexts/reflection.cjs +0 -46
  92. package/dist/plugin-alloy/src/core/contexts/reflection.mjs +0 -42
  93. package/dist/plugin-alloy/src/helpers/refkey.cjs +0 -16
  94. package/dist/plugin-alloy/src/helpers/refkey.mjs +0 -15
  95. package/dist/plugin-alloy/src/index.cjs +0 -93
  96. package/dist/plugin-alloy/src/index.mjs +0 -91
  97. package/dist/plugin-alloy/src/markdown/components/markdown-file.cjs +0 -7
  98. package/dist/plugin-alloy/src/markdown/components/markdown-file.mjs +0 -9
  99. package/dist/plugin-alloy/src/markdown/components/markdown-table.cjs +0 -5
  100. package/dist/plugin-alloy/src/markdown/components/markdown-table.mjs +0 -7
  101. package/dist/plugin-alloy/src/markdown/contexts/markdown-table.cjs +0 -17
  102. package/dist/plugin-alloy/src/markdown/contexts/markdown-table.mjs +0 -17
  103. package/dist/plugin-alloy/src/types/components.d.mts +0 -25
  104. package/dist/plugin-alloy/src/types/index.d.mts +0 -2
  105. package/dist/plugin-alloy/src/types/plugin.d.cts +0 -37
  106. package/dist/plugin-alloy/src/types/plugin.d.mts +0 -37
  107. package/dist/plugin-alloy/src/typescript/components/builtin-file.cjs +0 -57
  108. package/dist/plugin-alloy/src/typescript/components/builtin-file.d.cts +0 -25
  109. package/dist/plugin-alloy/src/typescript/components/builtin-file.d.mts +0 -26
  110. package/dist/plugin-alloy/src/typescript/components/builtin-file.mjs +0 -56
  111. package/dist/plugin-alloy/src/typescript/components/tsdoc-reflection.cjs +0 -126
  112. package/dist/plugin-alloy/src/typescript/components/tsdoc-reflection.mjs +0 -124
  113. package/dist/plugin-alloy/src/typescript/components/tsdoc.cjs +0 -442
  114. package/dist/plugin-alloy/src/typescript/components/tsdoc.d.cts +0 -27
  115. package/dist/plugin-alloy/src/typescript/components/tsdoc.d.mts +0 -28
  116. package/dist/plugin-alloy/src/typescript/components/tsdoc.mjs +0 -433
  117. package/dist/plugin-alloy/src/typescript/components/typescript-file.cjs +0 -194
  118. package/dist/plugin-alloy/src/typescript/components/typescript-file.d.cts +0 -14
  119. package/dist/plugin-alloy/src/typescript/components/typescript-file.d.mts +0 -15
  120. package/dist/plugin-alloy/src/typescript/components/typescript-file.mjs +0 -191
  121. package/dist/plugin-alloy/src/typescript/components/typescript-interface.cjs +0 -68
  122. package/dist/plugin-alloy/src/typescript/components/typescript-interface.mjs +0 -67
  123. package/dist/plugin-alloy/src/typescript/components/typescript-object.cjs +0 -124
  124. package/dist/plugin-alloy/src/typescript/components/typescript-object.mjs +0 -123
  125. package/dist/plugin-automd/src/index.cjs +0 -101
  126. package/dist/plugin-automd/src/index.mjs +0 -98
  127. package/dist/plugin-automd/src/types/plugin.d.cts +0 -38
  128. package/dist/plugin-automd/src/types/plugin.d.mts +0 -40
  129. package/dist/plugin-automd/src/types/toc.d.cts +0 -33
  130. package/dist/plugin-automd/src/types/toc.d.mts +0 -33
  131. package/dist/plugin-babel/src/helpers/ast-utils.cjs +0 -10
  132. package/dist/plugin-babel/src/helpers/ast-utils.mjs +0 -9
  133. package/dist/plugin-babel/src/helpers/create-plugin.cjs +0 -41
  134. package/dist/plugin-babel/src/helpers/create-plugin.mjs +0 -39
  135. package/dist/plugin-babel/src/helpers/filters.cjs +0 -23
  136. package/dist/plugin-babel/src/helpers/filters.mjs +0 -21
  137. package/dist/plugin-babel/src/helpers/index.cjs +0 -5
  138. package/dist/plugin-babel/src/helpers/index.mjs +0 -7
  139. package/dist/plugin-babel/src/helpers/module-helpers.cjs +0 -38
  140. package/dist/plugin-babel/src/helpers/module-helpers.mjs +0 -35
  141. package/dist/plugin-babel/src/helpers/options.cjs +0 -50
  142. package/dist/plugin-babel/src/helpers/options.mjs +0 -47
  143. package/dist/plugin-babel/src/index.cjs +0 -91
  144. package/dist/plugin-babel/src/index.mjs +0 -89
  145. package/dist/plugin-babel/src/types/index.d.mts +0 -1
  146. package/dist/plugin-babel/src/types/plugin.d.cts +0 -15
  147. package/dist/plugin-babel/src/types/plugin.d.mts +0 -15
  148. package/dist/plugin-env/src/babel/index.cjs +0 -1
  149. package/dist/plugin-env/src/babel/index.mjs +0 -3
  150. package/dist/plugin-env/src/babel/plugin.cjs +0 -121
  151. package/dist/plugin-env/src/babel/plugin.mjs +0 -119
  152. package/dist/plugin-env/src/components/docs.cjs +0 -9
  153. package/dist/plugin-env/src/components/docs.mjs +0 -11
  154. package/dist/plugin-env/src/components/env.cjs +0 -575
  155. package/dist/plugin-env/src/components/env.mjs +0 -572
  156. package/dist/plugin-env/src/components/index.cjs +0 -2
  157. package/dist/plugin-env/src/components/index.mjs +0 -4
  158. package/dist/plugin-env/src/helpers/automd-generator.cjs +0 -22
  159. package/dist/plugin-env/src/helpers/automd-generator.mjs +0 -21
  160. package/dist/plugin-env/src/helpers/create-reflection-resource.cjs +0 -55
  161. package/dist/plugin-env/src/helpers/create-reflection-resource.mjs +0 -54
  162. package/dist/plugin-env/src/helpers/index.cjs +0 -6
  163. package/dist/plugin-env/src/helpers/index.mjs +0 -8
  164. package/dist/plugin-env/src/helpers/load.cjs +0 -83
  165. package/dist/plugin-env/src/helpers/load.mjs +0 -80
  166. package/dist/plugin-env/src/helpers/persistence.cjs +0 -200
  167. package/dist/plugin-env/src/helpers/persistence.mjs +0 -189
  168. package/dist/plugin-env/src/helpers/reflect.cjs +0 -111
  169. package/dist/plugin-env/src/helpers/reflect.mjs +0 -103
  170. package/dist/plugin-env/src/helpers/source-file-env.cjs +0 -24
  171. package/dist/plugin-env/src/helpers/source-file-env.mjs +0 -23
  172. package/dist/plugin-env/src/helpers/template-helpers.cjs +0 -2
  173. package/dist/plugin-env/src/helpers/template-helpers.mjs +0 -4
  174. package/dist/plugin-env/src/index.cjs +0 -175
  175. package/dist/plugin-env/src/index.mjs +0 -173
  176. package/dist/plugin-env/src/types/plugin.d.cts +0 -151
  177. package/dist/plugin-env/src/types/plugin.d.mts +0 -153
  178. package/dist/powerlines/src/lib/build/esbuild.cjs +0 -102
  179. package/dist/powerlines/src/lib/build/esbuild.mjs +0 -100
  180. package/dist/powerlines/src/lib/entry.cjs +0 -12
  181. package/dist/powerlines/src/lib/entry.mjs +0 -14
  182. package/dist/powerlines/src/lib/logger.cjs +0 -41
  183. package/dist/powerlines/src/lib/logger.mjs +0 -39
  184. package/dist/powerlines/src/lib/typescript/tsconfig.cjs +0 -38
  185. package/dist/powerlines/src/lib/typescript/tsconfig.mjs +0 -35
  186. package/dist/powerlines/src/lib/utilities/bundle.cjs +0 -35
  187. package/dist/powerlines/src/lib/utilities/bundle.mjs +0 -34
  188. package/dist/powerlines/src/lib/utilities/resolve.cjs +0 -30
  189. package/dist/powerlines/src/lib/utilities/resolve.mjs +0 -29
  190. package/dist/powerlines/src/plugin-utils/paths.cjs +0 -1
  191. package/dist/powerlines/src/plugin-utils/paths.mjs +0 -3
  192. package/dist/powerlines/src/types/babel.d.cts +0 -22
  193. package/dist/powerlines/src/types/babel.d.mts +0 -22
  194. package/dist/powerlines/src/types/build.d.cts +0 -145
  195. package/dist/powerlines/src/types/build.d.mts +0 -145
  196. package/dist/powerlines/src/types/commands.d.cts +0 -8
  197. package/dist/powerlines/src/types/commands.d.mts +0 -9
  198. package/dist/powerlines/src/types/config.d.cts +0 -380
  199. package/dist/powerlines/src/types/config.d.mts +0 -381
  200. package/dist/powerlines/src/types/context.d.cts +0 -414
  201. package/dist/powerlines/src/types/context.d.mts +0 -416
  202. package/dist/powerlines/src/types/fs.d.cts +0 -486
  203. package/dist/powerlines/src/types/fs.d.mts +0 -486
  204. package/dist/powerlines/src/types/hooks.d.mts +0 -2
  205. package/dist/powerlines/src/types/plugin.d.cts +0 -231
  206. package/dist/powerlines/src/types/plugin.d.mts +0 -231
  207. package/dist/powerlines/src/types/resolved.d.cts +0 -82
  208. package/dist/powerlines/src/types/resolved.d.mts +0 -82
  209. package/dist/powerlines/src/types/tsconfig.d.cts +0 -69
  210. package/dist/powerlines/src/types/tsconfig.d.mts +0 -69
@@ -1,5 +1,24 @@
1
+ import { i as UserConfig, n as ResolvedConfig, o as PluginContext, r as BabelUserConfig, t as BabelResolvedConfig } from "./resolved-CTt23qfE.cjs";
2
+ import { n as SecretsInterface, t as EnvInterface } from "./runtime-B8Zgz0Kb.cjs";
3
+ import { Children, PrintTreeOptions } from "@alloy-js/core";
4
+ import { DotenvConfiguration, TypeDefinition, TypeDefinitionParameter } from "@stryke/types/configuration";
5
+ import { Children as Children$1 } from "@alloy-js/core/jsx-runtime";
6
+ import { ReflectionClass } from "@powerlines/deepkit/vendor/type";
1
7
  import * as $ from "@stryke/capnp";
8
+ import { Config } from "automd";
9
+ import { DotenvParseOutput } from "@stryke/env/types";
10
+ import { PluginOptions } from "babel-plugin-react-compiler";
2
11
 
12
+ //#region ../plugin-babel/src/types/plugin.d.ts
13
+ type BabelPluginOptions = Partial<BabelUserConfig>;
14
+ type BabelPluginUserConfig = UserConfig;
15
+ interface BabelPluginResolvedConfig extends ResolvedConfig {
16
+ transform: {
17
+ babel: BabelResolvedConfig;
18
+ };
19
+ }
20
+ type BabelPluginContext<TResolvedConfig extends BabelPluginResolvedConfig = BabelPluginResolvedConfig> = PluginContext<TResolvedConfig>;
21
+ //#endregion
3
22
  //#region ../deepkit/schemas/reflection.d.ts
4
23
  declare const ReflectionKind: {
5
24
  readonly NEVER: 0;
@@ -1557,4 +1576,315 @@ declare class SerializedTypes extends $.Struct {
1557
1576
  toString(): string;
1558
1577
  }
1559
1578
  //#endregion
1560
- export { SerializedTypes };
1579
+ //#region ../deepkit/src/types.d.ts
1580
+ type Reflection<T extends Record<string, any> = Record<string, any>> = ReflectionClass<T> & {
1581
+ dataBuffer?: ArrayBuffer;
1582
+ messageRoot?: SerializedTypes;
1583
+ };
1584
+ //#endregion
1585
+ //#region ../plugin-alloy/src/types/plugin.d.ts
1586
+ type AlloyPluginOptions = Partial<PrintTreeOptions> & {
1587
+ /**
1588
+ * If true, the Alloy framework is used to generate Typescript output files.
1589
+ *
1590
+ * @defaultValue true
1591
+ */
1592
+ typescript?: boolean;
1593
+ /**
1594
+ * If true, the Alloy framework is used to generate JSON output files.
1595
+ *
1596
+ * @defaultValue false
1597
+ */
1598
+ json?: boolean;
1599
+ /**
1600
+ * If true, the Alloy framework is used to generate Markdown output files.
1601
+ *
1602
+ * @defaultValue false
1603
+ */
1604
+ markdown?: boolean;
1605
+ };
1606
+ type AlloyPluginUserConfig = UserConfig & {
1607
+ alloy?: AlloyPluginOptions;
1608
+ };
1609
+ type AlloyPluginResolvedConfig = ResolvedConfig & {
1610
+ alloy: AlloyPluginOptions;
1611
+ };
1612
+ type AlloyPluginContext<TResolvedConfig extends AlloyPluginResolvedConfig = AlloyPluginResolvedConfig> = PluginContext<TResolvedConfig> & {
1613
+ render: <TContext extends AlloyPluginContext>(this: TContext, children: Children) => Promise<void>;
1614
+ };
1615
+ //#endregion
1616
+ //#region ../plugin-automd/src/types/toc.d.ts
1617
+ interface TOCOptions {
1618
+ /**
1619
+ * A slugify function to generate slugs for the headings.
1620
+ */
1621
+ slugify?: (str: string) => string;
1622
+ /**
1623
+ * The maximum depth of headings to include in the TOC.
1624
+ *
1625
+ * @defaultValue 6
1626
+ */
1627
+ maxDepth?: number;
1628
+ /**
1629
+ * Whether to include the first H1 heading in the TOC.
1630
+ */
1631
+ firstH1?: boolean;
1632
+ /**
1633
+ * The bullet character to use for list items in the TOC.
1634
+ *
1635
+ * @defaultValue "-"
1636
+ */
1637
+ bullets?: string;
1638
+ /**
1639
+ * A prefix to add to each heading in the TOC.
1640
+ */
1641
+ prefix?: string;
1642
+ /**
1643
+ * A filter function to determine which headings to include in the TOC.
1644
+ */
1645
+ filter?: (str: string, level: number) => boolean;
1646
+ }
1647
+ //#endregion
1648
+ //#region ../plugin-automd/src/types/plugin.d.ts
1649
+ type AutoMDPluginOptions = Omit<Config, "dir" | "watch" | "onWatch" | "prefix"> & {
1650
+ /**
1651
+ * Path to the AutoMD configuration file.
1652
+ *
1653
+ * @remarks
1654
+ * If not provided, the plugin will use the default AutoMD configuration resolution mechanism.
1655
+ */
1656
+ configFile?: string;
1657
+ /**
1658
+ * An indicator specifying whether or not issues found by AutoMD during the prepare task are considered fatal.
1659
+ *
1660
+ * @defaultValue true
1661
+ */
1662
+ allowIssues?: boolean;
1663
+ /**
1664
+ * Alternate prefix strings to use for finding generators
1665
+ *
1666
+ * @remarks
1667
+ * By default, AutoMD looks for generators with the "automd" prefix, so that any `<!-- automd:generator [...args] --> ... <!-- /automd -->` comments will be picked up. If you want to use different prefixes (for example, to avoid conflicts with other tools), you would provide a value like "myPrefix" and AutoMD would also look for `<!-- myPrefix:generator [...args] --> ... <!-- /myPrefix -->` comments.
1668
+ *
1669
+ * @defaultValue ["automd", "powerlines", "\{framework\}"]
1670
+ */
1671
+ prefix?: string | string[];
1672
+ /**
1673
+ * Table of Contents generator options
1674
+ *
1675
+ * @remarks
1676
+ * If set to `false`, the built-in Table of Contents generator will be disabled.
1677
+ */
1678
+ toc?: false | TOCOptions;
1679
+ };
1680
+ //#endregion
1681
+ //#region ../plugin-env/src/types/plugin.d.ts
1682
+ type EnvPluginOptions = Omit<DotenvConfiguration, "types"> & {
1683
+ /**
1684
+ * A path to the type definition for the expected env configuration parameters. This value can include both a path to the typescript file and the name of the type definition to use separated by a `":"` or `"#"` character. For example: `"./src/types/env.ts#ConfigConfiguration"`.
1685
+ */
1686
+ types?: TypeDefinitionParameter;
1687
+ /**
1688
+ * A path to the type definition for the expected env secret parameters. This value can include both a path to the typescript file and the name of the type definition to use separated by a `":"` or `"#"` character. For example: `"./src/types/env.ts#ConfigSecrets"`.
1689
+ */
1690
+ secrets?: TypeDefinitionParameter;
1691
+ /**
1692
+ * An additional prefix (or list of additional prefixes) to apply to the environment variables
1693
+ *
1694
+ * @remarks
1695
+ * By default, the plugin will use the `POWERLINES_` prefix. This option is useful for avoiding conflicts with other environment variables.
1696
+ */
1697
+ prefix?: string | string[];
1698
+ /**
1699
+ * Should the plugin inject the env variables in the source code with their values?
1700
+ *
1701
+ * @remarks
1702
+ * This option is set to `true` when building an application project.
1703
+ *
1704
+ * @defaultValue false
1705
+ */
1706
+ inject?: boolean;
1707
+ /**
1708
+ * The default configuration to use when loading environment variables.
1709
+ *
1710
+ * @remarks
1711
+ * This configuration is used as the base configuration when loading environment variables, and will be overridden by any values found in the `.env` file or the process environment.
1712
+ */
1713
+ defaultConfig?: Children$1;
1714
+ /**
1715
+ * Babel configuration options to use when injecting environment variables into the source code.
1716
+ *
1717
+ * @remarks
1718
+ * This option allows you to customize the Babel transformation process used to inject environment variables into the source code. If not provided, the plugin will use default Babel settings.
1719
+ */
1720
+ babel?: BabelPluginOptions;
1721
+ /**
1722
+ * AutoMD configuration options to allow injecting environment variables documentation into a markdown file such as a README.md.
1723
+ *
1724
+ * @remarks
1725
+ * The README.md file should contain the `<!-- automd:env --><!-- /automd -->` comment block where the documentation will be injected.
1726
+ */
1727
+ automd?: AutoMDPluginOptions;
1728
+ /**
1729
+ * Alloy configuration options to use when injecting environment variables into the source code.
1730
+ *
1731
+ * @remarks
1732
+ * This option allows you to customize the Alloy transformation process used to inject environment variables into the source code. If not provided, the plugin will use default Alloy settings.
1733
+ */
1734
+ alloy?: AlloyPluginOptions;
1735
+ };
1736
+ type EnvPluginUserConfig = BabelPluginUserConfig & AlloyPluginUserConfig & {
1737
+ env: EnvPluginOptions;
1738
+ };
1739
+ type EnvPluginResolvedConfig = BabelPluginResolvedConfig & AlloyPluginResolvedConfig & {
1740
+ env: Required<Pick<DotenvConfiguration, "additionalFiles">> & Required<Pick<EnvPluginOptions, "defaultConfig">> & {
1741
+ /**
1742
+ * The type definition for the expected env variable parameters
1743
+ *
1744
+ * @remarks
1745
+ * This value is parsed from the {@link EnvPluginOptions.types} option.
1746
+ */
1747
+ types: TypeDefinition;
1748
+ /**
1749
+ * The type definition for the expected env secret parameters
1750
+ *
1751
+ * @remarks
1752
+ * This value is parsed from the {@link EnvPluginOptions.secrets} option.
1753
+ */
1754
+ secrets: TypeDefinition;
1755
+ /**
1756
+ * Should the plugin inject the env variables in the source code with their values?
1757
+ *
1758
+ * @remarks
1759
+ * This value is the result of reflecting the {@link EnvPluginOptions.inject} option.
1760
+ */
1761
+ inject: EnvPluginOptions["inject"];
1762
+ /**
1763
+ * The prefix used for environment variables
1764
+ *
1765
+ * @remarks
1766
+ * This value is used to filter environment variables that are loaded from the .env file and the process environment.
1767
+ */
1768
+ prefix: string[];
1769
+ };
1770
+ };
1771
+ interface EnvPluginContext<TResolvedConfig extends EnvPluginResolvedConfig = EnvPluginResolvedConfig> extends BabelPluginContext<TResolvedConfig>, AlloyPluginContext<TResolvedConfig> {
1772
+ env: {
1773
+ /**
1774
+ * The type definitions reflection for the env variables and secrets
1775
+ *
1776
+ * @remarks
1777
+ * These reflections contains the structure of the expected environment variables and secrets as defined by the type definitions provided in the plugin configuration.
1778
+ */
1779
+ types: {
1780
+ /**
1781
+ * The type definitions for the expected env variables
1782
+ */
1783
+ env: Reflection;
1784
+ /**
1785
+ * The type definitions for the expected env secrets
1786
+ */
1787
+ secrets: Reflection;
1788
+ };
1789
+ /**
1790
+ * The current **used** environment variables and secrets reflection
1791
+ *
1792
+ * @remarks
1793
+ * This reflection contains the structure of the current environment variables and secrets as defined during the plugin initialization by extracting the values from the source code.
1794
+ */
1795
+ used: {
1796
+ /**
1797
+ * The current env variables reflection
1798
+ */
1799
+ env: Reflection<EnvInterface>;
1800
+ /**
1801
+ * The current env secrets reflection
1802
+ */
1803
+ secrets: Reflection<SecretsInterface>;
1804
+ };
1805
+ /**
1806
+ * The parsed .env configuration object
1807
+ *
1808
+ * @remarks
1809
+ * This value is the result of loading the .env configuration file found in the project root directory and merging it with the values provided at {@link EnvPluginOptions.values}
1810
+ */
1811
+ parsed: DotenvParseOutput;
1812
+ /**
1813
+ * The injected environment variables and secrets reflection
1814
+ *
1815
+ * @remarks
1816
+ * This reflection contains the structure of the injected environment variables and secrets that were injected into the source code during the build process.
1817
+ */
1818
+ injected: Reflection;
1819
+ };
1820
+ }
1821
+ //#endregion
1822
+ //#region src/types/plugin.d.ts
1823
+ type ReactCompilerOptions = Omit<PluginOptions, "logger">;
1824
+ interface ReactPluginOptions {
1825
+ /**
1826
+ * Control where the JSX factory is imported from.
1827
+ *
1828
+ * @see https://esbuild.github.io/api/#jsx-import-source
1829
+ *
1830
+ * @defaultValue "react"
1831
+ */
1832
+ jsxImportSource?: string;
1833
+ /**
1834
+ * Control how JSX is transformed.
1835
+ *
1836
+ * @remarks
1837
+ * Skipping React import with classic runtime is not supported from v4
1838
+ *
1839
+ * @defaultValue "automatic"
1840
+ */
1841
+ jsxRuntime?: "classic" | "automatic";
1842
+ /**
1843
+ * Options provided to the [React Compiler](https://npmjs.com/package/babel-plugin-react-compiler).
1844
+ *
1845
+ * @see https://github.com/facebook/react/blob/main/compiler/packages/babel-plugin-react-compiler/src/Entrypoint/Options.ts#L55
1846
+ * @see https://react.dev/blog/2025/04/21/react-compiler-rc
1847
+ *
1848
+ * @remarks
1849
+ * Set to `false` to disable the React Compiler. By default, the React Compiler is enabled and target is set to React 19.
1850
+ */
1851
+ compiler?: ReactCompilerOptions | false;
1852
+ /**
1853
+ * React Fast Refresh runtime URL prefix.
1854
+ *
1855
+ * @remarks
1856
+ * Useful in a module federation context to enable HMR by specifying the host application URL in the Vite config of a remote application.
1857
+ *
1858
+ * @example
1859
+ * reactRefreshHost: 'http://localhost:3000'
1860
+ */
1861
+ reactRefreshHost?: string;
1862
+ /**
1863
+ * Options to pass to the [Babel plugin](https://npmjs.com/package/\@powerlines/plugin-babel).
1864
+ */
1865
+ babel?: Partial<BabelPluginOptions>;
1866
+ /**
1867
+ * Options to pass to the [Env plugin](https://npmjs.com/package/\@powerlines/plugin-env).
1868
+ */
1869
+ env?: Partial<Omit<EnvPluginOptions, "babel">>;
1870
+ }
1871
+ type ReactPluginUserConfig = EnvPluginUserConfig & {
1872
+ /**
1873
+ * Options for the React plugin.
1874
+ */
1875
+ react?: ReactPluginOptions;
1876
+ };
1877
+ type ReactPluginResolvedConfig = EnvPluginResolvedConfig & {
1878
+ /**
1879
+ * Options for the React plugin.
1880
+ */
1881
+ react: ReactPluginOptions;
1882
+ };
1883
+ interface ReactPluginContext<TResolvedConfig extends ReactPluginResolvedConfig = ReactPluginResolvedConfig> extends EnvPluginContext<TResolvedConfig> {}
1884
+ declare type __ΩReactCompilerOptions = any[];
1885
+ declare type __ΩReactPluginOptions = any[];
1886
+ declare type __ΩReactPluginUserConfig = any[];
1887
+ declare type __ΩReactPluginResolvedConfig = any[];
1888
+ declare type __ΩReactPluginContext = any[];
1889
+ //#endregion
1890
+ export { ReactPluginUserConfig as a, __ΩReactPluginOptions as c, ReactPluginResolvedConfig as i, __ΩReactPluginResolvedConfig as l, ReactPluginContext as n, __ΩReactCompilerOptions as o, ReactPluginOptions as r, __ΩReactPluginContext as s, ReactCompilerOptions as t, __ΩReactPluginUserConfig as u };