@measured/puck-plugin-heading-analyzer 0.15.1-canary.9151255 → 0.15.1-canary.fb9aa4e
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.css +14 -0
- package/dist/index.js +43 -17
- package/package.json +2 -2
package/dist/index.css
CHANGED
@@ -1,3 +1,17 @@
|
|
1
|
+
/* css-module:/home/runner/work/puck/puck/packages/plugin-heading-analyzer/src/HeadingAnalyzer.module.css/#css-module-data */
|
2
|
+
._HeadingAnalyzer_116v6_1 {
|
3
|
+
display: block;
|
4
|
+
}
|
5
|
+
._HeadingAnalyzer-cssWarning_116v6_5 {
|
6
|
+
display: none !important;
|
7
|
+
}
|
8
|
+
._HeadingAnalyzerItem_116v6_9 {
|
9
|
+
display: inline;
|
10
|
+
}
|
11
|
+
._HeadingAnalyzerItem--missing_116v6_13 {
|
12
|
+
color: var(--puck-color-red-04);
|
13
|
+
}
|
14
|
+
|
1
15
|
/* css-module:/home/runner/work/puck/puck/packages/core/components/SidebarSection/styles.module.css/#css-module-data */
|
2
16
|
._SidebarSection_125qe_1 {
|
3
17
|
display: flex;
|
package/dist/index.js
CHANGED
@@ -42996,7 +42996,7 @@ var require_factoryWithTypeCheckers = __commonJS({
|
|
42996
42996
|
function validate2(props, propName, componentName, location, propFullName) {
|
42997
42997
|
if (!(props[propName] instanceof expectedClass)) {
|
42998
42998
|
var expectedClassName = expectedClass.name || ANONYMOUS;
|
42999
|
-
var actualClassName =
|
42999
|
+
var actualClassName = getClassName6(props[propName]);
|
43000
43000
|
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + actualClassName + "` supplied to `" + componentName + "`, expected ") + ("instance of `" + expectedClassName + "`."));
|
43001
43001
|
}
|
43002
43002
|
return null;
|
@@ -43248,7 +43248,7 @@ var require_factoryWithTypeCheckers = __commonJS({
|
|
43248
43248
|
return type;
|
43249
43249
|
}
|
43250
43250
|
}
|
43251
|
-
function
|
43251
|
+
function getClassName6(propValue) {
|
43252
43252
|
if (!propValue.constructor || !propValue.constructor.name) {
|
43253
43253
|
return ANONYMOUS;
|
43254
43254
|
}
|
@@ -73739,7 +73739,7 @@ var require_dist = __commonJS({
|
|
73739
73739
|
};
|
73740
73740
|
var get_class_name_factory_default2 = getClassNameFactory2;
|
73741
73741
|
init_react_import2();
|
73742
|
-
var styles_module_default5 = { "Input": "
|
73742
|
+
var styles_module_default5 = { "Input": "_Input_3pq3z_1", "Input-label": "_Input-label_3pq3z_26", "Input-labelIcon": "_Input-labelIcon_3pq3z_35", "Input-disabledIcon": "_Input-disabledIcon_3pq3z_42", "Input-input": "_Input-input_3pq3z_47", "Input--readOnly": "_Input--readOnly_3pq3z_91", "Input-radioGroupItems": "_Input-radioGroupItems_3pq3z_102", "Input-radio": "_Input-radio_3pq3z_102", "Input-radioInner": "_Input-radioInner_3pq3z_119", "Input-radioInput": "_Input-radioInput_3pq3z_164" };
|
73743
73743
|
var import_react112 = require("react");
|
73744
73744
|
init_react_import2();
|
73745
73745
|
init_react_import2();
|
@@ -73976,7 +73976,7 @@ var require_dist = __commonJS({
|
|
73976
73976
|
init_react_import2();
|
73977
73977
|
var styles_module_default32 = { "Loader": "_Loader_nacdm_13", "loader-animation": "_loader-animation_nacdm_1" };
|
73978
73978
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
73979
|
-
var
|
73979
|
+
var getClassName6 = get_class_name_factory_default2("Loader", styles_module_default32);
|
73980
73980
|
var Loader2 = (_a3) => {
|
73981
73981
|
var _b = _a3, {
|
73982
73982
|
color,
|
@@ -73988,7 +73988,7 @@ var require_dist = __commonJS({
|
|
73988
73988
|
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
73989
73989
|
"span",
|
73990
73990
|
__spreadValues2({
|
73991
|
-
className:
|
73991
|
+
className: getClassName6(),
|
73992
73992
|
style: {
|
73993
73993
|
width: size,
|
73994
73994
|
height: size,
|
@@ -74284,7 +74284,7 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
|
|
74284
74284
|
};
|
74285
74285
|
var import_jsx_runtime82 = require("react/jsx-runtime");
|
74286
74286
|
var getClassName42 = get_class_name_factory_default2("ArrayField", styles_module_default22);
|
74287
|
-
var
|
74287
|
+
var getClassNameItem3 = get_class_name_factory_default2("ArrayFieldItem", styles_module_default22);
|
74288
74288
|
var ArrayField = ({
|
74289
74289
|
field,
|
74290
74290
|
onChange,
|
@@ -74417,7 +74417,7 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
|
|
74417
74417
|
{
|
74418
74418
|
id: _arrayId,
|
74419
74419
|
index: i2,
|
74420
|
-
className: (_, snapshot2) =>
|
74420
|
+
className: (_, snapshot2) => getClassNameItem3({
|
74421
74421
|
isExpanded: arrayState.openId === _arrayId,
|
74422
74422
|
isDragging: snapshot2 == null ? void 0 : snapshot2.isDragging,
|
74423
74423
|
readOnly
|
@@ -74442,11 +74442,11 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
|
|
74442
74442
|
);
|
74443
74443
|
}
|
74444
74444
|
},
|
74445
|
-
className:
|
74445
|
+
className: getClassNameItem3("summary"),
|
74446
74446
|
children: [
|
74447
74447
|
field.getItemSummary ? field.getItemSummary(data, i2) : `Item #${_originalIndex}`,
|
74448
|
-
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className:
|
74449
|
-
!readOnly && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className:
|
74448
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: getClassNameItem3("rhs"), children: [
|
74449
|
+
!readOnly && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: getClassNameItem3("actions"), children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: getClassNameItem3("action"), children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
74450
74450
|
IconButton,
|
74451
74451
|
{
|
74452
74452
|
type: "button",
|
@@ -74477,7 +74477,7 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
|
|
74477
74477
|
]
|
74478
74478
|
}
|
74479
74479
|
),
|
74480
|
-
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className:
|
74480
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: getClassNameItem3("body"), children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("fieldset", { className: getClassNameItem3("fieldset"), children: Object.keys(field.arrayFields).map(
|
74481
74481
|
(fieldName) => {
|
74482
74482
|
const subField = field.arrayFields[fieldName];
|
74483
74483
|
const subFieldName = `${name}[${i2}].${fieldName}`;
|
@@ -74595,7 +74595,7 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
|
|
74595
74595
|
var styles_module_default6 = { "Modal": "_Modal_ikbaj_1", "Modal--isOpen": "_Modal--isOpen_ikbaj_15", "Modal-inner": "_Modal-inner_ikbaj_19" };
|
74596
74596
|
var import_react_dom3 = __toESM2(require_react_dom2());
|
74597
74597
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
74598
|
-
var
|
74598
|
+
var getClassName62 = get_class_name_factory_default2("Modal", styles_module_default6);
|
74599
74599
|
var Modal = ({
|
74600
74600
|
children,
|
74601
74601
|
onClose,
|
@@ -74609,10 +74609,10 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
|
|
74609
74609
|
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", {});
|
74610
74610
|
}
|
74611
74611
|
return (0, import_react_dom3.createPortal)(
|
74612
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className:
|
74612
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: getClassName62({ isOpen }), onClick: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
74613
74613
|
"div",
|
74614
74614
|
{
|
74615
|
-
className:
|
74615
|
+
className: getClassName62("inner"),
|
74616
74616
|
onClick: (e2) => e2.stopPropagation(),
|
74617
74617
|
children
|
74618
74618
|
}
|
@@ -78555,6 +78555,12 @@ init_react_import();
|
|
78555
78555
|
// src/HeadingAnalyzer.tsx
|
78556
78556
|
init_react_import();
|
78557
78557
|
var import_react12 = require("react");
|
78558
|
+
|
78559
|
+
// css-module:/home/runner/work/puck/puck/packages/plugin-heading-analyzer/src/HeadingAnalyzer.module.css#css-module
|
78560
|
+
init_react_import();
|
78561
|
+
var HeadingAnalyzer_module_default = { "HeadingAnalyzer": "_HeadingAnalyzer_116v6_1", "HeadingAnalyzer-cssWarning": "_HeadingAnalyzer-cssWarning_116v6_5", "HeadingAnalyzerItem": "_HeadingAnalyzerItem_116v6_9", "HeadingAnalyzerItem--missing": "_HeadingAnalyzerItem--missing_116v6_13" };
|
78562
|
+
|
78563
|
+
// src/HeadingAnalyzer.tsx
|
78558
78564
|
var import_puck = __toESM(require_dist());
|
78559
78565
|
|
78560
78566
|
// ../core/components/SidebarSection/index.tsx
|
@@ -79002,6 +79008,8 @@ var getFrame2 = () => {
|
|
79002
79008
|
// src/HeadingAnalyzer.tsx
|
79003
79009
|
var import_react_from_json = __toESM(require("react-from-json"));
|
79004
79010
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
79011
|
+
var getClassName5 = get_class_name_factory_default("HeadingAnalyzer", HeadingAnalyzer_module_default);
|
79012
|
+
var getClassNameItem2 = get_class_name_factory_default("HeadingAnalyzerItem", HeadingAnalyzer_module_default);
|
79005
79013
|
var dataAttr = "data-puck-heading-analyzer-id";
|
79006
79014
|
var getOutline = ({
|
79007
79015
|
addDataAttr = false,
|
@@ -79072,7 +79080,24 @@ var HeadingAnalyzer = () => {
|
|
79072
79080
|
setHierarchy(buildHierarchy(frame));
|
79073
79081
|
}
|
79074
79082
|
}, [appState.data]);
|
79075
|
-
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
79083
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: getClassName5(), children: [
|
79084
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
79085
|
+
"small",
|
79086
|
+
{
|
79087
|
+
className: getClassName5("cssWarning"),
|
79088
|
+
style: {
|
79089
|
+
color: "var(--puck-color-red-04)",
|
79090
|
+
display: "block",
|
79091
|
+
marginBottom: 16
|
79092
|
+
},
|
79093
|
+
children: [
|
79094
|
+
"Heading analyzer styles not loaded. Please review the",
|
79095
|
+
" ",
|
79096
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("a", { href: "https://github.com/measuredco/puck/blob/main/packages/plugin-heading-analyzer/README.md", children: "README" }),
|
79097
|
+
"."
|
79098
|
+
]
|
79099
|
+
}
|
79100
|
+
),
|
79076
79101
|
hierarchy.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { children: "No headings." }),
|
79077
79102
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(OutlineList, { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
79078
79103
|
import_react_from_json.default,
|
@@ -79083,6 +79108,7 @@ var HeadingAnalyzer = () => {
|
|
79083
79108
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(OutlineList.Clickable, { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
79084
79109
|
"small",
|
79085
79110
|
{
|
79111
|
+
className: getClassNameItem2({ missing: props.missing }),
|
79086
79112
|
onClick: typeof props.analyzeId == "undefined" ? void 0 : (e2) => {
|
79087
79113
|
e2.stopPropagation();
|
79088
79114
|
const frame = getFrame2();
|
@@ -79100,13 +79126,13 @@ var HeadingAnalyzer = () => {
|
|
79100
79126
|
}, 2e3);
|
79101
79127
|
}
|
79102
79128
|
},
|
79103
|
-
children: props.missing ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
79129
|
+
children: props.missing ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
|
79104
79130
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("b", { children: [
|
79105
79131
|
"H",
|
79106
79132
|
props.rank
|
79107
79133
|
] }),
|
79108
79134
|
": Missing"
|
79109
|
-
] }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
79135
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
|
79110
79136
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("b", { children: [
|
79111
79137
|
"H",
|
79112
79138
|
props.rank
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@measured/puck-plugin-heading-analyzer",
|
3
|
-
"version": "0.15.1-canary.
|
3
|
+
"version": "0.15.1-canary.fb9aa4e",
|
4
4
|
"author": "Measured Corporation Ltd <hello@measured.co>",
|
5
5
|
"repository": "measuredco/puck",
|
6
6
|
"bugs": "https://github.com/measuredco/puck/issues",
|
@@ -18,7 +18,7 @@
|
|
18
18
|
"dist"
|
19
19
|
],
|
20
20
|
"devDependencies": {
|
21
|
-
"@measured/puck": "^0.15.1-canary.
|
21
|
+
"@measured/puck": "^0.15.1-canary.fb9aa4e",
|
22
22
|
"@types/react": "^18.2.0",
|
23
23
|
"@types/react-dom": "^18.2.0",
|
24
24
|
"eslint": "^7.32.0",
|