@measured/puck-plugin-heading-analyzer 0.11.0-canary.c8c02fd → 0.11.0-canary.d22150a
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 +25 -11
- package/dist/index.js +120 -7
- package/package.json +2 -2
package/dist/index.css
CHANGED
@@ -1,52 +1,66 @@
|
|
1
1
|
/* css-module:/home/runner/work/puck/puck/packages/core/components/SidebarSection/styles.module.css/#css-module-data */
|
2
|
-
.
|
2
|
+
._SidebarSection_r7dv3_1 {
|
3
3
|
display: flex;
|
4
4
|
position: relative;
|
5
5
|
flex-direction: column;
|
6
6
|
color: black;
|
7
7
|
}
|
8
|
-
.
|
8
|
+
._SidebarSection_r7dv3_1:last-of-type {
|
9
9
|
flex-grow: 1;
|
10
10
|
}
|
11
|
-
._SidebarSection-
|
11
|
+
._SidebarSection-title_r7dv3_12 {
|
12
12
|
background: white;
|
13
13
|
padding: 16px;
|
14
14
|
border-bottom: 1px solid var(--puck-color-grey-8);
|
15
15
|
overflow-x: auto;
|
16
16
|
}
|
17
|
-
._SidebarSection-
|
17
|
+
._SidebarSection-content_r7dv3_19 {
|
18
18
|
border-bottom: 1px solid var(--puck-color-grey-8);
|
19
19
|
padding: 16px;
|
20
20
|
}
|
21
|
-
._SidebarSection--
|
21
|
+
._SidebarSection--noPadding_r7dv3_24 ._SidebarSection-content_r7dv3_19 {
|
22
22
|
padding: 0px;
|
23
23
|
}
|
24
|
-
.
|
24
|
+
._SidebarSection_r7dv3_1:last-of-type ._SidebarSection-content_r7dv3_19 {
|
25
25
|
border-bottom: none;
|
26
26
|
flex-grow: 1;
|
27
27
|
}
|
28
|
-
._SidebarSection-
|
28
|
+
._SidebarSection-breadcrumbLabel_r7dv3_33 {
|
29
29
|
color: var(--puck-color-azure-3);
|
30
30
|
flex-shrink: 0;
|
31
31
|
}
|
32
|
-
._SidebarSection-
|
32
|
+
._SidebarSection-breadcrumbLabel_r7dv3_33:hover {
|
33
33
|
color: var(--puck-color-azure-4);
|
34
34
|
cursor: pointer;
|
35
35
|
text-decoration: underline;
|
36
36
|
}
|
37
|
-
._SidebarSection-
|
37
|
+
._SidebarSection-breadcrumbs_r7dv3_44 {
|
38
38
|
align-items: center;
|
39
39
|
display: flex;
|
40
40
|
gap: 4px;
|
41
41
|
}
|
42
|
-
._SidebarSection-
|
42
|
+
._SidebarSection-breadcrumb_r7dv3_33 {
|
43
43
|
align-items: center;
|
44
44
|
display: flex;
|
45
45
|
gap: 4px;
|
46
46
|
}
|
47
|
-
._SidebarSection-
|
47
|
+
._SidebarSection-heading_r7dv3_56 {
|
48
48
|
padding-right: 16px;
|
49
49
|
}
|
50
|
+
._SidebarSection-loadingOverlay_r7dv3_60 {
|
51
|
+
background: white;
|
52
|
+
display: flex;
|
53
|
+
justify-content: center;
|
54
|
+
align-items: center;
|
55
|
+
height: 100%;
|
56
|
+
width: 100%;
|
57
|
+
top: 0;
|
58
|
+
position: absolute;
|
59
|
+
z-index: 1;
|
60
|
+
pointer-events: all;
|
61
|
+
box-sizing: border-box;
|
62
|
+
opacity: 0.8;
|
63
|
+
}
|
50
64
|
|
51
65
|
/* css-module:/home/runner/work/puck/puck/packages/core/components/Heading/styles.module.css/#css-module-data */
|
52
66
|
._Heading_1bvy5_1 {
|
package/dist/index.js
CHANGED
@@ -1084,7 +1084,7 @@ init_react_import();
|
|
1084
1084
|
|
1085
1085
|
// css-module:/home/runner/work/puck/puck/packages/core/components/SidebarSection/styles.module.css#css-module
|
1086
1086
|
init_react_import();
|
1087
|
-
var styles_module_default = { "SidebarSection": "
|
1087
|
+
var styles_module_default = { "SidebarSection": "_SidebarSection_r7dv3_1", "SidebarSection-title": "_SidebarSection-title_r7dv3_12", "SidebarSection-content": "_SidebarSection-content_r7dv3_19", "SidebarSection--noPadding": "_SidebarSection--noPadding_r7dv3_24", "SidebarSection-breadcrumbLabel": "_SidebarSection-breadcrumbLabel_r7dv3_33", "SidebarSection-breadcrumbs": "_SidebarSection-breadcrumbs_r7dv3_44", "SidebarSection-breadcrumb": "_SidebarSection-breadcrumb_r7dv3_33", "SidebarSection-heading": "_SidebarSection-heading_r7dv3_56", "SidebarSection-loadingOverlay": "_SidebarSection-loadingOverlay_r7dv3_60" };
|
1088
1088
|
|
1089
1089
|
// ../core/lib/get-class-name-factory.ts
|
1090
1090
|
init_react_import();
|
@@ -1242,11 +1242,13 @@ var setupZone = (data, zoneKey) => {
|
|
1242
1242
|
};
|
1243
1243
|
|
1244
1244
|
// ../core/lib/get-item.ts
|
1245
|
-
var getItem = (selector, data) => {
|
1245
|
+
var getItem = (selector, data, dynamicProps = {}) => {
|
1246
1246
|
if (!selector.zone || selector.zone === rootDroppableId) {
|
1247
|
-
|
1247
|
+
const item2 = data.content[selector.index];
|
1248
|
+
return __spreadProps(__spreadValues({}, item2), { props: dynamicProps[item2.props.id] || item2.props });
|
1248
1249
|
}
|
1249
|
-
|
1250
|
+
const item = setupZone(data, selector.zone).zones[selector.zone][selector.index];
|
1251
|
+
return __spreadProps(__spreadValues({}, item), { props: dynamicProps[item.props.id] || item.props });
|
1250
1252
|
};
|
1251
1253
|
|
1252
1254
|
// ../core/lib/get-zone-id.ts
|
@@ -1280,7 +1282,8 @@ var defaultAppState = {
|
|
1280
1282
|
var appContext = (0, import_react4.createContext)({
|
1281
1283
|
state: defaultAppState,
|
1282
1284
|
dispatch: () => null,
|
1283
|
-
config: { components: {} }
|
1285
|
+
config: { components: {} },
|
1286
|
+
componentState: {}
|
1284
1287
|
});
|
1285
1288
|
var AppProvider = appContext.Provider;
|
1286
1289
|
var useAppContext = () => {
|
@@ -1363,6 +1366,115 @@ var useBreadcrumbs = (renderCount) => {
|
|
1363
1366
|
}, [selectedItem, dzContext == null ? void 0 : dzContext.pathData, renderCount]);
|
1364
1367
|
};
|
1365
1368
|
|
1369
|
+
// ../../node_modules/react-spinners/esm/index.js
|
1370
|
+
init_react_import();
|
1371
|
+
|
1372
|
+
// ../../node_modules/react-spinners/esm/helpers/unitConverter.js
|
1373
|
+
init_react_import();
|
1374
|
+
var cssUnit = {
|
1375
|
+
cm: true,
|
1376
|
+
mm: true,
|
1377
|
+
in: true,
|
1378
|
+
px: true,
|
1379
|
+
pt: true,
|
1380
|
+
pc: true,
|
1381
|
+
em: true,
|
1382
|
+
ex: true,
|
1383
|
+
ch: true,
|
1384
|
+
rem: true,
|
1385
|
+
vw: true,
|
1386
|
+
vh: true,
|
1387
|
+
vmin: true,
|
1388
|
+
vmax: true,
|
1389
|
+
"%": true
|
1390
|
+
};
|
1391
|
+
function parseLengthAndUnit(size) {
|
1392
|
+
if (typeof size === "number") {
|
1393
|
+
return {
|
1394
|
+
value: size,
|
1395
|
+
unit: "px"
|
1396
|
+
};
|
1397
|
+
}
|
1398
|
+
var value;
|
1399
|
+
var valueString = (size.match(/^[0-9.]*/) || "").toString();
|
1400
|
+
if (valueString.includes(".")) {
|
1401
|
+
value = parseFloat(valueString);
|
1402
|
+
} else {
|
1403
|
+
value = parseInt(valueString, 10);
|
1404
|
+
}
|
1405
|
+
var unit = (size.match(/[^0-9]*$/) || "").toString();
|
1406
|
+
if (cssUnit[unit]) {
|
1407
|
+
return {
|
1408
|
+
value,
|
1409
|
+
unit
|
1410
|
+
};
|
1411
|
+
}
|
1412
|
+
console.warn("React Spinners: ".concat(size, " is not a valid css value. Defaulting to ").concat(value, "px."));
|
1413
|
+
return {
|
1414
|
+
value,
|
1415
|
+
unit: "px"
|
1416
|
+
};
|
1417
|
+
}
|
1418
|
+
function cssValue(value) {
|
1419
|
+
var lengthWithunit = parseLengthAndUnit(value);
|
1420
|
+
return "".concat(lengthWithunit.value).concat(lengthWithunit.unit);
|
1421
|
+
}
|
1422
|
+
|
1423
|
+
// ../../node_modules/react-spinners/esm/helpers/animation.js
|
1424
|
+
init_react_import();
|
1425
|
+
var createAnimation = function(loaderName, frames, suffix) {
|
1426
|
+
var animationName = "react-spinners-".concat(loaderName, "-").concat(suffix);
|
1427
|
+
if (typeof window == "undefined" || !window.document) {
|
1428
|
+
return animationName;
|
1429
|
+
}
|
1430
|
+
var styleEl = document.createElement("style");
|
1431
|
+
document.head.appendChild(styleEl);
|
1432
|
+
var styleSheet = styleEl.sheet;
|
1433
|
+
var keyFrames = "\n @keyframes ".concat(animationName, " {\n ").concat(frames, "\n }\n ");
|
1434
|
+
if (styleSheet) {
|
1435
|
+
styleSheet.insertRule(keyFrames, 0);
|
1436
|
+
}
|
1437
|
+
return animationName;
|
1438
|
+
};
|
1439
|
+
|
1440
|
+
// ../../node_modules/react-spinners/esm/ClipLoader.js
|
1441
|
+
init_react_import();
|
1442
|
+
var React3 = __toESM(require("react"));
|
1443
|
+
var __assign = function() {
|
1444
|
+
__assign = Object.assign || function(t) {
|
1445
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
1446
|
+
s = arguments[i];
|
1447
|
+
for (var p in s)
|
1448
|
+
if (Object.prototype.hasOwnProperty.call(s, p))
|
1449
|
+
t[p] = s[p];
|
1450
|
+
}
|
1451
|
+
return t;
|
1452
|
+
};
|
1453
|
+
return __assign.apply(this, arguments);
|
1454
|
+
};
|
1455
|
+
var __rest = function(s, e) {
|
1456
|
+
var t = {};
|
1457
|
+
for (var p in s)
|
1458
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
1459
|
+
t[p] = s[p];
|
1460
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
1461
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
1462
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
1463
|
+
t[p[i]] = s[p[i]];
|
1464
|
+
}
|
1465
|
+
return t;
|
1466
|
+
};
|
1467
|
+
var clip = createAnimation("ClipLoader", "0% {transform: rotate(0deg) scale(1)} 50% {transform: rotate(180deg) scale(0.8)} 100% {transform: rotate(360deg) scale(1)}", "clip");
|
1468
|
+
function ClipLoader(_a) {
|
1469
|
+
var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? "#000000" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 35 : _f, additionalprops = __rest(_a, ["loading", "color", "speedMultiplier", "cssOverride", "size"]);
|
1470
|
+
var style = __assign({ background: "transparent !important", width: cssValue(size), height: cssValue(size), borderRadius: "100%", border: "2px solid", borderTopColor: color, borderBottomColor: "transparent", borderLeftColor: color, borderRightColor: color, display: "inline-block", animation: "".concat(clip, " ").concat(0.75 / speedMultiplier, "s 0s infinite linear"), animationFillMode: "both" }, cssOverride);
|
1471
|
+
if (!loading) {
|
1472
|
+
return null;
|
1473
|
+
}
|
1474
|
+
return React3.createElement("span", __assign({ style }, additionalprops));
|
1475
|
+
}
|
1476
|
+
var ClipLoader_default = ClipLoader;
|
1477
|
+
|
1366
1478
|
// ../core/components/SidebarSection/index.tsx
|
1367
1479
|
var getClassName2 = get_class_name_factory_default("SidebarSection", styles_module_default);
|
1368
1480
|
var SidebarSection = ({
|
@@ -1370,7 +1482,8 @@ var SidebarSection = ({
|
|
1370
1482
|
title,
|
1371
1483
|
background,
|
1372
1484
|
showBreadcrumbs,
|
1373
|
-
noPadding
|
1485
|
+
noPadding,
|
1486
|
+
isLoading
|
1374
1487
|
}) => {
|
1375
1488
|
const { setUi } = useAppContext();
|
1376
1489
|
const breadcrumbs = useBreadcrumbs(1);
|
@@ -1381,7 +1494,7 @@ var SidebarSection = ({
|
|
1381
1494
|
onClick: () => setUi({ itemSelector: breadcrumb.selector })
|
1382
1495
|
},
|
1383
1496
|
breadcrumb.label
|
1384
|
-
), /* @__PURE__ */ import_react.default.createElement(chevron_right_default, { size: 16 }))) : null, /* @__PURE__ */ import_react.default.createElement("div", { className: getClassName2("heading") }, /* @__PURE__ */ import_react.default.createElement(Heading, { rank: 2, size: "xs" }, title)))), /* @__PURE__ */ import_react.default.createElement("div", { className: getClassName2("content") }, children));
|
1497
|
+
), /* @__PURE__ */ import_react.default.createElement(chevron_right_default, { size: 16 }))) : null, /* @__PURE__ */ import_react.default.createElement("div", { className: getClassName2("heading") }, /* @__PURE__ */ import_react.default.createElement(Heading, { rank: 2, size: "xs" }, title)))), /* @__PURE__ */ import_react.default.createElement("div", { className: getClassName2("content") }, children), isLoading && /* @__PURE__ */ import_react.default.createElement("div", { className: getClassName2("loadingOverlay") }, /* @__PURE__ */ import_react.default.createElement(ClipLoader_default, null)));
|
1385
1498
|
};
|
1386
1499
|
|
1387
1500
|
// ../core/components/OutlineList/index.tsx
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@measured/puck-plugin-heading-analyzer",
|
3
|
-
"version": "0.11.0-canary.
|
3
|
+
"version": "0.11.0-canary.d22150a",
|
4
4
|
"private": false,
|
5
5
|
"main": "./dist/index.js",
|
6
6
|
"types": "./dist/index.d.ts",
|
@@ -14,7 +14,7 @@
|
|
14
14
|
"dist"
|
15
15
|
],
|
16
16
|
"devDependencies": {
|
17
|
-
"@measured/puck": "^0.11.0-canary.
|
17
|
+
"@measured/puck": "^0.11.0-canary.d22150a",
|
18
18
|
"@types/react": "^18.2.0",
|
19
19
|
"@types/react-dom": "^18.2.0",
|
20
20
|
"eslint": "^7.32.0",
|