@measured/puck-plugin-heading-analyzer 0.20.0-canary.d2e09bdc → 0.20.0-canary.def0ecb5

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.mjs CHANGED
@@ -462,7 +462,7 @@ var ChevronRight = createLucideIcon("ChevronRight", [
462
462
 
463
463
  // ../core/lib/use-breadcrumbs.ts
464
464
  init_react_import();
465
- import { useMemo as useMemo2 } from "react";
465
+ import { useMemo } from "react";
466
466
 
467
467
  // ../core/store/index.ts
468
468
  init_react_import();
@@ -988,275 +988,6 @@ function insertAction(state, action, appStore) {
988
988
 
989
989
  // ../core/reducer/actions/replace.ts
990
990
  init_react_import();
991
-
992
- // ../core/rsc.tsx
993
- init_react_import();
994
-
995
- // ../core/components/ServerRender/index.tsx
996
- init_react_import();
997
-
998
- // ../core/lib/data/setup-zone.ts
999
- init_react_import();
1000
- var setupZone = (data, zoneKey) => {
1001
- if (zoneKey === rootDroppableId) {
1002
- return data;
1003
- }
1004
- const newData = __spreadProps(__spreadValues({}, data), {
1005
- zones: data.zones ? __spreadValues({}, data.zones) : {}
1006
- });
1007
- newData.zones[zoneKey] = newData.zones[zoneKey] || [];
1008
- return newData;
1009
- };
1010
-
1011
- // ../core/lib/use-slots.tsx
1012
- init_react_import();
1013
- import { useMemo } from "react";
1014
- function useSlots(config, item, renderSlotEdit, renderSlotRender = renderSlotEdit, readOnly, forceReadOnly) {
1015
- const slotProps = useMemo(() => {
1016
- const mapped = mapSlots(
1017
- item,
1018
- (content, _parentId, propName, field, propPath) => {
1019
- const wildcardPath = propPath.replace(/\[\d+\]/g, "[*]");
1020
- const isReadOnly = (readOnly == null ? void 0 : readOnly[propPath]) || (readOnly == null ? void 0 : readOnly[wildcardPath]) || forceReadOnly;
1021
- const render = isReadOnly ? renderSlotRender : renderSlotEdit;
1022
- const Slot = (dzProps) => render(__spreadProps(__spreadValues({
1023
- allow: (field == null ? void 0 : field.type) === "slot" ? field.allow : [],
1024
- disallow: (field == null ? void 0 : field.type) === "slot" ? field.disallow : []
1025
- }, dzProps), {
1026
- zone: propName,
1027
- content
1028
- }));
1029
- return Slot;
1030
- },
1031
- config
1032
- ).props;
1033
- return mapped;
1034
- }, [config, item, readOnly, forceReadOnly]);
1035
- const mergedProps = useMemo(
1036
- () => __spreadValues(__spreadValues({}, item.props), slotProps),
1037
- [item.props, slotProps]
1038
- );
1039
- return mergedProps;
1040
- }
1041
-
1042
- // ../core/components/SlotRender/server.tsx
1043
- init_react_import();
1044
- import { forwardRef as forwardRef3 } from "react";
1045
- import { jsx as jsx2 } from "react/jsx-runtime";
1046
- var SlotRenderPure = (props) => /* @__PURE__ */ jsx2(SlotRender, __spreadValues({}, props));
1047
- var Item = ({
1048
- config,
1049
- item,
1050
- metadata
1051
- }) => {
1052
- const Component = config.components[item.type];
1053
- const props = useSlots(config, item, (slotProps) => /* @__PURE__ */ jsx2(SlotRenderPure, __spreadProps(__spreadValues({}, slotProps), { config, metadata })));
1054
- return /* @__PURE__ */ jsx2(
1055
- Component.render,
1056
- __spreadProps(__spreadValues({}, props), {
1057
- puck: __spreadProps(__spreadValues({}, props.puck), {
1058
- renderDropZone: DropZoneRender,
1059
- metadata: metadata || {}
1060
- })
1061
- })
1062
- );
1063
- };
1064
- var SlotRender = forwardRef3(
1065
- function SlotRenderInternal({ className, style, content, config, metadata }, ref) {
1066
- return /* @__PURE__ */ jsx2("div", { className, style, ref, children: content.map((item) => {
1067
- if (!config.components[item.type]) {
1068
- return null;
1069
- }
1070
- return /* @__PURE__ */ jsx2(
1071
- Item,
1072
- {
1073
- config,
1074
- item,
1075
- metadata
1076
- },
1077
- item.props.id
1078
- );
1079
- }) });
1080
- }
1081
- );
1082
-
1083
- // ../core/components/ServerRender/index.tsx
1084
- import { Fragment, jsx as jsx3 } from "react/jsx-runtime";
1085
- function DropZoneRender({
1086
- zone,
1087
- data,
1088
- areaId = "root",
1089
- config,
1090
- metadata = {}
1091
- }) {
1092
- let zoneCompound = rootDroppableId;
1093
- let content = (data == null ? void 0 : data.content) || [];
1094
- if (!data || !config) {
1095
- return null;
1096
- }
1097
- if (areaId !== rootAreaId && zone !== rootZone) {
1098
- zoneCompound = `${areaId}:${zone}`;
1099
- content = setupZone(data, zoneCompound).zones[zoneCompound];
1100
- }
1101
- return /* @__PURE__ */ jsx3(Fragment, { children: content.map((item) => {
1102
- const Component = config.components[item.type];
1103
- const props = __spreadProps(__spreadValues({}, item.props), {
1104
- puck: {
1105
- renderDropZone: ({ zone: zone2 }) => /* @__PURE__ */ jsx3(
1106
- DropZoneRender,
1107
- {
1108
- zone: zone2,
1109
- data,
1110
- areaId: item.props.id,
1111
- config,
1112
- metadata
1113
- }
1114
- ),
1115
- metadata,
1116
- dragRef: null,
1117
- isEditing: false
1118
- }
1119
- });
1120
- const renderItem = __spreadProps(__spreadValues({}, item), { props });
1121
- const propsWithSlots = useSlots(config, renderItem, (props2) => /* @__PURE__ */ jsx3(SlotRenderPure, __spreadProps(__spreadValues({}, props2), { config, metadata })));
1122
- if (Component) {
1123
- return /* @__PURE__ */ jsx3(Component.render, __spreadValues({}, propsWithSlots), renderItem.props.id);
1124
- }
1125
- return null;
1126
- }) });
1127
- }
1128
-
1129
- // ../core/lib/resolve-all-data.ts
1130
- init_react_import();
1131
-
1132
- // ../core/lib/resolve-component-data.ts
1133
- init_react_import();
1134
-
1135
- // ../core/lib/get-changed.ts
1136
- init_react_import();
1137
- var import_fast_deep_equal = __toESM(require_fast_deep_equal());
1138
- var getChanged = (newItem, oldItem) => {
1139
- return newItem ? Object.keys(newItem.props || {}).reduce((acc, item) => {
1140
- const newItemProps = (newItem == null ? void 0 : newItem.props) || {};
1141
- const oldItemProps = (oldItem == null ? void 0 : oldItem.props) || {};
1142
- return __spreadProps(__spreadValues({}, acc), {
1143
- [item]: !(0, import_fast_deep_equal.default)(oldItemProps[item], newItemProps[item])
1144
- });
1145
- }, {}) : {};
1146
- };
1147
-
1148
- // ../core/lib/resolve-component-data.ts
1149
- var import_fast_deep_equal2 = __toESM(require_fast_deep_equal());
1150
- var cache = { lastChange: {} };
1151
- var resolveComponentData = (_0, _1, ..._2) => __async(void 0, [_0, _1, ..._2], function* (item, config, metadata = {}, onResolveStart, onResolveEnd, trigger = "replace") {
1152
- const configForItem = "type" in item && item.type !== "root" ? config.components[item.type] : config.root;
1153
- const resolvedItem = __spreadValues({}, item);
1154
- const shouldRunResolver = (configForItem == null ? void 0 : configForItem.resolveData) && item.props;
1155
- const id = "id" in item.props ? item.props.id : "root";
1156
- if (shouldRunResolver) {
1157
- const { item: oldItem = null, resolved = {} } = cache.lastChange[id] || {};
1158
- if (item && (0, import_fast_deep_equal2.default)(item, oldItem)) {
1159
- return { node: resolved, didChange: false };
1160
- }
1161
- const changed = getChanged(item, oldItem);
1162
- if (onResolveStart) {
1163
- onResolveStart(item);
1164
- }
1165
- const { props: resolvedProps, readOnly = {} } = yield configForItem.resolveData(item, {
1166
- changed,
1167
- lastData: oldItem,
1168
- metadata: __spreadValues(__spreadValues({}, metadata), configForItem.metadata),
1169
- trigger
1170
- });
1171
- resolvedItem.props = __spreadValues(__spreadValues({}, item.props), resolvedProps);
1172
- if (Object.keys(readOnly).length) {
1173
- resolvedItem.readOnly = readOnly;
1174
- }
1175
- }
1176
- let itemWithResolvedChildren = yield mapSlots(
1177
- resolvedItem,
1178
- (content) => __async(void 0, null, function* () {
1179
- return yield Promise.all(
1180
- content.map(
1181
- (childItem) => __async(void 0, null, function* () {
1182
- return (yield resolveComponentData(
1183
- childItem,
1184
- config,
1185
- metadata,
1186
- onResolveStart,
1187
- onResolveEnd,
1188
- trigger
1189
- )).node;
1190
- })
1191
- )
1192
- );
1193
- }),
1194
- config
1195
- );
1196
- if (shouldRunResolver && onResolveEnd) {
1197
- onResolveEnd(resolvedItem);
1198
- }
1199
- cache.lastChange[id] = {
1200
- item,
1201
- resolved: itemWithResolvedChildren
1202
- };
1203
- return {
1204
- node: itemWithResolvedChildren,
1205
- didChange: !(0, import_fast_deep_equal2.default)(item, itemWithResolvedChildren)
1206
- };
1207
- });
1208
-
1209
- // ../core/lib/data/default-data.ts
1210
- init_react_import();
1211
-
1212
- // ../core/lib/data/to-component.ts
1213
- init_react_import();
1214
-
1215
- // ../core/lib/transform-props.ts
1216
- init_react_import();
1217
-
1218
- // ../core/lib/migrate.ts
1219
- init_react_import();
1220
-
1221
- // ../core/store/default-app-state.ts
1222
- init_react_import();
1223
-
1224
- // ../core/components/ViewportControls/default-viewports.ts
1225
- init_react_import();
1226
- var defaultViewports = [
1227
- { width: 360, height: "auto", icon: "Smartphone", label: "Small" },
1228
- { width: 768, height: "auto", icon: "Tablet", label: "Medium" },
1229
- { width: 1280, height: "auto", icon: "Monitor", label: "Large" }
1230
- ];
1231
-
1232
- // ../core/store/default-app-state.ts
1233
- var defaultAppState = {
1234
- data: { content: [], root: {}, zones: {} },
1235
- ui: {
1236
- leftSideBarVisible: true,
1237
- rightSideBarVisible: true,
1238
- arrayState: {},
1239
- itemSelector: null,
1240
- componentList: {},
1241
- isDragging: false,
1242
- previewMode: "edit",
1243
- viewports: {
1244
- current: {
1245
- width: defaultViewports[0].width,
1246
- height: defaultViewports[0].height || "auto"
1247
- },
1248
- options: [],
1249
- controlsVisible: true
1250
- },
1251
- field: { focus: null }
1252
- },
1253
- indexes: {
1254
- nodes: {},
1255
- zones: {}
1256
- }
1257
- };
1258
-
1259
- // ../core/reducer/actions/replace.ts
1260
991
  var replaceAction = (state, action, appStore) => {
1261
992
  const [parentId] = action.destinationZone.split(":");
1262
993
  const idsInPath = getIdsForParent(action.destinationZone, state);
@@ -1507,6 +1238,21 @@ var removeAction = (state, action, appStore) => {
1507
1238
 
1508
1239
  // ../core/reducer/actions/register-zone.ts
1509
1240
  init_react_import();
1241
+
1242
+ // ../core/lib/data/setup-zone.ts
1243
+ init_react_import();
1244
+ var setupZone = (data, zoneKey) => {
1245
+ if (zoneKey === rootDroppableId) {
1246
+ return data;
1247
+ }
1248
+ const newData = __spreadProps(__spreadValues({}, data), {
1249
+ zones: data.zones ? __spreadValues({}, data.zones) : {}
1250
+ });
1251
+ newData.zones[zoneKey] = newData.zones[zoneKey] || [];
1252
+ return newData;
1253
+ };
1254
+
1255
+ // ../core/reducer/actions/register-zone.ts
1510
1256
  var zoneCache = {};
1511
1257
  function registerZoneAction(state, action) {
1512
1258
  if (zoneCache[action.zone]) {
@@ -1659,6 +1405,14 @@ function createReducer({
1659
1405
  );
1660
1406
  }
1661
1407
 
1408
+ // ../core/components/ViewportControls/default-viewports.ts
1409
+ init_react_import();
1410
+ var defaultViewports = [
1411
+ { width: 360, height: "auto", icon: "Smartphone", label: "Small" },
1412
+ { width: 768, height: "auto", icon: "Tablet", label: "Medium" },
1413
+ { width: 1280, height: "auto", icon: "Monitor", label: "Large" }
1414
+ ];
1415
+
1662
1416
  // ../../node_modules/zustand/esm/vanilla.mjs
1663
1417
  init_react_import();
1664
1418
  var createStoreImpl = (createState) => {
@@ -1908,6 +1662,19 @@ var flattenData = (state, config) => {
1908
1662
  return data;
1909
1663
  };
1910
1664
 
1665
+ // ../core/lib/get-changed.ts
1666
+ init_react_import();
1667
+ var import_fast_deep_equal = __toESM(require_fast_deep_equal());
1668
+ var getChanged = (newItem, oldItem) => {
1669
+ return newItem ? Object.keys(newItem.props || {}).reduce((acc, item) => {
1670
+ const newItemProps = (newItem == null ? void 0 : newItem.props) || {};
1671
+ const oldItemProps = (oldItem == null ? void 0 : oldItem.props) || {};
1672
+ return __spreadProps(__spreadValues({}, acc), {
1673
+ [item]: !(0, import_fast_deep_equal.default)(oldItemProps[item], newItemProps[item])
1674
+ });
1675
+ }, {}) : {};
1676
+ };
1677
+
1911
1678
  // ../core/store/slices/permissions.ts
1912
1679
  var createPermissionsSlice = (set, get) => {
1913
1680
  const resolvePermissions = (..._0) => __async(void 0, [..._0], function* (params = {}, force) {
@@ -2026,6 +1793,68 @@ var createFieldsSlice = (_set, _get) => {
2026
1793
  };
2027
1794
  };
2028
1795
 
1796
+ // ../core/lib/resolve-component-data.ts
1797
+ init_react_import();
1798
+ var import_fast_deep_equal2 = __toESM(require_fast_deep_equal());
1799
+ var cache = { lastChange: {} };
1800
+ var resolveComponentData = (_0, _1, ..._2) => __async(void 0, [_0, _1, ..._2], function* (item, config, metadata = {}, onResolveStart, onResolveEnd, trigger = "replace") {
1801
+ const configForItem = "type" in item && item.type !== "root" ? config.components[item.type] : config.root;
1802
+ const resolvedItem = __spreadValues({}, item);
1803
+ const shouldRunResolver = (configForItem == null ? void 0 : configForItem.resolveData) && item.props;
1804
+ const id = "id" in item.props ? item.props.id : "root";
1805
+ if (shouldRunResolver) {
1806
+ const { item: oldItem = null, resolved = {} } = cache.lastChange[id] || {};
1807
+ if (item && (0, import_fast_deep_equal2.default)(item, oldItem)) {
1808
+ return { node: resolved, didChange: false };
1809
+ }
1810
+ const changed = getChanged(item, oldItem);
1811
+ if (onResolveStart) {
1812
+ onResolveStart(item);
1813
+ }
1814
+ const { props: resolvedProps, readOnly = {} } = yield configForItem.resolveData(item, {
1815
+ changed,
1816
+ lastData: oldItem,
1817
+ metadata: __spreadValues(__spreadValues({}, metadata), configForItem.metadata),
1818
+ trigger
1819
+ });
1820
+ resolvedItem.props = __spreadValues(__spreadValues({}, item.props), resolvedProps);
1821
+ if (Object.keys(readOnly).length) {
1822
+ resolvedItem.readOnly = readOnly;
1823
+ }
1824
+ }
1825
+ let itemWithResolvedChildren = yield mapSlots(
1826
+ resolvedItem,
1827
+ (content) => __async(void 0, null, function* () {
1828
+ return yield Promise.all(
1829
+ content.map(
1830
+ (childItem) => __async(void 0, null, function* () {
1831
+ return (yield resolveComponentData(
1832
+ childItem,
1833
+ config,
1834
+ metadata,
1835
+ onResolveStart,
1836
+ onResolveEnd,
1837
+ trigger
1838
+ )).node;
1839
+ })
1840
+ )
1841
+ );
1842
+ }),
1843
+ config
1844
+ );
1845
+ if (shouldRunResolver && onResolveEnd) {
1846
+ onResolveEnd(resolvedItem);
1847
+ }
1848
+ cache.lastChange[id] = {
1849
+ item,
1850
+ resolved: itemWithResolvedChildren
1851
+ };
1852
+ return {
1853
+ node: itemWithResolvedChildren,
1854
+ didChange: !(0, import_fast_deep_equal2.default)(item, itemWithResolvedChildren)
1855
+ };
1856
+ });
1857
+
2029
1858
  // ../core/lib/data/to-root.ts
2030
1859
  init_react_import();
2031
1860
  var toRoot = (item) => {
@@ -2043,6 +1872,34 @@ var toRoot = (item) => {
2043
1872
  return { props: {}, readOnly };
2044
1873
  };
2045
1874
 
1875
+ // ../core/store/default-app-state.ts
1876
+ init_react_import();
1877
+ var defaultAppState = {
1878
+ data: { content: [], root: {}, zones: {} },
1879
+ ui: {
1880
+ leftSideBarVisible: true,
1881
+ rightSideBarVisible: true,
1882
+ arrayState: {},
1883
+ itemSelector: null,
1884
+ componentList: {},
1885
+ isDragging: false,
1886
+ previewMode: "edit",
1887
+ viewports: {
1888
+ current: {
1889
+ width: defaultViewports[0].width,
1890
+ height: defaultViewports[0].height || "auto"
1891
+ },
1892
+ options: [],
1893
+ controlsVisible: true
1894
+ },
1895
+ field: { focus: null }
1896
+ },
1897
+ indexes: {
1898
+ nodes: {},
1899
+ zones: {}
1900
+ }
1901
+ };
1902
+
2046
1903
  // ../core/store/index.ts
2047
1904
  var defaultPageFields = {
2048
1905
  title: { type: "text" }
@@ -2240,7 +2097,7 @@ var useBreadcrumbs = (renderCount) => {
2240
2097
  return (_a = s.state.indexes.nodes[selectedId]) == null ? void 0 : _a.path;
2241
2098
  });
2242
2099
  const appStore = useAppStoreApi();
2243
- return useMemo2(() => {
2100
+ return useMemo(() => {
2244
2101
  const breadcrumbs = (path == null ? void 0 : path.map((zoneCompound) => {
2245
2102
  var _a, _b, _c;
2246
2103
  const [componentId] = zoneCompound.split(":");
@@ -2285,12 +2142,19 @@ init_react_import();
2285
2142
  // ../core/lib/data/replace.ts
2286
2143
  init_react_import();
2287
2144
 
2145
+ // ../core/lib/use-reset-auto-zoom.ts
2146
+ init_react_import();
2147
+ import { useCallback as useCallback2 } from "react";
2148
+
2149
+ // ../core/lib/get-zoom-config.ts
2150
+ init_react_import();
2151
+
2288
2152
  // css-module:/home/runner/work/puck/puck/packages/core/components/Loader/styles.module.css#css-module
2289
2153
  init_react_import();
2290
2154
  var styles_module_default3 = { "Loader": "_Loader_nacdm_13", "loader-animation": "_loader-animation_nacdm_1" };
2291
2155
 
2292
2156
  // ../core/components/Loader/index.tsx
2293
- import { jsx as jsx4 } from "react/jsx-runtime";
2157
+ import { jsx as jsx2 } from "react/jsx-runtime";
2294
2158
  var getClassName2 = get_class_name_factory_default("Loader", styles_module_default3);
2295
2159
  var Loader = (_a) => {
2296
2160
  var _b = _a, {
@@ -2300,7 +2164,7 @@ var Loader = (_a) => {
2300
2164
  "color",
2301
2165
  "size"
2302
2166
  ]);
2303
- return /* @__PURE__ */ jsx4(
2167
+ return /* @__PURE__ */ jsx2(
2304
2168
  "span",
2305
2169
  __spreadValues({
2306
2170
  className: getClassName2(),
@@ -2315,7 +2179,7 @@ var Loader = (_a) => {
2315
2179
  };
2316
2180
 
2317
2181
  // ../core/components/SidebarSection/index.tsx
2318
- import { jsx as jsx5, jsxs } from "react/jsx-runtime";
2182
+ import { jsx as jsx3, jsxs } from "react/jsx-runtime";
2319
2183
  var getClassName3 = get_class_name_factory_default("SidebarSection", styles_module_default);
2320
2184
  var SidebarSection = ({
2321
2185
  children,
@@ -2334,9 +2198,9 @@ var SidebarSection = ({
2334
2198
  className: getClassName3({ noBorderTop, noPadding }),
2335
2199
  style: { background },
2336
2200
  children: [
2337
- /* @__PURE__ */ jsx5("div", { className: getClassName3("title"), children: /* @__PURE__ */ jsxs("div", { className: getClassName3("breadcrumbs"), children: [
2201
+ /* @__PURE__ */ jsx3("div", { className: getClassName3("title"), children: /* @__PURE__ */ jsxs("div", { className: getClassName3("breadcrumbs"), children: [
2338
2202
  showBreadcrumbs ? breadcrumbs.map((breadcrumb, i) => /* @__PURE__ */ jsxs("div", { className: getClassName3("breadcrumb"), children: [
2339
- /* @__PURE__ */ jsx5(
2203
+ /* @__PURE__ */ jsx3(
2340
2204
  "button",
2341
2205
  {
2342
2206
  type: "button",
@@ -2345,12 +2209,12 @@ var SidebarSection = ({
2345
2209
  children: breadcrumb.label
2346
2210
  }
2347
2211
  ),
2348
- /* @__PURE__ */ jsx5(ChevronRight, { size: 16 })
2212
+ /* @__PURE__ */ jsx3(ChevronRight, { size: 16 })
2349
2213
  ] }, i)) : null,
2350
- /* @__PURE__ */ jsx5("div", { className: getClassName3("heading"), children: /* @__PURE__ */ jsx5(Heading, { rank: "2", size: "xs", children: title }) })
2214
+ /* @__PURE__ */ jsx3("div", { className: getClassName3("heading"), children: /* @__PURE__ */ jsx3(Heading, { rank: "2", size: "xs", children: title }) })
2351
2215
  ] }) }),
2352
- /* @__PURE__ */ jsx5("div", { className: getClassName3("content"), children }),
2353
- isLoading && /* @__PURE__ */ jsx5("div", { className: getClassName3("loadingOverlay"), children: /* @__PURE__ */ jsx5(Loader, { size: 32 }) })
2216
+ /* @__PURE__ */ jsx3("div", { className: getClassName3("content"), children }),
2217
+ isLoading && /* @__PURE__ */ jsx3("div", { className: getClassName3("loadingOverlay"), children: /* @__PURE__ */ jsx3(Loader, { size: 32 }) })
2354
2218
  ]
2355
2219
  }
2356
2220
  );
@@ -2364,18 +2228,18 @@ init_react_import();
2364
2228
  var styles_module_default4 = { "OutlineList": "_OutlineList_w4lzv_1", "OutlineListItem": "_OutlineListItem_w4lzv_25", "OutlineListItem--clickable": "_OutlineListItem--clickable_w4lzv_45" };
2365
2229
 
2366
2230
  // ../core/components/OutlineList/index.tsx
2367
- import { jsx as jsx6 } from "react/jsx-runtime";
2231
+ import { jsx as jsx4 } from "react/jsx-runtime";
2368
2232
  var getClassName4 = get_class_name_factory_default("OutlineList", styles_module_default4);
2369
2233
  var getClassNameItem = get_class_name_factory_default("OutlineListItem", styles_module_default4);
2370
2234
  var OutlineList = ({ children }) => {
2371
- return /* @__PURE__ */ jsx6("ul", { className: getClassName4(), children });
2235
+ return /* @__PURE__ */ jsx4("ul", { className: getClassName4(), children });
2372
2236
  };
2373
- OutlineList.Clickable = ({ children }) => /* @__PURE__ */ jsx6("div", { className: getClassNameItem({ clickable: true }), children });
2237
+ OutlineList.Clickable = ({ children }) => /* @__PURE__ */ jsx4("div", { className: getClassNameItem({ clickable: true }), children });
2374
2238
  OutlineList.Item = ({
2375
2239
  children,
2376
2240
  onClick
2377
2241
  }) => {
2378
- return /* @__PURE__ */ jsx6(
2242
+ return /* @__PURE__ */ jsx4(
2379
2243
  "li",
2380
2244
  {
2381
2245
  className: getClassNameItem({ clickable: !!onClick }),
@@ -2409,7 +2273,7 @@ var getFrame = () => {
2409
2273
 
2410
2274
  // src/HeadingAnalyzer.tsx
2411
2275
  import ReactFromJSONModule from "react-from-json";
2412
- import { Fragment as Fragment2, jsx as jsx7, jsxs as jsxs2 } from "react/jsx-runtime";
2276
+ import { Fragment, jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
2413
2277
  var getClassName5 = get_class_name_factory_default("HeadingAnalyzer", HeadingAnalyzer_module_default);
2414
2278
  var getClassNameItem2 = get_class_name_factory_default("HeadingAnalyzerItem", HeadingAnalyzer_module_default);
2415
2279
  var ReactFromJSON = ReactFromJSONModule.default || ReactFromJSONModule;
@@ -2514,19 +2378,19 @@ var HeadingAnalyzer = () => {
2514
2378
  children: [
2515
2379
  "Heading analyzer styles not loaded. Please review the",
2516
2380
  " ",
2517
- /* @__PURE__ */ jsx7("a", { href: "https://github.com/measuredco/puck/blob/main/packages/plugin-heading-analyzer/README.md", children: "README" }),
2381
+ /* @__PURE__ */ jsx5("a", { href: "https://github.com/measuredco/puck/blob/main/packages/plugin-heading-analyzer/README.md", children: "README" }),
2518
2382
  "."
2519
2383
  ]
2520
2384
  }
2521
2385
  ),
2522
- hierarchy.length === 0 && /* @__PURE__ */ jsx7("div", { children: "No headings." }),
2523
- /* @__PURE__ */ jsx7(OutlineList, { children: /* @__PURE__ */ jsx7(
2386
+ hierarchy.length === 0 && /* @__PURE__ */ jsx5("div", { children: "No headings." }),
2387
+ /* @__PURE__ */ jsx5(OutlineList, { children: /* @__PURE__ */ jsx5(
2524
2388
  ReactFromJSON,
2525
2389
  {
2526
2390
  mapping: {
2527
- Root: (props) => /* @__PURE__ */ jsx7(Fragment2, { children: props.children }),
2391
+ Root: (props) => /* @__PURE__ */ jsx5(Fragment, { children: props.children }),
2528
2392
  OutlineListItem: (props) => /* @__PURE__ */ jsxs2(OutlineList.Item, { children: [
2529
- /* @__PURE__ */ jsx7(OutlineList.Clickable, { children: /* @__PURE__ */ jsx7(
2393
+ /* @__PURE__ */ jsx5(OutlineList.Clickable, { children: /* @__PURE__ */ jsx5(
2530
2394
  "small",
2531
2395
  {
2532
2396
  className: getClassNameItem2({ missing: props.missing }),
@@ -2544,13 +2408,13 @@ var HeadingAnalyzer = () => {
2544
2408
  }, 2e3);
2545
2409
  }
2546
2410
  },
2547
- children: props.missing ? /* @__PURE__ */ jsxs2(Fragment2, { children: [
2411
+ children: props.missing ? /* @__PURE__ */ jsxs2(Fragment, { children: [
2548
2412
  /* @__PURE__ */ jsxs2("b", { children: [
2549
2413
  "H",
2550
2414
  props.rank
2551
2415
  ] }),
2552
2416
  ": Missing"
2553
- ] }) : /* @__PURE__ */ jsxs2(Fragment2, { children: [
2417
+ ] }) : /* @__PURE__ */ jsxs2(Fragment, { children: [
2554
2418
  /* @__PURE__ */ jsxs2("b", { children: [
2555
2419
  "H",
2556
2420
  props.rank
@@ -2560,7 +2424,7 @@ var HeadingAnalyzer = () => {
2560
2424
  ] })
2561
2425
  }
2562
2426
  ) }),
2563
- /* @__PURE__ */ jsx7(OutlineList, { children: props.children })
2427
+ /* @__PURE__ */ jsx5(OutlineList, { children: props.children })
2564
2428
  ] })
2565
2429
  },
2566
2430
  entry: {
@@ -2582,9 +2446,9 @@ var HeadingAnalyzer = () => {
2582
2446
  };
2583
2447
  var headingAnalyzer = {
2584
2448
  overrides: {
2585
- fields: ({ children, itemSelector }) => /* @__PURE__ */ jsxs2(Fragment2, { children: [
2449
+ fields: ({ children, itemSelector }) => /* @__PURE__ */ jsxs2(Fragment, { children: [
2586
2450
  children,
2587
- /* @__PURE__ */ jsx7("div", { style: { display: itemSelector ? "none" : "block" }, children: /* @__PURE__ */ jsx7(SidebarSection, { title: "Heading Outline", children: /* @__PURE__ */ jsx7(HeadingAnalyzer, {}) }) })
2451
+ /* @__PURE__ */ jsx5("div", { style: { display: itemSelector ? "none" : "block" }, children: /* @__PURE__ */ jsx5(SidebarSection, { title: "Heading Outline", children: /* @__PURE__ */ jsx5(HeadingAnalyzer, {}) }) })
2588
2452
  ] })
2589
2453
  }
2590
2454
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@measured/puck-plugin-heading-analyzer",
3
- "version": "0.20.0-canary.d2e09bdc",
3
+ "version": "0.20.0-canary.def0ecb5",
4
4
  "author": "Chris Villa <chris@puckeditor.com>",
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.20.0-canary.d2e09bdc",
28
+ "@measured/puck": "^0.20.0-canary.def0ecb5",
29
29
  "@types/react": "^19.0.1",
30
30
  "@types/react-dom": "^19.0.2",
31
31
  "eslint": "^7.32.0",