@webstudio-is/sdk-components-react 0.191.5 → 0.192.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/button.ws.js CHANGED
@@ -4,10 +4,9 @@ import { button as o } from "@webstudio-is/sdk/normalize.css";
4
4
  import { props as n } from "./__generated__/button.props.js";
5
5
  const a = {
6
6
  button: o
7
- }, c = {
7
+ }, p = {
8
8
  category: "forms",
9
9
  type: "container",
10
- invalidAncestors: ["Button", "Link"],
11
10
  constraints: {
12
11
  relation: "ancestor",
13
12
  component: { $nin: ["Button", "Link"] }
@@ -34,11 +33,11 @@ const a = {
34
33
  ]
35
34
  }
36
35
  ]
37
- }, p = {
36
+ }, c = {
38
37
  props: n,
39
38
  initialProps: ["id", "className", "type", "aria-label"]
40
39
  };
41
40
  export {
42
- c as meta,
43
- p as propsMeta
41
+ p as meta,
42
+ c as propsMeta
44
43
  };
@@ -1,8 +1,8 @@
1
1
  import { CheckboxCheckedIcon as e } from "@webstudio-is/icons/svg";
2
2
  import { defaultStates as t } from "@webstudio-is/react-sdk";
3
3
  import { checkbox as o } from "@webstudio-is/sdk/normalize.css";
