@webstudio-is/react-sdk 0.267.0 → 0.269.0
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 +1 -1
- package/lib/runtime.js +4 -0
- package/lib/types/context.d.ts +1 -0
- package/package.json +8 -8
- package/placeholder.d.ts +7 -0
package/lib/index.js
CHANGED
package/lib/runtime.js
CHANGED
|
@@ -23,6 +23,9 @@ var useResource = (name) => {
|
|
|
23
23
|
);
|
|
24
24
|
return resourceMemozied;
|
|
25
25
|
};
|
|
26
|
+
var renderText = (value) => {
|
|
27
|
+
return typeof value === "string" || typeof value === "number" ? value : "";
|
|
28
|
+
};
|
|
26
29
|
|
|
27
30
|
// src/hook.ts
|
|
28
31
|
var getClosestInstance = (instancePath, currentInstance, closestComponent) => {
|
|
@@ -216,6 +219,7 @@ export {
|
|
|
216
219
|
PageSettingsTitle,
|
|
217
220
|
ReactSdkContext,
|
|
218
221
|
getClosestInstance,
|
|
222
|
+
renderText,
|
|
219
223
|
useResource,
|
|
220
224
|
useVariableState,
|
|
221
225
|
xmlNodeTagSuffix
|
package/lib/types/context.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webstudio-is/react-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.269.0",
|
|
4
4
|
"description": "Webstudio JavaScript / TypeScript API",
|
|
5
5
|
"author": "Webstudio <github@webstudio.is>",
|
|
6
6
|
"homepage": "https://webstudio.is",
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
"type-fest": "^4.37.0",
|
|
15
15
|
"vitest": "^3.1.2",
|
|
16
16
|
"zod": "^3.24.2",
|
|
17
|
-
"@webstudio-is/
|
|
18
|
-
"@webstudio-is/
|
|
17
|
+
"@webstudio-is/template": "0.269.0",
|
|
18
|
+
"@webstudio-is/tsconfig": "1.0.7"
|
|
19
19
|
},
|
|
20
20
|
"peerDependencies": {
|
|
21
21
|
"react": "18.3.0-canary-14898b6a9-20240318",
|
|
@@ -26,11 +26,11 @@
|
|
|
26
26
|
"change-case": "^5.4.4",
|
|
27
27
|
"html-tags": "^4.0.0",
|
|
28
28
|
"nanoid": "^5.1.5",
|
|
29
|
-
"@webstudio-is/fonts": "0.
|
|
30
|
-
"@webstudio-is/
|
|
31
|
-
"@webstudio-is/
|
|
32
|
-
"@webstudio-is/
|
|
33
|
-
"@webstudio-is/
|
|
29
|
+
"@webstudio-is/fonts": "0.269.0",
|
|
30
|
+
"@webstudio-is/css-engine": "0.269.0",
|
|
31
|
+
"@webstudio-is/image": "0.269.0",
|
|
32
|
+
"@webstudio-is/sdk": "0.269.0",
|
|
33
|
+
"@webstudio-is/icons": "^0.269.0"
|
|
34
34
|
},
|
|
35
35
|
"exports": {
|
|
36
36
|
".": {
|
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;
|
|
@@ -51,6 +53,11 @@ declare module "__SERVER__" {
|
|
|
51
53
|
export const contactEmail: undefined | string;
|
|
52
54
|
}
|
|
53
55
|
|
|
56
|
+
declare module "__AUTH__" {
|
|
57
|
+
import type { WsAuthRoute } from "@webstudio-is/wsauth";
|
|
58
|
+
export const authRoutes: WsAuthRoute[];
|
|
59
|
+
}
|
|
60
|
+
|
|
54
61
|
declare module "__SITEMAP__" {
|
|
55
62
|
export const sitemap: Array<{
|
|
56
63
|
path: string;
|