@webstudio-is/react-sdk 0.0.0-73cd6ea → 0.0.0-7a19155
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/index.js +261 -257
- package/lib/runtime.js +6 -1
- package/lib/standard-attributes.js +13 -0
- package/lib/types/collection-utils.d.ts +24 -0
- package/lib/types/component-generator.d.ts +24 -4
- package/lib/types/context.d.ts +9 -0
- package/lib/types/index.d.ts +3 -2
- package/lib/types/page-settings-meta.d.ts +2 -2
- package/lib/types/props.d.ts +440 -416
- package/lib/types/standard-attributes.d.ts +1 -0
- package/package.json +20 -14
- package/placeholder.d.ts +21 -3
- package/lib/types/__generated__/standard-attributes.d.ts +0 -2
- package/lib/types/component-generator.test.d.ts +0 -1
- package/lib/types/hook.test.d.ts +0 -1
- package/lib/types/props.test.d.ts +0 -1
- package/lib/types/remix.test.d.ts +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { getInstancePropName, getJsxPropName, reactPropsToStandardAttributes, standardAttributesToReactProps, } from "@webstudio-is/content-engine/jsx-attributes";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webstudio-is/react-sdk",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-7a19155",
|
|
4
4
|
"description": "Webstudio JavaScript / TypeScript API",
|
|
5
5
|
"author": "Webstudio <github@webstudio.is>",
|
|
6
6
|
"homepage": "https://webstudio.is",
|
|
@@ -12,25 +12,26 @@
|
|
|
12
12
|
"react-dom": "18.3.0-canary-14898b6a9-20240318",
|
|
13
13
|
"strip-indent": "^4.0.0",
|
|
14
14
|
"type-fest": "^4.37.0",
|
|
15
|
+
"typescript": "7.0.2",
|
|
15
16
|
"vitest": "^3.1.2",
|
|
16
|
-
"zod": "^
|
|
17
|
-
"@webstudio-is/
|
|
18
|
-
"@webstudio-is/
|
|
17
|
+
"zod": "^4.4.3",
|
|
18
|
+
"@webstudio-is/tsconfig": "1.0.7",
|
|
19
|
+
"@webstudio-is/template": "0.0.0-7a19155"
|
|
19
20
|
},
|
|
20
21
|
"peerDependencies": {
|
|
21
22
|
"react": "18.3.0-canary-14898b6a9-20240318",
|
|
22
23
|
"react-dom": "18.3.0-canary-14898b6a9-20240318",
|
|
23
|
-
"zod": "^
|
|
24
|
+
"zod": "^4.4.3"
|
|
24
25
|
},
|
|
25
26
|
"dependencies": {
|
|
26
27
|
"change-case": "^5.4.4",
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"@webstudio-is/
|
|
30
|
-
"@webstudio-is/
|
|
31
|
-
"@webstudio-is/
|
|
32
|
-
"@webstudio-is/
|
|
33
|
-
"@webstudio-is/sdk": "0.0.0-
|
|
28
|
+
"@webstudio-is/content-engine": "0.0.0-7a19155",
|
|
29
|
+
"@webstudio-is/css-engine": "0.0.0-7a19155",
|
|
30
|
+
"@webstudio-is/fonts": "0.0.0-7a19155",
|
|
31
|
+
"@webstudio-is/icons": "^0.0.0-7a19155",
|
|
32
|
+
"@webstudio-is/expression": "0.0.0-7a19155",
|
|
33
|
+
"@webstudio-is/image": "0.0.0-7a19155",
|
|
34
|
+
"@webstudio-is/sdk": "0.0.0-7a19155"
|
|
34
35
|
},
|
|
35
36
|
"exports": {
|
|
36
37
|
".": {
|
|
@@ -43,6 +44,11 @@
|
|
|
43
44
|
"types": "./lib/types/runtime.d.ts",
|
|
44
45
|
"import": "./lib/runtime.js"
|
|
45
46
|
},
|
|
47
|
+
"./standard-attributes": {
|
|
48
|
+
"webstudio": "./src/standard-attributes.ts",
|
|
49
|
+
"types": "./lib/types/standard-attributes.d.ts",
|
|
50
|
+
"import": "./lib/standard-attributes.js"
|
|
51
|
+
},
|
|
46
52
|
"./placeholder": {
|
|
47
53
|
"types": "./placeholder.d.ts"
|
|
48
54
|
}
|
|
@@ -56,9 +62,9 @@
|
|
|
56
62
|
"private": false,
|
|
57
63
|
"sideEffects": false,
|
|
58
64
|
"scripts": {
|
|
59
|
-
"build": "rm -rf lib && esbuild src/index.ts src/runtime.ts --outdir=lib --bundle --format=esm --packages=external",
|
|
65
|
+
"build": "rm -rf lib && esbuild src/index.ts src/runtime.ts src/standard-attributes.ts --outdir=lib --bundle --format=esm --packages=external",
|
|
60
66
|
"dts": "tsc --project tsconfig.dts.json",
|
|
61
|
-
"typecheck": "tsc",
|
|
67
|
+
"typecheck": "tsc --noEmit",
|
|
62
68
|
"test": "vitest run"
|
|
63
69
|
}
|
|
64
70
|
}
|
package/placeholder.d.ts
CHANGED
|
@@ -10,6 +10,8 @@ declare module "__CLIENT__" {
|
|
|
10
10
|
|
|
11
11
|
export const projectId: string;
|
|
12
12
|
|
|
13
|
+
export const projectDomain: string | undefined;
|
|
14
|
+
|
|
13
15
|
export const lastPublished: string;
|
|
14
16
|
|
|
15
17
|
export const siteName: string;
|
|
@@ -34,10 +36,15 @@ declare module "__CLIENT__" {
|
|
|
34
36
|
|
|
35
37
|
declare module "__SERVER__" {
|
|
36
38
|
import type { PageMeta, System, ResourceRequest } from "@webstudio-is/sdk";
|
|
39
|
+
import type { ResourceRequestGraph } from "@webstudio-is/sdk/runtime";
|
|
37
40
|
|
|
38
|
-
export const getResources: (props: {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
+
export const getResources: (props: {
|
|
42
|
+
system: System;
|
|
43
|
+
resources?: Record<string, any>;
|
|
44
|
+
}) => {
|
|
45
|
+
data: ResourceRequestGraph;
|
|
46
|
+
action: Map<string, { id: string; outputName: string }>;
|
|
47
|
+
contentData?: Map<string, ResourceRequest>;
|
|
41
48
|
};
|
|
42
49
|
|
|
43
50
|
export const getPageMeta: (props: {
|
|
@@ -51,6 +58,11 @@ declare module "__SERVER__" {
|
|
|
51
58
|
export const contactEmail: undefined | string;
|
|
52
59
|
}
|
|
53
60
|
|
|
61
|
+
declare module "__AUTH__" {
|
|
62
|
+
import type { WsAuthRoute } from "@webstudio-is/wsauth";
|
|
63
|
+
export const authRoutes: WsAuthRoute[];
|
|
64
|
+
}
|
|
65
|
+
|
|
54
66
|
declare module "__SITEMAP__" {
|
|
55
67
|
export const sitemap: Array<{
|
|
56
68
|
path: string;
|
|
@@ -58,6 +70,12 @@ declare module "__SITEMAP__" {
|
|
|
58
70
|
}>;
|
|
59
71
|
}
|
|
60
72
|
|
|
73
|
+
declare module "__ASSETS__" {
|
|
74
|
+
import type { RuntimeAsset } from "@webstudio-is/sdk";
|
|
75
|
+
export const assets: Record<string, RuntimeAsset>;
|
|
76
|
+
export const assetUrlsByPath: Record<string, string>;
|
|
77
|
+
}
|
|
78
|
+
|
|
61
79
|
declare module "__REDIRECT__" {
|
|
62
80
|
export const url: string;
|
|
63
81
|
export const status: number;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/lib/types/hook.test.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|