4
- import { props as n } from "./__generated__/checkbox.props.js";
5
- const r = {
4
+ import { props as r } from "./__generated__/checkbox.props.js";
5
+ const a = {
6
6
  input: [
7
7
  ...o,
8
8
  {
@@ -12,7 +12,6 @@ const r = {
12
12
  ]
13
13
  }, s = {
14
14
  category: "forms",
15
- invalidAncestors: ["Button", "Link"],
16
15
  constraints: {
17
16
  relation: "ancestor",
18
17
  component: { $nin: ["Button", "Link"] }
@@ -20,7 +19,7 @@ const r = {
20
19
  type: "control",
21
20
  description: "Use within a form to allow your users to toggle between checked and not checked. Group checkboxes by matching their “Name” properties. Unlike radios, any number of checkboxes in a group can be checked.",
22
21
  icon: e,
23
- presetStyle: r,
22
+ presetStyle: a,
24
23
  order: 6,
25
24
  states: [
26
25
  ...t,
@@ -50,7 +49,7 @@ const r = {
50
49
  }
51
50
  ]
52
51
  }, p = {
53
- props: n,
52
+ props: r,
54
53
  initialProps: ["id", "className", "name", "value", "required", "checked"]
55
54
  };
56
55
  export {
@@ -30,12 +30,11 @@ const p = {
30
30
  value: { type: "rgb", r: 238, g: 238, b: 238, alpha: 1 }
31
31
  }
32
32
  ]
33
- }, l = {
33
+ }, d = {
34
34
  category: "general",
35
35
  type: "embed",
36
36
  description: "Use this component when you want to display code as text on the page.",
37
37
  icon: e,
38
- invalidAncestors: ["CodeText"],
39
38
  constraints: {
40
39
  relation: "ancestor",
41
40
  component: { $neq: "CodeText" }
@@ -55,6 +54,6 @@ const p = {
55
54
  initialProps: ["id", "className", "lang", "code"]
56
55
  };
57
56
  export {
58
- l as meta,
57
+ d as meta,
59
58
  s as propsMeta
60
59
  };
package/lib/form.ws.js CHANGED
@@ -11,7 +11,6 @@ const n = {
11
11
  category: "forms",
12
12
  type: "container",
13
13
  label: "Form",
14
- invalidAncestors: ["Form", "Button", "Link"],
15
14
  constraints: {
16
15
  relation: "ancestor",
17
16
  component: { $nin: ["Form", "Button", "Link"] }
package/lib/heading.ws.js CHANGED
@@ -1,26 +1,25 @@
1
- import { HeadingIcon as e } from "@webstudio-is/icons/svg";
2
- import { defaultStates as t } from "@webstudio-is/react-sdk";
1
+ import { HeadingIcon as t } from "@webstudio-is/icons/svg";
2
+ import { defaultStates as e } from "@webstudio-is/react-sdk";
3
3
  import { h1 as n, h2 as o, h3 as a, h4 as r, h5 as i, h6 as s } from "@webstudio-is/sdk/normalize.css";
4
- import { props as c } from "./__generated__/heading.props.js";
5
- const p = {
4
+ import { props as p } from "./__generated__/heading.props.js";
5
+ const c = {
6
6
  h1: n,
7
7
  h2: o,
8
8
  h3: a,
9
9
  h4: r,
10
10
  h5: i,
11
11
  h6: s
12
- }, m = {
12
+ }, l = {
13
13
  category: "text",
14
14
  type: "container",
15
15
  description: "Use HTML headings to structure and organize content. Use the Tag property in settings to change the heading level (h1-h6).",
16
- icon: e,
17
- invalidAncestors: ["Heading"],
16
+ icon: t,
18
17
  constraints: {
19
18
  relation: "ancestor",
20
19
  component: { $neq: "Heading" }
21
20
  },
22
- states: t,
23
- presetStyle: p,
21
+ states: e,
22
+ presetStyle: c,
24
23
  order: 1,
25
24
  template: [
26
25
  {
@@ -36,10 +35,10 @@ const p = {
36
35
  }
37
36
  ]
38
37
  }, y = {
39
- props: c,
38
+ props: p,
40
39
  initialProps: ["id", "className", "tag"]
41
40
  };
42
41
  export {
43
- m as meta,
42
+ l as meta,
44
43
  y as propsMeta
45
44
  };
package/lib/input.ws.js CHANGED
@@ -12,7 +12,6 @@ const r = {
12
12
  ]
13
13
  }, p = {
14
14
  category: "forms",
15
- invalidAncestors: ["Button", "Link"],
16
15
  constraints: {
17
16
  relation: "ancestor",
18
17
  component: { $nin: ["Button", "Link"] }
package/lib/label.ws.js CHANGED
@@ -7,9 +7,8 @@ const l = {
7
7
  ...r,
8
8
  { property: "display", value: { type: "keyword", value: "block" } }
9
9
  ]
10
- }, i = {
10
+ }, m = {
11
11
  category: "forms",
12
- invalidAncestors: ["Button", "Label"],
13
12
  constraints: {
14
13
  relation: "ancestor",
15
14
  component: { $nin: ["Button", "Link"] }
@@ -27,7 +26,7 @@ const l = {
27
26
  children: [{ type: "text", value: "Form Label", placeholder: !0 }]
28
27
  }
29
28
  ]
30
- }, m = {
29
+ }, i = {
31
30
  props: {
32
31
  ...t,
33
32
  htmlFor: {
@@ -38,6 +37,6 @@ const l = {
38
37
  initialProps: ["id", "className", "htmlFor"]
39
38
  };
40
39
  export {
41
- i as meta,
42
- m as propsMeta
40
+ m as meta,
41
+ i as propsMeta
43
42
  };
package/lib/link.ws.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import { LinkIcon as e } from "@webstudio-is/icons/svg";
2
2
  import { defaultStates as t } from "@webstudio-is/react-sdk";
3
- import { a as o } from "@webstudio-is/sdk/normalize.css";
4
- import { props as r } from "./__generated__/link.props.js";
3
+ import { a as r } from "@webstudio-is/sdk/normalize.css";
4
+ import { props as o } from "./__generated__/link.props.js";
5
5
  const n = {
6
6
  a: [
7
- ...o,
7
+ ...r,
8
8
  {
9
9
  property: "minHeight",
10
10
  value: { type: "unit", unit: "em", value: 1 }
@@ -19,7 +19,6 @@ const n = {
19
19
  type: "container",
20
20
  description: "Use a link to send your users to another page, section, or resource. Configure links in the Settings panel.",
21
21
  icon: e,
22
- invalidAncestors: ["Link", "Button"],
23
22
  constraints: {
24
23
  relation: "ancestor",
25
24
  component: { $nin: ["Button", "Link"] }
@@ -53,7 +52,7 @@ const n = {
53
52
  ]
54
53
  }, c = {
55
54
  props: {
56
- ...r,
55
+ ...o,
57
56
  href: {
58
57
  type: "string",
59
58
  control: "url",
@@ -2,12 +2,11 @@ import { ListItemIcon as t } from "@webstudio-is/icons/svg";
2
2
  import { defaultStates as e } from "@webstudio-is/react-sdk";
3
3
  import { li as o } from "@webstudio-is/sdk/normalize.css";
4
4
  import { props as i } from "./__generated__/list-item.props.js";
5
- const r = {
5
+ const n = {
6
6
  li: o
7
- }, c = {
7
+ }, m = {
8
8
  category: "general",
9
9
  type: "container",
10
- requiredAncestors: ["List"],
11
10
  constraints: {
12
11
  relation: "parent",
13
12
  component: { $eq: "List" }
@@ -15,7 +14,7 @@ const r = {
15
14
  description: "Adds a new item to an existing list.",
16
15
  icon: t,
17
16
  states: e,
18
- presetStyle: r,
17
+ presetStyle: n,
19
18
  order: 4,
20
19
  template: [
21
20
  {
@@ -30,11 +29,11 @@ const r = {
30
29
  ]
31
30
  }
32
31
  ]
33
- }, m = {
32
+ }, c = {
34
33
  props: i,
35
34
  initialProps: ["id", "className"]
36
35
  };
37
36
  export {
38
- c as meta,
39
- m as propsMeta
37
+ m as meta,
38
+ c as propsMeta
40
39
  };
package/lib/option.ws.js CHANGED
@@ -17,8 +17,6 @@ const o = {
17
17
  ]
18
18
  }, c = {
19
19
  category: "hidden",
20
- // @todo: requiredAncestors should be ["Select", "Optgroup", "Datalist"] but that gives unreadable error when adding Select onto Canvas
21
- requiredAncestors: ["Select"],
22
20
  constraints: {
23
21
  relation: "parent",
24
22
  component: { $eq: "Select" }
@@ -1,15 +1,14 @@
1
1
  import { TextAlignLeftIcon as t } from "@webstudio-is/icons/svg";
2
2
  import { defaultStates as e } from "@webstudio-is/react-sdk";
3
- import { p as r } from "@webstudio-is/sdk/normalize.css";
4
- import { props as o } from "./__generated__/paragraph.props.js";
3
+ import { p as o } from "@webstudio-is/sdk/normalize.css";
4
+ import { props as r } from "./__generated__/paragraph.props.js";
5
5
  const a = {
6
- p: r
6
+ p: o
7
7
  }, s = {
8
8
  category: "text",
9
9
  type: "container",
10
10
  description: "A container for multi-line text.",
11
11
  icon: t,
12
- invalidAncestors: ["Paragraph"],
13
12
  constraints: {
14
13
  relation: "ancestor",
15
14
  component: { $neq: "Paragraph" }
@@ -30,11 +29,11 @@ const a = {
30
29
  ]
31
30
  }
32
31
  ]
33
- }, l = {
34
- props: o,
32
+ }, m = {
33
+ props: r,
35
34
  initialProps: ["id", "className"]
36
35
  };
37
36
  export {
38
37
  s as meta,
39
- l as propsMeta
38
+ m as propsMeta
40
39
  };
@@ -1,8 +1,8 @@
1
1
  import { RadioCheckedIcon as e } from "@webstudio-is/icons/svg";
2
2
  import { defaultStates as t } from "@webstudio-is/react-sdk";
3
3
  import { radio as o } from "@webstudio-is/sdk/normalize.css";
4
- import { props as i } from "./__generated__/radio-button.props.js";
5
- const a = {
4
+ import { props as a } from "./__generated__/radio-button.props.js";
5
+ const i = {
6
6
  input: [
7
7
  ...o,
8
8
  {
@@ -12,7 +12,6 @@ const a = {
12
12
  ]
13
13
  }, s = {
14
14
  category: "forms",
15
- invalidAncestors: ["Button", "Link"],
16
15
  constraints: {
17
16
  relation: "ancestor",
18
17
  component: { $nin: ["Button", "Link"] }
@@ -21,7 +20,7 @@ const a = {
21
20
  label: "Radio",
22
21
  description: "Use within a form to allow your users to select a single option from a set of mutually exclusive choices. Group multiple radios by matching their “Name” properties.",
23
22
  icon: e,
24
- presetStyle: a,
23
+ presetStyle: i,
25
24
  order: 5,
26
25
  states: [
27
26
  ...t,
@@ -52,7 +51,7 @@ const a = {
52
51
  }
53
52
  ]
54
53
  }, c = {
55
- props: i,
54
+ props: a,
56
55
  initialProps: ["id", "className", "name", "value", "required", "checked"]
57
56
  };
58
57
  export {
package/lib/select.ws.js CHANGED
@@ -12,7 +12,6 @@ const o = {
12
12
  ]
13
13
  }, s = {
14
14
  category: "forms",
15
- invalidAncestors: ["Button", "Link"],
16
15
  constraints: {
17
16
  relation: "ancestor",
18
17
  component: { $nin: ["Button", "Link"] }
@@ -1,10 +1,10 @@
1
1
  import { FormTextAreaIcon as e } from "@webstudio-is/icons/svg";
2
- import { defaultStates as t } from "@webstudio-is/react-sdk";
3
- import { textarea as o } from "@webstudio-is/sdk/normalize.css";
2
+ import { defaultStates as o } from "@webstudio-is/react-sdk";
3
+ import { textarea as t } from "@webstudio-is/sdk/normalize.css";
4
4
  import { props as r } from "./__generated__/textarea.props.js";
5
5
  const l = {
6
6
  textarea: [
7
- ...o,
7
+ ...t,
8
8
  // resize doesn't work well while on canvas
9
9
  { property: "resize", value: { type: "keyword", value: "none" } },
10
10
  {
@@ -20,13 +20,12 @@ const l = {
20
20
  icon: e,
21
21
  presetStyle: l,
22
22
  order: 4,
23
- invalidAncestors: ["Button", "Link"],
24
23
  constraints: {
25
24
  relation: "ancestor",
26
25
  component: { $nin: ["Button", "Link"] }
27
26
  },
28
27
  states: [
29
- ...t,
28
+ ...o,
30
29
  { selector: "::placeholder", label: "Placeholder" },
31
30
  { selector: ":valid", label: "Valid" },
32
31
  { selector: ":invalid", label: "Invalid" },
@@ -4,11 +4,9 @@ import { ButtonElementIcon as e } from "@webstudio-is/icons/svg";
4
4
  import { button as n } from "@webstudio-is/sdk/normalize.css";
5
5
  const r = {
6
6
  button: n
7
- }, m = {
7
+ }, p = {
8
8
  category: "hidden",
9
9
  type: "container",
10
- invalidAncestors: ["Button"],
11
- requiredAncestors: ["Vimeo"],
12
10
  constraints: [
13
11
  {
14
12
  relation: "ancestor",
@@ -23,11 +21,11 @@ const r = {
23
21
  icon: e,
24
22
  presetStyle: r,
25
23
  states: t
26
- }, p = {
24
+ }, c = {
27
25
  props: o,
28
26
  initialProps: ["id", "className"]
29
27
  };
30
28
  export {
31
- m as meta,
32
- p as propsMeta
29
+ p as meta,
30
+ c as propsMeta
33
31
  };
@@ -1,20 +1,19 @@
1
1
  import "@webstudio-is/react-sdk";
2
- import { meta as o, propsOverrides as e, propsMeta as r } from "./image.ws.js";
2
+ import { meta as o, propsOverrides as r, propsMeta as e } from "./image.ws.js";
3
3
  import { props as t } from "./__generated__/vimeo-preview-image.props.js";
4
- const a = {
4
+ const i = {
5
5
  ...o,
6
6
  category: "hidden",
7
7
  label: "Preview Image",
8
- requiredAncestors: ["Vimeo"],
9
8
  constraints: {
10
9
  relation: "ancestor",
11
10
  component: { $eq: "Vimeo" }
12
11
  }
13
12
  }, m = {
14
- props: { ...t, ...e },
15
- initialProps: r.initialProps
13
+ props: { ...t, ...r },
14
+ initialProps: e.initialProps
16
15
  };
17
16
  export {
18
- a as meta,
17
+ i as meta,
19
18
  m as propsMeta
20
19
  };
@@ -2,18 +2,17 @@ import { defaultStates as o } from "@webstudio-is/react-sdk";
2
2
  import { props as t } from "./__generated__/vimeo-spinner.props.js";
3
3
  import { div as e } from "@webstudio-is/sdk/normalize.css";
4
4
  import { BoxIcon as r } from "@webstudio-is/icons/svg";
5
- const i = {
5
+ const n = {
6
6
  div: e
7
7
  }, m = {
8
8
  type: "container",
9
- requiredAncestors: ["Vimeo"],
10
9
  constraints: {
11
10
  relation: "ancestor",
12
11
  component: { $eq: "Vimeo" }
13
12
  },
14
13
  icon: r,
15
14
  states: o,
16
- presetStyle: i,
15
+ presetStyle: n,
17
16
  category: "hidden",
18
17
  label: "Spinner"
19
18
  }, c = {
package/lib/vimeo.ws.js CHANGED
@@ -12,7 +12,6 @@ const n = {
12
12
  icon: e,
13
13
  states: o,
14
14
  presetStyle: n,
15
- invalidAncestors: ["Button", "Heading", "Link"],
16
15
  constraints: {
17
16
  relation: "ancestor",
18
17
  component: { $nin: ["Button", "Link", "Heading"] }
@@ -303,7 +302,7 @@ const n = {
303
302
  ]
304
303
  }
305
304
  ]
306
- }, i = [
305
+ }, u = [
307
306
  "id",
308
307
  "className",
309
308
  "url",
@@ -322,7 +321,7 @@ const n = {
322
321
  "controlsColor"
323
322
  ], d = {
324
323
  props: a,
325
- initialProps: i
324
+ initialProps: u
326
325
  };
327
326
  export {
328
327
  s as meta,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webstudio-is/sdk-components-react",
3
- "version": "0.191.5",
3
+ "version": "0.192.0",
4
4
  "description": "Webstudio default library for react",
5
5
  "author": "Webstudio <github@webstudio.is>",
6
6
  "homepage": "https://webstudio.is",
@@ -42,10 +42,10 @@
42
42
  "@react-aria/utils": "^3.25.3",
43
43
  "colord": "^2.9.3",
44
44
  "micromark": "^4.0.0",
45
- "@webstudio-is/icons": "0.191.5",
46
- "@webstudio-is/image": "0.191.5",
47
- "@webstudio-is/sdk": "0.191.5",
48
- "@webstudio-is/react-sdk": "0.191.5"
45
+ "@webstudio-is/icons": "0.192.0",
46
+ "@webstudio-is/react-sdk": "0.192.0",
47
+ "@webstudio-is/sdk": "0.192.0",
48
+ "@webstudio-is/image": "0.192.0"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@testing-library/react": "^14.2.2",
@@ -54,8 +54,8 @@
54
54
  "react": "18.3.0-canary-14898b6a9-20240318",
55
55
  "react-dom": "18.3.0-canary-14898b6a9-20240318",
56
56
  "vitest": "^2.1.8",
57
- "@webstudio-is/generate-arg-types": "0.0.0",
58
- "@webstudio-is/tsconfig": "1.0.7"
57
+ "@webstudio-is/tsconfig": "1.0.7",
58
+ "@webstudio-is/generate-arg-types": "0.0.0"
59
59
  },
60
60
  "scripts": {
61
61
  "build": "vite build --config ../../vite.sdk-components.config.ts",