@measured/puck 0.21.0-canary.a1b03d38 → 0.21.0-canary.a4bfae4f

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 (41) hide show
  1. package/dist/{Editor-O447AVCX.mjs → Editor-STTYPZJ4.mjs} +9 -9
  2. package/dist/{actions-CJibIB0m.d.mts → actions-tsxxcX1z.d.mts} +22 -8
  3. package/dist/{actions-CJibIB0m.d.ts → actions-tsxxcX1z.d.ts} +22 -8
  4. package/dist/{chunk-2Q4PACDA.mjs → chunk-5ATHPL4L.mjs} +3 -3
  5. package/dist/{chunk-Y656T6AQ.mjs → chunk-6K3HTV5G.mjs} +2 -2
  6. package/dist/{chunk-QBGM4ELA.mjs → chunk-DBBPIWHH.mjs} +1 -1
  7. package/dist/{chunk-Z476VA6G.mjs → chunk-FYH73R7R.mjs} +4627 -4059
  8. package/dist/{chunk-DAQLMM2T.mjs → chunk-IDHXWXYL.mjs} +89 -4
  9. package/dist/{chunk-62AAYNXG.mjs → chunk-MML4TKL2.mjs} +1 -1
  10. package/dist/{chunk-BSDEIOEK.mjs → chunk-O7X34GXV.mjs} +10 -8
  11. package/dist/{chunk-NLUHDYVR.mjs → chunk-ODDSBBX3.mjs} +20 -1
  12. package/dist/{chunk-QAWJTCV5.mjs → chunk-PRRLVCLF.mjs} +1 -1
  13. package/dist/{chunk-T3WX7XJ6.mjs → chunk-QV3IXRNS.mjs} +5 -3
  14. package/dist/{chunk-PLXSMBAA.mjs → chunk-VL2VNWXO.mjs} +1 -1
  15. package/dist/{full-BEMDJKDS.mjs → full-C4C2K2OO.mjs} +8 -8
  16. package/dist/{index-Bss1jupB.d.ts → index-Ca6V6NQD.d.ts} +3 -1
  17. package/dist/{index-DOcD_H3b.d.mts → index-mQvUCH3C.d.mts} +3 -1
  18. package/dist/index.css +704 -314
  19. package/dist/index.d.mts +27 -8
  20. package/dist/index.d.ts +27 -8
  21. package/dist/index.js +2890 -2158
  22. package/dist/index.mjs +20 -17
  23. package/dist/internal.d.mts +2 -2
  24. package/dist/internal.d.ts +2 -2
  25. package/dist/internal.js +20 -1
  26. package/dist/internal.mjs +2 -2
  27. package/dist/{loaded-N3FYGF2Y.mjs → loaded-DB2OXVC5.mjs} +5 -5
  28. package/dist/{loaded-JU3A7Y4L.mjs → loaded-GEFHNL7S.mjs} +5 -5
  29. package/dist/{loaded-OBY7OMS6.mjs → loaded-TVTW742N.mjs} +5 -5
  30. package/dist/no-external.css +842 -448
  31. package/dist/no-external.d.mts +4 -4
  32. package/dist/no-external.d.ts +4 -4
  33. package/dist/no-external.js +2891 -2156
  34. package/dist/no-external.mjs +19 -11
  35. package/dist/rsc.d.mts +2 -2
  36. package/dist/rsc.d.ts +2 -2
  37. package/dist/rsc.js +24 -3
  38. package/dist/rsc.mjs +3 -3
  39. package/dist/{walk-tree-BL55zQ9b.d.ts → walk-tree-Bh85NMeo.d.ts} +1 -1
  40. package/dist/{walk-tree-BYuI81Ik.d.mts → walk-tree-CDA3K5S3.d.mts} +1 -1
  41. package/package.json +1 -1
