@webstudio-is/sdk-components-react 0.70.0 → 0.72.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/__generated__/link-block.props.js +1 -7
- package/lib/__generated__/link.props.js +1 -7
- package/lib/__generated__/rich-text-link.props.js +1 -7
- package/lib/__generated__/vimeo-play-button.props.js +414 -0
- package/lib/__generated__/vimeo-preview-image.props.js +442 -0
- package/lib/__generated__/vimeo-spinner.props.js +398 -0
- package/lib/__generated__/vimeo.props.js +555 -0
- package/lib/box.js +2 -1
- package/lib/cjs/__generated__/link-block.props.js +1 -7
- package/lib/cjs/__generated__/link.props.js +1 -7
- package/lib/cjs/__generated__/rich-text-link.props.js +1 -7
- package/lib/cjs/__generated__/vimeo-play-button.props.js +434 -0
- package/lib/cjs/__generated__/vimeo-preview-image.props.js +462 -0
- package/lib/cjs/__generated__/vimeo-spinner.props.js +418 -0
- package/lib/cjs/__generated__/vimeo.props.js +575 -0
- package/lib/cjs/box.js +2 -1
- package/lib/cjs/components.js +9 -1
- package/lib/cjs/image.ws.js +11 -7
- package/lib/cjs/link-block.ws.js +1 -8
- package/lib/cjs/link.ws.js +1 -1
- package/lib/cjs/metas.js +9 -1
- package/lib/cjs/props.js +9 -1
- package/lib/cjs/rich-text-link.ws.js +3 -10
- package/lib/cjs/vimeo-play-button.js +38 -0
- package/lib/cjs/vimeo-play-button.ws.js +44 -0
- package/lib/cjs/vimeo-preview-image.js +40 -0
- package/lib/cjs/vimeo-preview-image.ws.js +36 -0
- package/lib/cjs/vimeo-spinner.js +37 -0
- package/lib/cjs/vimeo-spinner.ws.js +43 -0
- package/lib/cjs/vimeo.js +294 -0
- package/lib/cjs/vimeo.ws.js +340 -0
- package/lib/components.js +9 -1
- package/lib/image.ws.js +11 -7
- package/lib/link-block.ws.js +1 -8
- package/lib/link.ws.js +1 -1
- package/lib/metas.js +9 -1
- package/lib/props.js +9 -1
- package/lib/rich-text-link.ws.js +3 -10
- package/lib/types/__generated__/vimeo-play-button.props.d.ts +2 -0
- package/lib/types/__generated__/vimeo-preview-image.props.d.ts +2 -0
- package/lib/types/__generated__/vimeo-spinner.props.d.ts +2 -0
- package/lib/types/__generated__/vimeo.props.d.ts +2 -0
- package/lib/types/box.d.ts +1 -1
- package/lib/types/components.d.ts +4 -0
- package/lib/types/image.ws.d.ts +8 -0
- package/lib/types/link-block.stories.d.ts +2 -6
- package/lib/types/link.d.ts +1 -3
- package/lib/types/link.stories.d.ts +2 -6
- package/lib/types/metas.d.ts +4 -0
- package/lib/types/props.d.ts +4 -0
- package/lib/types/rich-text-link.stories.d.ts +2 -6
- package/lib/types/vimeo-play-button.d.ts +6 -0
- package/lib/types/vimeo-play-button.stories.d.ts +9 -0
- package/lib/types/vimeo-play-button.ws.d.ts +3 -0
- package/lib/types/vimeo-preview-image.d.ts +6 -0
- package/lib/types/vimeo-preview-image.stories.d.ts +13 -0
- package/lib/types/vimeo-preview-image.ws.d.ts +3 -0
- package/lib/types/vimeo-spinner.d.ts +2 -0
- package/lib/types/vimeo-spinner.stories.d.ts +5 -0
- package/lib/types/vimeo-spinner.ws.d.ts +3 -0
- package/lib/types/vimeo.d.ts +73 -0
- package/lib/types/vimeo.stories.d.ts +71 -0
- package/lib/types/vimeo.ws.d.ts +3 -0
- package/lib/vimeo-play-button.js +21 -0
- package/lib/vimeo-play-button.ws.js +26 -0
- package/lib/vimeo-preview-image.js +23 -0
- package/lib/vimeo-preview-image.ws.js +20 -0
- package/lib/vimeo-spinner.js +20 -0
- package/lib/vimeo-spinner.ws.js +25 -0
- package/lib/vimeo.js +282 -0
- package/lib/vimeo.ws.js +322 -0
- package/package.json +8 -6
- package/src/LICENSE +21 -0
- package/src/__generated__/link-block.props.ts +1 -7
- package/src/__generated__/link.props.ts +1 -7
- package/src/__generated__/rich-text-link.props.ts +1 -7
- package/src/__generated__/vimeo-play-button.props.ts +459 -0
- package/src/__generated__/vimeo-preview-image.props.ts +487 -0
- package/src/__generated__/vimeo-spinner.props.ts +443 -0
- package/src/__generated__/vimeo.props.ts +621 -0
- package/src/box.tsx +1 -1
- package/src/components.ts +4 -0
- package/src/image.ws.tsx +11 -6
- package/src/link-block.ws.tsx +1 -8
- package/src/link.tsx +2 -7
- package/src/link.ws.tsx +1 -1
- package/src/metas.ts +4 -0
- package/src/props.ts +4 -0
- package/src/rich-text-link.ws.tsx +3 -11
- package/src/vimeo-play-button.stories.tsx +17 -0
- package/src/vimeo-play-button.tsx +24 -0
- package/src/vimeo-play-button.ws.ts +29 -0
- package/src/vimeo-preview-image.stories.tsx +17 -0
- package/src/vimeo-preview-image.tsx +30 -0
- package/src/vimeo-preview-image.ws.ts +22 -0
- package/src/vimeo-spinner.stories.tsx +17 -0
- package/src/vimeo-spinner.tsx +25 -0
- package/src/vimeo-spinner.ws.ts +27 -0
- package/src/vimeo.stories.tsx +17 -0
- package/src/vimeo.tsx +430 -0
- package/src/vimeo.ws.ts +326 -0
|
@@ -0,0 +1,340 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var vimeo_ws_exports = {};
|
|
20
|
+
__export(vimeo_ws_exports, {
|
|
21
|
+
meta: () => meta,
|
|
22
|
+
propsMeta: () => propsMeta
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(vimeo_ws_exports);
|
|
25
|
+
var import_svg = require("@webstudio-is/icons/svg");
|
|
26
|
+
var import_react_sdk = require("@webstudio-is/react-sdk");
|
|
27
|
+
var import_css_normalize = require("@webstudio-is/react-sdk/css-normalize");
|
|
28
|
+
var import_vimeo = require("./__generated__/vimeo.props");
|
|
29
|
+
const presetStyle = {
|
|
30
|
+
div: import_css_normalize.div
|
|
31
|
+
};
|
|
32
|
+
const meta = {
|
|
33
|
+
category: "media",
|
|
34
|
+
type: "container",
|
|
35
|
+
label: "Vimeo",
|
|
36
|
+
order: 1,
|
|
37
|
+
icon: import_svg.VimeoIcon,
|
|
38
|
+
states: import_react_sdk.defaultStates,
|
|
39
|
+
presetStyle,
|
|
40
|
+
template: [
|
|
41
|
+
{
|
|
42
|
+
type: "instance",
|
|
43
|
+
component: "Vimeo",
|
|
44
|
+
styles: [
|
|
45
|
+
{
|
|
46
|
+
property: "position",
|
|
47
|
+
value: { type: "keyword", value: "relative" }
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
property: "aspectRatio",
|
|
51
|
+
value: { type: "keyword", value: "640/360" }
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
property: "width",
|
|
55
|
+
value: { type: "unit", value: 100, unit: "%" }
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
children: [
|
|
59
|
+
{
|
|
60
|
+
type: "instance",
|
|
61
|
+
component: "VimeoPreviewImage",
|
|
62
|
+
styles: [
|
|
63
|
+
{
|
|
64
|
+
property: "position",
|
|
65
|
+
value: { type: "keyword", value: "absolute" }
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
property: "objectPosition",
|
|
69
|
+
value: { type: "keyword", value: "cover" }
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
property: "width",
|
|
73
|
+
value: { type: "unit", value: 100, unit: "%" }
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
property: "height",
|
|
77
|
+
value: { type: "unit", value: 100, unit: "%" }
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
property: "borderTopLeftRadius",
|
|
81
|
+
value: { type: "unit", value: 20, unit: "px" }
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
property: "borderTopRightRadius",
|
|
85
|
+
value: { type: "unit", value: 20, unit: "px" }
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
property: "borderBottomLeftRadius",
|
|
89
|
+
value: { type: "unit", value: 20, unit: "px" }
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
property: "borderBottomRightRadius",
|
|
93
|
+
value: { type: "unit", value: 20, unit: "px" }
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
property: "objectPosition",
|
|
97
|
+
value: { type: "keyword", value: "cover" }
|
|
98
|
+
}
|
|
99
|
+
],
|
|
100
|
+
children: [],
|
|
101
|
+
props: [
|
|
102
|
+
{
|
|
103
|
+
type: "string",
|
|
104
|
+
name: "alt",
|
|
105
|
+
value: "Vimeo video preview image"
|
|
106
|
+
}
|
|
107
|
+
]
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
type: "instance",
|
|
111
|
+
component: "Box",
|
|
112
|
+
label: "Spinner",
|
|
113
|
+
styles: [
|
|
114
|
+
{
|
|
115
|
+
property: "position",
|
|
116
|
+
value: { type: "keyword", value: "absolute" }
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
property: "top",
|
|
120
|
+
value: { type: "unit", value: 50, unit: "%" }
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
property: "left",
|
|
124
|
+
value: { type: "unit", value: 50, unit: "%" }
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
property: "width",
|
|
128
|
+
value: { type: "unit", value: 70, unit: "px" }
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
property: "height",
|
|
132
|
+
value: { type: "unit", value: 70, unit: "px" }
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
property: "marginTop",
|
|
136
|
+
value: { type: "unit", value: -35, unit: "px" }
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
property: "marginLeft",
|
|
140
|
+
value: { type: "unit", value: -35, unit: "px" }
|
|
141
|
+
}
|
|
142
|
+
],
|
|
143
|
+
children: [
|
|
144
|
+
{
|
|
145
|
+
type: "instance",
|
|
146
|
+
component: "HtmlEmbed",
|
|
147
|
+
label: "Spinner SVG",
|
|
148
|
+
props: [
|
|
149
|
+
{
|
|
150
|
+
type: "string",
|
|
151
|
+
name: "code",
|
|
152
|
+
value: import_svg.SpinnerIcon
|
|
153
|
+
}
|
|
154
|
+
],
|
|
155
|
+
children: []
|
|
156
|
+
}
|
|
157
|
+
]
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
type: "instance",
|
|
161
|
+
component: "VimeoPlayButton",
|
|
162
|
+
props: [
|
|
163
|
+
{
|
|
164
|
+
type: "string",
|
|
165
|
+
name: "aria-label",
|
|
166
|
+
value: "Play button"
|
|
167
|
+
}
|
|
168
|
+
],
|
|
169
|
+
styles: [
|
|
170
|
+
{
|
|
171
|
+
property: "position",
|
|
172
|
+
value: { type: "keyword", value: "absolute" }
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
property: "width",
|
|
176
|
+
value: { type: "unit", value: 140, unit: "px" }
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
property: "height",
|
|
180
|
+
value: { type: "unit", value: 80, unit: "px" }
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
property: "top",
|
|
184
|
+
value: { type: "unit", value: 50, unit: "%" }
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
property: "left",
|
|
188
|
+
value: { type: "unit", value: 50, unit: "%" }
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
property: "marginTop",
|
|
192
|
+
value: { type: "unit", value: -40, unit: "px" }
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
property: "marginLeft",
|
|
196
|
+
value: { type: "unit", value: -70, unit: "px" }
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
property: "display",
|
|
200
|
+
value: { type: "keyword", value: "flex" }
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
property: "alignItems",
|
|
204
|
+
value: { type: "keyword", value: "center" }
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
property: "justifyContent",
|
|
208
|
+
value: { type: "keyword", value: "center" }
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
property: "borderTopStyle",
|
|
212
|
+
value: { type: "keyword", value: "none" }
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
property: "borderRightStyle",
|
|
216
|
+
value: { type: "keyword", value: "none" }
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
property: "borderBottomStyle",
|
|
220
|
+
value: { type: "keyword", value: "none" }
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
property: "borderLeftStyle",
|
|
224
|
+
value: { type: "keyword", value: "none" }
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
property: "borderTopLeftRadius",
|
|
228
|
+
value: { type: "unit", value: 5, unit: "px" }
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
property: "borderTopRightRadius",
|
|
232
|
+
value: { type: "unit", value: 5, unit: "px" }
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
property: "borderBottomLeftRadius",
|
|
236
|
+
value: { type: "unit", value: 5, unit: "px" }
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
property: "borderBottomRightRadius",
|
|
240
|
+
value: { type: "unit", value: 5, unit: "px" }
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
property: "cursor",
|
|
244
|
+
value: { type: "keyword", value: "pointer" }
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
property: "backgroundColor",
|
|
248
|
+
value: {
|
|
249
|
+
type: "rgb",
|
|
250
|
+
r: 18,
|
|
251
|
+
g: 18,
|
|
252
|
+
b: 18,
|
|
253
|
+
alpha: 1
|
|
254
|
+
}
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
property: "color",
|
|
258
|
+
value: {
|
|
259
|
+
type: "rgb",
|
|
260
|
+
r: 255,
|
|
261
|
+
g: 255,
|
|
262
|
+
b: 255,
|
|
263
|
+
alpha: 1
|
|
264
|
+
}
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
state: ":hover",
|
|
268
|
+
property: "backgroundColor",
|
|
269
|
+
value: {
|
|
270
|
+
type: "rgb",
|
|
271
|
+
r: 0,
|
|
272
|
+
g: 173,
|
|
273
|
+
b: 239,
|
|
274
|
+
alpha: 1
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
],
|
|
278
|
+
children: [
|
|
279
|
+
{
|
|
280
|
+
type: "instance",
|
|
281
|
+
component: "Box",
|
|
282
|
+
label: "Play Icon",
|
|
283
|
+
styles: [
|
|
284
|
+
{
|
|
285
|
+
property: "width",
|
|
286
|
+
value: { type: "unit", value: 60, unit: "px" }
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
property: "height",
|
|
290
|
+
value: { type: "unit", value: 60, unit: "px" }
|
|
291
|
+
}
|
|
292
|
+
],
|
|
293
|
+
props: [
|
|
294
|
+
{
|
|
295
|
+
type: "string",
|
|
296
|
+
name: "aria-hidden",
|
|
297
|
+
value: "true"
|
|
298
|
+
}
|
|
299
|
+
],
|
|
300
|
+
children: [
|
|
301
|
+
{
|
|
302
|
+
type: "instance",
|
|
303
|
+
component: "HtmlEmbed",
|
|
304
|
+
label: "Play SVG",
|
|
305
|
+
props: [
|
|
306
|
+
{
|
|
307
|
+
type: "string",
|
|
308
|
+
name: "code",
|
|
309
|
+
value: import_svg.PlayIcon
|
|
310
|
+
}
|
|
311
|
+
],
|
|
312
|
+
children: []
|
|
313
|
+
}
|
|
314
|
+
]
|
|
315
|
+
}
|
|
316
|
+
]
|
|
317
|
+
}
|
|
318
|
+
]
|
|
319
|
+
}
|
|
320
|
+
]
|
|
321
|
+
};
|
|
322
|
+
const initialProps = [
|
|
323
|
+
"url",
|
|
324
|
+
"quality",
|
|
325
|
+
"showPreview",
|
|
326
|
+
"autoplay",
|
|
327
|
+
"backgroundMode",
|
|
328
|
+
"doNotTrack",
|
|
329
|
+
"loop",
|
|
330
|
+
"muted",
|
|
331
|
+
"showPortrait",
|
|
332
|
+
"showByline",
|
|
333
|
+
"showTitle",
|
|
334
|
+
"showControls",
|
|
335
|
+
"controlsColor"
|
|
336
|
+
];
|
|
337
|
+
const propsMeta = {
|
|
338
|
+
props: import_vimeo.props,
|
|
339
|
+
initialProps
|
|
340
|
+
};
|
package/lib/components.js
CHANGED
|
@@ -31,6 +31,10 @@ import { RadioButtonField } from "./radio-button-field";
|
|
|
31
31
|
import { RadioButton } from "./radio-button";
|
|
32
32
|
import { CheckboxField } from "./checkbox-field";
|
|
33
33
|
import { Checkbox } from "./checkbox";
|
|
34
|
+
import { Vimeo } from "./vimeo";
|
|
35
|
+
import { VimeoPreviewImage } from "./vimeo-preview-image";
|
|
36
|
+
import { VimeoPlayButton } from "./vimeo-play-button";
|
|
37
|
+
import { VimeoSpinner } from "./vimeo-spinner";
|
|
34
38
|
export {
|
|
35
39
|
Blockquote,
|
|
36
40
|
Body,
|
|
@@ -64,5 +68,9 @@ export {
|
|
|
64
68
|
SuccessMessage,
|
|
65
69
|
Superscript,
|
|
66
70
|
TextBlock,
|
|
67
|
-
Textarea
|
|
71
|
+
Textarea,
|
|
72
|
+
Vimeo,
|
|
73
|
+
VimeoPlayButton,
|
|
74
|
+
VimeoPreviewImage,
|
|
75
|
+
VimeoSpinner
|
|
68
76
|
};
|
package/lib/image.ws.js
CHANGED
|
@@ -30,19 +30,23 @@ const meta = {
|
|
|
30
30
|
order: 0
|
|
31
31
|
};
|
|
32
32
|
const { loader, ...publicProps } = props;
|
|
33
|
+
const propsOverrides = {
|
|
34
|
+
src: {
|
|
35
|
+
type: "string",
|
|
36
|
+
control: "file",
|
|
37
|
+
label: "Source",
|
|
38
|
+
required: false
|
|
39
|
+
}
|
|
40
|
+
};
|
|
33
41
|
const propsMeta = {
|
|
34
42
|
props: {
|
|
35
43
|
...publicProps,
|
|
36
|
-
|
|
37
|
-
type: "string",
|
|
38
|
-
control: "file",
|
|
39
|
-
label: "Source",
|
|
40
|
-
required: false
|
|
41
|
-
}
|
|
44
|
+
...propsOverrides
|
|
42
45
|
},
|
|
43
46
|
initialProps: ["src", "width", "height", "alt", "loading"]
|
|
44
47
|
};
|
|
45
48
|
export {
|
|
46
49
|
meta,
|
|
47
|
-
propsMeta
|
|
50
|
+
propsMeta,
|
|
51
|
+
propsOverrides
|
|
48
52
|
};
|
package/lib/link-block.ws.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { LinkBlockIcon } from "@webstudio-is/icons/svg";
|
|
2
2
|
import { a } from "@webstudio-is/react-sdk/css-normalize";
|
|
3
|
-
import { props } from "./__generated__/link-block.props";
|
|
4
3
|
import { meta as linkMeta, propsMeta as linkPropsMeta } from "./link.ws";
|
|
5
4
|
const presetStyle = {
|
|
6
5
|
a: [
|
|
@@ -20,13 +19,7 @@ const meta = {
|
|
|
20
19
|
presetStyle,
|
|
21
20
|
order: 2
|
|
22
21
|
};
|
|
23
|
-
const propsMeta =
|
|
24
|
-
props: {
|
|
25
|
-
...props,
|
|
26
|
-
href: linkPropsMeta.props.href
|
|
27
|
-
},
|
|
28
|
-
initialProps: linkPropsMeta.initialProps
|
|
29
|
-
};
|
|
22
|
+
const propsMeta = linkPropsMeta;
|
|
30
23
|
export {
|
|
31
24
|
meta,
|
|
32
25
|
propsMeta
|
package/lib/link.ws.js
CHANGED
package/lib/metas.js
CHANGED
|
@@ -31,6 +31,10 @@ import { meta as meta30 } from "./radio-button-field.ws";
|
|
|
31
31
|
import { meta as meta31 } from "./radio-button.ws";
|
|
32
32
|
import { meta as meta32 } from "./checkbox-field.ws";
|
|
33
33
|
import { meta as meta33 } from "./checkbox.ws";
|
|
34
|
+
import { meta as meta34 } from "./vimeo.ws";
|
|
35
|
+
import { meta as meta35 } from "./vimeo-preview-image.ws";
|
|
36
|
+
import { meta as meta36 } from "./vimeo-play-button.ws";
|
|
37
|
+
import { meta as meta37 } from "./vimeo-spinner.ws";
|
|
34
38
|
export {
|
|
35
39
|
meta21 as Blockquote,
|
|
36
40
|
meta4 as Body,
|
|
@@ -64,5 +68,9 @@ export {
|
|
|
64
68
|
meta27 as SuccessMessage,
|
|
65
69
|
meta15 as Superscript,
|
|
66
70
|
meta6 as TextBlock,
|
|
67
|
-
meta29 as Textarea
|
|
71
|
+
meta29 as Textarea,
|
|
72
|
+
meta34 as Vimeo,
|
|
73
|
+
meta36 as VimeoPlayButton,
|
|
74
|
+
meta35 as VimeoPreviewImage,
|
|
75
|
+
meta37 as VimeoSpinner
|
|
68
76
|
};
|
package/lib/props.js
CHANGED
|
@@ -31,6 +31,10 @@ import { propsMeta as propsMeta30 } from "./radio-button-field.ws";
|
|
|
31
31
|
import { propsMeta as propsMeta31 } from "./radio-button.ws";
|
|
32
32
|
import { propsMeta as propsMeta32 } from "./checkbox-field.ws";
|
|
33
33
|
import { propsMeta as propsMeta33 } from "./checkbox.ws";
|
|
34
|
+
import { propsMeta as propsMeta34 } from "./vimeo.ws";
|
|
35
|
+
import { propsMeta as propsMeta35 } from "./vimeo-preview-image.ws";
|
|
36
|
+
import { propsMeta as propsMeta36 } from "./vimeo-play-button.ws";
|
|
37
|
+
import { propsMeta as propsMeta37 } from "./vimeo-spinner.ws";
|
|
34
38
|
export {
|
|
35
39
|
propsMeta21 as Blockquote,
|
|
36
40
|
propsMeta4 as Body,
|
|
@@ -64,5 +68,9 @@ export {
|
|
|
64
68
|
propsMeta27 as SuccessMessage,
|
|
65
69
|
propsMeta15 as Superscript,
|
|
66
70
|
propsMeta6 as TextBlock,
|
|
67
|
-
propsMeta29 as Textarea
|
|
71
|
+
propsMeta29 as Textarea,
|
|
72
|
+
propsMeta34 as Vimeo,
|
|
73
|
+
propsMeta36 as VimeoPlayButton,
|
|
74
|
+
propsMeta35 as VimeoPreviewImage,
|
|
75
|
+
propsMeta37 as VimeoSpinner
|
|
68
76
|
};
|
package/lib/rich-text-link.ws.js
CHANGED
|
@@ -1,18 +1,11 @@
|
|
|
1
|
-
import { props } from "./__generated__/rich-text-link.props";
|
|
2
1
|
import { meta as linkMeta, propsMeta as linkPropsMeta } from "./link.ws";
|
|
3
|
-
const { category, ...linkMetaRest } = linkMeta;
|
|
4
2
|
const meta = {
|
|
5
|
-
...
|
|
3
|
+
...linkMeta,
|
|
4
|
+
category: "hidden",
|
|
6
5
|
type: "rich-text-child",
|
|
7
6
|
template: []
|
|
8
7
|
};
|
|
9
|
-
const propsMeta =
|
|
10
|
-
initialProps: linkPropsMeta.initialProps,
|
|
11
|
-
props: {
|
|
12
|
-
...props,
|
|
13
|
-
href: linkPropsMeta.props.href
|
|
14
|
-
}
|
|
15
|
-
};
|
|
8
|
+
const propsMeta = linkPropsMeta;
|
|
16
9
|
export {
|
|
17
10
|
meta,
|
|
18
11
|
propsMeta
|
package/lib/types/box.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ComponentProps } from "react";
|
|
2
|
-
declare const defaultTag = "div";
|
|
2
|
+
export declare const defaultTag = "div";
|
|
3
3
|
type Props = ComponentProps<typeof defaultTag> & {
|
|
4
4
|
tag?: "div" | "header" | "footer" | "nav" | "main" | "section" | "article" | "aside" | "address" | "figure";
|
|
5
5
|
};
|
|
@@ -31,3 +31,7 @@ export { RadioButtonField } from "./radio-button-field";
|
|
|
31
31
|
export { RadioButton } from "./radio-button";
|
|
32
32
|
export { CheckboxField } from "./checkbox-field";
|
|
33
33
|
export { Checkbox } from "./checkbox";
|
|
34
|
+
export { Vimeo } from "./vimeo";
|
|
35
|
+
export { VimeoPreviewImage } from "./vimeo-preview-image";
|
|
36
|
+
export { VimeoPlayButton } from "./vimeo-play-button";
|
|
37
|
+
export { VimeoSpinner } from "./vimeo-spinner";
|
package/lib/types/image.ws.d.ts
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
1
|
import { type WsComponentMeta, type WsComponentPropsMeta } from "@webstudio-is/react-sdk";
|
|
2
2
|
export declare const meta: WsComponentMeta;
|
|
3
|
+
export declare const propsOverrides: {
|
|
4
|
+
readonly src: {
|
|
5
|
+
readonly type: "string";
|
|
6
|
+
readonly control: "file";
|
|
7
|
+
readonly label: "Source";
|
|
8
|
+
readonly required: false;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
3
11
|
export declare const propsMeta: WsComponentPropsMeta;
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { ComponentStory, ComponentMeta } from "@storybook/react";
|
|
3
|
-
declare const _default: ComponentMeta<import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "
|
|
4
|
-
href?: string | undefined;
|
|
3
|
+
declare const _default: ComponentMeta<import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "target"> & {
|
|
5
4
|
target?: "_self" | "_blank" | "_parent" | "_top" | undefined;
|
|
6
|
-
prefetch?: "none" | "intent" | "render" | undefined;
|
|
7
5
|
}, "ref"> & import("react").RefAttributes<HTMLAnchorElement>>>;
|
|
8
6
|
export default _default;
|
|
9
|
-
export declare const LinkBlock: ComponentStory<import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "
|
|
10
|
-
href?: string | undefined;
|
|
7
|
+
export declare const LinkBlock: ComponentStory<import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "target"> & {
|
|
11
8
|
target?: "_self" | "_blank" | "_parent" | "_top" | undefined;
|
|
12
|
-
prefetch?: "none" | "intent" | "render" | undefined;
|
|
13
9
|
}, "ref"> & import("react").RefAttributes<HTMLAnchorElement>>>;
|
package/lib/types/link.d.ts
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { type ComponentProps } from "react";
|
|
2
2
|
export declare const defaultTag = "a";
|
|
3
|
-
type Props = Omit<ComponentProps<"a">, "
|
|
4
|
-
href?: string;
|
|
3
|
+
type Props = Omit<ComponentProps<"a">, "target"> & {
|
|
5
4
|
target?: "_self" | "_blank" | "_parent" | "_top";
|
|
6
|
-
prefetch?: "none" | "intent" | "render";
|
|
7
5
|
};
|
|
8
6
|
export declare const Link: import("react").ForwardRefExoticComponent<Omit<Props, "ref"> & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
9
7
|
export {};
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { ComponentStory, ComponentMeta } from "@storybook/react";
|
|
3
|
-
declare const _default: ComponentMeta<import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "
|
|
4
|
-
href?: string | undefined;
|
|
3
|
+
declare const _default: ComponentMeta<import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "target"> & {
|
|
5
4
|
target?: "_self" | "_blank" | "_parent" | "_top" | undefined;
|
|
6
|
-
prefetch?: "none" | "intent" | "render" | undefined;
|
|
7
5
|
}, "ref"> & import("react").RefAttributes<HTMLAnchorElement>>>;
|
|
8
6
|
export default _default;
|
|
9
|
-
export declare const Link: ComponentStory<import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "
|
|
10
|
-
href?: string | undefined;
|
|
7
|
+
export declare const Link: ComponentStory<import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "target"> & {
|
|
11
8
|
target?: "_self" | "_blank" | "_parent" | "_top" | undefined;
|
|
12
|
-
prefetch?: "none" | "intent" | "render" | undefined;
|
|
13
9
|
}, "ref"> & import("react").RefAttributes<HTMLAnchorElement>>>;
|
package/lib/types/metas.d.ts
CHANGED
|
@@ -31,3 +31,7 @@ export { meta as RadioButtonField } from "./radio-button-field.ws";
|
|
|
31
31
|
export { meta as RadioButton } from "./radio-button.ws";
|
|
32
32
|
export { meta as CheckboxField } from "./checkbox-field.ws";
|
|
33
33
|
export { meta as Checkbox } from "./checkbox.ws";
|
|
34
|
+
export { meta as Vimeo } from "./vimeo.ws";
|
|
35
|
+
export { meta as VimeoPreviewImage } from "./vimeo-preview-image.ws";
|
|
36
|
+
export { meta as VimeoPlayButton } from "./vimeo-play-button.ws";
|
|
37
|
+
export { meta as VimeoSpinner } from "./vimeo-spinner.ws";
|
package/lib/types/props.d.ts
CHANGED
|
@@ -31,3 +31,7 @@ export { propsMeta as RadioButtonField } from "./radio-button-field.ws";
|
|
|
31
31
|
export { propsMeta as RadioButton } from "./radio-button.ws";
|
|
32
32
|
export { propsMeta as CheckboxField } from "./checkbox-field.ws";
|
|
33
33
|
export { propsMeta as Checkbox } from "./checkbox.ws";
|
|
34
|
+
export { propsMeta as Vimeo } from "./vimeo.ws";
|
|
35
|
+
export { propsMeta as VimeoPreviewImage } from "./vimeo-preview-image.ws";
|
|
36
|
+
export { propsMeta as VimeoPlayButton } from "./vimeo-play-button.ws";
|
|
37
|
+
export { propsMeta as VimeoSpinner } from "./vimeo-spinner.ws";
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { ComponentStory, ComponentMeta } from "@storybook/react";
|
|
3
|
-
declare const _default: ComponentMeta<import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "
|
|
4
|
-
href?: string | undefined;
|
|
3
|
+
declare const _default: ComponentMeta<import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "target"> & {
|
|
5
4
|
target?: "_self" | "_blank" | "_parent" | "_top" | undefined;
|
|
6
|
-
prefetch?: "none" | "intent" | "render" | undefined;
|
|
7
5
|
}, "ref"> & import("react").RefAttributes<HTMLAnchorElement>>>;
|
|
8
6
|
export default _default;
|
|
9
|
-
export declare const RichTextLink: ComponentStory<import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "
|
|
10
|
-
href?: string | undefined;
|
|
7
|
+
export declare const RichTextLink: ComponentStory<import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "target"> & {
|
|
11
8
|
target?: "_self" | "_blank" | "_parent" | "_top" | undefined;
|
|
12
|
-
prefetch?: "none" | "intent" | "render" | undefined;
|
|
13
9
|
}, "ref"> & import("react").RefAttributes<HTMLAnchorElement>>>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { defaultTag } from "./button";
|
|
3
|
+
export { defaultTag };
|
|
4
|
+
export declare const VimeoPlayButton: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
5
|
+
innerText?: string | undefined;
|
|
6
|
+
}, "ref"> & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { ComponentStory, ComponentMeta } from "@storybook/react";
|
|
3
|
+
declare const _default: ComponentMeta<import("react").ForwardRefExoticComponent<Omit<Omit<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
4
|
+
innerText?: string | undefined;
|
|
5
|
+
}, "ref"> & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>>;
|
|
6
|
+
export default _default;
|
|
7
|
+
export declare const VimeoPlayButton: ComponentStory<import("react").ForwardRefExoticComponent<Omit<Omit<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
8
|
+
innerText?: string | undefined;
|
|
9
|
+
}, "ref"> & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const VimeoPreviewImage: import("react").ForwardRefExoticComponent<Omit<Omit<Omit<import("react").ClassAttributes<HTMLImageElement> & import("react").ImgHTMLAttributes<HTMLImageElement> & {
|
|
3
|
+
quality?: number | undefined;
|
|
4
|
+
optimize?: boolean | undefined;
|
|
5
|
+
loader: import("@webstudio-is/image").ImageLoader;
|
|
6
|
+
}, "ref"> & import("react").RefAttributes<HTMLImageElement>, "ref"> & import("react").RefAttributes<HTMLImageElement>, "ref"> & import("react").RefAttributes<HTMLImageElement>>;
|