@measured/puck-plugin-heading-analyzer 0.21.0-canary.bd7b613d → 0.21.0-canary.c6d4e0ec

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
@@ -269,17 +269,17 @@ import { useEffect as useEffect5, useState } from "react";
269
269
 
270
270
  // css-module:/home/runner/work/puck/puck/packages/plugin-heading-analyzer/src/HeadingAnalyzer.module.css#css-module
271
271
  init_react_import();
272
- var HeadingAnalyzer_module_default = { "HeadingAnalyzer": "_HeadingAnalyzer_yg0s7_1", "HeadingAnalyzer-cssWarning": "_HeadingAnalyzer-cssWarning_yg0s7_6", "HeadingAnalyzerItem": "_HeadingAnalyzerItem_yg0s7_10", "HeadingAnalyzerItem--missing": "_HeadingAnalyzerItem--missing_yg0s7_14" };
272
+ var HeadingAnalyzer_module_default = { "HeadingAnalyzer": "_HeadingAnalyzer_116v6_1", "HeadingAnalyzer-cssWarning": "_HeadingAnalyzer-cssWarning_116v6_5", "HeadingAnalyzerItem": "_HeadingAnalyzerItem_116v6_9", "HeadingAnalyzerItem--missing": "_HeadingAnalyzerItem--missing_116v6_13" };
273
273
 
274
274
  // src/HeadingAnalyzer.tsx
275
275
  import { createUsePuck } from "@measured/puck";
276
276
 
277
- // ../core/components/OutlineList/index.tsx
277
+ // ../core/components/SidebarSection/index.tsx
278
278
  init_react_import();
279
279
 
280
- // css-module:/home/runner/work/puck/puck/packages/core/components/OutlineList/styles.module.css#css-module
280
+ // css-module:/home/runner/work/puck/puck/packages/core/components/SidebarSection/styles.module.css#css-module
281
281
  init_react_import();
282
- var styles_module_default = { "OutlineList": "_OutlineList_w4lzv_1", "OutlineListItem": "_OutlineListItem_w4lzv_25", "OutlineListItem--clickable": "_OutlineListItem--clickable_w4lzv_45" };
282
+ 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" };
283
283
 
284
284
  // ../core/lib/get-class-name-factory.ts
285
285
  init_react_import();
@@ -308,50 +308,29 @@ var getClassNameFactory = (rootClass, styles, config = { baseClass: "" }) => (op
308
308
  };
309
309
  var get_class_name_factory_default = getClassNameFactory;
310
310
 
311
- // ../core/components/OutlineList/index.tsx
311
+ // ../core/components/Heading/index.tsx
312
+ init_react_import();
313
+
314
+ // css-module:/home/runner/work/puck/puck/packages/core/components/Heading/styles.module.css#css-module
315
+ init_react_import();
316
+ 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" };
317
+
318
+ // ../core/components/Heading/index.tsx
312
319
  import { jsx } from "react/jsx-runtime";
