@measured/puck 0.21.0-canary.77444503 → 0.21.0-canary.7c2f9283

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.
Files changed (46) hide show
  1. package/dist/{Editor-O447AVCX.mjs → Editor-32UYWE6W.mjs} +10 -10
  2. package/dist/{Editor-F2LSS6SE.css → Editor-IQP25PUX.css} +28 -27
  3. package/dist/{Render-QEMDIDQC.css → Render-3OV4N4MT.css} +28 -27
  4. package/dist/{Render-OFE6QLI2.mjs → Render-FXZX6NFH.mjs} +1 -1
  5. package/dist/{actions-ONhOkrvf.d.mts → actions-BkBoKAc5.d.mts} +26 -10
  6. package/dist/{actions-ONhOkrvf.d.ts → actions-BkBoKAc5.d.ts} +26 -10
  7. package/dist/{chunk-QAWJTCV5.mjs → chunk-3VQHXASI.mjs} +1 -1
  8. package/dist/{chunk-BSDEIOEK.mjs → chunk-6KNQXLQR.mjs} +10 -8
  9. package/dist/{chunk-CSSRLPHM.mjs → chunk-AOEDIUVK.mjs} +1 -1
  10. package/dist/{chunk-4277WLKB.mjs → chunk-FCCNEDWR.mjs} +4373 -3687
  11. package/dist/{chunk-PLXSMBAA.mjs → chunk-GVKHZNTR.mjs} +1 -1
  12. package/dist/{chunk-DAQLMM2T.mjs → chunk-K562SEXI.mjs} +97 -6
  13. package/dist/{chunk-QBGM4ELA.mjs → chunk-KN3XDS7U.mjs} +1 -1
  14. package/dist/{chunk-62AAYNXG.mjs → chunk-MEL7FUSF.mjs} +1 -1
  15. package/dist/{chunk-Y656T6AQ.mjs → chunk-NYGQH27S.mjs} +100 -74
  16. package/dist/{chunk-NLUHDYVR.mjs → chunk-Q3TJ2VYO.mjs} +23 -3
  17. package/dist/{chunk-T3WX7XJ6.mjs → chunk-REWRIUGR.mjs} +33 -9
  18. package/dist/{chunk-2Q4PACDA.mjs → chunk-V2IQTPPK.mjs} +4 -4
  19. package/dist/{full-BEMDJKDS.mjs → full-4OS3O57Y.mjs} +8 -8
  20. package/dist/{index-BEoNHRI1.d.ts → index-bqD1SEOb.d.mts} +3 -1
  21. package/dist/{index-DfxZ7tZF.d.mts → index-lt1zf5WR.d.ts} +3 -1
  22. package/dist/index.css +732 -341
  23. package/dist/index.d.mts +28 -9
  24. package/dist/index.d.ts +28 -9
  25. package/dist/index.js +3340 -2427
  26. package/dist/index.mjs +21 -18
  27. package/dist/internal.d.mts +2 -2
  28. package/dist/internal.d.ts +2 -2
  29. package/dist/internal.js +22 -3
  30. package/dist/internal.mjs +2 -2
  31. package/dist/{loaded-JU3A7Y4L.mjs → loaded-DCQVLO7I.mjs} +5 -5
  32. package/dist/{loaded-N3FYGF2Y.mjs → loaded-JGRO7BH7.mjs} +5 -5
  33. package/dist/{loaded-OBY7OMS6.mjs → loaded-KKVJE5KH.mjs} +5 -5
  34. package/dist/no-external.css +870 -475
  35. package/dist/no-external.d.mts +4 -4
  36. package/dist/no-external.d.ts +4 -4
  37. package/dist/no-external.js +3347 -2431
  38. package/dist/no-external.mjs +20 -12
  39. package/dist/rsc.css +28 -27
  40. package/dist/rsc.d.mts +2 -2
  41. package/dist/rsc.d.ts +2 -2
  42. package/dist/rsc.js +146 -83
  43. package/dist/rsc.mjs +4 -4
  44. package/dist/{walk-tree-CdriEzFJ.d.mts → walk-tree-CRRDqx6_.d.mts} +1 -1
  45. package/dist/{walk-tree-DHbAZ4wF.d.ts → walk-tree-CS7sEpfG.d.ts} +1 -1
  46. package/package.json +1 -1
@@ -4,20 +4,20 @@ import {
4
4
  import {
5
5
  EditorInner,
6
6
  LoadedRichTextMenu
7
- } from "./chunk-2Q4PACDA.mjs";
8
- import "./chunk-CSSRLPHM.mjs";
9
- import "./chunk-BSDEIOEK.mjs";
10
- import "./chunk-PLXSMBAA.mjs";
11
- import "./chunk-62AAYNXG.mjs";
12
- import "./chunk-QAWJTCV5.mjs";
7
+ } from "./chunk-V2IQTPPK.mjs";
8
+ import "./chunk-AOEDIUVK.mjs";
9
+ import "./chunk-6KNQXLQR.mjs";
10
+ import "./chunk-GVKHZNTR.mjs";
11
+ import "./chunk-MEL7FUSF.mjs";
12
+ import "./chunk-3VQHXASI.mjs";
13
13
  import {
14
14
  useAppStore,
15
15
  useAppStoreApi
16
- } from "./chunk-DAQLMM2T.mjs";
17
- import "./chunk-QBGM4ELA.mjs";
18
- import "./chunk-T3WX7XJ6.mjs";
16
+ } from "./chunk-K562SEXI.mjs";
17
+ import "./chunk-KN3XDS7U.mjs";
18
+ import "./chunk-REWRIUGR.mjs";
19
19
  import "./chunk-Y2EFNT5P.mjs";
