react-code-locator 0.1.18 → 0.2.1

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 (46) hide show
  1. package/README.md +86 -38
  2. package/dist/client.cjs +1 -399
  3. package/dist/client.cjs.map +1 -1
  4. package/dist/client.d.cts +1 -1
  5. package/dist/client.d.ts +1 -1
  6. package/dist/client.js +1 -371
  7. package/dist/client.js.map +1 -1
  8. package/dist/esbuild.cjs +29 -7149
  9. package/dist/esbuild.cjs.map +1 -1
  10. package/dist/esbuild.d.cts +1 -1
  11. package/dist/esbuild.d.ts +1 -1
  12. package/dist/esbuild.js +29 -7122
  13. package/dist/esbuild.js.map +1 -1
  14. package/dist/index.cjs +37 -7504
  15. package/dist/index.cjs.map +1 -1
  16. package/dist/index.d.cts +2 -3
  17. package/dist/index.d.ts +2 -3
  18. package/dist/index.js +37 -7471
  19. package/dist/index.js.map +1 -1
  20. package/dist/swc.cjs +29 -7119
  21. package/dist/swc.cjs.map +1 -1
  22. package/dist/swc.d.cts +1 -1
  23. package/dist/swc.d.ts +1 -1
  24. package/dist/swc.js +29 -7090
  25. package/dist/swc.js.map +1 -1
  26. package/dist/{transform-CXh-m5Ez.d.cts → transform-z2n_1yc5.d.cts} +2 -2
  27. package/dist/{transform-CXh-m5Ez.d.ts → transform-z2n_1yc5.d.ts} +2 -2
  28. package/dist/unplugin.cjs +37 -7138
  29. package/dist/unplugin.cjs.map +1 -1
  30. package/dist/unplugin.d.cts +15 -6
  31. package/dist/unplugin.d.ts +15 -6
  32. package/dist/unplugin.js +37 -7108
  33. package/dist/unplugin.js.map +1 -1
  34. package/dist/webpack.cjs +45 -0
  35. package/dist/webpack.cjs.map +1 -0
  36. package/dist/webpack.d.cts +16 -0
  37. package/dist/webpack.d.ts +16 -0
  38. package/dist/webpack.js +45 -0
  39. package/dist/webpack.js.map +1 -0
  40. package/package.json +13 -10
  41. package/dist/vite.cjs +0 -7200
  42. package/dist/vite.cjs.map +0 -1
  43. package/dist/vite.d.cts +0 -52
  44. package/dist/vite.d.ts +0 -52
  45. package/dist/vite.js +0 -7169
  46. package/dist/vite.js.map +0 -1
@@ -1,11 +1,11 @@
1
+ import { LocatorOptions } from './client.cjs';
1
2
  import * as esbuild from 'esbuild';
2
3
  import * as rollup from 'rollup';
3
- import * as webpack from 'webpack';
4
- import * as vite from 'vite';
5
4
  import { UnpluginInstance } from 'unplugin';
6
- import { T as TransformOptions } from './transform-CXh-m5Ez.cjs';
5
+ import { T as TransformOptions } from './transform-z2n_1yc5.cjs';
6
+ import { Plugin } from 'vite';
7
7
 
8
- interface ReactCodeLocatorOptions extends Omit<TransformOptions, 'filename'> {
8
+ interface ReactCodeLocatorOptions extends Omit<TransformOptions, "filename"> {
9
9
  /**
10
10
  * Enable source transform for component definitions
11
11
  * @default true
@@ -31,11 +31,20 @@ interface ReactCodeLocatorOptions extends Omit<TransformOptions, 'filename'> {
31
31
  * @default /node_modules/
32
32
  */
33
33
  exclude?: RegExp | RegExp[];
34
+ /**
35
+ * Auto-inject client runtime into Vite dev server (Vite only)
36
+ * @default true
37
+ */
38
+ injectClient?: boolean;
39
+ /**
40
+ * Options passed to enableReactComponentJump (Vite only)
41
+ */
42
+ locator?: LocatorOptions;
34
43
  }
35
44
 
36
45
  declare const unplugin: UnpluginInstance<ReactCodeLocatorOptions | undefined, false>;
37
- declare const vitePlugin: (options?: ReactCodeLocatorOptions | undefined) => vite.Plugin<any>;
38
- declare const webpackPlugin: (options?: ReactCodeLocatorOptions | undefined) => webpack.WebpackPluginInstance;
46
+ declare function vitePlugin(options?: ReactCodeLocatorOptions): Plugin[];
47
+ declare const webpackPlugin: (options?: ReactCodeLocatorOptions | undefined) => WebpackPluginInstance;
39
48
  declare const rollupPlugin: (options?: ReactCodeLocatorOptions | undefined) => rollup.Plugin<any>;
40
49
  declare const esbuildPlugin: (options?: ReactCodeLocatorOptions | undefined) => esbuild.Plugin;
41
50
  declare const rspackPlugin: (options?: ReactCodeLocatorOptions | undefined) => RspackPluginInstance;
@@ -1,11 +1,11 @@
1
+ import { LocatorOptions } from './client.js';
1
2
  import * as esbuild from 'esbuild';
2
3
  import * as rollup from 'rollup';
3
- import * as webpack from 'webpack';
4
- import * as vite from 'vite';
5
4
  import { UnpluginInstance } from 'unplugin';
6
- import { T as TransformOptions } from './transform-CXh-m5Ez.js';
5
+ import { T as TransformOptions } from './transform-z2n_1yc5.js';
6
+ import { Plugin } from 'vite';
7
7
 
8
- interface ReactCodeLocatorOptions extends Omit<TransformOptions, 'filename'> {
8
+ interface ReactCodeLocatorOptions extends Omit<TransformOptions, "filename"> {
9
9
  /**
10
10
  * Enable source transform for component definitions
11
11
  * @default true
@@ -31,11 +31,20 @@ interface ReactCodeLocatorOptions extends Omit<TransformOptions, 'filename'> {
31
31
  * @default /node_modules/
32
32
  */
33
33
  exclude?: RegExp | RegExp[];
34
+ /**
35
+ * Auto-inject client runtime into Vite dev server (Vite only)
36
+ * @default true
37
+ */
38
+ injectClient?: boolean;
39
+ /**
40
+ * Options passed to enableReactComponentJump (Vite only)
41
+ */
42
+ locator?: LocatorOptions;
34
43
  }
35
44
 
36
45
  declare const unplugin: UnpluginInstance<ReactCodeLocatorOptions | undefined, false>;
37
- declare const vitePlugin: (options?: ReactCodeLocatorOptions | undefined) => vite.Plugin<any>;
38
- declare const webpackPlugin: (options?: ReactCodeLocatorOptions | undefined) => webpack.WebpackPluginInstance;
46
+ declare function vitePlugin(options?: ReactCodeLocatorOptions): Plugin[];
47
+ declare const webpackPlugin: (options?: ReactCodeLocatorOptions | undefined) => WebpackPluginInstance;
39
48
  declare const rollupPlugin: (options?: ReactCodeLocatorOptions | undefined) => rollup.Plugin<any>;
40
49
  declare const esbuildPlugin: (options?: ReactCodeLocatorOptions | undefined) => esbuild.Plugin;
41
50
  declare const rspackPlugin: (options?: ReactCodeLocatorOptions | undefined) => RspackPluginInstance;