@embeddable.com/sdk-react 3.8.2 → 3.8.4
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/lib/dynamicImportHandler.js +14 -0
- package/lib/index.esm.js +1 -0
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/plugin.d.ts +21 -0
- package/lib/proxyHandler.d.ts +4 -0
- package/lib/utils/modules.d.ts +13 -0
- package/lib/validate/errorFormatter.d.ts +3 -0
- package/lib/validate/schema/componentMetaSchema.d.ts +9 -0
- package/package.json +3 -3
package/lib/plugin.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ModuleInfo } from "rollup";
|
|
2
|
+
declare const _default: ({
|
|
3
|
+
globalKey,
|
|
4
|
+
outputDir,
|
|
5
|
+
fileName,
|
|
6
|
+
componentFileRegex,
|
|
7
|
+
typeFileRegex,
|
|
8
|
+
searchEntry,
|
|
9
|
+
}: {
|
|
10
|
+
globalKey: string;
|
|
11
|
+
outputDir: string;
|
|
12
|
+
fileName: string;
|
|
13
|
+
componentFileRegex: RegExp;
|
|
14
|
+
typeFileRegex: RegExp;
|
|
15
|
+
searchEntry?: string | undefined;
|
|
16
|
+
}) => {
|
|
17
|
+
name: string;
|
|
18
|
+
moduleParsed: (moduleInfo: ModuleInfo) => Promise<void>;
|
|
19
|
+
buildEnd: () => Promise<void>;
|
|
20
|
+
};
|
|
21
|
+
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Check if a file is a React component file
|
|
3
|
+
* @param moduleId - The module ID of the file
|
|
4
|
+
* @param relativeModulePath - The relative path of the file
|
|
5
|
+
* @returns Whether the file is a React component file
|
|
6
|
+
* @example
|
|
7
|
+
* isReactComponentFile("path/to/file.ts", "./component.tsx");
|
|
8
|
+
* // => true
|
|
9
|
+
* */
|
|
10
|
+
export declare const isReactComponentFile: (
|
|
11
|
+
moduleId: string,
|
|
12
|
+
relativeModulePath: string,
|
|
13
|
+
) => boolean;
|
|
@@ -36,6 +36,7 @@ export declare const componentMetaSchema: z.ZodEffects<z.ZodObject<{
|
|
|
36
36
|
}>, z.ZodEnum<["string", "number", "boolean", "time", "timeRange", "granularity", "dataset", "measure", "dimension", "dimensionOrMeasure"]>]>;
|
|
37
37
|
array: z.ZodOptional<z.ZodBoolean>;
|
|
38
38
|
category: z.ZodOptional<z.ZodString>;
|
|
39
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
39
40
|
}, "strict", z.ZodTypeAny, {
|
|
40
41
|
type: "string" | "number" | "boolean" | {
|
|
41
42
|
typeConfig: {
|
|
@@ -50,6 +51,7 @@ export declare const componentMetaSchema: z.ZodEffects<z.ZodObject<{
|
|
|
50
51
|
category?: string | undefined;
|
|
51
52
|
description?: string | undefined;
|
|
52
53
|
defaultValue?: any;
|
|
54
|
+
required?: boolean | undefined;
|
|
53
55
|
}, {
|
|
54
56
|
type: "string" | "number" | "boolean" | {
|
|
55
57
|
typeConfig: {
|
|
@@ -64,6 +66,7 @@ export declare const componentMetaSchema: z.ZodEffects<z.ZodObject<{
|
|
|
64
66
|
category?: string | undefined;
|
|
65
67
|
description?: string | undefined;
|
|
66
68
|
defaultValue?: any;
|
|
69
|
+
required?: boolean | undefined;
|
|
67
70
|
}>, "many">, {
|
|
68
71
|
type: "string" | "number" | "boolean" | {
|
|
69
72
|
typeConfig: {
|
|
@@ -78,6 +81,7 @@ export declare const componentMetaSchema: z.ZodEffects<z.ZodObject<{
|
|
|
78
81
|
category?: string | undefined;
|
|
79
82
|
description?: string | undefined;
|
|
80
83
|
defaultValue?: any;
|
|
84
|
+
required?: boolean | undefined;
|
|
81
85
|
}[], {
|
|
82
86
|
type: "string" | "number" | "boolean" | {
|
|
83
87
|
typeConfig: {
|
|
@@ -92,6 +96,7 @@ export declare const componentMetaSchema: z.ZodEffects<z.ZodObject<{
|
|
|
92
96
|
category?: string | undefined;
|
|
93
97
|
description?: string | undefined;
|
|
94
98
|
defaultValue?: any;
|
|
99
|
+
required?: boolean | undefined;
|
|
95
100
|
}[]>>;
|
|
96
101
|
events: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
97
102
|
name: z.ZodString;
|
|
@@ -261,6 +266,7 @@ export declare const componentMetaSchema: z.ZodEffects<z.ZodObject<{
|
|
|
261
266
|
category?: string | undefined;
|
|
262
267
|
description?: string | undefined;
|
|
263
268
|
defaultValue?: any;
|
|
269
|
+
required?: boolean | undefined;
|
|
264
270
|
}[] | undefined;
|
|
265
271
|
events?: {
|
|
266
272
|
label: string;
|
|
@@ -314,6 +320,7 @@ export declare const componentMetaSchema: z.ZodEffects<z.ZodObject<{
|
|
|
314
320
|
category?: string | undefined;
|
|
315
321
|
description?: string | undefined;
|
|
316
322
|
defaultValue?: any;
|
|
323
|
+
required?: boolean | undefined;
|
|
317
324
|
}[] | undefined;
|
|
318
325
|
events?: {
|
|
319
326
|
label: string;
|
|
@@ -367,6 +374,7 @@ export declare const componentMetaSchema: z.ZodEffects<z.ZodObject<{
|
|
|
367
374
|
category?: string | undefined;
|
|
368
375
|
description?: string | undefined;
|
|
369
376
|
defaultValue?: any;
|
|
377
|
+
required?: boolean | undefined;
|
|
370
378
|
}[] | undefined;
|
|
371
379
|
events?: {
|
|
372
380
|
label: string;
|
|
@@ -420,6 +428,7 @@ export declare const componentMetaSchema: z.ZodEffects<z.ZodObject<{
|
|
|
420
428
|
category?: string | undefined;
|
|
421
429
|
description?: string | undefined;
|
|
422
430
|
defaultValue?: any;
|
|
431
|
+
required?: boolean | undefined;
|
|
423
432
|
}[] | undefined;
|
|
424
433
|
events?: {
|
|
425
434
|
label: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@embeddable.com/sdk-react",
|
|
3
|
-
"version": "3.8.
|
|
3
|
+
"version": "3.8.4",
|
|
4
4
|
"description": "Embeddable SDK React plugin responsible for React components bundling.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"embeddable",
|
|
@@ -28,11 +28,11 @@
|
|
|
28
28
|
"license": "MIT",
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@babel/generator": "^7.23.0",
|
|
31
|
-
"@babel/parser": "^7.
|
|
31
|
+
"@babel/parser": "^7.26.2",
|
|
32
32
|
"@babel/traverse": "^7.24.7",
|
|
33
33
|
"@embeddable.com/sdk-core": "*",
|
|
34
34
|
"@embeddable.com/sdk-utils": "*",
|
|
35
|
-
"@happy-dom/global-registrator": "^
|
|
35
|
+
"@happy-dom/global-registrator": "^15.11.0",
|
|
36
36
|
"@vitejs/plugin-react": "^4.3.2",
|
|
37
37
|
"astring": "^1.8.6",
|
|
38
38
|
"ora": "^8.0.1",
|