@measured/puck-plugin-heading-analyzer 0.21.0-canary.b6ed9789 → 0.21.0-canary.cf074bc6

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.js CHANGED
@@ -313,21 +313,21 @@ init_react_import();
313
313
 
314
314
  // src/HeadingAnalyzer.tsx
315
315
  init_react_import();
316
- var import_react10 = require("react");
316
+ var import_react11 = require("react");
317
317
 
318
318
  // css-module:/home/runner/work/puck/puck/packages/plugin-heading-analyzer/src/HeadingAnalyzer.module.css#css-module
319
319
  init_react_import();
320
- var HeadingAnalyzer_module_default = { "HeadingAnalyzer": "_HeadingAnalyzer_yg0s7_1", "HeadingAnalyzer-cssWarning": "_HeadingAnalyzer-cssWarning_yg0s7_6", "HeadingAnalyzerItem": "_HeadingAnalyzerItem_yg0s7_10", "HeadingAnalyzerItem--missing": "_HeadingAnalyzerItem--missing_yg0s7_14" };
320
+ var HeadingAnalyzer_module_default = { "HeadingAnalyzer": "_HeadingAnalyzer_116v6_1", "HeadingAnalyzer-cssWarning": "_HeadingAnalyzer-cssWarning_116v6_5", "HeadingAnalyzerItem": "_HeadingAnalyzerItem_116v6_9", "HeadingAnalyzerItem--missing": "_HeadingAnalyzerItem--missing_116v6_13" };
321
321
 
322
322
  // src/HeadingAnalyzer.tsx
323
323
  var import_puck = require("@measured/puck");
324
324
 
325
- // ../core/components/OutlineList/index.tsx
325
+ // ../core/components/SidebarSection/index.tsx
326
326
  init_react_import();
327
327
 
328
- // css-module:/home/runner/work/puck/puck/packages/core/components/OutlineList/styles.module.css#css-module
328
+ // css-module:/home/runner/work/puck/puck/packages/core/components/SidebarSection/styles.module.css#css-module
329
329
  init_react_import();
330
- var styles_module_default = { "OutlineList": "_OutlineList_w4lzv_1", "OutlineListItem": "_OutlineListItem_w4lzv_25", "OutlineListItem--clickable": "_OutlineListItem--clickable_w4lzv_45" };
330
+ var styles_module_default = { "SidebarSection": "_SidebarSection_8boj8_1", "SidebarSection-title": "_SidebarSection-title_8boj8_12", "SidebarSection--noBorderTop": "_SidebarSection--noBorderTop_8boj8_20", "SidebarSection-content": "_SidebarSection-content_8boj8_24", "SidebarSection--noPadding": "_SidebarSection--noPadding_8boj8_28", "SidebarSection-breadcrumbLabel": "_SidebarSection-breadcrumbLabel_8boj8_41", "SidebarSection-breadcrumbs": "_SidebarSection-breadcrumbs_8boj8_70", "SidebarSection-breadcrumb": "_SidebarSection-breadcrumb_8boj8_41", "SidebarSection-heading": "_SidebarSection-heading_8boj8_82", "SidebarSection-loadingOverlay": "_SidebarSection-loadingOverlay_8boj8_86" };
331
331
 
332
332
  // ../core/lib/get-class-name-factory.ts
333
333
  init_react_import();
@@ -356,50 +356,29 @@ var getClassNameFactory = (rootClass, styles, config = { baseClass: "" }) => (op
356
356
  };
357
357
  var get_class_name_factory_default = getClassNameFactory;
358
358
 
359
- // ../core/components/OutlineList/index.tsx
359
+ // ../core/components/Heading/index.tsx
360
+ init_react_import();
361
+
362
+ // css-module:/home/runner/work/puck/puck/packages/core/components/Heading/styles.module.css#css-module
363
+ init_react_import();
364
+ var styles_module_default2 = { "Heading": "_Heading_qxrry_1", "Heading--xxxxl": "_Heading--xxxxl_qxrry_12", "Heading--xxxl": "_Heading--xxxl_qxrry_18", "Heading--xxl": "_Heading--xxl_qxrry_22", "Heading--xl": "_Heading--xl_qxrry_26", "Heading--l": "_Heading--l_qxrry_30", "Heading--m": "_Heading--m_qxrry_34", "Heading--s": "_Heading--s_qxrry_38", "Heading--xs": "_Heading--xs_qxrry_42" };
365
+
366
+ // ../core/components/Heading/index.tsx
360
367
  var import_jsx_runtime = require("react/jsx-runtime");
