@measured/puck-plugin-heading-analyzer 0.18.2-canary.fc7fda2 → 0.18.3-canary.098fdd1
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 +35 -27
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +15 -3
- package/dist/index.mjs +15 -3
- package/package.json +2 -2
package/dist/index.css
CHANGED
@@ -13,39 +13,39 @@
|
|
13
13
|
}
|
14
14
|
|
15
15
|
/* css-module:/home/runner/work/puck/puck/packages/core/components/SidebarSection/styles.module.css/#css-module-data */
|
16
|
-
.
|
16
|
+
._SidebarSection_8boj8_1 {
|
17
17
|
display: flex;
|
18
18
|
position: relative;
|
19
19
|
flex-direction: column;
|
20
20
|
color: var(--puck-color-black);
|
21
21
|
}
|
22
|
-
.
|
22
|
+
._SidebarSection_8boj8_1:last-of-type {
|
23
23
|
flex-grow: 1;
|
24
24
|
}
|
25
|
-
._SidebarSection-
|
25
|
+
._SidebarSection-title_8boj8_12 {
|
26
26
|
background: var(--puck-color-white);
|
27
27
|
padding: 16px;
|
28
28
|
border-bottom: 1px solid var(--puck-color-grey-09);
|
29
29
|
border-top: 1px solid var(--puck-color-grey-09);
|
30
30
|
overflow-x: auto;
|
31
31
|
}
|
32
|
-
._SidebarSection--
|
32
|
+
._SidebarSection--noBorderTop_8boj8_20 > ._SidebarSection-title_8boj8_12 {
|
33
33
|
border-top: 0px;
|
34
34
|
}
|
35
|
-
._SidebarSection-
|
35
|
+
._SidebarSection-content_8boj8_24 {
|
36
36
|
padding: 16px;
|
37
37
|
}
|
38
|
-
._SidebarSection--
|
38
|
+
._SidebarSection--noPadding_8boj8_28 > ._SidebarSection-content_8boj8_24 {
|
39
39
|
padding: 0px;
|
40
40
|
}
|
41
|
-
._SidebarSection--
|
41
|
+
._SidebarSection--noPadding_8boj8_28 > ._SidebarSection-content_8boj8_24:last-child {
|
42
42
|
padding-bottom: 4px;
|
43
43
|
}
|
44
|
-
.
|
44
|
+
._SidebarSection_8boj8_1:last-of-type ._SidebarSection-content_8boj8_24 {
|
45
45
|
border-bottom: none;
|
46
46
|
flex-grow: 1;
|
47
47
|
}
|
48
|
-
._SidebarSection-
|
48
|
+
._SidebarSection-breadcrumbLabel_8boj8_41 {
|
49
49
|
background: none;
|
50
50
|
border: 0;
|
51
51
|
border-radius: 2px;
|
@@ -56,34 +56,34 @@
|
|
56
56
|
padding: 0;
|
57
57
|
transition: color 50ms ease-in;
|
58
58
|
}
|
59
|
-
._SidebarSection-
|
59
|
+
._SidebarSection-breadcrumbLabel_8boj8_41:focus-visible {
|
60
60
|
outline: 2px solid var(--puck-color-azure-05);
|
61
61
|
outline-offset: 2px;
|
62
62
|
}
|
63
63
|
@media (hover: hover) and (pointer: fine) {
|
64
|
-
._SidebarSection-
|
64
|
+
._SidebarSection-breadcrumbLabel_8boj8_41:hover {
|
65
65
|
color: var(--puck-color-azure-03);
|
66
66
|
transition: none;
|
67
67
|
}
|
68
68
|
}
|
69
|
-
._SidebarSection-
|
69
|
+
._SidebarSection-breadcrumbLabel_8boj8_41:active {
|
70
70
|
color: var(--puck-color-azure-02);
|
71
71
|
transition: none;
|
72
72
|
}
|
73
|
-
._SidebarSection-
|
73
|
+
._SidebarSection-breadcrumbs_8boj8_70 {
|
74
74
|
align-items: center;
|
75
75
|
display: flex;
|
76
76
|
gap: 4px;
|
77
77
|
}
|
78
|
-
._SidebarSection-
|
78
|
+
._SidebarSection-breadcrumb_8boj8_41 {
|
79
79
|
align-items: center;
|
80
80
|
display: flex;
|
81
81
|
gap: 4px;
|
82
82
|
}
|
83
|
-
._SidebarSection-
|
84
|
-
padding-
|
83
|
+
._SidebarSection-heading_8boj8_82 {
|
84
|
+
padding-inline-end: 16px;
|
85
85
|
}
|
86
|
-
._SidebarSection-
|
86
|
+
._SidebarSection-loadingOverlay_8boj8_86 {
|
87
87
|
background: var(--puck-color-white);
|
88
88
|
display: flex;
|
89
89
|
justify-content: center;
|
@@ -158,15 +158,15 @@
|
|
158
158
|
}
|
159
159
|
|
160
160
|
/* css-module:/home/runner/work/puck/puck/packages/core/components/OutlineList/styles.module.css/#css-module-data */
|
161
|
-
.
|
161
|
+
._OutlineList_w4lzv_1 {
|
162
162
|
color: var(--puck-color-grey-03);
|
163
163
|
font-family: var(--puck-font-family);
|
164
164
|
margin: 0;
|
165
|
-
padding-
|
165
|
+
padding-inline-start: 16px;
|
166
166
|
position: relative;
|
167
167
|
list-style: none;
|
168
168
|
}
|
169
|
-
.
|
169
|
+
._OutlineList_w4lzv_1::before {
|
170
170
|
background: var(--puck-color-grey-08);
|
171
171
|
position: absolute;
|
172
172
|
left: -1px;
|
@@ -175,11 +175,15 @@
|
|
175
175
|
height: calc(100% - 9px);
|
176
176
|
content: "";
|
177
177
|
}
|
178
|
-
.
|
178
|
+
._OutlineList_w4lzv_1:dir(rtl)::before {
|
179
|
+
left: unset;
|
180
|
+
right: -1px;
|
181
|
+
}
|
182
|
+
._OutlineListItem_w4lzv_25 {
|
179
183
|
position: relative;
|
180
184
|
margin-bottom: 4px;
|
181
185
|
}
|
182
|
-
.
|
186
|
+
._OutlineListItem_w4lzv_25::before {
|
183
187
|
background: var(--puck-color-grey-08);
|
184
188
|
position: absolute;
|
185
189
|
left: -17px;
|
@@ -188,24 +192,28 @@
|
|
188
192
|
height: 1px;
|
189
193
|
content: "";
|
190
194
|
}
|
191
|
-
.
|
195
|
+
._OutlineListItem_w4lzv_25:dir(rtl)::before {
|
196
|
+
left: unset;
|
197
|
+
right: -17px;
|
198
|
+
}
|
199
|
+
._OutlineListItem--clickable_w4lzv_45 {
|
192
200
|
cursor: pointer;
|
193
201
|
transition: color 50ms ease-in;
|
194
202
|
}
|
195
|
-
._OutlineListItem--
|
203
|
+
._OutlineListItem--clickable_w4lzv_45:focus-visible {
|
196
204
|
outline: 2px solid var(--puck-color-azure-05);
|
197
205
|
outline-offset: 2px;
|
198
206
|
}
|
199
207
|
@media (hover: hover) and (pointer: fine) {
|
200
|
-
._OutlineListItem--
|
208
|
+
._OutlineListItem--clickable_w4lzv_45:hover {
|
201
209
|
color: var(--puck-color-azure-04);
|
202
210
|
transition: none;
|
203
211
|
}
|
204
212
|
}
|
205
|
-
._OutlineListItem--
|
213
|
+
._OutlineListItem--clickable_w4lzv_45:active {
|
206
214
|
color: var(--puck-color-azure-03);
|
207
215
|
transition: none;
|
208
216
|
}
|
209
|
-
.
|
217
|
+
._OutlineListItem_w4lzv_25 > ._OutlineList_w4lzv_1 {
|
210
218
|
margin: 8px 0;
|
211
219
|
}
|
package/dist/index.d.mts
CHANGED
@@ -114,7 +114,7 @@ type Field<Props extends any = any> = TextField | NumberField | TextareaField |
|
|
114
114
|
} ? Props : any> | ExternalFieldWithAdaptor<Props extends {
|
115
115
|
[key: string]: any;
|
116
116
|
} ? Props : any> | CustomField<Props>;
|
117
|
-
type FieldProps<
|
117
|
+
type FieldProps<F = Field<any>, ValueType = any> = {
|
118
118
|
field: F;
|
119
119
|
value: ValueType;
|
120
120
|
id?: string;
|
@@ -209,7 +209,7 @@ type Overrides = OverridesGeneric<{
|
|
209
209
|
type FieldRenderFunctions = Omit<{
|
210
210
|
[Type in Field["type"]]: React.FunctionComponent<FieldProps<Extract<Field, {
|
211
211
|
type: Type;
|
212
|
-
}
|
212
|
+
}>, any> & {
|
213
213
|
children: ReactNode;
|
214
214
|
name: string;
|
215
215
|
}>;
|
package/dist/index.d.ts
CHANGED
@@ -114,7 +114,7 @@ type Field<Props extends any = any> = TextField | NumberField | TextareaField |
|
|
114
114
|
} ? Props : any> | ExternalFieldWithAdaptor<Props extends {
|
115
115
|
[key: string]: any;
|
116
116
|
} ? Props : any> | CustomField<Props>;
|
117
|
-
type FieldProps<
|
117
|
+
type FieldProps<F = Field<any>, ValueType = any> = {
|
118
118
|
field: F;
|
119
119
|
value: ValueType;
|
120
120
|
id?: string;
|
@@ -209,7 +209,7 @@ type Overrides = OverridesGeneric<{
|
|
209
209
|
type FieldRenderFunctions = Omit<{
|
210
210
|
[Type in Field["type"]]: React.FunctionComponent<FieldProps<Extract<Field, {
|
211
211
|
type: Type;
|
212
|
-
}
|
212
|
+
}>, any> & {
|
213
213
|
children: ReactNode;
|
214
214
|
name: string;
|
215
215
|
}>;
|
package/dist/index.js
CHANGED
@@ -157,7 +157,7 @@ init_react_import();
|
|
157
157
|
|
158
158
|
// css-module:/home/runner/work/puck/puck/packages/core/components/SidebarSection/styles.module.css#css-module
|
159
159
|
init_react_import();
|
160
|
-
var styles_module_default = { "SidebarSection": "
|
160
|
+
var styles_module_default = { "SidebarSection": "_SidebarSection_8boj8_1", "SidebarSection-title": "_SidebarSection-title_8boj8_12", "SidebarSection--noBorderTop": "_SidebarSection--noBorderTop_8boj8_20", "SidebarSection-content": "_SidebarSection-content_8boj8_24", "SidebarSection--noPadding": "_SidebarSection--noPadding_8boj8_28", "SidebarSection-breadcrumbLabel": "_SidebarSection-breadcrumbLabel_8boj8_41", "SidebarSection-breadcrumbs": "_SidebarSection-breadcrumbs_8boj8_70", "SidebarSection-breadcrumb": "_SidebarSection-breadcrumb_8boj8_41", "SidebarSection-heading": "_SidebarSection-heading_8boj8_82", "SidebarSection-loadingOverlay": "_SidebarSection-loadingOverlay_8boj8_86" };
|
161
161
|
|
162
162
|
// ../core/lib/get-class-name-factory.ts
|
163
163
|
init_react_import();
|
@@ -421,6 +421,7 @@ function useAppContext() {
|
|
421
421
|
|
422
422
|
// ../../node_modules/zustand/esm/vanilla.mjs
|
423
423
|
init_react_import();
|
424
|
+
var import_meta = {};
|
424
425
|
var createStoreImpl = (createState) => {
|
425
426
|
let state;
|
426
427
|
const listeners = /* @__PURE__ */ new Set();
|
@@ -438,7 +439,15 @@ var createStoreImpl = (createState) => {
|
|
438
439
|
listeners.add(listener);
|
439
440
|
return () => listeners.delete(listener);
|
440
441
|
};
|
441
|
-
const
|
442
|
+
const destroy = () => {
|
443
|
+
if ((import_meta.env ? import_meta.env.MODE : void 0) !== "production") {
|
444
|
+
console.warn(
|
445
|
+
"[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."
|
446
|
+
);
|
447
|
+
}
|
448
|
+
listeners.clear();
|
449
|
+
};
|
450
|
+
const api = { setState, getState, getInitialState, subscribe, destroy };
|
442
451
|
const initialState = state = createState(setState, getState, api);
|
443
452
|
return api;
|
444
453
|
};
|
@@ -625,7 +634,7 @@ init_react_import();
|
|
625
634
|
|
626
635
|
// css-module:/home/runner/work/puck/puck/packages/core/components/OutlineList/styles.module.css#css-module
|
627
636
|
init_react_import();
|
628
|
-
var styles_module_default4 = { "OutlineList": "
|
637
|
+
var styles_module_default4 = { "OutlineList": "_OutlineList_w4lzv_1", "OutlineListItem": "_OutlineListItem_w4lzv_25", "OutlineListItem--clickable": "_OutlineListItem--clickable_w4lzv_45" };
|
629
638
|
|
630
639
|
// ../core/components/OutlineList/index.tsx
|
631
640
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
@@ -681,6 +690,9 @@ var getOutline = ({ frame } = {}) => {
|
|
681
690
|
const headings = (frame == null ? void 0 : frame.querySelectorAll("h1,h2,h3,h4,h5,h6")) || [];
|
682
691
|
const _outline = [];
|
683
692
|
headings.forEach((item, i) => {
|
693
|
+
if (item.closest("[data-dnd-dragging]")) {
|
694
|
+
return;
|
695
|
+
}
|
684
696
|
_outline.push({
|
685
697
|
rank: parseInt(item.tagName.split("H")[1]),
|
686
698
|
text: item.textContent,
|
package/dist/index.mjs
CHANGED
@@ -145,7 +145,7 @@ init_react_import();
|
|
145
145
|
|
146
146
|
// css-module:/home/runner/work/puck/puck/packages/core/components/SidebarSection/styles.module.css#css-module
|
147
147
|
init_react_import();
|
148
|
-
var styles_module_default = { "SidebarSection": "
|
148
|
+
var styles_module_default = { "SidebarSection": "_SidebarSection_8boj8_1", "SidebarSection-title": "_SidebarSection-title_8boj8_12", "SidebarSection--noBorderTop": "_SidebarSection--noBorderTop_8boj8_20", "SidebarSection-content": "_SidebarSection-content_8boj8_24", "SidebarSection--noPadding": "_SidebarSection--noPadding_8boj8_28", "SidebarSection-breadcrumbLabel": "_SidebarSection-breadcrumbLabel_8boj8_41", "SidebarSection-breadcrumbs": "_SidebarSection-breadcrumbs_8boj8_70", "SidebarSection-breadcrumb": "_SidebarSection-breadcrumb_8boj8_41", "SidebarSection-heading": "_SidebarSection-heading_8boj8_82", "SidebarSection-loadingOverlay": "_SidebarSection-loadingOverlay_8boj8_86" };
|
149
149
|
|
150
150
|
// ../core/lib/get-class-name-factory.ts
|
151
151
|
init_react_import();
|
@@ -419,6 +419,7 @@ function useAppContext() {
|
|
419
419
|
|
420
420
|
// ../../node_modules/zustand/esm/vanilla.mjs
|
421
421
|
init_react_import();
|
422
|
+
var import_meta = {};
|
422
423
|
var createStoreImpl = (createState) => {
|
423
424
|
let state;
|
424
425
|
const listeners = /* @__PURE__ */ new Set();
|
@@ -436,7 +437,15 @@ var createStoreImpl = (createState) => {
|
|
436
437
|
listeners.add(listener);
|
437
438
|
return () => listeners.delete(listener);
|
438
439
|
};
|
439
|
-
const
|
440
|
+
const destroy = () => {
|
441
|
+
if ((import_meta.env ? import_meta.env.MODE : void 0) !== "production") {
|
442
|
+
console.warn(
|
443
|
+
"[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."
|
444
|
+
);
|
445
|
+
}
|
446
|
+
listeners.clear();
|
447
|
+
};
|
448
|
+
const api = { setState, getState, getInitialState, subscribe, destroy };
|
440
449
|
const initialState = state = createState(setState, getState, api);
|
441
450
|
return api;
|
442
451
|
};
|
@@ -623,7 +632,7 @@ init_react_import();
|
|
623
632
|
|
624
633
|
// css-module:/home/runner/work/puck/puck/packages/core/components/OutlineList/styles.module.css#css-module
|
625
634
|
init_react_import();
|
626
|
-
var styles_module_default4 = { "OutlineList": "
|
635
|
+
var styles_module_default4 = { "OutlineList": "_OutlineList_w4lzv_1", "OutlineListItem": "_OutlineListItem_w4lzv_25", "OutlineListItem--clickable": "_OutlineListItem--clickable_w4lzv_45" };
|
627
636
|
|
628
637
|
// ../core/components/OutlineList/index.tsx
|
629
638
|
import { jsx as jsx6 } from "react/jsx-runtime";
|
@@ -679,6 +688,9 @@ var getOutline = ({ frame } = {}) => {
|
|
679
688
|
const headings = (frame == null ? void 0 : frame.querySelectorAll("h1,h2,h3,h4,h5,h6")) || [];
|
680
689
|
const _outline = [];
|
681
690
|
headings.forEach((item, i) => {
|
691
|
+
if (item.closest("[data-dnd-dragging]")) {
|
692
|
+
return;
|
693
|
+
}
|
682
694
|
_outline.push({
|
683
695
|
rank: parseInt(item.tagName.split("H")[1]),
|
684
696
|
text: item.textContent,
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@measured/puck-plugin-heading-analyzer",
|
3
|
-
"version": "0.18.
|
3
|
+
"version": "0.18.3-canary.098fdd1",
|
4
4
|
"author": "Measured Corporation Ltd <hello@measured.co>",
|
5
5
|
"repository": "measuredco/puck",
|
6
6
|
"bugs": "https://github.com/measuredco/puck/issues",
|
@@ -25,7 +25,7 @@
|
|
25
25
|
"dist"
|
26
26
|
],
|
27
27
|
"devDependencies": {
|
28
|
-
"@measured/puck": "^0.18.
|
28
|
+
"@measured/puck": "^0.18.3-canary.098fdd1",
|
29
29
|
"@types/react": "^19.0.1",
|
30
30
|
"@types/react-dom": "^19.0.2",
|
31
31
|
"eslint": "^7.32.0",
|