@puckeditor/plugin-heading-analyzer 0.22.0-canary.faffb521 → 0.22.1-canary.1a601e70
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.js +20 -7
- package/dist/index.mjs +20 -7
- package/package.json +2 -2
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.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();
|
|
@@ -544,7 +544,7 @@ var walkField = ({
|
|
|
544
544
|
config,
|
|
545
545
|
recurseSlots = false
|
|
546
546
|
}) => {
|
|
547
|
-
var _a, _b, _c;
|
|
547
|
+
var _a, _b, _c, _d;
|
|
548
548
|
const fieldType = (_a = fields[propKey]) == null ? void 0 : _a.type;
|
|
549
549
|
const map = mappers[fieldType];
|
|
550
550
|
if (map && fieldType === "slot") {
|
|
@@ -605,7 +605,9 @@ var walkField = ({
|
|
|
605
605
|
id,
|
|
606
606
|
getPropPath: (k) => `${propPath}.${k}`,
|
|
607
607
|
config,
|
|
608
|
-
recurseSlots
|
|
608
|
+
recurseSlots,
|
|
609
|
+
// Only default missing fields when objectFields describe this value
|
|
610
|
+
ownedFields: ((_d = fields[propKey]) == null ? void 0 : _d.type) === "object"
|
|
609
611
|
});
|
|
610
612
|
}
|
|
611
613
|
}
|
|
@@ -618,11 +620,21 @@ var walkObject = ({
|
|
|
618
620
|
id,
|
|
619
621
|
getPropPath,
|
|
620
622
|
config,
|
|
621
|
-
recurseSlots
|
|
623
|
+
recurseSlots,
|
|
624
|
+
ownedFields
|
|
622
625
|
}) => {
|
|
623
|
-
const
|
|
626
|
+
const keys2 = Object.keys(value);
|
|
627
|
+
if (ownedFields) {
|
|
628
|
+
for (const fieldName in fields) {
|
|
629
|
+
const fieldType = fields[fieldName].type;
|
|
630
|
+
if (fieldType !== "slot" && mappers[fieldType] && !(fieldName in value)) {
|
|
631
|
+
keys2.push(fieldName);
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
const newProps = keys2.map((k) => {
|
|
624
636
|
const opts = {
|
|
625
|
-
value:
|
|
637
|
+
value: value[k],
|
|
626
638
|
fields,
|
|
627
639
|
mappers,
|
|
628
640
|
propKey: k,
|
|
@@ -657,7 +669,8 @@ function mapFields(item, mappers, config, recurseSlots = false, shouldDefaultSlo
|
|
|
657
669
|
id: item.props ? (_e = item.props.id) != null ? _e : "root" : "root",
|
|
658
670
|
getPropPath: (k) => k,
|
|
659
671
|
config,
|
|
660
|
-
recurseSlots
|
|
672
|
+
recurseSlots,
|
|
673
|
+
ownedFields: true
|
|
661
674
|
});
|
|
662
675
|
if (isPromise(newProps)) {
|
|
663
676
|
return newProps.then((resolvedProps) => __spreadProps(__spreadValues({}, item), {
|
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();
|
|
@@ -532,7 +532,7 @@ var walkField = ({
|
|
|
532
532
|
config,
|
|
533
533
|
recurseSlots = false
|
|
534
534
|
}) => {
|
|
535
|
-
var _a, _b, _c;
|
|
535
|
+
var _a, _b, _c, _d;
|
|
536
536
|
const fieldType = (_a = fields[propKey]) == null ? void 0 : _a.type;
|
|
537
537
|
const map = mappers[fieldType];
|
|
538
538
|
if (map && fieldType === "slot") {
|
|
@@ -593,7 +593,9 @@ var walkField = ({
|
|
|
593
593
|
id,
|
|
594
594
|
getPropPath: (k) => `${propPath}.${k}`,
|
|
595
595
|
config,
|
|
596
|
-
recurseSlots
|
|
596
|
+
recurseSlots,
|
|
597
|
+
// Only default missing fields when objectFields describe this value
|
|
598
|
+
ownedFields: ((_d = fields[propKey]) == null ? void 0 : _d.type) === "object"
|
|
597
599
|
});
|
|
598
600
|
}
|
|
599
601
|
}
|
|
@@ -606,11 +608,21 @@ var walkObject = ({
|
|
|
606
608
|
id,
|
|
607
609
|
getPropPath,
|
|
608
610
|
config,
|
|
609
|
-
recurseSlots
|
|
611
|
+
recurseSlots,
|
|
612
|
+
ownedFields
|
|
610
613
|
}) => {
|
|
611
|
-
const
|
|
614
|
+
const keys2 = Object.keys(value);
|
|
615
|
+
if (ownedFields) {
|
|
616
|
+
for (const fieldName in fields) {
|
|
617
|
+
const fieldType = fields[fieldName].type;
|
|
618
|
+
if (fieldType !== "slot" && mappers[fieldType] && !(fieldName in value)) {
|
|
619
|
+
keys2.push(fieldName);
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
const newProps = keys2.map((k) => {
|
|
612
624
|
const opts = {
|
|
613
|
-
value:
|
|
625
|
+
value: value[k],
|
|
614
626
|
fields,
|
|
615
627
|
mappers,
|
|
616
628
|
propKey: k,
|
|
@@ -645,7 +657,8 @@ function mapFields(item, mappers, config, recurseSlots = false, shouldDefaultSlo
|
|
|
645
657
|
id: item.props ? (_e = item.props.id) != null ? _e : "root" : "root",
|
|
646
658
|
getPropPath: (k) => k,
|
|
647
659
|
config,
|
|
648
|
-
recurseSlots
|
|
660
|
+
recurseSlots,
|
|
661
|
+
ownedFields: true
|
|
649
662
|
});
|
|
650
663
|
if (isPromise(newProps)) {
|
|
651
664
|
return newProps.then((resolvedProps) => __spreadProps(__spreadValues({}, item), {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@puckeditor/plugin-heading-analyzer",
|
|
3
|
-
"version": "0.22.
|
|
3
|
+
"version": "0.22.1-canary.1a601e70",
|
|
4
4
|
"author": "Chris Villa <chris@puckeditor.com>",
|
|
5
5
|
"repository": "puckeditor/puck",
|
|
6
6
|
"bugs": "https://github.com/puckeditor/puck/issues",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"dist"
|
|
26
26
|
],
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@puckeditor/core": "^0.22.
|
|
28
|
+
"@puckeditor/core": "^0.22.1-canary.1a601e70",
|
|
29
29
|
"@types/minimatch": "3.0.5",
|
|
30
30
|
"@types/react": "^19.0.1",
|
|
31
31
|
"@types/react-dom": "^19.0.2",
|