361
- var getClassName = get_class_name_factory_default("OutlineList", styles_module_default);
362
- var getClassNameItem = get_class_name_factory_default("OutlineListItem", styles_module_default);
363
- var OutlineList = ({ children }) => {
364
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("ul", { className: getClassName(), children });
365
- };
366
- OutlineList.Clickable = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: getClassNameItem({ clickable: true }), children });
367
- OutlineList.Item = ({
368
- children,
369
- onClick
370
- }) => {
368
+ var getClassName = get_class_name_factory_default("Heading", styles_module_default2);
369
+ var Heading = ({ children, rank, size = "m" }) => {
370
+ const Tag = rank ? `h${rank}` : "span";
371
371
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
372
- "li",
372
+ Tag,
373
373
  {
374
- className: getClassNameItem({ clickable: !!onClick }),
375
- onClick,
374
+ className: getClassName({
375
+ [size]: true
376
+ }),
376
377
  children
377
378
  }
378
379
  );
379
380
  };
380
381
 
381
- // ../core/lib/scroll-into-view.ts
382
- init_react_import();
383
- var scrollIntoView = (el) => {
384
- const oldStyle = __spreadValues({}, el.style);
385
- el.style.scrollMargin = "256px";
386
- if (el) {
387
- el == null ? void 0 : el.scrollIntoView({ behavior: "smooth" });
388
- el.style.scrollMargin = oldStyle.scrollMargin || "";
389
- }
390
- };
391
-
392
- // ../core/lib/get-frame.ts
393
- init_react_import();
394
- var getFrame = () => {
395
- if (typeof window === "undefined") return;
396
- let frameEl = document.querySelector("#preview-frame");
397
- if ((frameEl == null ? void 0 : frameEl.tagName) === "IFRAME") {
398
- return frameEl.contentDocument || document;
399
- }
400
- return (frameEl == null ? void 0 : frameEl.ownerDocument) || document;
401
- };
402
-
403
382
  // ../../node_modules/lucide-react/dist/esm/lucide-react.js
404
383
  init_react_import();
405
384
 
@@ -487,29 +466,15 @@ var createLucideIcon = (iconName, iconNode) => {
487
466
  return Component;
488
467
  };
489
468
 
490
- // ../../node_modules/lucide-react/dist/esm/icons/heading-1.js
469
+ // ../../node_modules/lucide-react/dist/esm/icons/chevron-right.js
491
470
  init_react_import();
