@rozenite/vite-plugin 1.13.0 → 2.0.0
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 +12 -0
- package/dist/bundle-dts.d.ts.map +1 -1
- package/dist/client-plugin.d.ts.map +1 -1
- package/dist/dev-config-module.d.ts.map +1 -1
- package/dist/dev-host/assets/index-DU3zXL2c.css +1 -0
- package/dist/dev-host/assets/index-Xsb6uYhI.js +13 -0
- package/dist/dev-host/index.html +3 -3
- package/dist/dev-host/manifest.json +2 -2
- package/dist/index.cjs +24 -8
- package/dist/index.d.ts +9 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +24 -8
- package/dist/react-native-plugin.d.ts.map +1 -1
- package/dist/sdk-plugin.d.ts.map +1 -1
- package/dist/server-plugin.d.ts.map +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/package.json +9 -10
- package/src/bundle-dts.ts +7 -6
- package/src/client-plugin.ts +8 -6
- package/src/dev-config-module.ts +4 -1
- package/src/dev-host/App.tsx +219 -413
- package/src/dev-host/components/DispatchForm.tsx +108 -122
- package/src/dev-host/components/FlowList.tsx +81 -101
- package/src/dev-host/components/MessageDetailsPane.tsx +56 -83
- package/src/dev-host/components/MessageLogPane.tsx +84 -66
- package/src/dev-host/components/PanelTabs.tsx +29 -10
- package/src/dev-host/config.ts +6 -2
- package/src/dev-host/constants.ts +0 -19
- package/src/dev-host/flow-runtime.ts +33 -12
- package/src/dev-host/index.html +1 -1
- package/src/dev-host/main.tsx +1 -10
- package/src/dev-host/server.ts +9 -3
- package/src/dev-host/styles.css +162 -830
- package/src/dev-host/types.ts +5 -10
- package/src/dev-host/utils.ts +9 -6
- package/src/dev-host/vite.config.mts +2 -0
- package/src/index.ts +15 -5
- package/src/load-config.ts +4 -4
- package/src/package-json.ts +1 -1
- package/src/react-native-plugin.ts +3 -0
- package/src/sdk-plugin.ts +3 -0
- package/src/server-plugin.ts +3 -0
- package/src/utils.ts +1 -1
- package/dist/dev-host/assets/index-CkxvBMpp.css +0 -1
- package/dist/dev-host/assets/index-cNKHRwej.js +0 -11
- package/src/dev-host/components/MessagePayloadDetail.tsx +0 -32
- package/src/dev-host/components/ResizeHandle.tsx +0 -33
- package/src/dev-host/components/icons.tsx +0 -79
- package/src/dev-host/components/ui/Button.tsx +0 -91
- package/src/dev-host/components/ui/DropdownMenu.tsx +0 -84
- package/src/dev-host/components/ui/IconButton.tsx +0 -41
- package/src/dev-host/components/ui/Input.tsx +0 -73
- package/src/dev-host/components/ui/ScrollArea.tsx +0 -20
- package/src/dev-host/components/ui/Tabs.tsx +0 -166
- package/src/dev-host/components/ui/Textarea.tsx +0 -79
- package/src/dev-host/components/ui/ToggleGroup.tsx +0 -120
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rozenite/vite-plugin",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Vite plugin for developing React Native DevTools plugins with hot reload and development tools",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -41,10 +41,13 @@
|
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@microsoft/api-extractor": "^7.50.1",
|
|
44
|
+
"@tailwindcss/vite": "4.2.2",
|
|
44
45
|
"@vitejs/plugin-react": "^4.3.4",
|
|
45
46
|
"ejs": "^3.1.9",
|
|
46
47
|
"vite-plugin-dts": "~4.5.0",
|
|
47
|
-
"vite-plugin-react-native-web": "^2.1.1"
|
|
48
|
+
"vite-plugin-react-native-web": "^2.1.1",
|
|
49
|
+
"lucide-react": "^0.263.1",
|
|
50
|
+
"@rozenite/ui": "2.0.0"
|
|
48
51
|
},
|
|
49
52
|
"peerDependencies": {
|
|
50
53
|
"react": "*",
|
|
@@ -53,14 +56,10 @@
|
|
|
53
56
|
},
|
|
54
57
|
"devDependencies": {
|
|
55
58
|
"@types/ejs": "^3.1.5",
|
|
56
|
-
"@types/react": "~19.2.
|
|
57
|
-
"@types/react-dom": "~19.
|
|
58
|
-
"
|
|
59
|
-
"react-
|
|
60
|
-
"react": "19.2.0",
|
|
61
|
-
"react-dom": "19.2.0",
|
|
62
|
-
"styletron-engine-monolithic": "^1.0.0",
|
|
63
|
-
"styletron-react": "^6.1.1"
|
|
59
|
+
"@types/react": "~19.2.3",
|
|
60
|
+
"@types/react-dom": "~19.2.3",
|
|
61
|
+
"react": "19.2.3",
|
|
62
|
+
"react-dom": "19.2.3"
|
|
64
63
|
},
|
|
65
64
|
"engines": {
|
|
66
65
|
"node": ">=20"
|
package/src/bundle-dts.ts
CHANGED
|
@@ -44,12 +44,13 @@ export const bundleTargetDeclarations = async (
|
|
|
44
44
|
const targetRoot = path.join(projectRoot, 'dist', target);
|
|
45
45
|
const publicEntryPath = path.join(targetRoot, 'index.d.ts');
|
|
46
46
|
const bundleEntryPath =
|
|
47
|
-
target === 'sdk'
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
47
|
+
target === 'sdk'
|
|
48
|
+
? path.join(targetRoot, `${target}.d.ts`)
|
|
49
|
+
: publicEntryPath;
|
|
50
|
+
const entryPath = await fs
|
|
51
|
+
.access(bundleEntryPath)
|
|
52
|
+
.then(() => bundleEntryPath)
|
|
53
|
+
.catch(() => publicEntryPath);
|
|
53
54
|
const tempOutputPath = path.join(targetRoot, 'index.public.d.ts');
|
|
54
55
|
const srcDeclarationsPath = path.join(targetRoot, 'src');
|
|
55
56
|
const configObjectFullPath = path.join(projectRoot, 'api-extractor.json');
|
package/src/client-plugin.ts
CHANGED
|
@@ -7,7 +7,10 @@ import { fileURLToPath } from 'node:url';
|
|
|
7
7
|
import { normalizePath } from 'vite';
|
|
8
8
|
import { loadConfig, RozeniteConfig } from './load-config.js';
|
|
9
9
|
import { getPackageJSON } from './package-json.js';
|
|
10
|
-
import {
|
|
10
|
+
import {
|
|
11
|
+
DEV_HOST_CONFIG_GLOBAL_KEY,
|
|
12
|
+
DEV_HOST_STATE_ELEMENT_ID,
|
|
13
|
+
} from './dev-host/constants.js';
|
|
11
14
|
import {
|
|
12
15
|
getBuiltDevHostAssets,
|
|
13
16
|
getDevHostHtmlTemplate,
|
|
@@ -50,11 +53,7 @@ const TEMPLATES_DIR = path.resolve(
|
|
|
50
53
|
'templates',
|
|
51
54
|
);
|
|
52
55
|
|
|
53
|
-
const PACKAGE_DIR = path.resolve(
|
|
54
|
-
fileURLToPath(import.meta.url),
|
|
55
|
-
'..',
|
|
56
|
-
'..',
|
|
57
|
-
);
|
|
56
|
+
const PACKAGE_DIR = path.resolve(fileURLToPath(import.meta.url), '..', '..');
|
|
58
57
|
|
|
59
58
|
const DEV_HOST_SOURCE_ENTRY_FILE = getDevHostSourceEntryFile(PACKAGE_DIR);
|
|
60
59
|
|
|
@@ -186,6 +185,9 @@ export const rozeniteClientPlugin = (): Plugin => {
|
|
|
186
185
|
config.server.port = 8888;
|
|
187
186
|
|
|
188
187
|
config.build ??= {};
|
|
188
|
+
if (process.env.ROZENITE_BUILD === '1') {
|
|
189
|
+
config.build.emptyOutDir = false;
|
|
190
|
+
}
|
|
189
191
|
config.build.rollupOptions ??= {};
|
|
190
192
|
config.build.rollupOptions.input = {
|
|
191
193
|
...(config.build.rollupOptions.input as Record<string, string>),
|
package/src/dev-config-module.ts
CHANGED
|
@@ -18,7 +18,10 @@ export const resolveRozeniteDevConfigModuleId = (id: string) => {
|
|
|
18
18
|
return null;
|
|
19
19
|
};
|
|
20
20
|
|
|
21
|
-
export const loadRozeniteDevConfigModule = (
|
|
21
|
+
export const loadRozeniteDevConfigModule = (
|
|
22
|
+
id: string,
|
|
23
|
+
projectRoot: string,
|
|
24
|
+
) => {
|
|
22
25
|
if (id !== RESOLVED_ROZENITE_DEV_CONFIG_MODULE_ID) {
|
|
23
26
|
return null;
|
|
24
27
|
}
|