@memberjunction/ng-conversations 6.2.2 → 6.3.0-edge.1
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/README.md +49 -24
- package/dist/assets/edge-ai.worker.js +32515 -0
- package/dist/lib/components/artifact/artifact-share-modal.component.d.ts +39 -6
- package/dist/lib/components/artifact/artifact-share-modal.component.d.ts.map +1 -1
- package/dist/lib/components/artifact/artifact-share-modal.component.js +620 -74
- package/dist/lib/components/artifact/artifact-share-modal.component.js.map +1 -1
- package/dist/lib/components/collection/artifact-create-modal.component.js +4 -4
- package/dist/lib/components/collection/artifact-create-modal.component.js.map +1 -1
- package/dist/lib/components/collection/collection-form-modal.component.js +3 -3
- package/dist/lib/components/collection/collection-form-modal.component.js.map +1 -1
- package/dist/lib/components/collection/collection-tree.component.d.ts.map +1 -1
- package/dist/lib/components/collection/collection-tree.component.js +19 -18
- package/dist/lib/components/collection/collection-tree.component.js.map +1 -1
- package/dist/lib/components/collection/collection-view.component.d.ts +6 -4
- package/dist/lib/components/collection/collection-view.component.d.ts.map +1 -1
- package/dist/lib/components/collection/collection-view.component.js +35 -17
- package/dist/lib/components/collection/collection-view.component.js.map +1 -1
- package/dist/lib/components/collection/collections-full-view.component.d.ts +1 -0
- package/dist/lib/components/collection/collections-full-view.component.d.ts.map +1 -1
- package/dist/lib/components/collection/collections-full-view.component.js +109 -107
- package/dist/lib/components/collection/collections-full-view.component.js.map +1 -1
- package/dist/lib/components/conversation/conversation-chat-area.component.d.ts +76 -11
- package/dist/lib/components/conversation/conversation-chat-area.component.d.ts.map +1 -1
- package/dist/lib/components/conversation/conversation-chat-area.component.js +236 -50
- package/dist/lib/components/conversation/conversation-chat-area.component.js.map +1 -1
- package/dist/lib/components/conversation/conversation-list.component.d.ts +49 -1
- package/dist/lib/components/conversation/conversation-list.component.d.ts.map +1 -1
- package/dist/lib/components/conversation/conversation-list.component.js +151 -41
- package/dist/lib/components/conversation/conversation-list.component.js.map +1 -1
- package/dist/lib/components/conversation/conversation-remote-browser-controller.d.ts +11 -3
- package/dist/lib/components/conversation/conversation-remote-browser-controller.d.ts.map +1 -1
- package/dist/lib/components/conversation/conversation-remote-browser-controller.js +40 -4
- package/dist/lib/components/conversation/conversation-remote-browser-controller.js.map +1 -1
- package/dist/lib/components/export/export-modal.component.d.ts +7 -2
- package/dist/lib/components/export/export-modal.component.d.ts.map +1 -1
- package/dist/lib/components/export/export-modal.component.js +13 -2
- package/dist/lib/components/export/export-modal.component.js.map +1 -1
- package/dist/lib/components/library/library-create-dialog.component.d.ts +136 -0
- package/dist/lib/components/library/library-create-dialog.component.d.ts.map +1 -0
- package/dist/lib/components/library/library-create-dialog.component.js +1620 -0
- package/dist/lib/components/library/library-create-dialog.component.js.map +1 -0
- package/dist/lib/components/library/library-full-view.component.d.ts +10 -4
- package/dist/lib/components/library/library-full-view.component.d.ts.map +1 -1
- package/dist/lib/components/library/library-full-view.component.js +216 -40
- package/dist/lib/components/library/library-full-view.component.js.map +1 -1
- package/dist/lib/components/library/library-remote-drive-pane.component.d.ts +97 -0
- package/dist/lib/components/library/library-remote-drive-pane.component.d.ts.map +1 -0
- package/dist/lib/components/library/library-remote-drive-pane.component.js +1229 -0
- package/dist/lib/components/library/library-remote-drive-pane.component.js.map +1 -0
- package/dist/lib/components/library/library-workspace.component.d.ts +265 -0
- package/dist/lib/components/library/library-workspace.component.d.ts.map +1 -0
- package/dist/lib/components/library/library-workspace.component.js +4420 -0
- package/dist/lib/components/library/library-workspace.component.js.map +1 -0
- package/dist/lib/components/library/library.models.d.ts +162 -0
- package/dist/lib/components/library/library.models.d.ts.map +1 -0
- package/dist/lib/components/library/library.models.js +2 -0
- package/dist/lib/components/library/library.models.js.map +1 -0
- package/dist/lib/components/message/conversation-message-rating.component.d.ts +5 -0
- package/dist/lib/components/message/conversation-message-rating.component.d.ts.map +1 -1
- package/dist/lib/components/message/conversation-message-rating.component.js +72 -16
- package/dist/lib/components/message/conversation-message-rating.component.js.map +1 -1
- package/dist/lib/components/message/message-input.component.d.ts +26 -14
- package/dist/lib/components/message/message-input.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-input.component.js +91 -56
- package/dist/lib/components/message/message-input.component.js.map +1 -1
- package/dist/lib/components/message/message-item.component.d.ts +35 -1
- package/dist/lib/components/message/message-item.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-item.component.js +583 -392
- package/dist/lib/components/message/message-item.component.js.map +1 -1
- package/dist/lib/components/message/message-list.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-list.component.js +2 -0
- package/dist/lib/components/message/message-list.component.js.map +1 -1
- package/dist/lib/components/navigation/conversation-navigation.component.js +9 -9
- package/dist/lib/components/navigation/conversation-navigation.component.js.map +1 -1
- package/dist/lib/components/overlay/chat-overlay.component.d.ts +94 -6
- package/dist/lib/components/overlay/chat-overlay.component.d.ts.map +1 -1
- package/dist/lib/components/overlay/chat-overlay.component.js +249 -59
- package/dist/lib/components/overlay/chat-overlay.component.js.map +1 -1
- package/dist/lib/components/project/project-form-modal.component.d.ts +6 -0
- package/dist/lib/components/project/project-form-modal.component.d.ts.map +1 -1
- package/dist/lib/components/project/project-form-modal.component.js +81 -61
- package/dist/lib/components/project/project-form-modal.component.js.map +1 -1
- package/dist/lib/components/project/project-selector.component.d.ts +5 -0
- package/dist/lib/components/project/project-selector.component.d.ts.map +1 -1
- package/dist/lib/components/project/project-selector.component.js +11 -4
- package/dist/lib/components/project/project-selector.component.js.map +1 -1
- package/dist/lib/components/realtime/artifact-workspace/artifact-workspace-channel.d.ts +55 -0
- package/dist/lib/components/realtime/artifact-workspace/artifact-workspace-channel.d.ts.map +1 -0
- package/dist/lib/components/realtime/artifact-workspace/artifact-workspace-channel.js +944 -0
- package/dist/lib/components/realtime/artifact-workspace/artifact-workspace-channel.js.map +1 -0
- package/dist/lib/components/realtime/artifact-workspace/artifact-workspace-engine.d.ts +66 -0
- package/dist/lib/components/realtime/artifact-workspace/artifact-workspace-engine.d.ts.map +1 -0
- package/dist/lib/components/realtime/artifact-workspace/artifact-workspace-engine.js +253 -0
- package/dist/lib/components/realtime/artifact-workspace/artifact-workspace-engine.js.map +1 -0
- package/dist/lib/components/realtime/artifact-workspace/artifact-workspace-types.d.ts +80 -0
- package/dist/lib/components/realtime/artifact-workspace/artifact-workspace-types.d.ts.map +1 -0
- package/dist/lib/components/realtime/artifact-workspace/artifact-workspace-types.js +49 -0
- package/dist/lib/components/realtime/artifact-workspace/artifact-workspace-types.js.map +1 -0
- package/dist/lib/components/realtime/artifact-workspace/realtime-artifact-workspace-surface.component.d.ts +54 -0
- package/dist/lib/components/realtime/artifact-workspace/realtime-artifact-workspace-surface.component.d.ts.map +1 -0
- package/dist/lib/components/realtime/artifact-workspace/realtime-artifact-workspace-surface.component.js +386 -0
- package/dist/lib/components/realtime/artifact-workspace/realtime-artifact-workspace-surface.component.js.map +1 -0
- package/dist/lib/components/realtime/channels/client-context-channel.d.ts +20 -4
- package/dist/lib/components/realtime/channels/client-context-channel.d.ts.map +1 -1
- package/dist/lib/components/realtime/channels/client-context-channel.js +62 -8
- package/dist/lib/components/realtime/channels/client-context-channel.js.map +1 -1
- package/dist/lib/components/realtime/interactive-component/interactive-component-channel.d.ts +1 -0
- package/dist/lib/components/realtime/interactive-component/interactive-component-channel.d.ts.map +1 -1
- package/dist/lib/components/realtime/interactive-component/interactive-component-channel.js +15 -2
- package/dist/lib/components/realtime/interactive-component/interactive-component-channel.js.map +1 -1
- package/dist/lib/components/realtime/realtime-agent-banner.component.js +2 -2
- package/dist/lib/components/realtime/realtime-agent-banner.component.js.map +1 -1
- package/dist/lib/components/realtime/realtime-agent-picker.component.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-agent-picker.component.js +3 -3
- package/dist/lib/components/realtime/realtime-agent-picker.component.js.map +1 -1
- package/dist/lib/components/realtime/realtime-composer.component.js +5 -3
- package/dist/lib/components/realtime/realtime-composer.component.js.map +1 -1
- package/dist/lib/components/realtime/realtime-session-overlay.component.d.ts +81 -32
- package/dist/lib/components/realtime/realtime-session-overlay.component.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-session-overlay.component.js +506 -185
- package/dist/lib/components/realtime/realtime-session-overlay.component.js.map +1 -1
- package/dist/lib/components/realtime/realtime-session-thread.component.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-session-thread.component.js +89 -4
- package/dist/lib/components/realtime/realtime-session-thread.component.js.map +1 -1
- package/dist/lib/components/realtime/realtime-surface-stage.model.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-surface-stage.model.js +2 -1
- package/dist/lib/components/realtime/realtime-surface-stage.model.js.map +1 -1
- package/dist/lib/components/realtime/realtime-surface-tab-style.d.ts +4 -4
- package/dist/lib/components/realtime/realtime-surface-tab-style.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-surface-tab-style.js +5 -5
- package/dist/lib/components/realtime/realtime-surface-tab-style.js.map +1 -1
- package/dist/lib/components/realtime/realtime-surface-tabs.model.d.ts +7 -9
- package/dist/lib/components/realtime/realtime-surface-tabs.model.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-surface-tabs.model.js +12 -13
- package/dist/lib/components/realtime/realtime-surface-tabs.model.js.map +1 -1
- package/dist/lib/components/realtime/remote-browser/remote-browser-channel.d.ts +27 -0
- package/dist/lib/components/realtime/remote-browser/remote-browser-channel.d.ts.map +1 -1
- package/dist/lib/components/realtime/remote-browser/remote-browser-channel.js +141 -2
- package/dist/lib/components/realtime/remote-browser/remote-browser-channel.js.map +1 -1
- package/dist/lib/components/realtime/remote-browser/remote-browser-surface.component.d.ts +101 -3
- package/dist/lib/components/realtime/remote-browser/remote-browser-surface.component.d.ts.map +1 -1
- package/dist/lib/components/realtime/remote-browser/remote-browser-surface.component.js +503 -55
- package/dist/lib/components/realtime/remote-browser/remote-browser-surface.component.js.map +1 -1
- package/dist/lib/components/realtime/remote-browser/remote-browser-tools.d.ts.map +1 -1
- package/dist/lib/components/realtime/remote-browser/remote-browser-tools.js +2 -2
- package/dist/lib/components/realtime/remote-browser/remote-browser-tools.js.map +1 -1
- package/dist/lib/components/realtime/whiteboard/whiteboard-artifact-viewer.component.d.ts +48 -5
- package/dist/lib/components/realtime/whiteboard/whiteboard-artifact-viewer.component.d.ts.map +1 -1
- package/dist/lib/components/realtime/whiteboard/whiteboard-artifact-viewer.component.js +249 -53
- package/dist/lib/components/realtime/whiteboard/whiteboard-artifact-viewer.component.js.map +1 -1
- package/dist/lib/components/realtime/whiteboard/whiteboard-channel.d.ts.map +1 -1
- package/dist/lib/components/realtime/whiteboard/whiteboard-channel.js +1 -1
- package/dist/lib/components/realtime/whiteboard/whiteboard-channel.js.map +1 -1
- package/dist/lib/components/search/search-panel.component.d.ts +10 -0
- package/dist/lib/components/search/search-panel.component.d.ts.map +1 -1
- package/dist/lib/components/search/search-panel.component.js +25 -3
- package/dist/lib/components/search/search-panel.component.js.map +1 -1
- package/dist/lib/components/sidebar/conversation-sidebar.component.d.ts +28 -1
- package/dist/lib/components/sidebar/conversation-sidebar.component.d.ts.map +1 -1
- package/dist/lib/components/sidebar/conversation-sidebar.component.js +51 -6
- package/dist/lib/components/sidebar/conversation-sidebar.component.js.map +1 -1
- package/dist/lib/components/task/tasks-full-view.component.d.ts +31 -8
- package/dist/lib/components/task/tasks-full-view.component.d.ts.map +1 -1
- package/dist/lib/components/task/tasks-full-view.component.js +692 -497
- package/dist/lib/components/task/tasks-full-view.component.js.map +1 -1
- package/dist/lib/components/workspace/conversation-workspace.component.d.ts.map +1 -1
- package/dist/lib/components/workspace/conversation-workspace.component.js +15 -2
- package/dist/lib/components/workspace/conversation-workspace.component.js.map +1 -1
- package/dist/lib/conversations.module.d.ts +66 -61
- package/dist/lib/conversations.module.d.ts.map +1 -1
- package/dist/lib/conversations.module.js +60 -1
- package/dist/lib/conversations.module.js.map +1 -1
- package/dist/lib/events/chat-events.d.ts +45 -0
- package/dist/lib/events/chat-events.d.ts.map +1 -1
- package/dist/lib/events/chat-events.js +64 -0
- package/dist/lib/events/chat-events.js.map +1 -1
- package/dist/lib/models/agent-turn.model.d.ts +7 -1
- package/dist/lib/models/agent-turn.model.d.ts.map +1 -1
- package/dist/lib/models/agent-turn.model.js.map +1 -1
- package/dist/lib/services/agent-state.service.d.ts.map +1 -1
- package/dist/lib/services/agent-state.service.js +14 -3
- package/dist/lib/services/agent-state.service.js.map +1 -1
- package/dist/lib/services/artifact-permission.service.d.ts.map +1 -1
- package/dist/lib/services/artifact-permission.service.js +14 -3
- package/dist/lib/services/artifact-permission.service.js.map +1 -1
- package/dist/lib/services/artifact-state.service.d.ts.map +1 -1
- package/dist/lib/services/artifact-state.service.js +43 -11
- package/dist/lib/services/artifact-state.service.js.map +1 -1
- package/dist/lib/services/conversation-agent.service.d.ts +8 -3
- package/dist/lib/services/conversation-agent.service.d.ts.map +1 -1
- package/dist/lib/services/conversation-agent.service.js +9 -3
- package/dist/lib/services/conversation-agent.service.js.map +1 -1
- package/dist/lib/services/conversation-tasks-filter.d.ts +59 -2
- package/dist/lib/services/conversation-tasks-filter.d.ts.map +1 -1
- package/dist/lib/services/conversation-tasks-filter.js +222 -18
- package/dist/lib/services/conversation-tasks-filter.js.map +1 -1
- package/dist/lib/services/edge-ai/edge-agent-pre-discovery.service.d.ts +85 -0
- package/dist/lib/services/edge-ai/edge-agent-pre-discovery.service.d.ts.map +1 -0
- package/dist/lib/services/edge-ai/edge-agent-pre-discovery.service.js +257 -0
- package/dist/lib/services/edge-ai/edge-agent-pre-discovery.service.js.map +1 -0
- package/dist/lib/services/edge-ai/edge-ai-protocol.d.ts +85 -0
- package/dist/lib/services/edge-ai/edge-ai-protocol.d.ts.map +1 -0
- package/dist/lib/services/edge-ai/edge-ai-protocol.js +10 -0
- package/dist/lib/services/edge-ai/edge-ai-protocol.js.map +1 -0
- package/dist/lib/services/edge-ai/edge-ai-worker-host.d.ts +90 -0
- package/dist/lib/services/edge-ai/edge-ai-worker-host.d.ts.map +1 -0
- package/dist/lib/services/edge-ai/edge-ai-worker-host.js +386 -0
- package/dist/lib/services/edge-ai/edge-ai-worker-host.js.map +1 -0
- package/dist/lib/services/edge-ai/edge-ai.worker.d.ts +13 -0
- package/dist/lib/services/edge-ai/edge-ai.worker.d.ts.map +1 -0
- package/dist/lib/services/edge-ai/edge-ai.worker.js +201 -0
- package/dist/lib/services/edge-ai/edge-ai.worker.js.map +1 -0
- package/dist/lib/services/export.service.d.ts +64 -0
- package/dist/lib/services/export.service.d.ts.map +1 -1
- package/dist/lib/services/export.service.js +185 -6
- package/dist/lib/services/export.service.js.map +1 -1
- package/dist/lib/services/library-creation.service.d.ts +304 -0
- package/dist/lib/services/library-creation.service.d.ts.map +1 -0
- package/dist/lib/services/library-creation.service.js +1244 -0
- package/dist/lib/services/library-creation.service.js.map +1 -0
- package/dist/lib/services/realtime-audio-recorder.d.ts +10 -8
- package/dist/lib/services/realtime-audio-recorder.d.ts.map +1 -1
- package/dist/lib/services/realtime-audio-recorder.js +28 -12
- package/dist/lib/services/realtime-audio-recorder.js.map +1 -1
- package/dist/lib/services/realtime-pairing.d.ts +3 -3
- package/dist/lib/services/realtime-pairing.js +4 -4
- package/dist/lib/services/realtime-pairing.js.map +1 -1
- package/dist/lib/services/realtime-session-review.service.d.ts +14 -0
- package/dist/lib/services/realtime-session-review.service.d.ts.map +1 -1
- package/dist/lib/services/realtime-session-review.service.js +46 -4
- package/dist/lib/services/realtime-session-review.service.js.map +1 -1
- package/dist/lib/services/realtime-session.service.d.ts +10 -3
- package/dist/lib/services/realtime-session.service.d.ts.map +1 -1
- package/dist/lib/services/realtime-session.service.js +8 -3
- package/dist/lib/services/realtime-session.service.js.map +1 -1
- package/dist/lib/services/search.service.d.ts +19 -2
- package/dist/lib/services/search.service.d.ts.map +1 -1
- package/dist/lib/services/search.service.js +99 -36
- package/dist/lib/services/search.service.js.map +1 -1
- package/dist/lib/utils/agent-artifact-summary.d.ts +1 -1
- package/dist/lib/utils/agent-artifact-summary.d.ts.map +1 -1
- package/dist/lib/utils/agent-artifact-summary.js +1 -1
- package/dist/lib/utils/agent-artifact-summary.js.map +1 -1
- package/dist/lib/utils/decision-routing.d.ts +5 -2
- package/dist/lib/utils/decision-routing.d.ts.map +1 -1
- package/dist/lib/utils/decision-routing.js +9 -4
- package/dist/lib/utils/decision-routing.js.map +1 -1
- package/dist/public-api.d.ts +13 -0
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +15 -1
- package/dist/public-api.js.map +1 -1
- package/package.json +42 -37
|
@@ -1,21 +1,50 @@
|
|
|
1
1
|
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Input, NgZone, Output, ViewChild, inject } from '@angular/core';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { DomSanitizer } from '@angular/platform-browser';
|
|
3
4
|
import { SharedGenericModule } from '@memberjunction/ng-shared-generic';
|
|
5
|
+
import { IsAllowedExternalMediaUrl } from '../media/media-channel-state';
|
|
4
6
|
import * as i0 from "@angular/core";
|
|
5
7
|
import * as i1 from "@memberjunction/ng-shared-generic";
|
|
6
|
-
const _c0 = ["
|
|
7
|
-
const _c1 = ["
|
|
8
|
-
|
|
8
|
+
const _c0 = ["viewportEl"];
|
|
9
|
+
const _c1 = ["frameCanvas"];
|
|
10
|
+
const _c2 = ["cursorCanvas"];
|
|
11
|
+
function RemoteBrowserSurfaceComponent_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
12
|
+
i0.ɵɵelementStart(0, "a", 13);
|
|
13
|
+
i0.ɵɵtext(1);
|
|
14
|
+
i0.ɵɵelementEnd();
|
|
15
|
+
i0.ɵɵelementStart(2, "a", 14);
|
|
16
|
+
i0.ɵɵelement(3, "i", 15);
|
|
17
|
+
i0.ɵɵelementEnd();
|
|
18
|
+
} if (rf & 2) {
|
|
19
|
+
const safeHref_r1 = ctx;
|
|
20
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
21
|
+
i0.ɵɵproperty("href", safeHref_r1, i0.ɵɵsanitizeUrl)("title", ctx_r1.CurrentUrl || "");
|
|
22
|
+
i0.ɵɵadvance();
|
|
23
|
+
i0.ɵɵtextInterpolate(ctx_r1.CurrentUrl);
|
|
24
|
+
i0.ɵɵadvance();
|
|
25
|
+
i0.ɵɵproperty("href", safeHref_r1, i0.ɵɵsanitizeUrl);
|
|
26
|
+
} }
|
|
27
|
+
function RemoteBrowserSurfaceComponent_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
9
28
|
i0.ɵɵelementStart(0, "span", 7);
|
|
10
|
-
i0.ɵɵ
|
|
29
|
+
i0.ɵɵtext(1);
|
|
30
|
+
i0.ɵɵelementEnd();
|
|
31
|
+
} if (rf & 2) {
|
|
32
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
33
|
+
i0.ɵɵproperty("title", ctx_r1.CurrentUrl || "");
|
|
34
|
+
i0.ɵɵadvance();
|
|
35
|
+
i0.ɵɵtextInterpolate(ctx_r1.CurrentUrl || "No page loaded yet");
|
|
36
|
+
} }
|
|
37
|
+
function RemoteBrowserSurfaceComponent_Conditional_7_Template(rf, ctx) { if (rf & 1) {
|
|
38
|
+
i0.ɵɵelementStart(0, "span", 8);
|
|
39
|
+
i0.ɵɵelement(1, "i", 16);
|
|
11
40
|
i0.ɵɵtext(2, " You're driving ");
|
|
12
41
|
i0.ɵɵelementEnd();
|
|
13
42
|
} }
|
|
14
43
|
function RemoteBrowserSurfaceComponent_Conditional_8_Template(rf, ctx) { if (rf & 1) {
|
|
15
|
-
const
|
|
16
|
-
i0.ɵɵelementStart(0, "button",
|
|
17
|
-
i0.ɵɵlistener("click", function RemoteBrowserSurfaceComponent_Conditional_8_Template_button_click_0_listener() { i0.ɵɵrestoreView(
|
|
18
|
-
i0.ɵɵelement(1, "i",
|
|
44
|
+
const _r3 = i0.ɵɵgetCurrentView();
|
|
45
|
+
i0.ɵɵelementStart(0, "button", 17);
|
|
46
|
+
i0.ɵɵlistener("click", function RemoteBrowserSurfaceComponent_Conditional_8_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.ToggleAudioMuted()); });
|
|
47
|
+
i0.ɵɵelement(1, "i", 18);
|
|
19
48
|
i0.ɵɵelementEnd();
|
|
20
49
|
} if (rf & 2) {
|
|
21
50
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
@@ -25,20 +54,121 @@ function RemoteBrowserSurfaceComponent_Conditional_8_Template(rf, ctx) { if (rf
|
|
|
25
54
|
i0.ɵɵadvance();
|
|
26
55
|
i0.ɵɵclassProp("fa-volume-high", !ctx_r1.AudioMuted)("fa-volume-xmark", ctx_r1.AudioMuted);
|
|
27
56
|
} }
|
|
28
|
-
function
|
|
29
|
-
i0.ɵɵ
|
|
57
|
+
function RemoteBrowserSurfaceComponent_Conditional_11_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
58
|
+
i0.ɵɵelementStart(0, "div", 19);
|
|
59
|
+
i0.ɵɵelement(1, "img", 21);
|
|
60
|
+
i0.ɵɵelementEnd();
|
|
61
|
+
} if (rf & 2) {
|
|
62
|
+
i0.ɵɵadvance();
|
|
63
|
+
i0.ɵɵproperty("src", ctx, i0.ɵɵsanitizeUrl);
|
|
64
|
+
} }
|
|
65
|
+
function RemoteBrowserSurfaceComponent_Conditional_11_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
66
|
+
i0.ɵɵelementStart(0, "div", 19);
|
|
67
|
+
i0.ɵɵelement(1, "iframe", 22);
|
|
68
|
+
i0.ɵɵelementEnd();
|
|
69
|
+
} if (rf & 2) {
|
|
70
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
71
|
+
i0.ɵɵadvance();
|
|
72
|
+
i0.ɵɵproperty("src", ctx, i0.ɵɵsanitizeResourceUrl)("title", ctx_r1.CurrentUrl || "Last visited browser page");
|
|
73
|
+
} }
|
|
74
|
+
function RemoteBrowserSurfaceComponent_Conditional_11_Conditional_2_For_5_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
75
|
+
i0.ɵɵelementStart(0, "span", 26);
|
|
76
|
+
i0.ɵɵtext(1);
|
|
77
|
+
i0.ɵɵelementEnd();
|
|
78
|
+
} if (rf & 2) {
|
|
79
|
+
const entry_r4 = i0.ɵɵnextContext().$implicit;
|
|
80
|
+
i0.ɵɵadvance();
|
|
81
|
+
i0.ɵɵtextInterpolate(entry_r4.ActionLabel);
|
|
30
82
|
} }
|
|
31
|
-
function
|
|
32
|
-
i0.ɵɵelementStart(0, "
|
|
33
|
-
i0.ɵɵ
|
|
83
|
+
function RemoteBrowserSurfaceComponent_Conditional_11_Conditional_2_For_5_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
84
|
+
i0.ɵɵelementStart(0, "a", 27);
|
|
85
|
+
i0.ɵɵtext(1);
|
|
34
86
|
i0.ɵɵelementEnd();
|
|
87
|
+
} if (rf & 2) {
|
|
88
|
+
const entry_r4 = i0.ɵɵnextContext().$implicit;
|
|
89
|
+
i0.ɵɵproperty("href", ctx, i0.ɵɵsanitizeUrl)("title", entry_r4.Url);
|
|
90
|
+
i0.ɵɵadvance();
|
|
91
|
+
i0.ɵɵtextInterpolate1(" ", entry_r4.Url, " ");
|
|
35
92
|
} }
|
|
36
|
-
function
|
|
37
|
-
i0.ɵɵelementStart(0, "
|
|
38
|
-
i0.ɵɵ
|
|
39
|
-
i0.ɵɵconditionalCreate(3, RemoteBrowserSurfaceComponent_Conditional_10_Conditional_3_Template, 2, 0, "canvas", 17);
|
|
93
|
+
function RemoteBrowserSurfaceComponent_Conditional_11_Conditional_2_For_5_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
94
|
+
i0.ɵɵelementStart(0, "span", 28);
|
|
95
|
+
i0.ɵɵtext(1);
|
|
40
96
|
i0.ɵɵelementEnd();
|
|
41
|
-
|
|
97
|
+
} if (rf & 2) {
|
|
98
|
+
const entry_r4 = i0.ɵɵnextContext().$implicit;
|
|
99
|
+
i0.ɵɵadvance();
|
|
100
|
+
i0.ɵɵtextInterpolate(entry_r4.Url);
|
|
101
|
+
} }
|
|
102
|
+
function RemoteBrowserSurfaceComponent_Conditional_11_Conditional_2_For_5_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
103
|
+
i0.ɵɵelementStart(0, "span", 29);
|
|
104
|
+
i0.ɵɵtext(1);
|
|
105
|
+
i0.ɵɵelementEnd();
|
|
106
|
+
} if (rf & 2) {
|
|
107
|
+
const entry_r4 = i0.ɵɵnextContext().$implicit;
|
|
108
|
+
i0.ɵɵadvance();
|
|
109
|
+
i0.ɵɵtextInterpolate(entry_r4.Detail);
|
|
110
|
+
} }
|
|
111
|
+
function RemoteBrowserSurfaceComponent_Conditional_11_Conditional_2_For_5_Template(rf, ctx) { if (rf & 1) {
|
|
112
|
+
i0.ɵɵelementStart(0, "li", 25);
|
|
113
|
+
i0.ɵɵconditionalCreate(1, RemoteBrowserSurfaceComponent_Conditional_11_Conditional_2_For_5_Conditional_1_Template, 2, 1, "span", 26);
|
|
114
|
+
i0.ɵɵconditionalCreate(2, RemoteBrowserSurfaceComponent_Conditional_11_Conditional_2_For_5_Conditional_2_Template, 2, 3, "a", 27)(3, RemoteBrowserSurfaceComponent_Conditional_11_Conditional_2_For_5_Conditional_3_Template, 2, 1, "span", 28);
|
|
115
|
+
i0.ɵɵconditionalCreate(4, RemoteBrowserSurfaceComponent_Conditional_11_Conditional_2_For_5_Conditional_4_Template, 2, 1, "span", 29);
|
|
116
|
+
i0.ɵɵelementEnd();
|
|
117
|
+
} if (rf & 2) {
|
|
118
|
+
let tmp_14_0;
|
|
119
|
+
const entry_r4 = ctx.$implicit;
|
|
120
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
121
|
+
i0.ɵɵadvance();
|
|
122
|
+
i0.ɵɵconditional(entry_r4.ActionLabel ? 1 : -1);
|
|
123
|
+
i0.ɵɵadvance();
|
|
124
|
+
i0.ɵɵconditional((tmp_14_0 = ctx_r1.SafeExternalUrl(entry_r4.Url)) ? 2 : 3, tmp_14_0);
|
|
125
|
+
i0.ɵɵadvance(2);
|
|
126
|
+
i0.ɵɵconditional(entry_r4.Detail ? 4 : -1);
|
|
127
|
+
} }
|
|
128
|
+
function RemoteBrowserSurfaceComponent_Conditional_11_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
129
|
+
i0.ɵɵelementStart(0, "details", 20)(1, "summary", 23);
|
|
130
|
+
i0.ɵɵtext(2);
|
|
131
|
+
i0.ɵɵelementEnd();
|
|
132
|
+
i0.ɵɵelementStart(3, "ul", 24);
|
|
133
|
+
i0.ɵɵrepeaterCreate(4, RemoteBrowserSurfaceComponent_Conditional_11_Conditional_2_For_5_Template, 5, 3, "li", 25, i0.ɵɵrepeaterTrackByIndex);
|
|
134
|
+
i0.ɵɵelementEnd()();
|
|
135
|
+
} if (rf & 2) {
|
|
136
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
137
|
+
i0.ɵɵproperty("open", !ctx_r1.SafeScreenshotUrl && !ctx_r1.SafeIframeUrl);
|
|
138
|
+
i0.ɵɵadvance(2);
|
|
139
|
+
i0.ɵɵtextInterpolate1("Visited pages (", ctx_r1.ReviewHistory.length, ")");
|
|
140
|
+
i0.ɵɵadvance(2);
|
|
141
|
+
i0.ɵɵrepeater(ctx_r1.ReviewHistory);
|
|
142
|
+
} }
|
|
143
|
+
function RemoteBrowserSurfaceComponent_Conditional_11_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
144
|
+
i0.ɵɵelementStart(0, "div", 12)(1, "span", 30);
|
|
145
|
+
i0.ɵɵtext(2, "Browser session ended without a saved snapshot.");
|
|
146
|
+
i0.ɵɵelementEnd()();
|
|
147
|
+
} }
|
|
148
|
+
function RemoteBrowserSurfaceComponent_Conditional_11_Template(rf, ctx) { if (rf & 1) {
|
|
149
|
+
i0.ɵɵconditionalCreate(0, RemoteBrowserSurfaceComponent_Conditional_11_Conditional_0_Template, 2, 1, "div", 19)(1, RemoteBrowserSurfaceComponent_Conditional_11_Conditional_1_Template, 2, 2, "div", 19);
|
|
150
|
+
i0.ɵɵconditionalCreate(2, RemoteBrowserSurfaceComponent_Conditional_11_Conditional_2_Template, 6, 2, "details", 20)(3, RemoteBrowserSurfaceComponent_Conditional_11_Conditional_3_Template, 3, 0, "div", 12);
|
|
151
|
+
} if (rf & 2) {
|
|
152
|
+
let tmp_2_0;
|
|
153
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
154
|
+
i0.ɵɵconditional((tmp_2_0 = ctx_r1.SafeScreenshotUrl) ? 0 : (tmp_2_0 = ctx_r1.SafeIframeUrl) ? 1 : -1, tmp_2_0);
|
|
155
|
+
i0.ɵɵadvance(2);
|
|
156
|
+
i0.ɵɵconditional(ctx_r1.ReviewHistory.length > 0 ? 2 : !ctx_r1.SafeScreenshotUrl && !ctx_r1.SafeIframeUrl ? 3 : -1);
|
|
157
|
+
} }
|
|
158
|
+
function RemoteBrowserSurfaceComponent_Conditional_12_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
159
|
+
i0.ɵɵelement(0, "canvas", 33, 2);
|
|
160
|
+
} }
|
|
161
|
+
function RemoteBrowserSurfaceComponent_Conditional_12_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
162
|
+
i0.ɵɵelementStart(0, "div", 12);
|
|
163
|
+
i0.ɵɵelement(1, "mj-loading", 34);
|
|
164
|
+
i0.ɵɵelementEnd();
|
|
165
|
+
} }
|
|
166
|
+
function RemoteBrowserSurfaceComponent_Conditional_12_Template(rf, ctx) { if (rf & 1) {
|
|
167
|
+
i0.ɵɵelementStart(0, "div", 31);
|
|
168
|
+
i0.ɵɵelement(1, "canvas", 32, 1);
|
|
169
|
+
i0.ɵɵconditionalCreate(3, RemoteBrowserSurfaceComponent_Conditional_12_Conditional_3_Template, 2, 0, "canvas", 33);
|
|
170
|
+
i0.ɵɵelementEnd();
|
|
171
|
+
i0.ɵɵconditionalCreate(4, RemoteBrowserSurfaceComponent_Conditional_12_Conditional_4_Template, 2, 0, "div", 12);
|
|
42
172
|
} if (rf & 2) {
|
|
43
173
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
44
174
|
i0.ɵɵclassProp("rb-hidden", !ctx_r1.HasFrame);
|
|
@@ -49,23 +179,30 @@ function RemoteBrowserSurfaceComponent_Conditional_10_Template(rf, ctx) { if (rf
|
|
|
49
179
|
i0.ɵɵadvance();
|
|
50
180
|
i0.ɵɵconditional(!ctx_r1.HasFrame ? 4 : -1);
|
|
51
181
|
} }
|
|
52
|
-
function
|
|
53
|
-
i0.ɵɵelement(0, "img",
|
|
182
|
+
function RemoteBrowserSurfaceComponent_Conditional_13_Template(rf, ctx) { if (rf & 1) {
|
|
183
|
+
i0.ɵɵelement(0, "img", 11);
|
|
54
184
|
} if (rf & 2) {
|
|
55
185
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
56
186
|
i0.ɵɵproperty("src", ctx_r1.ScreenshotDataUrl, i0.ɵɵsanitizeUrl);
|
|
57
187
|
} }
|
|
58
|
-
function
|
|
59
|
-
i0.ɵɵelementStart(0, "div",
|
|
60
|
-
i0.ɵɵelement(1, "mj-loading",
|
|
188
|
+
function RemoteBrowserSurfaceComponent_Conditional_14_Template(rf, ctx) { if (rf & 1) {
|
|
189
|
+
i0.ɵɵelementStart(0, "div", 12);
|
|
190
|
+
i0.ɵɵelement(1, "mj-loading", 34);
|
|
61
191
|
i0.ɵɵelementEnd();
|
|
62
192
|
} }
|
|
193
|
+
const RASTER_DATA_URL_RE = /^data:image\/(?:png|jpeg|webp);base64,[A-Za-z0-9+/=]+$/;
|
|
194
|
+
/** Validates that a persisted screenshot string is an inline raster PNG/JPEG/WebP data URL (never SVG/script). */
|
|
195
|
+
export function IsSafeRasterImageDataUrl(value) {
|
|
196
|
+
return typeof value === 'string' && RASTER_DATA_URL_RE.test(value);
|
|
197
|
+
}
|
|
63
198
|
/** How often the surface polls the server for a fresh page screenshot while bound (~1.4 fps). */
|
|
64
199
|
const SNAPSHOT_POLL_MS = 700;
|
|
65
200
|
/** Min interval between forwarded pointer-move samples during takeover (~20 moves/sec). */
|
|
66
201
|
const POINTER_MOVE_THROTTLE_MS = 50;
|
|
67
202
|
/** Min interval between forwarded scroll samples during takeover; the deltas coalesce between sends (~25/sec). */
|
|
68
203
|
const SCROLL_THROTTLE_MS = 40;
|
|
204
|
+
/** Debounce delay (ms) before forwarding a ResizeObserver viewport change to the server. */
|
|
205
|
+
const VIEWPORT_RESIZE_DEBOUNCE_MS = 120;
|
|
69
206
|
/** Radius (px) of the synthetic cursor ring drawn on the overlay so the user can see their pointer. */
|
|
70
207
|
const SYNTHETIC_CURSOR_RADIUS = 6;
|
|
71
208
|
/**
|
|
@@ -108,6 +245,35 @@ export function MapToViewportCoords(clientX, clientY, rect, canvasWidth, canvasH
|
|
|
108
245
|
const y = Math.round((clientY - rect.top) / rect.height * canvasHeight);
|
|
109
246
|
return { x, y };
|
|
110
247
|
}
|
|
248
|
+
/**
|
|
249
|
+
* Computes the largest CSS display box (in integer pixels) that fits within `viewportWidth × viewportHeight`
|
|
250
|
+
* while preserving the frame's exact aspect ratio (`frameWidth / frameHeight`).
|
|
251
|
+
*
|
|
252
|
+
* Pure + framework-free so it's unit-testable without a DOM.
|
|
253
|
+
*
|
|
254
|
+
* @param viewportWidth Usable container width in CSS pixels.
|
|
255
|
+
* @param viewportHeight Usable container height in CSS pixels.
|
|
256
|
+
* @param frameWidth Frame bitmap width in pixels.
|
|
257
|
+
* @param frameHeight Frame bitmap height in pixels.
|
|
258
|
+
* @returns Fitted CSS display box `{ Width, Height }`, or `null` when any dimension is non-positive.
|
|
259
|
+
*/
|
|
260
|
+
export function ComputeFittedFrameSize(viewportWidth, viewportHeight, frameWidth, frameHeight) {
|
|
261
|
+
if (!Number.isFinite(viewportWidth) ||
|
|
262
|
+
!Number.isFinite(viewportHeight) ||
|
|
263
|
+
!Number.isFinite(frameWidth) ||
|
|
264
|
+
!Number.isFinite(frameHeight) ||
|
|
265
|
+
viewportWidth <= 0 ||
|
|
266
|
+
viewportHeight <= 0 ||
|
|
267
|
+
frameWidth <= 0 ||
|
|
268
|
+
frameHeight <= 0) {
|
|
269
|
+
return null;
|
|
270
|
+
}
|
|
271
|
+
const scale = Math.min(viewportWidth / frameWidth, viewportHeight / frameHeight);
|
|
272
|
+
return {
|
|
273
|
+
Width: Math.max(1, Math.round(frameWidth * scale)),
|
|
274
|
+
Height: Math.max(1, Math.round(frameHeight * scale)),
|
|
275
|
+
};
|
|
276
|
+
}
|
|
111
277
|
/**
|
|
112
278
|
* LIVE REMOTE-BROWSER surface (`mj-realtime-remote-browser-surface`) — the Browser channel
|
|
113
279
|
* tab's pane. It renders the SERVER-hosted browser the agent drives: a refreshing screenshot
|
|
@@ -207,6 +373,11 @@ export class RemoteBrowserSurfaceComponent {
|
|
|
207
373
|
_interactive = false;
|
|
208
374
|
/** Emits each human-takeover input (pointer move/click, key) the user performs on the live canvas. */
|
|
209
375
|
HumanInput = new EventEmitter();
|
|
376
|
+
/**
|
|
377
|
+
* Emits the usable drawer viewport size (`{ Width, Height }` below the toolbar) when the first frame
|
|
378
|
+
* arrives and whenever the user resizes or maximizes/restores the pane (debounced, keeping the latest size).
|
|
379
|
+
*/
|
|
380
|
+
ViewportResize = new EventEmitter();
|
|
210
381
|
/**
|
|
211
382
|
* Whether the live tab-audio stream is available — the channel sets this `true` when the server confirms
|
|
212
383
|
* it is pushing audio. Drives whether the speaker toggle renders in the live-view bar.
|
|
@@ -237,12 +408,44 @@ export class RemoteBrowserSurfaceComponent {
|
|
|
237
408
|
get IsCapturingInput() {
|
|
238
409
|
return this.surfaceFocused && this.CanTakeOver;
|
|
239
410
|
}
|
|
411
|
+
/** Read-only session review mode: disables live polling/takeover and renders saved snapshot/history. */
|
|
412
|
+
ReadOnly = false;
|
|
413
|
+
/** Visited page history shown in read-only review mode. */
|
|
414
|
+
ReviewHistory = [];
|
|
240
415
|
/** The current screenshot as a `data:` URL, or `null` before the first snapshot arrives. */
|
|
241
416
|
ScreenshotDataUrl = null;
|
|
242
417
|
/** The current page URL reported by the server, or `null` when none. */
|
|
243
418
|
CurrentUrl = null;
|
|
244
419
|
/** Whether at least one pushed screencast frame has been painted (drives the canvas placeholder). */
|
|
245
420
|
HasFrame = false;
|
|
421
|
+
sanitizer = inject(DomSanitizer);
|
|
422
|
+
cachedIframeKey = null;
|
|
423
|
+
cachedIframeValue = null;
|
|
424
|
+
/** Returns `ScreenshotDataUrl` only when it is a safe inline raster image data URL. */
|
|
425
|
+
get SafeScreenshotUrl() {
|
|
426
|
+
return IsSafeRasterImageDataUrl(this.ScreenshotDataUrl) ? this.ScreenshotDataUrl : null;
|
|
427
|
+
}
|
|
428
|
+
/**
|
|
429
|
+
* Returns a sanitized `SafeResourceUrl` for the last visited `http(s)` page when no saved
|
|
430
|
+
* screenshot is available in review mode, so past sessions still display the last page.
|
|
431
|
+
*/
|
|
432
|
+
get SafeIframeUrl() {
|
|
433
|
+
const safe = this.SafeExternalUrl(this.CurrentUrl);
|
|
434
|
+
if (!safe) {
|
|
435
|
+
return null;
|
|
436
|
+
}
|
|
437
|
+
if (this.cachedIframeKey !== safe) {
|
|
438
|
+
this.cachedIframeKey = safe;
|
|
439
|
+
this.cachedIframeValue = this.sanitizer.bypassSecurityTrustResourceUrl(safe);
|
|
440
|
+
}
|
|
441
|
+
return this.cachedIframeValue;
|
|
442
|
+
}
|
|
443
|
+
/** Returns `url` only when it uses an explicit http/https origin. */
|
|
444
|
+
SafeExternalUrl(url) {
|
|
445
|
+
return IsAllowedExternalMediaUrl(url) ? url.trim() : null;
|
|
446
|
+
}
|
|
447
|
+
/** The usable area below the toolbar whose dimensions drive remote viewport resizing. */
|
|
448
|
+
viewportEl;
|
|
246
449
|
/** The canvas the pushed screencast frames are painted onto (present only while {@link Streaming}). */
|
|
247
450
|
frameCanvas;
|
|
248
451
|
/** The transparent overlay the synthetic cursor is drawn onto (present only while {@link CanTakeOver}). */
|
|
@@ -267,6 +470,14 @@ export class RemoteBrowserSurfaceComponent {
|
|
|
267
470
|
pendingFrameDataUrl = null;
|
|
268
471
|
/** True while a paint is scheduled, so rapid frames coalesce to one `requestAnimationFrame`. */
|
|
269
472
|
framePaintScheduled = false;
|
|
473
|
+
/** Active ResizeObserver watching {@link viewportEl}; `null` when not attached. */
|
|
474
|
+
resizeObserver = null;
|
|
475
|
+
/** Pending debounce timer for {@link ViewportResize} emissions during a divider drag / pane resize. */
|
|
476
|
+
resizeDebounceTimer = null;
|
|
477
|
+
/** Most recent measured usable viewport size (`{ Width, Height }`). */
|
|
478
|
+
latestViewportSize = null;
|
|
479
|
+
/** Last viewport size emitted through {@link ViewportResize}, used to deduplicate unchanged measurements. */
|
|
480
|
+
lastEmittedViewportSize = null;
|
|
270
481
|
/** The canvas element takeover listeners are currently bound to, or `null` when detached. */
|
|
271
482
|
takeoverCanvas = null;
|
|
272
483
|
/** Timestamp (ms) of the last forwarded pointer-move, for throttling the high-frequency stream. */
|
|
@@ -317,9 +528,13 @@ export class RemoteBrowserSurfaceComponent {
|
|
|
317
528
|
this.initialized = true;
|
|
318
529
|
this.resumePolling();
|
|
319
530
|
}
|
|
531
|
+
ngAfterViewInit() {
|
|
532
|
+
this.attachViewportResizeObserver();
|
|
533
|
+
}
|
|
320
534
|
ngOnDestroy() {
|
|
321
535
|
this.destroyed = true;
|
|
322
536
|
this.stopPolling();
|
|
537
|
+
this.detachViewportResizeObserver();
|
|
323
538
|
this.detachTakeoverListeners();
|
|
324
539
|
}
|
|
325
540
|
/**
|
|
@@ -327,7 +542,7 @@ export class RemoteBrowserSurfaceComponent {
|
|
|
327
542
|
* traffic) or the surface is out of sight.
|
|
328
543
|
*/
|
|
329
544
|
resumePolling() {
|
|
330
|
-
if (this.Streaming || !this._visible || this.destroyed) {
|
|
545
|
+
if (this.ReadOnly || this.Streaming || !this._visible || this.destroyed) {
|
|
331
546
|
return;
|
|
332
547
|
}
|
|
333
548
|
void this.pollOnce();
|
|
@@ -376,6 +591,7 @@ export class RemoteBrowserSurfaceComponent {
|
|
|
376
591
|
if (this.destroyed) {
|
|
377
592
|
return;
|
|
378
593
|
}
|
|
594
|
+
const hadSnapshot = this.HasSnapshot;
|
|
379
595
|
const base64 = snapshot?.ScreenshotBase64 ?? null;
|
|
380
596
|
const nextUrl = snapshot?.CurrentUrl ?? null;
|
|
381
597
|
const nextDataUrl = base64 ? `data:image/png;base64,${base64}` : this.ScreenshotDataUrl;
|
|
@@ -386,6 +602,9 @@ export class RemoteBrowserSurfaceComponent {
|
|
|
386
602
|
this.CurrentUrl = nextUrl;
|
|
387
603
|
// Re-enter the zone for the OnPush update (the poll runs outside Angular).
|
|
388
604
|
this.zone.run(() => this.cdr.markForCheck());
|
|
605
|
+
if (!hadSnapshot && this.HasSnapshot) {
|
|
606
|
+
this.notifyInitialViewportSize();
|
|
607
|
+
}
|
|
389
608
|
}
|
|
390
609
|
/**
|
|
391
610
|
* Paints one PUSHED screencast frame (base64 JPEG) onto the canvas. Called by the channel plugin for
|
|
@@ -445,17 +664,173 @@ export class RemoteBrowserSurfaceComponent {
|
|
|
445
664
|
if (w > 0 && h > 0 && (canvas.width !== w || canvas.height !== h)) {
|
|
446
665
|
canvas.width = w;
|
|
447
666
|
canvas.height = h;
|
|
667
|
+
this.updateCanvasDisplaySize();
|
|
668
|
+
if (this.cursorViewportPoint) {
|
|
669
|
+
this.scheduleCursorPaint();
|
|
670
|
+
}
|
|
671
|
+
else {
|
|
672
|
+
const overlay = this.cursorCanvas?.nativeElement;
|
|
673
|
+
if (overlay && (overlay.width !== w || overlay.height !== h)) {
|
|
674
|
+
overlay.width = w;
|
|
675
|
+
overlay.height = h;
|
|
676
|
+
}
|
|
677
|
+
}
|
|
448
678
|
}
|
|
449
679
|
ctx.drawImage(this.frameImage, 0, 0);
|
|
450
680
|
if (!this.HasFrame) {
|
|
451
681
|
// First frame arrived — re-enter the zone to clear the placeholder + flip the "Live" indicator,
|
|
452
|
-
//
|
|
682
|
+
// attach takeover listeners now that the canvas element exists in the DOM, and report the usable
|
|
683
|
+
// drawer viewport size so the server resizes the remote page in place.
|
|
453
684
|
this.zone.run(() => {
|
|
454
685
|
this.HasFrame = true;
|
|
455
686
|
this.cdr.markForCheck();
|
|
456
687
|
});
|
|
457
688
|
this.syncTakeoverListeners();
|
|
689
|
+
this.updateCanvasDisplaySize();
|
|
690
|
+
this.notifyInitialViewportSize();
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
// ----- viewport measurement & resize observation ------------------------------------------
|
|
694
|
+
/**
|
|
695
|
+
* Attaches a `ResizeObserver` to `.rb-viewport` (the usable space below the toolbar) outside Angular's
|
|
696
|
+
* zone. Sends the usable width and height when the first frame arrives and whenever the user drags the
|
|
697
|
+
* divider or maximizes/restores the pane (debounced, keeping the latest size).
|
|
698
|
+
*/
|
|
699
|
+
attachViewportResizeObserver() {
|
|
700
|
+
const el = this.viewportEl?.nativeElement;
|
|
701
|
+
if (this.ReadOnly || !el || this.destroyed) {
|
|
702
|
+
return;
|
|
703
|
+
}
|
|
704
|
+
const initial = this.measureViewport();
|
|
705
|
+
if (initial) {
|
|
706
|
+
this.latestViewportSize = initial;
|
|
707
|
+
this.updateCanvasDisplaySize();
|
|
708
|
+
if (this.HasSnapshot) {
|
|
709
|
+
this.emitViewportResizeImmediate(initial);
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
if (typeof ResizeObserver === 'undefined') {
|
|
713
|
+
return;
|
|
714
|
+
}
|
|
715
|
+
this.zone.runOutsideAngular(() => {
|
|
716
|
+
this.resizeObserver = new ResizeObserver((entries) => {
|
|
717
|
+
if (this.destroyed) {
|
|
718
|
+
return;
|
|
719
|
+
}
|
|
720
|
+
const latestEntry = entries.length > 0 ? entries[entries.length - 1] : undefined;
|
|
721
|
+
const measured = this.measureViewport(latestEntry);
|
|
722
|
+
if (!measured) {
|
|
723
|
+
return;
|
|
724
|
+
}
|
|
725
|
+
this.latestViewportSize = measured;
|
|
726
|
+
this.updateCanvasDisplaySize();
|
|
727
|
+
if (this.HasSnapshot) {
|
|
728
|
+
this.scheduleViewportResizeEmit();
|
|
729
|
+
}
|
|
730
|
+
});
|
|
731
|
+
this.resizeObserver.observe(el);
|
|
732
|
+
});
|
|
733
|
+
}
|
|
734
|
+
/** Disconnects the `ResizeObserver` and cancels any pending debounce timer. */
|
|
735
|
+
detachViewportResizeObserver() {
|
|
736
|
+
if (this.resizeDebounceTimer !== null) {
|
|
737
|
+
clearTimeout(this.resizeDebounceTimer);
|
|
738
|
+
this.resizeDebounceTimer = null;
|
|
739
|
+
}
|
|
740
|
+
if (this.resizeObserver) {
|
|
741
|
+
this.resizeObserver.disconnect();
|
|
742
|
+
this.resizeObserver = null;
|
|
743
|
+
}
|
|
744
|
+
}
|
|
745
|
+
/**
|
|
746
|
+
* Measures the usable viewport container (`.rb-viewport`) in integer CSS pixels, preferring a
|
|
747
|
+
* `ResizeObserverEntry`'s `contentRect` and falling back to `clientWidth`/`clientHeight` or
|
|
748
|
+
* `getBoundingClientRect()`. Returns `null` when the element has zero or non-finite dimensions.
|
|
749
|
+
*/
|
|
750
|
+
measureViewport(entry) {
|
|
751
|
+
const contentWidth = entry?.contentRect?.width ?? 0;
|
|
752
|
+
const contentHeight = entry?.contentRect?.height ?? 0;
|
|
753
|
+
const el = this.viewportEl?.nativeElement;
|
|
754
|
+
const rect = el?.getBoundingClientRect?.();
|
|
755
|
+
const rawWidth = contentWidth > 0 ? contentWidth : (el && el.clientWidth > 0 ? el.clientWidth : (rect?.width ?? 0));
|
|
756
|
+
const rawHeight = contentHeight > 0 ? contentHeight : (el && el.clientHeight > 0 ? el.clientHeight : (rect?.height ?? 0));
|
|
757
|
+
const width = Math.floor(rawWidth);
|
|
758
|
+
const height = Math.floor(rawHeight);
|
|
759
|
+
if (!Number.isFinite(width) || !Number.isFinite(height) || width <= 0 || height <= 0) {
|
|
760
|
+
return null;
|
|
761
|
+
}
|
|
762
|
+
return { Width: width, Height: height };
|
|
763
|
+
}
|
|
764
|
+
/** Sends the current usable viewport size immediately when the first frame/snapshot arrives. */
|
|
765
|
+
notifyInitialViewportSize() {
|
|
766
|
+
if (this.ReadOnly) {
|
|
767
|
+
return;
|
|
768
|
+
}
|
|
769
|
+
const size = this.measureViewport() ?? this.latestViewportSize;
|
|
770
|
+
if (!size) {
|
|
771
|
+
return;
|
|
772
|
+
}
|
|
773
|
+
this.latestViewportSize = size;
|
|
774
|
+
this.emitViewportResizeImmediate(size);
|
|
775
|
+
}
|
|
776
|
+
/** Debounces rapid `ResizeObserver` notifications, keeping {@link latestViewportSize}. */
|
|
777
|
+
scheduleViewportResizeEmit() {
|
|
778
|
+
if (this.resizeDebounceTimer !== null) {
|
|
779
|
+
clearTimeout(this.resizeDebounceTimer);
|
|
458
780
|
}
|
|
781
|
+
this.zone.runOutsideAngular(() => {
|
|
782
|
+
this.resizeDebounceTimer = setTimeout(() => {
|
|
783
|
+
this.resizeDebounceTimer = null;
|
|
784
|
+
if (this.destroyed || !this.latestViewportSize) {
|
|
785
|
+
return;
|
|
786
|
+
}
|
|
787
|
+
this.emitViewportResizeIfChanged(this.latestViewportSize);
|
|
788
|
+
}, VIEWPORT_RESIZE_DEBOUNCE_MS);
|
|
789
|
+
});
|
|
790
|
+
}
|
|
791
|
+
/** Clears any pending debounce timer and emits `size` immediately if it changed. */
|
|
792
|
+
emitViewportResizeImmediate(size) {
|
|
793
|
+
if (this.resizeDebounceTimer !== null) {
|
|
794
|
+
clearTimeout(this.resizeDebounceTimer);
|
|
795
|
+
this.resizeDebounceTimer = null;
|
|
796
|
+
}
|
|
797
|
+
this.emitViewportResizeIfChanged(size);
|
|
798
|
+
}
|
|
799
|
+
/** Emits `size` through {@link ViewportResize} when it differs from {@link lastEmittedViewportSize}. */
|
|
800
|
+
emitViewportResizeIfChanged(size) {
|
|
801
|
+
if (this.lastEmittedViewportSize &&
|
|
802
|
+
this.lastEmittedViewportSize.Width === size.Width &&
|
|
803
|
+
this.lastEmittedViewportSize.Height === size.Height) {
|
|
804
|
+
return;
|
|
805
|
+
}
|
|
806
|
+
this.lastEmittedViewportSize = { Width: size.Width, Height: size.Height };
|
|
807
|
+
this.zone.run(() => this.ViewportResize.emit({ Width: size.Width, Height: size.Height }));
|
|
808
|
+
}
|
|
809
|
+
/**
|
|
810
|
+
* Sizes the frame canvas's CSS box (and thus `.rb-canvas-stack` + `.rb-cursor-overlay`) to fit the
|
|
811
|
+
* usable `.rb-viewport` area while preserving the frame's exact aspect ratio (`canvas.width / canvas.height`),
|
|
812
|
+
* so the frame fills the pane edge-to-edge (including when maximized above `1280 × 800`) and clicks
|
|
813
|
+
* always map accurately via {@link MapToViewportCoords}.
|
|
814
|
+
*/
|
|
815
|
+
updateCanvasDisplaySize() {
|
|
816
|
+
const canvas = this.frameCanvas?.nativeElement;
|
|
817
|
+
if (!canvas) {
|
|
818
|
+
return;
|
|
819
|
+
}
|
|
820
|
+
const viewport = this.latestViewportSize ?? this.measureViewport();
|
|
821
|
+
if (!viewport || canvas.width <= 0 || canvas.height <= 0) {
|
|
822
|
+
canvas.style.width = '';
|
|
823
|
+
canvas.style.height = '';
|
|
824
|
+
return;
|
|
825
|
+
}
|
|
826
|
+
const fitted = ComputeFittedFrameSize(viewport.Width, viewport.Height, canvas.width, canvas.height);
|
|
827
|
+
if (!fitted) {
|
|
828
|
+
canvas.style.width = '';
|
|
829
|
+
canvas.style.height = '';
|
|
830
|
+
return;
|
|
831
|
+
}
|
|
832
|
+
canvas.style.width = `${fitted.Width}px`;
|
|
833
|
+
canvas.style.height = `${fitted.Height}px`;
|
|
459
834
|
}
|
|
460
835
|
// ----- human takeover (Collaborative control) --------------------------------------------
|
|
461
836
|
/**
|
|
@@ -829,57 +1204,73 @@ export class RemoteBrowserSurfaceComponent {
|
|
|
829
1204
|
}
|
|
830
1205
|
static ɵfac = function RemoteBrowserSurfaceComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || RemoteBrowserSurfaceComponent)(); };
|
|
831
1206
|
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: RemoteBrowserSurfaceComponent, selectors: [["mj-realtime-remote-browser-surface"]], viewQuery: function RemoteBrowserSurfaceComponent_Query(rf, ctx) { if (rf & 1) {
|
|
832
|
-
i0.ɵɵviewQuery(_c0, 5)(_c1, 5);
|
|
1207
|
+
i0.ɵɵviewQuery(_c0, 5)(_c1, 5)(_c2, 5);
|
|
833
1208
|
} if (rf & 2) {
|
|
834
1209
|
let _t;
|
|
1210
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.viewportEl = _t.first);
|
|
835
1211
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.frameCanvas = _t.first);
|
|
836
1212
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.cursorCanvas = _t.first);
|
|
837
|
-
} }, inputs: { Fetch: "Fetch", FetchSelection: "FetchSelection", Visible: "Visible", Streaming: "Streaming", Interactive: "Interactive", AudioAvailable: "AudioAvailable", AudioMuted: "AudioMuted" }, outputs: { HumanInput: "HumanInput", AudioMutedChange: "AudioMutedChange" }, decls:
|
|
838
|
-
i0.ɵɵelementStart(0, "div",
|
|
839
|
-
i0.ɵɵelement(2, "span",
|
|
840
|
-
i0.ɵɵelementStart(3, "span",
|
|
1213
|
+
} }, inputs: { Fetch: "Fetch", FetchSelection: "FetchSelection", Visible: "Visible", Streaming: "Streaming", Interactive: "Interactive", AudioAvailable: "AudioAvailable", AudioMuted: "AudioMuted", ReadOnly: "ReadOnly", ReviewHistory: "ReviewHistory", ScreenshotDataUrl: "ScreenshotDataUrl", CurrentUrl: "CurrentUrl" }, outputs: { HumanInput: "HumanInput", ViewportResize: "ViewportResize", AudioMutedChange: "AudioMutedChange" }, decls: 15, vars: 9, consts: [["viewportEl", ""], ["frameCanvas", ""], ["cursorCanvas", ""], [1, "rb-surface"], [1, "rb-bar"], ["aria-hidden", "true", 1, "rb-live"], [1, "rb-live-label"], [1, "rb-url", 3, "title"], ["title", "Click and type to control the live page", 1, "rb-driving"], ["type", "button", 1, "rb-speaker", 3, "rb-speaker--muted", "title"], [1, "rb-viewport"], ["alt", "Live view of the shared browser", 1, "rb-screenshot", 3, "src"], [1, "rb-placeholder"], ["target", "_blank", "rel", "noopener noreferrer", 1, "rb-url", "rb-url--link", 3, "href", "title"], ["target", "_blank", "rel", "noopener noreferrer", "aria-label", "Open page in a new tab", "title", "Open in new tab", 1, "rb-open-btn", 3, "href"], ["aria-hidden", "true", 1, "fa-solid", "fa-arrow-up-right-from-square"], ["aria-hidden", "true", 1, "fa-solid", "fa-hand-pointer"], ["type", "button", 1, "rb-speaker", 3, "click", "title"], ["aria-hidden", "true", 1, "fa-solid"], [1, "rb-review-stage"], [1, "rb-history", 3, "open"], ["alt", "Saved view of the shared browser", 1, "rb-screenshot", 3, "src"], ["sandbox", "allow-scripts allow-same-origin allow-forms allow-popups", "referrerpolicy", "no-referrer", 1, "rb-iframe", 3, "src", "title"], [1, "rb-history__heading"], [1, "rb-history__list"], [1, "rb-history__item"], [1, "rb-history__action"], ["target", "_blank", "rel", "noopener noreferrer", 1, "rb-history__url", 3, "href", "title"], [1, "rb-history__url"], [1, "rb-history__detail"], [1, "rb-empty-note"], [1, "rb-canvas-stack"], [1, "rb-screenshot"], [1, "rb-screenshot", "rb-cursor-overlay"], ["text", "Waiting for the browser\u2026", "size", "medium"]], template: function RemoteBrowserSurfaceComponent_Template(rf, ctx) { if (rf & 1) {
|
|
1214
|
+
i0.ɵɵelementStart(0, "div", 3)(1, "div", 4);
|
|
1215
|
+
i0.ɵɵelement(2, "span", 5);
|
|
1216
|
+
i0.ɵɵelementStart(3, "span", 6);
|
|
841
1217
|
i0.ɵɵtext(4);
|
|
842
1218
|
i0.ɵɵelementEnd();
|
|
843
|
-
i0.ɵɵ
|
|
844
|
-
i0.ɵɵ
|
|
1219
|
+
i0.ɵɵconditionalCreate(5, RemoteBrowserSurfaceComponent_Conditional_5_Template, 4, 4)(6, RemoteBrowserSurfaceComponent_Conditional_6_Template, 2, 2, "span", 7);
|
|
1220
|
+
i0.ɵɵconditionalCreate(7, RemoteBrowserSurfaceComponent_Conditional_7_Template, 3, 0, "span", 8);
|
|
1221
|
+
i0.ɵɵconditionalCreate(8, RemoteBrowserSurfaceComponent_Conditional_8_Template, 2, 9, "button", 9);
|
|
845
1222
|
i0.ɵɵelementEnd();
|
|
846
|
-
i0.ɵɵ
|
|
847
|
-
i0.ɵɵconditionalCreate(
|
|
848
|
-
i0.ɵɵelementEnd();
|
|
849
|
-
i0.ɵɵelementStart(9, "div", 9);
|
|
850
|
-
i0.ɵɵconditionalCreate(10, RemoteBrowserSurfaceComponent_Conditional_10_Template, 5, 6)(11, RemoteBrowserSurfaceComponent_Conditional_11_Template, 1, 1, "img", 10)(12, RemoteBrowserSurfaceComponent_Conditional_12_Template, 2, 0, "div", 11);
|
|
1223
|
+
i0.ɵɵelementStart(9, "div", 10, 0);
|
|
1224
|
+
i0.ɵɵconditionalCreate(11, RemoteBrowserSurfaceComponent_Conditional_11_Template, 4, 2)(12, RemoteBrowserSurfaceComponent_Conditional_12_Template, 5, 6)(13, RemoteBrowserSurfaceComponent_Conditional_13_Template, 1, 1, "img", 11)(14, RemoteBrowserSurfaceComponent_Conditional_14_Template, 2, 0, "div", 12);
|
|
851
1225
|
i0.ɵɵelementEnd()();
|
|
852
1226
|
} if (rf & 2) {
|
|
1227
|
+
let tmp_3_0;
|
|
853
1228
|
i0.ɵɵadvance(2);
|
|
854
|
-
i0.ɵɵclassProp("rb-live--on", ctx.HasSnapshot);
|
|
1229
|
+
i0.ɵɵclassProp("rb-live--on", !ctx.ReadOnly && ctx.HasSnapshot);
|
|
855
1230
|
i0.ɵɵadvance(2);
|
|
856
|
-
i0.ɵɵtextInterpolate(ctx.HasSnapshot ? "Live" : "Connecting\u2026");
|
|
857
|
-
i0.ɵɵadvance();
|
|
858
|
-
i0.ɵɵproperty("title", ctx.CurrentUrl || "");
|
|
1231
|
+
i0.ɵɵtextInterpolate(ctx.ReadOnly ? "Session snapshot" : ctx.HasSnapshot ? "Live" : "Connecting\u2026");
|
|
859
1232
|
i0.ɵɵadvance();
|
|
860
|
-
i0.ɵɵ
|
|
1233
|
+
i0.ɵɵconditional((tmp_3_0 = ctx.ReadOnly && ctx.SafeExternalUrl(ctx.CurrentUrl)) ? 5 : 6, tmp_3_0);
|
|
1234
|
+
i0.ɵɵadvance(2);
|
|
1235
|
+
i0.ɵɵconditional(ctx.CanTakeOver && !ctx.ReadOnly ? 7 : -1);
|
|
861
1236
|
i0.ɵɵadvance();
|
|
862
|
-
i0.ɵɵconditional(ctx.
|
|
1237
|
+
i0.ɵɵconditional(ctx.AudioAvailable && !ctx.ReadOnly ? 8 : -1);
|
|
863
1238
|
i0.ɵɵadvance();
|
|
864
|
-
i0.ɵɵ
|
|
1239
|
+
i0.ɵɵclassProp("rb-viewport--review", ctx.ReadOnly);
|
|
865
1240
|
i0.ɵɵadvance(2);
|
|
866
|
-
i0.ɵɵconditional(ctx.Streaming ?
|
|
867
|
-
} }, dependencies: [CommonModule, SharedGenericModule, i1.LoadingComponent], styles: ["[_nghost-%COMP%] { display: block; height: 100%; }\n .rb-surface[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n height: 100%;\n background: var(--mj-bg-surface-sunken);\n }\n .rb-bar[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 8px 12px;\n border-bottom: 1px solid var(--mj-border-subtle);\n background: var(--mj-bg-surface);\n font-size: 0.8125rem;\n color: var(--mj-text-secondary);\n }\n .rb-live[_ngcontent-%COMP%] {\n width: 8px;\n height: 8px;\n border-radius: var(--mj-radius-full, 50%);\n background: var(--mj-text-disabled);\n flex: 0 0 auto;\n }\n .rb-live--on[_ngcontent-%COMP%] {\n background: var(--mj-status-success);\n box-shadow: 0 0 0 3px color-mix(in srgb, var(--mj-status-success) 25%, transparent);\n }\n .rb-live-label[_ngcontent-%COMP%] {\n flex: 0 0 auto;\n font-weight: 600;\n color: var(--mj-text-primary);\n }\n .rb-url[_ngcontent-%COMP%] {\n flex: 1 1 auto;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-family: var(--mj-font-mono, monospace);\n }\n .rb-viewport[_ngcontent-%COMP%] {\n flex: 1 1 auto;\n min-height: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n overflow:
|
|
1241
|
+
i0.ɵɵconditional(ctx.ReadOnly ? 11 : ctx.Streaming ? 12 : ctx.ScreenshotDataUrl ? 13 : 14);
|
|
1242
|
+
} }, dependencies: [CommonModule, SharedGenericModule, i1.LoadingComponent], styles: ["[_nghost-%COMP%] { display: block; height: 100%; }\n .rb-surface[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n height: 100%;\n background: var(--mj-bg-surface-sunken);\n }\n .rb-bar[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 8px 12px;\n border-bottom: 1px solid var(--mj-border-subtle);\n background: var(--mj-bg-surface);\n font-size: 0.8125rem;\n color: var(--mj-text-secondary);\n }\n .rb-live[_ngcontent-%COMP%] {\n width: 8px;\n height: 8px;\n border-radius: var(--mj-radius-full, 50%);\n background: var(--mj-text-disabled);\n flex: 0 0 auto;\n }\n .rb-live--on[_ngcontent-%COMP%] {\n background: var(--mj-status-success);\n box-shadow: 0 0 0 3px color-mix(in srgb, var(--mj-status-success) 25%, transparent);\n }\n .rb-live-label[_ngcontent-%COMP%] {\n flex: 0 0 auto;\n font-weight: 600;\n color: var(--mj-text-primary);\n }\n .rb-url[_ngcontent-%COMP%] {\n flex: 1 1 auto;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-family: var(--mj-font-mono, monospace);\n }\n .rb-viewport[_ngcontent-%COMP%] {\n flex: 1 1 auto;\n min-height: 0;\n min-width: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n padding: 0;\n }\n .rb-screenshot[_ngcontent-%COMP%] {\n max-width: 100%;\n max-height: 100%;\n width: auto;\n height: auto;\n object-fit: contain;\n border: none;\n border-radius: 0;\n box-shadow: none;\n background: var(--mj-bg-surface);\n display: block;\n }\n .rb-screenshot--interactive[_ngcontent-%COMP%] {\n \n\n cursor: none;\n outline: none;\n }\n .rb-screenshot--interactive[_ngcontent-%COMP%]:focus-visible {\n box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--mj-brand-primary) 35%, transparent);\n }\n \n\n .rb-canvas-stack[_ngcontent-%COMP%] {\n position: relative;\n display: inline-flex;\n max-width: 100%;\n max-height: 100%;\n min-height: 0;\n }\n .rb-cursor-overlay[_ngcontent-%COMP%] {\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n \n\n border: none;\n box-shadow: none;\n background: transparent;\n pointer-events: none;\n }\n .rb-driving[_ngcontent-%COMP%] {\n flex: 0 0 auto;\n display: inline-flex;\n align-items: center;\n gap: 5px;\n padding: 2px 8px;\n border-radius: var(--mj-radius-full, 999px);\n font-size: 0.75rem;\n font-weight: 600;\n color: var(--mj-brand-primary);\n background: color-mix(in srgb, var(--mj-brand-primary) 12%, transparent);\n }\n .rb-placeholder[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n .rb-hidden[_ngcontent-%COMP%] {\n display: none;\n }\n .rb-speaker[_ngcontent-%COMP%] {\n flex: 0 0 auto;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n padding: 0;\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md, 6px);\n background: var(--mj-bg-surface);\n color: var(--mj-brand-primary);\n cursor: pointer;\n font-size: 0.8125rem;\n transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;\n }\n .rb-speaker[_ngcontent-%COMP%]:hover {\n background: var(--mj-bg-surface-hover);\n }\n .rb-speaker[_ngcontent-%COMP%]:focus-visible {\n outline: none;\n border-color: var(--mj-border-focus);\n box-shadow: 0 0 0 3px color-mix(in srgb, var(--mj-brand-primary) 25%, transparent);\n }\n .rb-speaker--muted[_ngcontent-%COMP%] {\n color: var(--mj-text-muted);\n }\n .rb-url--link[_ngcontent-%COMP%] {\n color: var(--mj-brand-primary);\n text-decoration: none;\n }\n .rb-url--link[_ngcontent-%COMP%]:hover {\n text-decoration: underline;\n }\n .rb-viewport--review[_ngcontent-%COMP%] {\n flex-direction: column;\n justify-content: flex-start;\n align-items: stretch;\n gap: 8px;\n padding: 8px;\n overflow: hidden;\n }\n .rb-review-stage[_ngcontent-%COMP%] {\n flex: 1 1 auto;\n min-height: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: auto;\n }\n .rb-iframe[_ngcontent-%COMP%] {\n width: 100%;\n height: 100%;\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md, 6px);\n background: #ffffff;\n }\n .rb-open-btn[_ngcontent-%COMP%] {\n flex: 0 0 auto;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 26px;\n height: 26px;\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md, 6px);\n background: var(--mj-bg-surface);\n color: var(--mj-text-secondary);\n text-decoration: none;\n font-size: 0.75rem;\n }\n .rb-open-btn[_ngcontent-%COMP%]:hover {\n color: var(--mj-brand-primary);\n background: var(--mj-bg-surface-hover);\n }\n .rb-history[_ngcontent-%COMP%] {\n flex: 0 0 auto;\n border: 1px solid var(--mj-border-subtle);\n border-radius: var(--mj-radius-md, 6px);\n background: var(--mj-bg-surface);\n padding: 8px 12px;\n max-height: 180px;\n overflow: auto;\n }\n .rb-history__heading[_ngcontent-%COMP%] {\n font-size: 0.75rem;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.04em;\n color: var(--mj-text-muted);\n cursor: pointer;\n user-select: none;\n }\n .rb-history[open][_ngcontent-%COMP%] .rb-history__heading[_ngcontent-%COMP%] {\n margin-bottom: 8px;\n }\n .rb-history__list[_ngcontent-%COMP%] {\n list-style: none;\n margin: 0;\n padding: 0;\n display: flex;\n flex-direction: column;\n gap: 6px;\n }\n .rb-history__item[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 2px;\n padding: 6px 8px;\n border-radius: 6px;\n background: var(--mj-bg-surface-sunken);\n font-size: 0.8125rem;\n }\n .rb-history__action[_ngcontent-%COMP%] {\n font-size: 0.75rem;\n font-weight: 600;\n color: var(--mj-text-secondary);\n }\n .rb-history__url[_ngcontent-%COMP%] {\n color: var(--mj-brand-primary);\n font-family: var(--mj-font-mono, monospace);\n word-break: break-all;\n text-decoration: none;\n }\n .rb-history__url[_ngcontent-%COMP%]:hover {\n text-decoration: underline;\n }\n .rb-history__detail[_ngcontent-%COMP%] {\n color: var(--mj-text-secondary);\n font-size: 0.75rem;\n }\n .rb-empty-note[_ngcontent-%COMP%] {\n color: var(--mj-text-muted);\n font-size: 0.875rem;\n }"], changeDetection: 0 });
|
|
868
1243
|
}
|
|
869
1244
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(RemoteBrowserSurfaceComponent, [{
|
|
870
1245
|
type: Component,
|
|
871
1246
|
args: [{ standalone: true, selector: 'mj-realtime-remote-browser-surface', imports: [CommonModule, SharedGenericModule], changeDetection: ChangeDetectionStrategy.OnPush, template: `
|
|
872
1247
|
<div class="rb-surface">
|
|
873
1248
|
<div class="rb-bar">
|
|
874
|
-
<span class="rb-live" [class.rb-live--on]="HasSnapshot" aria-hidden="true"></span>
|
|
875
|
-
<span class="rb-live-label">{{ HasSnapshot ? 'Live' : 'Connecting…' }}</span>
|
|
876
|
-
|
|
877
|
-
|
|
1249
|
+
<span class="rb-live" [class.rb-live--on]="!ReadOnly && HasSnapshot" aria-hidden="true"></span>
|
|
1250
|
+
<span class="rb-live-label">{{ ReadOnly ? 'Session snapshot' : (HasSnapshot ? 'Live' : 'Connecting…') }}</span>
|
|
1251
|
+
@if (ReadOnly && SafeExternalUrl(CurrentUrl); as safeHref) {
|
|
1252
|
+
<a class="rb-url rb-url--link"
|
|
1253
|
+
[href]="safeHref"
|
|
1254
|
+
target="_blank"
|
|
1255
|
+
rel="noopener noreferrer"
|
|
1256
|
+
[title]="CurrentUrl || ''">{{ CurrentUrl }}</a>
|
|
1257
|
+
<a class="rb-open-btn"
|
|
1258
|
+
[href]="safeHref"
|
|
1259
|
+
target="_blank"
|
|
1260
|
+
rel="noopener noreferrer"
|
|
1261
|
+
aria-label="Open page in a new tab"
|
|
1262
|
+
title="Open in new tab">
|
|
1263
|
+
<i class="fa-solid fa-arrow-up-right-from-square" aria-hidden="true"></i>
|
|
1264
|
+
</a>
|
|
1265
|
+
} @else {
|
|
1266
|
+
<span class="rb-url" [title]="CurrentUrl || ''">{{ CurrentUrl || 'No page loaded yet' }}</span>
|
|
1267
|
+
}
|
|
1268
|
+
@if (CanTakeOver && !ReadOnly) {
|
|
878
1269
|
<span class="rb-driving" title="Click and type to control the live page">
|
|
879
1270
|
<i class="fa-solid fa-hand-pointer" aria-hidden="true"></i> You're driving
|
|
880
1271
|
</span>
|
|
881
1272
|
}
|
|
882
|
-
@if (AudioAvailable) {
|
|
1273
|
+
@if (AudioAvailable && !ReadOnly) {
|
|
883
1274
|
<button
|
|
884
1275
|
type="button"
|
|
885
1276
|
class="rb-speaker"
|
|
@@ -893,8 +1284,52 @@ export class RemoteBrowserSurfaceComponent {
|
|
|
893
1284
|
</button>
|
|
894
1285
|
}
|
|
895
1286
|
</div>
|
|
896
|
-
<div class="rb-viewport">
|
|
897
|
-
@if (
|
|
1287
|
+
<div #viewportEl class="rb-viewport" [class.rb-viewport--review]="ReadOnly">
|
|
1288
|
+
@if (ReadOnly) {
|
|
1289
|
+
@if (SafeScreenshotUrl; as reviewImg) {
|
|
1290
|
+
<div class="rb-review-stage">
|
|
1291
|
+
<img class="rb-screenshot" [src]="reviewImg" alt="Saved view of the shared browser" />
|
|
1292
|
+
</div>
|
|
1293
|
+
} @else if (SafeIframeUrl; as frameSrc) {
|
|
1294
|
+
<div class="rb-review-stage">
|
|
1295
|
+
<iframe
|
|
1296
|
+
class="rb-iframe"
|
|
1297
|
+
[src]="frameSrc"
|
|
1298
|
+
[title]="CurrentUrl || 'Last visited browser page'"
|
|
1299
|
+
sandbox="allow-scripts allow-same-origin allow-forms allow-popups"
|
|
1300
|
+
referrerpolicy="no-referrer"
|
|
1301
|
+
></iframe>
|
|
1302
|
+
</div>
|
|
1303
|
+
}
|
|
1304
|
+
@if (ReviewHistory.length > 0) {
|
|
1305
|
+
<details class="rb-history" [open]="!SafeScreenshotUrl && !SafeIframeUrl">
|
|
1306
|
+
<summary class="rb-history__heading">Visited pages ({{ ReviewHistory.length }})</summary>
|
|
1307
|
+
<ul class="rb-history__list">
|
|
1308
|
+
@for (entry of ReviewHistory; track $index) {
|
|
1309
|
+
<li class="rb-history__item">
|
|
1310
|
+
@if (entry.ActionLabel) {
|
|
1311
|
+
<span class="rb-history__action">{{ entry.ActionLabel }}</span>
|
|
1312
|
+
}
|
|
1313
|
+
@if (SafeExternalUrl(entry.Url); as link) {
|
|
1314
|
+
<a class="rb-history__url" [href]="link" target="_blank" rel="noopener noreferrer" [title]="entry.Url">
|
|
1315
|
+
{{ entry.Url }}
|
|
1316
|
+
</a>
|
|
1317
|
+
} @else {
|
|
1318
|
+
<span class="rb-history__url">{{ entry.Url }}</span>
|
|
1319
|
+
}
|
|
1320
|
+
@if (entry.Detail) {
|
|
1321
|
+
<span class="rb-history__detail">{{ entry.Detail }}</span>
|
|
1322
|
+
}
|
|
1323
|
+
</li>
|
|
1324
|
+
}
|
|
1325
|
+
</ul>
|
|
1326
|
+
</details>
|
|
1327
|
+
} @else if (!SafeScreenshotUrl && !SafeIframeUrl) {
|
|
1328
|
+
<div class="rb-placeholder">
|
|
1329
|
+
<span class="rb-empty-note">Browser session ended without a saved snapshot.</span>
|
|
1330
|
+
</div>
|
|
1331
|
+
}
|
|
1332
|
+
} @else if (Streaming) {
|
|
898
1333
|
<div class="rb-canvas-stack" [class.rb-hidden]="!HasFrame">
|
|
899
1334
|
<canvas #frameCanvas class="rb-screenshot" [class.rb-screenshot--interactive]="CanTakeOver"></canvas>
|
|
900
1335
|
@if (CanTakeOver) {
|
|
@@ -918,7 +1353,7 @@ export class RemoteBrowserSurfaceComponent {
|
|
|
918
1353
|
}
|
|
919
1354
|
</div>
|
|
920
1355
|
</div>
|
|
921
|
-
`, styles: ["\n :host { display: block; height: 100%; }\n .rb-surface {\n display: flex;\n flex-direction: column;\n height: 100%;\n background: var(--mj-bg-surface-sunken);\n }\n .rb-bar {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 8px 12px;\n border-bottom: 1px solid var(--mj-border-subtle);\n background: var(--mj-bg-surface);\n font-size: 0.8125rem;\n color: var(--mj-text-secondary);\n }\n .rb-live {\n width: 8px;\n height: 8px;\n border-radius: var(--mj-radius-full, 50%);\n background: var(--mj-text-disabled);\n flex: 0 0 auto;\n }\n .rb-live--on {\n background: var(--mj-status-success);\n box-shadow: 0 0 0 3px color-mix(in srgb, var(--mj-status-success) 25%, transparent);\n }\n .rb-live-label {\n flex: 0 0 auto;\n font-weight: 600;\n color: var(--mj-text-primary);\n }\n .rb-url {\n flex: 1 1 auto;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-family: var(--mj-font-mono, monospace);\n }\n .rb-viewport {\n flex: 1 1 auto;\n min-height: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n overflow:
|
|
1356
|
+
`, styles: ["\n :host { display: block; height: 100%; }\n .rb-surface {\n display: flex;\n flex-direction: column;\n height: 100%;\n background: var(--mj-bg-surface-sunken);\n }\n .rb-bar {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 8px 12px;\n border-bottom: 1px solid var(--mj-border-subtle);\n background: var(--mj-bg-surface);\n font-size: 0.8125rem;\n color: var(--mj-text-secondary);\n }\n .rb-live {\n width: 8px;\n height: 8px;\n border-radius: var(--mj-radius-full, 50%);\n background: var(--mj-text-disabled);\n flex: 0 0 auto;\n }\n .rb-live--on {\n background: var(--mj-status-success);\n box-shadow: 0 0 0 3px color-mix(in srgb, var(--mj-status-success) 25%, transparent);\n }\n .rb-live-label {\n flex: 0 0 auto;\n font-weight: 600;\n color: var(--mj-text-primary);\n }\n .rb-url {\n flex: 1 1 auto;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-family: var(--mj-font-mono, monospace);\n }\n .rb-viewport {\n flex: 1 1 auto;\n min-height: 0;\n min-width: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n padding: 0;\n }\n .rb-screenshot {\n max-width: 100%;\n max-height: 100%;\n width: auto;\n height: auto;\n object-fit: contain;\n border: none;\n border-radius: 0;\n box-shadow: none;\n background: var(--mj-bg-surface);\n display: block;\n }\n .rb-screenshot--interactive {\n /* Hide the OS cursor \u2014 we render a synthetic cursor on the overlay so there's exactly one pointer\n and it reads naturally for clicking on a web page (not the old crosshair). */\n cursor: none;\n outline: none;\n }\n .rb-screenshot--interactive:focus-visible {\n box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--mj-brand-primary) 35%, transparent);\n }\n /* Frame canvas + synthetic-cursor overlay share one box; the stack shrinks to the frame canvas so the\n absolutely-positioned overlay (inset:0, same object-fit) lines up pixel-for-pixel with it. */\n .rb-canvas-stack {\n position: relative;\n display: inline-flex;\n max-width: 100%;\n max-height: 100%;\n min-height: 0;\n }\n .rb-cursor-overlay {\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n /* Transparent passthrough layer \u2014 no chrome of its own, and never steals pointer/wheel events from\n the frame canvas underneath (those listeners drive takeover). */\n border: none;\n box-shadow: none;\n background: transparent;\n pointer-events: none;\n }\n .rb-driving {\n flex: 0 0 auto;\n display: inline-flex;\n align-items: center;\n gap: 5px;\n padding: 2px 8px;\n border-radius: var(--mj-radius-full, 999px);\n font-size: 0.75rem;\n font-weight: 600;\n color: var(--mj-brand-primary);\n background: color-mix(in srgb, var(--mj-brand-primary) 12%, transparent);\n }\n .rb-placeholder {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n .rb-hidden {\n display: none;\n }\n .rb-speaker {\n flex: 0 0 auto;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n padding: 0;\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md, 6px);\n background: var(--mj-bg-surface);\n color: var(--mj-brand-primary);\n cursor: pointer;\n font-size: 0.8125rem;\n transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;\n }\n .rb-speaker:hover {\n background: var(--mj-bg-surface-hover);\n }\n .rb-speaker:focus-visible {\n outline: none;\n border-color: var(--mj-border-focus);\n box-shadow: 0 0 0 3px color-mix(in srgb, var(--mj-brand-primary) 25%, transparent);\n }\n .rb-speaker--muted {\n color: var(--mj-text-muted);\n }\n .rb-url--link {\n color: var(--mj-brand-primary);\n text-decoration: none;\n }\n .rb-url--link:hover {\n text-decoration: underline;\n }\n .rb-viewport--review {\n flex-direction: column;\n justify-content: flex-start;\n align-items: stretch;\n gap: 8px;\n padding: 8px;\n overflow: hidden;\n }\n .rb-review-stage {\n flex: 1 1 auto;\n min-height: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: auto;\n }\n .rb-iframe {\n width: 100%;\n height: 100%;\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md, 6px);\n background: #ffffff;\n }\n .rb-open-btn {\n flex: 0 0 auto;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 26px;\n height: 26px;\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md, 6px);\n background: var(--mj-bg-surface);\n color: var(--mj-text-secondary);\n text-decoration: none;\n font-size: 0.75rem;\n }\n .rb-open-btn:hover {\n color: var(--mj-brand-primary);\n background: var(--mj-bg-surface-hover);\n }\n .rb-history {\n flex: 0 0 auto;\n border: 1px solid var(--mj-border-subtle);\n border-radius: var(--mj-radius-md, 6px);\n background: var(--mj-bg-surface);\n padding: 8px 12px;\n max-height: 180px;\n overflow: auto;\n }\n .rb-history__heading {\n font-size: 0.75rem;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.04em;\n color: var(--mj-text-muted);\n cursor: pointer;\n user-select: none;\n }\n .rb-history[open] .rb-history__heading {\n margin-bottom: 8px;\n }\n .rb-history__list {\n list-style: none;\n margin: 0;\n padding: 0;\n display: flex;\n flex-direction: column;\n gap: 6px;\n }\n .rb-history__item {\n display: flex;\n flex-direction: column;\n gap: 2px;\n padding: 6px 8px;\n border-radius: 6px;\n background: var(--mj-bg-surface-sunken);\n font-size: 0.8125rem;\n }\n .rb-history__action {\n font-size: 0.75rem;\n font-weight: 600;\n color: var(--mj-text-secondary);\n }\n .rb-history__url {\n color: var(--mj-brand-primary);\n font-family: var(--mj-font-mono, monospace);\n word-break: break-all;\n text-decoration: none;\n }\n .rb-history__url:hover {\n text-decoration: underline;\n }\n .rb-history__detail {\n color: var(--mj-text-secondary);\n font-size: 0.75rem;\n }\n .rb-empty-note {\n color: var(--mj-text-muted);\n font-size: 0.875rem;\n }\n "] }]
|
|
922
1357
|
}], null, { Fetch: [{
|
|
923
1358
|
type: Input
|
|
924
1359
|
}], FetchSelection: [{
|
|
@@ -931,12 +1366,25 @@ export class RemoteBrowserSurfaceComponent {
|
|
|
931
1366
|
type: Input
|
|
932
1367
|
}], HumanInput: [{
|
|
933
1368
|
type: Output
|
|
1369
|
+
}], ViewportResize: [{
|
|
1370
|
+
type: Output
|
|
934
1371
|
}], AudioAvailable: [{
|
|
935
1372
|
type: Input
|
|
936
1373
|
}], AudioMuted: [{
|
|
937
1374
|
type: Input
|
|
938
1375
|
}], AudioMutedChange: [{
|
|
939
1376
|
type: Output
|
|
1377
|
+
}], ReadOnly: [{
|
|
1378
|
+
type: Input
|
|
1379
|
+
}], ReviewHistory: [{
|
|
1380
|
+
type: Input
|
|
1381
|
+
}], ScreenshotDataUrl: [{
|
|
1382
|
+
type: Input
|
|
1383
|
+
}], CurrentUrl: [{
|
|
1384
|
+
type: Input
|
|
1385
|
+
}], viewportEl: [{
|
|
1386
|
+
type: ViewChild,
|
|
1387
|
+
args: ['viewportEl']
|
|
940
1388
|
}], frameCanvas: [{
|
|
941
1389
|
type: ViewChild,
|
|
942
1390
|
args: ['frameCanvas']
|
|
@@ -944,5 +1392,5 @@ export class RemoteBrowserSurfaceComponent {
|
|
|
944
1392
|
type: ViewChild,
|
|
945
1393
|
args: ['cursorCanvas']
|
|
946
1394
|
}] }); })();
|
|
947
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(RemoteBrowserSurfaceComponent, { className: "RemoteBrowserSurfaceComponent", filePath: "src/lib/components/realtime/remote-browser/remote-browser-surface.component.ts", lineNumber:
|
|
1395
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(RemoteBrowserSurfaceComponent, { className: "RemoteBrowserSurfaceComponent", filePath: "src/lib/components/realtime/remote-browser/remote-browser-surface.component.ts", lineNumber: 586 }); })();
|
|
948
1396
|
//# sourceMappingURL=remote-browser-surface.component.js.map
|