313
- var getClassName = get_class_name_factory_default("OutlineList", styles_module_default);
314
- var getClassNameItem = get_class_name_factory_default("OutlineListItem", styles_module_default);
315
- var OutlineList = ({ children }) => {
316
- return /* @__PURE__ */ jsx("ul", { className: getClassName(), children });
317
- };
318
- OutlineList.Clickable = ({ children }) => /* @__PURE__ */ jsx("div", { className: getClassNameItem({ clickable: true }), children });
319
- OutlineList.Item = ({
320
- children,
321
- onClick
322
- }) => {
320
+ var getClassName = get_class_name_factory_default("Heading", styles_module_default2);
321
+ var Heading = ({ children, rank, size = "m" }) => {
322
+ const Tag = rank ? `h${rank}` : "span";
323
323
  return /* @__PURE__ */ jsx(
324
- "li",
324
+ Tag,
325
325
  {
326
- className: getClassNameItem({ clickable: !!onClick }),
327
- onClick,
326
+ className: getClassName({
327
+ [size]: true
328
+ }),
328
329
  children
329
330
  }
330
331
  );
331
332
  };
332
333
 
333
- // ../core/lib/scroll-into-view.ts
334
- init_react_import();
335
- var scrollIntoView = (el) => {
336
- const oldStyle = __spreadValues({}, el.style);
337
- el.style.scrollMargin = "256px";
338
- if (el) {
339
- el == null ? void 0 : el.scrollIntoView({ behavior: "smooth" });
340
- el.style.scrollMargin = oldStyle.scrollMargin || "";
341
- }
342
- };
343
-
344
- // ../core/lib/get-frame.ts
345
- init_react_import();
346
- var getFrame = () => {
347
- if (typeof window === "undefined") return;
348
- let frameEl = document.querySelector("#preview-frame");
349
- if ((frameEl == null ? void 0 : frameEl.tagName) === "IFRAME") {
350
- return frameEl.contentDocument || document;
351
- }
352
- return (frameEl == null ? void 0 : frameEl.ownerDocument) || document;
353
- };
354
-
355
334
  // ../../node_modules/lucide-react/dist/esm/lucide-react.js
356
335
  init_react_import();
357
336
 
@@ -439,29 +418,15 @@ var createLucideIcon = (iconName, iconNode) => {
439
418
  return Component;
440
419
  };
441
420
 
442
- // ../../node_modules/lucide-react/dist/esm/icons/heading-1.js
421
+ // ../../node_modules/lucide-react/dist/esm/icons/chevron-right.js
443
422
  init_react_import();
444
- var Heading1 = createLucideIcon("Heading1", [
445
- ["path", { d: "M4 12h8", key: "17cfdx" }],
446
- ["path", { d: "M4 18V6", key: "1rz3zl" }],
447
- ["path", { d: "M12 18V6", key: "zqpxq5" }],
448
- ["path", { d: "m17 12 3-2v8", key: "1hhhft" }]
423
+ var ChevronRight = createLucideIcon("ChevronRight", [
424
+ ["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]
449
425
  ]);
450
426
 
451
- // ../core/lib/index.ts
452
- init_react_import();
453
-
454
- // ../core/lib/filter.ts
455
- init_react_import();
456
-
457
- // ../core/lib/data/reorder.ts
458
- init_react_import();
459
-
460
- // ../core/lib/data/replace.ts
461
- init_react_import();
462
-
463
- // ../core/lib/use-reset-auto-zoom.ts
427
+ // ../core/lib/use-breadcrumbs.ts
464
428
  init_react_import();
429
+ import { useMemo } from "react";
465
430
 
466
431
  // ../core/store/index.ts
467
432
  init_react_import();
@@ -532,32 +497,27 @@ var walkField = ({
532
497
  config,
533
498
  recurseSlots = false
534
499
  }) => {
535
- var _a, _b, _c, _d;
500
+ var _a, _b, _c;
536
501
  const fieldType = (_a = fields[propKey]) == null ? void 0 : _a.type;
537
502
  const map = mappers[fieldType];
538
503
  if (map && fieldType === "slot") {
539
504
  const content = value || [];
540
- let mappedContent = content;
541
- if (recurseSlots) {
542
- for (let i = 0; i < content.length; i++) {
543
- const el = content[i];
544
- const componentConfig = config.components[el.type];
545
- if (!componentConfig) {
546
- continue;
547
- }
548
- const fields2 = (_b = componentConfig.fields) != null ? _b : {};
549
- mappedContent.push(
550
- walkField({
551
- value: __spreadProps(__spreadValues({}, el), { props: defaultSlots(el.props, fields2) }),
552
- fields: fields2,
553
- mappers,
554
- id: el.props.id,
555
- config,
556
- recurseSlots
557
- })
558
- );
505
+ const mappedContent = recurseSlots ? content.map((el) => {
506
+ var _a2;
507
+ const componentConfig = config.components[el.type];
508
+ if (!componentConfig) {
509
+ throw new Error(`Could not find component config for ${el.type}`);
559
510
  }
560
- }
511
+ const fields2 = (_a2 = componentConfig.fields) != null ? _a2 : {};
512
+ return walkField({
513
+ value: __spreadProps(__spreadValues({}, el), { props: defaultSlots(el.props, fields2) }),
514
+ fields: fields2,
515
+ mappers,
516
+ id: el.props.id,
517
+ config,
518
+ recurseSlots
519
+ });
520
+ }) : content;
561
521
  if (containsPromise(mappedContent)) {
562
522
  return Promise.all(mappedContent);
563
523
  }
@@ -579,7 +539,7 @@ var walkField = ({
579
539
  }
580
540
  if (value && typeof value === "object") {
581
541
  if (Array.isArray(value)) {
582
- const arrayFields = ((_c = fields[propKey]) == null ? void 0 : _c.type) === "array" ? fields[propKey].arrayFields : null;
542
+ const arrayFields = ((_b = fields[propKey]) == null ? void 0 : _b.type) === "array" ? fields[propKey].arrayFields : null;
583
543
  if (!arrayFields) return value;
584
544
  const newValue = value.map(
585
545
  (el, idx) => walkField({
@@ -600,7 +560,7 @@ var walkField = ({
600
560
  } else if ("$$typeof" in value) {
601
561
  return value;
602
562
  } else {
603
- const objectFields = ((_d = fields[propKey]) == null ? void 0 : _d.type) === "object" ? fields[propKey].objectFields : fields;
563
+ const objectFields = ((_c = fields[propKey]) == null ? void 0 : _c.type) === "object" ? fields[propKey].objectFields : fields;
604
564
  return walkObject({
605
565
  value,
606
566
  fields: objectFields,
@@ -1436,8 +1396,7 @@ init_react_import();
1436
1396
  var defaultViewports = [
1437
1397
  { width: 360, height: "auto", icon: "Smartphone", label: "Small" },
1438
1398
  { width: 768, height: "auto", icon: "Tablet", label: "Medium" },
1439
- { width: 1280, height: "auto", icon: "Monitor", label: "Large" },
1440
- { width: "100%", height: "auto", icon: "FullWidth", label: "Full-width" }
1399
+ { width: 1280, height: "auto", icon: "Monitor", label: "Large" }
1441
1400
  ];
1442
1401
 
1443
1402
  // ../../node_modules/zustand/esm/vanilla.mjs
@@ -2333,8 +2292,7 @@ var defaultAppState = {
2333
2292
  options: [],
2334
2293
  controlsVisible: true
2335
2294
  },
2336
- field: { focus: null },
2337
- plugin: { current: null }
2295
+ field: { focus: null }
2338
2296
  },
2339
2297
  indexes: {
2340
2298
  nodes: {},
@@ -2350,7 +2308,6 @@ var createAppStore = (initialAppStore) => create()(
2350
2308
  subscribeWithSelector((set, get) => {
2351
2309
  var _a, _b;
2352
2310
  return __spreadProps(__spreadValues({
2353
- instanceId: generateId(),
2354
2311
  state: defaultAppState,
2355
2312
  config: { components: {} },
2356
2313
  componentState: {},
@@ -2521,14 +2478,203 @@ var createAppStore = (initialAppStore) => create()(
2521
2478
  })
2522
2479
  );
2523
2480
  var appStoreContext = createContext(createAppStore());
2481
+ function useAppStore(selector) {
2482
+ const context = useContext(appStoreContext);
2483
+ return useStore(context, selector);
2484
+ }
2485
+ function useAppStoreApi() {
2486
+ return useContext(appStoreContext);
2487
+ }
2488
+
2489
+ // ../core/lib/use-breadcrumbs.ts
2490
+ var useBreadcrumbs = (renderCount) => {
2491
+ const selectedId = useAppStore((s) => {
2492
+ var _a;
2493
+ return (_a = s.selectedItem) == null ? void 0 : _a.props.id;
2494
+ });
2495
+ const config = useAppStore((s) => s.config);
2496
+ const path = useAppStore((s) => {
2497
+ var _a;
2498
+ return (_a = s.state.indexes.nodes[selectedId]) == null ? void 0 : _a.path;
2499
+ });
2500
+ const appStore = useAppStoreApi();
2501
+ return useMemo(() => {
2502
+ const breadcrumbs = (path == null ? void 0 : path.map((zoneCompound) => {
2503
+ var _a, _b, _c;
2504
+ const [componentId] = zoneCompound.split(":");
2505
+ if (componentId === "root") {
2506
+ return {
2507
+ label: "Page",
2508
+ selector: null
2509
+ };
2510
+ }
2511
+ const node = appStore.getState().state.indexes.nodes[componentId];
2512
+ const parentId = node.path[node.path.length - 1];
2513
+ const contentIds = ((_a = appStore.getState().state.indexes.zones[parentId]) == null ? void 0 : _a.contentIds) || [];
2514
+ const index = contentIds.indexOf(componentId);
2515
+ const label = node ? (_c = (_b = config.components[node.data.type]) == null ? void 0 : _b.label) != null ? _c : node.data.type : "Component";
2516
+ return {
2517
+ label,
2518
+ selector: node ? {
2519
+ index,
2520
+ zone: node.path[node.path.length - 1]
2521
+ } : null
2522
+ };
2523
+ })) || [];
2524
+ if (renderCount) {
2525
+ return breadcrumbs.slice(breadcrumbs.length - renderCount);
2526
+ }
2527
+ return breadcrumbs;
2528
+ }, [path, renderCount]);
2529
+ };
2530
+
2531
+ // ../core/components/Loader/index.tsx
2532
+ init_react_import();
2533
+
2534
+ // ../core/lib/index.ts
2535
+ init_react_import();
2536
+
2537
+ // ../core/lib/filter.ts
2538
+ init_react_import();
2539
+
2540
+ // ../core/lib/data/reorder.ts
2541
+ init_react_import();
2542
+
2543
+ // ../core/lib/data/replace.ts
2544
+ init_react_import();
2545
+
2546
+ // ../core/lib/use-reset-auto-zoom.ts
2547
+ init_react_import();
2524
2548
 
2525
2549
  // ../core/lib/get-zoom-config.ts
2526
2550
  init_react_import();
2527
2551
 
2552
+ // css-module:/home/runner/work/puck/puck/packages/core/components/Loader/styles.module.css#css-module
2553
+ init_react_import();
2554
+ var styles_module_default3 = { "Loader": "_Loader_nacdm_13", "loader-animation": "_loader-animation_nacdm_1" };
2555
+
2556
+ // ../core/components/Loader/index.tsx
2557
+ import { jsx as jsx2 } from "react/jsx-runtime";
2558
+ var getClassName2 = get_class_name_factory_default("Loader", styles_module_default3);
2559
+ var Loader = (_a) => {
2560
+ var _b = _a, {
2561
+ color,
2562
+ size = 16
2563
+ } = _b, props = __objRest(_b, [
2564
+ "color",
2565
+ "size"
2566
+ ]);
2567
+ return /* @__PURE__ */ jsx2(
2568
+ "span",
2569
+ __spreadValues({
2570
+ className: getClassName2(),
2571
+ style: {
2572
+ width: size,
2573
+ height: size,
2574
+ color
2575
+ },
2576
+ "aria-label": "loading"
2577
+ }, props)
2578
+ );
2579
+ };
2580
+
2581
+ // ../core/components/SidebarSection/index.tsx
2582
+ import { jsx as jsx3, jsxs } from "react/jsx-runtime";
2583
+ var getClassName3 = get_class_name_factory_default("SidebarSection", styles_module_default);
2584
+ var SidebarSection = ({
2585
+ children,
2586
+ title,
2587
+ background,
2588
+ showBreadcrumbs,
2589
+ noBorderTop,
2590
+ noPadding,
2591
+ isLoading
2592
+ }) => {
2593
+ const setUi = useAppStore((s) => s.setUi);
2594
+ const breadcrumbs = useBreadcrumbs(1);
2595
+ return /* @__PURE__ */ jsxs(
2596
+ "div",
2597
+ {
2598
+ className: getClassName3({ noBorderTop, noPadding }),
2599
+ style: { background },
2600
+ children: [
2601
+ /* @__PURE__ */ jsx3("div", { className: getClassName3("title"), children: /* @__PURE__ */ jsxs("div", { className: getClassName3("breadcrumbs"), children: [
2602
+ showBreadcrumbs ? breadcrumbs.map((breadcrumb, i) => /* @__PURE__ */ jsxs("div", { className: getClassName3("breadcrumb"), children: [
2603
+ /* @__PURE__ */ jsx3(
2604
+ "button",
2605
+ {
2606
+ type: "button",
2607
+ className: getClassName3("breadcrumbLabel"),
2608
+ onClick: () => setUi({ itemSelector: breadcrumb.selector }),
2609
+ children: breadcrumb.label
2610
+ }
2611
+ ),
2612
+ /* @__PURE__ */ jsx3(ChevronRight, { size: 16 })
2613
+ ] }, i)) : null,
2614
+ /* @__PURE__ */ jsx3("div", { className: getClassName3("heading"), children: /* @__PURE__ */ jsx3(Heading, { rank: "2", size: "xs", children: title }) })
2615
+ ] }) }),
2616
+ /* @__PURE__ */ jsx3("div", { className: getClassName3("content"), children }),
2617
+ isLoading && /* @__PURE__ */ jsx3("div", { className: getClassName3("loadingOverlay"), children: /* @__PURE__ */ jsx3(Loader, { size: 32 }) })
2618
+ ]
2619
+ }
2620
+ );
2621
+ };
2622
+
2623
+ // ../core/components/OutlineList/index.tsx
2624
+ init_react_import();
2625
+
2626
+ // css-module:/home/runner/work/puck/puck/packages/core/components/OutlineList/styles.module.css#css-module
2627
+ init_react_import();
2628
+ var styles_module_default4 = { "OutlineList": "_OutlineList_w4lzv_1", "OutlineListItem": "_OutlineListItem_w4lzv_25", "OutlineListItem--clickable": "_OutlineListItem--clickable_w4lzv_45" };
2629
+
2630
+ // ../core/components/OutlineList/index.tsx
2631
+ import { jsx as jsx4 } from "react/jsx-runtime";
2632
+ var getClassName4 = get_class_name_factory_default("OutlineList", styles_module_default4);
2633
+ var getClassNameItem = get_class_name_factory_default("OutlineListItem", styles_module_default4);
2634
+ var OutlineList = ({ children }) => {
2635
+ return /* @__PURE__ */ jsx4("ul", { className: getClassName4(), children });
2636
+ };
2637
+ OutlineList.Clickable = ({ children }) => /* @__PURE__ */ jsx4("div", { className: getClassNameItem({ clickable: true }), children });
2638
+ OutlineList.Item = ({
2639
+ children,
2640
+ onClick
2641
+ }) => {
2642
+ return /* @__PURE__ */ jsx4(
2643
+ "li",
2644
+ {
2645
+ className: getClassNameItem({ clickable: !!onClick }),
2646
+ onClick,
2647
+ children
2648
+ }
2649
+ );
2650
+ };
2651
+
2652
+ // ../core/lib/scroll-into-view.ts
2653
+ init_react_import();
2654
+ var scrollIntoView = (el) => {
2655
+ const oldStyle = __spreadValues({}, el.style);
2656
+ el.style.scrollMargin = "256px";
2657
+ if (el) {
2658
+ el == null ? void 0 : el.scrollIntoView({ behavior: "smooth" });
2659
+ el.style.scrollMargin = oldStyle.scrollMargin || "";
2660
+ }
2661
+ };
2662
+
2663
+ // ../core/lib/get-frame.ts
2664
+ init_react_import();
2665
+ var getFrame = () => {
2666
+ if (typeof window === "undefined") return;
2667
+ let frameEl = document.querySelector("#preview-frame");
2668
+ if ((frameEl == null ? void 0 : frameEl.tagName) === "IFRAME") {
2669
+ return frameEl.contentDocument || document;
2670
+ }
2671
+ return (frameEl == null ? void 0 : frameEl.ownerDocument) || document;
2672
+ };
2673
+
2528
2674
  // src/HeadingAnalyzer.tsx
2529
2675
  import ReactFromJSONModule from "react-from-json";
2530
- import { Fragment, jsx as jsx2, jsxs } from "react/jsx-runtime";
2531
- var getClassName2 = get_class_name_factory_default("HeadingAnalyzer", HeadingAnalyzer_module_default);
2676
+ import { Fragment, jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
2677
+ var getClassName5 = get_class_name_factory_default("HeadingAnalyzer", HeadingAnalyzer_module_default);
2532
2678
  var getClassNameItem2 = get_class_name_factory_default("HeadingAnalyzerItem", HeadingAnalyzer_module_default);
2533
2679
  var ReactFromJSON = ReactFromJSONModule.default || ReactFromJSONModule;
2534
2680
  var getOutline = ({ frame } = {}) => {
@@ -2619,11 +2765,11 @@ var HeadingAnalyzer = () => {
2619
2765
  frameObserver.disconnect();
2620
2766
  };
2621
2767
  }, [data]);
2622
- return /* @__PURE__ */ jsxs("div", { className: getClassName2(), children: [
2623
- /* @__PURE__ */ jsxs(
2768
+ return /* @__PURE__ */ jsxs2("div", { className: getClassName5(), children: [
2769
+ /* @__PURE__ */ jsxs2(
2624
2770
  "small",
2625
2771
  {
2626
- className: getClassName2("cssWarning"),
2772
+ className: getClassName5("cssWarning"),
2627
2773
  style: {
2628
2774
  color: "var(--puck-color-red-04)",
2629
2775
  display: "block",
@@ -2632,19 +2778,19 @@ var HeadingAnalyzer = () => {
2632
2778
  children: [
2633
2779
  "Heading analyzer styles not loaded. Please review the",
2634
2780
  " ",
2635
- /* @__PURE__ */ jsx2("a", { href: "https://github.com/measuredco/puck/blob/main/packages/plugin-heading-analyzer/README.md", children: "README" }),
2781
+ /* @__PURE__ */ jsx5("a", { href: "https://github.com/measuredco/puck/blob/main/packages/plugin-heading-analyzer/README.md", children: "README" }),
2636
2782
  "."
2637
2783
  ]
2638
2784
  }
2639
2785
  ),
2640
- hierarchy.length === 0 && /* @__PURE__ */ jsx2("div", { children: "No headings." }),
2641
- /* @__PURE__ */ jsx2(OutlineList, { children: /* @__PURE__ */ jsx2(
2786
+ hierarchy.length === 0 && /* @__PURE__ */ jsx5("div", { children: "No headings." }),
2787
+ /* @__PURE__ */ jsx5(OutlineList, { children: /* @__PURE__ */ jsx5(
2642
2788
  ReactFromJSON,
2643
2789
  {
2644
2790
  mapping: {
2645
- Root: (props) => /* @__PURE__ */ jsx2(Fragment, { children: props.children }),
2646
- OutlineListItem: (props) => /* @__PURE__ */ jsxs(OutlineList.Item, { children: [
2647
- /* @__PURE__ */ jsx2(OutlineList.Clickable, { children: /* @__PURE__ */ jsx2(
2791
+ Root: (props) => /* @__PURE__ */ jsx5(Fragment, { children: props.children }),
2792
+ OutlineListItem: (props) => /* @__PURE__ */ jsxs2(OutlineList.Item, { children: [
2793
+ /* @__PURE__ */ jsx5(OutlineList.Clickable, { children: /* @__PURE__ */ jsx5(
2648
2794
  "small",
2649
2795
  {
2650
2796
  className: getClassNameItem2({ missing: props.missing }),
@@ -2662,14 +2808,14 @@ var HeadingAnalyzer = () => {
2662
2808
  }, 2e3);
2663
2809
  }
2664
2810
  },
2665
- children: props.missing ? /* @__PURE__ */ jsxs(Fragment, { children: [
2666
- /* @__PURE__ */ jsxs("b", { children: [
2811
+ children: props.missing ? /* @__PURE__ */ jsxs2(Fragment, { children: [
2812
+ /* @__PURE__ */ jsxs2("b", { children: [
2667
2813
  "H",
2668
2814
  props.rank
2669
2815
  ] }),
2670
2816
  ": Missing"
2671
- ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
2672
- /* @__PURE__ */ jsxs("b", { children: [
2817
+ ] }) : /* @__PURE__ */ jsxs2(Fragment, { children: [
2818
+ /* @__PURE__ */ jsxs2("b", { children: [
2673
2819
  "H",
2674
2820
  props.rank
2675
2821
  ] }),
@@ -2678,7 +2824,7 @@ var HeadingAnalyzer = () => {
2678
2824
  ] })
2679
2825
  }
2680
2826
  ) }),
2681
- /* @__PURE__ */ jsx2(OutlineList, { children: props.children })
2827
+ /* @__PURE__ */ jsx5(OutlineList, { children: props.children })
2682
2828
  ] })
2683
2829
  },
2684
2830
  entry: {
@@ -2699,10 +2845,12 @@ var HeadingAnalyzer = () => {
2699
2845
  ] });
2700
2846
  };
2701
2847
  var headingAnalyzer = {
2702
- name: "heading-analyzer",
2703
- label: "Audit",
2704
- render: HeadingAnalyzer,
2705
- icon: /* @__PURE__ */ jsx2(Heading1, {})
2848
+ overrides: {
2849
+ fields: ({ children, itemSelector }) => /* @__PURE__ */ jsxs2(Fragment, { children: [
2850
+ children,
2851
+ /* @__PURE__ */ jsx5("div", { style: { display: itemSelector ? "none" : "block" }, children: /* @__PURE__ */ jsx5(SidebarSection, { title: "Heading Outline", children: /* @__PURE__ */ jsx5(HeadingAnalyzer, {}) }) })
2852
+ ] })
2853
+ }
2706
2854
  };
2707
2855
  var HeadingAnalyzer_default = headingAnalyzer;
2708
2856
  export {
@@ -2749,7 +2897,7 @@ lucide-react/dist/esm/createLucideIcon.js:
2749
2897
  * See the LICENSE file in the root directory of this source tree.
2750
2898
  *)
2751
2899
 
2752
- lucide-react/dist/esm/icons/heading-1.js:
2900
+ lucide-react/dist/esm/icons/chevron-right.js:
2753
2901
  (**
2754
2902
  * @license lucide-react v0.468.0 - ISC
2755
2903
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@measured/puck-plugin-heading-analyzer",
3
- "version": "0.21.0-canary.bd7b613d",
3
+ "version": "0.21.0-canary.c6d4e0ec",
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.21.0-canary.bd7b613d",
28
+ "@measured/puck": "^0.21.0-canary.c6d4e0ec",
29
29
  "@types/react": "^19.0.1",
30
30
  "@types/react-dom": "^19.0.2",
31
31
  "eslint": "^7.32.0",