@powerlines/plugin-react 0.1.354 → 0.1.356

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.
package/dist/index.d.cts CHANGED
@@ -6,8 +6,8 @@ import "./types/index.cjs";
6
6
  import { Plugin } from "powerlines";
7
7
 
8
8
  //#region src/index.d.ts
9
- declare module "powerlines" {
10
- interface UserConfig {
9
+ declare module "@powerlines/core" {
10
+ interface BaseConfig {
11
11
  react?: ReactPluginOptions;
12
12
  }
13
13
  }
package/dist/index.d.mts CHANGED
@@ -6,8 +6,8 @@ import "./types/index.mjs";
6
6
  import { Plugin } from "powerlines";
7
7
 
8
8
  //#region src/index.d.ts
9
- declare module "powerlines" {
10
- interface UserConfig {
9
+ declare module "@powerlines/core" {
10
+ interface BaseConfig {
11
11
  react?: ReactPluginOptions;
12
12
  }
13
13
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["ReflectionKind","ReflectionVisibility","render","babel","env","LogLevelLabel","viteReactPlugin","defu","isMatchFound","ReactOptimizedBuiltin","plugin","options","name","config","react","jsxImportSource","tsconfig","tsconfigJson","compilerOptions","jsxRuntime","compiler","target","compilationMode","gating","source","framework","importSpecifierName","enableReanimatedCheck","logger","logEvent","filename","event","log","kind","SUCCESS","INFO","DEBUG","TRACE","ERROR","depArrayLoc","identifierName","decorations","filter","dec","map","join","reason","detail","category","description","measurement","entryType","duration","fnLoc","configResolved","dependencies","devDependencies","plugins","push","lib","module","jsx","environment","consumer","resolveJsonModule","vite","types","viteBuildConfig","build","unshift","reactRefreshHost","hasProperty","addProperty","optional","readonly","visibility","public","type","boolean","default","prepare","_self$","_$createComponent","override","undefined"],"sources":["../src/index.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport {\n ReflectionKind,\n ReflectionVisibility\n} from \"@powerlines/deepkit/vendor/type\";\nimport { render } from \"@powerlines/plugin-alloy/render\";\nimport babel, { BabelPluginResolvedConfig } from \"@powerlines/plugin-babel\";\nimport env from \"@powerlines/plugin-env\";\nimport { VitePluginResolvedConfig } from \"@powerlines/plugin-vite/types/plugin\";\nimport { LogLevelLabel } from \"@storm-software/config-tools/types\";\nimport viteReactPlugin from \"@vitejs/plugin-react\";\nimport type { LoggerEvent } from \"babel-plugin-react-compiler\";\nimport defu from \"defu\";\nimport { Plugin } from \"powerlines\";\nimport { isMatchFound } from \"powerlines/typescript/tsconfig\";\nimport { ReactOptimizedBuiltin } from \"./components/react-optimized\";\nimport type { ReactPluginContext, ReactPluginOptions } from \"./types/plugin\";\n\nexport * from \"./components\";\nexport * from \"./types\";\n\ndeclare module \"powerlines\" {\n export interface UserConfig {\n react?: ReactPluginOptions;\n }\n}\n\n/**\n * A package containing a Powerlines plugin for building a React application.\n */\nexport const plugin = <\n TContext extends ReactPluginContext = ReactPluginContext\n>(\n options: ReactPluginOptions = {}\n) => {\n return [\n babel(options.babel),\n env(options.env),\n {\n name: \"react\",\n config() {\n return defu(\n {\n react: options\n },\n {\n react: {\n jsxImportSource: this.tsconfig.tsconfigJson.compilerOptions\n ?.jsxImportSource as string\n }\n },\n {\n react: {\n jsxRuntime: \"automatic\",\n jsxImportSource: \"react\",\n compiler: {\n target: \"19\",\n compilationMode: \"infer\",\n gating: {\n source: `${this.config.framework}:react/optimized`,\n importSpecifierName: \"isOptimizationEnabled\"\n },\n enableReanimatedCheck: true,\n logger: {\n logEvent: (filename: string | null, event: LoggerEvent) => {\n this.log(\n event.kind === \"CompileSuccess\"\n ? LogLevelLabel.SUCCESS\n : event.kind === \"AutoDepsEligible\" ||\n event.kind === \"AutoDepsDecorations\"\n ? LogLevelLabel.INFO\n : event.kind === \"CompileSkip\" ||\n event.kind === \"CompileDiagnostic\"\n ? LogLevelLabel.DEBUG\n : event.kind === \"Timing\"\n ? LogLevelLabel.TRACE\n : LogLevelLabel.ERROR,\n `(${filename}) ${\n event.kind === \"CompileSuccess\"\n ? `React Compiler Success`\n : event.kind === \"AutoDepsEligible\"\n ? `React AutoDeps Eligible - ${\n event.depArrayLoc.identifierName ||\n \"No identifier\"\n }`\n : event.kind === \"AutoDepsDecorations\"\n ? `React AutoDeps Decorations - ${event.decorations\n .filter(dec => dec.identifierName)\n .map(dec => dec.identifierName)\n .join(\", \")}`\n : event.kind === \"CompileSkip\"\n ? `React Compile Skip - ${event.reason}`\n : event.kind === \"CompileDiagnostic\"\n ? `React Compile Diagnostic - (Category: ${\n event.detail.category\n }) ${event.detail.reason}${\n event.detail.description\n ? `\\n${event.detail.description}`\n : \"\"\n }`\n : event.kind === \"Timing\"\n ? `React ${event.measurement.entryType} Timing (${event.measurement.name}) - ${event.measurement.duration}ms`\n : `React Compiler Error - ${event.fnLoc?.identifierName || \"unknown location\"}`\n }`\n );\n }\n }\n }\n } as ReactPluginOptions\n }\n );\n },\n configResolved() {\n this.dependencies.react = \"^19.2.3\";\n this.dependencies[\"react-dom\"] = \"^19.2.3\";\n\n this.devDependencies[\"@types/react\"] = \"^19.2.3\";\n this.devDependencies[\"@types/react-dom\"] = \"^19.2.3\";\n\n if (this.config.react.compiler !== false) {\n (this.config as BabelPluginResolvedConfig).babel ??=\n {} as BabelPluginResolvedConfig[\"babel\"];\n\n this.config.babel.plugins ??= [];\n this.config.babel.plugins.push([\n \"babel-plugin-react-compiler\",\n this.config.react.compiler\n ]);\n }\n\n this.tsconfig.tsconfigJson.compilerOptions ??= {};\n this.tsconfig.tsconfigJson.compilerOptions.lib ??= [];\n this.tsconfig.tsconfigJson.compilerOptions.module ??= \"esnext\";\n this.tsconfig.tsconfigJson.compilerOptions.jsxImportSource =\n this.config.react.jsxImportSource;\n\n if (this.tsconfig.options.jsxImportSource === \"react\") {\n this.tsconfig.tsconfigJson.compilerOptions.jsx ??= \"react-jsx\";\n } else {\n this.tsconfig.tsconfigJson.compilerOptions.jsx ??= \"preserve\";\n }\n\n // Client platform\n if (this.environment.consumer === \"client\") {\n if (\n !isMatchFound(\"dom\", this.tsconfig.tsconfigJson.compilerOptions.lib)\n ) {\n this.tsconfig.tsconfigJson.compilerOptions.lib.push(\"DOM\");\n }\n\n if (\n !isMatchFound(\n \"dom.iterable\",\n this.tsconfig.tsconfigJson.compilerOptions.lib\n )\n ) {\n this.tsconfig.tsconfigJson.compilerOptions.lib.push(\"DOM.Iterable\");\n }\n }\n\n if (\n !isMatchFound(\n \"esnext\",\n this.tsconfig.tsconfigJson.compilerOptions.lib\n )\n ) {\n this.tsconfig.tsconfigJson.compilerOptions.lib.push(\"ESNext\");\n }\n\n if (this.tsconfig.options.resolveJsonModule !== true) {\n this.tsconfig.tsconfigJson.compilerOptions.resolveJsonModule = true;\n }\n\n if ((this.config as VitePluginResolvedConfig).vite) {\n this.tsconfig.tsconfigJson.compilerOptions.types ??= [];\n\n if (\n !isMatchFound(\n \"vite/client\",\n this.tsconfig.tsconfigJson.compilerOptions.types\n )\n ) {\n this.tsconfig.tsconfigJson.compilerOptions.types.push(\n \"vite/client\"\n );\n }\n\n const viteBuildConfig = (this.config as VitePluginResolvedConfig)\n .vite;\n viteBuildConfig.build ??= {};\n viteBuildConfig.build.target = \"chrome95\";\n\n viteBuildConfig.plugins ??= [];\n viteBuildConfig.plugins.unshift(\n viteReactPlugin({\n babel: (this.config as BabelPluginResolvedConfig).babel,\n jsxImportSource: this.config.react.jsxImportSource,\n jsxRuntime: this.config.react.jsxRuntime,\n reactRefreshHost: this.config.react.reactRefreshHost\n })\n );\n }\n\n if (\n this.env?.types?.env &&\n !this.env.types.env.hasProperty(\"DISABLE_REACT_COMPILER\")\n ) {\n this.env.types.env.addProperty({\n name: \"DISABLE_REACT_COMPILER\",\n optional: true,\n readonly: true,\n description: \"Disables the React compiler optimizations.\",\n visibility: ReflectionVisibility.public,\n type: {\n kind: ReflectionKind.boolean\n },\n default: false\n });\n }\n },\n async prepare() {\n return render(\n this,\n <ReactOptimizedBuiltin\n override={this.config.react.compiler === false ? false : undefined}\n />\n );\n }\n }\n ] as Plugin<TContext>[];\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;;;;;;AA+CA,MAAaU,UAGXC,UAA8B,EAAE,KAC7B;AACH,QAAO;EACLR,MAAMQ,QAAQR,MAAM;EACpBC,IAAIO,QAAQP,IAAI;EAChB;GACEQ,MAAM;GACNC,SAAS;AACP,WAAON,KACL,EACEO,OAAOH,SACR,EACD,EACEG,OAAO,EACLC,iBAAiB,KAAKC,SAASC,aAAaC,iBACxCH,iBACN,EACD,EACD,EACED,OAAO;KACLK,YAAY;KACZJ,iBAAiB;KACjBK,UAAU;MACRC,QAAQ;MACRC,iBAAiB;MACjBC,QAAQ;OACNC,QAAQ,GAAG,KAAKX,OAAOY,UAAS;OAChCC,qBAAqB;OACtB;MACDC,uBAAuB;MACvBC,QAAQ,EACNC,WAAWC,UAAyBC,UAAuB;AACzD,YAAKC,IACHD,MAAME,SAAS,mBACX5B,cAAc6B,UACdH,MAAME,SAAS,sBACbF,MAAME,SAAS,wBACf5B,cAAc8B,OACdJ,MAAME,SAAS,iBACbF,MAAME,SAAS,sBACf5B,cAAc+B,QACdL,MAAME,SAAS,WACb5B,cAAcgC,QACdhC,cAAciC,OACxB,IAAIR,SAAQ,IACVC,MAAME,SAAS,mBACX,2BACAF,MAAME,SAAS,qBACb,6BACEF,MAAMQ,YAAYC,kBAClB,oBAEFT,MAAME,SAAS,wBACb,gCAAgCF,MAAMU,YACnCC,QAAOC,QAAOA,IAAIH,eAAe,CACjCI,KAAID,QAAOA,IAAIH,eAAe,CAC9BK,KAAK,KAAK,KACbd,MAAME,SAAS,gBACb,wBAAwB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B0E,WAAQ;AAAA,YAAEF,OAAKpE,OAAOC,MAAMM,aAAa,QAAQ,QAAQgE;OAAS,CAEtE,CAAC;;GAEJ;EACF;;AAGH,kBAAe1E"}
1
+ {"version":3,"file":"index.mjs","names":["ReflectionKind","ReflectionVisibility","render","babel","env","LogLevelLabel","viteReactPlugin","defu","isMatchFound","ReactOptimizedBuiltin","plugin","options","name","config","react","jsxImportSource","tsconfig","tsconfigJson","compilerOptions","jsxRuntime","compiler","target","compilationMode","gating","source","framework","importSpecifierName","enableReanimatedCheck","logger","logEvent","filename","event","log","kind","SUCCESS","INFO","DEBUG","TRACE","ERROR","depArrayLoc","identifierName","decorations","filter","dec","map","join","reason","detail","category","description","measurement","entryType","duration","fnLoc","configResolved","dependencies","devDependencies","plugins","push","lib","module","jsx","environment","consumer","resolveJsonModule","vite","types","viteBuildConfig","build","unshift","reactRefreshHost","hasProperty","addProperty","optional","readonly","visibility","public","type","boolean","default","prepare","_self$","_$createComponent","override","undefined"],"sources":["../src/index.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport {\n ReflectionKind,\n ReflectionVisibility\n} from \"@powerlines/deepkit/vendor/type\";\nimport { render } from \"@powerlines/plugin-alloy/render\";\nimport babel, { BabelPluginResolvedConfig } from \"@powerlines/plugin-babel\";\nimport env from \"@powerlines/plugin-env\";\nimport { VitePluginResolvedConfig } from \"@powerlines/plugin-vite/types/plugin\";\nimport { LogLevelLabel } from \"@storm-software/config-tools/types\";\nimport viteReactPlugin from \"@vitejs/plugin-react\";\nimport type { LoggerEvent } from \"babel-plugin-react-compiler\";\nimport defu from \"defu\";\nimport { Plugin } from \"powerlines\";\nimport { isMatchFound } from \"powerlines/typescript/tsconfig\";\nimport { ReactOptimizedBuiltin } from \"./components/react-optimized\";\nimport type { ReactPluginContext, ReactPluginOptions } from \"./types/plugin\";\n\nexport * from \"./components\";\nexport * from \"./types\";\n\ndeclare module \"@powerlines/core\" {\n interface BaseConfig {\n react?: ReactPluginOptions;\n }\n}\n\n/**\n * A package containing a Powerlines plugin for building a React application.\n */\nexport const plugin = <\n TContext extends ReactPluginContext = ReactPluginContext\n>(\n options: ReactPluginOptions = {}\n) => {\n return [\n babel(options.babel),\n env(options.env),\n {\n name: \"react\",\n config() {\n return defu(\n {\n react: options\n },\n {\n react: {\n jsxImportSource: this.tsconfig.tsconfigJson.compilerOptions\n ?.jsxImportSource as string\n }\n },\n {\n react: {\n jsxRuntime: \"automatic\",\n jsxImportSource: \"react\",\n compiler: {\n target: \"19\",\n compilationMode: \"infer\",\n gating: {\n source: `${this.config.framework}:react/optimized`,\n importSpecifierName: \"isOptimizationEnabled\"\n },\n enableReanimatedCheck: true,\n logger: {\n logEvent: (filename: string | null, event: LoggerEvent) => {\n this.log(\n event.kind === \"CompileSuccess\"\n ? LogLevelLabel.SUCCESS\n : event.kind === \"AutoDepsEligible\" ||\n event.kind === \"AutoDepsDecorations\"\n ? LogLevelLabel.INFO\n : event.kind === \"CompileSkip\" ||\n event.kind === \"CompileDiagnostic\"\n ? LogLevelLabel.DEBUG\n : event.kind === \"Timing\"\n ? LogLevelLabel.TRACE\n : LogLevelLabel.ERROR,\n `(${filename}) ${\n event.kind === \"CompileSuccess\"\n ? `React Compiler Success`\n : event.kind === \"AutoDepsEligible\"\n ? `React AutoDeps Eligible - ${\n event.depArrayLoc.identifierName ||\n \"No identifier\"\n }`\n : event.kind === \"AutoDepsDecorations\"\n ? `React AutoDeps Decorations - ${event.decorations\n .filter(dec => dec.identifierName)\n .map(dec => dec.identifierName)\n .join(\", \")}`\n : event.kind === \"CompileSkip\"\n ? `React Compile Skip - ${event.reason}`\n : event.kind === \"CompileDiagnostic\"\n ? `React Compile Diagnostic - (Category: ${\n event.detail.category\n }) ${event.detail.reason}${\n event.detail.description\n ? `\\n${event.detail.description}`\n : \"\"\n }`\n : event.kind === \"Timing\"\n ? `React ${event.measurement.entryType} Timing (${event.measurement.name}) - ${event.measurement.duration}ms`\n : `React Compiler Error - ${event.fnLoc?.identifierName || \"unknown location\"}`\n }`\n );\n }\n }\n }\n } as ReactPluginOptions\n }\n );\n },\n configResolved() {\n this.dependencies.react = \"^19.2.3\";\n this.dependencies[\"react-dom\"] = \"^19.2.3\";\n\n this.devDependencies[\"@types/react\"] = \"^19.2.3\";\n this.devDependencies[\"@types/react-dom\"] = \"^19.2.3\";\n\n if (this.config.react.compiler !== false) {\n (this.config as BabelPluginResolvedConfig).babel ??=\n {} as BabelPluginResolvedConfig[\"babel\"];\n\n this.config.babel.plugins ??= [];\n this.config.babel.plugins.push([\n \"babel-plugin-react-compiler\",\n this.config.react.compiler\n ]);\n }\n\n this.tsconfig.tsconfigJson.compilerOptions ??= {};\n this.tsconfig.tsconfigJson.compilerOptions.lib ??= [];\n this.tsconfig.tsconfigJson.compilerOptions.module ??= \"esnext\";\n this.tsconfig.tsconfigJson.compilerOptions.jsxImportSource =\n this.config.react.jsxImportSource;\n\n if (this.tsconfig.options.jsxImportSource === \"react\") {\n this.tsconfig.tsconfigJson.compilerOptions.jsx ??= \"react-jsx\";\n } else {\n this.tsconfig.tsconfigJson.compilerOptions.jsx ??= \"preserve\";\n }\n\n // Client platform\n if (this.environment.consumer === \"client\") {\n if (\n !isMatchFound(\"dom\", this.tsconfig.tsconfigJson.compilerOptions.lib)\n ) {\n this.tsconfig.tsconfigJson.compilerOptions.lib.push(\"DOM\");\n }\n\n if (\n !isMatchFound(\n \"dom.iterable\",\n this.tsconfig.tsconfigJson.compilerOptions.lib\n )\n ) {\n this.tsconfig.tsconfigJson.compilerOptions.lib.push(\"DOM.Iterable\");\n }\n }\n\n if (\n !isMatchFound(\n \"esnext\",\n this.tsconfig.tsconfigJson.compilerOptions.lib\n )\n ) {\n this.tsconfig.tsconfigJson.compilerOptions.lib.push(\"ESNext\");\n }\n\n if (this.tsconfig.options.resolveJsonModule !== true) {\n this.tsconfig.tsconfigJson.compilerOptions.resolveJsonModule = true;\n }\n\n if ((this.config as VitePluginResolvedConfig).vite) {\n this.tsconfig.tsconfigJson.compilerOptions.types ??= [];\n\n if (\n !isMatchFound(\n \"vite/client\",\n this.tsconfig.tsconfigJson.compilerOptions.types\n )\n ) {\n this.tsconfig.tsconfigJson.compilerOptions.types.push(\n \"vite/client\"\n );\n }\n\n const viteBuildConfig = (this.config as VitePluginResolvedConfig)\n .vite;\n viteBuildConfig.build ??= {};\n viteBuildConfig.build.target = \"chrome95\";\n\n viteBuildConfig.plugins ??= [];\n viteBuildConfig.plugins.unshift(\n viteReactPlugin({\n babel: (this.config as BabelPluginResolvedConfig).babel,\n jsxImportSource: this.config.react.jsxImportSource,\n jsxRuntime: this.config.react.jsxRuntime,\n reactRefreshHost: this.config.react.reactRefreshHost\n })\n );\n }\n\n if (\n this.env?.types?.env &&\n !this.env.types.env.hasProperty(\"DISABLE_REACT_COMPILER\")\n ) {\n this.env.types.env.addProperty({\n name: \"DISABLE_REACT_COMPILER\",\n optional: true,\n readonly: true,\n description: \"Disables the React compiler optimizations.\",\n visibility: ReflectionVisibility.public,\n type: {\n kind: ReflectionKind.boolean\n },\n default: false\n });\n }\n },\n async prepare() {\n return render(\n this,\n <ReactOptimizedBuiltin\n override={this.config.react.compiler === false ? false : undefined}\n />\n );\n }\n }\n ] as Plugin<TContext>[];\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;;;;;;AA+CA,MAAaU,UAGXC,UAA8B,EAAE,KAC7B;AACH,QAAO;EACLR,MAAMQ,QAAQR,MAAM;EACpBC,IAAIO,QAAQP,IAAI;EAChB;GACEQ,MAAM;GACNC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,aAAaC,gBAAgBgD,MAC5C,CAED,MAAKlD,SAASC,aAAaC,gBAAgBgD,MAAMR,KAC/C,cACD;KAGH,MAAMS,kBAAmB,KAAKtD,OAC3BoD;AACHE,qBAAgBC,UAAU,EAAE;AAC5BD,qBAAgBC,MAAM/C,SAAS;AAE/B8C,qBAAgBV,YAAY,EAAE;AAC9BU,qBAAgBV,QAAQY,QACtB/D,gBAAgB;MACdH,OAAQ,KAAKU,OAAqCV;MAClDY,iBAAiB,KAAKF,OAAOC,MAAMC;MACnCI,YAAY,KAAKN,OAAOC,MAAMK;MAC9BmD,kBAAkB,KAAKzD,OAAOC,MAAMwD;MACrC,CACH,CAAC;;AAGH,QACE,KAAKlE,KAAK8D,OAAO9D,OACjB,CAAC,KAAKA,IAAI8D,MAAM9D,IAAImE,YAAY,yBAAyB,CAEzD,MAAKnE,IAAI8D,MAAM9D,IAAIoE,YAAY;KAC7B5D,MAAM;KACN6D,UAAU;KACVC,UAAU;KACVzB,aAAa;KACb0B,YAAY1E,qBAAqB2E;KACjCC,MAAM,EACJ5C,MAAMjC,eAAe8E,SACtB;KACDC,SAAS;KACV,CAAC;;GAGN,MAAMC,UAAU;IAAA,MAAAC,SAAA;AACd,WAAO/E,OACL,MAAIgF,gBACHzE,uBAAqB,EAAA,IACpB0E,WAAQ;AAAA,YAAEF,OAAKpE,OAAOC,MAAMM,aAAa,QAAQ,QAAQgE;OAAS,CAEtE,CAAC;;GAEJ;EACF;;AAGH,kBAAe1E"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-react",
3
- "version": "0.1.354",
3
+ "version": "0.1.356",
4
4
  "type": "module",
5
5
  "description": "A package containing a Powerlines plugin for building a React application.",
6
6
  "repository": {
@@ -141,10 +141,10 @@
141
141
  "@alloy-js/markdown": "0.23.0-dev.1",
142
142
  "@alloy-js/typescript": "0.23.0-dev.4",
143
143
  "@babel/core": "^7.29.0",
144
- "@powerlines/plugin-vite": "^0.14.302",
145
- "@powerlines/plugin-alloy": "^0.23.32",
146
- "@powerlines/plugin-babel": "^0.12.309",
147
- "@powerlines/plugin-env": "^0.16.19",
144
+ "@powerlines/plugin-vite": "^0.14.304",
145
+ "@powerlines/plugin-alloy": "^0.23.34",
146
+ "@powerlines/plugin-babel": "^0.12.311",
147
+ "@powerlines/plugin-env": "^0.16.21",
148
148
  "@storm-software/config-tools": "^1.189.10",
149
149
  "@stryke/cli": "^0.13.15",
150
150
  "@stryke/convert": "^0.6.40",
@@ -153,15 +153,15 @@
153
153
  "@vitejs/plugin-react": "^5.1.4",
154
154
  "babel-plugin-react-compiler": "^1.0.0",
155
155
  "defu": "^6.1.4",
156
- "powerlines": "^0.39.9"
156
+ "powerlines": "^0.39.11"
157
157
  },
158
158
  "devDependencies": {
159
- "@powerlines/plugin-plugin": "^0.12.252",
159
+ "@powerlines/plugin-plugin": "^0.12.254",
160
160
  "@types/node": "^25.3.3",
161
161
  "@types/react": "^19.2.14",
162
162
  "@types/react-dom": "^19.2.3"
163
163
  },
164
164
  "publishConfig": { "access": "public" },
165
165
  "types": "./dist/index.d.cts",
166
- "gitHead": "645a902416b92ae709b2ae786c21d3ec0be09258"
166
+ "gitHead": "e63eb5a0ecd0e5ee3e030388ad1c534b3ecb2136"
167
167
  }