@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.
- package/dist/{Editor-O447AVCX.mjs → Editor-32UYWE6W.mjs} +10 -10
- package/dist/{Editor-F2LSS6SE.css → Editor-IQP25PUX.css} +28 -27
- package/dist/{Render-QEMDIDQC.css → Render-3OV4N4MT.css} +28 -27
- package/dist/{Render-OFE6QLI2.mjs → Render-FXZX6NFH.mjs} +1 -1
- package/dist/{actions-ONhOkrvf.d.mts → actions-BkBoKAc5.d.mts} +26 -10
- package/dist/{actions-ONhOkrvf.d.ts → actions-BkBoKAc5.d.ts} +26 -10
- package/dist/{chunk-QAWJTCV5.mjs → chunk-3VQHXASI.mjs} +1 -1
- package/dist/{chunk-BSDEIOEK.mjs → chunk-6KNQXLQR.mjs} +10 -8
- package/dist/{chunk-CSSRLPHM.mjs → chunk-AOEDIUVK.mjs} +1 -1
- package/dist/{chunk-4277WLKB.mjs → chunk-FCCNEDWR.mjs} +4373 -3687
- package/dist/{chunk-PLXSMBAA.mjs → chunk-GVKHZNTR.mjs} +1 -1
- package/dist/{chunk-DAQLMM2T.mjs → chunk-K562SEXI.mjs} +97 -6
- package/dist/{chunk-QBGM4ELA.mjs → chunk-KN3XDS7U.mjs} +1 -1
- package/dist/{chunk-62AAYNXG.mjs → chunk-MEL7FUSF.mjs} +1 -1
- package/dist/{chunk-Y656T6AQ.mjs → chunk-NYGQH27S.mjs} +100 -74
- package/dist/{chunk-NLUHDYVR.mjs → chunk-Q3TJ2VYO.mjs} +23 -3
- package/dist/{chunk-T3WX7XJ6.mjs → chunk-REWRIUGR.mjs} +33 -9
- package/dist/{chunk-2Q4PACDA.mjs → chunk-V2IQTPPK.mjs} +4 -4
- package/dist/{full-BEMDJKDS.mjs → full-4OS3O57Y.mjs} +8 -8
- package/dist/{index-BEoNHRI1.d.ts → index-bqD1SEOb.d.mts} +3 -1
- package/dist/{index-DfxZ7tZF.d.mts → index-lt1zf5WR.d.ts} +3 -1
- package/dist/index.css +732 -341
- package/dist/index.d.mts +28 -9
- package/dist/index.d.ts +28 -9
- package/dist/index.js +3340 -2427
- package/dist/index.mjs +21 -18
- package/dist/internal.d.mts +2 -2
- package/dist/internal.d.ts +2 -2
- package/dist/internal.js +22 -3
- package/dist/internal.mjs +2 -2
- package/dist/{loaded-JU3A7Y4L.mjs → loaded-DCQVLO7I.mjs} +5 -5
- package/dist/{loaded-N3FYGF2Y.mjs → loaded-JGRO7BH7.mjs} +5 -5
- package/dist/{loaded-OBY7OMS6.mjs → loaded-KKVJE5KH.mjs} +5 -5
- package/dist/no-external.css +870 -475
- package/dist/no-external.d.mts +4 -4
- package/dist/no-external.d.ts +4 -4
- package/dist/no-external.js +3347 -2431
- package/dist/no-external.mjs +20 -12
- package/dist/rsc.css +28 -27
- package/dist/rsc.d.mts +2 -2
- package/dist/rsc.d.ts +2 -2
- package/dist/rsc.js +146 -83
- package/dist/rsc.mjs +4 -4
- package/dist/{walk-tree-CdriEzFJ.d.mts → walk-tree-CRRDqx6_.d.mts} +1 -1
- package/dist/{walk-tree-DHbAZ4wF.d.ts → walk-tree-CS7sEpfG.d.ts} +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -6,21 +6,25 @@ 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-
|
|
17
|
-
import "./chunk-
|
|
20
|
+
} from "./chunk-FCCNEDWR.mjs";
|
|
21
|
+
import "./chunk-V2IQTPPK.mjs";
|
|
18
22
|
import {
|
|
19
23
|
migrate,
|
|
20
24
|
resolveAllData,
|
|
21
25
|
transformProps
|
|
22
|
-
} from "./chunk-
|
|
23
|
-
import "./chunk-
|
|
26
|
+
} from "./chunk-NYGQH27S.mjs";
|
|
27
|
+
import "./chunk-AOEDIUVK.mjs";
|
|
24
28
|
import {
|
|
25
29
|
Action,
|
|
26
30
|
ActionBar,
|
|
@@ -29,23 +33,18 @@ import {
|
|
|
29
33
|
Label,
|
|
30
34
|
RichTextMenu,
|
|
31
35
|
Separator
|
|
32
|
-
} from "./chunk-
|
|
33
|
-
import "./chunk-
|
|
34
|
-
import "./chunk-
|
|
35
|
-
import "./chunk-
|
|
36
|
-
import "./chunk-
|
|
37
|
-
import "./chunk-
|
|
38
|
-
import "./chunk-
|
|
36
|
+
} from "./chunk-6KNQXLQR.mjs";
|
|
37
|
+
import "./chunk-GVKHZNTR.mjs";
|
|
38
|
+
import "./chunk-MEL7FUSF.mjs";
|
|
39
|
+
import "./chunk-3VQHXASI.mjs";
|
|
40
|
+
import "./chunk-K562SEXI.mjs";
|
|
41
|
+
import "./chunk-KN3XDS7U.mjs";
|
|
42
|
+
import "./chunk-REWRIUGR.mjs";
|
|
39
43
|
import "./chunk-Y2EFNT5P.mjs";
|
|
40
44
|
import {
|
|
41
45
|
walkTree
|
|
42
|
-
} from "./chunk-
|
|
43
|
-
import
|
|
44
|
-
init_react_import
|
|
45
|
-
} from "./chunk-M6W7YEVX.mjs";
|
|
46
|
-
|
|
47
|
-
// bundle/index.ts
|
|
48
|
-
init_react_import();
|
|
46
|
+
} from "./chunk-Q3TJ2VYO.mjs";
|
|
47
|
+
import "./chunk-M6W7YEVX.mjs";
|
|
49
48
|
export {
|
|
50
49
|
Action,
|
|
51
50
|
ActionBar,
|
|
@@ -61,8 +60,12 @@ export {
|
|
|
61
60
|
Render,
|
|
62
61
|
RichTextMenu,
|
|
63
62
|
Separator,
|
|
63
|
+
blocksPlugin,
|
|
64
64
|
createUsePuck,
|
|
65
|
+
fieldsPlugin,
|
|
66
|
+
legacySideBarPlugin,
|
|
65
67
|
migrate,
|
|
68
|
+
outlinePlugin,
|
|
66
69
|
overrideKeys,
|
|
67
70
|
registerOverlayPortal,
|
|
68
71
|
renderContext,
|
package/dist/internal.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Reducer } from 'react';
|
|
2
|
-
import { D as Data, A as AppState, O as OnAction, P as PrivateAppState, a as PuckAction } from './actions-
|
|
3
|
-
import { A as AppStore } from './index-
|
|
2
|
+
import { D as Data, A as AppState, O as OnAction, P as PrivateAppState, a as PuckAction } from './actions-BkBoKAc5.mjs';
|
|
3
|
+
import { A as AppStore } from './index-bqD1SEOb.mjs';
|
|
4
4
|
import '@tiptap/react';
|
|
5
5
|
import '@tiptap/extension-blockquote';
|
|
6
6
|
import '@tiptap/extension-bold';
|
package/dist/internal.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Reducer } from 'react';
|
|
2
|
-
import { D as Data, A as AppState, O as OnAction, P as PrivateAppState, a as PuckAction } from './actions-
|
|
3
|
-
import { A as AppStore } from './index-
|
|
2
|
+
import { D as Data, A as AppState, O as OnAction, P as PrivateAppState, a as PuckAction } from './actions-BkBoKAc5.js';
|
|
3
|
+
import { A as AppStore } from './index-lt1zf5WR.js';
|
|
4
4
|
import '@tiptap/react';
|
|
5
5
|
import '@tiptap/extension-blockquote';
|
|
6
6
|
import '@tiptap/extension-bold';
|
package/dist/internal.js
CHANGED
|
@@ -212,12 +212,12 @@ var walkObject = ({
|
|
|
212
212
|
}
|
|
213
213
|
return flatten(newProps);
|
|
214
214
|
};
|
|
215
|
-
function mapFields(item, mappers, config, recurseSlots = false) {
|
|
215
|
+
function mapFields(item, mappers, config, recurseSlots = false, shouldDefaultSlots = true) {
|
|
216
216
|
var _a, _b, _c, _d, _e;
|
|
217
217
|
const itemType = "type" in item ? item.type : "root";
|
|
218
218
|
const componentConfig = itemType === "root" ? config.root : (_a = config.components) == null ? void 0 : _a[itemType];
|
|
219
219
|
const newProps = walkObject({
|
|
220
|
-
value: defaultSlots((_b = item.props) != null ? _b : {}, (_c = componentConfig == null ? void 0 : componentConfig.fields) != null ? _c : {}),
|
|
220
|
+
value: shouldDefaultSlots ? defaultSlots((_b = item.props) != null ? _b : {}, (_c = componentConfig == null ? void 0 : componentConfig.fields) != null ? _c : {}) : item.props,
|
|
221
221
|
fields: (_d = componentConfig == null ? void 0 : componentConfig.fields) != null ? _d : {},
|
|
222
222
|
mappers,
|
|
223
223
|
id: item.props ? (_e = item.props.id) != null ? _e : "root" : "root",
|
|
@@ -245,9 +245,28 @@ var stripSlots = (data, config) => {
|
|
|
245
245
|
|
|
246
246
|
// lib/data/flatten-node.ts
|
|
247
247
|
var { flatten: flatten2, unflatten } = import_flat.default;
|
|
248
|
+
function isEmptyArrayOrObject(val) {
|
|
249
|
+
if (Array.isArray(val)) {
|
|
250
|
+
return val.length === 0;
|
|
251
|
+
}
|
|
252
|
+
if (val != null && Object.prototype.toString.call(val) === "[object Object]") {
|
|
253
|
+
return Object.keys(val).length === 0;
|
|
254
|
+
}
|
|
255
|
+
return false;
|
|
256
|
+
}
|
|
257
|
+
function stripEmptyObjects(props) {
|
|
258
|
+
const result = {};
|
|
259
|
+
for (const key in props) {
|
|
260
|
+
if (!Object.prototype.hasOwnProperty.call(props, key)) continue;
|
|
261
|
+
const val = props[key];
|
|
262
|
+
if (isEmptyArrayOrObject(val)) continue;
|
|
263
|
+
result[key] = val;
|
|
264
|
+
}
|
|
265
|
+
return result;
|
|
266
|
+
}
|
|
248
267
|
var flattenNode = (node, config) => {
|
|
249
268
|
return __spreadProps(__spreadValues({}, node), {
|
|
250
|
-
props: flatten2(stripSlots(node, config).props)
|
|
269
|
+
props: stripEmptyObjects(flatten2(stripSlots(node, config).props))
|
|
251
270
|
});
|
|
252
271
|
};
|
|
253
272
|
|
package/dist/internal.mjs
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useAlignOptions
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-GVKHZNTR.mjs";
|
|
4
4
|
import {
|
|
5
5
|
AlignLeft,
|
|
6
6
|
SelectControl,
|
|
7
7
|
useControlContext
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-K562SEXI.mjs";
|
|
9
|
+
import "./chunk-KN3XDS7U.mjs";
|
|
10
|
+
import "./chunk-REWRIUGR.mjs";
|
|
11
11
|
import "./chunk-Y2EFNT5P.mjs";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-Q3TJ2VYO.mjs";
|
|
13
13
|
import {
|
|
14
14
|
init_react_import
|
|
15
15
|
} from "./chunk-M6W7YEVX.mjs";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useListOptions
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-3VQHXASI.mjs";
|
|
4
4
|
import {
|
|
5
5
|
List,
|
|
6
6
|
SelectControl,
|
|
7
7
|
useControlContext
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-K562SEXI.mjs";
|
|
9
|
+
import "./chunk-KN3XDS7U.mjs";
|
|
10
|
+
import "./chunk-REWRIUGR.mjs";
|
|
11
11
|
import "./chunk-Y2EFNT5P.mjs";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-Q3TJ2VYO.mjs";
|
|
13
13
|
import {
|
|
14
14
|
init_react_import
|
|
15
15
|
} from "./chunk-M6W7YEVX.mjs";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useHeadingOptions
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-MEL7FUSF.mjs";
|
|
4
4
|
import {
|
|
5
5
|
Heading,
|
|
6
6
|
SelectControl,
|
|
7
7
|
useControlContext
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-K562SEXI.mjs";
|
|
9
|
+
import "./chunk-KN3XDS7U.mjs";
|
|
10
|
+
import "./chunk-REWRIUGR.mjs";
|
|
11
11
|
import "./chunk-Y2EFNT5P.mjs";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-Q3TJ2VYO.mjs";
|
|
13
13
|
import {
|
|
14
14
|
init_react_import
|
|
15
15
|
} from "./chunk-M6W7YEVX.mjs";
|