@@ -6,20 +6,24 @@ import {
6
6
  FieldLabel,
7
7
  Puck,
8
8
  Render,
9
+ blocksPlugin,
9
10
  createUsePuck,
11
+ fieldsPlugin,
12
+ legacySideBarPlugin,
13
+ outlinePlugin,
10
14
  overrideKeys,
11
15
  registerOverlayPortal,
12
16
  renderContext,
13
17
  setDeep,
14
18
  useGetPuck,
15
19
  usePuck
16
- } from "./chunk-Z476VA6G.mjs";
17
- import "./chunk-2Q4PACDA.mjs";
20
+ } from "./chunk-FYH73R7R.mjs";
21
+ import "./chunk-5ATHPL4L.mjs";
18
22
  import {
19
23
  migrate,
20
24
  resolveAllData,
21
25
  transformProps
22
- } from "./chunk-Y656T6AQ.mjs";
26
+ } from "./chunk-6K3HTV5G.mjs";
23
27
  import "./chunk-CSSRLPHM.mjs";
24
28
  import {
25
29
  Action,
@@ -29,17 +33,17 @@ import {
29
33
  Label,
30
34
  RichTextMenu,
31
35
  Separator
32
- } from "./chunk-BSDEIOEK.mjs";
33
- import "./chunk-PLXSMBAA.mjs";
34
- import "./chunk-62AAYNXG.mjs";
35
- import "./chunk-QAWJTCV5.mjs";
36
- import "./chunk-DAQLMM2T.mjs";
37
- import "./chunk-QBGM4ELA.mjs";
38
- import "./chunk-T3WX7XJ6.mjs";
36
+ } from "./chunk-O7X34GXV.mjs";
37
+ import "./chunk-VL2VNWXO.mjs";
38
+ import "./chunk-MML4TKL2.mjs";
39
+ import "./chunk-PRRLVCLF.mjs";
40
+ import "./chunk-IDHXWXYL.mjs";
41
+ import "./chunk-DBBPIWHH.mjs";
42
+ import "./chunk-QV3IXRNS.mjs";
39
43
  import "./chunk-Y2EFNT5P.mjs";
40
44
  import {
41
45
  walkTree
42
- } from "./chunk-NLUHDYVR.mjs";
46
+ } from "./chunk-ODDSBBX3.mjs";
43
47
  import {
44
48
  init_react_import
45
49
  } from "./chunk-M6W7YEVX.mjs";
@@ -61,8 +65,12 @@ export {
61
65
  Render,
62
66
  RichTextMenu,
63
67
  Separator,
68
+ blocksPlugin,
64
69
  createUsePuck,
70
+ fieldsPlugin,
71
+ legacySideBarPlugin,
65
72
  migrate,
73
+ outlinePlugin,
66
74
  overrideKeys,
67
75
  registerOverlayPortal,
68
76
  renderContext,
package/dist/rsc.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { C as Config, U as UserGenerics, M as Metadata } from './actions-CJibIB0m.mjs';
3
- export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-BYuI81Ik.mjs';
2
+ import { C as Config, U as UserGenerics, M as Metadata } from './actions-tsxxcX1z.mjs';
3
+ export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-CDA3K5S3.mjs';
4
4
  import 'react';
5
5
  import '@tiptap/react';
6
6
  import '@tiptap/extension-blockquote';
package/dist/rsc.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { C as Config, U as UserGenerics, M as Metadata } from './actions-CJibIB0m.js';
3
- export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-BL55zQ9b.js';
2
+ import { C as Config, U as UserGenerics, M as Metadata } from './actions-tsxxcX1z.js';
3
+ export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-Bh85NMeo.js';
4
4
  import 'react';
5
5
  import '@tiptap/react';
6
6
  import '@tiptap/extension-blockquote';
package/dist/rsc.js CHANGED
@@ -1040,7 +1040,8 @@ init_react_import();
1040
1040
  var defaultViewports = [
1041
1041
  { width: 360, height: "auto", icon: "Smartphone", label: "Small" },
1042
1042
  { width: 768, height: "auto", icon: "Tablet", label: "Medium" },
1043
- { width: 1280, height: "auto", icon: "Monitor", label: "Large" }
1043
+ { width: 1280, height: "auto", icon: "Monitor", label: "Large" },
1044
+ { width: "100%", height: "auto", icon: "FullWidth", label: "Full-width" }
1044
1045
  ];
1045
1046
 
1046
1047
  // store/default-app-state.ts
@@ -1062,7 +1063,8 @@ var defaultAppState = {
1062
1063
  options: [],
1063
1064
  controlsVisible: true
1064
1065
  },
1065
- field: { focus: null }
1066
+ field: { focus: null },
1067
+ plugin: { current: null }
1066
1068
  },
