@measured/puck-plugin-heading-analyzer 0.14.2 → 0.14.3-canary.9a1cc7c

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.
Files changed (2) hide show
  1. package/dist/index.js +10 -6
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -75833,7 +75833,7 @@ var require_dist2 = __commonJS({
75833
75833
  var import_ua_parser_js2 = require_ua_parser();
75834
75834
  var import_jsx_runtime22 = require("react/jsx-runtime");
75835
75835
  var defaultAppState2 = {
75836
- data: { content: [], root: { props: { title: "" } } },
75836
+ data: { content: [], root: { props: {} } },
75837
75837
  ui: {
75838
75838
  leftSideBarVisible: true,
75839
75839
  rightSideBarVisible: true,
@@ -77652,7 +77652,7 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
77652
77652
  var getClassName9 = get_class_name_factory_default2("MenuBar", styles_module_default7);
77653
77653
  var MenuBar = ({
77654
77654
  appState,
77655
- data = { content: [], root: { props: { title: "" } } },
77655
+ data = { content: [], root: {} },
77656
77656
  dispatch,
77657
77657
  menuOpen = false,
77658
77658
  onPublish,
@@ -79644,7 +79644,7 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
79644
79644
  function Puck({
79645
79645
  children,
79646
79646
  config,
79647
- data: initialData = { content: [], root: { props: { title: "" } } },
79647
+ data: initialData = { content: [], root: {} },
79648
79648
  ui: initialUi,
79649
79649
  onChange,
79650
79650
  onPublish,
@@ -79666,7 +79666,7 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
79666
79666
  () => createReducer({ config, record: historyStore.record })
79667
79667
  );
79668
79668
  const [initialAppState] = (0, import_react28.useState)(() => {
79669
- var _a22, _b, _c, _d;
79669
+ var _a22, _b, _c, _d, _e;
79670
79670
  const initial = __spreadValues2(__spreadValues2({}, defaultAppState2.ui), initialUi);
79671
79671
  let clientUiState = {};
79672
79672
  if (typeof window !== "undefined") {
@@ -79693,8 +79693,12 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
79693
79693
  };
79694
79694
  }
79695
79695
  }
79696
+ const rootProps2 = initialData.root.props || initialData.root;
79697
+ const defaultedRootProps = __spreadValues2(__spreadValues2({}, (_e = config.root) == null ? void 0 : _e.defaultProps), rootProps2);
79696
79698
  return __spreadProps2(__spreadValues2({}, defaultAppState2), {
79697
- data: initialData,
79699
+ data: __spreadProps2(__spreadValues2({}, initialData), {
79700
+ root: defaultedRootProps
79701
+ }),
79698
79702
  ui: __spreadProps2(__spreadValues2(__spreadValues2({}, initial), clientUiState), {
79699
79703
  // Store categories under componentList on state to allow render functions and plugins to modify
79700
79704
  componentList: config.categories ? Object.entries(config.categories).reduce(
@@ -80422,7 +80426,7 @@ var defaultViewports = [
80422
80426
  var import_ua_parser_js = __toESM(require_ua_parser());
80423
80427
  var import_jsx_runtime4 = require("react/jsx-runtime");
80424
80428
  var defaultAppState = {
80425
- data: { content: [], root: { props: { title: "" } } },
80429
+ data: { content: [], root: { props: {} } },
80426
80430
  ui: {
80427
80431
  leftSideBarVisible: true,
80428
80432
  rightSideBarVisible: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@measured/puck-plugin-heading-analyzer",
3
- "version": "0.14.2",
3
+ "version": "0.14.3-canary.9a1cc7c",
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.14.2",
21
+ "@measured/puck": "^0.14.3-canary.9a1cc7c",
22
22
  "@types/react": "^18.2.0",
23
23
  "@types/react-dom": "^18.2.0",
24
24
  "eslint": "^7.32.0",