@puckeditor/plugin-heading-analyzer 0.22.0-canary.d2c2761e → 0.22.0-canary.d4c8bcf2
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 +23 -22
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +34 -45
- package/dist/index.mjs +34 -45
- package/package.json +3 -3
package/dist/index.css
CHANGED
|
@@ -14,16 +14,17 @@
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
/* css-module:/home/runner/work/puck/puck/packages/core/components/OutlineList/styles.module.css/#css-module-data */
|
|
17
|
-
.
|
|
18
|
-
|
|
17
|
+
._OutlineList_vmp09_1 {
|
|
18
|
+
--_puck-outline-list-connector: var(--puck-color-border);
|
|
19
|
+
color: var(--puck-color-text);
|
|
19
20
|
font-family: var(--puck-font-family);
|
|
20
21
|
margin: 0;
|
|
21
|
-
padding-inline-start:
|
|
22
|
+
padding-inline-start: var(--puck-space-4);
|
|
22
23
|
position: relative;
|
|
23
24
|
list-style: none;
|
|
24
25
|
}
|
|
25
|
-
.
|
|
26
|
-
background: var(--
|
|
26
|
+
._OutlineList_vmp09_1::before {
|
|
27
|
+
background: var(--_puck-outline-list-connector);
|
|
27
28
|
position: absolute;
|
|
28
29
|
left: -1px;
|
|
29
30
|
top: 0px;
|
|
@@ -31,16 +32,16 @@
|
|
|
31
32
|
height: calc(100% - 9px);
|
|
32
33
|
content: "";
|
|
33
34
|
}
|
|
34
|
-
.
|
|
35
|
+
._OutlineList_vmp09_1:dir(rtl)::before {
|
|
35
36
|
left: unset;
|
|
36
37
|
right: -1px;
|
|
37
38
|
}
|
|
38
|
-
.
|
|
39
|
+
._OutlineListItem_vmp09_27 {
|
|
39
40
|
position: relative;
|
|
40
|
-
margin-bottom:
|
|
41
|
+
margin-bottom: var(--puck-space-1);
|
|
41
42
|
}
|
|
42
|
-
.
|
|
43
|
-
background: var(--
|
|
43
|
+
._OutlineListItem_vmp09_27::before {
|
|
44
|
+
background: var(--_puck-outline-list-connector);
|
|
44
45
|
position: absolute;
|
|
45
46
|
left: -17px;
|
|
46
47
|
top: 9px;
|
|
@@ -48,28 +49,28 @@
|
|
|
48
49
|
height: 1px;
|
|
49
50
|
content: "";
|
|
50
51
|
}
|
|
51
|
-
.
|
|
52
|
+
._OutlineListItem_vmp09_27:dir(rtl)::before {
|
|
52
53
|
left: unset;
|
|
53
54
|
right: -17px;
|
|
54
55
|
}
|
|
55
|
-
._OutlineListItem--
|
|
56
|
+
._OutlineListItem--clickable_vmp09_47 {
|
|
56
57
|
cursor: pointer;
|
|
57
|
-
transition: color
|
|
58
|
+
transition: color var(--puck-duration-fast) var(--puck-ease-exit);
|
|
58
59
|
}
|
|
59
|
-
._OutlineListItem--
|
|
60
|
-
outline:
|
|
61
|
-
outline-offset:
|
|
60
|
+
._OutlineListItem--clickable_vmp09_47:focus-visible {
|
|
61
|
+
outline: var(--puck-border-width-focus) solid var(--puck-color-focus-ring);
|
|
62
|
+
outline-offset: var(--puck-border-width-focus);
|
|
62
63
|
}
|
|
63
64
|
@media (hover: hover) and (pointer: fine) {
|
|
64
|
-
._OutlineListItem--
|
|
65
|
-
color: var(--puck-color-
|
|
65
|
+
._OutlineListItem--clickable_vmp09_47:hover {
|
|
66
|
+
color: var(--puck-color-interactive);
|
|
66
67
|
transition: none;
|
|
67
68
|
}
|
|
68
69
|
}
|
|
69
|
-
._OutlineListItem--
|
|
70
|
-
color: var(--puck-color-
|
|
70
|
+
._OutlineListItem--clickable_vmp09_47:active {
|
|
71
|
+
color: var(--puck-color-interactive-hover);
|
|
71
72
|
transition: none;
|
|
72
73
|
}
|
|
73
|
-
.
|
|
74
|
-
margin:
|
|
74
|
+
._OutlineListItem_vmp09_27 > ._OutlineList_vmp09_1 {
|
|
75
|
+
margin: var(--puck-space-2) 0;
|
|
75
76
|
}
|
package/dist/index.d.mts
CHANGED
|
@@ -428,6 +428,7 @@ UserField extends BaseField = {}> = {
|
|
|
428
428
|
metadata: ComponentMetadata;
|
|
429
429
|
trigger: ResolveDataTrigger;
|
|
430
430
|
parent: ComponentData | null;
|
|
431
|
+
root: RootData;
|
|
431
432
|
}) => Promise<WithPartialProps<DataShape, FieldProps>> | WithPartialProps<DataShape, FieldProps>;
|
|
432
433
|
resolvePermissions?: (data: DataShape, params: {
|
|
433
434
|
changed: Partial<Record<keyof FieldProps, boolean> & {
|
package/dist/index.d.ts
CHANGED
|
@@ -428,6 +428,7 @@ UserField extends BaseField = {}> = {
|
|
|
428
428
|
metadata: ComponentMetadata;
|
|
429
429
|
trigger: ResolveDataTrigger;
|
|
430
430
|
parent: ComponentData | null;
|
|
431
|
+
root: RootData;
|
|
431
432
|
}) => Promise<WithPartialProps<DataShape, FieldProps>> | WithPartialProps<DataShape, FieldProps>;
|
|
432
433
|
resolvePermissions?: (data: DataShape, params: {
|
|
433
434
|
changed: Partial<Record<keyof FieldProps, boolean> & {
|
package/dist/index.js
CHANGED
|
@@ -291,7 +291,7 @@ init_react_import();
|
|
|
291
291
|
|
|
292
292
|
// css-module:/home/runner/work/puck/puck/packages/core/components/OutlineList/styles.module.css#css-module
|
|
293
293
|
init_react_import();
|
|
294
|
-
var styles_module_default = { "OutlineList": "
|
|
294
|
+
var styles_module_default = { "OutlineList": "_OutlineList_vmp09_1", "OutlineListItem": "_OutlineListItem_vmp09_27", "OutlineListItem--clickable": "_OutlineListItem--clickable_vmp09_47" };
|
|
295
295
|
|
|
296
296
|
// ../core/lib/get-class-name-factory.ts
|
|
297
297
|
init_react_import();
|
|
@@ -550,20 +550,10 @@ var walkField = ({
|
|
|
550
550
|
if (map && fieldType === "slot") {
|
|
551
551
|
const content = value || [];
|
|
552
552
|
const mappedContent = recurseSlots ? content.map((el) => {
|
|
553
|
-
|
|
554
|
-
const componentConfig = config.components[el.type];
|
|
555
|
-
if (!componentConfig) {
|
|
553
|
+
if (!config.components[el.type]) {
|
|
556
554
|
throw new Error(`Could not find component config for ${el.type}`);
|
|
557
555
|
}
|
|
558
|
-
|
|
559
|
-
return walkField({
|
|
560
|
-
value: __spreadProps(__spreadValues({}, el), { props: defaultSlots(el.props, fields2) }),
|
|
561
|
-
fields: fields2,
|
|
562
|
-
mappers,
|
|
563
|
-
id: el.props.id,
|
|
564
|
-
config,
|
|
565
|
-
recurseSlots
|
|
566
|
-
});
|
|
556
|
+
return mapFields(el, mappers, config, recurseSlots);
|
|
567
557
|
}) : content;
|
|
568
558
|
if (containsPromise(mappedContent)) {
|
|
569
559
|
return Promise.all(mappedContent);
|
|
@@ -877,53 +867,49 @@ var insert = (list, index, item) => {
|
|
|
877
867
|
// ../core/lib/generate-id.ts
|
|
878
868
|
init_react_import();
|
|
879
869
|
|
|
880
|
-
// ../core/
|
|
870
|
+
// ../core/lib/uuid/index.ts
|
|
881
871
|
init_react_import();
|
|
882
872
|
|
|
883
|
-
// ../core/
|
|
873
|
+
// ../core/lib/uuid/rng.ts
|
|
884
874
|
init_react_import();
|
|
885
|
-
var
|
|
886
|
-
var rnds8Pool = new Uint8Array(256);
|
|
887
|
-
var poolPtr = rnds8Pool.length;
|
|
875
|
+
var rnds8 = new Uint8Array(16);
|
|
888
876
|
function rng() {
|
|
889
|
-
|
|
890
|
-
import_crypto.default.randomFillSync(rnds8Pool);
|
|
891
|
-
poolPtr = 0;
|
|
892
|
-
}
|
|
893
|
-
return rnds8Pool.slice(poolPtr, poolPtr += 16);
|
|
877
|
+
return crypto.getRandomValues(rnds8);
|
|
894
878
|
}
|
|
895
879
|
|
|
896
|
-
// ../core/
|
|
880
|
+
// ../core/lib/uuid/stringify.ts
|
|
897
881
|
init_react_import();
|
|
898
882
|
var byteToHex = [];
|
|
899
883
|
for (let i = 0; i < 256; ++i) {
|
|
900
884
|
byteToHex.push((i + 256).toString(16).slice(1));
|
|
901
885
|
}
|
|
902
886
|
function unsafeStringify(arr, offset = 0) {
|
|
903
|
-
return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];
|
|
887
|
+
return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
|
|
904
888
|
}
|
|
905
889
|
|
|
906
|
-
// ../core/
|
|
907
|
-
init_react_import();
|
|
908
|
-
|
|
909
|
-
// ../core/node_modules/uuid/dist/esm-node/native.js
|
|
910
|
-
init_react_import();
|
|
911
|
-
var import_crypto2 = __toESM(require("crypto"));
|
|
912
|
-
var native_default = {
|
|
913
|
-
randomUUID: import_crypto2.default.randomUUID
|
|
914
|
-
};
|
|
915
|
-
|
|
916
|
-
// ../core/node_modules/uuid/dist/esm-node/v4.js
|
|
890
|
+
// ../core/lib/uuid/index.ts
|
|
917
891
|
function v4(options, buf, offset) {
|
|
918
|
-
if (
|
|
919
|
-
return
|
|
892
|
+
if (!buf && !options && crypto.randomUUID) {
|
|
893
|
+
return crypto.randomUUID();
|
|
920
894
|
}
|
|
895
|
+
return _v4(options, buf, offset);
|
|
896
|
+
}
|
|
897
|
+
function _v4(options, buf, offset) {
|
|
898
|
+
var _a, _b, _c;
|
|
921
899
|
options = options || {};
|
|
922
|
-
const rnds = options.random
|
|
900
|
+
const rnds = (_c = (_b = options.random) != null ? _b : (_a = options.rng) == null ? void 0 : _a.call(options)) != null ? _c : rng();
|
|
901
|
+
if (rnds.length < 16) {
|
|
902
|
+
throw new Error("Random bytes length must be >= 16");
|
|
903
|
+
}
|
|
923
904
|
rnds[6] = rnds[6] & 15 | 64;
|
|
924
905
|
rnds[8] = rnds[8] & 63 | 128;
|
|
925
906
|
if (buf) {
|
|
926
907
|
offset = offset || 0;
|
|
908
|
+
if (offset < 0 || offset + 16 > buf.length) {
|
|
909
|
+
throw new RangeError(
|
|
910
|
+
`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`
|
|
911
|
+
);
|
|
912
|
+
}
|
|
927
913
|
for (let i = 0; i < 16; ++i) {
|
|
928
914
|
buf[offset + i] = rnds[i];
|
|
929
915
|
}
|
|
@@ -931,10 +917,10 @@ function v4(options, buf, offset) {
|
|
|
931
917
|
}
|
|
932
918
|
return unsafeStringify(rnds);
|
|
933
919
|
}
|
|
934
|
-
var
|
|
920
|
+
var uuid_default = v4;
|
|
935
921
|
|
|
936
922
|
// ../core/lib/generate-id.ts
|
|
937
|
-
var generateId = (type) => type ? `${type}-${
|
|
923
|
+
var generateId = (type) => type ? `${type}-${uuid_default()}` : uuid_default();
|
|
938
924
|
|
|
939
925
|
// ../core/lib/data/get-ids-for-parent.ts
|
|
940
926
|
init_react_import();
|
|
@@ -2272,7 +2258,7 @@ var createFieldsSlice = (_set, _get) => {
|
|
|
2272
2258
|
// ../core/lib/resolve-component-data.ts
|
|
2273
2259
|
init_react_import();
|
|
2274
2260
|
var cache = { lastChange: {} };
|
|
2275
|
-
var resolveComponentData = (_0, _1, ..._2) => __async(null, [_0, _1, ..._2], function* (item, config, metadata = {}, onResolveStart, onResolveEnd, trigger = "replace", parent = null) {
|
|
2261
|
+
var resolveComponentData = (_0, _1, ..._2) => __async(null, [_0, _1, ..._2], function* (item, config, metadata = {}, onResolveStart, onResolveEnd, trigger = "replace", parent = null, root = { props: {} }) {
|
|
2276
2262
|
const configForItem = "type" in item && item.type !== "root" ? config.components[item.type] : config.root;
|
|
2277
2263
|
const resolvedItem = __spreadValues({}, item);
|
|
2278
2264
|
const shouldRunResolver = (configForItem == null ? void 0 : configForItem.resolveData) && item.props;
|
|
@@ -2299,7 +2285,8 @@ var resolveComponentData = (_0, _1, ..._2) => __async(null, [_0, _1, ..._2], fun
|
|
|
2299
2285
|
lastData: oldItem,
|
|
2300
2286
|
metadata: __spreadValues(__spreadValues({}, metadata), configForItem.metadata),
|
|
2301
2287
|
trigger,
|
|
2302
|
-
parent
|
|
2288
|
+
parent,
|
|
2289
|
+
root
|
|
2303
2290
|
});
|
|
2304
2291
|
resolvedItem.props = __spreadValues(__spreadValues({}, item.props), resolvedProps);
|
|
2305
2292
|
if (Object.keys(readOnly).length) {
|
|
@@ -2322,7 +2309,8 @@ var resolveComponentData = (_0, _1, ..._2) => __async(null, [_0, _1, ..._2], fun
|
|
|
2322
2309
|
onResolveStart,
|
|
2323
2310
|
onResolveEnd,
|
|
2324
2311
|
trigger,
|
|
2325
|
-
itemAsComponentData
|
|
2312
|
+
itemAsComponentData,
|
|
2313
|
+
root
|
|
2326
2314
|
)).node;
|
|
2327
2315
|
})
|
|
2328
2316
|
)
|
|
@@ -2541,7 +2529,8 @@ var createAppStore = (initialAppStore) => create()(
|
|
|
2541
2529
|
timeouts[id]();
|
|
2542
2530
|
}),
|
|
2543
2531
|
trigger,
|
|
2544
|
-
parentData
|
|
2532
|
+
parentData,
|
|
2533
|
+
state.data.root
|
|
2545
2534
|
);
|
|
2546
2535
|
}),
|
|
2547
2536
|
resolveAndCommitData: () => __async(null, null, function* () {
|
package/dist/index.mjs
CHANGED
|
@@ -279,7 +279,7 @@ init_react_import();
|
|
|
279
279
|
|
|
280
280
|
// css-module:/home/runner/work/puck/puck/packages/core/components/OutlineList/styles.module.css#css-module
|
|
281
281
|
init_react_import();
|
|
282
|
-
var styles_module_default = { "OutlineList": "
|
|
282
|
+
var styles_module_default = { "OutlineList": "_OutlineList_vmp09_1", "OutlineListItem": "_OutlineListItem_vmp09_27", "OutlineListItem--clickable": "_OutlineListItem--clickable_vmp09_47" };
|
|
283
283
|
|
|
284
284
|
// ../core/lib/get-class-name-factory.ts
|
|
285
285
|
init_react_import();
|
|
@@ -538,20 +538,10 @@ var walkField = ({
|
|
|
538
538
|
if (map && fieldType === "slot") {
|
|
539
539
|
const content = value || [];
|
|
540
540
|
const mappedContent = recurseSlots ? content.map((el) => {
|
|
541
|
-
|
|
542
|
-
const componentConfig = config.components[el.type];
|
|
543
|
-
if (!componentConfig) {
|
|
541
|
+
if (!config.components[el.type]) {
|
|
544
542
|
throw new Error(`Could not find component config for ${el.type}`);
|
|
545
543
|
}
|
|
546
|
-
|
|
547
|
-
return walkField({
|
|
548
|
-
value: __spreadProps(__spreadValues({}, el), { props: defaultSlots(el.props, fields2) }),
|
|
549
|
-
fields: fields2,
|
|
550
|
-
mappers,
|
|
551
|
-
id: el.props.id,
|
|
552
|
-
config,
|
|
553
|
-
recurseSlots
|
|
554
|
-
});
|
|
544
|
+
return mapFields(el, mappers, config, recurseSlots);
|
|
555
545
|
}) : content;
|
|
556
546
|
if (containsPromise(mappedContent)) {
|
|
557
547
|
return Promise.all(mappedContent);
|
|
@@ -865,53 +855,49 @@ var insert = (list, index, item) => {
|
|
|
865
855
|
// ../core/lib/generate-id.ts
|
|
866
856
|
init_react_import();
|
|
867
857
|
|
|
868
|
-
// ../core/
|
|
858
|
+
// ../core/lib/uuid/index.ts
|
|
869
859
|
init_react_import();
|
|
870
860
|
|
|
871
|
-
// ../core/
|
|
861
|
+
// ../core/lib/uuid/rng.ts
|
|
872
862
|
init_react_import();
|
|
873
|
-
|
|
874
|
-
var rnds8Pool = new Uint8Array(256);
|
|
875
|
-
var poolPtr = rnds8Pool.length;
|
|
863
|
+
var rnds8 = new Uint8Array(16);
|
|
876
864
|
function rng() {
|
|
877
|
-
|
|
878
|
-
crypto.randomFillSync(rnds8Pool);
|
|
879
|
-
poolPtr = 0;
|
|
880
|
-
}
|
|
881
|
-
return rnds8Pool.slice(poolPtr, poolPtr += 16);
|
|
865
|
+
return crypto.getRandomValues(rnds8);
|
|
882
866
|
}
|
|
883
867
|
|
|
884
|
-
// ../core/
|
|
868
|
+
// ../core/lib/uuid/stringify.ts
|
|
885
869
|
init_react_import();
|
|
886
870
|
var byteToHex = [];
|
|
887
871
|
for (let i = 0; i < 256; ++i) {
|
|
888
872
|
byteToHex.push((i + 256).toString(16).slice(1));
|
|
889
873
|
}
|
|
890
874
|
function unsafeStringify(arr, offset = 0) {
|
|
891
|
-
return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];
|
|
875
|
+
return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
|
|
892
876
|
}
|
|
893
877
|
|
|
894
|
-
// ../core/
|
|
895
|
-
init_react_import();
|
|
896
|
-
|
|
897
|
-
// ../core/node_modules/uuid/dist/esm-node/native.js
|
|
898
|
-
init_react_import();
|
|
899
|
-
import crypto2 from "crypto";
|
|
900
|
-
var native_default = {
|
|
901
|
-
randomUUID: crypto2.randomUUID
|
|
902
|
-
};
|
|
903
|
-
|
|
904
|
-
// ../core/node_modules/uuid/dist/esm-node/v4.js
|
|
878
|
+
// ../core/lib/uuid/index.ts
|
|
905
879
|
function v4(options, buf, offset) {
|
|
906
|
-
if (
|
|
907
|
-
return
|
|
880
|
+
if (!buf && !options && crypto.randomUUID) {
|
|
881
|
+
return crypto.randomUUID();
|
|
908
882
|
}
|
|
883
|
+
return _v4(options, buf, offset);
|
|
884
|
+
}
|
|
885
|
+
function _v4(options, buf, offset) {
|
|
886
|
+
var _a, _b, _c;
|
|
909
887
|
options = options || {};
|
|
910
|
-
const rnds = options.random
|
|
888
|
+
const rnds = (_c = (_b = options.random) != null ? _b : (_a = options.rng) == null ? void 0 : _a.call(options)) != null ? _c : rng();
|
|
889
|
+
if (rnds.length < 16) {
|
|
890
|
+
throw new Error("Random bytes length must be >= 16");
|
|
891
|
+
}
|
|
911
892
|
rnds[6] = rnds[6] & 15 | 64;
|
|
912
893
|
rnds[8] = rnds[8] & 63 | 128;
|
|
913
894
|
if (buf) {
|
|
914
895
|
offset = offset || 0;
|
|
896
|
+
if (offset < 0 || offset + 16 > buf.length) {
|
|
897
|
+
throw new RangeError(
|
|
898
|
+
`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`
|
|
899
|
+
);
|
|
900
|
+
}
|
|
915
901
|
for (let i = 0; i < 16; ++i) {
|
|
916
902
|
buf[offset + i] = rnds[i];
|
|
917
903
|
}
|
|
@@ -919,10 +905,10 @@ function v4(options, buf, offset) {
|
|
|
919
905
|
}
|
|
920
906
|
return unsafeStringify(rnds);
|
|
921
907
|
}
|
|
922
|
-
var
|
|
908
|
+
var uuid_default = v4;
|
|
923
909
|
|
|
924
910
|
// ../core/lib/generate-id.ts
|
|
925
|
-
var generateId = (type) => type ? `${type}-${
|
|
911
|
+
var generateId = (type) => type ? `${type}-${uuid_default()}` : uuid_default();
|
|
926
912
|
|
|
927
913
|
// ../core/lib/data/get-ids-for-parent.ts
|
|
928
914
|
init_react_import();
|
|
@@ -2260,7 +2246,7 @@ var createFieldsSlice = (_set, _get) => {
|
|
|
2260
2246
|
// ../core/lib/resolve-component-data.ts
|
|
2261
2247
|
init_react_import();
|
|
2262
2248
|
var cache = { lastChange: {} };
|
|
2263
|
-
var resolveComponentData = (_0, _1, ..._2) => __async(null, [_0, _1, ..._2], function* (item, config, metadata = {}, onResolveStart, onResolveEnd, trigger = "replace", parent = null) {
|
|
2249
|
+
var resolveComponentData = (_0, _1, ..._2) => __async(null, [_0, _1, ..._2], function* (item, config, metadata = {}, onResolveStart, onResolveEnd, trigger = "replace", parent = null, root = { props: {} }) {
|
|
2264
2250
|
const configForItem = "type" in item && item.type !== "root" ? config.components[item.type] : config.root;
|
|
2265
2251
|
const resolvedItem = __spreadValues({}, item);
|
|
2266
2252
|
const shouldRunResolver = (configForItem == null ? void 0 : configForItem.resolveData) && item.props;
|
|
@@ -2287,7 +2273,8 @@ var resolveComponentData = (_0, _1, ..._2) => __async(null, [_0, _1, ..._2], fun
|
|
|
2287
2273
|
lastData: oldItem,
|
|
2288
2274
|
metadata: __spreadValues(__spreadValues({}, metadata), configForItem.metadata),
|
|
2289
2275
|
trigger,
|
|
2290
|
-
parent
|
|
2276
|
+
parent,
|
|
2277
|
+
root
|
|
2291
2278
|
});
|
|
2292
2279
|
resolvedItem.props = __spreadValues(__spreadValues({}, item.props), resolvedProps);
|
|
2293
2280
|
if (Object.keys(readOnly).length) {
|
|
@@ -2310,7 +2297,8 @@ var resolveComponentData = (_0, _1, ..._2) => __async(null, [_0, _1, ..._2], fun
|
|
|
2310
2297
|
onResolveStart,
|
|
2311
2298
|
onResolveEnd,
|
|
2312
2299
|
trigger,
|
|
2313
|
-
itemAsComponentData
|
|
2300
|
+
itemAsComponentData,
|
|
2301
|
+
root
|
|
2314
2302
|
)).node;
|
|
2315
2303
|
})
|
|
2316
2304
|
)
|
|
@@ -2529,7 +2517,8 @@ var createAppStore = (initialAppStore) => create()(
|
|
|
2529
2517
|
timeouts[id]();
|
|
2530
2518
|
}),
|
|
2531
2519
|
trigger,
|
|
2532
|
-
parentData
|
|
2520
|
+
parentData,
|
|
2521
|
+
state.data.root
|
|
2533
2522
|
);
|
|
2534
2523
|
}),
|
|
2535
2524
|
resolveAndCommitData: () => __async(null, null, function* () {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@puckeditor/plugin-heading-analyzer",
|
|
3
|
-
"version": "0.22.0-canary.
|
|
3
|
+
"version": "0.22.0-canary.d4c8bcf2",
|
|
4
4
|
"author": "Chris Villa <chris@puckeditor.com>",
|
|
5
5
|
"repository": "puckeditor/puck",
|
|
6
6
|
"bugs": "https://github.com/puckeditor/puck/issues",
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
"dist"
|
|
26
26
|
],
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@puckeditor/core": "^0.22.0-canary.
|
|
28
|
+
"@puckeditor/core": "^0.22.0-canary.d4c8bcf2",
|
|
29
29
|
"@types/minimatch": "3.0.5",
|
|
30
30
|
"@types/react": "^19.0.1",
|
|
31
31
|
"@types/react-dom": "^19.0.2",
|
|
32
|
-
"eslint": "^
|
|
32
|
+
"eslint": "^9.0.0",
|
|
33
33
|
"eslint-config-custom": "*",
|
|
34
34
|
"tsconfig": "*",
|
|
35
35
|
"tsup": "^8.2.4",
|