1067
1069
  indexes: {
1068
1070
  nodes: {},
@@ -1110,9 +1112,28 @@ var stripSlots = (data, config) => {
1110
1112
 
1111
1113
  // lib/data/flatten-node.ts
1112
1114
  var { flatten: flatten2, unflatten } = import_flat.default;
1115
+ function isEmptyArrayOrObject(val) {
1116
+ if (Array.isArray(val)) {
1117
+ return val.length === 0;
1118
+ }
1119
+ if (val != null && Object.prototype.toString.call(val) === "[object Object]") {
1120
+ return Object.keys(val).length === 0;
1121
+ }
1122
+ return false;
1123
+ }
1124
+ function stripEmptyObjects(props) {
1125
+ const result = {};
1126
+ for (const key in props) {
1127
+ if (!Object.prototype.hasOwnProperty.call(props, key)) continue;
1128
+ const val = props[key];
1129
+ if (isEmptyArrayOrObject(val)) continue;
1130
+ result[key] = val;
1131
+ }
1132
+ return result;
1133
+ }
1113
1134
  var flattenNode = (node, config) => {
1114
1135
  return __spreadProps(__spreadValues({}, node), {
1115
- props: flatten2(stripSlots(node, config).props)
1136
+ props: stripEmptyObjects(flatten2(stripSlots(node, config).props))
1116
1137
  });
1117
1138
  };
1118
1139
 
package/dist/rsc.mjs CHANGED
@@ -5,9 +5,9 @@ import {
5
5
  transformProps,
6
6
  useRichtextProps,
7
7
  useSlots
8
- } from "./chunk-Y656T6AQ.mjs";
8
+ } from "./chunk-6K3HTV5G.mjs";
9
9
  import "./chunk-CSSRLPHM.mjs";
10
- import "./chunk-T3WX7XJ6.mjs";
10
+ import "./chunk-QV3IXRNS.mjs";
11
11
  import "./chunk-Y2EFNT5P.mjs";
12
12
  import {
13
13
  rootAreaId,
@@ -15,7 +15,7 @@ import {
15
15
  rootZone,
16
16
  setupZone,
17
17
  walkTree
18
- } from "./chunk-NLUHDYVR.mjs";
18
+ } from "./chunk-ODDSBBX3.mjs";
19
19
  import {
20
20
  __spreadProps,
21
21
  __spreadValues,
@@ -1,4 +1,4 @@
1
- import { C as Config, D as Data, W as WithId, U as UserGenerics, b as Content, c as ComponentData, d as DefaultComponents, e as DefaultComponentProps, f as DefaultRootFieldProps, M as Metadata, R as RootData } from './actions-CJibIB0m.js';
1
+ import { C as Config, D as Data, W as WithId, U as UserGenerics, b as Content, c as ComponentData, d as DefaultComponents, e as DefaultComponentProps, f as DefaultRootFieldProps, M as Metadata, R as RootData } from './actions-tsxxcX1z.js';
2
2
 
3
3
  type MigrationOptions<UserConfig extends Config> = {
4
4
  migrateDynamicZonesForComponent?: {
@@ -1,4 +1,4 @@
1
- import { C as Config, D as Data, W as WithId, U as UserGenerics, b as Content, c as ComponentData, d as DefaultComponents, e as DefaultComponentProps, f as DefaultRootFieldProps, M as Metadata, R as RootData } from './actions-CJibIB0m.mjs';
1
+ import { C as Config, D as Data, W as WithId, U as UserGenerics, b as Content, c as ComponentData, d as DefaultComponents, e as DefaultComponentProps, f as DefaultRootFieldProps, M as Metadata, R as RootData } from './actions-tsxxcX1z.mjs';
2
2
 
3
3
  type MigrationOptions<UserConfig extends Config> = {
4
4
  migrateDynamicZonesForComponent?: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@measured/puck",
3
- "version": "0.21.0-canary.a1b03d38",
3
+ "version": "0.21.0-canary.a4bfae4f",
4
4
  "description": "The open-source visual editor for React",
5
5
  "author": "Chris Villa <chris@puckeditor.com>",
6
6
  "repository": "measuredco/puck",