@webstudio-is/react-sdk 0.134.0 → 0.135.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
CHANGED
|
@@ -649,6 +649,7 @@ import { StyleValue } from "@webstudio-is/css-engine";
|
|
|
649
649
|
import jsep from "jsep";
|
|
650
650
|
import jsepAssignment from "@jsep-plugin/assignment";
|
|
651
651
|
import jsepObject from "@jsep-plugin/object";
|
|
652
|
+
jsep.literals["undefined"] = "undefined";
|
|
652
653
|
jsep.plugins.register(jsepAssignment);
|
|
653
654
|
jsep.plugins.register(jsepObject);
|
|
654
655
|
var generateCode = (node, failOnForbidden, options) => {
|
|
@@ -1191,7 +1192,8 @@ var componentCategories = [
|
|
|
1191
1192
|
"media",
|
|
1192
1193
|
"forms",
|
|
1193
1194
|
"radix",
|
|
1194
|
-
"hidden"
|
|
1195
|
+
"hidden",
|
|
1196
|
+
"utilities"
|
|
1195
1197
|
];
|
|
1196
1198
|
var stateCategories = ["states", "component-states"];
|
|
1197
1199
|
var ComponentState = z3.object({
|
|
@@ -688,7 +688,7 @@ declare const WsComponentPropsMeta: z.ZodObject<{
|
|
|
688
688
|
initialProps?: string[] | undefined;
|
|
689
689
|
}>;
|
|
690
690
|
export type WsComponentPropsMeta = z.infer<typeof WsComponentPropsMeta>;
|
|
691
|
-
export declare const componentCategories: readonly ["general", "text", "data", "media", "forms", "radix", "hidden"];
|
|
691
|
+
export declare const componentCategories: readonly ["general", "text", "data", "media", "forms", "radix", "hidden", "utilities"];
|
|
692
692
|
export declare const stateCategories: readonly ["states", "component-states"];
|
|
693
693
|
export declare const ComponentState: z.ZodObject<{
|
|
694
694
|
category: z.ZodOptional<z.ZodEnum<["states", "component-states"]>>;
|
|
@@ -706,7 +706,7 @@ export declare const ComponentState: z.ZodObject<{
|
|
|
706
706
|
export type ComponentState = z.infer<typeof ComponentState>;
|
|
707
707
|
export declare const defaultStates: ComponentState[];
|
|
708
708
|
export declare const WsComponentMeta: z.ZodObject<{
|
|
709
|
-
category: z.ZodOptional<z.ZodEnum<["general", "text", "data", "media", "forms", "radix", "hidden"]>>;
|
|
709
|
+
category: z.ZodOptional<z.ZodEnum<["general", "text", "data", "media", "forms", "radix", "hidden", "utilities"]>>;
|
|
710
710
|
type: z.ZodEnum<["container", "control", "embed", "rich-text-child"]>;
|
|
711
711
|
requiredAncestors: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
712
712
|
invalidAncestors: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -2035,7 +2035,7 @@ export declare const WsComponentMeta: z.ZodObject<{
|
|
|
2035
2035
|
}, "strip", z.ZodTypeAny, {
|
|
2036
2036
|
type: "embed" | "control" | "container" | "rich-text-child";
|
|
2037
2037
|
icon: string;
|
|
2038
|
-
category?: "data" | "text" | "hidden" | "media" | "general" | "forms" | "radix" | undefined;
|
|
2038
|
+
category?: "data" | "text" | "hidden" | "media" | "general" | "forms" | "radix" | "utilities" | undefined;
|
|
2039
2039
|
requiredAncestors?: string[] | undefined;
|
|
2040
2040
|
invalidAncestors?: string[] | undefined;
|
|
2041
2041
|
indexWithinAncestor?: string | undefined;
|
|
@@ -2488,7 +2488,7 @@ export declare const WsComponentMeta: z.ZodObject<{
|
|
|
2488
2488
|
}, {
|
|
2489
2489
|
type: "embed" | "control" | "container" | "rich-text-child";
|
|
2490
2490
|
icon: string;
|
|
2491
|
-
category?: "data" | "text" | "hidden" | "media" | "general" | "forms" | "radix" | undefined;
|
|
2491
|
+
category?: "data" | "text" | "hidden" | "media" | "general" | "forms" | "radix" | "utilities" | undefined;
|
|
2492
2492
|
requiredAncestors?: string[] | undefined;
|
|
2493
2493
|
invalidAncestors?: string[] | undefined;
|
|
2494
2494
|
indexWithinAncestor?: string | undefined;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { componentAttribute, idAttribute } from "../props";
|
|
3
|
-
export type AnyComponent = React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> &
|
|
3
|
+
export type AnyComponent = React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & WebstudioComponentSystemProps & React.RefAttributes<HTMLElement>>;
|
|
4
|
+
export type Components = Map<string, AnyComponent>;
|
|
5
|
+
export type WebstudioComponentSystemProps = {
|
|
4
6
|
[componentAttribute]: string;
|
|
5
7
|
[idAttribute]: string;
|
|
6
|
-
}
|
|
7
|
-
export type Components = Map<string, AnyComponent>;
|
|
8
|
+
};
|
|
@@ -2250,7 +2250,7 @@ export declare const namespaceMeta: (meta: WsComponentMeta, namespace: string, c
|
|
|
2250
2250
|
value: string;
|
|
2251
2251
|
type: "expression";
|
|
2252
2252
|
} | EmbedTemplateInstance)[] | undefined;
|
|
2253
|
-
category?: "data" | "text" | "hidden" | "media" | "general" | "forms" | "radix" | undefined;
|
|
2253
|
+
category?: "data" | "text" | "hidden" | "media" | "general" | "forms" | "radix" | "utilities" | undefined;
|
|
2254
2254
|
requiredAncestors?: string[] | undefined;
|
|
2255
2255
|
invalidAncestors?: string[] | undefined;
|
|
2256
2256
|
indexWithinAncestor?: string | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webstudio-is/react-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.135.0",
|
|
4
4
|
"description": "Webstudio JavaScript / TypeScript API",
|
|
5
5
|
"author": "Webstudio <github@webstudio.is>",
|
|
6
6
|
"homepage": "https://webstudio.is",
|
|
@@ -33,11 +33,11 @@
|
|
|
33
33
|
"jsep": "^1.3.8",
|
|
34
34
|
"nanoid": "^5.0.1",
|
|
35
35
|
"title-case": "^4.1.0",
|
|
36
|
-
"@webstudio-is/
|
|
37
|
-
"@webstudio-is/
|
|
38
|
-
"@webstudio-is/
|
|
39
|
-
"@webstudio-is/
|
|
40
|
-
"@webstudio-is/
|
|
36
|
+
"@webstudio-is/fonts": "0.135.0",
|
|
37
|
+
"@webstudio-is/css-engine": "0.135.0",
|
|
38
|
+
"@webstudio-is/icons": "^0.135.0",
|
|
39
|
+
"@webstudio-is/image": "0.135.0",
|
|
40
|
+
"@webstudio-is/sdk": "0.135.0"
|
|
41
41
|
},
|
|
42
42
|
"exports": {
|
|
43
43
|
".": {
|