@measured/puck-plugin-heading-analyzer 0.10.1-canary.cc20c52 → 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,52 +1,66 @@
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
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": "_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();
@@ -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
- return data.content[selector.index];
1247
+ const item2 = data.content[selector.index];
1248
+ return __spreadProps(__spreadValues({}, item2), { props: dynamicProps[item2.props.id] || item2.props });
1248
1249
  }
1249
- return setupZone(data, selector.zone).zones[selector.zone][selector.index];
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
@@ -1273,12 +1275,15 @@ var defaultAppState = {
1273
1275
  ui: {
1274
1276
  leftSideBarVisible: true,
1275
1277
  arrayState: {},
1276
- itemSelector: null
1278
+ itemSelector: null,
1279
+ componentList: {}
1277
1280
  }
1278
1281
  };
1279
1282
  var appContext = (0, import_react4.createContext)({
1280
1283
  state: defaultAppState,
1281
- dispatch: () => null
1284
+ dispatch: () => null,
1285
+ config: { components: {} },
1286
+ componentState: {}
1282
1287
  });
1283
1288
  var AppProvider = appContext.Provider;
1284
1289
  var useAppContext = () => {
@@ -1361,6 +1366,115 @@ var useBreadcrumbs = (renderCount) => {
1361
1366
  }, [selectedItem, dzContext == null ? void 0 : dzContext.pathData, renderCount]);
1362
1367
  };
1363
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
+
1364
1478
  // ../core/components/SidebarSection/index.tsx
1365
1479
  var getClassName2 = get_class_name_factory_default("SidebarSection", styles_module_default);
1366
1480
  var SidebarSection = ({
@@ -1368,7 +1482,8 @@ var SidebarSection = ({
1368
1482
  title,
1369
1483
  background,
1370
1484
  showBreadcrumbs,
1371
- noPadding
1485
+ noPadding,
1486
+ isLoading
1372
1487
  }) => {
1373
1488
  const { setUi } = useAppContext();
1374
1489
  const breadcrumbs = useBreadcrumbs(1);
@@ -1379,7 +1494,7 @@ var SidebarSection = ({
1379
1494
  onClick: () => setUi({ itemSelector: breadcrumb.selector })
1380
1495
  },
1381
1496
  breadcrumb.label
1382
- ), /* @__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)));
1383
1498
  };
1384
1499
 
1385
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.10.1-canary.cc20c52",
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.10.1-canary.cc20c52",
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",