@measured/puck 0.1.4 → 0.1.6

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/dist/index.css ADDED
@@ -0,0 +1,611 @@
1
+ @import "https://rsms.me/inter/inter.css";
2
+
3
+ /* styles/color.css */
4
+ :root {
5
+ --puck-color-neutral-0: #fafafa;
6
+ --puck-color-neutral-1: #f3f3f3;
7
+ --puck-color-neutral-2: #e7e5e5;
8
+ --puck-color-neutral-3: #9e9e9e;
9
+ --puck-color-neutral-4: #2d2d2d;
10
+ --puck-color-neutral-blue: #10131c;
11
+ --puck-color-blue: var(--puck-color-azure-3);
12
+ --puck-color-rose: var(--puck-color-rose-3);
13
+ --puck-color-red: var(--puck-color-red-3);
14
+ --puck-color-rose-0: #4a001c;
15
+ --puck-color-rose-1: #670833;
16
+ --puck-color-rose-2: #87114c;
17
+ --puck-color-rose-3: #a81a66;
18
+ --puck-color-rose-4: #bc5089;
19
+ --puck-color-rose-5: #cc7ca5;
20
+ --puck-color-rose-6: #d89aba;
21
+ --puck-color-rose-7: #e3b8cf;
22
+ --puck-color-rose-8: #efd6e3;
23
+ --puck-color-rose-9: #faf4f8;
24
+ --puck-color-azure-0: #00175d;
25
+ --puck-color-azure-1: #002c77;
26
+ --puck-color-azure-2: #014292;
27
+ --puck-color-azure-3: #0158ad;
28
+ --puck-color-azure-4: #3479be;
29
+ --puck-color-azure-5: #6499cf;
30
+ --puck-color-azure-6: #88b0da;
31
+ --puck-color-azure-7: #abc7e5;
32
+ --puck-color-azure-8: #cfdff0;
33
+ --puck-color-azure-9: #f3f6fb;
34
+ --puck-color-green-0: #002000;
35
+ --puck-color-green-1: #043604;
36
+ --puck-color-green-2: #084e08;
37
+ --puck-color-green-3: #0c680c;
38
+ --puck-color-green-4: #1d882f;
39
+ --puck-color-green-5: #2faa53;
40
+ --puck-color-green-6: #56c16f;
41
+ --puck-color-green-7: #7dd78b;
42
+ --puck-color-green-8: #b8e8bf;
43
+ --puck-color-green-9: #eff8f0;
44
+ --puck-color-yellow-0: #211000;
45
+ --puck-color-yellow-1: #362700;
46
+ --puck-color-yellow-2: #4c4000;
47
+ --puck-color-yellow-3: #645a00;
48
+ --puck-color-yellow-4: #877614;
49
+ --puck-color-yellow-5: #ab9429;
50
+ --puck-color-yellow-6: #bfac4e;
51
+ --puck-color-yellow-7: #d4c474;
52
+ --puck-color-yellow-8: #e6deb1;
53
+ --puck-color-yellow-9: #f9f7ed;
54
+ --puck-color-red-0: #4c0000;
55
+ --puck-color-red-1: #6a0a10;
56
+ --puck-color-red-2: #8a1422;
57
+ --puck-color-red-3: #ac1f35;
58
+ --puck-color-red-4: #bf5366;
59
+ --puck-color-red-5: #ce7e8e;
60
+ --puck-color-red-6: #d99ca8;
61
+ --puck-color-red-7: #e4b9c2;
62
+ --puck-color-red-8: #efd7db;
63
+ --puck-color-red-9: #faf4f5;
64
+ --puck-color-grey-0: #111111;
65
+ --puck-color-grey-1: #282828;
66
+ --puck-color-grey-2: #404040;
67
+ --puck-color-grey-3: #5a5a5a;
68
+ --puck-color-grey-4: #767676;
69
+ --puck-color-grey-5: #949494;
70
+ --puck-color-grey-6: #ababab;
71
+ --puck-color-grey-7: #c3c3c3;
72
+ --puck-color-grey-8: #dcdcdc;
73
+ --puck-color-grey-9: #f5f5f5;
74
+ --puck-color-grey-10: #fafafa;
75
+ --puck-color-black: #000000;
76
+ --puck-color-white: #ffffff;
77
+ }
78
+
79
+ /* styles/typography.css */
80
+ :root {
81
+ --puck-font-size-scale-base-unitless: 12;
82
+ --puck-font-size-xxxs-unitless: 12;
83
+ --puck-font-size-xxs-unitless: 14;
84
+ --puck-font-size-xs-unitless: 16;
85
+ --puck-font-size-s-unitless: 18;
86
+ --puck-font-size-m-unitless: 21;
87
+ --puck-font-size-l-unitless: 24;
88
+ --puck-font-size-xl-unitless: 28;
89
+ --puck-font-size-xxl-unitless: 36;
90
+ --puck-font-size-xxxl-unitless: 48;
91
+ --puck-font-size-xxxxl-unitless: 56;
92
+ --puck-font-size-xxxs: calc(1rem * var(--puck-font-size-xxxs-unitless) / 16);
93
+ --puck-font-size-xxs: calc(1rem * var(--puck-font-size-xxs-unitless) / 16);
94
+ --puck-font-size-xs: calc(1rem * var(--puck-font-size-xs-unitless) / 16);
95
+ --puck-font-size-s: calc(1rem * var(--puck-font-size-s-unitless) / 16);
96
+ --puck-font-size-m: calc(1rem * var(--puck-font-size-m-unitless) / 16);
97
+ --puck-font-size-l: calc(1rem * var(--puck-font-size-l-unitless) / 16);
98
+ --puck-font-size-xl: calc(1rem * var(--puck-font-size-xl-unitless) / 16);
99
+ --puck-font-size-xxl: calc(1rem * var(--puck-font-size-xxl-unitless) / 16);
100
+ --puck-font-size-xxxl: calc(1rem * var(--puck-font-size-xxxl-unitless) / 16);
101
+ --puck-font-size-xxxxl: calc( 1rem * var(--puck-font-size-xxxxl-unitless) / 16 );
102
+ --puck-font-size-base: var(--puck-font-size-xs);
103
+ --line-height-reset: 1;
104
+ --line-height-xs: calc( var(--space-m-unitless) / var(--puck-font-size-m-unitless) );
105
+ --line-height-s: calc( var(--space-m-unitless) / var(--puck-font-size-s-unitless) );
106
+ --line-height-m: calc( var(--space-m-unitless) / var(--puck-font-size-xs-unitless) );
107
+ --line-height-l: calc( var(--space-m-unitless) / var(--puck-font-size-xxs-unitless) );
108
+ --line-height-xl: calc( var(--space-m-unitless) / var(--puck-font-size-scale-base-unitless) );
109
+ --line-height-base: var(--line-height-m);
110
+ --puck-font-stack:
111
+ Inter,
112
+ -apple-system,
113
+ BlinkMacSystemFont,
114
+ Segoe UI,
115
+ Helvetica Neue,
116
+ sans-serif,
117
+ Apple Color Emoji,
118
+ Segoe UI Emoji,
119
+ Segoe UI Symbol;
120
+ --puck-font-stack-variable:
121
+ "Inter var",
122
+ -apple-system,
123
+ BlinkMacSystemFont,
124
+ Segoe UI,
125
+ Helvetica Neue,
126
+ sans-serif,
127
+ Apple Color Emoji,
128
+ Segoe UI Emoji,
129
+ Segoe UI Symbol;
130
+ --puck-font-family-monospaced:
131
+ "Menlo",
132
+ "Monaco",
133
+ "Liberation Mono",
134
+ "Consolas",
135
+ "Courier New",
136
+ monospace;
137
+ --puck-font-family-proportional: var(--puck-font-stack), sans-serif;
138
+ }
139
+
140
+ /* styles/global.css */
141
+
142
+ /* css-module:/home/runner/work/puck/puck/packages/core/components/DraggableComponent/styles.module.css/#css-module-data */
143
+ ._DraggableComponent_10y0g_1 {
144
+ position: relative;
145
+ }
146
+ ._DraggableComponent-contents_10y0g_5 {
147
+ position: relative;
148
+ }
149
+ ._DraggableComponent-overlay_10y0g_9 {
150
+ display: none;
151
+ height: 100%;
152
+ width: 100%;
153
+ top: 0;
154
+ position: absolute;
155
+ z-index: 1;
156
+ font-family: var(--puck-font-stack);
157
+ }
158
+ ._DraggableComponent_10y0g_1:hover ._DraggableComponent-overlay_10y0g_9 {
159
+ display: block;
160
+ background-color: #cdcdcd50;
161
+ box-shadow: inset 0 0 0 4px var(--puck-color-azure-6);
162
+ }
163
+ ._DraggableComponent--isModifierHeld_10y0g_25:hover ._DraggableComponent-overlay_10y0g_9 {
164
+ display: none;
165
+ }
166
+ ._DraggableComponent--isSelected_10y0g_29 ._DraggableComponent-overlay_10y0g_9 {
167
+ box-shadow: inset 0 0 0 4px var(--puck-color-azure-6);
168
+ display: block;
169
+ }
170
+ ._DraggableComponent-actions_10y0g_34 {
171
+ display: none;
172
+ }
173
+ ._DraggableComponent_10y0g_1:hover ._DraggableComponent-actions_10y0g_34 {
174
+ position: absolute;
175
+ right: 0;
176
+ padding: 8px;
177
+ border-bottom-left-radius: 8px;
178
+ background: white;
179
+ display: flex;
180
+ gap: 4px;
181
+ border: 1px solid var(--puck-color-grey-8);
182
+ }
183
+ ._DraggableComponent-actionsLabel_10y0g_49 {
184
+ display: flex;
185
+ justify-content: center;
186
+ align-items: center;
187
+ padding-left: 12px;
188
+ padding-right: 16px;
189
+ margin-right: 8px;
190
+ border-right: 1px solid var(--puck-color-grey-8);
191
+ }
192
+ ._DraggableComponent-action_10y0g_34 {
193
+ background: transparent;
194
+ border: none;
195
+ color: var(--puck-color-grey-2);
196
+ padding: 8px;
197
+ border-radius: 4px;
198
+ }
199
+ ._DraggableComponent-action_10y0g_34:hover {
200
+ background: var(--puck-color-grey-9);
201
+ color: var(--puck-color-blue);
202
+ cursor: pointer;
203
+ }
204
+
205
+ /* css-module:/home/runner/work/puck/puck/packages/core/components/ExternalInput/styles.module.css/#css-module-data */
206
+ ._ExternalInput_v316c_1 {
207
+ font-family: var(--puck-font-stack);
208
+ }
209
+ ._ExternalInput-actions_v316c_5 {
210
+ display: flex;
211
+ }
212
+ ._ExternalInput-button_v316c_9 {
213
+ background-color: white;
214
+ border: 1px solid var(--puck-color-grey-8);
215
+ border-radius: 4px;
216
+ color: var(--puck-color-blue);
217
+ padding: 12px 16px;
218
+ font-weight: 500;
219
+ white-space: nowrap;
220
+ text-overflow: ellipsis;
221
+ position: relative;
222
+ overflow: hidden;
223
+ }
224
+ ._ExternalInput-button_v316c_9:hover,
225
+ ._ExternalInput-detachButton_v316c_23:hover {
226
+ cursor: pointer;
227
+ background: var(--puck-color-grey-10);
228
+ border-color: var(--puck-color-neutral-3);
229
+ z-index: 1;
230
+ }
231
+ ._ExternalInput--hasData_v316c_30 ._ExternalInput-button_v316c_9 {
232
+ color: var(--puck-color-neutral-4);
233
+ border-top-right-radius: 0px;
234
+ border-bottom-right-radius: 0px;
235
+ }
236
+ ._ExternalInput-detachButton_v316c_23 {
237
+ border: 1px solid var(--puck-color-grey-8);
238
+ border-top-right-radius: 4px;
239
+ border-bottom-right-radius: 4px;
240
+ background-color: var(--puck-color-neutral-1);
241
+ padding: 8px 12px;
242
+ margin-left: -1px;
243
+ }
244
+ ._ExternalInput-modal_v316c_45 {
245
+ background: #00000099;
246
+ display: none;
247
+ justify-content: center;
248
+ align-items: center;
249
+ position: fixed;
250
+ top: 0;
251
+ left: 0;
252
+ bottom: 0;
253
+ right: 0;
254
+ z-index: 1;
255
+ padding: 64px;
256
+ }
257
+ ._ExternalInput--modalVisible_v316c_59 ._ExternalInput-modal_v316c_45 {
258
+ display: flex;
259
+ }
260
+ ._ExternalInput-modalInner_v316c_63 {
261
+ width: 100%;
262
+ max-width: 1024px;
263
+ border-radius: 16px;
264
+ overflow: hidden;
265
+ background: white;
266
+ display: flex;
267
+ flex-direction: column;
268
+ max-height: 90vh;
269
+ }
270
+ ._ExternalInput-modalHeading_v316c_74 {
271
+ background-color: white;
272
+ padding: 32px 24px;
273
+ }
274
+ ._ExternalInput-modalTableWrapper_v316c_79 {
275
+ overflow-x: scroll;
276
+ overflow-y: scroll;
277
+ flex-grow: 1;
278
+ }
279
+ ._ExternalInput_v316c_1 table {
280
+ border-spacing: 0px;
281
+ color: var(--puck-color-neutral-4);
282
+ position: relative;
283
+ }
284
+ ._ExternalInput_v316c_1 thead {
285
+ position: sticky;
286
+ top: 0;
287
+ }
288
+ ._ExternalInput_v316c_1 th {
289
+ background-color: var(--puck-color-grey-1);
290
+ color: white;
291
+ font-weight: 700;
292
+ padding: 16px 24px;
293
+ opacity: 0.9;
294
+ }
295
+ ._ExternalInput_v316c_1 td {
296
+ padding: 16px 24px;
297
+ }
298
+ ._ExternalInput_v316c_1 tr:nth-of-type(n) {
299
+ background-color: white;
300
+ }
301
+ ._ExternalInput_v316c_1 tr:nth-of-type(2n) {
302
+ background-color: var(--puck-color-grey-9);
303
+ }
304
+ ._ExternalInput_v316c_1 tr td:first-of-type {
305
+ font-weight: 500;
306
+ }
307
+ ._ExternalInput_v316c_1 tr:hover {
308
+ background: var(--puck-color-grey-10);
309
+ color: var(--puck-color-azure-4);
310
+ cursor: pointer;
311
+ position: relative;
312
+ margin-left: -5px;
313
+ }
314
+ ._ExternalInput_v316c_1 tr:hover td:first-of-type {
315
+ border-left: 4px solid var(--puck-color-azure-4);
316
+ padding-left: 20px;
317
+ }
318
+
319
+ /* css-module:/home/runner/work/puck/puck/packages/core/components/InputOrGroup/styles.module.css/#css-module-data */
320
+ ._Input_1vwgb_1 {
321
+ display: block;
322
+ font-family: var(--puck-font-stack);
323
+ }
324
+ ._Input_1vwgb_1 * {
325
+ box-sizing: border-box;
326
+ }
327
+ ._Input_1vwgb_1 + ._Input_1vwgb_1 {
328
+ margin-top: 8px;
329
+ }
330
+ ._Input-label_1vwgb_14 {
331
+ margin-bottom: 4px;
332
+ font-size: var(--puck-font-size-xxs);
333
+ font-weight: 500;
334
+ }
335
+ ._Input-input_1vwgb_20 {
336
+ border-width: 1px;
337
+ border-style: solid;
338
+ border-color: var(--puck-color-grey-8);
339
+ border-radius: 4px;
340
+ font-family: inherit;
341
+ padding: 12px 16px;
342
+ width: 100%;
343
+ }
344
+ ._Input_1vwgb_1 select {
345
+ appearance: none;
346
+ background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='%23c3c3c3'><polygon points='0,0 100,0 50,50'/></svg>") no-repeat;
347
+ background-size: 12px;
348
+ background-position: calc(100% - 12px) calc(50% + 3px);
349
+ background-repeat: no-repeat;
350
+ background-color: white;
351
+ }
352
+ ._Input--readOnly_1vwgb_41 ._Input-input_1vwgb_20 {
353
+ background-color: var(--puck-color-grey-9);
354
+ border-color: var(--puck-color-grey-8);
355
+ }
356
+ ._Input-input_1vwgb_20:hover {
357
+ border-color: var(--puck-color-neutral-3);
358
+ }
359
+ ._Input-group_1vwgb_50 {
360
+ background: white;
361
+ border-bottom: var(--puck-color-grey-8) solid 1px;
362
+ }
363
+ ._Input-group_1vwgb_50 > summary {
364
+ padding: 16px;
365
+ position: relative;
366
+ }
367
+ ._Input-group_1vwgb_50 > summary:hover {
368
+ cursor: pointer;
369
+ color: var(--puck-color-blue);
370
+ }
371
+ ._Input-group_1vwgb_50 > fieldset {
372
+ border: none;
373
+ border-top: var(--puck-color-grey-8) solid 1px;
374
+ margin: 0;
375
+ padding: 16px;
376
+ }
377
+ ._Input-group_1vwgb_50 ._Input-action_1vwgb_72 {
378
+ background: transparent;
379
+ border: none;
380
+ color: var(--puck-color-grey-2);
381
+ display: none;
382
+ padding: 8px;
383
+ position: absolute;
384
+ right: 4px;
385
+ top: 4px;
386
+ }
387
+ ._Input-group_1vwgb_50 summary:hover ._Input-action_1vwgb_72 {
388
+ display: block;
389
+ }
390
+ ._Input-group_1vwgb_50 ._Input-action_1vwgb_72:hover {
391
+ background: var(--puck-color-grey-9);
392
+ color: var(--puck-color-blue);
393
+ cursor: pointer;
394
+ }
395
+ ._Input-addButton_1vwgb_93 {
396
+ background-color: white;
397
+ border: none;
398
+ color: var(--puck-color-blue);
399
+ cursor: pointer;
400
+ width: 100%;
401
+ margin: 0;
402
+ padding: 12px 16px;
403
+ }
404
+ ._Input-addButton_1vwgb_93:hover {
405
+ background: var(--puck-color-grey-9);
406
+ }
407
+ ._Input-item_1vwgb_107 {
408
+ border: 1px solid var(--puck-color-grey-8);
409
+ border-radius: 4px;
410
+ margin-top: 4px;
411
+ overflow: hidden;
412
+ }
413
+ ._Input-radioGroup_1vwgb_114 {
414
+ margin-bottom: 8px;
415
+ margin-top: 8px;
416
+ }
417
+ ._Input-radioGroupItems_1vwgb_119 {
418
+ display: flex;
419
+ gap: 8px;
420
+ flex-wrap: wrap;
421
+ }
422
+ ._Input-radio_1vwgb_114 {
423
+ display: flex;
424
+ align-items: center;
425
+ gap: 4px;
426
+ }
427
+
428
+ /* css-module:/home/runner/work/puck/puck/packages/core/components/ComponentList/styles.module.css/#css-module-data */
429
+ ._ComponentList_91nmt_1 {
430
+ display: grid;
431
+ font-family: var(--puck-font-stack);
432
+ grid-template-columns: 1fr;
433
+ max-width: 100%;
434
+ grid-gap: 12px;
435
+ }
436
+ ._ComponentList-item_91nmt_9,
437
+ ._ComponentList-itemShadow_91nmt_10 {
438
+ background: white;
439
+ padding: 12px;
440
+ padding-top: 12px;
441
+ display: flex;
442
+ border: 1px var(--puck-color-grey-8) solid;
443
+ border-radius: 8px;
444
+ font-size: var(--puck-font-size-xxs);
445
+ justify-content: space-between;
446
+ align-items: center;
447
+ gap: 12px;
448
+ cursor: grab;
449
+ }
450
+ ._ComponentList-itemIcon_91nmt_24 {
451
+ color: var(--puck-color-grey-4);
452
+ }
453
+ ._ComponentList-item_91nmt_9:hover {
454
+ background-color: var(--puck-color-azure-9);
455
+ }
456
+
457
+ /* css-module:/home/runner/work/puck/puck/packages/core/components/OutlineList/styles.module.css/#css-module-data */
458
+ ._OutlineList_gor6f_1 {
459
+ color: var(--puck-color-grey-2);
460
+ font-family: var(--puck-font-stack);
461
+ margin: 0;
462
+ margin-left: 16px;
463
+ padding-left: 16px;
464
+ position: relative;
465
+ list-style: none;
466
+ }
467
+ ._OutlineList_gor6f_1::before {
468
+ background: var(--puck-color-grey-7);
469
+ position: absolute;
470
+ left: -1px;
471
+ top: 0px;
472
+ width: 1px;
473
+ height: calc(100% - 9px);
474
+ content: "";
475
+ }
476
+ ._OutlineList_gor6f_1 li {
477
+ position: relative;
478
+ margin-bottom: 4px;
479
+ }
480
+ ._OutlineList_gor6f_1 li::before {
481
+ background: var(--puck-color-grey-7);
482
+ position: absolute;
483
+ left: -17px;
484
+ top: 9px;
485
+ width: 13px;
486
+ height: 1px;
487
+ content: "";
488
+ }
489
+ ._OutlineList_gor6f_1 ._OutlineList-clickableItem_gor6f_36:hover {
490
+ color: var(--puck-color-blue);
491
+ cursor: pointer;
492
+ }
493
+ ._OutlineList_gor6f_1 li > ._OutlineList_gor6f_1 {
494
+ margin: 8px;
495
+ }
496
+
497
+ /* css-module:/home/runner/work/puck/puck/packages/core/components/Button/Button.module.css/#css-module-data */
498
+ ._Button_1bqmn_1 {
499
+ appearance: none;
500
+ background: none;
501
+ border: none;
502
+ border-radius: 4px;
503
+ color: white;
504
+ display: block;
505
+ letter-spacing: 0.05ch;
506
+ font-size: 14px;
507
+ font-weight: 600;
508
+ padding-bottom: 12px;
509
+ padding-left: 20px;
510
+ padding-right: 20px;
511
+ padding-top: 12px;
512
+ text-align: center;
513
+ text-decoration: none;
514
+ cursor: pointer;
515
+ white-space: nowrap;
516
+ }
517
+ ._Button_1bqmn_1:hover {
518
+ text-decoration: none;
519
+ }
520
+ ._Button--primary_1bqmn_25 {
521
+ background: var(--puck-color-blue);
522
+ }
523
+ ._Button--primary_1bqmn_25:hover {
524
+ opacity: 0.7;
525
+ transition: opacity 50ms ease-in;
526
+ }
527
+ ._Button--secondary_1bqmn_34 {
528
+ color: currentColor;
529
+ border: 1px solid currentColor;
530
+ }
531
+ ._Button--secondary_1bqmn_34:hover {
532
+ background-color: var(--puck-color-grey-10);
533
+ color: black;
534
+ opacity: 0.7;
535
+ }
536
+ ._Button--flush_1bqmn_45 {
537
+ border-radius: 0;
538
+ }
539
+ ._Button--disabled_1bqmn_49 {
540
+ background: var(--puck-color-grey-10);
541
+ color: black;
542
+ cursor: not-allowed;
543
+ }
544
+ ._Button--disabled_1bqmn_49:hover {
545
+ opacity: 1;
546
+ }
547
+ ._Button--fullWidth_1bqmn_59 {
548
+ width: 100%;
549
+ }
550
+
551
+ /* css-module:/home/runner/work/puck/puck/packages/core/components/SidebarSection/styles.module.css/#css-module-data */
552
+ ._SidebarSection_jsf8x_1:last-of-type ._SidebarSection-content_jsf8x_1 {
553
+ border-bottom: none;
554
+ height: 100%;
555
+ }
556
+ ._SidebarSection-title_jsf8x_6 {
557
+ background: white;
558
+ padding: 16px;
559
+ border-bottom: 1px solid var(--puck-color-grey-8);
560
+ }
561
+ ._SidebarSection-title_jsf8x_6:hover {
562
+ opacity: 0.6;
563
+ cursor: pointer;
564
+ }
565
+ ._SidebarSection-content_jsf8x_1 {
566
+ border-bottom: 1px solid var(--puck-color-grey-8);
567
+ padding: 16px;
568
+ }
569
+ ._SidebarSection_jsf8x_1 > summary {
570
+ list-style: none;
571
+ }
572
+ ._SidebarSection_jsf8x_1 > summary::-webkit-details-marker {
573
+ display: none;
574
+ }
575
+
576
+ /* css-module:/home/runner/work/puck/puck/packages/core/components/Heading/styles.module.css/#css-module-data */
577
+ ._Heading_1y35v_1 {
578
+ display: block;
579
+ font-family: var(--puck-font-stack);
580
+ font-weight: 700;
581
+ margin: 0;
582
+ }
583
+ ._Heading_1y35v_1 b {
584
+ font-weight: 700;
585
+ }
586
+ ._Heading--xxxxl_1y35v_12 {
587
+ font-size: var(--puck-font-size-xxxxl);
588
+ letter-spacing: 0.08ch;
589
+ font-weight: 800;
590
+ }
591
+ ._Heading--xxxl_1y35v_18 {
592
+ font-size: var(--puck-font-size-xxxl);
593
+ }
594
+ ._Heading--xxl_1y35v_22 {
595
+ font-size: var(--puck-font-size-xxl);
596
+ }
597
+ ._Heading--xl_1y35v_26 {
598
+ font-size: var(--puck-font-size-xl);
599
+ }
600
+ ._Heading--l_1y35v_30 {
601
+ font-size: var(--puck-font-size-l);
602
+ }
603
+ ._Heading--m_1y35v_34 {
604
+ font-size: var(--puck-font-size-m);
605
+ }
606
+ ._Heading--s_1y35v_38 {
607
+ font-size: var(--puck-font-size-s);
608
+ }
609
+ ._Heading--xs_1y35v_42 {
610
+ font-size: var(--puck-font-size-xs);
611
+ }
@@ -0,0 +1,117 @@
1
+ import { ReactNode, ReactElement } from 'react';
2
+ import * as react_jsx_runtime from 'react/jsx-runtime';
3
+
4
+ type Adaptor<AdaptorParams = {}> = {
5
+ name: string;
6
+ fetchList: (adaptorParams?: AdaptorParams) => Promise<Record<string, any>[] | null>;
7
+ };
8
+ type Field<Props extends {
9
+ [key: string]: any;
10
+ } = {
11
+ [key: string]: any;
12
+ }> = {
13
+ type: "text" | "textarea" | "number" | "select" | "group" | "external" | "radio";
14
+ label?: string;
15
+ adaptor?: Adaptor;
16
+ adaptorParams?: object;
17
+ groupFields?: {
18
+ [SubPropName in keyof Props]: Field<Props[SubPropName]>;
19
+ };
20
+ getItemSummary?: (item: Props, index: number) => string;
21
+ defaultItemProps?: Props;
22
+ options?: {
23
+ label: string;
24
+ value: string | number;
25
+ }[];
26
+ };
27
+ type DefaultPageProps = {
28
+ children: ReactNode;
29
+ title: string;
30
+ editMode: boolean;
31
+ [key: string]: any;
32
+ };
33
+ type DefaultComponentProps = {
34
+ [key: string]: any;
35
+ editMode?: boolean;
36
+ };
37
+ type Fields<ComponentProps extends DefaultComponentProps = DefaultComponentProps> = {
38
+ [PropName in keyof Omit<Required<ComponentProps>, "children" | "editMode">]: Field<ComponentProps[PropName][0]>;
39
+ };
40
+ type ComponentConfig<ComponentProps extends DefaultComponentProps = DefaultComponentProps> = {
41
+ render: (props: ComponentProps) => ReactElement;
42
+ defaultProps?: ComponentProps;
43
+ fields?: Fields<ComponentProps>;
44
+ };
45
+ type Config<Props extends {
46
+ [key: string]: any;
47
+ } = {
48
+ [key: string]: any;
49
+ }, PageProps extends DefaultPageProps = DefaultPageProps> = {
50
+ components: {
51
+ [ComponentName in keyof Props]: ComponentConfig<Props[ComponentName]>;
52
+ };
53
+ page?: ComponentConfig<PageProps & {
54
+ children: ReactNode;
55
+ }>;
56
+ };
57
+ type MappedItem<Props extends {
58
+ [key: string]: any;
59
+ } = {
60
+ [key: string]: any;
61
+ }> = {
62
+ type: keyof Props;
63
+ props: {
64
+ [key: string]: any;
65
+ } & {
66
+ id: string;
67
+ };
68
+ };
69
+ type Data<Props extends {
70
+ [key: string]: any;
71
+ } = {
72
+ [key: string]: any;
73
+ }, PageProps extends {
74
+ title: string;
75
+ [key: string]: any;
76
+ } = {
77
+ title: string;
78
+ [key: string]: any;
79
+ }> = {
80
+ page: PageProps;
81
+ content: MappedItem<Props>[];
82
+ };
83
+
84
+ type Plugin = {
85
+ renderPageFields?: (props: {
86
+ children: ReactNode;
87
+ data: Data;
88
+ }) => ReactElement<any>;
89
+ renderPage?: (props: {
90
+ children: ReactNode;
91
+ data: Data;
92
+ }) => ReactElement<any>;
93
+ renderFields?: (props: {
94
+ children: ReactNode;
95
+ data: Data;
96
+ }) => ReactElement<any>;
97
+ };
98
+
99
+ declare function Puck({ config, data: initialData, onChange, onPublish, plugins, renderHeader, }: {
100
+ config: Config;
101
+ data: Data;
102
+ onChange?: (data: Data) => void;
103
+ onPublish: (data: Data) => void;
104
+ plugins?: Plugin[];
105
+ renderHeader?: (props: {
106
+ children: ReactNode;
107
+ data: Data;
108
+ setData: (data: Data) => void;
109
+ }) => ReactElement;
110
+ }): react_jsx_runtime.JSX.Element;
111
+
112
+ declare function Render({ config, data }: {
113
+ config: Config;
114
+ data: Data;
115
+ }): react_jsx_runtime.JSX.Element;
116
+
117
+ export { Adaptor, ComponentConfig, Config, Data, DefaultComponentProps, DefaultPageProps, Field, Fields, Puck, Render };