@puckeditor/core 0.23.0-canary.db035ce5 → 0.23.0-canary.e7fef140
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/{chunk-OQD6Q7CY.mjs → chunk-S3CSGIQ3.mjs} +11 -10
- package/dist/index.js +11 -10
- package/dist/index.mjs +1 -1
- package/dist/no-external.js +11 -10
- package/dist/no-external.mjs +1 -1
- package/package.json +1 -1
|
@@ -12251,6 +12251,7 @@ var PluginTab = ({
|
|
|
12251
12251
|
return /* @__PURE__ */ jsx65("div", { className: getPluginTabClassName({ visible, mobileOnly }), children: /* @__PURE__ */ jsx65("div", { className: getPluginTabClassName("body"), children }) });
|
|
12252
12252
|
};
|
|
12253
12253
|
var Layout = ({ children }) => {
|
|
12254
|
+
var _a, _b;
|
|
12254
12255
|
const {
|
|
12255
12256
|
iframe: _iframe,
|
|
12256
12257
|
dnd,
|
|
@@ -12334,11 +12335,10 @@ var Layout = ({ children }) => {
|
|
|
12334
12335
|
}
|
|
12335
12336
|
const setUi = useAppStore((s) => s.setUi);
|
|
12336
12337
|
const currentPlugin = useAppStore((s) => {
|
|
12337
|
-
var
|
|
12338
|
-
return (
|
|
12338
|
+
var _a2;
|
|
12339
|
+
return (_a2 = s.state.ui.plugin) == null ? void 0 : _a2.current;
|
|
12339
12340
|
});
|
|
12340
12341
|
const appStoreApi = useAppStoreApi();
|
|
12341
|
-
const [mobilePanelHeightMode, setMobilePanelHeightMode] = useState24("toggle");
|
|
12342
12342
|
const hasLegacySideBarPlugin = useMemo27(
|
|
12343
12343
|
() => !!(plugins == null ? void 0 : plugins.find((p) => p.name === "legacy-side-bar")),
|
|
12344
12344
|
[plugins]
|
|
@@ -12361,17 +12361,15 @@ var Layout = ({ children }) => {
|
|
|
12361
12361
|
combinedPlugins.push(fieldsPlugin({ label: fieldsLabel }));
|
|
12362
12362
|
}
|
|
12363
12363
|
combinedPlugins == null ? void 0 : combinedPlugins.forEach((plugin) => {
|
|
12364
|
-
var
|
|
12364
|
+
var _a2, _b2, _c;
|
|
12365
12365
|
if (plugin.name && plugin.render) {
|
|
12366
12366
|
if (details[plugin.name]) {
|
|
12367
12367
|
delete details[plugin.name];
|
|
12368
12368
|
}
|
|
12369
12369
|
details[plugin.name] = {
|
|
12370
|
-
label: (
|
|
12371
|
-
icon: (
|
|
12370
|
+
label: (_a2 = plugin.label) != null ? _a2 : plugin.name,
|
|
12371
|
+
icon: (_b2 = plugin.icon) != null ? _b2 : /* @__PURE__ */ jsx65(ToyBrick, {}),
|
|
12372
12372
|
onClick: () => {
|
|
12373
|
-
var _a2;
|
|
12374
|
-
setMobilePanelHeightMode((_a2 = plugin.mobilePanelHeight) != null ? _a2 : "toggle");
|
|
12375
12373
|
if (plugin.name === currentPlugin) {
|
|
12376
12374
|
if (leftSideBarVisible) {
|
|
12377
12375
|
setUi({ leftSideBarVisible: false });
|
|
@@ -12389,6 +12387,7 @@ var Layout = ({ children }) => {
|
|
|
12389
12387
|
},
|
|
12390
12388
|
isActive: leftSideBarVisible && currentPlugin === plugin.name,
|
|
12391
12389
|
render: plugin.render,
|
|
12390
|
+
mobilePanelHeight: (_c = plugin.mobilePanelHeight) != null ? _c : "toggle",
|
|
12392
12391
|
mobileOnly: hasLegacySideBarPlugin || plugin.mobileOnly,
|
|
12393
12392
|
desktopOnly: plugin.name === "legacy-side-bar" || plugin.desktopOnly
|
|
12394
12393
|
};
|
|
@@ -12404,6 +12403,8 @@ var Layout = ({ children }) => {
|
|
|
12404
12403
|
outlineLabel,
|
|
12405
12404
|
fieldsLabel
|
|
12406
12405
|
]);
|
|
12406
|
+
const activePlugin = currentPlugin != null ? currentPlugin : Object.keys(pluginItems)[0];
|
|
12407
|
+
const mobilePanelHeightMode = (_b = (_a = pluginItems[activePlugin]) == null ? void 0 : _a.mobilePanelHeight) != null ? _b : "toggle";
|
|
12407
12408
|
useEffect28(() => {
|
|
12408
12409
|
if (!currentPlugin) {
|
|
12409
12410
|
const names = Object.keys(pluginItems);
|
|
@@ -12413,8 +12414,8 @@ var Layout = ({ children }) => {
|
|
|
12413
12414
|
const hasDesktopFieldsPlugin = pluginItems["fields"] && pluginItems["fields"].mobileOnly === false;
|
|
12414
12415
|
const mobilePanelExpanded = useAppStore(
|
|
12415
12416
|
(s) => {
|
|
12416
|
-
var
|
|
12417
|
-
return (
|
|
12417
|
+
var _a2;
|
|
12418
|
+
return (_a2 = s.state.ui.mobilePanelExpanded) != null ? _a2 : false;
|
|
12418
12419
|
}
|
|
12419
12420
|
);
|
|
12420
12421
|
const maximizeLabel = useMessage("layout-maximize");
|
package/dist/index.js
CHANGED
|
@@ -18476,6 +18476,7 @@ var PluginTab = ({
|
|
|
18476
18476
|
return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("div", { className: getPluginTabClassName({ visible, mobileOnly }), children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("div", { className: getPluginTabClassName("body"), children }) });
|
|
18477
18477
|
};
|
|
18478
18478
|
var Layout = ({ children }) => {
|
|
18479
|
+
var _a, _b;
|
|
18479
18480
|
const {
|
|
18480
18481
|
iframe: _iframe,
|
|
18481
18482
|
dnd,
|
|
@@ -18559,11 +18560,10 @@ var Layout = ({ children }) => {
|
|
|
18559
18560
|
}
|
|
18560
18561
|
const setUi = useAppStore((s) => s.setUi);
|
|
18561
18562
|
const currentPlugin = useAppStore((s) => {
|
|
18562
|
-
var
|
|
18563
|
-
return (
|
|
18563
|
+
var _a2;
|
|
18564
|
+
return (_a2 = s.state.ui.plugin) == null ? void 0 : _a2.current;
|
|
18564
18565
|
});
|
|
18565
18566
|
const appStoreApi = useAppStoreApi();
|
|
18566
|
-
const [mobilePanelHeightMode, setMobilePanelHeightMode] = (0, import_react102.useState)("toggle");
|
|
18567
18567
|
const hasLegacySideBarPlugin = (0, import_react102.useMemo)(
|
|
18568
18568
|
() => !!(plugins == null ? void 0 : plugins.find((p) => p.name === "legacy-side-bar")),
|
|
18569
18569
|
[plugins]
|
|
@@ -18586,17 +18586,15 @@ var Layout = ({ children }) => {
|
|
|
18586
18586
|
combinedPlugins.push(fieldsPlugin({ label: fieldsLabel }));
|
|
18587
18587
|
}
|
|
18588
18588
|
combinedPlugins == null ? void 0 : combinedPlugins.forEach((plugin) => {
|
|
18589
|
-
var
|
|
18589
|
+
var _a2, _b2, _c;
|
|
18590
18590
|
if (plugin.name && plugin.render) {
|
|
18591
18591
|
if (details[plugin.name]) {
|
|
18592
18592
|
delete details[plugin.name];
|
|
18593
18593
|
}
|
|
18594
18594
|
details[plugin.name] = {
|
|
18595
|
-
label: (
|
|
18596
|
-
icon: (
|
|
18595
|
+
label: (_a2 = plugin.label) != null ? _a2 : plugin.name,
|
|
18596
|
+
icon: (_b2 = plugin.icon) != null ? _b2 : /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(ToyBrick, {}),
|
|
18597
18597
|
onClick: () => {
|
|
18598
|
-
var _a2;
|
|
18599
|
-
setMobilePanelHeightMode((_a2 = plugin.mobilePanelHeight) != null ? _a2 : "toggle");
|
|
18600
18598
|
if (plugin.name === currentPlugin) {
|
|
18601
18599
|
if (leftSideBarVisible) {
|
|
18602
18600
|
setUi({ leftSideBarVisible: false });
|
|
@@ -18614,6 +18612,7 @@ var Layout = ({ children }) => {
|
|
|
18614
18612
|
},
|
|
18615
18613
|
isActive: leftSideBarVisible && currentPlugin === plugin.name,
|
|
18616
18614
|
render: plugin.render,
|
|
18615
|
+
mobilePanelHeight: (_c = plugin.mobilePanelHeight) != null ? _c : "toggle",
|
|
18617
18616
|
mobileOnly: hasLegacySideBarPlugin || plugin.mobileOnly,
|
|
18618
18617
|
desktopOnly: plugin.name === "legacy-side-bar" || plugin.desktopOnly
|
|
18619
18618
|
};
|
|
@@ -18629,6 +18628,8 @@ var Layout = ({ children }) => {
|
|
|
18629
18628
|
outlineLabel,
|
|
18630
18629
|
fieldsLabel
|
|
18631
18630
|
]);
|
|
18631
|
+
const activePlugin = currentPlugin != null ? currentPlugin : Object.keys(pluginItems)[0];
|
|
18632
|
+
const mobilePanelHeightMode = (_b = (_a = pluginItems[activePlugin]) == null ? void 0 : _a.mobilePanelHeight) != null ? _b : "toggle";
|
|
18632
18633
|
(0, import_react102.useEffect)(() => {
|
|
18633
18634
|
if (!currentPlugin) {
|
|
18634
18635
|
const names = Object.keys(pluginItems);
|
|
@@ -18638,8 +18639,8 @@ var Layout = ({ children }) => {
|
|
|
18638
18639
|
const hasDesktopFieldsPlugin = pluginItems["fields"] && pluginItems["fields"].mobileOnly === false;
|
|
18639
18640
|
const mobilePanelExpanded = useAppStore(
|
|
18640
18641
|
(s) => {
|
|
18641
|
-
var
|
|
18642
|
-
return (
|
|
18642
|
+
var _a2;
|
|
18643
|
+
return (_a2 = s.state.ui.mobilePanelExpanded) != null ? _a2 : false;
|
|
18643
18644
|
}
|
|
18644
18645
|
);
|
|
18645
18646
|
const maximizeLabel = useMessage("layout-maximize");
|
package/dist/index.mjs
CHANGED
package/dist/no-external.js
CHANGED
|
@@ -18476,6 +18476,7 @@ var PluginTab = ({
|
|
|
18476
18476
|
return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("div", { className: getPluginTabClassName({ visible, mobileOnly }), children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("div", { className: getPluginTabClassName("body"), children }) });
|
|
18477
18477
|
};
|
|
18478
18478
|
var Layout = ({ children }) => {
|
|
18479
|
+
var _a, _b;
|
|
18479
18480
|
const {
|
|
18480
18481
|
iframe: _iframe,
|
|
18481
18482
|
dnd,
|
|
@@ -18559,11 +18560,10 @@ var Layout = ({ children }) => {
|
|
|
18559
18560
|
}
|
|
18560
18561
|
const setUi = useAppStore((s) => s.setUi);
|
|
18561
18562
|
const currentPlugin = useAppStore((s) => {
|
|
18562
|
-
var
|
|
18563
|
-
return (
|
|
18563
|
+
var _a2;
|
|
18564
|
+
return (_a2 = s.state.ui.plugin) == null ? void 0 : _a2.current;
|
|
18564
18565
|
});
|
|
18565
18566
|
const appStoreApi = useAppStoreApi();
|
|
18566
|
-
const [mobilePanelHeightMode, setMobilePanelHeightMode] = (0, import_react102.useState)("toggle");
|
|
18567
18567
|
const hasLegacySideBarPlugin = (0, import_react102.useMemo)(
|
|
18568
18568
|
() => !!(plugins == null ? void 0 : plugins.find((p) => p.name === "legacy-side-bar")),
|
|
18569
18569
|
[plugins]
|
|
@@ -18586,17 +18586,15 @@ var Layout = ({ children }) => {
|
|
|
18586
18586
|
combinedPlugins.push(fieldsPlugin({ label: fieldsLabel }));
|
|
18587
18587
|
}
|
|
18588
18588
|
combinedPlugins == null ? void 0 : combinedPlugins.forEach((plugin) => {
|
|
18589
|
-
var
|
|
18589
|
+
var _a2, _b2, _c;
|
|
18590
18590
|
if (plugin.name && plugin.render) {
|
|
18591
18591
|
if (details[plugin.name]) {
|
|
18592
18592
|
delete details[plugin.name];
|
|
18593
18593
|
}
|
|
18594
18594
|
details[plugin.name] = {
|
|
18595
|
-
label: (
|
|
18596
|
-
icon: (
|
|
18595
|
+
label: (_a2 = plugin.label) != null ? _a2 : plugin.name,
|
|
18596
|
+
icon: (_b2 = plugin.icon) != null ? _b2 : /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(ToyBrick, {}),
|
|
18597
18597
|
onClick: () => {
|
|
18598
|
-
var _a2;
|
|
18599
|
-
setMobilePanelHeightMode((_a2 = plugin.mobilePanelHeight) != null ? _a2 : "toggle");
|
|
18600
18598
|
if (plugin.name === currentPlugin) {
|
|
18601
18599
|
if (leftSideBarVisible) {
|
|
18602
18600
|
setUi({ leftSideBarVisible: false });
|
|
@@ -18614,6 +18612,7 @@ var Layout = ({ children }) => {
|
|
|
18614
18612
|
},
|
|
18615
18613
|
isActive: leftSideBarVisible && currentPlugin === plugin.name,
|
|
18616
18614
|
render: plugin.render,
|
|
18615
|
+
mobilePanelHeight: (_c = plugin.mobilePanelHeight) != null ? _c : "toggle",
|
|
18617
18616
|
mobileOnly: hasLegacySideBarPlugin || plugin.mobileOnly,
|
|
18618
18617
|
desktopOnly: plugin.name === "legacy-side-bar" || plugin.desktopOnly
|
|
18619
18618
|
};
|
|
@@ -18629,6 +18628,8 @@ var Layout = ({ children }) => {
|
|
|
18629
18628
|
outlineLabel,
|
|
18630
18629
|
fieldsLabel
|
|
18631
18630
|
]);
|
|
18631
|
+
const activePlugin = currentPlugin != null ? currentPlugin : Object.keys(pluginItems)[0];
|
|
18632
|
+
const mobilePanelHeightMode = (_b = (_a = pluginItems[activePlugin]) == null ? void 0 : _a.mobilePanelHeight) != null ? _b : "toggle";
|
|
18632
18633
|
(0, import_react102.useEffect)(() => {
|
|
18633
18634
|
if (!currentPlugin) {
|
|
18634
18635
|
const names = Object.keys(pluginItems);
|
|
@@ -18638,8 +18639,8 @@ var Layout = ({ children }) => {
|
|
|
18638
18639
|
const hasDesktopFieldsPlugin = pluginItems["fields"] && pluginItems["fields"].mobileOnly === false;
|
|
18639
18640
|
const mobilePanelExpanded = useAppStore(
|
|
18640
18641
|
(s) => {
|
|
18641
|
-
var
|
|
18642
|
-
return (
|
|
18642
|
+
var _a2;
|
|
18643
|
+
return (_a2 = s.state.ui.mobilePanelExpanded) != null ? _a2 : false;
|
|
18643
18644
|
}
|
|
18644
18645
|
);
|
|
18645
18646
|
const maximizeLabel = useMessage("layout-maximize");
|
package/dist/no-external.mjs
CHANGED
package/package.json
CHANGED