@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
@@ -1,5 +1,25 @@
1
+ import { a as BabelResolvedConfig, c as UserConfig, i as PluginContext, n as SecretsInterface, o as ResolvedConfig, s as BabelUserConfig, t as EnvInterface } from "./runtime-BNQjyQ7l.cjs";
2
+ import { PrintTreeOptions } from "@alloy-js/core";
3
+ import { DotenvConfiguration, TypeDefinition, TypeDefinitionParameter } from "@stryke/types/configuration";
4
+ import { Children } from "@alloy-js/core/jsx-runtime";
1
5
  import * as $ from "@stryke/capnp";
6
+ import { Config } from "automd";
7
+ import { DotenvParseOutput } from "@stryke/env/types";
8
+ import { PluginOptions } from "babel-plugin-react-compiler";
2
9
 
10
+ //#region rolldown:runtime
11
+ //#endregion
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
+ import * as import___deepkit_type from "@deepkit/type";
22
+ //#endregion
3
23
  //#region ../deepkit/schemas/reflection.d.ts
4
24
  declare const ReflectionKind: {
5
25
  readonly NEVER: 0;
@@ -1557,4 +1577,305 @@ declare class SerializedTypes extends $.Struct {
1557
1577
  toString(): string;
1558
1578
  }
1559
1579
  //#endregion
1560
- export { SerializedTypes };
1580
+ //#region ../deepkit/src/types.d.ts
1581
+ type Reflection<T extends Record<string, any> = Record<string, any>> = type_d_exports.ReflectionClass<T> & {
1582
+ dataBuffer?: ArrayBuffer;
1583
+ messageRoot?: SerializedTypes;
1584
+ };
1585
+ //#endregion
1586
+ //#region ../plugin-alloy/src/types/plugin.d.ts
1587
+ type AlloyPluginOptions = Partial<PrintTreeOptions> & {
1588
+ /**
1589
+ * If true, the Alloy framework is used to generate Typescript output files.
1590
+ *
1591
+ * @defaultValue true
1592
+ */
1593
+ typescript?: boolean;
1594
+ /**
1595
+ * If true, the Alloy framework is used to generate JSON output files.
1596
+ *
1597
+ * @defaultValue false
1598
+ */
1599
+ json?: boolean;
1600
+ /**
1601
+ * If true, the Alloy framework is used to generate Markdown output files.
1602
+ *
1603
+ * @defaultValue false
1604
+ */
1605
+ markdown?: boolean;
1606
+ };
1607
+ type AlloyPluginResolvedConfig = ResolvedConfig & {
1608
+ alloy: AlloyPluginOptions;
1609
+ };
1610
+ type AlloyPluginContext<TResolvedConfig extends AlloyPluginResolvedConfig = AlloyPluginResolvedConfig> = PluginContext<TResolvedConfig> & {
1611
+ render: <TContext extends AlloyPluginContext>(this: TContext, children: Children) => Promise<void>;
1612
+ };
1613
+ //#endregion
1614
+ //#region ../plugin-automd/src/types/toc.d.ts
1615
+ interface TOCOptions {
1616
+ /**
1617
+ * A slugify function to generate slugs for the headings.
1618
+ */
1619
+ slugify?: (str: string) => string;
1620
+ /**
1621
+ * The maximum depth of headings to include in the TOC.
1622
+ *
1623
+ * @defaultValue 6
1624
+ */
1625
+ maxDepth?: number;
1626
+ /**
1627
+ * Whether to include the first H1 heading in the TOC.
1628
+ */
1629
+ firstH1?: boolean;
1630
+ /**
1631
+ * The bullet character to use for list items in the TOC.
1632
+ *
1633
+ * @defaultValue "-"
1634
+ */
1635
+ bullets?: string;
1636
+ /**
1637
+ * A prefix to add to each heading in the TOC.
1638
+ */
1639
+ prefix?: string;
1640
+ /**
1641
+ * A filter function to determine which headings to include in the TOC.
1642
+ */
1643
+ filter?: (str: string, level: number) => boolean;
1644
+ }
1645
+ //#endregion
1646
+ //#region ../plugin-automd/src/types/plugin.d.ts
1647
+ type AutoMDPluginOptions = Omit<Config, "dir" | "watch" | "onWatch" | "prefix"> & {
1648
+ /**
1649
+ * Path to the AutoMD configuration file.
1650
+ *
1651
+ * @remarks
1652
+ * If not provided, the plugin will use the default AutoMD configuration resolution mechanism.
1653
+ */
1654
+ configFile?: string;
1655
+ /**
1656
+ * An indicator specifying whether or not issues found by AutoMD during the prepare task are considered fatal.
1657
+ *
1658
+ * @defaultValue true
1659
+ */
1660
+ allowIssues?: boolean;
1661
+ /**
1662
+ * Alternate prefix strings to use for finding generators
1663
+ *
1664
+ * @remarks
1665
+ * 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.
1666
+ *
1667
+ * @defaultValue ["automd", "powerlines", "\{framework\}"]
1668
+ */
1669
+ prefix?: string | string[];
1670
+ /**
1671
+ * Table of Contents generator options
1672
+ *
1673
+ * @remarks
1674
+ * If set to `false`, the built-in Table of Contents generator will be disabled.
1675
+ */
1676
+ toc?: false | TOCOptions;
1677
+ };
1678
+ //#endregion
1679
+ //#region ../plugin-env/src/types/plugin.d.ts
1680
+ type EnvPluginOptions = Omit<DotenvConfiguration, "types"> & {
1681
+ /**
1682
+ * 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"`.
1683
+ */
1684
+ types?: TypeDefinitionParameter;
1685
+ /**
1686
+ * 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"`.
1687
+ */
1688
+ secrets?: TypeDefinitionParameter;
1689
+ /**
1690
+ * An additional prefix (or list of additional prefixes) to apply to the environment variables
1691
+ *
1692
+ * @remarks
1693
+ * By default, the plugin will use the `POWERLINES_` prefix. This option is useful for avoiding conflicts with other environment variables.
1694
+ */
1695
+ prefix?: string | string[];
1696
+ /**
1697
+ * Should the plugin inject the env variables in the source code with their values?
1698
+ *
1699
+ * @remarks
1700
+ * This option is set to `true` when building an application project.
1701
+ *
1702
+ * @defaultValue false
1703
+ */
1704
+ inject?: boolean;
1705
+ /**
1706
+ * The default configuration to use when loading environment variables.
1707
+ *
1708
+ * @remarks
1709
+ * 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.
1710
+ */
1711
+ defaultConfig?: Children;
1712
+ /**
1713
+ * Babel configuration options to use when injecting environment variables into the source code.
1714
+ *
1715
+ * @remarks
1716
+ * 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.
1717
+ */
1718
+ babel?: BabelPluginOptions;
1719
+ /**
1720
+ * AutoMD configuration options to allow injecting environment variables documentation into a markdown file such as a README.md.
1721
+ *
1722
+ * @remarks
1723
+ * The README.md file should contain the `<!-- automd:env --><!-- /automd -->` comment block where the documentation will be injected.
1724
+ */
1725
+ automd?: AutoMDPluginOptions;
1726
+ };
1727
+ type EnvPluginUserConfig = BabelPluginUserConfig & {
1728
+ env: EnvPluginOptions;
1729
+ };
1730
+ type EnvPluginResolvedConfig = BabelPluginResolvedConfig & {
1731
+ env: Required<Pick<DotenvConfiguration, "additionalFiles">> & Required<Pick<EnvPluginOptions, "defaultConfig">> & {
1732
+ /**
1733
+ * The type definition for the expected env variable parameters
1734
+ *
1735
+ * @remarks
1736
+ * This value is parsed from the {@link EnvPluginOptions.types} option.
1737
+ */
1738
+ types: TypeDefinition;
1739
+ /**
1740
+ * The type definition for the expected env secret parameters
1741
+ *
1742
+ * @remarks
1743
+ * This value is parsed from the {@link EnvPluginOptions.secrets} option.
1744
+ */
1745
+ secrets: TypeDefinition;
1746
+ /**
1747
+ * Should the plugin inject the env variables in the source code with their values?
1748
+ *
1749
+ * @remarks
1750
+ * This value is the result of reflecting the {@link EnvPluginOptions.inject} option.
1751
+ */
1752
+ inject: EnvPluginOptions["inject"];
1753
+ /**
1754
+ * The prefix used for environment variables
1755
+ *
1756
+ * @remarks
1757
+ * This value is used to filter environment variables that are loaded from the .env file and the process environment.
1758
+ */
1759
+ prefix: string[];
1760
+ };
1761
+ };
1762
+ interface EnvPluginContext<TResolvedConfig extends EnvPluginResolvedConfig = EnvPluginResolvedConfig> extends BabelPluginContext<TResolvedConfig>, AlloyPluginContext<TResolvedConfig> {
1763
+ env: {
1764
+ /**
1765
+ * The type definitions reflection for the env variables and secrets
1766
+ *
1767
+ * @remarks
1768
+ * These reflections contains the structure of the expected environment variables and secrets as defined by the type definitions provided in the plugin configuration.
1769
+ */
1770
+ types: {
1771
+ /**
1772
+ * The type definitions for the expected env variables
1773
+ */
1774
+ env: Reflection;
1775
+ /**
1776
+ * The type definitions for the expected env secrets
1777
+ */
1778
+ secrets: Reflection;
1779
+ };
1780
+ /**
1781
+ * The current **used** environment variables and secrets reflection
1782
+ *
1783
+ * @remarks
1784
+ * 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.
1785
+ */
1786
+ used: {
1787
+ /**
1788
+ * The current env variables reflection
1789
+ */
1790
+ env: Reflection<EnvInterface>;
1791
+ /**
1792
+ * The current env secrets reflection
1793
+ */
1794
+ secrets: Reflection<SecretsInterface>;
1795
+ };
1796
+ /**
1797
+ * The parsed .env configuration object
1798
+ *
1799
+ * @remarks
1800
+ * 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}
1801
+ */
1802
+ parsed: DotenvParseOutput;
1803
+ /**
1804
+ * The injected environment variables and secrets reflection
1805
+ *
1806
+ * @remarks
1807
+ * This reflection contains the structure of the injected environment variables and secrets that were injected into the source code during the build process.
1808
+ */
1809
+ injected: Reflection;
1810
+ };
1811
+ }
1812
+ //#endregion
1813
+ //#region src/types/plugin.d.ts
1814
+ type ReactCompilerOptions = Omit<PluginOptions, "logger">;
1815
+ interface ReactPluginOptions {
1816
+ /**
1817
+ * Control where the JSX factory is imported from.
1818
+ *
1819
+ * @see https://esbuild.github.io/api/#jsx-import-source
1820
+ *
1821
+ * @defaultValue "react"
1822
+ */
1823
+ jsxImportSource?: string;
1824
+ /**
1825
+ * Control how JSX is transformed.
1826
+ *
1827
+ * @remarks
1828
+ * Skipping React import with classic runtime is not supported from v4
1829
+ *
1830
+ * @defaultValue "automatic"
1831
+ */
1832
+ jsxRuntime?: "classic" | "automatic";
1833
+ /**
1834
+ * Options provided to the [React Compiler](https://npmjs.com/package/babel-plugin-react-compiler).
1835
+ *
1836
+ * @see https://github.com/facebook/react/blob/main/compiler/packages/babel-plugin-react-compiler/src/Entrypoint/Options.ts#L55
1837
+ * @see https://react.dev/blog/2025/04/21/react-compiler-rc
1838
+ *
1839
+ * @remarks
1840
+ * Set to `false` to disable the React Compiler. By default, the React Compiler is enabled and target is set to React 19.
1841
+ */
1842
+ compiler?: ReactCompilerOptions | false;
1843
+ /**
1844
+ * React Fast Refresh runtime URL prefix.
1845
+ *
1846
+ * @remarks
1847
+ * Useful in a module federation context to enable HMR by specifying the host application URL in the Vite config of a remote application.
1848
+ *
1849
+ * @example
1850
+ * reactRefreshHost: 'http://localhost:3000'
1851
+ */
1852
+ reactRefreshHost?: string;
1853
+ /**
1854
+ * Options to pass to the [Babel plugin](https://npmjs.com/package/\@powerlines/plugin-babel).
1855
+ */
1856
+ babel?: Partial<BabelPluginOptions>;
1857
+ /**
1858
+ * Options to pass to the [Env plugin](https://npmjs.com/package/\@powerlines/plugin-env).
1859
+ */
1860
+ env?: Partial<Omit<EnvPluginOptions, "babel">>;
1861
+ }
1862
+ type ReactPluginUserConfig = EnvPluginUserConfig & {
1863
+ /**
1864
+ * Options for the React plugin.
1865
+ */
1866
+ react?: ReactPluginOptions;
1867
+ };
1868
+ type ReactPluginResolvedConfig = EnvPluginResolvedConfig & {
1869
+ /**
1870
+ * Options for the React plugin.
1871
+ */
1872
+ react: ReactPluginOptions;
1873
+ };
1874
+ interface ReactPluginContext<TResolvedConfig extends ReactPluginResolvedConfig = ReactPluginResolvedConfig> extends EnvPluginContext<TResolvedConfig> {}
1875
+ declare type __ΩReactCompilerOptions = any[];
1876
+ declare type __ΩReactPluginOptions = any[];
1877
+ declare type __ΩReactPluginUserConfig = any[];
1878
+ declare type __ΩReactPluginResolvedConfig = any[];
1879
+ declare type __ΩReactPluginContext = any[];
1880
+ //#endregion
1881
+ 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 };
@@ -1,5 +1,24 @@
1
+ import { a as BabelResolvedConfig, c as UserConfig, i as PluginContext, n as SecretsInterface, o as ResolvedConfig, s as BabelUserConfig, t as EnvInterface } from "./runtime-CbWds61u.mjs";
2
+ import { Config } from "automd";
3
+ import { DotenvParseOutput } from "@stryke/env/types";
1
4
  import * as $ from "@stryke/capnp";
