@puckeditor/plugin-pages 0.8.0-canary.fdb02235 → 0.8.0-canary.fed2989a

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
@@ -29856,17 +29856,6 @@ var import_jsx_runtime50 = require("react/jsx-runtime");
29856
29856
  var cx9 = getClassNameFactory2("Pages", styles_module_default7);
29857
29857
  var cxPage = getClassNameFactory2("PagesPage", styles_module_default7);
29858
29858
  var cxVersion = getClassNameFactory2("PagesVersion", styles_module_default7);
29859
- function registerDynamicConfig(config2, data) {
29860
- const dynamicConfig = data.root?.props?._dynamicConfig;
29861
- if (!dynamicConfig?.components) return;
29862
- for (const [name, def] of Object.entries(dynamicConfig.components)) {
29863
- if (config2.components[name]) continue;
29864
- config2.components[name] = {
29865
- fields: { ...def.fields ?? {} },
29866
- render: () => null
29867
- };
29868
- }
29869
- }
29870
29859
  var PagePlugin = (opts) => {
29871
29860
  const getPuck = (0, import_core11.useGetPuck)();
29872
29861
  const [confirmModalOpen, setConfirmModalOpen] = (0, import_react25.useState)(false);
@@ -29910,9 +29899,10 @@ var PagePlugin = (opts) => {
29910
29899
  const getPageState = (0, import_react25.useCallback)(
29911
29900
  async (data) => {
29912
29901
  const { appState, config: config2 } = getPuck();
29913
- const pageData = data && Object.keys(data).length > 0 ? data : appState.data;
29914
- registerDynamicConfig(config2, pageData);
29915
- const resolvedData = await (0, import_core11.resolveAllData)(pageData, config2);
29902
+ const resolvedData = await (0, import_core11.resolveAllData)(
29903
+ data && Object.keys(data).length > 0 ? data : appState.data,
29904
+ config2
29905
+ );
29916
29906
  const nextState = {
29917
29907
  ...appState,
29918
29908
  data: resolvedData,
package/dist/index.mjs CHANGED
@@ -13546,10 +13546,7 @@ var styles_module_default7 = { "Pages": "_Pages_ey49w_5", "Pages-addPage": "_Pag
13546
13546
 
13547
13547
  // src/components/PagePlugin/index.tsx
13548
13548
  import { useCallback as useCallback9, useEffect as useEffect29, useMemo as useMemo22, useRef as useRef22, useState as useState30 } from "react";
13549
- import {
13550
- resolveAllData as resolveAllData2,
13551
- useGetPuck as useGetPuck2
13552
- } from "@puckeditor/core";
13549
+ import { resolveAllData as resolveAllData2, useGetPuck as useGetPuck2 } from "@puckeditor/core";
13553
13550
 
13554
13551
  // src/components/CreateForm/index.tsx
13555
13552
  init_react_import();
@@ -29851,17 +29848,6 @@ import { jsx as jsx43, jsxs as jsxs21 } from "react/jsx-runtime";
29851
29848
  var cx9 = getClassNameFactory2("Pages", styles_module_default7);
29852
29849
  var cxPage = getClassNameFactory2("PagesPage", styles_module_default7);
29853
29850
  var cxVersion = getClassNameFactory2("PagesVersion", styles_module_default7);
29854
- function registerDynamicConfig(config2, data) {
29855
- const dynamicConfig = data.root?.props?._dynamicConfig;
29856
- if (!dynamicConfig?.components) return;
29857
- for (const [name, def] of Object.entries(dynamicConfig.components)) {
29858
- if (config2.components[name]) continue;
29859
- config2.components[name] = {
29860
- fields: { ...def.fields ?? {} },
29861
- render: () => null
29862
- };
29863
- }
29864
- }
29865
29851
  var PagePlugin = (opts) => {
29866
29852
  const getPuck = useGetPuck2();
29867
29853
  const [confirmModalOpen, setConfirmModalOpen] = useState30(false);
@@ -29905,9 +29891,10 @@ var PagePlugin = (opts) => {
29905
29891
  const getPageState = useCallback9(
29906
29892
  async (data) => {
29907
29893
  const { appState, config: config2 } = getPuck();
29908
- const pageData = data && Object.keys(data).length > 0 ? data : appState.data;
29909
- registerDynamicConfig(config2, pageData);
29910
- const resolvedData = await resolveAllData2(pageData, config2);
29894
+ const resolvedData = await resolveAllData2(
29895
+ data && Object.keys(data).length > 0 ? data : appState.data,
29896
+ config2
29897
+ );
29911
29898
  const nextState = {
29912
29899
  ...appState,
29913
29900
  data: resolvedData,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@puckeditor/plugin-pages",
3
- "version": "0.8.0-canary.fdb02235",
3
+ "version": "0.8.0-canary.fed2989a",
4
4
  "author": "Chris Villa <chris@puckeditor.com>",
5
5
  "repository": "puckeditor/puck",
6
6
  "bugs": "https://github.com/puckeditor/puck/issues",
@@ -31,7 +31,7 @@
31
31
  "zustand": "^5.0.8"
32
32
  },
33
33
  "devDependencies": {
34
- "@puckeditor/core": "0.22.0",
34
+ "@puckeditor/core": "0.22.0-canary.cbf13a0d",
35
35
  "@puckeditor/platform-types": "workspace:*",
36
36
  "@radix-ui/react-popover": "^1.1.15",
37
37
  "@testing-library/dom": "^10.4.1",