@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.
Files changed (56) hide show
  1. package/README.md +12 -0
  2. package/dist/bundle-dts.d.ts.map +1 -1
  3. package/dist/client-plugin.d.ts.map +1 -1
  4. package/dist/dev-config-module.d.ts.map +1 -1
  5. package/dist/dev-host/assets/index-DU3zXL2c.css +1 -0
  6. package/dist/dev-host/assets/index-Xsb6uYhI.js +13 -0
  7. package/dist/dev-host/index.html +3 -3
  8. package/dist/dev-host/manifest.json +2 -2
  9. package/dist/index.cjs +24 -8
  10. package/dist/index.d.ts +9 -1
  11. package/dist/index.d.ts.map +1 -1
  12. package/dist/index.js +24 -8
  13. package/dist/react-native-plugin.d.ts.map +1 -1
  14. package/dist/sdk-plugin.d.ts.map +1 -1
  15. package/dist/server-plugin.d.ts.map +1 -1
  16. package/dist/tsconfig.lib.tsbuildinfo +1 -1
  17. package/package.json +9 -10
  18. package/src/bundle-dts.ts +7 -6
  19. package/src/client-plugin.ts +8 -6
  20. package/src/dev-config-module.ts +4 -1
  21. package/src/dev-host/App.tsx +219 -413
  22. package/src/dev-host/components/DispatchForm.tsx +108 -122
  23. package/src/dev-host/components/FlowList.tsx +81 -101
  24. package/src/dev-host/components/MessageDetailsPane.tsx +56 -83
  25. package/src/dev-host/components/MessageLogPane.tsx +84 -66
  26. package/src/dev-host/components/PanelTabs.tsx +29 -10
  27. package/src/dev-host/config.ts +6 -2
  28. package/src/dev-host/constants.ts +0 -19
  29. package/src/dev-host/flow-runtime.ts +33 -12
  30. package/src/dev-host/index.html +1 -1
  31. package/src/dev-host/main.tsx +1 -10
  32. package/src/dev-host/server.ts +9 -3
  33. package/src/dev-host/styles.css +162 -830
  34. package/src/dev-host/types.ts +5 -10
  35. package/src/dev-host/utils.ts +9 -6
  36. package/src/dev-host/vite.config.mts +2 -0
  37. package/src/index.ts +15 -5
  38. package/src/load-config.ts +4 -4
  39. package/src/package-json.ts +1 -1
  40. package/src/react-native-plugin.ts +3 -0
  41. package/src/sdk-plugin.ts +3 -0
  42. package/src/server-plugin.ts +3 -0
  43. package/src/utils.ts +1 -1
  44. package/dist/dev-host/assets/index-CkxvBMpp.css +0 -1
  45. package/dist/dev-host/assets/index-cNKHRwej.js +0 -11
  46. package/src/dev-host/components/MessagePayloadDetail.tsx +0 -32
  47. package/src/dev-host/components/ResizeHandle.tsx +0 -33
  48. package/src/dev-host/components/icons.tsx +0 -79
  49. package/src/dev-host/components/ui/Button.tsx +0 -91
  50. package/src/dev-host/components/ui/DropdownMenu.tsx +0 -84
  51. package/src/dev-host/components/ui/IconButton.tsx +0 -41
  52. package/src/dev-host/components/ui/Input.tsx +0 -73
  53. package/src/dev-host/components/ui/ScrollArea.tsx +0 -20
  54. package/src/dev-host/components/ui/Tabs.tsx +0 -166
  55. package/src/dev-host/components/ui/Textarea.tsx +0 -79
  56. 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": "1.13.0",
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.2",
57
- "@types/react-dom": "~19.1.7",
58
- "baseui": "^16.1.1",
59
- "react-json-tree": "^0.20.0",
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' ? path.join(targetRoot, `${target}.d.ts`) : publicEntryPath;
48
- const entryPath =
49
- (await fs
50
- .access(bundleEntryPath)
51
- .then(() => bundleEntryPath)
52
- .catch(() => publicEntryPath));
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');
@@ -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 { DEV_HOST_CONFIG_GLOBAL_KEY, DEV_HOST_STATE_ELEMENT_ID } from './dev-host/constants.js';
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>),
@@ -18,7 +18,10 @@ export const resolveRozeniteDevConfigModuleId = (id: string) => {
18
18
  return null;
19
19
  };
20
20
 
21
- export const loadRozeniteDevConfigModule = (id: string, projectRoot: string) => {
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
  }