react-code-locator 0.1.16 → 0.1.18

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 (60) hide show
  1. package/README.md +54 -279
  2. package/dist/esbuild.cjs +7025 -295
  3. package/dist/esbuild.cjs.map +1 -1
  4. package/dist/esbuild.d.cts +38 -6
  5. package/dist/esbuild.d.ts +38 -6
  6. package/dist/esbuild.js +7025 -295
  7. package/dist/esbuild.js.map +1 -1
  8. package/dist/index.cjs +7132 -16
  9. package/dist/index.cjs.map +1 -1
  10. package/dist/index.d.cts +7 -0
  11. package/dist/index.d.ts +7 -0
  12. package/dist/index.js +7126 -15
  13. package/dist/index.js.map +1 -1
  14. package/dist/swc.cjs +7020 -293
  15. package/dist/swc.cjs.map +1 -1
  16. package/dist/swc.d.cts +43 -19
  17. package/dist/swc.d.ts +43 -19
  18. package/dist/swc.js +7020 -293
  19. package/dist/swc.js.map +1 -1
  20. package/dist/transform-CXh-m5Ez.d.cts +12 -0
  21. package/dist/transform-CXh-m5Ez.d.ts +12 -0
  22. package/dist/unplugin.cjs +6850 -8
  23. package/dist/unplugin.cjs.map +1 -1
  24. package/dist/unplugin.d.cts +4 -13
  25. package/dist/unplugin.d.ts +4 -13
  26. package/dist/unplugin.js +6848 -6
  27. package/dist/unplugin.js.map +1 -1
  28. package/dist/vite.cjs +7029 -304
  29. package/dist/vite.cjs.map +1 -1
  30. package/dist/vite.d.cts +39 -14
  31. package/dist/vite.d.ts +39 -14
  32. package/dist/vite.js +7029 -303
  33. package/dist/vite.js.map +1 -1
  34. package/package.json +5 -51
  35. package/dist/babel.cjs +0 -370
  36. package/dist/babel.cjs.map +0 -1
  37. package/dist/babel.d.cts +0 -13
  38. package/dist/babel.d.ts +0 -13
  39. package/dist/babel.js +0 -341
  40. package/dist/babel.js.map +0 -1
  41. package/dist/babelInjectComponentSource.cjs +0 -342
  42. package/dist/babelInjectComponentSource.cjs.map +0 -1
  43. package/dist/babelInjectComponentSource.d.cts +0 -15
  44. package/dist/babelInjectComponentSource.d.ts +0 -15
  45. package/dist/babelInjectComponentSource.js +0 -317
  46. package/dist/babelInjectComponentSource.js.map +0 -1
  47. package/dist/sourceAdapter-dPr5CgLi.d.cts +0 -14
  48. package/dist/sourceAdapter-dPr5CgLi.d.ts +0 -14
  49. package/dist/webpack.cjs +0 -68
  50. package/dist/webpack.cjs.map +0 -1
  51. package/dist/webpack.d.cts +0 -2
  52. package/dist/webpack.d.ts +0 -2
  53. package/dist/webpack.js +0 -82
  54. package/dist/webpack.js.map +0 -1
  55. package/dist/webpackRuntimeEntry.cjs +0 -375
  56. package/dist/webpackRuntimeEntry.cjs.map +0 -1
  57. package/dist/webpackRuntimeEntry.d.cts +0 -2
  58. package/dist/webpackRuntimeEntry.d.ts +0 -2
  59. package/dist/webpackRuntimeEntry.js +0 -373
  60. package/dist/webpackRuntimeEntry.js.map +0 -1
@@ -1,4 +1,9 @@
1
- import { a as SourceInjectionOptions, S as SourceAdapterDescriptor } from './sourceAdapter-dPr5CgLi.cjs';
1
+ import { T as TransformOptions } from './transform-CXh-m5Ez.cjs';
2
+
3
+ /**
4
+ * esbuild Plugin for react-code-locator
5
+ * Uses acorn-based transform (zero-dependency)
6
+ */
2
7
 
