@webstudio-is/react-sdk 0.59.0 → 0.61.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/app/custom-components/shared/remix-link.js +2 -2
- package/lib/app/index.js +0 -1
- package/lib/cjs/app/custom-components/shared/remix-link.js +2 -2
- package/lib/cjs/app/index.js +0 -1
- package/lib/cjs/components/__generated__/blockquote.props.js +5 -0
- package/lib/cjs/components/__generated__/body.props.js +5 -0
- package/lib/cjs/components/__generated__/bold.props.js +5 -0
- package/lib/cjs/components/__generated__/box.props.js +5 -0
- package/lib/cjs/components/__generated__/button.props.js +5 -1
- package/lib/cjs/components/__generated__/code.props.js +5 -0
- package/lib/cjs/components/__generated__/form.props.js +5 -0
- package/lib/cjs/components/__generated__/heading.props.js +5 -0
- package/lib/cjs/components/__generated__/image.props.js +5 -0
- package/lib/cjs/components/__generated__/input.props.js +11 -2
- package/lib/cjs/components/__generated__/italic.props.js +5 -0
- package/lib/cjs/components/__generated__/link-block.props.js +5 -1
- package/lib/cjs/components/__generated__/link.props.js +5 -1
- package/lib/cjs/components/__generated__/list-item.props.js +5 -0
- package/lib/cjs/components/__generated__/list.props.js +5 -0
- package/lib/cjs/components/__generated__/paragraph.props.js +5 -0
- package/lib/cjs/components/__generated__/rich-text-link.props.js +5 -1
- package/lib/cjs/components/__generated__/separator.props.js +5 -0
- package/lib/cjs/components/__generated__/span.props.js +5 -0
- package/lib/cjs/components/__generated__/subscript.props.js +5 -0
- package/lib/cjs/components/__generated__/superscript.props.js +5 -0
- package/lib/cjs/components/__generated__/text-block.props.js +5 -0
- package/lib/cjs/components/blockquote.ws.js +36 -48
- package/lib/cjs/components/body.ws.js +19 -24
- package/lib/cjs/components/button.ws.js +1 -1
- package/lib/cjs/components/code.ws.js +20 -28
- package/lib/cjs/components/component-meta.js +2 -1
- package/lib/cjs/components/form.ws.js +14 -7
- package/lib/cjs/components/heading.ws.js +1 -1
- package/lib/cjs/components/image.ws.js +8 -9
- package/lib/cjs/components/italic.ws.js +5 -5
- package/lib/cjs/components/link-block.ws.js +5 -5
- package/lib/cjs/components/link.js +1 -1
- package/lib/cjs/components/link.ws.js +9 -10
- package/lib/cjs/components/list-item.ws.js +1 -1
- package/lib/cjs/components/list.ws.js +22 -22
- package/lib/cjs/components/paragraph.ws.js +1 -1
- package/lib/cjs/components/separator.ws.js +20 -20
- package/lib/cjs/components/text-block.ws.js +6 -7
- package/lib/cjs/css/css.js +6 -9
- package/lib/cjs/css/normalize.js +166 -185
- package/lib/cjs/css/presets.js +14 -34
- package/lib/cjs/css/style-rules.js +17 -0
- package/lib/cjs/embed-template.js +160 -0
- package/lib/cjs/index.js +1 -0
- package/lib/components/__generated__/blockquote.props.js +5 -0
- package/lib/components/__generated__/body.props.js +5 -0
- package/lib/components/__generated__/bold.props.js +5 -0
- package/lib/components/__generated__/box.props.js +5 -0
- package/lib/components/__generated__/button.props.js +5 -1
- package/lib/components/__generated__/code.props.js +5 -0
- package/lib/components/__generated__/form.props.js +5 -0
- package/lib/components/__generated__/heading.props.js +5 -0
- package/lib/components/__generated__/image.props.js +5 -0
- package/lib/components/__generated__/input.props.js +11 -2
- package/lib/components/__generated__/italic.props.js +5 -0
- package/lib/components/__generated__/link-block.props.js +5 -1
- package/lib/components/__generated__/link.props.js +5 -1
- package/lib/components/__generated__/list-item.props.js +5 -0
- package/lib/components/__generated__/list.props.js +5 -0
- package/lib/components/__generated__/paragraph.props.js +5 -0
- package/lib/components/__generated__/rich-text-link.props.js +5 -1
- package/lib/components/__generated__/separator.props.js +5 -0
- package/lib/components/__generated__/span.props.js +5 -0
- package/lib/components/__generated__/subscript.props.js +5 -0
- package/lib/components/__generated__/superscript.props.js +5 -0
- package/lib/components/__generated__/text-block.props.js +5 -0
- package/lib/components/blockquote.ws.js +36 -48
- package/lib/components/body.ws.js +19 -24
- package/lib/components/button.ws.js +1 -1
- package/lib/components/code.ws.js +20 -28
- package/lib/components/component-meta.js +2 -1
- package/lib/components/form.ws.js +14 -7
- package/lib/components/heading.ws.js +1 -1
- package/lib/components/image.ws.js +8 -9
- package/lib/components/italic.ws.js +5 -5
- package/lib/components/link-block.ws.js +5 -5
- package/lib/components/link.js +1 -1
- package/lib/components/link.ws.js +9 -10
- package/lib/components/list-item.ws.js +1 -1
- package/lib/components/list.ws.js +22 -22
- package/lib/components/paragraph.ws.js +1 -1
- package/lib/components/separator.ws.js +20 -20
- package/lib/components/text-block.ws.js +6 -7
- package/lib/css/css.js +8 -11
- package/lib/css/normalize.js +166 -185
- package/lib/css/presets.js +14 -34
- package/lib/css/style-rules.js +17 -0
- package/lib/embed-template.js +140 -0
- package/lib/index.js +1 -0
- package/lib/types/app/index.d.ts +0 -1
- package/lib/types/components/box.stories.d.ts +2 -2
- package/lib/types/components/component-meta.d.ts +20 -5
- package/lib/types/components/components-utils.d.ts +1 -1
- package/lib/types/css/normalize.d.ts +8786 -2286
- package/lib/types/css/presets.d.ts +2 -38
- package/lib/types/css/style-rules.d.ts +11 -9
- package/lib/types/embed-template.d.ts +1725 -0
- package/lib/types/embed-template.test.d.ts +1 -0
- package/lib/types/index.d.ts +1 -0
- package/package.json +16 -19
- package/src/app/custom-components/shared/remix-link.tsx +2 -2
- package/src/app/index.ts +0 -1
- package/src/components/__generated__/blockquote.props.ts +5 -0
- package/src/components/__generated__/body.props.ts +5 -0
- package/src/components/__generated__/bold.props.ts +5 -0
- package/src/components/__generated__/box.props.ts +5 -0
- package/src/components/__generated__/button.props.ts +5 -1
- package/src/components/__generated__/code.props.ts +5 -0
- package/src/components/__generated__/form.props.ts +5 -0
- package/src/components/__generated__/heading.props.ts +5 -0
- package/src/components/__generated__/image.props.ts +5 -0
- package/src/components/__generated__/input.props.ts +11 -2
- package/src/components/__generated__/italic.props.ts +5 -0
- package/src/components/__generated__/link-block.props.ts +5 -1
- package/src/components/__generated__/link.props.ts +5 -1
- package/src/components/__generated__/list-item.props.ts +5 -0
- package/src/components/__generated__/list.props.ts +5 -0
- package/src/components/__generated__/paragraph.props.ts +5 -0
- package/src/components/__generated__/rich-text-link.props.ts +5 -1
- package/src/components/__generated__/separator.props.ts +5 -0
- package/src/components/__generated__/span.props.ts +5 -0
- package/src/components/__generated__/subscript.props.ts +5 -0
- package/src/components/__generated__/superscript.props.ts +5 -0
- package/src/components/__generated__/text-block.props.ts +5 -0
- package/src/components/blockquote.ws.tsx +42 -52
- package/src/components/body.ws.tsx +25 -32
- package/src/components/bold.ws.tsx +6 -3
- package/src/components/box.ws.ts +6 -3
- package/src/components/button.ws.tsx +7 -4
- package/src/components/code.ws.tsx +26 -32
- package/src/components/component-meta.ts +5 -3
- package/src/components/form.ws.tsx +19 -9
- package/src/components/heading.ws.tsx +7 -4
- package/src/components/image.ws.tsx +14 -12
- package/src/components/input.ws.tsx +6 -3
- package/src/components/italic.ws.tsx +11 -8
- package/src/components/link-block.ws.tsx +11 -8
- package/src/components/link.tsx +1 -1
- package/src/components/link.ws.tsx +15 -13
- package/src/components/list-item.ws.tsx +7 -4
- package/src/components/list.ws.tsx +28 -25
- package/src/components/paragraph.ws.tsx +7 -4
- package/src/components/separator.ws.tsx +26 -25
- package/src/components/span.ws.tsx +6 -3
- package/src/components/subscript.ws.tsx +6 -3
- package/src/components/superscript.ws.tsx +6 -3
- package/src/components/text-block.ws.tsx +12 -11
- package/src/css/css.ts +8 -11
- package/src/css/normalize.ts +165 -188
- package/src/css/presets.ts +15 -37
- package/src/css/style-rules.ts +24 -0
- package/src/embed-template.test.ts +210 -0
- package/src/embed-template.ts +187 -0
- package/src/index.ts +1 -0
- package/lib/app/handle-request.server.js +0 -16
- package/lib/cjs/app/handle-request.server.js +0 -36
- package/lib/types/app/handle-request.server.d.ts +0 -2
- package/src/app/handle-request.server.tsx +0 -21
|
@@ -38,6 +38,7 @@ const props = {
|
|
|
38
38
|
type: "boolean"
|
|
39
39
|
},
|
|
40
40
|
accessKey: { required: false, control: "text", type: "string" },
|
|
41
|
+
autoFocus: { required: false, control: "boolean", type: "boolean" },
|
|
41
42
|
className: { required: false, control: "text", type: "string" },
|
|
42
43
|
contentEditable: { required: false, control: "text", type: "string" },
|
|
43
44
|
contextMenu: { required: false, control: "text", type: "string" },
|
|
@@ -46,6 +47,7 @@ const props = {
|
|
|
46
47
|
hidden: { required: false, control: "boolean", type: "boolean" },
|
|
47
48
|
id: { required: false, control: "text", type: "string" },
|
|
48
49
|
lang: { required: false, control: "text", type: "string" },
|
|
50
|
+
nonce: { required: false, control: "text", type: "string" },
|
|
49
51
|
placeholder: { required: false, control: "text", type: "string" },
|
|
50
52
|
spellCheck: { required: false, control: "boolean", type: "boolean" },
|
|
51
53
|
tabIndex: { required: false, control: "number", type: "number" },
|
|
@@ -58,11 +60,14 @@ const props = {
|
|
|
58
60
|
radioGroup: { required: false, control: "text", type: "string" },
|
|
59
61
|
role: { required: false, control: "text", type: "string" },
|
|
60
62
|
about: { required: false, control: "text", type: "string" },
|
|
63
|
+
content: { required: false, control: "text", type: "string" },
|
|
61
64
|
datatype: { required: false, control: "text", type: "string" },
|
|
62
65
|
inlist: { required: false, control: "text", type: "string" },
|
|
63
66
|
prefix: { required: false, control: "text", type: "string" },
|
|
64
67
|
property: { required: false, control: "text", type: "string" },
|
|
68
|
+
rel: { required: false, control: "text", type: "string" },
|
|
65
69
|
resource: { required: false, control: "text", type: "string" },
|
|
70
|
+
rev: { required: false, control: "text", type: "string" },
|
|
66
71
|
typeof: { required: false, control: "text", type: "string" },
|
|
67
72
|
vocab: { required: false, control: "text", type: "string" },
|
|
68
73
|
autoCapitalize: { required: false, control: "text", type: "string" },
|
|
@@ -38,6 +38,7 @@ const props = {
|
|
|
38
38
|
type: "boolean"
|
|
39
39
|
},
|
|
40
40
|
accessKey: { required: false, control: "text", type: "string" },
|
|
41
|
+
autoFocus: { required: false, control: "boolean", type: "boolean" },
|
|
41
42
|
className: { required: false, control: "text", type: "string" },
|
|
42
43
|
contentEditable: { required: false, control: "text", type: "string" },
|
|
43
44
|
contextMenu: { required: false, control: "text", type: "string" },
|
|
@@ -46,6 +47,7 @@ const props = {
|
|
|
46
47
|
hidden: { required: false, control: "boolean", type: "boolean" },
|
|
47
48
|
id: { required: false, control: "text", type: "string" },
|
|
48
49
|
lang: { required: false, control: "text", type: "string" },
|
|
50
|
+
nonce: { required: false, control: "text", type: "string" },
|
|
49
51
|
placeholder: { required: false, control: "text", type: "string" },
|
|
50
52
|
spellCheck: { required: false, control: "boolean", type: "boolean" },
|
|
51
53
|
tabIndex: { required: false, control: "number", type: "number" },
|
|
@@ -58,11 +60,14 @@ const props = {
|
|
|
58
60
|
radioGroup: { required: false, control: "text", type: "string" },
|
|
59
61
|
role: { required: false, control: "text", type: "string" },
|
|
60
62
|
about: { required: false, control: "text", type: "string" },
|
|
63
|
+
content: { required: false, control: "text", type: "string" },
|
|
61
64
|
datatype: { required: false, control: "text", type: "string" },
|
|
62
65
|
inlist: { required: false, control: "text", type: "string" },
|
|
63
66
|
prefix: { required: false, control: "text", type: "string" },
|
|
64
67
|
property: { required: false, control: "text", type: "string" },
|
|
68
|
+
rel: { required: false, control: "text", type: "string" },
|
|
65
69
|
resource: { required: false, control: "text", type: "string" },
|
|
70
|
+
rev: { required: false, control: "text", type: "string" },
|
|
66
71
|
typeof: { required: false, control: "text", type: "string" },
|
|
67
72
|
vocab: { required: false, control: "text", type: "string" },
|
|
68
73
|
autoCapitalize: { required: false, control: "text", type: "string" },
|
|
@@ -38,6 +38,7 @@ const props = {
|
|
|
38
38
|
type: "boolean"
|
|
39
39
|
},
|
|
40
40
|
accessKey: { required: false, control: "text", type: "string" },
|
|
41
|
+
autoFocus: { required: false, control: "boolean", type: "boolean" },
|
|
41
42
|
className: { required: false, control: "text", type: "string" },
|
|
42
43
|
contentEditable: { required: false, control: "text", type: "string" },
|
|
43
44
|
contextMenu: { required: false, control: "text", type: "string" },
|
|
@@ -46,6 +47,7 @@ const props = {
|
|
|
46
47
|
hidden: { required: false, control: "boolean", type: "boolean" },
|
|
47
48
|
id: { required: false, control: "text", type: "string" },
|
|
48
49
|
lang: { required: false, control: "text", type: "string" },
|
|
50
|
+
nonce: { required: false, control: "text", type: "string" },
|
|
49
51
|
placeholder: { required: false, control: "text", type: "string" },
|
|
50
52
|
spellCheck: { required: false, control: "boolean", type: "boolean" },
|
|
51
53
|
tabIndex: { required: false, control: "number", type: "number" },
|
|
@@ -58,11 +60,14 @@ const props = {
|
|
|
58
60
|
radioGroup: { required: false, control: "text", type: "string" },
|
|
59
61
|
role: { required: false, control: "text", type: "string" },
|
|
60
62
|
about: { required: false, control: "text", type: "string" },
|
|
63
|
+
content: { required: false, control: "text", type: "string" },
|
|
61
64
|
datatype: { required: false, control: "text", type: "string" },
|
|
62
65
|
inlist: { required: false, control: "text", type: "string" },
|
|
63
66
|
prefix: { required: false, control: "text", type: "string" },
|
|
64
67
|
property: { required: false, control: "text", type: "string" },
|
|
68
|
+
rel: { required: false, control: "text", type: "string" },
|
|
65
69
|
resource: { required: false, control: "text", type: "string" },
|
|
70
|
+
rev: { required: false, control: "text", type: "string" },
|
|
66
71
|
typeof: { required: false, control: "text", type: "string" },
|
|
67
72
|
vocab: { required: false, control: "text", type: "string" },
|
|
68
73
|
autoCapitalize: { required: false, control: "text", type: "string" },
|
|
@@ -38,6 +38,7 @@ const props = {
|
|
|
38
38
|
type: "boolean"
|
|
39
39
|
},
|
|
40
40
|
accessKey: { required: false, control: "text", type: "string" },
|
|
41
|
+
autoFocus: { required: false, control: "boolean", type: "boolean" },
|
|
41
42
|
className: { required: false, control: "text", type: "string" },
|
|
42
43
|
contentEditable: { required: false, control: "text", type: "string" },
|
|
43
44
|
contextMenu: { required: false, control: "text", type: "string" },
|
|
@@ -46,6 +47,7 @@ const props = {
|
|
|
46
47
|
hidden: { required: false, control: "boolean", type: "boolean" },
|
|
47
48
|
id: { required: false, control: "text", type: "string" },
|
|
48
49
|
lang: { required: false, control: "text", type: "string" },
|
|
50
|
+
nonce: { required: false, control: "text", type: "string" },
|
|
49
51
|
placeholder: { required: false, control: "text", type: "string" },
|
|
50
52
|
spellCheck: { required: false, control: "boolean", type: "boolean" },
|
|
51
53
|
tabIndex: { required: false, control: "number", type: "number" },
|
|
@@ -58,11 +60,14 @@ const props = {
|
|
|
58
60
|
radioGroup: { required: false, control: "text", type: "string" },
|
|
59
61
|
role: { required: false, control: "text", type: "string" },
|
|
60
62
|
about: { required: false, control: "text", type: "string" },
|
|
63
|
+
content: { required: false, control: "text", type: "string" },
|
|
61
64
|
datatype: { required: false, control: "text", type: "string" },
|
|
62
65
|
inlist: { required: false, control: "text", type: "string" },
|
|
63
66
|
prefix: { required: false, control: "text", type: "string" },
|
|
64
67
|
property: { required: false, control: "text", type: "string" },
|
|
68
|
+
rel: { required: false, control: "text", type: "string" },
|
|
65
69
|
resource: { required: false, control: "text", type: "string" },
|
|
70
|
+
rev: { required: false, control: "text", type: "string" },
|
|
66
71
|
typeof: { required: false, control: "text", type: "string" },
|
|
67
72
|
vocab: { required: false, control: "text", type: "string" },
|
|
68
73
|
autoCapitalize: { required: false, control: "text", type: "string" },
|
|
@@ -38,6 +38,7 @@ const props = {
|
|
|
38
38
|
type: "boolean"
|
|
39
39
|
},
|
|
40
40
|
accessKey: { required: false, control: "text", type: "string" },
|
|
41
|
+
autoFocus: { required: false, control: "boolean", type: "boolean" },
|
|
41
42
|
className: { required: false, control: "text", type: "string" },
|
|
42
43
|
contentEditable: { required: false, control: "text", type: "string" },
|
|
43
44
|
contextMenu: { required: false, control: "text", type: "string" },
|
|
@@ -46,6 +47,7 @@ const props = {
|
|
|
46
47
|
hidden: { required: false, control: "boolean", type: "boolean" },
|
|
47
48
|
id: { required: false, control: "text", type: "string" },
|
|
48
49
|
lang: { required: false, control: "text", type: "string" },
|
|
50
|
+
nonce: { required: false, control: "text", type: "string" },
|
|
49
51
|
placeholder: { required: false, control: "text", type: "string" },
|
|
50
52
|
spellCheck: { required: false, control: "boolean", type: "boolean" },
|
|
51
53
|
tabIndex: { required: false, control: "number", type: "number" },
|
|
@@ -58,11 +60,14 @@ const props = {
|
|
|
58
60
|
radioGroup: { required: false, control: "text", type: "string" },
|
|
59
61
|
role: { required: false, control: "text", type: "string" },
|
|
60
62
|
about: { required: false, control: "text", type: "string" },
|
|
63
|
+
content: { required: false, control: "text", type: "string" },
|
|
61
64
|
datatype: { required: false, control: "text", type: "string" },
|
|
62
65
|
inlist: { required: false, control: "text", type: "string" },
|
|
63
66
|
prefix: { required: false, control: "text", type: "string" },
|
|
64
67
|
property: { required: false, control: "text", type: "string" },
|
|
68
|
+
rel: { required: false, control: "text", type: "string" },
|
|
65
69
|
resource: { required: false, control: "text", type: "string" },
|
|
70
|
+
rev: { required: false, control: "text", type: "string" },
|
|
66
71
|
typeof: { required: false, control: "text", type: "string" },
|
|
67
72
|
vocab: { required: false, control: "text", type: "string" },
|
|
68
73
|
autoCapitalize: { required: false, control: "text", type: "string" },
|
|
@@ -25,64 +25,52 @@ module.exports = __toCommonJS(blockquote_ws_exports);
|
|
|
25
25
|
var import_icons = require("@webstudio-is/icons");
|
|
26
26
|
var import_blockquote = require("./__generated__/blockquote.props");
|
|
27
27
|
const presetStyle = {
|
|
28
|
-
blockquote:
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
value: 0,
|
|
32
|
-
unit: "number"
|
|
28
|
+
blockquote: [
|
|
29
|
+
{
|
|
30
|
+
property: "marginTop",
|
|
31
|
+
value: { type: "unit", value: 0, unit: "number" }
|
|
33
32
|
},
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
value: 0,
|
|
37
|
-
unit: "number"
|
|
33
|
+
{
|
|
34
|
+
property: "marginRight",
|
|
35
|
+
value: { type: "unit", value: 0, unit: "number" }
|
|
38
36
|
},
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
value: 10,
|
|
42
|
-
unit: "px"
|
|
37
|
+
{
|
|
38
|
+
property: "marginBottom",
|
|
39
|
+
value: { type: "unit", value: 10, unit: "px" }
|
|
43
40
|
},
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
value: 0,
|
|
47
|
-
unit: "number"
|
|
41
|
+
{
|
|
42
|
+
property: "marginLeft",
|
|
43
|
+
value: { type: "unit", value: 0, unit: "number" }
|
|
48
44
|
},
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
value: 10,
|
|
52
|
-
unit: "px"
|
|
45
|
+
{
|
|
46
|
+
property: "paddingTop",
|
|
47
|
+
value: { type: "unit", value: 10, unit: "px" }
|
|
53
48
|
},
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
value: 10,
|
|
57
|
-
unit: "px"
|
|
49
|
+
{
|
|
50
|
+
property: "paddingBottom",
|
|
51
|
+
value: { type: "unit", value: 10, unit: "px" }
|
|
58
52
|
},
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
value: 20,
|
|
62
|
-
unit: "px"
|
|
53
|
+
{
|
|
54
|
+
property: "paddingLeft",
|
|
55
|
+
value: { type: "unit", value: 20, unit: "px" }
|
|
63
56
|
},
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
value: 20,
|
|
67
|
-
unit: "px"
|
|
57
|
+
{
|
|
58
|
+
property: "paddingRight",
|
|
59
|
+
value: { type: "unit", value: 20, unit: "px" }
|
|
68
60
|
},
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
value: 5,
|
|
72
|
-
unit: "px"
|
|
61
|
+
{
|
|
62
|
+
property: "borderLeftWidth",
|
|
63
|
+
value: { type: "unit", value: 5, unit: "px" }
|
|
73
64
|
},
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
value: "solid"
|
|
65
|
+
{
|
|
66
|
+
property: "borderLeftStyle",
|
|
67
|
+
value: { type: "keyword", value: "solid" }
|
|
77
68
|
},
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
r: 226,
|
|
81
|
-
g: 226,
|
|
82
|
-
b: 226,
|
|
83
|
-
alpha: 1
|
|
69
|
+
{
|
|
70
|
+
property: "borderLeftColor",
|
|
71
|
+
value: { type: "rgb", r: 226, g: 226, b: 226, alpha: 1 }
|
|
84
72
|
}
|
|
85
|
-
|
|
73
|
+
]
|
|
86
74
|
};
|
|
87
75
|
const meta = {
|
|
88
76
|
category: "typography",
|
|
@@ -90,7 +78,7 @@ const meta = {
|
|
|
90
78
|
label: "Blockquote",
|
|
91
79
|
Icon: import_icons.BlockquoteIcon,
|
|
92
80
|
presetStyle,
|
|
93
|
-
children: ["Blockquote you can edit"]
|
|
81
|
+
children: [{ type: "text", value: "Blockquote you can edit" }]
|
|
94
82
|
};
|
|
95
83
|
const propsMeta = {
|
|
96
84
|
props: import_blockquote.props
|
|
@@ -26,36 +26,31 @@ var import_icons = require("@webstudio-is/icons");
|
|
|
26
26
|
var import_normalize = require("../css/normalize");
|
|
27
27
|
var import_body = require("./__generated__/body.props");
|
|
28
28
|
const presetStyle = {
|
|
29
|
-
body:
|
|
29
|
+
body: [
|
|
30
30
|
...import_normalize.body,
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
unit: "%",
|
|
34
|
-
value: 100
|
|
31
|
+
{
|
|
32
|
+
property: "minHeight",
|
|
33
|
+
value: { type: "unit", unit: "%", value: 100 }
|
|
35
34
|
},
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
value: "
|
|
35
|
+
{
|
|
36
|
+
property: "fontFamily",
|
|
37
|
+
value: { type: "keyword", value: "Arial" }
|
|
39
38
|
},
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
value: "
|
|
39
|
+
{
|
|
40
|
+
property: "fontSize",
|
|
41
|
+
value: { type: "unit", unit: "px", value: 14 }
|
|
43
42
|
},
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
unit: "
|
|
47
|
-
value: 14
|
|
43
|
+
{
|
|
44
|
+
property: "lineHeight",
|
|
45
|
+
value: { type: "unit", unit: "number", value: 1.5 }
|
|
48
46
|
},
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
color: {
|
|
55
|
-
type: "keyword",
|
|
56
|
-
value: "#232323"
|
|
47
|
+
// temporary set root color
|
|
48
|
+
// until builder start to fallback "inherit" to black
|
|
49
|
+
{
|
|
50
|
+
property: "color",
|
|
51
|
+
value: { type: "keyword", value: "black" }
|
|
57
52
|
}
|
|
58
|
-
|
|
53
|
+
]
|
|
59
54
|
};
|
|
60
55
|
const meta = {
|
|
61
56
|
type: "container",
|
|
@@ -23,8 +23,8 @@ __export(button_ws_exports, {
|
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(button_ws_exports);
|
|
25
25
|
var import_icons = require("@webstudio-is/icons");
|
|
26
|
-
var import_button = require("./__generated__/button.props");
|
|
27
26
|
var import_normalize = require("../css/normalize");
|
|
27
|
+
var import_button = require("./__generated__/button.props");
|
|
28
28
|
const presetStyle = {
|
|
29
29
|
button: import_normalize.button
|
|
30
30
|
};
|
|
@@ -26,38 +26,30 @@ var import_icons = require("@webstudio-is/icons");
|
|
|
26
26
|
var import_code = require("./code");
|
|
27
27
|
var import_code2 = require("./__generated__/code.props");
|
|
28
28
|
var import_normalize = require("../css/normalize");
|
|
29
|
-
const display = {
|
|
30
|
-
type: "var",
|
|
31
|
-
value: import_code.displayVarNamespace,
|
|
32
|
-
fallbacks: [
|
|
33
|
-
{
|
|
34
|
-
type: "keyword",
|
|
35
|
-
value: "inline-block"
|
|
36
|
-
}
|
|
37
|
-
]
|
|
38
|
-
};
|
|
39
29
|
const presetStyle = {
|
|
40
|
-
code:
|
|
30
|
+
code: [
|
|
41
31
|
...import_normalize.code,
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
32
|
+
{
|
|
33
|
+
property: "display",
|
|
34
|
+
value: {
|
|
35
|
+
type: "var",
|
|
36
|
+
value: import_code.displayVarNamespace,
|
|
37
|
+
fallbacks: [{ type: "keyword", value: "inline-block" }]
|
|
38
|
+
}
|
|
47
39
|
},
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
value: 0.2,
|
|
51
|
-
unit: "em"
|
|
40
|
+
{
|
|
41
|
+
property: "paddingLeft",
|
|
42
|
+
value: { type: "unit", value: 0.2, unit: "em" }
|
|
52
43
|
},
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
44
|
+
{
|
|
45
|
+
property: "paddingRight",
|
|
46
|
+
value: { type: "unit", value: 0.2, unit: "em" }
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
property: "backgroundColor",
|
|
50
|
+
value: { type: "rgb", r: 238, g: 238, b: 238, alpha: 1 }
|
|
59
51
|
}
|
|
60
|
-
|
|
52
|
+
]
|
|
61
53
|
};
|
|
62
54
|
const meta = {
|
|
63
55
|
category: "general",
|
|
@@ -65,7 +57,7 @@ const meta = {
|
|
|
65
57
|
label: "Code",
|
|
66
58
|
Icon: import_icons.CodeIcon,
|
|
67
59
|
presetStyle,
|
|
68
|
-
children: ["Code you can edit"]
|
|
60
|
+
children: [{ type: "text", value: "Code you can edit" }]
|
|
69
61
|
};
|
|
70
62
|
const propsMeta = {
|
|
71
63
|
props: import_code2.props,
|
|
@@ -24,6 +24,7 @@ __export(component_meta_exports, {
|
|
|
24
24
|
module.exports = __toCommonJS(component_meta_exports);
|
|
25
25
|
var import_zod = require("zod");
|
|
26
26
|
var import_generate_arg_types = require("@webstudio-is/generate-arg-types");
|
|
27
|
+
var import_embed_template = require("../embed-template");
|
|
27
28
|
const WsComponentPropsMeta = import_zod.z.object({
|
|
28
29
|
props: import_zod.z.record(import_generate_arg_types.PropMeta),
|
|
29
30
|
initialProps: import_zod.z.array(import_zod.z.string()).optional()
|
|
@@ -56,5 +57,5 @@ const WsComponentMeta = import_zod.z.object({
|
|
|
56
57
|
Icon: import_zod.z.function(),
|
|
57
58
|
presetStyle: import_zod.z.optional(import_zod.z.any()),
|
|
58
59
|
states: import_zod.z.optional(import_zod.z.array(ComponentState)),
|
|
59
|
-
children: import_zod.z.optional(
|
|
60
|
+
children: import_zod.z.optional(import_embed_template.WsEmbedTemplate)
|
|
60
61
|
});
|
|
@@ -26,21 +26,28 @@ var import_icons = require("@webstudio-is/icons");
|
|
|
26
26
|
var import_normalize = require("../css/normalize");
|
|
27
27
|
var import_form = require("./__generated__/form.props");
|
|
28
28
|
const presetStyle = {
|
|
29
|
-
form:
|
|
29
|
+
form: [
|
|
30
30
|
...import_normalize.form,
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
unit: "px",
|
|
34
|
-
value: 20
|
|
31
|
+
{
|
|
32
|
+
property: "minHeight",
|
|
33
|
+
value: { type: "unit", unit: "px", value: 20 }
|
|
35
34
|
}
|
|
36
|
-
|
|
35
|
+
]
|
|
37
36
|
};
|
|
38
37
|
const meta = {
|
|
39
38
|
category: "forms",
|
|
40
39
|
type: "container",
|
|
41
40
|
label: "Form",
|
|
42
41
|
Icon: import_icons.FormIcon,
|
|
43
|
-
presetStyle
|
|
42
|
+
presetStyle,
|
|
43
|
+
children: [
|
|
44
|
+
{ type: "instance", component: "Input", children: [] },
|
|
45
|
+
{
|
|
46
|
+
type: "instance",
|
|
47
|
+
component: "Button",
|
|
48
|
+
children: [{ type: "text", value: "Submit" }]
|
|
49
|
+
}
|
|
50
|
+
]
|
|
44
51
|
};
|
|
45
52
|
const propsMeta = {
|
|
46
53
|
props: import_form.props
|
|
@@ -26,21 +26,20 @@ var import_icons = require("@webstudio-is/icons");
|
|
|
26
26
|
var import_normalize = require("../css/normalize");
|
|
27
27
|
var import_image = require("./__generated__/image.props");
|
|
28
28
|
const presetStyle = {
|
|
29
|
-
img:
|
|
29
|
+
img: [
|
|
30
30
|
...import_normalize.img,
|
|
31
31
|
// Otherwise on new image insert onto canvas it can overfit screen size multiple times
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
unit: "%",
|
|
35
|
-
value: 100
|
|
32
|
+
{
|
|
33
|
+
property: "maxWidth",
|
|
34
|
+
value: { type: "unit", unit: "%", value: 100 }
|
|
36
35
|
},
|
|
37
36
|
// inline | inline-block is not suitable because without line-height: 0 on the parent you get unsuitable spaces/margins
|
|
38
37
|
// see https://stackoverflow.com/questions/24771194/is-the-margin-of-inline-block-4px-is-static-for-all-browsers
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
value: "block"
|
|
38
|
+
{
|
|
39
|
+
property: "display",
|
|
40
|
+
value: { type: "keyword", value: "block" }
|
|
42
41
|
}
|
|
43
|
-
|
|
42
|
+
]
|
|
44
43
|
};
|
|
45
44
|
const meta = {
|
|
46
45
|
category: "media",
|
|
@@ -26,13 +26,13 @@ var import_icons = require("@webstudio-is/icons");
|
|
|
26
26
|
var import_italic = require("./__generated__/italic.props");
|
|
27
27
|
var import_normalize = require("../css/normalize");
|
|
28
28
|
const presetStyle = {
|
|
29
|
-
i:
|
|
29
|
+
i: [
|
|
30
30
|
...import_normalize.i,
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
value: "italic"
|
|
31
|
+
{
|
|
32
|
+
property: "fontStyle",
|
|
33
|
+
value: { type: "keyword", value: "italic" }
|
|
34
34
|
}
|
|
35
|
-
|
|
35
|
+
]
|
|
36
36
|
};
|
|
37
37
|
const meta = {
|
|
38
38
|
type: "rich-text-child",
|
|
@@ -27,13 +27,13 @@ var import_link_block = require("./__generated__/link-block.props");
|
|
|
27
27
|
var import_link = require("./link.ws");
|
|
28
28
|
var import_normalize = require("../css/normalize");
|
|
29
29
|
const presetStyle = {
|
|
30
|
-
a:
|
|
30
|
+
a: [
|
|
31
31
|
...import_normalize.a,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
value: "inline-block"
|
|
32
|
+
{
|
|
33
|
+
property: "display",
|
|
34
|
+
value: { type: "keyword", value: "inline-block" }
|
|
35
35
|
}
|
|
36
|
-
|
|
36
|
+
]
|
|
37
37
|
};
|
|
38
38
|
const meta = {
|
|
39
39
|
category: "general",
|
|
@@ -33,7 +33,7 @@ const Link = (0, import_react.forwardRef)((props, ref) => {
|
|
|
33
33
|
let url = "#";
|
|
34
34
|
switch (href?.type) {
|
|
35
35
|
case "page":
|
|
36
|
-
url = href.page.path;
|
|
36
|
+
url = href.page.path === "" ? "/" : href.page.path;
|
|
37
37
|
if (href.hash !== void 0) {
|
|
38
38
|
url += `#${href.hash}`;
|
|
39
39
|
}
|
|
@@ -26,18 +26,17 @@ var import_icons = require("@webstudio-is/icons");
|
|
|
26
26
|
var import_normalize = require("../css/normalize");
|
|
27
27
|
var import_link = require("./__generated__/link.props");
|
|
28
28
|
const presetStyle = {
|
|
29
|
-
a:
|
|
29
|
+
a: [
|
|
30
30
|
...import_normalize.a,
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
unit: "em",
|
|
34
|
-
value: 1
|
|
31
|
+
{
|
|
32
|
+
property: "minHeight",
|
|
33
|
+
value: { type: "unit", unit: "em", value: 1 }
|
|
35
34
|
},
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
value: "inline-block"
|
|
35
|
+
{
|
|
36
|
+
property: "display",
|
|
37
|
+
value: { type: "keyword", value: "inline-block" }
|
|
39
38
|
}
|
|
40
|
-
|
|
39
|
+
]
|
|
41
40
|
};
|
|
42
41
|
const meta = {
|
|
43
42
|
category: "general",
|
|
@@ -46,7 +45,7 @@ const meta = {
|
|
|
46
45
|
Icon: import_icons.LinkIcon,
|
|
47
46
|
presetStyle,
|
|
48
47
|
states: [{ selector: "[aria-current=page]", label: "Current page" }],
|
|
49
|
-
children: ["Link text you can edit"]
|
|
48
|
+
children: [{ type: "text", value: "Link text you can edit" }]
|
|
50
49
|
};
|
|
51
50
|
const propsMeta = {
|
|
52
51
|
props: {
|
|
@@ -26,36 +26,36 @@ var import_icons = require("@webstudio-is/icons");
|
|
|
26
26
|
var import_list = require("./__generated__/list.props");
|
|
27
27
|
var import_normalize = require("../css/normalize");
|
|
28
28
|
const presetStyle = {
|
|
29
|
-
ol:
|
|
29
|
+
ol: [
|
|
30
30
|
...import_normalize.ol,
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
value: "0"
|
|
31
|
+
{
|
|
32
|
+
property: "marginTop",
|
|
33
|
+
value: { type: "keyword", value: "0" }
|
|
34
34
|
},
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
value: "10px"
|
|
35
|
+
{
|
|
36
|
+
property: "marginBottom",
|
|
37
|
+
value: { type: "keyword", value: "10px" }
|
|
38
38
|
},
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
value: "40px"
|
|
39
|
+
{
|
|
40
|
+
property: "paddingLeft",
|
|
41
|
+
value: { type: "keyword", value: "40px" }
|
|
42
42
|
}
|
|
43
|
-
|
|
44
|
-
ul:
|
|
43
|
+
],
|
|
44
|
+
ul: [
|
|
45
45
|
...import_normalize.ul,
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
value: "0"
|
|
46
|
+
{
|
|
47
|
+
property: "marginTop",
|
|
48
|
+
value: { type: "keyword", value: "0" }
|
|
49
49
|
},
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
value: "10px"
|
|
50
|
+
{
|
|
51
|
+
property: "marginBottom",
|
|
52
|
+
value: { type: "keyword", value: "10px" }
|
|
53
53
|
},
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
value: "40px"
|
|
54
|
+
{
|
|
55
|
+
property: "paddingLeft",
|
|
56
|
+
value: { type: "keyword", value: "40px" }
|
|
57
57
|
}
|
|
58
|
-
|
|
58
|
+
]
|
|
59
59
|
};
|
|
60
60
|
const meta = {
|
|
61
61
|
category: "typography",
|