20
- import "./chunk-NLUHDYVR.mjs";
20
+ import "./chunk-Q3TJ2VYO.mjs";
21
21
  import {
22
22
  __spreadProps,
23
23
  __spreadValues,
@@ -301,46 +301,46 @@
301
301
  }
302
302
 
303
303
  /* css-module:/home/runner/work/puck/puck/packages/core/components/RichTextEditor/styles.module.css/#css-module-data */
304
- ._RichTextEditor_1elol_1 .ProseMirror {
304
+ ._RichTextEditor_z25h4_1 .ProseMirror {
305
305
  white-space: pre-wrap;
306
306
  word-wrap: break-word;
307
307
  cursor: text;
308
308
  outline: none;
309
309
  position: relative;
310
310
  }
311
- ._RichTextEditor_1elol_1 .rich-text * {
311
+ ._RichTextEditor_z25h4_1 .rich-text * {
312
312
  white-space: pre-wrap;
313
313
  user-select: auto;
314
314
  -webkit-user-select: auto;
315
315
  }
316
- ._RichTextEditor_1elol_1 .rich-text blockquote {
316
+ ._RichTextEditor_z25h4_1 .rich-text blockquote {
317
317
  margin: 1em 0;
318
318
  padding: 0 1em;
319
319
  border-left: 4px solid var(--puck-color-grey-09);
320
320
  }
321
- ._RichTextEditor_1elol_1 .rich-text code {
321
+ ._RichTextEditor_z25h4_1 .rich-text code {
322
322
  background-color: var(--puck-color-grey-11);
323
323
  padding: 4px 8px;
324
324
  border-radius: 4px;
325
325
  }
326
- ._RichTextEditor_1elol_1 .rich-text p:empty::before {
326
+ ._RichTextEditor_z25h4_1 .rich-text p:empty::before {
327
327
  content: "\a0";
328
328
  }
329
- ._RichTextEditor_1elol_1 .rich-text pre code {
329
+ ._RichTextEditor_z25h4_1 .rich-text pre code {
330
330
  display: block;
331
331
  padding: 8px 12px;
332
332
  }
333
- ._RichTextEditor_1elol_1 .rich-text > *:first-child,
334
- ._RichTextEditor_1elol_1 .ProseMirror > *:first-child,
335
- ._RichTextEditor_1elol_1 .rich-text * p:first-of-type {
333
+ ._RichTextEditor_z25h4_1 .rich-text > *:first-child,
334
+ ._RichTextEditor_z25h4_1 .ProseMirror > *:first-child,
335
+ ._RichTextEditor_z25h4_1 .rich-text * p:first-of-type {
336
336
  margin-top: 0;
337
337
  }
338
- ._RichTextEditor_1elol_1 .rich-text > *:last-child,
339
- ._RichTextEditor_1elol_1 .ProseMirror > *:last-child,
340
- ._RichTextEditor_1elol_1 .rich-text * p:last-of-type {
338
+ ._RichTextEditor_z25h4_1 .rich-text > *:last-child,
339
+ ._RichTextEditor_z25h4_1 .ProseMirror > *:last-child,
340
+ ._RichTextEditor_z25h4_1 .rich-text * p:last-of-type {
341
341
  margin-bottom: 0;
342
342
  }
343
- ._RichTextEditor--editor_1elol_50 {
343
+ ._RichTextEditor--editor_z25h4_50 {
344
344
  background: var(--puck-color-white);
345
345
  border-width: 1px;
346
346
  border-style: solid;
@@ -352,52 +352,53 @@
352
352
  font-family: inherit;
353
353
  font-size: var(--puck-font-size-xxs);
354
354
  resize: vertical;
355
+ text-align: initial;
355
356
  transition: border-color 50ms ease-in;
356
357
  width: 100%;
357
358
  max-width: 100%;
358
359
  min-height: 128px;
359
360
  }
360
- ._RichTextEditor--editor_1elol_50 .rich-text {
361
+ ._RichTextEditor--editor_z25h4_50 .rich-text {
361
362
  flex-grow: 1;
362
363
  }
363
- ._RichTextEditor--editor_1elol_50 .rich-text:not(:has(.ProseMirror)),
364
- ._RichTextEditor--editor_1elol_50 .rich-text .ProseMirror {
364
+ ._RichTextEditor--editor_z25h4_50 .rich-text:not(:has(.ProseMirror)),
365
+ ._RichTextEditor--editor_z25h4_50 .rich-text .ProseMirror {
365
366
  height: 100%;
366
367
  padding: 12px 15px;
367
368
  }
368
- ._RichTextEditor--editor_1elol_50 .rich-text ul,
369
- ._RichTextEditor--editor_1elol_50 .rich-text ol {
369
+ ._RichTextEditor--editor_z25h4_50 .rich-text ul,
370
+ ._RichTextEditor--editor_z25h4_50 .rich-text ol {
370
371
  padding-left: 24px;
371
372
  }
372
- ._RichTextEditor--editor_1elol_50 .rich-text li {
373
+ ._RichTextEditor--editor_z25h4_50 .rich-text li {
373
374
  line-height: 1.5;
374
375
  }
375
- ._RichTextEditor--editor_1elol_50 .rich-text p {
376
+ ._RichTextEditor--editor_z25h4_50 .rich-text p {
376
377
  margin-block: 12px;
377
378
  }
378
- ._RichTextEditor--editor_1elol_50 .rich-text ul {
379
+ ._RichTextEditor--editor_z25h4_50 .rich-text ul {
379
380
  list-style: disc;
380
381
  }
381
- ._RichTextEditor--editor_1elol_50 .rich-text ol {
382
+ ._RichTextEditor--editor_z25h4_50 .rich-text ol {
382
383
  list-style: decimal;
383
384
  }
384
- ._RichTextEditor--editor_1elol_50:focus-within {
385
+ ._RichTextEditor--editor_z25h4_50:focus-within {
385
386
  border-color: var(--puck-color-grey-05);
386
387
  outline: 2px solid var(--puck-color-azure-05);
387
388
  transition: none;
388
389
  }
389
- ._RichTextEditor--editor_1elol_50._RichTextEditor--disabled_1elol_106 {
390
+ ._RichTextEditor--editor_z25h4_50._RichTextEditor--disabled_z25h4_107 {
390
391
  background: var(--puck-color-grey-11);
391
392
  }
392
- ._RichTextEditor_1elol_1:not(:focus-within):not(._RichTextEditor--isActive_1elol_110) .ProseMirror ::selection {
393
+ ._RichTextEditor_z25h4_1:not(:focus-within):not(._RichTextEditor--isActive_z25h4_111) .ProseMirror ::selection {
393
394
  background-color: transparent;
394
395
  }
395
- ._RichTextEditor-menu_1elol_116 {
396
+ ._RichTextEditor-menu_z25h4_117 {
396
397
  border-bottom: 1px solid var(--puck-color-grey-10);
397
398
  position: sticky;
398
399
  top: 0;
399
400
  z-index: 1;
400
401
  }
401
- ._RichTextEditor--disabled_1elol_106 ._RichTextEditor-menu_1elol_116 {
402
+ ._RichTextEditor--disabled_z25h4_107 ._RichTextEditor-menu_z25h4_117 {
402
403
  border-bottom: 1px solid var(--puck-color-grey-09);
403
404
  }
@@ -1,44 +1,44 @@
1
1
  /* css-module:/home/runner/work/puck/puck/packages/core/components/RichTextEditor/styles.module.css/#css-module-data */
2
- ._RichTextEditor_1elol_1 .ProseMirror {
2
+ ._RichTextEditor_z25h4_1 .ProseMirror {
3
3
  white-space: pre-wrap;
4
4
  word-wrap: break-word;
5
5
  cursor: text;
6
6
  outline: none;
7
7
  position: relative;
8
8
  }
9
- ._RichTextEditor_1elol_1 .rich-text * {
9
+ ._RichTextEditor_z25h4_1 .rich-text * {
10
10
  white-space: pre-wrap;
11
11
  user-select: auto;
12
12
  -webkit-user-select: auto;
13
13
  }
14
- ._RichTextEditor_1elol_1 .rich-text blockquote {
14
+ ._RichTextEditor_z25h4_1 .rich-text blockquote {
15
15
  margin: 1em 0;
16
16
  padding: 0 1em;
17
17
  border-left: 4px solid var(--puck-color-grey-09);
18
18
  }
19
- ._RichTextEditor_1elol_1 .rich-text code {
19
+ ._RichTextEditor_z25h4_1 .rich-text code {
20
20
  background-color: var(--puck-color-grey-11);
21
21
  padding: 4px 8px;
22
22
  border-radius: 4px;
23
23
  }
24
- ._RichTextEditor_1elol_1 .rich-text p:empty::before {
24
+ ._RichTextEditor_z25h4_1 .rich-text p:empty::before {
25
25
  content: "\a0";
26
26
  }
27
- ._RichTextEditor_1elol_1 .rich-text pre code {
27
+ ._RichTextEditor_z25h4_1 .rich-text pre code {
28
28
  display: block;
29
29
  padding: 8px 12px;
30
30
  }
31
- ._RichTextEditor_1elol_1 .rich-text > *:first-child,
32
- ._RichTextEditor_1elol_1 .ProseMirror > *:first-child,
33
- ._RichTextEditor_1elol_1 .rich-text * p:first-of-type {
31
+ ._RichTextEditor_z25h4_1 .rich-text > *:first-child,
32
+ ._RichTextEditor_z25h4_1 .ProseMirror > *:first-child,
33
+ ._RichTextEditor_z25h4_1 .rich-text * p:first-of-type {
34
34
  margin-top: 0;
35
35
  }
36
- ._RichTextEditor_1elol_1 .rich-text > *:last-child,
37
- ._RichTextEditor_1elol_1 .ProseMirror > *:last-child,
38
- ._RichTextEditor_1elol_1 .rich-text * p:last-of-type {
36
+ ._RichTextEditor_z25h4_1 .rich-text > *:last-child,
37
+ ._RichTextEditor_z25h4_1 .ProseMirror > *:last-child,
38
+ ._RichTextEditor_z25h4_1 .rich-text * p:last-of-type {
39
39
  margin-bottom: 0;
40
40
  }
41
- ._RichTextEditor--editor_1elol_50 {
41
+ ._RichTextEditor--editor_z25h4_50 {
42
42
  background: var(--puck-color-white);
43
43
  border-width: 1px;
44
44
  border-style: solid;
@@ -50,52 +50,53 @@
50
50
  font-family: inherit;
51
51
  font-size: var(--puck-font-size-xxs);
52
52
  resize: vertical;
53
+ text-align: initial;
53
54
  transition: border-color 50ms ease-in;
54
55
  width: 100%;
55
56
  max-width: 100%;
56
57
  min-height: 128px;
57
58
  }
58
- ._RichTextEditor--editor_1elol_50 .rich-text {
59
+ ._RichTextEditor--editor_z25h4_50 .rich-text {
59
60
  flex-grow: 1;
60
61
  }
61
- ._RichTextEditor--editor_1elol_50 .rich-text:not(:has(.ProseMirror)),
62
- ._RichTextEditor--editor_1elol_50 .rich-text .ProseMirror {
62
+ ._RichTextEditor--editor_z25h4_50 .rich-text:not(:has(.ProseMirror)),
63
+ ._RichTextEditor--editor_z25h4_50 .rich-text .ProseMirror {
63
64
  height: 100%;
64
65
  padding: 12px 15px;
65
66
  }
66
- ._RichTextEditor--editor_1elol_50 .rich-text ul,
67
- ._RichTextEditor--editor_1elol_50 .rich-text ol {
67
+ ._RichTextEditor--editor_z25h4_50 .rich-text ul,
68
+ ._RichTextEditor--editor_z25h4_50 .rich-text ol {
68
69
  padding-left: 24px;
69
70
  }
70
- ._RichTextEditor--editor_1elol_50 .rich-text li {
71
+ ._RichTextEditor--editor_z25h4_50 .rich-text li {
71
72
  line-height: 1.5;
72
73
  }
73
- ._RichTextEditor--editor_1elol_50 .rich-text p {
74
+ ._RichTextEditor--editor_z25h4_50 .rich-text p {
74
75
  margin-block: 12px;
75
76
  }
76
- ._RichTextEditor--editor_1elol_50 .rich-text ul {
77
+ ._RichTextEditor--editor_z25h4_50 .rich-text ul {
77
78
  list-style: disc;
78
79
  }
79
- ._RichTextEditor--editor_1elol_50 .rich-text ol {
80
+ ._RichTextEditor--editor_z25h4_50 .rich-text ol {
80
81
  list-style: decimal;
81
82
  }
82
- ._RichTextEditor--editor_1elol_50:focus-within {
83
+ ._RichTextEditor--editor_z25h4_50:focus-within {
83
84
  border-color: var(--puck-color-grey-05);
84
85
  outline: 2px solid var(--puck-color-azure-05);
85
86
  transition: none;
86
87
  }
87
- ._RichTextEditor--editor_1elol_50._RichTextEditor--disabled_1elol_106 {
88
+ ._RichTextEditor--editor_z25h4_50._RichTextEditor--disabled_z25h4_107 {
88
89
  background: var(--puck-color-grey-11);
89
90
  }
90
- ._RichTextEditor_1elol_1:not(:focus-within):not(._RichTextEditor--isActive_1elol_110) .ProseMirror ::selection {
91
+ ._RichTextEditor_z25h4_1:not(:focus-within):not(._RichTextEditor--isActive_z25h4_111) .ProseMirror ::selection {
91
92
  background-color: transparent;
92
93
  }
93
- ._RichTextEditor-menu_1elol_116 {
94
+ ._RichTextEditor-menu_z25h4_117 {
94
95
  border-bottom: 1px solid var(--puck-color-grey-10);
95
96
  position: sticky;
96
97
  top: 0;
97
98
  z-index: 1;
98
99
  }
99
- ._RichTextEditor--disabled_1elol_106 ._RichTextEditor-menu_1elol_116 {
100
+ ._RichTextEditor--disabled_z25h4_107 ._RichTextEditor-menu_z25h4_117 {
100
101
  border-bottom: 1px solid var(--puck-color-grey-09);
101
102
  }
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-V5I7CVLT.mjs";
4
4
  import {
5
5
  styles_module_default
6
- } from "./chunk-CSSRLPHM.mjs";
6
+ } from "./chunk-AOEDIUVK.mjs";
7
7
  import {
8
8
  get_class_name_factory_default
9
9
  } from "./chunk-Y2EFNT5P.mjs";
@@ -1,4 +1,4 @@
1
- import { ReactElement, CSSProperties, ReactNode, ElementType, JSX } from 'react';
1
+ import { ReactElement, CSSProperties, ReactNode, ElementType, Ref, JSX } from 'react';
2
2
  import { EditorStateSnapshot, Editor, Extensions } from '@tiptap/react';
3
3
  import { BlockquoteOptions } from '@tiptap/extension-blockquote';
4
4
  import { BoldOptions } from '@tiptap/extension-bold';
@@ -347,6 +347,7 @@ type DropZoneProps = {
347
347
  className?: string;
348
348
  collisionAxis?: DragAxis;
349
349
  as?: ElementType;
350
+ ref?: Ref<any>;
350
351
  };
351
352
 
352
353
  type PuckContext = {
@@ -396,7 +397,7 @@ type SlotComponent = (props?: Omit<DropZoneProps, "zone">) => ReactNode;
396
397
  type PuckComponent<Props> = (props: WithId<WithPuckProps<{
397
398
  [K in keyof Props]: WithDeepSlots<Props[K], SlotComponent>;
398
399
  }>>) => JSX.Element;
399
- type ResolveDataTrigger = "insert" | "replace" | "load" | "force";
400
+ type ResolveDataTrigger = "insert" | "replace" | "load" | "force" | "move";
400
401
  type WithPartialProps<T, Props extends DefaultComponentProps> = Omit<T, "props"> & {
401
402
  props?: Partial<Props>;
402
403
  };
@@ -428,6 +429,7 @@ UserField extends BaseField = {}> = {
428
429
  lastData: DataShape | null;
429
430
  metadata: ComponentMetadata;
430
431
  trigger: ResolveDataTrigger;
432
+ parent: ComponentData | null;
431
433
  }) => Promise<WithPartialProps<DataShape, FieldProps>> | WithPartialProps<DataShape, FieldProps>;
432
434
  resolvePermissions?: (data: DataShape, params: {
433
435
  changed: Partial<Record<keyof FieldProps, boolean> & {
@@ -531,6 +533,7 @@ interface FieldMetadata extends Metadata {
531
533
  type ItemWithId = {
532
534
  _arrayId: string;
533
535
  _originalIndex: number;
536
+ _currentIndex: number;
534
537
  };
535
538
  type ArrayState = {
536
539
  items: ItemWithId[];
@@ -541,6 +544,7 @@ type UiState = {
541
544
  rightSideBarVisible: boolean;
542
545
  leftSideBarWidth?: number | null;
543
546
  rightSideBarWidth?: number | null;
547
+ mobilePanelExpanded?: boolean;
544
548
  itemSelector: ItemSelector | null;
545
549
  arrayState: Record<string, ArrayState | undefined>;
546
550
  previewMode: "interactive" | "edit";
@@ -553,7 +557,7 @@ type UiState = {
553
557
  isDragging: boolean;
554
558
  viewports: {
555
559
  current: {
556
- width: number;
560
+ width: number | "100%";
557
561
  height: number | "auto";
558
562
  };
559
563
  controlsVisible: boolean;
@@ -563,6 +567,9 @@ type UiState = {
563
567
  focus?: string | null;
564
568
  metadata?: Record<string, any>;
565
569
  };
570
+ plugin: {
571
+ current: string | null;
572
+ };
566
573
  };
567
574
  type AppState<UserData extends Data = Data> = {
568
575
  data: UserData;
@@ -606,6 +613,15 @@ type LeftOrExactRight<Union, Left, Right> = (Left & Union extends Right ? Exact<
606
613
  type AssertHasValue<T, True = T, False = never> = [keyof T] extends [
607
614
  never
608
615
  ] ? False : True;
616
+ type RenderFunc<Props extends {
617
+ [key: string]: any;
618
+ } = {
619
+ children: ReactNode;
620
+ }> = (props: Props) => ReactElement;
621
+ type PluginInternal = Plugin & {
622
+ mobileOnly?: boolean;
623
+ desktopOnly?: boolean;
624
+ };
609
625
 
610
626
  type MapFnParams<ThisField = Field> = {
611
627
  value: any;
@@ -629,11 +645,6 @@ G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>, UserField extends
629
645
  [Type in UserField["type"]]: FieldTransformFn<ExtractField<UserField, Type>>;
630
646
  }>;
631
647
 
632
- type RenderFunc<Props extends {
633
- [key: string]: any;
634
- } = {
635
- children: ReactNode;
636
- }> = (props: Props) => ReactElement;
637
648
  declare const overrideKeys: readonly ["header", "headerActions", "fields", "fieldLabel", "drawer", "drawerItem", "componentOverlay", "outline", "puck", "preview"];
638
649
  type OverrideKey = (typeof overrideKeys)[number];
639
650
  type OverridesGeneric<Shape extends {
@@ -705,7 +716,7 @@ type DragAxis = "dynamic" | "y" | "x";
705
716
 
706
717
  type iconTypes = "Smartphone" | "Monitor" | "Tablet";
707
718
  type Viewport = {
708
- width: number;
719
+ width: number | "100%";
709
720
  height?: number | "auto";
710
721
  label?: string;
711
722
  icon?: iconTypes | ReactNode;
@@ -725,8 +736,13 @@ type IframeConfig = {
725
736
  };
726
737
  type OnAction<UserData extends Data = Data> = (action: PuckAction, appState: AppState<UserData>, prevAppState: AppState<UserData>) => void;
727
738
  type Plugin<UserConfig extends Config = Config> = {
739
+ name?: string;
740
+ label?: string;
741
+ icon?: ReactNode;
742
+ render?: () => ReactElement;
728
743
  overrides?: Partial<Overrides<UserConfig>>;
729
744
  fieldTransforms?: FieldTransforms<UserConfig>;
745
+ mobilePanelHeight?: "toggle" | "min-content";
730
746
  };
731
747
  type History<D = any> = {
732
748
  state: D;
@@ -819,4 +835,4 @@ type PuckAction = {
819
835
  recordHistory?: boolean;
820
836
  } & (ReorderAction | InsertAction | MoveAction | ReplaceAction | ReplaceRootAction | RemoveAction | DuplicateAction | SetAction | SetDataAction | SetUiAction | RegisterZoneAction | UnregisterZoneAction);
821
837
 
822
- export { type BaseData as $, type AppState as A, type FieldTransformFn as B, type Config as C, type Data as D, overrideKeys as E, type Fields as F, type OverrideKey as G, type History as H, type IframeConfig as I, type FieldRenderFunctions as J, type ItemWithId as K, type ArrayState as L, type Metadata as M, type SlotComponent as N, type OnAction as O, type PrivateAppState as P, type PuckComponent as Q, type RootData as R, type Slot as S, type ComponentConfigExtensions as T, type UserGenerics as U, type Viewports as V, type WithId as W, type RootConfig as X, type ExtractConfigParams as Y, type ConfigParams as Z, type ComponentConfigParams as _, type PuckAction as a, type RootDataWithoutProps as a0, type ComponentDataOptionalId as a1, type MappedItem as a2, type ComponentDataMap as a3, type PuckMetadata as a4, type ComponentMetadata as a5, type FieldMetadata as a6, type BaseField as a7, type TextField as a8, type NumberField as a9, type TextareaField as aa, type SelectField as ab, type RadioField as ac, type ArrayField as ad, type ObjectField as ae, type Adaptor as af, type ExternalFieldWithAdaptor as ag, type CacheOpts as ah, type ExternalField as ai, type CustomFieldRender as aj, type CustomField as ak, type SlotField as al, type PuckContext as am, type DefaultRootRenderProps as an, type DefaultRootProps as ao, type WithPuckProps as ap, type AsFieldProps as aq, type WithChildren as ar, type ExtractField as as, type Content as b, type ComponentData as c, type DefaultComponents as d, type DefaultComponentProps as e, type DefaultRootFieldProps as f, type Permissions as g, type RootDataWithProps as h, type ResolveDataTrigger as i, type Plugin as j, type Overrides as k, type UiState as l, type ComponentConfig as m, type FieldTransforms as n, type RichtextField as o, type Field as p, type FieldProps as q, type DropZoneProps as r, type InitialHistory as s, type ItemSelector as t, type WithSlotProps as u, type RichText as v, type Direction as w, type DragAxis as x, type Viewport as y, type FieldTransformFnParams as z };
838
+ export { type ComponentConfigParams as $, type AppState as A, type FieldTransformFnParams as B, type Config as C, type Data as D, type FieldTransformFn as E, type Fields as F, overrideKeys as G, type History as H, type IframeConfig as I, type OverrideKey as J, type FieldRenderFunctions as K, type ItemWithId as L, type Metadata as M, type ArrayState as N, type OnAction as O, type PrivateAppState as P, type SlotComponent as Q, type RootData as R, type Slot as S, type PuckComponent as T, type UserGenerics as U, type Viewports as V, type WithId as W, type ComponentConfigExtensions as X, type RootConfig as Y, type ExtractConfigParams as Z, type ConfigParams as _, type PuckAction as a, type BaseData as a0, type RootDataWithoutProps as a1, type ComponentDataOptionalId as a2, type MappedItem as a3, type ComponentDataMap as a4, type PuckMetadata as a5, type ComponentMetadata as a6, type FieldMetadata as a7, type BaseField as a8, type TextField as a9, type NumberField as aa, type TextareaField as ab, type SelectField as ac, type RadioField as ad, type ArrayField as ae, type ObjectField as af, type Adaptor as ag, type ExternalFieldWithAdaptor as ah, type CacheOpts as ai, type ExternalField as aj, type CustomFieldRender as ak, type CustomField as al, type SlotField as am, type PuckContext as an, type DefaultRootRenderProps as ao, type DefaultRootProps as ap, type WithPuckProps as aq, type AsFieldProps as ar, type WithChildren as as, type ExtractField as at, type Content as b, type ComponentData as c, type DefaultComponents as d, type DefaultComponentProps as e, type DefaultRootFieldProps as f, type Permissions as g, type RootDataWithProps as h, type ResolveDataTrigger as i, type Plugin as j, type Overrides as k, type UiState as l, type ComponentConfig as m, type FieldTransforms as n, type RichtextField as o, type Field as p, type FieldProps as q, type DropZoneProps as r, type InitialHistory as s, type ItemSelector as t, type PluginInternal as u, type WithSlotProps as v, type RichText as w, type Direction as x, type DragAxis as y, type Viewport as z };
@@ -1,4 +1,4 @@
1
- import { ReactElement, CSSProperties, ReactNode, ElementType, JSX } from 'react';
1
+ import { ReactElement, CSSProperties, ReactNode, ElementType, Ref, JSX } from 'react';
2
2
  import { EditorStateSnapshot, Editor, Extensions } from '@tiptap/react';
3
3
  import { BlockquoteOptions } from '@tiptap/extension-blockquote';
4
4
  import { BoldOptions } from '@tiptap/extension-bold';
@@ -347,6 +347,7 @@ type DropZoneProps = {
347
347
  className?: string;
348
348
  collisionAxis?: DragAxis;
349
349
  as?: ElementType;
350
+ ref?: Ref<any>;
350
351
  };
351
352
 
352
353
  type PuckContext = {
@@ -396,7 +397,7 @@ type SlotComponent = (props?: Omit<DropZoneProps, "zone">) => ReactNode;
396
397
  type PuckComponent<Props> = (props: WithId<WithPuckProps<{
397
398
  [K in keyof Props]: WithDeepSlots<Props[K], SlotComponent>;
398
399
  }>>) => JSX.Element;
399
- type ResolveDataTrigger = "insert" | "replace" | "load" | "force";
400
+ type ResolveDataTrigger = "insert" | "replace" | "load" | "force" | "move";
400
401
  type WithPartialProps<T, Props extends DefaultComponentProps> = Omit<T, "props"> & {
401
402
  props?: Partial<Props>;
402
403
  };
@@ -428,6 +429,7 @@ UserField extends BaseField = {}> = {
428
429
  lastData: DataShape | null;
429
430
  metadata: ComponentMetadata;
430
431
  trigger: ResolveDataTrigger;
432
+ parent: ComponentData | null;
431
433
  }) => Promise<WithPartialProps<DataShape, FieldProps>> | WithPartialProps<DataShape, FieldProps>;
432
434
  resolvePermissions?: (data: DataShape, params: {
433
435
  changed: Partial<Record<keyof FieldProps, boolean> & {
@@ -531,6 +533,7 @@ interface FieldMetadata extends Metadata {
531
533
  type ItemWithId = {
532
534
  _arrayId: string;
533
535
  _originalIndex: number;
536
+ _currentIndex: number;
534
537
  };
535
538
  type ArrayState = {
536
539
  items: ItemWithId[];
@@ -541,6 +544,7 @@ type UiState = {
541
544
  rightSideBarVisible: boolean;
542
545
  leftSideBarWidth?: number | null;
543
546
  rightSideBarWidth?: number | null;
547
+ mobilePanelExpanded?: boolean;
544
548
  itemSelector: ItemSelector | null;
545
549
  arrayState: Record<string, ArrayState | undefined>;
546
550
  previewMode: "interactive" | "edit";
@@ -553,7 +557,7 @@ type UiState = {
553
557
  isDragging: boolean;
554
558
  viewports: {
555
559
  current: {
556
- width: number;
560
+ width: number | "100%";
557
561
  height: number | "auto";
558
562
  };
559
563
  controlsVisible: boolean;
@@ -563,6 +567,9 @@ type UiState = {
563
567
  focus?: string | null;
564
568
  metadata?: Record<string, any>;
565
569
  };
570
+ plugin: {
571
+ current: string | null;
572
+ };
566
573
  };
567
574
  type AppState<UserData extends Data = Data> = {
568
575
  data: UserData;
@@ -606,6 +613,15 @@ type LeftOrExactRight<Union, Left, Right> = (Left & Union extends Right ? Exact<
606
613
  type AssertHasValue<T, True = T, False = never> = [keyof T] extends [
607
614
  never
608
615
  ] ? False : True;
616
+ type RenderFunc<Props extends {
617
+ [key: string]: any;
618
+ } = {
619
+ children: ReactNode;
620
+ }> = (props: Props) => ReactElement;
621
+ type PluginInternal = Plugin & {
622
+ mobileOnly?: boolean;
623
+ desktopOnly?: boolean;
624
+ };
609
625
 
610
626
  type MapFnParams<ThisField = Field> = {
611
627
  value: any;
@@ -629,11 +645,6 @@ G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>, UserField extends
629
645
  [Type in UserField["type"]]: FieldTransformFn<ExtractField<UserField, Type>>;
630
646
  }>;
631
647
 
632
- type RenderFunc<Props extends {
633
- [key: string]: any;
634
- } = {
635
- children: ReactNode;
636
- }> = (props: Props) => ReactElement;
637
648
  declare const overrideKeys: readonly ["header", "headerActions", "fields", "fieldLabel", "drawer", "drawerItem", "componentOverlay", "outline", "puck", "preview"];
638
649
  type OverrideKey = (typeof overrideKeys)[number];
639
650
  type OverridesGeneric<Shape extends {
@@ -705,7 +716,7 @@ type DragAxis = "dynamic" | "y" | "x";
705
716
 
706
717
  type iconTypes = "Smartphone" | "Monitor" | "Tablet";
707
718
  type Viewport = {
708
- width: number;
719
+ width: number | "100%";
709
720
  height?: number | "auto";
710
721
  label?: string;
711
722
  icon?: iconTypes | ReactNode;
@@ -725,8 +736,13 @@ type IframeConfig = {
725
736
  };
726
737
  type OnAction<UserData extends Data = Data> = (action: PuckAction, appState: AppState<UserData>, prevAppState: AppState<UserData>) => void;
727
738
  type Plugin<UserConfig extends Config = Config> = {
739
+ name?: string;
740
+ label?: string;
741
+ icon?: ReactNode;
742
+ render?: () => ReactElement;
728
743
  overrides?: Partial<Overrides<UserConfig>>;
729
744
  fieldTransforms?: FieldTransforms<UserConfig>;
745
+ mobilePanelHeight?: "toggle" | "min-content";
730
746
  };
731
747
  type History<D = any> = {
732
748
  state: D;
@@ -819,4 +835,4 @@ type PuckAction = {
819
835
  recordHistory?: boolean;
820
836
  } & (ReorderAction | InsertAction | MoveAction | ReplaceAction | ReplaceRootAction | RemoveAction | DuplicateAction | SetAction | SetDataAction | SetUiAction | RegisterZoneAction | UnregisterZoneAction);
821
837
 
822
- export { type BaseData as $, type AppState as A, type FieldTransformFn as B, type Config as C, type Data as D, overrideKeys as E, type Fields as F, type OverrideKey as G, type History as H, type IframeConfig as I, type FieldRenderFunctions as J, type ItemWithId as K, type ArrayState as L, type Metadata as M, type SlotComponent as N, type OnAction as O, type PrivateAppState as P, type PuckComponent as Q, type RootData as R, type Slot as S, type ComponentConfigExtensions as T, type UserGenerics as U, type Viewports as V, type WithId as W, type RootConfig as X, type ExtractConfigParams as Y, type ConfigParams as Z, type ComponentConfigParams as _, type PuckAction as a, type RootDataWithoutProps as a0, type ComponentDataOptionalId as a1, type MappedItem as a2, type ComponentDataMap as a3, type PuckMetadata as a4, type ComponentMetadata as a5, type FieldMetadata as a6, type BaseField as a7, type TextField as a8, type NumberField as a9, type TextareaField as aa, type SelectField as ab, type RadioField as ac, type ArrayField as ad, type ObjectField as ae, type Adaptor as af, type ExternalFieldWithAdaptor as ag, type CacheOpts as ah, type ExternalField as ai, type CustomFieldRender as aj, type CustomField as ak, type SlotField as al, type PuckContext as am, type DefaultRootRenderProps as an, type DefaultRootProps as ao, type WithPuckProps as ap, type AsFieldProps as aq, type WithChildren as ar, type ExtractField as as, type Content as b, type ComponentData as c, type DefaultComponents as d, type DefaultComponentProps as e, type DefaultRootFieldProps as f, type Permissions as g, type RootDataWithProps as h, type ResolveDataTrigger as i, type Plugin as j, type Overrides as k, type UiState as l, type ComponentConfig as m, type FieldTransforms as n, type RichtextField as o, type Field as p, type FieldProps as q, type DropZoneProps as r, type InitialHistory as s, type ItemSelector as t, type WithSlotProps as u, type RichText as v, type Direction as w, type DragAxis as x, type Viewport as y, type FieldTransformFnParams as z };
838
+ export { type ComponentConfigParams as $, type AppState as A, type FieldTransformFnParams as B, type Config as C, type Data as D, type FieldTransformFn as E, type Fields as F, overrideKeys as G, type History as H, type IframeConfig as I, type OverrideKey as J, type FieldRenderFunctions as K, type ItemWithId as L, type Metadata as M, type ArrayState as N, type OnAction as O, type PrivateAppState as P, type SlotComponent as Q, type RootData as R, type Slot as S, type PuckComponent as T, type UserGenerics as U, type Viewports as V, type WithId as W, type ComponentConfigExtensions as X, type RootConfig as Y, type ExtractConfigParams as Z, type ConfigParams as _, type PuckAction as a, type BaseData as a0, type RootDataWithoutProps as a1, type ComponentDataOptionalId as a2, type MappedItem as a3, type ComponentDataMap as a4, type PuckMetadata as a5, type ComponentMetadata as a6, type FieldMetadata as a7, type BaseField as a8, type TextField as a9, type NumberField as aa, type TextareaField as ab, type SelectField as ac, type RadioField as ad, type ArrayField as ae, type ObjectField as af, type Adaptor as ag, type ExternalFieldWithAdaptor as ah, type CacheOpts as ai, type ExternalField as aj, type CustomFieldRender as ak, type CustomField as al, type SlotField as am, type PuckContext as an, type DefaultRootRenderProps as ao, type DefaultRootProps as ap, type WithPuckProps as aq, type AsFieldProps as ar, type WithChildren as as, type ExtractField as at, type Content as b, type ComponentData as c, type DefaultComponents as d, type DefaultComponentProps as e, type DefaultRootFieldProps as f, type Permissions as g, type RootDataWithProps as h, type ResolveDataTrigger as i, type Plugin as j, type Overrides as k, type UiState as l, type ComponentConfig as m, type FieldTransforms as n, type RichtextField as o, type Field as p, type FieldProps as q, type DropZoneProps as r, type InitialHistory as s, type ItemSelector as t, type PluginInternal as u, type WithSlotProps as v, type RichText as w, type Direction as x, type DragAxis as y, type Viewport as z };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  List,
3
3
  ListOrdered
4
- } from "./chunk-DAQLMM2T.mjs";
4
+ } from "./chunk-K562SEXI.mjs";
5
5
  import {
6
6
  init_react_import
7
7
  } from "./chunk-M6W7YEVX.mjs";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  useAlignOptions
3
- } from "./chunk-PLXSMBAA.mjs";
3
+ } from "./chunk-GVKHZNTR.mjs";
4
4
  import {
5
5
  useHeadingOptions
6
- } from "./chunk-62AAYNXG.mjs";
6
+ } from "./chunk-MEL7FUSF.mjs";
7
7
  import {
8
8
  useListOptions
9
- } from "./chunk-QAWJTCV5.mjs";
9
+ } from "./chunk-3VQHXASI.mjs";
10
10
  import {
11
11
  AlignCenter,
12
12
  AlignJustify,
@@ -26,7 +26,7 @@ import {
26
26
  Strikethrough,
27
27
  Underline,
28
28
  useControlContext
29
- } from "./chunk-DAQLMM2T.mjs";
29
+ } from "./chunk-K562SEXI.mjs";
30
30
  import {
31
31
  get_class_name_factory_default
32
32
  } from "./chunk-Y2EFNT5P.mjs";
@@ -142,7 +142,8 @@ var IconButton = ({
142
142
  tabIndex,
143
143
  newTab,
144
144
  fullWidth,
145
- title
145
+ title,
146
+ suppressHydrationWarning
146
147
  }) => {
147
148
  const [loading, setLoading] = useState(false);
148
149
  const ElementType = href ? "a" : "button";
@@ -168,6 +169,7 @@ var IconButton = ({
168
169
  rel: newTab ? "noreferrer" : void 0,
169
170
  href,
170
171
  title,
172
+ suppressHydrationWarning,
171
173
  children: [
172
174
  /* @__PURE__ */ jsx3("span", { className: getClassName3("title"), children: title }),
173
175
  children,
@@ -347,7 +349,7 @@ function AlignSelectFallback() {
347
349
  // components/RichTextMenu/controls/AlignSelect/index.tsx
348
350
  import { jsx as jsx10 } from "react/jsx-runtime";
349
351
  var AlignSelectLoaded = lazy(
350
- () => import("./loaded-JU3A7Y4L.mjs").then((m) => ({
352
+ () => import("./loaded-DCQVLO7I.mjs").then((m) => ({
351
353
  default: m.AlignSelectLoaded
352
354
  }))
353
355
  );
@@ -578,7 +580,7 @@ function HeadingSelectFallback() {
578
580
  // components/RichTextMenu/controls/HeadingSelect/index.tsx
579
581
  import { jsx as jsx22 } from "react/jsx-runtime";
580
582
  var HeadingSelectLoaded = lazy2(
581
- () => import("./loaded-OBY7OMS6.mjs").then((m) => ({
583
+ () => import("./loaded-KKVJE5KH.mjs").then((m) => ({
582
584
  default: m.HeadingSelectLoaded
583
585
  }))
584
586
  );
@@ -610,7 +612,7 @@ function ListSelectFallback() {
610
612
  // components/RichTextMenu/controls/ListSelect/index.tsx
611
613
  import { jsx as jsx24 } from "react/jsx-runtime";
612
614
  var ListSelectLoaded = lazy3(
613
- () => import("./loaded-N3FYGF2Y.mjs").then((m) => ({
615
+ () => import("./loaded-JGRO7BH7.mjs").then((m) => ({
614
616
  default: m.ListSelectLoaded
615
617
  }))
616
618
  );
@@ -4,7 +4,7 @@ import {
4
4
 
5
5
  // css-module:/home/runner/work/puck/puck/packages/core/components/RichTextEditor/styles.module.css#css-module
6
6
  init_react_import();
7
- var styles_module_default = { "RichTextEditor": "_RichTextEditor_1elol_1", "RichTextEditor--editor": "_RichTextEditor--editor_1elol_50", "RichTextEditor--disabled": "_RichTextEditor--disabled_1elol_106", "RichTextEditor--isActive": "_RichTextEditor--isActive_1elol_110", "RichTextEditor-menu": "_RichTextEditor-menu_1elol_116" };
7
+ var styles_module_default = { "RichTextEditor": "_RichTextEditor_z25h4_1", "RichTextEditor--editor": "_RichTextEditor--editor_z25h4_50", "RichTextEditor--disabled": "_RichTextEditor--disabled_z25h4_107", "RichTextEditor--isActive": "_RichTextEditor--isActive_z25h4_111", "RichTextEditor-menu": "_RichTextEditor-menu_z25h4_117" };
8
8
 
9
9
  export {
10
10
  styles_module_default