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.
- package/README.md +54 -279
- package/dist/esbuild.cjs +7025 -295
- package/dist/esbuild.cjs.map +1 -1
- package/dist/esbuild.d.cts +38 -6
- package/dist/esbuild.d.ts +38 -6
- package/dist/esbuild.js +7025 -295
- package/dist/esbuild.js.map +1 -1
- package/dist/index.cjs +7132 -16
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +7126 -15
- package/dist/index.js.map +1 -1
- package/dist/swc.cjs +7020 -293
- package/dist/swc.cjs.map +1 -1
- package/dist/swc.d.cts +43 -19
- package/dist/swc.d.ts +43 -19
- package/dist/swc.js +7020 -293
- package/dist/swc.js.map +1 -1
- package/dist/transform-CXh-m5Ez.d.cts +12 -0
- package/dist/transform-CXh-m5Ez.d.ts +12 -0
- package/dist/unplugin.cjs +6850 -8
- package/dist/unplugin.cjs.map +1 -1
- package/dist/unplugin.d.cts +4 -13
- package/dist/unplugin.d.ts +4 -13
- package/dist/unplugin.js +6848 -6
- package/dist/unplugin.js.map +1 -1
- package/dist/vite.cjs +7029 -304
- package/dist/vite.cjs.map +1 -1
- package/dist/vite.d.cts +39 -14
- package/dist/vite.d.ts +39 -14
- package/dist/vite.js +7029 -303
- package/dist/vite.js.map +1 -1
- package/package.json +5 -51
- package/dist/babel.cjs +0 -370
- package/dist/babel.cjs.map +0 -1
- package/dist/babel.d.cts +0 -13
- package/dist/babel.d.ts +0 -13
- package/dist/babel.js +0 -341
- package/dist/babel.js.map +0 -1
- package/dist/babelInjectComponentSource.cjs +0 -342
- package/dist/babelInjectComponentSource.cjs.map +0 -1
- package/dist/babelInjectComponentSource.d.cts +0 -15
- package/dist/babelInjectComponentSource.d.ts +0 -15
- package/dist/babelInjectComponentSource.js +0 -317
- package/dist/babelInjectComponentSource.js.map +0 -1
- package/dist/sourceAdapter-dPr5CgLi.d.cts +0 -14
- package/dist/sourceAdapter-dPr5CgLi.d.ts +0 -14
- package/dist/webpack.cjs +0 -68
- package/dist/webpack.cjs.map +0 -1
- package/dist/webpack.d.cts +0 -2
- package/dist/webpack.d.ts +0 -2
- package/dist/webpack.js +0 -82
- package/dist/webpack.js.map +0 -1
- package/dist/webpackRuntimeEntry.cjs +0 -375
- package/dist/webpackRuntimeEntry.cjs.map +0 -1
- package/dist/webpackRuntimeEntry.d.cts +0 -2
- package/dist/webpackRuntimeEntry.d.ts +0 -2
- package/dist/webpackRuntimeEntry.js +0 -373
- package/dist/webpackRuntimeEntry.js.map +0 -1
package/dist/swc.d.cts
CHANGED
|
@@ -1,29 +1,53 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { T as TransformOptions } from './transform-CXh-m5Ez.cjs';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
/**
|
|
4
|
+
* SWC Integration for react-code-locator
|
|
5
|
+
* Uses acorn-based transform (zero-dependency)
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
interface SwcSourceTransformOptions extends Omit<TransformOptions, 'filename'> {
|
|
5
9
|
sourceMaps?: boolean;
|
|
6
|
-
}
|
|
7
|
-
type SwcSourceTransform = (code: string, options: SwcSourceTransformOptions
|
|
10
|
+
}
|
|
11
|
+
type SwcSourceTransform = (code: string, options: SwcSourceTransformOptions & {
|
|
12
|
+
filename: string;
|
|
13
|
+
}) => Promise<{
|
|
8
14
|
code: string;
|
|
9
15
|
map: unknown;
|
|
10
16
|
}>;
|
|
11
|
-
|
|
17
|
+
interface SwcSourceAdapterConfig {
|
|
12
18
|
transform: SwcSourceTransform;
|
|
13
|
-
}
|
|
14
|
-
declare function transformSourceWithSwcLocator(code: string, options: SwcSourceTransformOptions
|
|
19
|
+
}
|
|
20
|
+
declare function transformSourceWithSwcLocator(code: string, options: SwcSourceTransformOptions & {
|
|
21
|
+
filename: string;
|
|
22
|
+
}): Promise<{
|
|
15
23
|
code: string;
|
|
16
|
-
map:
|
|
17
|
-
version: number;
|
|
18
|
-
sources: string[];
|
|
19
|
-
names: string[];
|
|
20
|
-
sourceRoot?: string | undefined;
|
|
21
|
-
sourcesContent?: string[] | undefined;
|
|
22
|
-
mappings: string;
|
|
23
|
-
file: string;
|
|
24
|
-
} | null;
|
|
24
|
+
map: any;
|
|
25
25
|
}>;
|
|
26
|
-
declare function createSwcSourceAdapter(options?:
|
|
27
|
-
|
|
26
|
+
declare function createSwcSourceAdapter(options?: SwcSourceTransformOptions): {
|
|
27
|
+
kind: "swc";
|
|
28
|
+
name: string;
|
|
29
|
+
options: {
|
|
30
|
+
sourceMaps?: boolean;
|
|
31
|
+
projectRoot: string;
|
|
32
|
+
injectJsxSource: boolean;
|
|
33
|
+
injectComponentSource: boolean;
|
|
34
|
+
};
|
|
35
|
+
config: {
|
|
36
|
+
transform: SwcSourceTransform;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
declare const swcSourceAdapter: {
|
|
40
|
+
kind: "swc";
|
|
41
|
+
name: string;
|
|
42
|
+
options: {
|
|
43
|
+
sourceMaps?: boolean;
|
|
44
|
+
projectRoot: string;
|
|
45
|
+
injectJsxSource: boolean;
|
|
46
|
+
injectComponentSource: boolean;
|
|
47
|
+
};
|
|
48
|
+
config: {
|
|
49
|
+
transform: SwcSourceTransform;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
28
52
|
|
|
29
53
|
export { type SwcSourceAdapterConfig, type SwcSourceTransform, type SwcSourceTransformOptions, createSwcSourceAdapter, swcSourceAdapter, transformSourceWithSwcLocator };
|
package/dist/swc.d.ts
CHANGED
|
@@ -1,29 +1,53 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { T as TransformOptions } from './transform-CXh-m5Ez.js';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
/**
|
|
4
|
+
* SWC Integration for react-code-locator
|
|
5
|
+
* Uses acorn-based transform (zero-dependency)
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
interface SwcSourceTransformOptions extends Omit<TransformOptions, 'filename'> {
|
|
5
9
|
sourceMaps?: boolean;
|
|
6
|
-
}
|
|
7
|
-
type SwcSourceTransform = (code: string, options: SwcSourceTransformOptions
|
|
10
|
+
}
|
|
11
|
+
type SwcSourceTransform = (code: string, options: SwcSourceTransformOptions & {
|
|
12
|
+
filename: string;
|
|
13
|
+
}) => Promise<{
|
|
8
14
|
code: string;
|
|
9
15
|
map: unknown;
|
|
10
16
|
}>;
|
|
11
|
-
|
|
17
|
+
interface SwcSourceAdapterConfig {
|
|
12
18
|
transform: SwcSourceTransform;
|
|
13
|
-
}
|
|
14
|
-
declare function transformSourceWithSwcLocator(code: string, options: SwcSourceTransformOptions
|
|
19
|
+
}
|
|
20
|
+
declare function transformSourceWithSwcLocator(code: string, options: SwcSourceTransformOptions & {
|
|
21
|
+
filename: string;
|
|
22
|
+
}): Promise<{
|
|
15
23
|
code: string;
|
|
16
|
-
map:
|
|
17
|
-
version: number;
|
|
18
|
-
sources: string[];
|
|
19
|
-
names: string[];
|
|
20
|
-
sourceRoot?: string | undefined;
|
|
21
|
-
sourcesContent?: string[] | undefined;
|
|
22
|
-
mappings: string;
|
|
23
|
-
file: string;
|
|
24
|
-
} | null;
|
|
24
|
+
map: any;
|
|
25
25
|
}>;
|
|
26
|
-
declare function createSwcSourceAdapter(options?:
|
|
27
|
-
|
|
26
|
+
declare function createSwcSourceAdapter(options?: SwcSourceTransformOptions): {
|
|
27
|
+
kind: "swc";
|
|
28
|
+
name: string;
|
|
29
|
+
options: {
|
|
30
|
+
sourceMaps?: boolean;
|
|
31
|
+
projectRoot: string;
|
|
32
|
+
injectJsxSource: boolean;
|
|
33
|
+
injectComponentSource: boolean;
|
|
34
|
+
};
|
|
35
|
+
config: {
|
|
36
|
+
transform: SwcSourceTransform;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
declare const swcSourceAdapter: {
|
|
40
|
+
kind: "swc";
|
|
41
|
+
name: string;
|
|
42
|
+
options: {
|
|
43
|
+
sourceMaps?: boolean;
|
|
44
|
+
projectRoot: string;
|
|
45
|
+
injectJsxSource: boolean;
|
|
46
|
+
injectComponentSource: boolean;
|
|
47
|
+
};
|
|
48
|
+
config: {
|
|
49
|
+
transform: SwcSourceTransform;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
28
52
|
|
|
29
53
|
export { type SwcSourceAdapterConfig, type SwcSourceTransform, type SwcSourceTransformOptions, createSwcSourceAdapter, swcSourceAdapter, transformSourceWithSwcLocator };
|