@measured/puck-plugin-heading-analyzer 0.11.0-canary.4613df4 → 0.11.0-canary.5881e1b

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.css CHANGED
@@ -1,89 +1,102 @@
1
1
  /* css-module:/home/runner/work/puck/puck/packages/core/components/SidebarSection/styles.module.css/#css-module-data */
2
- ._SidebarSection_f1p35_1 {
2
+ ._SidebarSection_r7dv3_1 {
3
3
  display: flex;
4
4
  position: relative;
5
5
  flex-direction: column;
6
6
  color: black;
7
7
  }
8
- ._SidebarSection_f1p35_1:last-of-type {
8
+ ._SidebarSection_r7dv3_1:last-of-type {
9
9
  flex-grow: 1;
10
10
  }
11
- ._SidebarSection-title_f1p35_12 {
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-content_f1p35_19 {
17
+ ._SidebarSection-content_r7dv3_19 {
18
18
  border-bottom: 1px solid var(--puck-color-grey-8);
19
19
  padding: 16px;
20
20
  }
21
- ._SidebarSection--noPadding_f1p35_24 ._SidebarSection-content_f1p35_19 {
21
+ ._SidebarSection--noPadding_r7dv3_24 ._SidebarSection-content_r7dv3_19 {
22
22
  padding: 0px;
23
23
  }
24
- ._SidebarSection_f1p35_1:last-of-type ._SidebarSection-content_f1p35_19 {
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-breadcrumbLabel_f1p35_33 {
28
+ ._SidebarSection-breadcrumbLabel_r7dv3_33 {
29
29
  color: var(--puck-color-azure-3);
30
30
  flex-shrink: 0;
31
31
  }
32
- ._SidebarSection-breadcrumbLabel_f1p35_33:hover {
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-breadcrumbs_f1p35_44 {
37
+ ._SidebarSection-breadcrumbs_r7dv3_44 {
38
38
  align-items: center;
39
39
  display: flex;
40
40
  gap: 4px;
41
41
  }
42
- ._SidebarSection-breadcrumb_f1p35_33 {
42
+ ._SidebarSection-breadcrumb_r7dv3_33 {
43
43
  align-items: center;
44
44
  display: flex;
45
45
  gap: 4px;
46
46
  }
47
- ._SidebarSection-heading_f1p35_56 {
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
- ._Heading_7sjz7_1 {
66
+ ._Heading_1bvy5_1 {
53
67
  display: block;
54
68
  color: var(--puck-color-black);
55
69
  font-family: var(--puck-font-stack);
56
70
  font-weight: 700;
57
71
  margin: 0;
58
- word-break: break-word;
59
72
  }
60
- ._Heading_7sjz7_1 b {
73
+ ._Heading_1bvy5_1 b {
61
74
  font-weight: 700;
62
75
  }
63
- ._Heading--xxxxl_7sjz7_14 {
76
+ ._Heading--xxxxl_1bvy5_13 {
64
77
  font-size: var(--puck-font-size-xxxxl);
65
78
  letter-spacing: 0.08ch;
66
79
  font-weight: 800;
67
80
  }
68
- ._Heading--xxxl_7sjz7_20 {
81
+ ._Heading--xxxl_1bvy5_19 {
69
82
  font-size: var(--puck-font-size-xxxl);
70
83
  }
71
- ._Heading--xxl_7sjz7_24 {
84
+ ._Heading--xxl_1bvy5_23 {
72
85
  font-size: var(--puck-font-size-xxl);
73
86
  }
74
- ._Heading--xl_7sjz7_28 {
87
+ ._Heading--xl_1bvy5_27 {
75
88
  font-size: var(--puck-font-size-xl);
76
89
  }
77
- ._Heading--l_7sjz7_32 {
90
+ ._Heading--l_1bvy5_31 {
78
91
  font-size: var(--puck-font-size-l);
79
92
  }
80
- ._Heading--m_7sjz7_36 {
93
+ ._Heading--m_1bvy5_35 {
81
94
  font-size: var(--puck-font-size-m);
82
95
  }
83
- ._Heading--s_7sjz7_40 {
96
+ ._Heading--s_1bvy5_39 {
84
97
  font-size: var(--puck-font-size-s);
85
98
  }
86
- ._Heading--xs_7sjz7_44 {
99
+ ._Heading--xs_1bvy5_43 {
87
100
  font-size: var(--puck-font-size-xs);
88
101
  }
89
102
 
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": "_SidebarSection_f1p35_1", "SidebarSection-title": "_SidebarSection-title_f1p35_12", "SidebarSection-content": "_SidebarSection-content_f1p35_19", "SidebarSection--noPadding": "_SidebarSection--noPadding_f1p35_24", "SidebarSection-breadcrumbLabel": "_SidebarSection-breadcrumbLabel_f1p35_33", "SidebarSection-breadcrumbs": "_SidebarSection-breadcrumbs_f1p35_44", "SidebarSection-breadcrumb": "_SidebarSection-breadcrumb_f1p35_33", "SidebarSection-heading": "_SidebarSection-heading_f1p35_56" };
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();
@@ -1119,7 +1119,7 @@ init_react_import();
1119
1119
 
1120
1120
  // css-module:/home/runner/work/puck/puck/packages/core/components/Heading/styles.module.css#css-module
1121
1121
  init_react_import();
1122
- var styles_module_default2 = { "Heading": "_Heading_7sjz7_1", "Heading--xxxxl": "_Heading--xxxxl_7sjz7_14", "Heading--xxxl": "_Heading--xxxl_7sjz7_20", "Heading--xxl": "_Heading--xxl_7sjz7_24", "Heading--xl": "_Heading--xl_7sjz7_28", "Heading--l": "_Heading--l_7sjz7_32", "Heading--m": "_Heading--m_7sjz7_36", "Heading--s": "_Heading--s_7sjz7_40", "Heading--xs": "_Heading--xs_7sjz7_44" };
1122
+ var styles_module_default2 = { "Heading": "_Heading_1bvy5_1", "Heading--xxxxl": "_Heading--xxxxl_1bvy5_13", "Heading--xxxl": "_Heading--xxxl_1bvy5_19", "Heading--xxl": "_Heading--xxl_1bvy5_23", "Heading--xl": "_Heading--xl_1bvy5_27", "Heading--l": "_Heading--l_1bvy5_31", "Heading--m": "_Heading--m_1bvy5_35", "Heading--s": "_Heading--s_1bvy5_39", "Heading--xs": "_Heading--xs_1bvy5_43" };
1123
1123
 
1124
1124
  // ../core/components/Heading/index.tsx
1125
1125
  var import_jsx_runtime = require("react/jsx-runtime");
@@ -1282,7 +1282,8 @@ var defaultAppState = {
1282
1282
  var appContext = (0, import_react4.createContext)({
1283
1283
  state: defaultAppState,
1284
1284
  dispatch: () => null,
1285
- config: { components: {} }
1285
+ config: { components: {} },
1286
+ componentState: {}
1286
1287
  });
1287
1288
  var AppProvider = appContext.Provider;
1288
1289
  var useAppContext = () => {
@@ -1365,6 +1366,115 @@ var useBreadcrumbs = (renderCount) => {
1365
1366
  }, [selectedItem, dzContext == null ? void 0 : dzContext.pathData, renderCount]);
1366
1367
  };
1367
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
+
1368
1478
  // ../core/components/SidebarSection/index.tsx
1369
1479
  var getClassName2 = get_class_name_factory_default("SidebarSection", styles_module_default);
1370
1480
  var SidebarSection = ({
@@ -1372,7 +1482,8 @@ var SidebarSection = ({
1372
1482
  title,
1373
1483
  background,
1374
1484
  showBreadcrumbs,
1375
- noPadding
1485
+ noPadding,
1486
+ isLoading
1376
1487
  }) => {
1377
1488
  const { setUi } = useAppContext();
1378
1489
  const breadcrumbs = useBreadcrumbs(1);
@@ -1383,7 +1494,7 @@ var SidebarSection = ({
1383
1494
  onClick: () => setUi({ itemSelector: breadcrumb.selector })
1384
1495
  },
1385
1496
  breadcrumb.label
1386
- ), /* @__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)));
1387
1498
  };
1388
1499
 
1389
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.4613df4",
3
+ "version": "0.11.0-canary.5881e1b",
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.4613df4",
17
+ "@measured/puck": "^0.11.0-canary.5881e1b",
18
18
  "@types/react": "^18.2.0",
19
19
  "@types/react-dom": "^18.2.0",
20
20
  "eslint": "^7.32.0",