@measured/puck-plugin-heading-analyzer 0.16.0-canary.04fd6c5 → 0.16.0-canary.1beaf6b
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 +112 -102
- package/package.json +2 -2
package/dist/index.js
CHANGED
@@ -51483,7 +51483,7 @@ var require_dist = __commonJS({
|
|
51483
51483
|
var HostPortal = 4;
|
51484
51484
|
var HostComponent = 5;
|
51485
51485
|
var HostText = 6;
|
51486
|
-
var
|
51486
|
+
var Fragment20 = 7;
|
51487
51487
|
var Mode = 8;
|
51488
51488
|
var ContextConsumer = 9;
|
51489
51489
|
var ContextProvider = 10;
|
@@ -52639,7 +52639,7 @@ var require_dist = __commonJS({
|
|
52639
52639
|
return "DehydratedFragment";
|
52640
52640
|
case ForwardRef:
|
52641
52641
|
return getWrappedName$1(type, type.render, "ForwardRef");
|
52642
|
-
case
|
52642
|
+
case Fragment20:
|
52643
52643
|
return "Fragment";
|
52644
52644
|
case HostComponent:
|
52645
52645
|
return type;
|
@@ -62290,7 +62290,7 @@ var require_dist = __commonJS({
|
|
62290
62290
|
}
|
62291
62291
|
}
|
62292
62292
|
function updateFragment2(returnFiber, current2, fragment, lanes, key) {
|
62293
|
-
if (current2 === null || current2.tag !==
|
62293
|
+
if (current2 === null || current2.tag !== Fragment20) {
|
62294
62294
|
var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);
|
62295
62295
|
created.return = returnFiber;
|
62296
62296
|
return created;
|
@@ -62693,7 +62693,7 @@ var require_dist = __commonJS({
|
|
62693
62693
|
if (child.key === key) {
|
62694
62694
|
var elementType = element.type;
|
62695
62695
|
if (elementType === REACT_FRAGMENT_TYPE) {
|
62696
|
-
if (child.tag ===
|
62696
|
+
if (child.tag === Fragment20) {
|
62697
62697
|
deleteRemainingChildren(returnFiber, child.sibling);
|
62698
62698
|
var existing = useFiber(child, element.props.children);
|
62699
62699
|
existing.return = returnFiber;
|
@@ -66868,7 +66868,7 @@ var require_dist = __commonJS({
|
|
66868
66868
|
var _resolvedProps2 = workInProgress2.elementType === type ? _unresolvedProps2 : resolveDefaultProps(type, _unresolvedProps2);
|
66869
66869
|
return updateForwardRef(current2, workInProgress2, type, _resolvedProps2, renderLanes2);
|
66870
66870
|
}
|
66871
|
-
case
|
66871
|
+
case Fragment20:
|
66872
66872
|
return updateFragment(current2, workInProgress2, renderLanes2);
|
66873
66873
|
case Mode:
|
66874
66874
|
return updateMode(current2, workInProgress2, renderLanes2);
|
@@ -67140,7 +67140,7 @@ var require_dist = __commonJS({
|
|
67140
67140
|
case SimpleMemoComponent:
|
67141
67141
|
case FunctionComponent:
|
67142
67142
|
case ForwardRef:
|
67143
|
-
case
|
67143
|
+
case Fragment20:
|
67144
67144
|
case Mode:
|
67145
67145
|
case Profiler:
|
67146
67146
|
case ContextConsumer:
|
@@ -71391,7 +71391,7 @@ var require_dist = __commonJS({
|
|
71391
71391
|
return fiber;
|
71392
71392
|
}
|
71393
71393
|
function createFiberFromFragment(elements, mode, lanes, key) {
|
71394
|
-
var fiber = createFiber(
|
71394
|
+
var fiber = createFiber(Fragment20, elements, key, mode);
|
71395
71395
|
fiber.lanes = lanes;
|
71396
71396
|
return fiber;
|
71397
71397
|
}
|
@@ -74736,7 +74736,7 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
|
|
74736
74736
|
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(DropZoneRender, __spreadValues2({}, props));
|
74737
74737
|
}
|
74738
74738
|
init_react_import2();
|
74739
|
-
var
|
74739
|
+
var import_react31 = require("react");
|
74740
74740
|
init_react_import2();
|
74741
74741
|
var import_react17 = require("react");
|
74742
74742
|
init_react_import2();
|
@@ -76272,35 +76272,6 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
|
|
76272
76272
|
] }) }) });
|
76273
76273
|
};
|
76274
76274
|
init_react_import2();
|
76275
|
-
var loadOverrides = ({
|
76276
|
-
overrides,
|
76277
|
-
plugins
|
76278
|
-
}) => {
|
76279
|
-
const collected = __spreadValues2({}, overrides);
|
76280
|
-
plugins.forEach((plugin) => {
|
76281
|
-
Object.keys(plugin.overrides).forEach((overridesType) => {
|
76282
|
-
if (overridesType === "fieldTypes") {
|
76283
|
-
const fieldTypes = plugin.overrides.fieldTypes;
|
76284
|
-
Object.keys(fieldTypes).forEach((fieldType) => {
|
76285
|
-
collected.fieldTypes = collected.fieldTypes || {};
|
76286
|
-
const childNode2 = collected.fieldTypes[fieldType];
|
76287
|
-
const Comp2 = (props) => fieldTypes[fieldType](__spreadProps2(__spreadValues2({}, props), {
|
76288
|
-
children: childNode2 ? childNode2(props) : props.children
|
76289
|
-
}));
|
76290
|
-
collected.fieldTypes[fieldType] = Comp2;
|
76291
|
-
});
|
76292
|
-
return;
|
76293
|
-
}
|
76294
|
-
const childNode = collected[overridesType];
|
76295
|
-
const Comp = (props) => plugin.overrides[overridesType](__spreadProps2(__spreadValues2({}, props), {
|
76296
|
-
children: childNode ? childNode(props) : props.children
|
76297
|
-
}));
|
76298
|
-
collected[overridesType] = Comp;
|
76299
|
-
});
|
76300
|
-
});
|
76301
|
-
return collected;
|
76302
|
-
};
|
76303
|
-
init_react_import2();
|
76304
76275
|
var import_react_hotkeys_hook = (init_react_hotkeys_hook_esm(), __toCommonJS(react_hotkeys_hook_esm_exports));
|
76305
76276
|
function usePuckHistory({
|
76306
76277
|
dispatch,
|
@@ -76828,7 +76799,49 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
|
|
76828
76799
|
ui: __spreadProps2(__spreadValues2({}, state.ui), { itemSelector })
|
76829
76800
|
});
|
76830
76801
|
};
|
76802
|
+
init_react_import2();
|
76803
|
+
var import_react30 = require("react");
|
76804
|
+
init_react_import2();
|
76805
|
+
var loadOverrides = ({
|
76806
|
+
overrides,
|
76807
|
+
plugins
|
76808
|
+
}) => {
|
76809
|
+
const collected = __spreadValues2({}, overrides);
|
76810
|
+
plugins.forEach((plugin) => {
|
76811
|
+
Object.keys(plugin.overrides).forEach((overridesType) => {
|
76812
|
+
if (overridesType === "fieldTypes") {
|
76813
|
+
const fieldTypes = plugin.overrides.fieldTypes;
|
76814
|
+
Object.keys(fieldTypes).forEach((fieldType) => {
|
76815
|
+
collected.fieldTypes = collected.fieldTypes || {};
|
76816
|
+
const childNode2 = collected.fieldTypes[fieldType];
|
76817
|
+
const Comp2 = (props) => fieldTypes[fieldType](__spreadProps2(__spreadValues2({}, props), {
|
76818
|
+
children: childNode2 ? childNode2(props) : props.children
|
76819
|
+
}));
|
76820
|
+
collected.fieldTypes[fieldType] = Comp2;
|
76821
|
+
});
|
76822
|
+
return;
|
76823
|
+
}
|
76824
|
+
const childNode = collected[overridesType];
|
76825
|
+
const Comp = (props) => plugin.overrides[overridesType](__spreadProps2(__spreadValues2({}, props), {
|
76826
|
+
children: childNode ? childNode(props) : props.children
|
76827
|
+
}));
|
76828
|
+
collected[overridesType] = Comp;
|
76829
|
+
});
|
76830
|
+
});
|
76831
|
+
return collected;
|
76832
|
+
};
|
76833
|
+
var useLoadedOverrides = ({
|
76834
|
+
overrides,
|
76835
|
+
plugins
|
76836
|
+
}) => {
|
76837
|
+
return (0, import_react30.useMemo)(() => {
|
76838
|
+
return loadOverrides({ overrides, plugins });
|
76839
|
+
}, [plugins, overrides]);
|
76840
|
+
};
|
76841
|
+
init_react_import2();
|
76831
76842
|
var import_jsx_runtime37 = require("react/jsx-runtime");
|
76843
|
+
var DefaultOverride = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_jsx_runtime37.Fragment, { children });
|
76844
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
76832
76845
|
var getClassName27 = get_class_name_factory_default2("Puck", styles_module_default15);
|
76833
76846
|
var getLayoutClassName = get_class_name_factory_default2("PuckLayout", styles_module_default15);
|
76834
76847
|
function Puck({
|
@@ -76854,10 +76867,10 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
|
|
76854
76867
|
}) {
|
76855
76868
|
var _a3;
|
76856
76869
|
const historyStore = useHistoryStore(initialHistory);
|
76857
|
-
const [reducer2] = (0,
|
76870
|
+
const [reducer2] = (0, import_react31.useState)(
|
76858
76871
|
() => createReducer({ config, record: historyStore.record, onAction })
|
76859
76872
|
);
|
76860
|
-
const [initialAppState] = (0,
|
76873
|
+
const [initialAppState] = (0, import_react31.useState)(() => {
|
76861
76874
|
var _a22, _b2, _c, _d, _e, _f, _g;
|
76862
76875
|
const initial = __spreadValues2(__spreadValues2({}, defaultAppState2.ui), initialUi);
|
76863
76876
|
let clientUiState = {};
|
@@ -76915,7 +76928,7 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
|
|
76915
76928
|
})
|
76916
76929
|
});
|
76917
76930
|
});
|
76918
|
-
const [appState, dispatch] = (0,
|
76931
|
+
const [appState, dispatch] = (0, import_react31.useReducer)(
|
76919
76932
|
reducer2,
|
76920
76933
|
flushZones(initialAppState)
|
76921
76934
|
);
|
@@ -76926,9 +76939,9 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
|
|
76926
76939
|
config,
|
76927
76940
|
dispatch
|
76928
76941
|
);
|
76929
|
-
const [menuOpen, setMenuOpen] = (0,
|
76942
|
+
const [menuOpen, setMenuOpen] = (0, import_react31.useState)(false);
|
76930
76943
|
const { itemSelector, leftSideBarVisible, rightSideBarVisible } = ui;
|
76931
|
-
const setItemSelector = (0,
|
76944
|
+
const setItemSelector = (0, import_react31.useCallback)(
|
76932
76945
|
(newItemSelector) => {
|
76933
76946
|
if (newItemSelector === itemSelector) return;
|
76934
76947
|
dispatch({
|
@@ -76940,13 +76953,13 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
|
|
76940
76953
|
[itemSelector]
|
76941
76954
|
);
|
76942
76955
|
const selectedItem = itemSelector ? getItem2(itemSelector, data) : null;
|
76943
|
-
(0,
|
76956
|
+
(0, import_react31.useEffect)(() => {
|
76944
76957
|
if (onChange) onChange(data);
|
76945
76958
|
}, [data]);
|
76946
76959
|
const { onDragStartOrUpdate, placeholderStyle } = usePlaceholderStyle();
|
76947
|
-
const [draggedItem, setDraggedItem] = (0,
|
76960
|
+
const [draggedItem, setDraggedItem] = (0, import_react31.useState)();
|
76948
76961
|
const rootProps = data.root.props || data.root;
|
76949
|
-
const toggleSidebars = (0,
|
76962
|
+
const toggleSidebars = (0, import_react31.useCallback)(
|
76950
76963
|
(sidebar) => {
|
76951
76964
|
const widerViewport = window.matchMedia("(min-width: 638px)").matches;
|
76952
76965
|
const sideBarVisible = sidebar === "left" ? leftSideBarVisible : rightSideBarVisible;
|
@@ -76960,7 +76973,7 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
|
|
76960
76973
|
},
|
76961
76974
|
[dispatch, leftSideBarVisible, rightSideBarVisible]
|
76962
76975
|
);
|
76963
|
-
(0,
|
76976
|
+
(0, import_react31.useEffect)(() => {
|
76964
76977
|
if (!window.matchMedia("(min-width: 638px)").matches) {
|
76965
76978
|
dispatch({
|
76966
76979
|
type: "setUi",
|
@@ -76983,11 +76996,7 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
|
|
76983
76996
|
window.removeEventListener("resize", handleResize);
|
76984
76997
|
};
|
76985
76998
|
}, []);
|
76986
|
-
const
|
76987
|
-
const PuckDefault = ({ children: children2 }) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_jsx_runtime37.Fragment, { children: children2 });
|
76988
|
-
return PuckDefault;
|
76989
|
-
}, []);
|
76990
|
-
const defaultHeaderRender = (0, import_react30.useMemo)(() => {
|
76999
|
+
const defaultHeaderRender = (0, import_react31.useMemo)(() => {
|
76991
77000
|
if (renderHeader) {
|
76992
77001
|
console.warn(
|
76993
77002
|
"`renderHeader` is deprecated. Please use `overrides.header` and the `usePuck` hook instead"
|
@@ -76995,48 +77004,49 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
|
|
76995
77004
|
const RenderHeader = (_a22) => {
|
76996
77005
|
var _b2 = _a22, { actions } = _b2, props = __objRest2(_b2, ["actions"]);
|
76997
77006
|
const Comp = renderHeader;
|
76998
|
-
return /* @__PURE__ */ (0,
|
77007
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Comp, __spreadProps2(__spreadValues2({}, props), { dispatch, state: appState, children: actions }));
|
76999
77008
|
};
|
77000
77009
|
return RenderHeader;
|
77001
77010
|
}
|
77002
|
-
return
|
77011
|
+
return DefaultOverride;
|
77003
77012
|
}, [renderHeader]);
|
77004
|
-
const defaultHeaderActionsRender = (0,
|
77013
|
+
const defaultHeaderActionsRender = (0, import_react31.useMemo)(() => {
|
77005
77014
|
if (renderHeaderActions) {
|
77006
77015
|
console.warn(
|
77007
77016
|
"`renderHeaderActions` is deprecated. Please use `overrides.headerActions` and the `usePuck` hook instead."
|
77008
77017
|
);
|
77009
77018
|
const RenderHeader = (props) => {
|
77010
77019
|
const Comp = renderHeaderActions;
|
77011
|
-
return /* @__PURE__ */ (0,
|
77020
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Comp, __spreadProps2(__spreadValues2({}, props), { dispatch, state: appState }));
|
77012
77021
|
};
|
77013
77022
|
return RenderHeader;
|
77014
77023
|
}
|
77015
|
-
return
|
77024
|
+
return DefaultOverride;
|
77016
77025
|
}, [renderHeader]);
|
77017
|
-
const loadedOverrides = (
|
77018
|
-
|
77019
|
-
|
77020
|
-
|
77021
|
-
|
77026
|
+
const loadedOverrides = useLoadedOverrides({
|
77027
|
+
overrides,
|
77028
|
+
plugins
|
77029
|
+
});
|
77030
|
+
const CustomPuck = (0, import_react31.useMemo)(
|
77031
|
+
() => loadedOverrides.puck || DefaultOverride,
|
77022
77032
|
[loadedOverrides]
|
77023
77033
|
);
|
77024
|
-
const CustomHeader = (0,
|
77034
|
+
const CustomHeader = (0, import_react31.useMemo)(
|
77025
77035
|
() => loadedOverrides.header || defaultHeaderRender,
|
77026
77036
|
[loadedOverrides]
|
77027
77037
|
);
|
77028
|
-
const CustomHeaderActions = (0,
|
77038
|
+
const CustomHeaderActions = (0, import_react31.useMemo)(
|
77029
77039
|
() => loadedOverrides.headerActions || defaultHeaderActionsRender,
|
77030
77040
|
[loadedOverrides]
|
77031
77041
|
);
|
77032
|
-
const [mounted, setMounted] = (0,
|
77033
|
-
(0,
|
77042
|
+
const [mounted, setMounted] = (0, import_react31.useState)(false);
|
77043
|
+
(0, import_react31.useEffect)(() => {
|
77034
77044
|
setMounted(true);
|
77035
77045
|
}, []);
|
77036
77046
|
const selectedComponentConfig = selectedItem && config.components[selectedItem.type];
|
77037
77047
|
const selectedComponentLabel = selectedItem ? (_a3 = selectedComponentConfig == null ? void 0 : selectedComponentConfig["label"]) != null ? _a3 : selectedItem.type.toString() : "";
|
77038
|
-
return /* @__PURE__ */ (0,
|
77039
|
-
/* @__PURE__ */ (0,
|
77048
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: `Puck ${getClassName27()}`, children: [
|
77049
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
77040
77050
|
AppProvider,
|
77041
77051
|
{
|
77042
77052
|
value: {
|
@@ -77051,7 +77061,7 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
|
|
77051
77061
|
viewports,
|
77052
77062
|
iframe
|
77053
77063
|
},
|
77054
|
-
children: /* @__PURE__ */ (0,
|
77064
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
77055
77065
|
DragDropContext2,
|
77056
77066
|
{
|
77057
77067
|
autoScrollerOptions: { disabled: dnd == null ? void 0 : dnd.disableAutoScroll },
|
@@ -77103,7 +77113,7 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
|
|
77103
77113
|
});
|
77104
77114
|
}
|
77105
77115
|
},
|
77106
|
-
children: /* @__PURE__ */ (0,
|
77116
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
77107
77117
|
DropZoneProvider,
|
77108
77118
|
{
|
77109
77119
|
value: {
|
@@ -77117,7 +77127,7 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
|
|
77117
77127
|
mode: "edit",
|
77118
77128
|
areaId: "root"
|
77119
77129
|
},
|
77120
|
-
children: /* @__PURE__ */ (0,
|
77130
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(CustomPuck, { children: children || /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
77121
77131
|
"div",
|
77122
77132
|
{
|
77123
77133
|
className: getLayoutClassName({
|
@@ -77126,64 +77136,64 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
|
|
77126
77136
|
mounted,
|
77127
77137
|
rightSideBarVisible
|
77128
77138
|
}),
|
77129
|
-
children: /* @__PURE__ */ (0,
|
77130
|
-
/* @__PURE__ */ (0,
|
77139
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: getLayoutClassName("inner"), children: [
|
77140
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
77131
77141
|
CustomHeader,
|
77132
77142
|
{
|
77133
|
-
actions: /* @__PURE__ */ (0,
|
77143
|
+
actions: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_jsx_runtime38.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(CustomHeaderActions, { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
77134
77144
|
Button,
|
77135
77145
|
{
|
77136
77146
|
onClick: () => {
|
77137
77147
|
onPublish && onPublish(data);
|
77138
77148
|
},
|
77139
|
-
icon: /* @__PURE__ */ (0,
|
77149
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Globe, { size: "14px" }),
|
77140
77150
|
children: "Publish"
|
77141
77151
|
}
|
77142
77152
|
) }) }),
|
77143
|
-
children: /* @__PURE__ */ (0,
|
77144
|
-
/* @__PURE__ */ (0,
|
77145
|
-
/* @__PURE__ */ (0,
|
77153
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("header", { className: getLayoutClassName("header"), children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: getLayoutClassName("headerInner"), children: [
|
77154
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: getLayoutClassName("headerToggle"), children: [
|
77155
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
77146
77156
|
"div",
|
77147
77157
|
{
|
77148
77158
|
className: getLayoutClassName(
|
77149
77159
|
"leftSideBarToggle"
|
77150
77160
|
),
|
77151
|
-
children: /* @__PURE__ */ (0,
|
77161
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
77152
77162
|
IconButton,
|
77153
77163
|
{
|
77154
77164
|
onClick: () => {
|
77155
77165
|
toggleSidebars("left");
|
77156
77166
|
},
|
77157
77167
|
title: "Toggle left sidebar",
|
77158
|
-
children: /* @__PURE__ */ (0,
|
77168
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(PanelLeft, { focusable: "false" })
|
77159
77169
|
}
|
77160
77170
|
)
|
77161
77171
|
}
|
77162
77172
|
),
|
77163
|
-
/* @__PURE__ */ (0,
|
77173
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
77164
77174
|
"div",
|
77165
77175
|
{
|
77166
77176
|
className: getLayoutClassName(
|
77167
77177
|
"rightSideBarToggle"
|
77168
77178
|
),
|
77169
|
-
children: /* @__PURE__ */ (0,
|
77179
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
77170
77180
|
IconButton,
|
77171
77181
|
{
|
77172
77182
|
onClick: () => {
|
77173
77183
|
toggleSidebars("right");
|
77174
77184
|
},
|
77175
77185
|
title: "Toggle right sidebar",
|
77176
|
-
children: /* @__PURE__ */ (0,
|
77186
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(PanelRight, { focusable: "false" })
|
77177
77187
|
}
|
77178
77188
|
)
|
77179
77189
|
}
|
77180
77190
|
)
|
77181
77191
|
] }),
|
77182
|
-
/* @__PURE__ */ (0,
|
77192
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: getLayoutClassName("headerTitle"), children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Heading2, { rank: 2, size: "xs", children: [
|
77183
77193
|
headerTitle || rootProps.title || "Page",
|
77184
|
-
headerPath && /* @__PURE__ */ (0,
|
77194
|
+
headerPath && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_jsx_runtime38.Fragment, { children: [
|
77185
77195
|
" ",
|
77186
|
-
/* @__PURE__ */ (0,
|
77196
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
77187
77197
|
"code",
|
77188
77198
|
{
|
77189
77199
|
className: getLayoutClassName("headerPath"),
|
@@ -77192,18 +77202,18 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
|
|
77192
77202
|
)
|
77193
77203
|
] })
|
77194
77204
|
] }) }),
|
77195
|
-
/* @__PURE__ */ (0,
|
77196
|
-
/* @__PURE__ */ (0,
|
77205
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: getLayoutClassName("headerTools"), children: [
|
77206
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: getLayoutClassName("menuButton"), children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
77197
77207
|
IconButton,
|
77198
77208
|
{
|
77199
77209
|
onClick: () => {
|
77200
77210
|
return setMenuOpen(!menuOpen);
|
77201
77211
|
},
|
77202
77212
|
title: "Toggle menu bar",
|
77203
|
-
children: menuOpen ? /* @__PURE__ */ (0,
|
77213
|
+
children: menuOpen ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(ChevronUp, { focusable: "false" }) : /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(ChevronDown, { focusable: "false" })
|
77204
77214
|
}
|
77205
77215
|
) }),
|
77206
|
-
/* @__PURE__ */ (0,
|
77216
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
77207
77217
|
MenuBar,
|
77208
77218
|
{
|
77209
77219
|
appState,
|
@@ -77211,13 +77221,13 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
|
|
77211
77221
|
dispatch,
|
77212
77222
|
onPublish,
|
77213
77223
|
menuOpen,
|
77214
|
-
renderHeaderActions: () => /* @__PURE__ */ (0,
|
77224
|
+
renderHeaderActions: () => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(CustomHeaderActions, { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
77215
77225
|
Button,
|
77216
77226
|
{
|
77217
77227
|
onClick: () => {
|
77218
77228
|
onPublish && onPublish(data);
|
77219
77229
|
},
|
77220
|
-
icon: /* @__PURE__ */ (0,
|
77230
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Globe, { size: "14px" }),
|
77221
77231
|
children: "Publish"
|
77222
77232
|
}
|
77223
77233
|
) }),
|
@@ -77228,19 +77238,19 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
|
|
77228
77238
|
] }) })
|
77229
77239
|
}
|
77230
77240
|
),
|
77231
|
-
/* @__PURE__ */ (0,
|
77232
|
-
/* @__PURE__ */ (0,
|
77233
|
-
/* @__PURE__ */ (0,
|
77241
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: getLayoutClassName("leftSideBar"), children: [
|
77242
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(SidebarSection2, { title: "Components", noBorderTop: true, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Components, {}) }),
|
77243
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(SidebarSection2, { title: "Outline", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Outline, {}) })
|
77234
77244
|
] }),
|
77235
|
-
/* @__PURE__ */ (0,
|
77236
|
-
/* @__PURE__ */ (0,
|
77245
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Canvas, {}),
|
77246
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: getLayoutClassName("rightSideBar"), children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
77237
77247
|
SidebarSection2,
|
77238
77248
|
{
|
77239
77249
|
noPadding: true,
|
77240
77250
|
noBorderTop: true,
|
77241
77251
|
showBreadcrumbs: true,
|
77242
77252
|
title: selectedItem ? selectedComponentLabel : "Page",
|
77243
|
-
children: /* @__PURE__ */ (0,
|
77253
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Fields, {})
|
77244
77254
|
}
|
77245
77255
|
) })
|
77246
77256
|
] })
|
@@ -77252,7 +77262,7 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
|
|
77252
77262
|
)
|
77253
77263
|
}
|
77254
77264
|
),
|
77255
|
-
/* @__PURE__ */ (0,
|
77265
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { id: "puck-portal-root", className: getClassName27("portal") })
|
77256
77266
|
] });
|
77257
77267
|
}
|
77258
77268
|
Puck.Components = Components;
|
@@ -77260,7 +77270,7 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
|
|
77260
77270
|
Puck.Outline = Outline;
|
77261
77271
|
Puck.Preview = Preview;
|
77262
77272
|
init_react_import2();
|
77263
|
-
var
|
77273
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
77264
77274
|
function Render({
|
77265
77275
|
config,
|
77266
77276
|
data
|
@@ -77273,7 +77283,7 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
|
|
77273
77283
|
const rootProps = defaultedData.root.props || defaultedData.root;
|
77274
77284
|
const title = (rootProps == null ? void 0 : rootProps.title) || "";
|
77275
77285
|
if ((_a3 = config.root) == null ? void 0 : _a3.render) {
|
77276
|
-
return /* @__PURE__ */ (0,
|
77286
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DropZoneProvider, { value: { data: defaultedData, config, mode: "render" }, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
77277
77287
|
config.root.render,
|
77278
77288
|
__spreadProps2(__spreadValues2({}, rootProps), {
|
77279
77289
|
puck: {
|
@@ -77283,11 +77293,11 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
|
|
77283
77293
|
title,
|
77284
77294
|
editMode: false,
|
77285
77295
|
id: "puck-root",
|
77286
|
-
children: /* @__PURE__ */ (0,
|
77296
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DropZone, { zone: rootDroppableId2 })
|
77287
77297
|
})
|
77288
77298
|
) });
|
77289
77299
|
}
|
77290
|
-
return /* @__PURE__ */ (0,
|
77300
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DropZoneProvider, { value: { data: defaultedData, config, mode: "render" }, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DropZone, { zone: rootDroppableId2 }) });
|
77291
77301
|
}
|
77292
77302
|
init_react_import2();
|
77293
77303
|
var migrations = [
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@measured/puck-plugin-heading-analyzer",
|
3
|
-
"version": "0.16.0-canary.
|
3
|
+
"version": "0.16.0-canary.1beaf6b",
|
4
4
|
"author": "Measured Corporation Ltd <hello@measured.co>",
|
5
5
|
"repository": "measuredco/puck",
|
6
6
|
"bugs": "https://github.com/measuredco/puck/issues",
|
@@ -18,7 +18,7 @@
|
|
18
18
|
"dist"
|
19
19
|
],
|
20
20
|
"devDependencies": {
|
21
|
-
"@measured/puck": "^0.16.0-canary.
|
21
|
+
"@measured/puck": "^0.16.0-canary.1beaf6b",
|
22
22
|
"@types/react": "^18.2.0",
|
23
23
|
"@types/react-dom": "^18.2.0",
|
24
24
|
"eslint": "^7.32.0",
|