3
8
  type EsbuildOnLoadResult = {
4
9
  contents: string;
@@ -15,11 +20,38 @@ type EsbuildPlugin = {
15
20
  name: string;
16
21
  setup: (build: EsbuildPluginBuild) => void;
17
22
  };
18
- type EsbuildSourceAdapterConfig = {
23
+ interface EsbuildSourceAdapterConfig {
19
24
  plugins: EsbuildPlugin[];
25
+ }
26
+ interface EsbuildSourceAdapterOptions extends Omit<TransformOptions, 'filename'> {
27
+ projectRoot?: string;
28
+ injectComponentSource?: boolean;
29
+ injectJsxSource?: boolean;
30
+ }
31
+ declare function esbuildSourceTransformPlugin(options?: EsbuildSourceAdapterOptions): EsbuildPlugin;
32
+ declare function createEsbuildSourceAdapter(options?: EsbuildSourceAdapterOptions): {
33
+ kind: "esbuild";
34
+ name: string;
35
+ options: {
36
+ projectRoot: string;
37
+ injectComponentSource: boolean;
38
+ injectJsxSource: boolean;
39
+ };
40
+ config: {
41
+ plugins: EsbuildPlugin[];
42
+ };
43
+ };
44
+ declare const esbuildSourceAdapter: {
45
+ kind: "esbuild";
46
+ name: string;
47
+ options: {
48
+ projectRoot: string;
49
+ injectComponentSource: boolean;
50
+ injectJsxSource: boolean;
51
+ };
52
+ config: {
53
+ plugins: EsbuildPlugin[];
54
+ };
20
55
  };
21
- declare function esbuildSourceTransformPlugin(options?: SourceInjectionOptions): EsbuildPlugin;
22
- declare function createEsbuildSourceAdapter(options?: SourceInjectionOptions): SourceAdapterDescriptor<EsbuildSourceAdapterConfig, SourceInjectionOptions>;
23
- declare const esbuildSourceAdapter: SourceAdapterDescriptor<EsbuildSourceAdapterConfig, SourceInjectionOptions>;
24
56
 
25
- export { type EsbuildPlugin, type EsbuildSourceAdapterConfig, createEsbuildSourceAdapter, esbuildSourceAdapter, esbuildSourceTransformPlugin };
57
+ export { type EsbuildPlugin, type EsbuildSourceAdapterConfig, type EsbuildSourceAdapterOptions, createEsbuildSourceAdapter, esbuildSourceAdapter, esbuildSourceTransformPlugin };
package/dist/esbuild.d.ts CHANGED
@@ -1,4 +1,9 @@
1
- import { a as SourceInjectionOptions, S as SourceAdapterDescriptor } from './sourceAdapter-dPr5CgLi.js';
1
+ import { T as TransformOptions } from './transform-CXh-m5Ez.js';
2
+
3
+ /**
4
+ * esbuild Plugin for react-code-locator
5
+ * Uses acorn-based transform (zero-dependency)
6
+ */
2
7
 
3
8
  type EsbuildOnLoadResult = {
4
9
  contents: string;
@@ -15,11 +20,38 @@ type EsbuildPlugin = {
15
20
  name: string;
16
21
  setup: (build: EsbuildPluginBuild) => void;
17
22
  };
18
- type EsbuildSourceAdapterConfig = {
23
+ interface EsbuildSourceAdapterConfig {
19
24
  plugins: EsbuildPlugin[];
25
+ }
26
+ interface EsbuildSourceAdapterOptions extends Omit<TransformOptions, 'filename'> {
27
+ projectRoot?: string;
28
+ injectComponentSource?: boolean;
29
+ injectJsxSource?: boolean;
30
+ }
31
+ declare function esbuildSourceTransformPlugin(options?: EsbuildSourceAdapterOptions): EsbuildPlugin;
32
+ declare function createEsbuildSourceAdapter(options?: EsbuildSourceAdapterOptions): {
33
+ kind: "esbuild";
34
+ name: string;
35
+ options: {
36
+ projectRoot: string;
37
+ injectComponentSource: boolean;
38
+ injectJsxSource: boolean;
39
+ };
40
+ config: {
41
+ plugins: EsbuildPlugin[];
42
+ };
43
+ };
44
+ declare const esbuildSourceAdapter: {
45
+ kind: "esbuild";
46
+ name: string;
47
+ options: {
48
+ projectRoot: string;
49
+ injectComponentSource: boolean;
50
+ injectJsxSource: boolean;
51
+ };
52
+ config: {
53
+ plugins: EsbuildPlugin[];
54
+ };
20
55
  };
21
- declare function esbuildSourceTransformPlugin(options?: SourceInjectionOptions): EsbuildPlugin;
22
- declare function createEsbuildSourceAdapter(options?: SourceInjectionOptions): SourceAdapterDescriptor<EsbuildSourceAdapterConfig, SourceInjectionOptions>;
23
- declare const esbuildSourceAdapter: SourceAdapterDescriptor<EsbuildSourceAdapterConfig, SourceInjectionOptions>;
24
56
 
25
- export { type EsbuildPlugin, type EsbuildSourceAdapterConfig, createEsbuildSourceAdapter, esbuildSourceAdapter, esbuildSourceTransformPlugin };
57
+ export { type EsbuildPlugin, type EsbuildSourceAdapterConfig, type EsbuildSourceAdapterOptions, createEsbuildSourceAdapter, esbuildSourceAdapter, esbuildSourceTransformPlugin };