@parhelia/core 0.1.12694 → 0.1.12705
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/client/EditorShell.js +19 -2
- package/dist/editor/client/EditorShell.js.map +1 -1
- package/dist/editor/commands/itemCommands.js +4 -80
- package/dist/editor/commands/itemCommands.js.map +1 -1
- package/dist/editor/menubar/ItemLanguageVersion.js +1 -1
- package/dist/editor/menubar/ItemLanguageVersion.js.map +1 -1
- package/dist/editor/menubar/VersionPreviewCard.d.ts +6 -0
- package/dist/editor/menubar/VersionPreviewCard.js +267 -0
- package/dist/editor/menubar/VersionPreviewCard.js.map +1 -0
- package/dist/editor/menubar/VersionSelector.d.ts +2 -1
- package/dist/editor/menubar/VersionSelector.js +50 -7
- package/dist/editor/menubar/VersionSelector.js.map +1 -1
- package/dist/editor/page-editor-chrome/VersionDiffHighlightings.d.ts +2 -1
- package/dist/editor/page-editor-chrome/VersionDiffHighlightings.js +26 -298
- package/dist/editor/page-editor-chrome/VersionDiffHighlightings.js.map +1 -1
- package/dist/editor/page-viewer/MiniMap.d.ts +2 -1
- package/dist/editor/page-viewer/MiniMap.js +3 -2
- package/dist/editor/page-viewer/MiniMap.js.map +1 -1
- package/dist/editor/page-viewer/PageViewerFrame.js +1 -1
- package/dist/editor/page-viewer/PageViewerFrame.js.map +1 -1
- package/dist/editor/pageModel.d.ts +4 -0
- package/dist/editor/ui/ExportItemsDialog.d.ts +10 -0
- package/dist/editor/ui/ExportItemsDialog.js +19 -0
- package/dist/editor/ui/ExportItemsDialog.js.map +1 -0
- package/dist/editor/ui/ImportItemsDialog.d.ts +10 -0
- package/dist/editor/ui/ImportItemsDialog.js +40 -0
- package/dist/editor/ui/ImportItemsDialog.js.map +1 -0
- package/dist/editor/version-diff/versionDiffHighlightStyles.d.ts +8 -0
- package/dist/editor/version-diff/versionDiffHighlightStyles.js +9 -0
- package/dist/editor/version-diff/versionDiffHighlightStyles.js.map +1 -0
- package/dist/editor/version-diff/versionDiffTargets.d.ts +48 -0
- package/dist/editor/version-diff/versionDiffTargets.js +284 -0
- package/dist/editor/version-diff/versionDiffTargets.js.map +1 -0
- package/dist/editor/views/CompareView.js +4 -4
- package/dist/editor/views/CompareView.js.map +1 -1
- package/dist/revision.d.ts +2 -2
- package/dist/revision.js +2 -2
- package/package.json +1 -1
|
@@ -2322,6 +2322,7 @@ export function EditorShell({ configuration, className, item: loadItemDescriptor
|
|
|
2322
2322
|
if (isExistingSlotActive) {
|
|
2323
2323
|
setItem(loadedItem);
|
|
2324
2324
|
setSelection([]);
|
|
2325
|
+
currentItemDescriptorRef.current = itemToLoad;
|
|
2325
2326
|
setCurrentItemDescriptor(itemToLoad);
|
|
2326
2327
|
if (options?.addToBrowseHistory ||
|
|
2327
2328
|
options?.addToBrowseHistory === undefined) {
|
|
@@ -2402,6 +2403,7 @@ export function EditorShell({ configuration, className, item: loadItemDescriptor
|
|
|
2402
2403
|
if (shouldUpdateGlobalCurrentItem) {
|
|
2403
2404
|
setItem(loadedItem);
|
|
2404
2405
|
setSelection([]);
|
|
2406
|
+
currentItemDescriptorRef.current = itemToLoad;
|
|
2405
2407
|
setCurrentItemDescriptor(itemToLoad);
|
|
2406
2408
|
// History will be refreshed automatically by the useEffect watching currentItemDescriptor
|
|
2407
2409
|
// Don't call loadHistory() here as it would override mode-aware history loading
|
|
@@ -2423,6 +2425,7 @@ export function EditorShell({ configuration, className, item: loadItemDescriptor
|
|
|
2423
2425
|
editorSlots,
|
|
2424
2426
|
activeSlotId,
|
|
2425
2427
|
item,
|
|
2428
|
+
workspaceId,
|
|
2426
2429
|
]);
|
|
2427
2430
|
const setActiveSlot = useCallback(async (slotId) => {
|
|
2428
2431
|
if (activeSlotId === slotId)
|
|
@@ -2440,6 +2443,7 @@ export function EditorShell({ configuration, className, item: loadItemDescriptor
|
|
|
2440
2443
|
// Slot already has its item loaded - just update global state without clearing selection
|
|
2441
2444
|
// This avoids the unnecessary reload that would clear component selection
|
|
2442
2445
|
setItem(alreadyLoadedItem);
|
|
2446
|
+
currentItemDescriptorRef.current = slot.itemDescriptor;
|
|
2443
2447
|
setCurrentItemDescriptor(slot.itemDescriptor);
|
|
2444
2448
|
// Don't call setSelection([]) - preserve the current selection
|
|
2445
2449
|
}
|
|
@@ -2474,6 +2478,7 @@ export function EditorShell({ configuration, className, item: loadItemDescriptor
|
|
|
2474
2478
|
// No more slots, clear the active state
|
|
2475
2479
|
activeSlotIdRef.current = null;
|
|
2476
2480
|
setActiveSlotId(null);
|
|
2481
|
+
currentItemDescriptorRef.current = undefined;
|
|
2477
2482
|
setCurrentItemDescriptor(undefined);
|
|
2478
2483
|
setItem(undefined);
|
|
2479
2484
|
}
|
|
@@ -2548,7 +2553,10 @@ export function EditorShell({ configuration, className, item: loadItemDescriptor
|
|
|
2548
2553
|
}
|
|
2549
2554
|
setIsLoadingVersions(true);
|
|
2550
2555
|
try {
|
|
2551
|
-
const result = await getLanguagesAndVersions(currentItemDescriptorRef.current
|
|
2556
|
+
const result = await getLanguagesAndVersions(currentItemDescriptorRef.current, {
|
|
2557
|
+
includePublishingRestrictions: true,
|
|
2558
|
+
includePublishingTargets: true,
|
|
2559
|
+
});
|
|
2552
2560
|
if (!result?.data) {
|
|
2553
2561
|
setItemVersions([]);
|
|
2554
2562
|
setItemLanguages([]);
|
|
@@ -2859,8 +2867,17 @@ export function EditorShell({ configuration, className, item: loadItemDescriptor
|
|
|
2859
2867
|
// Mark that we're pushing from switchWorkspace so the URL sync effect
|
|
2860
2868
|
// will replaceState instead of pushing a second history entry.
|
|
2861
2869
|
switchWorkspacePushedRef.current = true;
|
|
2870
|
+
const currentDescriptor = currentItemDescriptorRef.current;
|
|
2871
|
+
const currentItemUrlParams = targetWorkspaceId === "editor" && currentDescriptor
|
|
2872
|
+
? {
|
|
2873
|
+
itemid: currentDescriptor.id,
|
|
2874
|
+
lang: currentDescriptor.language,
|
|
2875
|
+
version: currentDescriptor.version.toString(),
|
|
2876
|
+
}
|
|
2877
|
+
: {};
|
|
2862
2878
|
updateUrl({
|
|
2863
2879
|
workspace: targetWorkspaceId,
|
|
2880
|
+
...currentItemUrlParams,
|
|
2864
2881
|
...options?.urlParams,
|
|
2865
2882
|
});
|
|
2866
2883
|
if (typeof document.startViewTransition === "function") {
|
|
@@ -3730,6 +3747,7 @@ export function EditorShell({ configuration, className, item: loadItemDescriptor
|
|
|
3730
3747
|
modifierWasPressedOnMouseDown = event.ctrlKey || event.metaKey;
|
|
3731
3748
|
};
|
|
3732
3749
|
const handleCtrlClick = async (event) => {
|
|
3750
|
+
const target = event.target;
|
|
3733
3751
|
// Only proceed if Ctrl/Cmd was already pressed when the mouse interaction started.
|
|
3734
3752
|
// This avoids accidental navigation when users press Ctrl after selecting text to copy.
|
|
3735
3753
|
if (!modifierWasPressedOnMouseDown)
|
|
@@ -3738,7 +3756,6 @@ export function EditorShell({ configuration, className, item: loadItemDescriptor
|
|
|
3738
3756
|
if (!event.ctrlKey && !event.metaKey)
|
|
3739
3757
|
return;
|
|
3740
3758
|
modifierWasPressedOnMouseDown = false;
|
|
3741
|
-
const target = event.target;
|
|
3742
3759
|
const text = getTextFromElement(target);
|
|
3743
3760
|
if (text && isGuid(text)) {
|
|
3744
3761
|
event.preventDefault();
|