492
- var Heading1 = createLucideIcon("Heading1", [
493
- ["path", { d: "M4 12h8", key: "17cfdx" }],
494
- ["path", { d: "M4 18V6", key: "1rz3zl" }],
495
- ["path", { d: "M12 18V6", key: "zqpxq5" }],
496
- ["path", { d: "m17 12 3-2v8", key: "1hhhft" }]
471
+ var ChevronRight = createLucideIcon("ChevronRight", [
472
+ ["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]
497
473
  ]);
498
474
 
499
- // ../core/lib/index.ts
500
- init_react_import();
501
-
502
- // ../core/lib/filter.ts
503
- init_react_import();
504
-
505
- // ../core/lib/data/reorder.ts
506
- init_react_import();
507
-
508
- // ../core/lib/data/replace.ts
509
- init_react_import();
510
-
511
- // ../core/lib/use-reset-auto-zoom.ts
475
+ // ../core/lib/use-breadcrumbs.ts
512
476
  init_react_import();
477
+ var import_react10 = require("react");
513
478
 
514
479
  // ../core/store/index.ts
515
480
  init_react_import();
@@ -607,7 +572,7 @@ var walkField = ({
607
572
  return map({
608
573
  value: mappedContent,
609
574
  parentId: id,
610
- propName: propKey,
575
+ propName: propPath,
611
576
  field: fields[propKey],
612
577
  propPath
613
578
  });
@@ -1479,8 +1444,7 @@ init_react_import();
1479
1444
  var defaultViewports = [
1480
1445
  { width: 360, height: "auto", icon: "Smartphone", label: "Small" },
1481
1446
  { width: 768, height: "auto", icon: "Tablet", label: "Medium" },
1482
- { width: 1280, height: "auto", icon: "Monitor", label: "Large" },
1483
- { width: "100%", height: "auto", icon: "FullWidth", label: "Full-width" }
1447
+ { width: 1280, height: "auto", icon: "Monitor", label: "Large" }
1484
1448
  ];
1485
1449
 
1486
1450
  // ../../node_modules/zustand/esm/vanilla.mjs
@@ -1726,7 +1690,7 @@ var flattenData = (state, config) => {
1726
1690
  (content) => content,
1727
1691
  (item) => {
1728
1692
  data.push(item);
1729
- return null;
1693
+ return item;
1730
1694
  }
1731
1695
  );
1732
1696
  return data;
@@ -1874,7 +1838,7 @@ var resolveComponentData = (_0, _1, ..._2) => __async(void 0, [_0, _1, ..._2], f
1874
1838
  const id = "id" in item.props ? item.props.id : "root";
1875
1839
  if (shouldRunResolver) {
1876
1840
  const { item: oldItem = null, resolved = {} } = cache.lastChange[id] || {};
1877
- if (item && (0, import_fast_deep_equal2.default)(item, oldItem)) {
1841
+ if (trigger !== "force" && item && (0, import_fast_deep_equal2.default)(item, oldItem)) {
1878
1842
  return { node: resolved, didChange: false };
1879
1843
  }
1880
1844
  const changed = getChanged(item, oldItem);
@@ -1965,8 +1929,7 @@ var defaultAppState = {
1965
1929
  options: [],
1966
1930
  controlsVisible: true
1967
1931
  },
1968
- field: { focus: null },
1969
- plugin: { current: null }
1932
+ field: { focus: null }
1970
1933
  },
1971
1934
  indexes: {
1972
1935
  nodes: {},
@@ -1982,7 +1945,6 @@ var createAppStore = (initialAppStore) => create()(
1982
1945
  subscribeWithSelector((set, get) => {
1983
1946
  var _a, _b;
1984
1947
  return __spreadProps(__spreadValues({
1985
- instanceId: generateId(),
1986
1948
  state: defaultAppState,
1987
1949
  config: { components: {} },
1988
1950
  componentState: {},
@@ -2153,14 +2115,203 @@ var createAppStore = (initialAppStore) => create()(
2153
2115
  })
2154
2116
  );
2155
2117
  var appStoreContext = (0, import_react9.createContext)(createAppStore());
2118
+ function useAppStore(selector) {
2119
+ const context = (0, import_react9.useContext)(appStoreContext);
2120
+ return useStore(context, selector);
2121
+ }
2122
+ function useAppStoreApi() {
2123
+ return (0, import_react9.useContext)(appStoreContext);
2124
+ }
2125
+
2126
+ // ../core/lib/use-breadcrumbs.ts
2127
+ var useBreadcrumbs = (renderCount) => {
2128
+ const selectedId = useAppStore((s) => {
2129
+ var _a;
2130
+ return (_a = s.selectedItem) == null ? void 0 : _a.props.id;
2131
+ });
2132
+ const config = useAppStore((s) => s.config);
2133
+ const path = useAppStore((s) => {
2134
+ var _a;
2135
+ return (_a = s.state.indexes.nodes[selectedId]) == null ? void 0 : _a.path;
2136
+ });
2137
+ const appStore = useAppStoreApi();
2138
+ return (0, import_react10.useMemo)(() => {
2139
+ const breadcrumbs = (path == null ? void 0 : path.map((zoneCompound) => {
2140
+ var _a, _b, _c;
2141
+ const [componentId] = zoneCompound.split(":");
2142
+ if (componentId === "root") {
2143
+ return {
2144
+ label: "Page",
2145
+ selector: null
2146
+ };
2147
+ }
2148
+ const node = appStore.getState().state.indexes.nodes[componentId];
2149
+ const parentId = node.path[node.path.length - 1];
2150
+ const contentIds = ((_a = appStore.getState().state.indexes.zones[parentId]) == null ? void 0 : _a.contentIds) || [];
2151
+ const index = contentIds.indexOf(componentId);
2152
+ const label = node ? (_c = (_b = config.components[node.data.type]) == null ? void 0 : _b.label) != null ? _c : node.data.type : "Component";
2153
+ return {
2154
+ label,
2155
+ selector: node ? {
2156
+ index,
2157
+ zone: node.path[node.path.length - 1]
2158
+ } : null
2159
+ };
2160
+ })) || [];
2161
+ if (renderCount) {
2162
+ return breadcrumbs.slice(breadcrumbs.length - renderCount);
2163
+ }
2164
+ return breadcrumbs;
2165
+ }, [path, renderCount]);
2166
+ };
2167
+
2168
+ // ../core/components/Loader/index.tsx
2169
+ init_react_import();
2170
+
2171
+ // ../core/lib/index.ts
2172
+ init_react_import();
2173
+
2174
+ // ../core/lib/filter.ts
2175
+ init_react_import();
2176
+
2177
+ // ../core/lib/data/reorder.ts
2178
+ init_react_import();
2179
+
2180
+ // ../core/lib/data/replace.ts
2181
+ init_react_import();
2182
+
2183
+ // ../core/lib/use-reset-auto-zoom.ts
2184
+ init_react_import();
2156
2185
 
2157
2186
  // ../core/lib/get-zoom-config.ts
2158
2187
  init_react_import();
2159
2188
 
2189
+ // css-module:/home/runner/work/puck/puck/packages/core/components/Loader/styles.module.css#css-module
2190
+ init_react_import();
2191
+ var styles_module_default3 = { "Loader": "_Loader_nacdm_13", "loader-animation": "_loader-animation_nacdm_1" };
2192
+
2193
+ // ../core/components/Loader/index.tsx
2194
+ var import_jsx_runtime2 = require("react/jsx-runtime");
2195
+ var getClassName2 = get_class_name_factory_default("Loader", styles_module_default3);
2196
+ var Loader = (_a) => {
2197
+ var _b = _a, {
2198
+ color,
2199
+ size = 16
2200
+ } = _b, props = __objRest(_b, [
2201
+ "color",
2202
+ "size"
2203
+ ]);
2204
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
2205
+ "span",
2206
+ __spreadValues({
2207
+ className: getClassName2(),
2208
+ style: {
2209
+ width: size,
2210
+ height: size,
2211
+ color
2212
+ },
2213
+ "aria-label": "loading"
2214
+ }, props)
2215
+ );
2216
+ };
2217
+
2218
+ // ../core/components/SidebarSection/index.tsx
2219
+ var import_jsx_runtime3 = require("react/jsx-runtime");
2220
+ var getClassName3 = get_class_name_factory_default("SidebarSection", styles_module_default);
2221
+ var SidebarSection = ({
2222
+ children,
2223
+ title,
2224
+ background,
2225
+ showBreadcrumbs,
2226
+ noBorderTop,
2227
+ noPadding,
2228
+ isLoading
2229
+ }) => {
2230
+ const setUi = useAppStore((s) => s.setUi);
2231
+ const breadcrumbs = useBreadcrumbs(1);
2232
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
2233
+ "div",
2234
+ {
2235
+ className: getClassName3({ noBorderTop, noPadding }),
2236
+ style: { background },
2237
+ children: [
2238
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: getClassName3("title"), children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: getClassName3("breadcrumbs"), children: [
2239
+ showBreadcrumbs ? breadcrumbs.map((breadcrumb, i) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: getClassName3("breadcrumb"), children: [
2240
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2241
+ "button",
2242
+ {
2243
+ type: "button",
2244
+ className: getClassName3("breadcrumbLabel"),
2245
+ onClick: () => setUi({ itemSelector: breadcrumb.selector }),
2246
+ children: breadcrumb.label
2247
+ }
2248
+ ),
2249
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ChevronRight, { size: 16 })
2250
+ ] }, i)) : null,
2251
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: getClassName3("heading"), children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Heading, { rank: "2", size: "xs", children: title }) })
2252
+ ] }) }),
2253
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: getClassName3("content"), children }),
2254
+ isLoading && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: getClassName3("loadingOverlay"), children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Loader, { size: 32 }) })
2255
+ ]
2256
+ }
2257
+ );
2258
+ };
2259
+
2260
+ // ../core/components/OutlineList/index.tsx
2261
+ init_react_import();
2262
+
2263
+ // css-module:/home/runner/work/puck/puck/packages/core/components/OutlineList/styles.module.css#css-module
2264
+ init_react_import();
2265
+ var styles_module_default4 = { "OutlineList": "_OutlineList_w4lzv_1", "OutlineListItem": "_OutlineListItem_w4lzv_25", "OutlineListItem--clickable": "_OutlineListItem--clickable_w4lzv_45" };
2266
+
2267
+ // ../core/components/OutlineList/index.tsx
2268
+ var import_jsx_runtime4 = require("react/jsx-runtime");
2269
+ var getClassName4 = get_class_name_factory_default("OutlineList", styles_module_default4);
2270
+ var getClassNameItem = get_class_name_factory_default("OutlineListItem", styles_module_default4);
2271
+ var OutlineList = ({ children }) => {
2272
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("ul", { className: getClassName4(), children });
2273
+ };
2274
+ OutlineList.Clickable = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: getClassNameItem({ clickable: true }), children });
2275
+ OutlineList.Item = ({
2276
+ children,
2277
+ onClick
2278
+ }) => {
2279
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2280
+ "li",
2281
+ {
2282
+ className: getClassNameItem({ clickable: !!onClick }),
2283
+ onClick,
2284
+ children
2285
+ }
2286
+ );
2287
+ };
2288
+
2289
+ // ../core/lib/scroll-into-view.ts
2290
+ init_react_import();
2291
+ var scrollIntoView = (el) => {
2292
+ const oldStyle = __spreadValues({}, el.style);
2293
+ el.style.scrollMargin = "256px";
2294
+ if (el) {
2295
+ el == null ? void 0 : el.scrollIntoView({ behavior: "smooth" });
2296
+ el.style.scrollMargin = oldStyle.scrollMargin || "";
2297
+ }
2298
+ };
2299
+
2300
+ // ../core/lib/get-frame.ts
2301
+ init_react_import();
2302
+ var getFrame = () => {
2303
+ if (typeof window === "undefined") return;
2304
+ let frameEl = document.querySelector("#preview-frame");
2305
+ if ((frameEl == null ? void 0 : frameEl.tagName) === "IFRAME") {
2306
+ return frameEl.contentDocument || document;
2307
+ }
2308
+ return (frameEl == null ? void 0 : frameEl.ownerDocument) || document;
2309
+ };
2310
+
2160
2311
  // src/HeadingAnalyzer.tsx
