@powerlines/plugin-react 0.1.395 → 0.1.396
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/README.md +14 -16
- package/dist/_virtual/{rolldown_runtime.cjs → _rolldown/runtime.cjs} +1 -1
- package/dist/_virtual/_rolldown/runtime.mjs +3 -0
- package/dist/components/index.cjs +1 -0
- package/dist/components/react-optimized.cjs +19 -18
- package/dist/components/react-optimized.d.cts.map +1 -1
- package/dist/components/react-optimized.d.mts.map +1 -1
- package/dist/index.cjs +21 -22
- package/dist/index.d.cts +0 -2
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +0 -2
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +1 -2
- package/dist/index.mjs.map +1 -1
- package/dist/types/plugin.d.cts.map +1 -1
- package/dist/types/plugin.d.mts.map +1 -1
- package/dist/types/runtime.d.cts.map +1 -1
- package/dist/types/runtime.d.mts.map +1 -1
- package/package.json +10 -10
package/README.md
CHANGED
|
@@ -27,7 +27,7 @@ This package is part of the <b>🔌 Powerlines</b> monorepo. Powerlines is the "
|
|
|
27
27
|
|
|
28
28
|
<h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
|
|
29
29
|
|
|
30
|
-
[](https://stormsoftware.com/projects/powerlines) [](http://commitizen.github.io/cz-cli/)  
|
|
31
31
|
|
|
32
32
|
<!-- prettier-ignore-start -->
|
|
33
33
|
<!-- markdownlint-disable -->
|
|
@@ -58,21 +58,19 @@ A package containing a Powerlines plugin for building a React application.
|
|
|
58
58
|
|
|
59
59
|
## Table of Contents
|
|
60
60
|
|
|
61
|
-
- [
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
- [
|
|
65
|
-
- [
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
- [Contributing](#contributing)
|
|
75
|
-
- [Contributors](#contributors)
|
|
61
|
+
- [Installing](#installing)
|
|
62
|
+
- [Reduced Package Size](#reduced-package-size)
|
|
63
|
+
- [Development](#development)
|
|
64
|
+
- [Building](#building)
|
|
65
|
+
- [Running unit tests](#running-unit-tests)
|
|
66
|
+
- [Linting](#linting)
|
|
67
|
+
- [Storm Workspaces](#storm-workspaces)
|
|
68
|
+
- [Roadmap](#roadmap)
|
|
69
|
+
- [Support](#support)
|
|
70
|
+
- [License](#license)
|
|
71
|
+
- [Changelog](#changelog)
|
|
72
|
+
- [Contributing](#contributing)
|
|
73
|
+
- [Contributors](#contributors)
|
|
76
74
|
|
|
77
75
|
<!-- END doctoc -->
|
|
78
76
|
|
|
@@ -1,44 +1,45 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
3
|
+
let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
3
4
|
let defu = require("defu");
|
|
4
|
-
defu =
|
|
5
|
-
let
|
|
6
|
-
let
|
|
7
|
-
let
|
|
8
|
-
let
|
|
9
|
-
let
|
|
5
|
+
defu = require_runtime.__toESM(defu);
|
|
6
|
+
let _alloy_js_core = require("@alloy-js/core");
|
|
7
|
+
let _alloy_js_typescript = require("@alloy-js/typescript");
|
|
8
|
+
let _powerlines_plugin_alloy_helpers_refkey = require("@powerlines/plugin-alloy/helpers/refkey");
|
|
9
|
+
let _powerlines_plugin_alloy_typescript_components_builtin_file = require("@powerlines/plugin-alloy/typescript/components/builtin-file");
|
|
10
|
+
let _powerlines_plugin_alloy_typescript_components_tsdoc = require("@powerlines/plugin-alloy/typescript/components/tsdoc");
|
|
10
11
|
|
|
11
12
|
//#region src/components/react-optimized.tsx
|
|
12
|
-
const isOptimizationEnabledRefkey = (0,
|
|
13
|
+
const isOptimizationEnabledRefkey = (0, _powerlines_plugin_alloy_helpers_refkey.refkey)("isOptimizationEnabled");
|
|
13
14
|
/**
|
|
14
15
|
* Generates the `react/optimized` builtin module for the Powerlines project.
|
|
15
16
|
*/
|
|
16
17
|
function ReactOptimizedBuiltin(props) {
|
|
17
|
-
const [{ override }, rest] = (0,
|
|
18
|
-
return (0,
|
|
18
|
+
const [{ override }, rest] = (0, _alloy_js_core.splitProps)(props, ["override"]);
|
|
19
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript_components_builtin_file.BuiltinFile, (0, _alloy_js_core_jsx_runtime.mergeProps)(rest, {
|
|
19
20
|
id: "react/optimized",
|
|
20
21
|
description: "A built-in module to provide access to environment configuration to determine React optimizations.",
|
|
21
22
|
get builtinImports() {
|
|
22
23
|
return (0, defu.default)({ env: ["env", "isDevelopment"] }, rest.builtinImports ?? {});
|
|
23
24
|
},
|
|
24
25
|
get children() {
|
|
25
|
-
return [(0,
|
|
26
|
+
return [(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript_components_tsdoc.TSDoc, {
|
|
26
27
|
heading: "A gating function to determine if the optimized [React compiler](https://react.dev/reference/react-compiler) source code should be used.",
|
|
27
28
|
get children() {
|
|
28
|
-
return [(0,
|
|
29
|
+
return [(0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript_components_tsdoc.TSDocLink, { children: `https://react.dev/reference/react-compiler/gating` }), (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript_components_tsdoc.TSDocReturns, { children: `A boolean indicating if the React compiler's optimizations should be used.` })];
|
|
29
30
|
}
|
|
30
|
-
}), (0,
|
|
31
|
+
}), (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.FunctionDeclaration, {
|
|
31
32
|
refkey: isOptimizationEnabledRefkey,
|
|
32
33
|
async: false,
|
|
33
34
|
"export": true,
|
|
34
35
|
name: "isOptimizationEnabled",
|
|
35
36
|
returnType: "boolean",
|
|
36
37
|
get children() {
|
|
37
|
-
return [(0,
|
|
38
|
+
return [(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
38
39
|
when: override !== void 0,
|
|
39
|
-
fallback:
|
|
40
|
-
children:
|
|
41
|
-
}), (0,
|
|
40
|
+
fallback: _alloy_js_core.code`return !env.DISABLE_REACT_COMPILER && !isDevelopment; `,
|
|
41
|
+
children: _alloy_js_core.code`return ${override};`
|
|
42
|
+
}), (0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})];
|
|
42
43
|
}
|
|
43
44
|
})];
|
|
44
45
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-optimized.d.cts","names":[],"sources":["../../src/components/react-optimized.tsx"],"
|
|
1
|
+
{"version":3,"file":"react-optimized.d.cts","names":[],"sources":["../../src/components/react-optimized.tsx"],"mappings":";;;;UAgCiB,0BAAA,SAAmC,IAAA,CAClD,gBAAA;EAGA,QAAA;AAAA;AAJF;;;AAAA,iBAYgB,qBAAA,CAAsB,KAAA,EAAO,0BAAA,GAA0B,eAAA,CAAA,QAAA;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-optimized.d.mts","names":[],"sources":["../../src/components/react-optimized.tsx"],"
|
|
1
|
+
{"version":3,"file":"react-optimized.d.mts","names":[],"sources":["../../src/components/react-optimized.tsx"],"mappings":";;;;UAgCiB,0BAAA,SAAmC,IAAA,CAClD,gBAAA;EAGA,QAAA;AAAA;AAJF;;;AAAA,iBAYgB,qBAAA,CAAsB,KAAA,EAAO,0BAAA,GAA0B,eAAA,CAAA,QAAA;AAAA"}
|
package/dist/index.cjs
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
Object.
|
|
2
|
-
const
|
|
1
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
2
|
+
const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
|
|
3
3
|
const require_components_react_optimized = require('./components/react-optimized.cjs');
|
|
4
4
|
require('./components/index.cjs');
|
|
5
|
-
let
|
|
6
|
-
let
|
|
7
|
-
let
|
|
8
|
-
let
|
|
9
|
-
|
|
10
|
-
let
|
|
11
|
-
|
|
12
|
-
let
|
|
13
|
-
let
|
|
14
|
-
|
|
5
|
+
let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
6
|
+
let _powerlines_deepkit_vendor_type = require("@powerlines/deepkit/vendor/type");
|
|
7
|
+
let _powerlines_plugin_alloy_render = require("@powerlines/plugin-alloy/render");
|
|
8
|
+
let _powerlines_plugin_babel = require("@powerlines/plugin-babel");
|
|
9
|
+
_powerlines_plugin_babel = require_runtime.__toESM(_powerlines_plugin_babel);
|
|
10
|
+
let _powerlines_plugin_env = require("@powerlines/plugin-env");
|
|
11
|
+
_powerlines_plugin_env = require_runtime.__toESM(_powerlines_plugin_env);
|
|
12
|
+
let _storm_software_config_tools_types = require("@storm-software/config-tools/types");
|
|
13
|
+
let _vitejs_plugin_react = require("@vitejs/plugin-react");
|
|
14
|
+
_vitejs_plugin_react = require_runtime.__toESM(_vitejs_plugin_react);
|
|
15
15
|
let defu = require("defu");
|
|
16
|
-
defu =
|
|
16
|
+
defu = require_runtime.__toESM(defu);
|
|
17
17
|
let powerlines_typescript_tsconfig = require("powerlines/typescript/tsconfig");
|
|
18
18
|
|
|
19
19
|
//#region src/index.tsx
|
|
@@ -22,8 +22,8 @@ let powerlines_typescript_tsconfig = require("powerlines/typescript/tsconfig");
|
|
|
22
22
|
*/
|
|
23
23
|
const plugin = (options = {}) => {
|
|
24
24
|
return [
|
|
25
|
-
(0,
|
|
26
|
-
(0,
|
|
25
|
+
(0, _powerlines_plugin_babel.default)(options.babel),
|
|
26
|
+
(0, _powerlines_plugin_env.default)(options.env),
|
|
27
27
|
{
|
|
28
28
|
name: "react",
|
|
29
29
|
config() {
|
|
@@ -39,7 +39,7 @@ const plugin = (options = {}) => {
|
|
|
39
39
|
},
|
|
40
40
|
enableReanimatedCheck: true,
|
|
41
41
|
logger: { logEvent: (filename, event) => {
|
|
42
|
-
this.log(event.kind === "CompileSuccess" ?
|
|
42
|
+
this.log(event.kind === "CompileSuccess" ? _storm_software_config_tools_types.LogLevelLabel.SUCCESS : event.kind === "AutoDepsEligible" || event.kind === "AutoDepsDecorations" ? _storm_software_config_tools_types.LogLevelLabel.INFO : event.kind === "CompileSkip" || event.kind === "CompileDiagnostic" ? _storm_software_config_tools_types.LogLevelLabel.DEBUG : event.kind === "Timing" ? _storm_software_config_tools_types.LogLevelLabel.TRACE : _storm_software_config_tools_types.LogLevelLabel.ERROR, `(${filename}) ${event.kind === "CompileSuccess" ? `React Compiler Success` : event.kind === "AutoDepsEligible" ? `React AutoDeps Eligible - ${event.depArrayLoc.identifierName || "No identifier"}` : event.kind === "AutoDepsDecorations" ? `React AutoDeps Decorations - ${event.decorations.filter((dec) => dec.identifierName).map((dec) => dec.identifierName).join(", ")}` : event.kind === "CompileSkip" ? `React Compile Skip - ${event.reason}` : event.kind === "CompileDiagnostic" ? `React Compile Diagnostic - (Category: ${event.detail.category}) ${event.detail.reason}${event.detail.description ? `\n${event.detail.description}` : ""}` : event.kind === "Timing" ? `React ${event.measurement.entryType} Timing (${event.measurement.name}) - ${event.measurement.duration}ms` : `React Compiler Error - ${event.fnLoc?.identifierName || "unknown location"}`}`);
|
|
43
43
|
} }
|
|
44
44
|
}
|
|
45
45
|
} });
|
|
@@ -73,7 +73,7 @@ const plugin = (options = {}) => {
|
|
|
73
73
|
viteBuildConfig.build ??= {};
|
|
74
74
|
viteBuildConfig.build.target = "chrome95";
|
|
75
75
|
viteBuildConfig.plugins ??= [];
|
|
76
|
-
viteBuildConfig.plugins.unshift((0,
|
|
76
|
+
viteBuildConfig.plugins.unshift((0, _vitejs_plugin_react.default)({
|
|
77
77
|
babel: this.config.babel,
|
|
78
78
|
jsxImportSource: this.config.react.jsxImportSource,
|
|
79
79
|
jsxRuntime: this.config.react.jsxRuntime,
|
|
@@ -85,23 +85,22 @@ const plugin = (options = {}) => {
|
|
|
85
85
|
optional: true,
|
|
86
86
|
readonly: true,
|
|
87
87
|
description: "Disables the React compiler optimizations.",
|
|
88
|
-
visibility:
|
|
89
|
-
type: { kind:
|
|
88
|
+
visibility: _powerlines_deepkit_vendor_type.ReflectionVisibility.public,
|
|
89
|
+
type: { kind: _powerlines_deepkit_vendor_type.ReflectionKind.boolean },
|
|
90
90
|
default: false
|
|
91
91
|
});
|
|
92
92
|
},
|
|
93
93
|
async prepare() {
|
|
94
94
|
const _self$ = this;
|
|
95
|
-
return (0,
|
|
95
|
+
return (0, _powerlines_plugin_alloy_render.render)(this, (0, _alloy_js_core_jsx_runtime.createComponent)(require_components_react_optimized.ReactOptimizedBuiltin, { get override() {
|
|
96
96
|
return _self$.config.react.compiler === false ? false : void 0;
|
|
97
97
|
} }));
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
];
|
|
101
101
|
};
|
|
102
|
-
var src_default = plugin;
|
|
103
102
|
|
|
104
103
|
//#endregion
|
|
105
104
|
exports.ReactOptimizedBuiltin = require_components_react_optimized.ReactOptimizedBuiltin;
|
|
106
|
-
exports.default =
|
|
105
|
+
exports.default = plugin;
|
|
107
106
|
exports.plugin = plugin;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { ReactOptimizedBuiltin, ReactOptimizedBuiltinProps, __ΩReactOptimizedBuiltinProps } from "./components/react-optimized.cjs";
|
|
2
|
-
import "./components/index.cjs";
|
|
3
2
|
import { ReactCompilerOptions, ReactPluginContext, ReactPluginOptions, ReactPluginResolvedConfig, ReactPluginUserConfig, __ΩReactCompilerOptions, __ΩReactPluginContext, __ΩReactPluginOptions, __ΩReactPluginResolvedConfig, __ΩReactPluginUserConfig } from "./types/plugin.cjs";
|
|
4
3
|
import { ReactEnvInterface, __ΩReactEnvInterface } from "./types/runtime.cjs";
|
|
5
|
-
import "./types/index.cjs";
|
|
6
4
|
import { Plugin } from "powerlines";
|
|
7
5
|
|
|
8
6
|
//#region src/index.d.ts
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.tsx"],"
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.tsx"],"mappings":";;;;;;;YAuCY,MAAA;IACR,KAAA,GAAQ,kBAAA;EAAA;AAAA;;;;cAOC,MAAA,oBACM,kBAAA,GAAqB,kBAAA,EAEtC,OAAA,GAAS,kBAAA,KAoMJ,MAAA,CAAO,QAAA"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { ReactOptimizedBuiltin, ReactOptimizedBuiltinProps, __ΩReactOptimizedBuiltinProps } from "./components/react-optimized.mjs";
|
|
2
|
-
import "./components/index.mjs";
|
|
3
2
|
import { ReactCompilerOptions, ReactPluginContext, ReactPluginOptions, ReactPluginResolvedConfig, ReactPluginUserConfig, __ΩReactCompilerOptions, __ΩReactPluginContext, __ΩReactPluginOptions, __ΩReactPluginResolvedConfig, __ΩReactPluginUserConfig } from "./types/plugin.mjs";
|
|
4
3
|
import { ReactEnvInterface, __ΩReactEnvInterface } from "./types/runtime.mjs";
|
|
5
|
-
import "./types/index.mjs";
|
|
6
4
|
import { Plugin } from "powerlines";
|
|
7
5
|
|
|
8
6
|
//#region src/index.d.ts
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.tsx"],"
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.tsx"],"mappings":";;;;;;;YAuCY,MAAA;IACR,KAAA,GAAQ,kBAAA;EAAA;AAAA;;;;cAOC,MAAA,oBACM,kBAAA,GAAqB,kBAAA,EAEtC,OAAA,GAAS,kBAAA,KAoMJ,MAAA,CAAO,QAAA"}
|
package/dist/index.mjs
CHANGED
|
@@ -93,8 +93,7 @@ const plugin = (options = {}) => {
|
|
|
93
93
|
}
|
|
94
94
|
];
|
|
95
95
|
};
|
|
96
|
-
var src_default = plugin;
|
|
97
96
|
|
|
98
97
|
//#endregion
|
|
99
|
-
export { ReactOptimizedBuiltin,
|
|
98
|
+
export { ReactOptimizedBuiltin, plugin as default, plugin };
|
|
100
99
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -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 interface Config {\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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QqD,sBAAsB,KAC9C,MAAKhD,SAASC,aAAaC,gBAAgB8C,oBAAoB;AAGjE,QAAK,KAAKnD,OAAoCoD,MAAM;AAClD,UAAKjD,SAASC,aAAaC,gBAAgBgD,UAAU,EAAE;AAEvD,SACE,CAAC1D,aACC,eACA,KAAKQ,SAASC,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"}
|
|
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 interface Config {\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,OAAO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tB/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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"
|
|
1
|
+
{"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;;KA2BY,oBAAA,GAAuB,IAAA,CAAK,aAAA;AAAA,UAEvB,kBAAA;EAFL;;;;;AAEZ;;EAQE,eAAA;EAqBW;;;;;;;;EAXX,UAAA;EAAA;;;;;;;;;EAWA,QAAA,GAAW,oBAAA;EAqBQ;;;AAGrB;;;;;;EAbE,gBAAA;EAiB0B;;AAG5B;EAfE,KAAA,GAAQ,OAAA,CAAQ,kBAAA;;;;EAKhB,GAAA,GAAM,OAAA,CAAQ,IAAA,CAAK,gBAAA;AAAA;AAAA,KAGT,qBAAA,GAAwB,mBAAA;EAWT;AAG3B;;EAVE,KAAA,GAAQ,kBAAA;AAAA;AAAA,KAGE,yBAAA,GAA4B,uBAAA;EASb;;;EALzB,KAAA,EAAO,kBAAA;AAAA;AAAA,UAGQ,kBAAA,yBACS,yBAAA,GAA4B,yBAAA,UAC5C,gBAAA,CAAiB,eAAA;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"
|
|
1
|
+
{"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;;KA2BY,oBAAA,GAAuB,IAAA,CAAK,aAAA;AAAA,UAEvB,kBAAA;EAFL;;;;;AAEZ;;EAQE,eAAA;EAqBW;;;;;;;;EAXX,UAAA;EAAA;;;;;;;;;EAWA,QAAA,GAAW,oBAAA;EAqBQ;;;AAGrB;;;;;;EAbE,gBAAA;EAiB0B;;AAG5B;EAfE,KAAA,GAAQ,OAAA,CAAQ,kBAAA;;;;EAKhB,GAAA,GAAM,OAAA,CAAQ,IAAA,CAAK,gBAAA;AAAA;AAAA,KAGT,qBAAA,GAAwB,mBAAA;EAWT;AAG3B;;EAVE,KAAA,GAAQ,kBAAA;AAAA;AAAA,KAGE,yBAAA,GAA4B,uBAAA;EASb;;;EALzB,KAAA,EAAO,kBAAA;AAAA;AAAA,UAGQ,kBAAA,yBACS,yBAAA,GAA4B,yBAAA,UAC5C,gBAAA,CAAiB,eAAA;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.d.cts","names":[],"sources":["../../src/types/runtime.ts"],"
|
|
1
|
+
{"version":3,"file":"runtime.d.cts","names":[],"sources":["../../src/types/runtime.ts"],"mappings":";;;UAoBiB,iBAAA,SAA0B,YAAA;;AAA3C;;;;;EAOE,sBAAA;AAAA;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.d.mts","names":[],"sources":["../../src/types/runtime.ts"],"
|
|
1
|
+
{"version":3,"file":"runtime.d.mts","names":[],"sources":["../../src/types/runtime.ts"],"mappings":";;;UAoBiB,iBAAA,SAA0B,YAAA;;AAA3C;;;;;EAOE,sBAAA;AAAA;AAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-react",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.396",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A package containing a Powerlines plugin for building a React application.",
|
|
6
6
|
"repository": {
|
|
@@ -56,7 +56,6 @@
|
|
|
56
56
|
"default": "./dist/index.mjs"
|
|
57
57
|
}
|
|
58
58
|
},
|
|
59
|
-
"./*": "./*",
|
|
60
59
|
"./components": {
|
|
61
60
|
"require": {
|
|
62
61
|
"types": "./dist/components/index.d.cts",
|
|
@@ -85,6 +84,7 @@
|
|
|
85
84
|
"default": "./dist/components/react-optimized.mjs"
|
|
86
85
|
}
|
|
87
86
|
},
|
|
87
|
+
"./package.json": "./package.json",
|
|
88
88
|
"./types": {
|
|
89
89
|
"require": {
|
|
90
90
|
"types": "./dist/types/index.d.cts",
|
|
@@ -141,11 +141,11 @@
|
|
|
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.
|
|
145
|
-
"@powerlines/plugin-alloy": "^0.25.
|
|
146
|
-
"@powerlines/plugin-babel": "^0.12.
|
|
147
|
-
"@powerlines/plugin-env": "^0.16.
|
|
148
|
-
"@storm-software/config-tools": "
|
|
144
|
+
"@powerlines/plugin-vite": "^0.14.340",
|
|
145
|
+
"@powerlines/plugin-alloy": "^0.25.26",
|
|
146
|
+
"@powerlines/plugin-babel": "^0.12.345",
|
|
147
|
+
"@powerlines/plugin-env": "^0.16.61",
|
|
148
|
+
"@storm-software/config-tools": "1.189.28",
|
|
149
149
|
"@stryke/cli": "^0.13.29",
|
|
150
150
|
"@stryke/convert": "^0.6.53",
|
|
151
151
|
"@stryke/fs": "^0.33.57",
|
|
@@ -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.41.
|
|
156
|
+
"powerlines": "^0.41.7"
|
|
157
157
|
},
|
|
158
158
|
"devDependencies": {
|
|
159
|
-
"@powerlines/plugin-plugin": "^0.12.
|
|
159
|
+
"@powerlines/plugin-plugin": "^0.12.293",
|
|
160
160
|
"@types/node": "^25.4.0",
|
|
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": "
|
|
166
|
+
"gitHead": "2fb48143904805988bac9bdbc04cdc4a35ff398b"
|
|
167
167
|
}
|