5
+ import { PrintTreeOptions } from "@alloy-js/core";
6
+ import "@alloy-js/typescript";
7
+ import { Children } from "@alloy-js/core/jsx-runtime";
8
+ import { DotenvConfiguration, TypeDefinition, TypeDefinitionParameter } from "@stryke/types/configuration";
9
+ import { PluginOptions } from "babel-plugin-react-compiler";
2
10
 
11
+ //#region ../plugin-babel/src/types/plugin.d.ts
12
+ type BabelPluginOptions = Partial<BabelUserConfig>;
13
+ type BabelPluginUserConfig = UserConfig;
14
+ interface BabelPluginResolvedConfig extends ResolvedConfig {
15
+ transform: {
16
+ babel: BabelResolvedConfig;
17
+ };
18
+ }
19
+ type BabelPluginContext<TResolvedConfig extends BabelPluginResolvedConfig = BabelPluginResolvedConfig> = PluginContext<TResolvedConfig>;
20
+ import * as import___deepkit_type from "@deepkit/type";
21
+ //#endregion
3
22
  //#region ../deepkit/schemas/reflection.d.ts
4
23
  declare const ReflectionKind: {
5
24
  readonly NEVER: 0;
@@ -1557,4 +1576,305 @@ 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>> = type_d_exports.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 AlloyPluginResolvedConfig = ResolvedConfig & {
1607
+ alloy: AlloyPluginOptions;
1608
+ };
1609
+ type AlloyPluginContext<TResolvedConfig extends AlloyPluginResolvedConfig = AlloyPluginResolvedConfig> = PluginContext<TResolvedConfig> & {
1610
+ render: <TContext extends AlloyPluginContext>(this: TContext, children: Children) => Promise<void>;
1611
+ };
1612
+ //#endregion
1613
+ //#region ../plugin-automd/src/types/toc.d.ts
1614
+ interface TOCOptions {
1615
+ /**
1616
+ * A slugify function to generate slugs for the headings.
1617
+ */
1618
+ slugify?: (str: string) => string;
1619
+ /**
1620
+ * The maximum depth of headings to include in the TOC.
1621
+ *
1622
+ * @defaultValue 6
1623
+ */
1624
+ maxDepth?: number;
1625
+ /**
1626
+ * Whether to include the first H1 heading in the TOC.
1627
+ */
1628
+ firstH1?: boolean;
1629
+ /**
1630
+ * The bullet character to use for list items in the TOC.
1631
+ *
1632
+ * @defaultValue "-"
1633
+ */
1634
+ bullets?: string;
1635
+ /**
1636
+ * A prefix to add to each heading in the TOC.
1637
+ */
1638
+ prefix?: string;
1639
+ /**
1640
+ * A filter function to determine which headings to include in the TOC.
1641
+ */
1642
+ filter?: (str: string, level: number) => boolean;
1643
+ }
1644
+ //#endregion
1645
+ //#region ../plugin-automd/src/types/plugin.d.ts
1646
+ type AutoMDPluginOptions = Omit<Config, "dir" | "watch" | "onWatch" | "prefix"> & {
1647
+ /**
1648
+ * Path to the AutoMD configuration file.
1649
+ *
1650
+ * @remarks
1651
+ * If not provided, the plugin will use the default AutoMD configuration resolution mechanism.
1652
+ */
1653
+ configFile?: string;
1654
+ /**
1655
+ * An indicator specifying whether or not issues found by AutoMD during the prepare task are considered fatal.
1656
+ *
1657
+ * @defaultValue true
1658
+ */
1659
+ allowIssues?: boolean;
1660
+ /**
1661
+ * Alternate prefix strings to use for finding generators
1662
+ *
1663
+ * @remarks
1664
+ * 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.
1665
+ *
1666
+ * @defaultValue ["automd", "powerlines", "\{framework\}"]
1667
+ */
1668
+ prefix?: string | string[];
1669
+ /**
1670
+ * Table of Contents generator options
1671
+ *
1672
+ * @remarks
1673
+ * If set to `false`, the built-in Table of Contents generator will be disabled.
1674
+ */
1675
+ toc?: false | TOCOptions;
1676
+ };
1677
+ //#endregion
1678
+ //#region ../plugin-env/src/types/plugin.d.ts
1679
+ type EnvPluginOptions = Omit<DotenvConfiguration, "types"> & {
1680
+ /**
1681
+ * 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"`.
1682
+ */
1683
+ types?: TypeDefinitionParameter;
1684
+ /**
1685
+ * 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"`.
1686
+ */
1687
+ secrets?: TypeDefinitionParameter;
1688
+ /**
1689
+ * An additional prefix (or list of additional prefixes) to apply to the environment variables
1690
+ *
1691
+ * @remarks
1692
+ * By default, the plugin will use the `POWERLINES_` prefix. This option is useful for avoiding conflicts with other environment variables.
1693
+ */
1694
+ prefix?: string | string[];
1695
+ /**
1696
+ * Should the plugin inject the env variables in the source code with their values?
1697
+ *
1698
+ * @remarks
1699
+ * This option is set to `true` when building an application project.
1700
+ *
1701
+ * @defaultValue false
1702
+ */
1703
+ inject?: boolean;
1704
+ /**
1705
+ * The default configuration to use when loading environment variables.
1706
+ *
1707
+ * @remarks
1708
+ * 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.
1709
+ */
1710
+ defaultConfig?: Children;
1711
+ /**
1712
+ * Babel configuration options to use when injecting environment variables into the source code.
1713
+ *
1714
+ * @remarks
1715
+ * 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.
1716
+ */
1717
+ babel?: BabelPluginOptions;
1718
+ /**
1719
+ * AutoMD configuration options to allow injecting environment variables documentation into a markdown file such as a README.md.
1720
+ *
1721
+ * @remarks
1722
+ * The README.md file should contain the `<!-- automd:env --><!-- /automd -->` comment block where the documentation will be injected.
1723
+ */
1724
+ automd?: AutoMDPluginOptions;
1725
+ };
1726
+ type EnvPluginUserConfig = BabelPluginUserConfig & {
1727
+ env: EnvPluginOptions;
1728
+ };
1729
+ type EnvPluginResolvedConfig = BabelPluginResolvedConfig & {
1730
+ env: Required<Pick<DotenvConfiguration, "additionalFiles">> & Required<Pick<EnvPluginOptions, "defaultConfig">> & {
1731
+ /**
1732
+ * The type definition for the expected env variable parameters
1733
+ *
1734
+ * @remarks
1735
+ * This value is parsed from the {@link EnvPluginOptions.types} option.
1736
+ */
1737
+ types: TypeDefinition;
1738
+ /**
1739
+ * The type definition for the expected env secret parameters
1740
+ *
1741
+ * @remarks
1742
+ * This value is parsed from the {@link EnvPluginOptions.secrets} option.
1743
+ */
1744
+ secrets: TypeDefinition;
1745
+ /**
1746
+ * Should the plugin inject the env variables in the source code with their values?
1747
+ *
1748
+ * @remarks
1749
+ * This value is the result of reflecting the {@link EnvPluginOptions.inject} option.
1750
+ */
1751
+ inject: EnvPluginOptions["inject"];
1752
+ /**
1753
+ * The prefix used for environment variables
1754
+ *
1755
+ * @remarks
1756
+ * This value is used to filter environment variables that are loaded from the .env file and the process environment.
1757
+ */
1758
+ prefix: string[];
1759
+ };
1760
+ };
1761
+ interface EnvPluginContext<TResolvedConfig extends EnvPluginResolvedConfig = EnvPluginResolvedConfig> extends BabelPluginContext<TResolvedConfig>, AlloyPluginContext<TResolvedConfig> {
1762
+ env: {
1763
+ /**
1764
+ * The type definitions reflection for the env variables and secrets
1765
+ *
1766
+ * @remarks
1767
+ * These reflections contains the structure of the expected environment variables and secrets as defined by the type definitions provided in the plugin configuration.
1768
+ */
1769
+ types: {
1770
+ /**
1771
+ * The type definitions for the expected env variables
1772
+ */
1773
+ env: Reflection;
1774
+ /**
1775
+ * The type definitions for the expected env secrets
1776
+ */
1777
+ secrets: Reflection;
1778
+ };
1779
+ /**
1780
+ * The current **used** environment variables and secrets reflection
1781
+ *
1782
+ * @remarks
1783
+ * 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.
1784
+ */
1785
+ used: {
1786
+ /**
1787
+ * The current env variables reflection
1788
+ */
1789
+ env: Reflection<EnvInterface>;
1790
+ /**
1791
+ * The current env secrets reflection
1792
+ */
1793
+ secrets: Reflection<SecretsInterface>;
1794
+ };
1795
+ /**
1796
+ * The parsed .env configuration object
1797
+ *
1798
+ * @remarks
1799
+ * 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}
1800
+ */
1801
+ parsed: DotenvParseOutput;
1802
+ /**
1803
+ * The injected environment variables and secrets reflection
1804
+ *
1805
+ * @remarks
1806
+ * This reflection contains the structure of the injected environment variables and secrets that were injected into the source code during the build process.
1807
+ */
1808
+ injected: Reflection;
1809
+ };
1810
+ }
1811
+ //#endregion
1812
+ //#region src/types/plugin.d.ts
1813
+ type ReactCompilerOptions = Omit<PluginOptions, "logger">;
1814
+ interface ReactPluginOptions {
1815
+ /**
1816
+ * Control where the JSX factory is imported from.
1817
+ *
1818
+ * @see https://esbuild.github.io/api/#jsx-import-source
1819
+ *
1820
+ * @defaultValue "react"
1821
+ */
1822
+ jsxImportSource?: string;
1823
+ /**
1824
+ * Control how JSX is transformed.
1825
+ *
1826
+ * @remarks
1827
+ * Skipping React import with classic runtime is not supported from v4
1828
+ *
1829
+ * @defaultValue "automatic"
1830
+ */
1831
+ jsxRuntime?: "classic" | "automatic";
1832
+ /**
1833
+ * Options provided to the [React Compiler](https://npmjs.com/package/babel-plugin-react-compiler).
1834
+ *
1835
+ * @see https://github.com/facebook/react/blob/main/compiler/packages/babel-plugin-react-compiler/src/Entrypoint/Options.ts#L55
1836
+ * @see https://react.dev/blog/2025/04/21/react-compiler-rc
1837
+ *
1838
+ * @remarks
1839
+ * Set to `false` to disable the React Compiler. By default, the React Compiler is enabled and target is set to React 19.
1840
+ */
1841
+ compiler?: ReactCompilerOptions | false;
1842
+ /**
1843
+ * React Fast Refresh runtime URL prefix.
1844
+ *
1845
+ * @remarks
1846
+ * Useful in a module federation context to enable HMR by specifying the host application URL in the Vite config of a remote application.
1847
+ *
1848
+ * @example
1849
+ * reactRefreshHost: 'http://localhost:3000'
1850
+ */
1851
+ reactRefreshHost?: string;
1852
+ /**
1853
+ * Options to pass to the [Babel plugin](https://npmjs.com/package/\@powerlines/plugin-babel).
1854
+ */
1855
+ babel?: Partial<BabelPluginOptions>;
1856
+ /**
1857
+ * Options to pass to the [Env plugin](https://npmjs.com/package/\@powerlines/plugin-env).
1858
+ */
1859
+ env?: Partial<Omit<EnvPluginOptions, "babel">>;
1860
+ }
1861
+ type ReactPluginUserConfig = EnvPluginUserConfig & {
1862
+ /**
1863
+ * Options for the React plugin.
1864
+ */
1865
+ react?: ReactPluginOptions;
1866
+ };
1867
+ type ReactPluginResolvedConfig = EnvPluginResolvedConfig & {
1868
+ /**
1869
+ * Options for the React plugin.
1870
+ */
1871
+ react: ReactPluginOptions;
1872
+ };
1873
+ interface ReactPluginContext<TResolvedConfig extends ReactPluginResolvedConfig = ReactPluginResolvedConfig> extends EnvPluginContext<TResolvedConfig> {}
1874
+ declare type __ΩReactCompilerOptions = any[];
1875
+ declare type __ΩReactPluginOptions = any[];
1876
+ declare type __ΩReactPluginUserConfig = any[];
1877
+ declare type __ΩReactPluginResolvedConfig = any[];
1878
+ declare type __ΩReactPluginContext = any[];
1879
+ //#endregion
1880
+ 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 };
@@ -0,0 +1 @@
1
+ export{};
File without changes
@@ -0,0 +1 @@
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));let l=require(`defu`);l=c(l);let u=require(`@alloy-js/core`),d=require(`@alloy-js/typescript`),f=require(`@powerlines/alloy/core/contexts/context`),p=require(`@powerlines/alloy/helpers/refkey`),m=require(`@powerlines/alloy/typescript/components/builtin-file`),h=require(`@powerlines/alloy/typescript/components/tsdoc`),g=require(`@alloy-js/core/jsx-runtime`);const _=(0,p.refkey)(`isOptimizationEnabled`);function v(e){let[{override:t},n]=(0,u.splitProps)(e,[`override`]),r=(0,f.usePowerlines)();return(0,g.jsxs)(m.BuiltinFile,{...n,id:`react/optimized`,description:`A built-in module to provide access to environment configuration to determine React optimizations.`,imports:(0,l.default)({[`${r?.config.output.builtinPrefix}:env`]:[`env`,`isDevelopment`]},n.imports??{}),children:[(0,g.jsxs)(h.TSDoc,{heading:`A gating function to determine if the optimized [React compiler](https://react.dev/reference/react-compiler) source code should be used.`,children:[(0,g.jsx)(h.TSDocLink,{children:`https://react.dev/reference/react-compiler/gating`}),(0,g.jsx)(h.TSDocReturns,{children:`A boolean indicating if the React compiler's optimizations should be used.`})]}),(0,g.jsx)(d.FunctionDeclaration,{refkey:_,async:!1,export:!0,name:`isOptimizationEnabled`,returnType:`boolean`,children:t===void 0?u.code`return !env.DISABLE_REACT_COMPILER && !isDevelopment; `:u.code`return ${t};`})]})}Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return v}});
@@ -0,0 +1 @@
1
+ import e from"defu";import{code as t,splitProps as n}from"@alloy-js/core";import{FunctionDeclaration as r}from"@alloy-js/typescript";import{usePowerlines as i}from"@powerlines/alloy/core/contexts/context";import{refkey as a}from"@powerlines/alloy/helpers/refkey";import{BuiltinFile as o}from"@powerlines/alloy/typescript/components/builtin-file";import{TSDoc as s,TSDocLink as c,TSDocReturns as l}from"@powerlines/alloy/typescript/components/tsdoc";import{jsx as u,jsxs as d}from"@alloy-js/core/jsx-runtime";const f=a(`isOptimizationEnabled`);function p(a){let[{override:p},m]=n(a,[`override`]),h=i();return d(o,{...m,id:`react/optimized`,description:`A built-in module to provide access to environment configuration to determine React optimizations.`,imports:e({[`${h?.config.output.builtinPrefix}:env`]:[`env`,`isDevelopment`]},m.imports??{}),children:[d(s,{heading:`A gating function to determine if the optimized [React compiler](https://react.dev/reference/react-compiler) source code should be used.`,children:[u(c,{children:`https://react.dev/reference/react-compiler/gating`}),u(l,{children:`A boolean indicating if the React compiler's optimizations should be used.`})]}),u(r,{refkey:f,async:!1,export:!0,name:`isOptimizationEnabled`,returnType:`boolean`,children:p===void 0?t`return !env.DISABLE_REACT_COMPILER && !isDevelopment; `:t`return ${p};`})]})}export{p as t};