@reacteditor/core 0.0.17 → 0.0.18
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/{Editor-4LPVLYSU.css → Editor-IRCQF4VT.css} +10 -16
- package/dist/{Editor-RY6D73N6.mjs → Editor-ULH2S4LO.mjs} +6 -6
- package/dist/{chunk-ESU6AYGB.mjs → chunk-DGIVBKSJ.mjs} +1 -1
- package/dist/{chunk-CUGSM3PC.mjs → chunk-HR67L662.mjs} +1 -1
- package/dist/{chunk-C5G7WUBQ.mjs → chunk-IOAYKTDH.mjs} +1 -1
- package/dist/{chunk-NUBRSWFJ.mjs → chunk-LFJGTSUB.mjs} +13 -1
- package/dist/{chunk-2A2HBRLV.mjs → chunk-NABX5FH7.mjs} +3 -3
- package/dist/{chunk-OAOKQORI.mjs → chunk-UQHR5LFK.mjs} +129 -28
- package/dist/{chunk-AXB6UJ2P.mjs → chunk-WUEYD7ZN.mjs} +57 -44
- package/dist/{full-7ABPY2WA.css → full-B5V3G4IY.css} +10 -16
- package/dist/{full-35622JEC.mjs → full-LIVYWOAF.mjs} +5 -5
- package/dist/{index-BZRpxcwy.d.mts → index-CUe2XTb6.d.mts} +28 -1
- package/dist/{index-B_21fGrq.d.ts → index-CYzc1n29.d.ts} +28 -1
- package/dist/index.css +10 -16
- package/dist/index.d.mts +35 -20
- package/dist/index.d.ts +35 -20
- package/dist/index.js +178 -53
- package/dist/index.mjs +7 -7
- package/dist/internal.d.mts +1 -1
- package/dist/internal.d.ts +1 -1
- package/dist/{loaded-HGQBTPJQ.mjs → loaded-FZVSXAM7.mjs} +2 -2
- package/dist/{loaded-GJMTZ3M5.mjs → loaded-MSWM6QEM.mjs} +2 -2
- package/dist/{loaded-I7V7FYES.mjs → loaded-PYHJ6TB5.mjs} +2 -2
- package/dist/no-external.css +10 -16
- package/dist/no-external.d.mts +2 -2
- package/dist/no-external.d.ts +2 -2
- package/dist/no-external.js +178 -53
- package/dist/no-external.mjs +7 -7
- package/package.json +1 -1
package/dist/no-external.js
CHANGED
|
@@ -3255,7 +3255,19 @@ var init_store = __esm({
|
|
|
3255
3255
|
metadata: {},
|
|
3256
3256
|
fieldTransforms: {},
|
|
3257
3257
|
scrollToComponent: () => {
|
|
3258
|
-
}
|
|
3258
|
+
},
|
|
3259
|
+
route: null,
|
|
3260
|
+
isPublishing: false,
|
|
3261
|
+
publish: () => __async(null, null, function* () {
|
|
3262
|
+
const { onPublish, state, route } = get();
|
|
3263
|
+
if (!onPublish) return;
|
|
3264
|
+
set({ isPublishing: true });
|
|
3265
|
+
try {
|
|
3266
|
+
yield onPublish({ data: state.data, route });
|
|
3267
|
+
} finally {
|
|
3268
|
+
set({ isPublishing: false });
|
|
3269
|
+
}
|
|
3270
|
+
})
|
|
3259
3271
|
}, initialAppStore), {
|
|
3260
3272
|
fields: createFieldsSlice(set, get),
|
|
3261
3273
|
history: createHistorySlice(set, get),
|
|
@@ -3600,12 +3612,12 @@ var init_styles_module2 = __esm({
|
|
|
3600
3612
|
"use strict";
|
|
3601
3613
|
init_react_import();
|
|
3602
3614
|
init_css_module_data3();
|
|
3603
|
-
styles_module_default4 = { "Loader": "
|
|
3615
|
+
styles_module_default4 = { "Loader": "_Loader_6933g_10", "loader-spin": "_loader-spin_6933g_1" };
|
|
3604
3616
|
}
|
|
3605
3617
|
});
|
|
3606
3618
|
|
|
3607
3619
|
// components/Loader/index.tsx
|
|
3608
|
-
var import_jsx_runtime3, getClassName2, Loader;
|
|
3620
|
+
var import_jsx_runtime3, getClassName2, LoaderIcon, Loader;
|
|
3609
3621
|
var init_Loader = __esm({
|
|
3610
3622
|
"components/Loader/index.tsx"() {
|
|
3611
3623
|
"use strict";
|
|
@@ -3614,25 +3626,125 @@ var init_Loader = __esm({
|
|
|
3614
3626
|
init_styles_module2();
|
|
3615
3627
|
import_jsx_runtime3 = require("react/jsx-runtime");
|
|
3616
3628
|
getClassName2 = get_class_name_factory_default("Loader", styles_module_default4);
|
|
3629
|
+
LoaderIcon = ({ size = 16 }) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
3630
|
+
"svg",
|
|
3631
|
+
{
|
|
3632
|
+
height: size,
|
|
3633
|
+
strokeLinejoin: "round",
|
|
3634
|
+
style: { color: "currentcolor" },
|
|
3635
|
+
viewBox: "0 0 16 16",
|
|
3636
|
+
width: size,
|
|
3637
|
+
"aria-hidden": "true",
|
|
3638
|
+
children: [
|
|
3639
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("g", { clipPath: "url(#editor-loader-clip)", children: [
|
|
3640
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M8 0V4", stroke: "currentColor", strokeWidth: "1.5" }),
|
|
3641
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
3642
|
+
"path",
|
|
3643
|
+
{
|
|
3644
|
+
d: "M8 16V12",
|
|
3645
|
+
opacity: "0.5",
|
|
3646
|
+
stroke: "currentColor",
|
|
3647
|
+
strokeWidth: "1.5"
|
|
3648
|
+
}
|
|
3649
|
+
),
|
|
3650
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
3651
|
+
"path",
|
|
3652
|
+
{
|
|
3653
|
+
d: "M3.29773 1.52783L5.64887 4.7639",
|
|
3654
|
+
opacity: "0.9",
|
|
3655
|
+
stroke: "currentColor",
|
|
3656
|
+
strokeWidth: "1.5"
|
|
3657
|
+
}
|
|
3658
|
+
),
|
|
3659
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
3660
|
+
"path",
|
|
3661
|
+
{
|
|
3662
|
+
d: "M12.7023 1.52783L10.3511 4.7639",
|
|
3663
|
+
opacity: "0.1",
|
|
3664
|
+
stroke: "currentColor",
|
|
3665
|
+
strokeWidth: "1.5"
|
|
3666
|
+
}
|
|
3667
|
+
),
|
|
3668
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
3669
|
+
"path",
|
|
3670
|
+
{
|
|
3671
|
+
d: "M12.7023 14.472L10.3511 11.236",
|
|
3672
|
+
opacity: "0.4",
|
|
3673
|
+
stroke: "currentColor",
|
|
3674
|
+
strokeWidth: "1.5"
|
|
3675
|
+
}
|
|
3676
|
+
),
|
|
3677
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
3678
|
+
"path",
|
|
3679
|
+
{
|
|
3680
|
+
d: "M3.29773 14.472L5.64887 11.236",
|
|
3681
|
+
opacity: "0.6",
|
|
3682
|
+
stroke: "currentColor",
|
|
3683
|
+
strokeWidth: "1.5"
|
|
3684
|
+
}
|
|
3685
|
+
),
|
|
3686
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
3687
|
+
"path",
|
|
3688
|
+
{
|
|
3689
|
+
d: "M15.6085 5.52783L11.8043 6.7639",
|
|
3690
|
+
opacity: "0.2",
|
|
3691
|
+
stroke: "currentColor",
|
|
3692
|
+
strokeWidth: "1.5"
|
|
3693
|
+
}
|
|
3694
|
+
),
|
|
3695
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
3696
|
+
"path",
|
|
3697
|
+
{
|
|
3698
|
+
d: "M0.391602 10.472L4.19583 9.23598",
|
|
3699
|
+
opacity: "0.7",
|
|
3700
|
+
stroke: "currentColor",
|
|
3701
|
+
strokeWidth: "1.5"
|
|
3702
|
+
}
|
|
3703
|
+
),
|
|
3704
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
3705
|
+
"path",
|
|
3706
|
+
{
|
|
3707
|
+
d: "M15.6085 10.4722L11.8043 9.2361",
|
|
3708
|
+
opacity: "0.3",
|
|
3709
|
+
stroke: "currentColor",
|
|
3710
|
+
strokeWidth: "1.5"
|
|
3711
|
+
}
|
|
3712
|
+
),
|
|
3713
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
3714
|
+
"path",
|
|
3715
|
+
{
|
|
3716
|
+
d: "M0.391602 5.52783L4.19583 6.7639",
|
|
3717
|
+
opacity: "0.8",
|
|
3718
|
+
stroke: "currentColor",
|
|
3719
|
+
strokeWidth: "1.5"
|
|
3720
|
+
}
|
|
3721
|
+
)
|
|
3722
|
+
] }),
|
|
3723
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("clipPath", { id: "editor-loader-clip", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("rect", { fill: "white", height: "16", width: "16" }) }) })
|
|
3724
|
+
]
|
|
3725
|
+
}
|
|
3726
|
+
);
|
|
3617
3727
|
Loader = (_a) => {
|
|
3618
3728
|
var _b = _a, {
|
|
3619
3729
|
color,
|
|
3620
|
-
size = 16
|
|
3730
|
+
size = 16,
|
|
3731
|
+
className,
|
|
3732
|
+
style
|
|
3621
3733
|
} = _b, props = __objRest(_b, [
|
|
3622
3734
|
"color",
|
|
3623
|
-
"size"
|
|
3735
|
+
"size",
|
|
3736
|
+
"className",
|
|
3737
|
+
"style"
|
|
3624
3738
|
]);
|
|
3625
3739
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
3626
|
-
"
|
|
3627
|
-
__spreadValues({
|
|
3628
|
-
className: getClassName2(),
|
|
3629
|
-
style: {
|
|
3630
|
-
width: size,
|
|
3631
|
-
height: size,
|
|
3632
|
-
color
|
|
3633
|
-
},
|
|
3740
|
+
"div",
|
|
3741
|
+
__spreadProps(__spreadValues({
|
|
3742
|
+
className: [getClassName2(), className].filter(Boolean).join(" "),
|
|
3743
|
+
style: __spreadValues({ color }, style),
|
|
3634
3744
|
"aria-label": "loading"
|
|
3635
|
-
}, props)
|
|
3745
|
+
}, props), {
|
|
3746
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(LoaderIcon, { size })
|
|
3747
|
+
})
|
|
3636
3748
|
);
|
|
3637
3749
|
};
|
|
3638
3750
|
}
|
|
@@ -6956,9 +7068,8 @@ var Button = (_a) => {
|
|
|
6956
7068
|
href
|
|
6957
7069
|
}, dataAttrs), {
|
|
6958
7070
|
children: [
|
|
6959
|
-
icon && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: getClassName10("icon"), children: icon }),
|
|
6960
|
-
children
|
|
6961
|
-
loading && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: getClassName10("spinner"), children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Loader, { size: 14 }) })
|
|
7071
|
+
loading ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: getClassName10("spinner"), children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Loader, { size: 14 }) }) : icon && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: getClassName10("icon"), children: icon }),
|
|
7072
|
+
children
|
|
6962
7073
|
]
|
|
6963
7074
|
})
|
|
6964
7075
|
);
|
|
@@ -12807,6 +12918,9 @@ var createEditorCommands = (appStore) => {
|
|
|
12807
12918
|
ui: { itemSelector: { index: sel.index, zone: sel.zone } }
|
|
12808
12919
|
});
|
|
12809
12920
|
};
|
|
12921
|
+
const publish = () => {
|
|
12922
|
+
void getState().publish();
|
|
12923
|
+
};
|
|
12810
12924
|
return {
|
|
12811
12925
|
insertComponent: insertComponent2,
|
|
12812
12926
|
removeComponent,
|
|
@@ -12816,7 +12930,8 @@ var createEditorCommands = (appStore) => {
|
|
|
12816
12930
|
updateProps,
|
|
12817
12931
|
updateRoot,
|
|
12818
12932
|
selectComponent,
|
|
12819
|
-
scrollToComponent
|
|
12933
|
+
scrollToComponent,
|
|
12934
|
+
publish
|
|
12820
12935
|
};
|
|
12821
12936
|
};
|
|
12822
12937
|
|
|
@@ -12835,6 +12950,8 @@ var generateUseEditor = (store, getState, commands) => {
|
|
|
12835
12950
|
const storeData = __spreadProps(__spreadValues({}, commands), {
|
|
12836
12951
|
appState: makeStatePublic(store.state),
|
|
12837
12952
|
config: store.config,
|
|
12953
|
+
route: store.route,
|
|
12954
|
+
isPublishing: store.isPublishing,
|
|
12838
12955
|
dispatch: store.dispatch,
|
|
12839
12956
|
getPermissions: store.permissions.getPermissions,
|
|
12840
12957
|
refreshPermissions: store.permissions.refreshPermissions,
|
|
@@ -12869,7 +12986,9 @@ var convertToPickedStore = (store) => {
|
|
|
12869
12986
|
dispatch: store.dispatch,
|
|
12870
12987
|
permissions: store.permissions,
|
|
12871
12988
|
history: store.history,
|
|
12872
|
-
selectedItem: store.selectedItem
|
|
12989
|
+
selectedItem: store.selectedItem,
|
|
12990
|
+
route: store.route,
|
|
12991
|
+
isPublishing: store.isPublishing
|
|
12873
12992
|
};
|
|
12874
12993
|
};
|
|
12875
12994
|
var useRegisterUseEditorStore = (appStore) => {
|
|
@@ -13311,18 +13430,19 @@ var DEVICE_VIEWPORTS = {
|
|
|
13311
13430
|
mobile: { width: 360, height: "auto", icon: "Smartphone", label: "Mobile" }
|
|
13312
13431
|
};
|
|
13313
13432
|
var UrlBar = () => {
|
|
13314
|
-
const { routes,
|
|
13433
|
+
const { routes, route, onRouteChange } = usePropsContext();
|
|
13315
13434
|
const chrome = useChromeConfig();
|
|
13316
|
-
const
|
|
13317
|
-
const
|
|
13318
|
-
const
|
|
13319
|
-
|
|
13320
|
-
|
|
13321
|
-
|
|
13435
|
+
const currentKey = route == null ? void 0 : route.key;
|
|
13436
|
+
const showRoutePicker = !!routes && currentKey !== void 0 && !!onRouteChange;
|
|
13437
|
+
const [inputValue, setInputValue] = (0, import_react87.useState)(currentKey != null ? currentKey : "");
|
|
13438
|
+
const lastSyncedPath = (0, import_react87.useRef)(currentKey);
|
|
13439
|
+
if (lastSyncedPath.current !== currentKey) {
|
|
13440
|
+
lastSyncedPath.current = currentKey;
|
|
13441
|
+
setInputValue(currentKey != null ? currentKey : "");
|
|
13322
13442
|
}
|
|
13323
13443
|
const submit = (raw) => {
|
|
13324
13444
|
const next = normalizeRoute(raw);
|
|
13325
|
-
if (!next || next ===
|
|
13445
|
+
if (!next || next === currentKey) return;
|
|
13326
13446
|
void (onRouteChange == null ? void 0 : onRouteChange(next));
|
|
13327
13447
|
};
|
|
13328
13448
|
if (!chrome.showUrlBar) return null;
|
|
@@ -13331,7 +13451,7 @@ var UrlBar = () => {
|
|
|
13331
13451
|
Combobox,
|
|
13332
13452
|
{
|
|
13333
13453
|
items: routes,
|
|
13334
|
-
value:
|
|
13454
|
+
value: currentKey,
|
|
13335
13455
|
onValueChange: (next) => {
|
|
13336
13456
|
if (typeof next === "string") submit(next);
|
|
13337
13457
|
},
|
|
@@ -14165,12 +14285,12 @@ var TopHeader = ({
|
|
|
14165
14285
|
pluginItems
|
|
14166
14286
|
}) => {
|
|
14167
14287
|
const appStore = useAppStoreApi();
|
|
14168
|
-
const { onPublish, currentRoute } = usePropsContext();
|
|
14169
14288
|
const chrome = useChromeConfig();
|
|
14170
14289
|
const back = useAppStore((s) => s.history.back);
|
|
14171
14290
|
const forward = useAppStore((s) => s.history.forward);
|
|
14172
14291
|
const hasFuture = useAppStore((s) => s.history.hasFuture());
|
|
14173
14292
|
const hasPast = useAppStore((s) => s.history.hasPast());
|
|
14293
|
+
const isPublishing = useAppStore((s) => s.isPublishing);
|
|
14174
14294
|
const CustomHeaderActions = useAppStore(
|
|
14175
14295
|
(s) => s.overrides.headerActions || DefaultOverride
|
|
14176
14296
|
);
|
|
@@ -14222,11 +14342,8 @@ var TopHeader = ({
|
|
|
14222
14342
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(CustomHeaderActions, { children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
14223
14343
|
Button,
|
|
14224
14344
|
{
|
|
14225
|
-
onClick: () =>
|
|
14226
|
-
|
|
14227
|
-
onPublish && onPublish(data, currentRoute);
|
|
14228
|
-
},
|
|
14229
|
-
children: "Publish"
|
|
14345
|
+
onClick: () => appStore.getState().publish(),
|
|
14346
|
+
children: isPublishing ? "Publishing\u2026" : "Publish"
|
|
14230
14347
|
}
|
|
14231
14348
|
) })
|
|
14232
14349
|
] })
|
|
@@ -14648,6 +14765,7 @@ function EditorProvider({ children }) {
|
|
|
14648
14765
|
data: initialData,
|
|
14649
14766
|
ui: initialUi,
|
|
14650
14767
|
onChange,
|
|
14768
|
+
onPublish,
|
|
14651
14769
|
permissions = {},
|
|
14652
14770
|
plugins,
|
|
14653
14771
|
overrides,
|
|
@@ -14658,7 +14776,8 @@ function EditorProvider({ children }) {
|
|
|
14658
14776
|
onAction,
|
|
14659
14777
|
fieldTransforms,
|
|
14660
14778
|
fullScreenCanvas,
|
|
14661
|
-
_experimentalVirtualization
|
|
14779
|
+
_experimentalVirtualization,
|
|
14780
|
+
route
|
|
14662
14781
|
} = usePropsContext();
|
|
14663
14782
|
const iframe = (0, import_react95.useMemo)(
|
|
14664
14783
|
() => __spreadValues({
|
|
@@ -14768,7 +14887,9 @@ function EditorProvider({ children }) {
|
|
|
14768
14887
|
_experimentalVirtualization: !!_experimentalVirtualization,
|
|
14769
14888
|
onAction,
|
|
14770
14889
|
metadata,
|
|
14771
|
-
fieldTransforms: loadedFieldTransforms
|
|
14890
|
+
fieldTransforms: loadedFieldTransforms,
|
|
14891
|
+
route: route != null ? route : null,
|
|
14892
|
+
onPublish
|
|
14772
14893
|
};
|
|
14773
14894
|
},
|
|
14774
14895
|
[
|
|
@@ -14783,7 +14904,9 @@ function EditorProvider({ children }) {
|
|
|
14783
14904
|
_experimentalVirtualization,
|
|
14784
14905
|
onAction,
|
|
14785
14906
|
metadata,
|
|
14786
|
-
loadedFieldTransforms
|
|
14907
|
+
loadedFieldTransforms,
|
|
14908
|
+
route,
|
|
14909
|
+
onPublish
|
|
14787
14910
|
]
|
|
14788
14911
|
);
|
|
14789
14912
|
const [appStore] = (0, import_react95.useState)(
|
|
@@ -14876,34 +14999,31 @@ var useApp = () => {
|
|
|
14876
14999
|
const rrNavigate = (0, import_react_router.useNavigate)();
|
|
14877
15000
|
const currentPath = location.pathname || "/";
|
|
14878
15001
|
const isEditing = cfg.editorPath !== null && (currentPath === cfg.editorPath || currentPath.startsWith(`${cfg.editorPath}/`));
|
|
14879
|
-
const
|
|
14880
|
-
const
|
|
15002
|
+
const pagePath = isEditing ? stripPrefix(currentPath, cfg.editorPath) : currentPath;
|
|
15003
|
+
const route = (0, import_react97.useMemo)(() => {
|
|
14881
15004
|
const routeKeys = Object.keys(cfg.pages);
|
|
14882
15005
|
if (routeKeys.length === 0) return null;
|
|
14883
15006
|
const matches = (0, import_react_router.matchRoutes)(
|
|
14884
15007
|
routeKeys.map((path) => ({ path })),
|
|
14885
|
-
|
|
15008
|
+
pagePath
|
|
14886
15009
|
);
|
|
14887
15010
|
if (!matches || matches.length === 0) return null;
|
|
14888
15011
|
const last = matches[matches.length - 1];
|
|
14889
|
-
const key = last.route.path;
|
|
14890
15012
|
return {
|
|
14891
|
-
|
|
14892
|
-
|
|
14893
|
-
|
|
15013
|
+
key: last.route.path,
|
|
15014
|
+
path: pagePath,
|
|
15015
|
+
params: last.params
|
|
14894
15016
|
};
|
|
14895
|
-
}, [cfg.pages,
|
|
15017
|
+
}, [cfg.pages, pagePath]);
|
|
14896
15018
|
const routes = (0, import_react97.useMemo)(() => Object.keys(cfg.pages), [cfg.pages]);
|
|
14897
|
-
const navigate = (
|
|
14898
|
-
const
|
|
14899
|
-
rrNavigate(
|
|
15019
|
+
const navigate = (target) => {
|
|
15020
|
+
const next = isEditing && cfg.editorPath ? `${cfg.editorPath}${target === "/" ? "" : target}` || "/" : target;
|
|
15021
|
+
rrNavigate(next || "/");
|
|
14900
15022
|
};
|
|
14901
15023
|
return __spreadProps(__spreadValues({}, cfg), {
|
|
14902
15024
|
routes,
|
|
14903
|
-
currentPath,
|
|
14904
15025
|
isEditing,
|
|
14905
|
-
|
|
14906
|
-
matched,
|
|
15026
|
+
route,
|
|
14907
15027
|
navigate
|
|
14908
15028
|
});
|
|
14909
15029
|
};
|
|
@@ -14987,9 +15107,14 @@ function EditorForKey({
|
|
|
14987
15107
|
editorProps,
|
|
14988
15108
|
children
|
|
14989
15109
|
}) {
|
|
14990
|
-
const { config, pages, routes, navigate } = useApp();
|
|
15110
|
+
const { config, pages, routes, navigate, route } = useApp();
|
|
14991
15111
|
const data = pages[routeKey];
|
|
14992
15112
|
if (!data) return null;
|
|
15113
|
+
const editorRoute = {
|
|
15114
|
+
key: routeKey,
|
|
15115
|
+
path: (route == null ? void 0 : route.key) === routeKey ? route.path : routeKey,
|
|
15116
|
+
params: (route == null ? void 0 : route.key) === routeKey ? route.params : {}
|
|
15117
|
+
};
|
|
14993
15118
|
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
14994
15119
|
Editor4,
|
|
14995
15120
|
{
|
|
@@ -15016,7 +15141,7 @@ function EditorForKey({
|
|
|
15016
15141
|
disableZoomControls: editorProps.disableZoomControls,
|
|
15017
15142
|
_experimentalVirtualization: editorProps._experimentalVirtualization,
|
|
15018
15143
|
routes,
|
|
15019
|
-
|
|
15144
|
+
route: editorRoute,
|
|
15020
15145
|
onRouteChange: (next) => navigate(next),
|
|
15021
15146
|
children
|
|
15022
15147
|
},
|
package/dist/no-external.mjs
CHANGED
|
@@ -25,8 +25,8 @@ import {
|
|
|
25
25
|
usePropsContext,
|
|
26
26
|
useRouteParams,
|
|
27
27
|
useStableValue
|
|
28
|
-
} from "./chunk-
|
|
29
|
-
import "./chunk-
|
|
28
|
+
} from "./chunk-WUEYD7ZN.mjs";
|
|
29
|
+
import "./chunk-NABX5FH7.mjs";
|
|
30
30
|
import {
|
|
31
31
|
Action,
|
|
32
32
|
ActionBar,
|
|
@@ -35,8 +35,8 @@ import {
|
|
|
35
35
|
Label,
|
|
36
36
|
RichTextMenu,
|
|
37
37
|
Separator
|
|
38
|
-
} from "./chunk-
|
|
39
|
-
import "./chunk-
|
|
38
|
+
} from "./chunk-UQHR5LFK.mjs";
|
|
39
|
+
import "./chunk-HR67L662.mjs";
|
|
40
40
|
import {
|
|
41
41
|
getRouteProps,
|
|
42
42
|
migrate,
|
|
@@ -45,9 +45,9 @@ import {
|
|
|
45
45
|
transformProps
|
|
46
46
|
} from "./chunk-AD67LVXW.mjs";
|
|
47
47
|
import "./chunk-6QJ2HF4O.mjs";
|
|
48
|
-
import "./chunk-
|
|
49
|
-
import "./chunk-
|
|
50
|
-
import "./chunk-
|
|
48
|
+
import "./chunk-DGIVBKSJ.mjs";
|
|
49
|
+
import "./chunk-IOAYKTDH.mjs";
|
|
50
|
+
import "./chunk-LFJGTSUB.mjs";
|
|
51
51
|
import "./chunk-M4JDRFYB.mjs";
|
|
52
52
|
import "./chunk-FTVOCMGV.mjs";
|
|
53
53
|
import "./chunk-DQU3HIP4.mjs";
|