@parhelia/core 0.1.12112 → 0.1.12175
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/components/ActionButton.d.ts +1 -1
- package/dist/components/ActionButton.js.map +1 -1
- package/dist/components/ui/button.d.ts +2 -2
- package/dist/components/ui/button.js +1 -0
- package/dist/components/ui/button.js.map +1 -1
- package/dist/components/ui/dialog.js +1 -1
- package/dist/components/ui/dialog.js.map +1 -1
- package/dist/editor/ConcurrentUserLimitDialog.d.ts +11 -0
- package/dist/editor/ConcurrentUserLimitDialog.js +72 -0
- package/dist/editor/ConcurrentUserLimitDialog.js.map +1 -0
- package/dist/editor/ContentTree.js +17 -15
- package/dist/editor/ContentTree.js.map +1 -1
- package/dist/editor/Editor.js +25 -4
- package/dist/editor/Editor.js.map +1 -1
- package/dist/editor/MainLayout.js +1 -1
- package/dist/editor/MainLayout.js.map +1 -1
- package/dist/editor/QuickItemSwitcher.js +21 -21
- package/dist/editor/QuickItemSwitcher.js.map +1 -1
- package/dist/editor/ai/AgentTerminal.js +256 -81
- package/dist/editor/ai/AgentTerminal.js.map +1 -1
- package/dist/editor/ai/AgentTerminalStatusBar.d.ts +1 -3
- package/dist/editor/ai/AgentTerminalStatusBar.js +3 -15
- package/dist/editor/ai/AgentTerminalStatusBar.js.map +1 -1
- package/dist/editor/ai/ContextInfoBar.d.ts +1 -3
- package/dist/editor/ai/ContextInfoBar.js +6 -148
- package/dist/editor/ai/ContextInfoBar.js.map +1 -1
- package/dist/editor/ai/InlineAiTrigger.js +46 -2
- package/dist/editor/ai/InlineAiTrigger.js.map +1 -1
- package/dist/editor/client/AboutDialog.js +4 -2
- package/dist/editor/client/AboutDialog.js.map +1 -1
- package/dist/editor/client/EditorShell.js +30 -5
- package/dist/editor/client/EditorShell.js.map +1 -1
- package/dist/editor/client/hooks/useEditorWebSocket.d.ts +6 -0
- package/dist/editor/client/hooks/useEditorWebSocket.js +80 -3
- package/dist/editor/client/hooks/useEditorWebSocket.js.map +1 -1
- package/dist/editor/field-types/RichTextEditor.js +4 -2
- package/dist/editor/field-types/RichTextEditor.js.map +1 -1
- package/dist/editor/field-types/RichTextEditorComponent.js +37 -3
- package/dist/editor/field-types/RichTextEditorComponent.js.map +1 -1
- package/dist/editor/field-types/richtext/components/ReactSlate.d.ts +2 -0
- package/dist/editor/field-types/richtext/components/ReactSlate.js +15 -2
- package/dist/editor/field-types/richtext/components/ReactSlate.js.map +1 -1
- package/dist/editor/field-types/richtext/contextMenuFactory.d.ts +13 -0
- package/dist/editor/field-types/richtext/contextMenuFactory.js +108 -3
- package/dist/editor/field-types/richtext/contextMenuFactory.js.map +1 -1
- package/dist/editor/field-types/richtext/types.d.ts +1 -0
- package/dist/editor/field-types/richtext/types.js.map +1 -1
- package/dist/editor/media-selector/MediaFolderBrowser.js +1 -1
- package/dist/editor/media-selector/MediaFolderBrowser.js.map +1 -1
- package/dist/editor/menubar/GenericToolbar.js +1 -1
- package/dist/editor/menubar/GenericToolbar.js.map +1 -1
- package/dist/editor/reviews/Comment.js +11 -1
- package/dist/editor/reviews/Comment.js.map +1 -1
- package/dist/editor/reviews/CommentDisplayPopover.js +3 -1
- package/dist/editor/reviews/CommentDisplayPopover.js.map +1 -1
- package/dist/editor/reviews/CreateReviewDetailsStep.d.ts +3 -1
- package/dist/editor/reviews/CreateReviewDetailsStep.js +2 -2
- package/dist/editor/reviews/CreateReviewDetailsStep.js.map +1 -1
- package/dist/editor/reviews/CreateReviewDialog.js +4 -1
- package/dist/editor/reviews/CreateReviewDialog.js.map +1 -1
- package/dist/editor/reviews/EditReviewSettingsDialog.js +6 -4
- package/dist/editor/reviews/EditReviewSettingsDialog.js.map +1 -1
- package/dist/editor/services/contentService.d.ts +1 -1
- package/dist/editor/services/contentService.js +2 -1
- package/dist/editor/services/contentService.js.map +1 -1
- package/dist/editor/services/editService.d.ts +12 -1
- package/dist/editor/services/editService.js +31 -2
- package/dist/editor/services/editService.js.map +1 -1
- package/dist/editor/services/reviewsService.d.ts +1 -1
- package/dist/editor/services/reviewsService.js +2 -1
- package/dist/editor/services/reviewsService.js.map +1 -1
- package/dist/editor/services/serviceHelper.js +38 -0
- package/dist/editor/services/serviceHelper.js.map +1 -1
- package/dist/editor/settings/About.js +260 -3
- package/dist/editor/settings/About.js.map +1 -1
- package/dist/editor/settings/status/coreStatusChecks.js +10 -2
- package/dist/editor/settings/status/coreStatusChecks.js.map +1 -1
- package/dist/editor/ui/SimpleTabs.js +1 -1
- package/dist/editor/ui/SimpleTabs.js.map +1 -1
- package/dist/editor/views/MediaFolderEditView.js +1 -1
- package/dist/editor/views/MediaFolderEditView.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/licensing/EmailEntry.d.ts +6 -0
- package/dist/licensing/EmailEntry.js +30 -0
- package/dist/licensing/EmailEntry.js.map +1 -0
- package/dist/licensing/FeatureGate.d.ts +75 -0
- package/dist/licensing/FeatureGate.js +114 -0
- package/dist/licensing/FeatureGate.js.map +1 -0
- package/dist/licensing/LicenseActivationForm.d.ts +8 -0
- package/dist/licensing/LicenseActivationForm.js +27 -0
- package/dist/licensing/LicenseActivationForm.js.map +1 -0
- package/dist/licensing/LicenseCodeEntry.d.ts +8 -0
- package/dist/licensing/LicenseCodeEntry.js +70 -0
- package/dist/licensing/LicenseCodeEntry.js.map +1 -0
- package/dist/licensing/LicenseContext.d.ts +45 -0
- package/dist/licensing/LicenseContext.js +287 -0
- package/dist/licensing/LicenseContext.js.map +1 -0
- package/dist/licensing/LicenseOverlay.d.ts +1 -0
- package/dist/licensing/LicenseOverlay.js +17 -0
- package/dist/licensing/LicenseOverlay.js.map +1 -0
- package/dist/licensing/index.d.ts +7 -0
- package/dist/licensing/index.js +8 -0
- package/dist/licensing/index.js.map +1 -0
- package/dist/licensing/licenseService.d.ts +28 -0
- package/dist/licensing/licenseService.js +110 -0
- package/dist/licensing/licenseService.js.map +1 -0
- package/dist/licensing/types.d.ts +85 -0
- package/dist/licensing/types.js +12 -0
- package/dist/licensing/types.js.map +1 -0
- package/dist/revision.d.ts +2 -2
- package/dist/revision.js +2 -2
- package/dist/splash-screen/ModernSplashScreen.js +2 -4
- package/dist/splash-screen/ModernSplashScreen.js.map +1 -1
- package/dist/splash-screen/NewPage.js +13 -31
- package/dist/splash-screen/NewPage.js.map +1 -1
- package/dist/splash-screen/ParheliaAssistantChat.js +12 -1
- package/dist/splash-screen/ParheliaAssistantChat.js.map +1 -1
- package/dist/types.d.ts +2 -0
- package/package.json +1 -1
|
@@ -20,6 +20,7 @@ import { getItemDescriptor } from "../utils";
|
|
|
20
20
|
import { EditContextMenu } from "../ContextMenu";
|
|
21
21
|
import { InlineAiTrigger } from "../ai/InlineAiTrigger";
|
|
22
22
|
import { FieldEditorPopup } from "../FieldEditorPopup";
|
|
23
|
+
import { ConcurrentUserLimitDialog } from "../ConcurrentUserLimitDialog";
|
|
23
24
|
import { post } from "../services/serviceHelper";
|
|
24
25
|
import { PageViewerFrame } from "../page-viewer/PageViewerFrame";
|
|
25
26
|
import { useItemsRepository } from "./itemsRepository";
|
|
@@ -50,6 +51,7 @@ import { useWorkbox } from "./hooks/useWorkbox";
|
|
|
50
51
|
import { useMediaSelector } from "./hooks/useMediaSelector";
|
|
51
52
|
import { useGlobalEditorKeyDown } from "./hooks/useGlobalEditorKeyDown";
|
|
52
53
|
import { useStartupChecks } from "../settings/status/index";
|
|
54
|
+
import { LicenseProvider, LicenseOverlay } from "../../licensing";
|
|
53
55
|
function AgentsSlotContextBridge({ slot }) {
|
|
54
56
|
const editContext = useEditContext();
|
|
55
57
|
const slotContext = useEditorSlotContext({
|
|
@@ -1267,7 +1269,8 @@ export function EditorShell({ configuration, className, item: loadItemDescriptor
|
|
|
1267
1269
|
const loadComments = useCallback(async () => {
|
|
1268
1270
|
if (!currentItemDescriptor)
|
|
1269
1271
|
return;
|
|
1270
|
-
const
|
|
1272
|
+
const reviewId = searchParams.get("reviewId");
|
|
1273
|
+
const result = await getComments(currentItemDescriptor.id, currentItemDescriptor.language, currentItemDescriptor.version, reviewId ?? undefined);
|
|
1271
1274
|
if (handleErrorResult(result, ui, state))
|
|
1272
1275
|
return;
|
|
1273
1276
|
setComments((x) => {
|
|
@@ -1280,7 +1283,7 @@ export function EditorShell({ configuration, className, item: loadItemDescriptor
|
|
|
1280
1283
|
allComments.sort((a, b) => a.position - b.position);
|
|
1281
1284
|
return allComments;
|
|
1282
1285
|
});
|
|
1283
|
-
}, [currentItemDescriptor]);
|
|
1286
|
+
}, [currentItemDescriptor, searchParams]);
|
|
1284
1287
|
// Assuming currentItemDescriptor, ui, state, handleErrorResult, and setSuggestedEdits
|
|
1285
1288
|
// are available in your component context.
|
|
1286
1289
|
const loadSuggestedEdits = useCallback(async () => {
|
|
@@ -2384,10 +2387,25 @@ export function EditorShell({ configuration, className, item: loadItemDescriptor
|
|
|
2384
2387
|
markOperationCompleteRef.current?.(operationId);
|
|
2385
2388
|
},
|
|
2386
2389
|
});
|
|
2390
|
+
// Concurrent user limit error state
|
|
2391
|
+
const [concurrentUserLimitError, setConcurrentUserLimitError] = useState(null);
|
|
2392
|
+
const handleRetryConnection = useCallback(() => {
|
|
2393
|
+
setConcurrentUserLimitError(null);
|
|
2394
|
+
// Force reconnection by triggering a new connection attempt
|
|
2395
|
+
// The useEditorWebSocket hook will check availability again
|
|
2396
|
+
const socket = globalThis.editorSocket;
|
|
2397
|
+
if (socket) {
|
|
2398
|
+
socket.close();
|
|
2399
|
+
delete globalThis.editorSocket;
|
|
2400
|
+
}
|
|
2401
|
+
// The hook will automatically attempt to reconnect
|
|
2402
|
+
}, []);
|
|
2387
2403
|
const { socketRef: socketInstanceRef } = useEditorWebSocket({
|
|
2388
2404
|
sessionId,
|
|
2389
2405
|
onMessage: messageHandler,
|
|
2390
2406
|
onOpen: async () => {
|
|
2407
|
+
// Clear concurrent user limit error on successful connection
|
|
2408
|
+
setConcurrentUserLimitError(null);
|
|
2391
2409
|
// Increment socket connection version to trigger re-subscriptions
|
|
2392
2410
|
setSocketConnectionVersion((v) => v + 1);
|
|
2393
2411
|
// Flush any queued agent dialog responses now that the socket is open.
|
|
@@ -2421,6 +2439,9 @@ export function EditorShell({ configuration, className, item: loadItemDescriptor
|
|
|
2421
2439
|
}
|
|
2422
2440
|
},
|
|
2423
2441
|
onError: (error) => console.error("WebSocket error:", error),
|
|
2442
|
+
onConcurrentUserLimit: (error) => {
|
|
2443
|
+
setConcurrentUserLimitError(error);
|
|
2444
|
+
},
|
|
2424
2445
|
onSessionRevoked: () => promptSessionReconnect("session-revoked"),
|
|
2425
2446
|
connectSocket,
|
|
2426
2447
|
requestQuota,
|
|
@@ -4350,8 +4371,12 @@ export function EditorShell({ configuration, className, item: loadItemDescriptor
|
|
|
4350
4371
|
: window.location.pathname;
|
|
4351
4372
|
window.history.replaceState(null, "", newUrl);
|
|
4352
4373
|
}, configuration: configuration, restoredFromUrl: tourRestoredRef.current })), _jsx(GuidanceOverlay, {}), _jsx(AgentDialogHandler, { sendWebSocketMessage: (type, payload) => sendSocketMessage({ type, payload }) })] }));
|
|
4353
|
-
return (_jsx("div", { className: `editor h-full w-full`, children: _jsx(OperationsContextProvider, { value: operationsContext.context, children: _jsx(FieldsEditContextProvider, { value: fieldsEditContext, children: _jsxs(EditContextProvider, { value: editContext, children: [_jsx(DevModeIndicator, {}), startupChecks.state === "loading" && (_jsx("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-white/70 backdrop-blur-[1px]", children: _jsx("div", { className: "flex items-center gap-3 rounded-md border border-gray-200 bg-white px-4 py-3 text-gray-700 shadow-sm", children: _jsx(Spinner, { size: "xl" }) }) })), editContext.isRefreshing && (_jsx("div", { className: "pointer-events-none fixed right-0 bottom-0 flex h-24 w-24 items-center justify-center text-gray-600 opacity-50 select-none", children: _jsx(Spinner, {}) })), (currentWorkspace.id === "agents" ||
|
|
4354
|
-
|
|
4355
|
-
|
|
4374
|
+
return (_jsx(LicenseProvider, { children: _jsx("div", { className: `editor h-full w-full`, children: _jsx(OperationsContextProvider, { value: operationsContext.context, children: _jsx(FieldsEditContextProvider, { value: fieldsEditContext, children: _jsxs(EditContextProvider, { value: editContext, children: [_jsx(DevModeIndicator, {}), startupChecks.state === "loading" && (_jsx("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-white/70 backdrop-blur-[1px]", children: _jsx("div", { className: "flex items-center gap-3 rounded-md border border-gray-200 bg-white px-4 py-3 text-gray-700 shadow-sm", children: _jsx(Spinner, { size: "xl" }) }) })), editContext.isRefreshing && (_jsx("div", { className: "pointer-events-none fixed right-0 bottom-0 flex h-24 w-24 items-center justify-center text-gray-600 opacity-50 select-none", children: _jsx(Spinner, {}) })), (currentWorkspace.id === "agents" ||
|
|
4375
|
+
currentWorkspace.id === "taskboard") &&
|
|
4376
|
+
showAgentsWorkspaceEditor && (_jsx(AgentsSlotContextBridgeHost, { slots: editorSlots })), startupChecks.state !== "loading" && (children || editorUi), startupChecks.state !== "loading" && dialog, _jsx(Toaster, { position: "top-center" }), " ", _jsx(ConfirmationDialog, { ref: confirmationDialogRef }), _jsx(ConcurrentUserLimitDialog, { open: concurrentUserLimitError !== null, onOpenChange: (open) => {
|
|
4377
|
+
if (!open) {
|
|
4378
|
+
setConcurrentUserLimitError(null);
|
|
4379
|
+
}
|
|
4380
|
+
}, sessionId: sessionId, currentUsers: concurrentUserLimitError?.currentUsers ?? 0, maxUsers: concurrentUserLimitError?.maxUsers ?? 0, message: concurrentUserLimitError?.message ?? "", onRetry: handleRetryConnection }), _jsx(QuickItemSwitcher, { visible: quickSwitcherVisible, entries: navigationHistory.slice(0, 5), selectedIndex: quickSwitcherSelectedIndex, onSelect: handleQuickSwitcherSelect, onClose: () => setQuickSwitcherVisible(false) }), _jsx(EditContextMenu, { ref: contextMenuRef }), _jsx(InlineAiTrigger, {}), media.mediaSelectorVisible && (_jsx(MediaSelector, { language: editContext.currentItemDescriptor.language, visible: media.mediaSelectorVisible, onHide: media.handleHide, onMediaSelected: media.onMediaSelect, selectedIdPath: media.selectedMediaIdPath, mode: media.mediaSelectorMode, initialSearchTerm: media.initialSearchTerm })), _jsx(FieldEditorPopup, { ref: fieldEditorPopupRef }), _jsx(LicenseOverlay, {})] }) }) }) }) }));
|
|
4356
4381
|
}
|
|
4357
4382
|
//# sourceMappingURL=EditorShell.js.map
|