2161
2312
  var import_react_from_json = __toESM(require("react-from-json"));
2162
- var import_jsx_runtime2 = require("react/jsx-runtime");
2163
- var getClassName2 = get_class_name_factory_default("HeadingAnalyzer", HeadingAnalyzer_module_default);
2313
+ var import_jsx_runtime5 = require("react/jsx-runtime");
2314
+ var getClassName5 = get_class_name_factory_default("HeadingAnalyzer", HeadingAnalyzer_module_default);
2164
2315
  var getClassNameItem2 = get_class_name_factory_default("HeadingAnalyzerItem", HeadingAnalyzer_module_default);
2165
2316
  var ReactFromJSON = import_react_from_json.default.default || import_react_from_json.default;
2166
2317
  var getOutline = ({ frame } = {}) => {
@@ -2215,8 +2366,8 @@ function buildHierarchy(frame) {
2215
2366
  var usePuck = (0, import_puck.createUsePuck)();
2216
2367
  var HeadingAnalyzer = () => {
2217
2368
  const data = usePuck((s) => s.appState.data);
2218
- const [hierarchy, setHierarchy] = (0, import_react10.useState)([]);
2219
- (0, import_react10.useEffect)(() => {
2369
+ const [hierarchy, setHierarchy] = (0, import_react11.useState)([]);
2370
+ (0, import_react11.useEffect)(() => {
2220
2371
  const frame = getFrame();
2221
2372
  let entry = frame == null ? void 0 : frame.querySelector(`[data-puck-entry]`);
2222
2373
  const createHierarchy = () => {
@@ -2251,11 +2402,11 @@ var HeadingAnalyzer = () => {
2251
2402
  frameObserver.disconnect();
2252
2403
  };
2253
2404
  }, [data]);
2254
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: getClassName2(), children: [
2255
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
2405
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: getClassName5(), children: [
2406
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
2256
2407
  "small",
2257
2408
  {
2258
- className: getClassName2("cssWarning"),
2409
+ className: getClassName5("cssWarning"),
2259
2410
  style: {
2260
2411
  color: "var(--puck-color-red-04)",
2261
2412
  display: "block",
@@ -2264,19 +2415,19 @@ var HeadingAnalyzer = () => {
2264
2415
  children: [
2265
2416
  "Heading analyzer styles not loaded. Please review the",
2266
2417
  " ",
2267
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("a", { href: "https://github.com/measuredco/puck/blob/main/packages/plugin-heading-analyzer/README.md", children: "README" }),
2418
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("a", { href: "https://github.com/measuredco/puck/blob/main/packages/plugin-heading-analyzer/README.md", children: "README" }),
2268
2419
  "."
2269
2420
  ]
2270
2421
  }
2271
2422
  ),
2272
- hierarchy.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { children: "No headings." }),
2273
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(OutlineList, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
2423
+ hierarchy.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { children: "No headings." }),
2424
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(OutlineList, { children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
2274
2425
  ReactFromJSON,
2275
2426
  {
2276
2427
  mapping: {
2277
- Root: (props) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_jsx_runtime2.Fragment, { children: props.children }),
2278
- OutlineListItem: (props) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(OutlineList.Item, { children: [
2279
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(OutlineList.Clickable, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
2428
+ Root: (props) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_jsx_runtime5.Fragment, { children: props.children }),
2429
+ OutlineListItem: (props) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(OutlineList.Item, { children: [
2430
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(OutlineList.Clickable, { children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
2280
2431
  "small",
2281
2432
  {
2282
2433
  className: getClassNameItem2({ missing: props.missing }),
@@ -2294,14 +2445,14 @@ var HeadingAnalyzer = () => {
2294
2445
  }, 2e3);
2295
2446
  }
2296
2447
  },
2297
- children: props.missing ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
2298
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("b", { children: [
2448
+ children: props.missing ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
2449
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("b", { children: [
2299
2450
  "H",
2300
2451
  props.rank
2301
2452
  ] }),
2302
2453
  ": Missing"
2303
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
2304
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("b", { children: [
2454
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
2455
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("b", { children: [
2305
2456
  "H",
2306
2457
  props.rank
2307
2458
  ] }),
@@ -2310,7 +2461,7 @@ var HeadingAnalyzer = () => {
2310
2461
  ] })
2311
2462
  }
2312
2463
  ) }),
2313
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(OutlineList, { children: props.children })
2464
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(OutlineList, { children: props.children })
2314
2465
  ] })
2315
2466
  },
2316
2467
  entry: {
@@ -2331,10 +2482,12 @@ var HeadingAnalyzer = () => {
2331
2482
  ] });
2332
2483
  };
2333
2484
  var headingAnalyzer = {
2334
- name: "heading-analyzer",
2335
- label: "Audit",
2336
- render: HeadingAnalyzer,
2337
- icon: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Heading1, {})
2485
+ overrides: {
2486
+ fields: ({ children, itemSelector }) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
2487
+ children,
2488
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: { display: itemSelector ? "none" : "block" }, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SidebarSection, { title: "Heading Outline", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(HeadingAnalyzer, {}) }) })
2489
+ ] })
2490
+ }
2338
2491
  };
2339
2492
  var HeadingAnalyzer_default = headingAnalyzer;
2340
2493
  /*! Bundled license information:
@@ -2378,7 +2531,7 @@ lucide-react/dist/esm/createLucideIcon.js:
2378
2531
  * See the LICENSE file in the root directory of this source tree.
2379
2532
  *)
2380
2533
 
2381
- lucide-react/dist/esm/icons/heading-1.js:
2534
+ lucide-react/dist/esm/icons/chevron-right.js:
2382
2535
  (**
2383
2536
  * @license lucide-react v0.468.0 - ISC
2384
2537
  *