@mcpview/compose 0.13.0 → 0.14.0
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/CHANGELOG.md +120 -0
- package/README.md +131 -2
- package/esm/_dnt.polyfills.d.ts +11 -11
- package/esm/_dnt.polyfills.d.ts.map +1 -1
- package/esm/_dnt.polyfills.js +14 -14
- package/esm/src/code-mode/board.d.ts +18 -2
- package/esm/src/code-mode/board.d.ts.map +1 -1
- package/esm/src/code-mode/board.js +74 -2
- package/esm/src/code-mode/chain.d.ts +26 -1
- package/esm/src/code-mode/chain.d.ts.map +1 -1
- package/esm/src/code-mode/chain.js +248 -89
- package/esm/src/code-mode/connections.d.ts +1 -0
- package/esm/src/code-mode/connections.d.ts.map +1 -1
- package/esm/src/code-mode/connections.js +1 -0
- package/esm/src/code-mode/errors.d.ts +80 -0
- package/esm/src/code-mode/errors.d.ts.map +1 -0
- package/esm/src/code-mode/errors.js +140 -0
- package/esm/src/code-mode/guest-worker.d.ts +11 -0
- package/esm/src/code-mode/guest-worker.d.ts.map +1 -0
- package/esm/src/code-mode/guest-worker.js +80 -0
- package/esm/src/code-mode/layout-publisher.d.ts +69 -0
- package/esm/src/code-mode/layout-publisher.d.ts.map +1 -0
- package/esm/src/code-mode/layout-publisher.js +85 -0
- package/esm/src/code-mode/layout-runs.d.ts +35 -0
- package/esm/src/code-mode/layout-runs.d.ts.map +1 -0
- package/esm/src/code-mode/layout-runs.js +130 -0
- package/esm/src/code-mode/layout.d.ts +20 -0
- package/esm/src/code-mode/layout.d.ts.map +1 -0
- package/esm/src/code-mode/layout.js +54 -0
- package/esm/src/code-mode/mod.d.ts +4 -1
- package/esm/src/code-mode/mod.d.ts.map +1 -1
- package/esm/src/code-mode/mod.js +3 -0
- package/esm/src/code-mode/panel-contexts.d.ts +25 -0
- package/esm/src/code-mode/panel-contexts.d.ts.map +1 -0
- package/esm/src/code-mode/panel-contexts.js +115 -0
- package/esm/src/code-mode/providers.d.ts +3 -0
- package/esm/src/code-mode/providers.d.ts.map +1 -1
- package/esm/src/code-mode/sandbox-core.d.ts +61 -0
- package/esm/src/code-mode/sandbox-core.d.ts.map +1 -0
- package/esm/src/code-mode/sandbox-core.js +424 -0
- package/esm/src/code-mode/sandbox.d.ts +68 -7
- package/esm/src/code-mode/sandbox.d.ts.map +1 -1
- package/esm/src/code-mode/sandbox.js +180 -119
- package/esm/src/code-mode/sync.d.ts +11 -0
- package/esm/src/code-mode/sync.d.ts.map +1 -0
- package/esm/src/code-mode/sync.js +42 -0
- package/esm/src/code-mode/tool.d.ts +1 -1
- package/esm/src/code-mode/tool.d.ts.map +1 -1
- package/esm/src/code-mode/tool.js +14 -0
- package/esm/src/code-mode/worker-host.d.ts +70 -0
- package/esm/src/code-mode/worker-host.d.ts.map +1 -0
- package/esm/src/code-mode/worker-host.js +355 -0
- package/esm/src/code-mode/worker-protocol.d.ts +44 -0
- package/esm/src/code-mode/worker-protocol.d.ts.map +1 -0
- package/esm/src/code-mode/worker-protocol.js +7 -0
- package/esm/src/host/renderer/css/panel-controls.d.ts.map +1 -1
- package/esm/src/host/renderer/css/panel-controls.js +5 -1
- package/esm/src/host/renderer/html-generator.js +2 -2
- package/esm/src/host/renderer/js/card-height.d.ts +11 -1
- package/esm/src/host/renderer/js/card-height.d.ts.map +1 -1
- package/esm/src/host/renderer/js/card-height.js +57 -10
- package/esm/src/host/renderer/js/event-bus.d.ts +11 -0
- package/esm/src/host/renderer/js/event-bus.d.ts.map +1 -1
- package/esm/src/host/renderer/js/event-bus.js +49 -8
- package/esm/src/host/renderer/js/intrinsic-layout.d.ts +26 -0
- package/esm/src/host/renderer/js/intrinsic-layout.d.ts.map +1 -0
- package/esm/src/host/renderer/js/intrinsic-layout.js +44 -0
- package/esm/src/host/renderer/panel-controls.d.ts +7 -0
- package/esm/src/host/renderer/panel-controls.js +1 -0
- package/esm/src/host/renderer/panel-movement.d.ts.map +1 -1
- package/esm/src/host/renderer/panel-movement.js +5 -1
- package/esm/src/host/renderer/panel-resizing.d.ts.map +1 -1
- package/esm/src/host/renderer/panel-resizing.js +36 -0
- package/esm/src/host/renderer/panel-snapshot.d.ts +11 -0
- package/esm/src/host/renderer/panel-snapshot.d.ts.map +1 -0
- package/esm/src/host/renderer/panel-snapshot.js +65 -0
- package/esm/src/version.d.ts +1 -1
- package/esm/src/version.js +1 -1
- package/package.json +9 -1
- package/script/_dnt.polyfills.d.ts +11 -11
- package/script/_dnt.polyfills.d.ts.map +1 -1
- package/script/_dnt.polyfills.js +14 -14
- package/script/src/code-mode/board.d.ts +18 -2
- package/script/src/code-mode/board.d.ts.map +1 -1
- package/script/src/code-mode/board.js +81 -2
- package/script/src/code-mode/chain.d.ts +26 -1
- package/script/src/code-mode/chain.d.ts.map +1 -1
- package/script/src/code-mode/chain.js +247 -88
- package/script/src/code-mode/connections.d.ts +1 -0
- package/script/src/code-mode/connections.d.ts.map +1 -1
- package/script/src/code-mode/connections.js +1 -0
- package/script/src/code-mode/errors.d.ts +80 -0
- package/script/src/code-mode/errors.d.ts.map +1 -0
- package/script/src/code-mode/errors.js +148 -0
- package/script/src/code-mode/guest-worker.d.ts +11 -0
- package/script/src/code-mode/guest-worker.d.ts.map +1 -0
- package/script/src/code-mode/guest-worker.js +105 -0
- package/script/src/code-mode/layout-publisher.d.ts +69 -0
- package/script/src/code-mode/layout-publisher.d.ts.map +1 -0
- package/script/src/code-mode/layout-publisher.js +88 -0
- package/script/src/code-mode/layout-runs.d.ts +35 -0
- package/script/src/code-mode/layout-runs.d.ts.map +1 -0
- package/script/src/code-mode/layout-runs.js +134 -0
- package/script/src/code-mode/layout.d.ts +20 -0
- package/script/src/code-mode/layout.d.ts.map +1 -0
- package/script/src/code-mode/layout.js +57 -0
- package/script/src/code-mode/mod.d.ts +4 -1
- package/script/src/code-mode/mod.d.ts.map +1 -1
- package/script/src/code-mode/mod.js +14 -1
- package/script/src/code-mode/panel-contexts.d.ts +25 -0
- package/script/src/code-mode/panel-contexts.d.ts.map +1 -0
- package/script/src/code-mode/panel-contexts.js +118 -0
- package/script/src/code-mode/providers.d.ts +3 -0
- package/script/src/code-mode/providers.d.ts.map +1 -1
- package/script/src/code-mode/sandbox-core.d.ts +61 -0
- package/script/src/code-mode/sandbox-core.d.ts.map +1 -0
- package/script/src/code-mode/sandbox-core.js +430 -0
- package/script/src/code-mode/sandbox.d.ts +68 -7
- package/script/src/code-mode/sandbox.d.ts.map +1 -1
- package/script/src/code-mode/sandbox.js +188 -121
- package/script/src/code-mode/sync.d.ts +11 -0
- package/script/src/code-mode/sync.d.ts.map +1 -0
- package/script/src/code-mode/sync.js +51 -0
- package/script/src/code-mode/tool.d.ts +1 -1
- package/script/src/code-mode/tool.d.ts.map +1 -1
- package/script/src/code-mode/tool.js +14 -0
- package/script/src/code-mode/worker-host.d.ts +70 -0
- package/script/src/code-mode/worker-host.d.ts.map +1 -0
- package/script/src/code-mode/worker-host.js +389 -0
- package/script/src/code-mode/worker-protocol.d.ts +44 -0
- package/script/src/code-mode/worker-protocol.d.ts.map +1 -0
- package/script/src/code-mode/worker-protocol.js +8 -0
- package/script/src/host/renderer/css/panel-controls.d.ts.map +1 -1
- package/script/src/host/renderer/css/panel-controls.js +5 -1
- package/script/src/host/renderer/html-generator.js +2 -2
- package/script/src/host/renderer/js/card-height.d.ts +11 -1
- package/script/src/host/renderer/js/card-height.d.ts.map +1 -1
- package/script/src/host/renderer/js/card-height.js +57 -10
- package/script/src/host/renderer/js/event-bus.d.ts +11 -0
- package/script/src/host/renderer/js/event-bus.d.ts.map +1 -1
- package/script/src/host/renderer/js/event-bus.js +50 -8
- package/script/src/host/renderer/js/intrinsic-layout.d.ts +26 -0
- package/script/src/host/renderer/js/intrinsic-layout.d.ts.map +1 -0
- package/script/src/host/renderer/js/intrinsic-layout.js +48 -0
- package/script/src/host/renderer/panel-controls.d.ts +7 -0
- package/script/src/host/renderer/panel-controls.js +4 -1
- package/script/src/host/renderer/panel-movement.d.ts.map +1 -1
- package/script/src/host/renderer/panel-movement.js +5 -1
- package/script/src/host/renderer/panel-resizing.d.ts.map +1 -1
- package/script/src/host/renderer/panel-resizing.js +36 -0
- package/script/src/host/renderer/panel-snapshot.d.ts +11 -0
- package/script/src/host/renderer/panel-snapshot.d.ts.map +1 -0
- package/script/src/host/renderer/panel-snapshot.js +69 -0
- package/script/src/version.d.ts +1 -1
- package/script/src/version.js +1 -1
|
@@ -13,6 +13,18 @@
|
|
|
13
13
|
import { COMPOSE_EVENT_METHOD } from "../../../sdk/compose-events.js";
|
|
14
14
|
import { COMPOSE_VERSION, MCP_APPS_PROTOCOL_VERSION } from "../../../version.js";
|
|
15
15
|
import { CASYS_COMPONENT_CATALOG_CAPABILITY_KEY, CASYS_SURFACE_CONTEXT_KEY, } from "../../components-contract.js";
|
|
16
|
+
import { generateIntrinsicLayoutFunction } from "./intrinsic-layout.js";
|
|
17
|
+
/**
|
|
18
|
+
* Tallest height, in CSS pixels, a viewer can claim with
|
|
19
|
+
* `ui/notifications/size-changed`. Taller content scrolls inside the viewer's
|
|
20
|
+
* iframe. Advertised to each viewer as `containerDimensions.maxHeight`.
|
|
21
|
+
*
|
|
22
|
+
* The cap also bounds a viewer whose content follows its own iframe
|
|
23
|
+
* (`min-height: 100vh` plus padding): it stops growing here. Compose does not
|
|
24
|
+
* guess such loops from equal increments, which a list gaining rows produces
|
|
25
|
+
* too.
|
|
26
|
+
*/
|
|
27
|
+
export const MAX_VIEWER_HEIGHT = 2_400;
|
|
16
28
|
/**
|
|
17
29
|
* Generate the event bus JavaScript for a composite UI.
|
|
18
30
|
*
|
|
@@ -68,6 +80,31 @@ export function generateEventBusScript(descriptor, slots = new Map()) {
|
|
|
68
80
|
const lastHostContexts = new Map();
|
|
69
81
|
const COMPONENT_CAPABILITY = '${CASYS_COMPONENT_CATALOG_CAPABILITY_KEY}';
|
|
70
82
|
const SURFACE_CONTEXT = '${CASYS_SURFACE_CONTEXT_KEY}';
|
|
83
|
+
const MAX_VIEWER_HEIGHT = ${MAX_VIEWER_HEIGHT};
|
|
84
|
+
// Viewers already warned about the cap.
|
|
85
|
+
const cappedViewers = new Set();
|
|
86
|
+
${generateIntrinsicLayoutFunction()}
|
|
87
|
+
|
|
88
|
+
// Viewer reports apply at once, as for any embed. Only an enclosing host
|
|
89
|
+
// that explicitly refused ui/initialize marks the board as refused: it
|
|
90
|
+
// fills its frame again and later reports no longer size it.
|
|
91
|
+
function handleViewerReport(slot, reported) {
|
|
92
|
+
const panel = iframes.get(slot)?.closest?.('.compose-viewer');
|
|
93
|
+
if (!panel) return;
|
|
94
|
+
const board = panel.parentElement;
|
|
95
|
+
if (board?.hasAttribute?.('data-compose-card-refused')) return;
|
|
96
|
+
const wanted = Math.ceil(reported);
|
|
97
|
+
if (wanted > MAX_VIEWER_HEIGHT && !cappedViewers.has(slot)) {
|
|
98
|
+
cappedViewers.add(slot);
|
|
99
|
+
console.warn('[mcp-compose] Viewer height capped', {
|
|
100
|
+
code: 'VIEWER_HEIGHT_CAPPED', slot, reported: wanted, max: MAX_VIEWER_HEIGHT
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
enterIntrinsicLayout(board);
|
|
104
|
+
panel.style.setProperty(
|
|
105
|
+
'--compose-native-height', Math.min(MAX_VIEWER_HEIGHT, wanted) + 'px'
|
|
106
|
+
);
|
|
107
|
+
}
|
|
71
108
|
|
|
72
109
|
// Build slot -> iframe map + reverse lookup. The fallback lookup matters
|
|
73
110
|
// when the iframe's WindowProxy becomes available after this script runs.
|
|
@@ -164,7 +201,7 @@ export function generateEventBusScript(descriptor, slots = new Map()) {
|
|
|
164
201
|
const panel = iframe.closest?.('.compose-viewer');
|
|
165
202
|
// A fixed height in the handshake makes responsive Apps stretch to the
|
|
166
203
|
// track before they can report the height of their own content.
|
|
167
|
-
if (panel) return { width };
|
|
204
|
+
if (panel) return { width, maxHeight: MAX_VIEWER_HEIGHT };
|
|
168
205
|
return { width, height };
|
|
169
206
|
}
|
|
170
207
|
|
|
@@ -496,6 +533,10 @@ export function generateEventBusScript(descriptor, slots = new Map()) {
|
|
|
496
533
|
];
|
|
497
534
|
const catalog = validComponentCatalog(advertisedCatalog);
|
|
498
535
|
if (catalog) componentCatalogs.set(sourceSlot, catalog);
|
|
536
|
+
// A reloaded viewer starts a new document: forget its height history,
|
|
537
|
+
// including the height the previous document reported. The captured
|
|
538
|
+
// template height stays as the fallback.
|
|
539
|
+
cappedViewers.delete(sourceSlot);
|
|
499
540
|
const hostContext = hostContextForSlot(sourceSlot);
|
|
500
541
|
lastHostContexts.set(sourceSlot, JSON.stringify(hostContext));
|
|
501
542
|
respond(event.source, message.id, {
|
|
@@ -540,13 +581,13 @@ export function generateEventBusScript(descriptor, slots = new Map()) {
|
|
|
540
581
|
}
|
|
541
582
|
|
|
542
583
|
if (message.method === 'ui/notifications/size-changed') {
|
|
543
|
-
const
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
panel
|
|
548
|
-
|
|
549
|
-
|
|
584
|
+
const reported = message.params?.height;
|
|
585
|
+
// Width belongs to the board. Only the child can measure its own document.
|
|
586
|
+
const panel = iframes.get(sourceSlot)?.closest?.('.compose-viewer');
|
|
587
|
+
if (
|
|
588
|
+
panel && initializationResponded.has(sourceSlot) &&
|
|
589
|
+
Number.isFinite(reported) && reported > 0
|
|
590
|
+
) handleViewerReport(sourceSlot, reported);
|
|
550
591
|
ackIfRequested(event.source, message, targetOrigin);
|
|
551
592
|
return;
|
|
552
593
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Browser helper shared by the event bus and the card-height bridge.
|
|
3
|
+
*
|
|
4
|
+
* In intrinsic mode a board sizes its rows from its viewers instead of filling
|
|
5
|
+
* the viewport. A viewer that reports its height through
|
|
6
|
+
* `ui/notifications/size-changed` gets it as `--compose-native-height`. A
|
|
7
|
+
* viewer that never reports keeps the height its template track gave it when
|
|
8
|
+
* the board switched (`--compose-template-height`), and never less than
|
|
9
|
+
* {@link VIEWER_FALLBACK_HEIGHT}.
|
|
10
|
+
*
|
|
11
|
+
* @module renderer/js/intrinsic-layout
|
|
12
|
+
*/
|
|
13
|
+
/** Height, in CSS pixels, of a viewer that has not reported its own. */
|
|
14
|
+
export declare const VIEWER_FALLBACK_HEIGHT = 200;
|
|
15
|
+
/**
|
|
16
|
+
* Source of `enterIntrinsicLayout(board)`, to embed in a generated script.
|
|
17
|
+
* The function is idempotent: once the board is intrinsic, it does nothing.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```ts
|
|
21
|
+
* const script = `${generateIntrinsicLayoutFunction()}
|
|
22
|
+
* enterIntrinsicLayout(document.querySelector('[data-compose-board]'));`;
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
export declare function generateIntrinsicLayoutFunction(): string;
|
|
26
|
+
//# sourceMappingURL=intrinsic-layout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"intrinsic-layout.d.ts","sourceRoot":"","sources":["../../../../../src/src/host/renderer/js/intrinsic-layout.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,wEAAwE;AACxE,eAAO,MAAM,sBAAsB,MAAM,CAAC;AAE1C;;;;;;;;;GASG;AACH,wBAAgB,+BAA+B,IAAI,MAAM,CAmBxD"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Browser helper shared by the event bus and the card-height bridge.
|
|
3
|
+
*
|
|
4
|
+
* In intrinsic mode a board sizes its rows from its viewers instead of filling
|
|
5
|
+
* the viewport. A viewer that reports its height through
|
|
6
|
+
* `ui/notifications/size-changed` gets it as `--compose-native-height`. A
|
|
7
|
+
* viewer that never reports keeps the height its template track gave it when
|
|
8
|
+
* the board switched (`--compose-template-height`), and never less than
|
|
9
|
+
* {@link VIEWER_FALLBACK_HEIGHT}.
|
|
10
|
+
*
|
|
11
|
+
* @module renderer/js/intrinsic-layout
|
|
12
|
+
*/
|
|
13
|
+
/** Height, in CSS pixels, of a viewer that has not reported its own. */
|
|
14
|
+
export const VIEWER_FALLBACK_HEIGHT = 200;
|
|
15
|
+
/**
|
|
16
|
+
* Source of `enterIntrinsicLayout(board)`, to embed in a generated script.
|
|
17
|
+
* The function is idempotent: once the board is intrinsic, it does nothing.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```ts
|
|
21
|
+
* const script = `${generateIntrinsicLayoutFunction()}
|
|
22
|
+
* enterIntrinsicLayout(document.querySelector('[data-compose-board]'));`;
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
export function generateIntrinsicLayoutFunction() {
|
|
26
|
+
return `
|
|
27
|
+
function enterIntrinsicLayout(board) {
|
|
28
|
+
if (!board || board.hasAttribute('data-compose-intrinsic')) return;
|
|
29
|
+
// Measure before switching: afterwards the tracks follow their content.
|
|
30
|
+
for (const viewer of Array.from(board.children ?? [])) {
|
|
31
|
+
if (!viewer.classList?.contains('compose-viewer')) continue;
|
|
32
|
+
if (viewer.style.getPropertyValue('--compose-native-height')) continue;
|
|
33
|
+
const height = Math.ceil(viewer.getBoundingClientRect().height);
|
|
34
|
+
if (height > ${VIEWER_FALLBACK_HEIGHT}) {
|
|
35
|
+
viewer.style.setProperty('--compose-template-height', height + 'px');
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
board.setAttribute('data-compose-intrinsic', '');
|
|
39
|
+
// Placements committed before the switch hold fixed row minimums.
|
|
40
|
+
if (typeof board.dispatchEvent === 'function') {
|
|
41
|
+
board.dispatchEvent(new Event('compose-layout-intrinsic'));
|
|
42
|
+
}
|
|
43
|
+
}`;
|
|
44
|
+
}
|
|
@@ -1,8 +1,15 @@
|
|
|
1
|
+
import type { PanelLayoutSnapshot } from "../../code-mode/layout.js";
|
|
2
|
+
|
|
1
3
|
/** The board element available to a caller running in a DOM environment. */
|
|
2
4
|
type PanelContainer = typeof globalThis extends { HTMLElement: { prototype: infer Element } }
|
|
3
5
|
? Element
|
|
4
6
|
: never;
|
|
5
7
|
|
|
8
|
+
/** Capture the current board's committed choices, keeping the requested widths across viewport changes. */
|
|
9
|
+
export declare function capturePanelLayout(board: PanelContainer): PanelLayoutSnapshot | undefined;
|
|
10
|
+
/** Restore the snapshot in place on a compatible mounted board. */
|
|
11
|
+
export declare function restorePanelLayout(board: PanelContainer, value: unknown): boolean;
|
|
12
|
+
|
|
6
13
|
/** Install pointer and keyboard controls for moving panels within a Compose board. */
|
|
7
14
|
export declare function installPanelMovement(container: PanelContainer, signal?: AbortSignal): void;
|
|
8
15
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// @ts-self-types="./panel-controls.d.ts"
|
|
2
2
|
// Server consumers embed these functions in HTML. Only browsers execute their DOM code.
|
|
3
3
|
export { installPanelMovement } from "./panel-movement.js";
|
|
4
|
+
export { capturePanelLayout, restorePanelLayout } from "./panel-snapshot.js";
|
|
4
5
|
export { createPanelReflow } from "./panel-reflow.js";
|
|
5
6
|
export { installPanelResizing } from "./panel-resizing.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"panel-movement.d.ts","sourceRoot":"","sources":["../../../../src/src/host/renderer/panel-movement.js"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,gDAHW,WAAW,
|
|
1
|
+
{"version":3,"file":"panel-movement.d.ts","sourceRoot":"","sources":["../../../../src/src/host/renderer/panel-movement.js"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,gDAHW,WAAW,0CAkYrB"}
|
|
@@ -104,6 +104,7 @@ export function installPanelMovement(container, signal) {
|
|
|
104
104
|
function announceSwap(from, to) {
|
|
105
105
|
status.textContent = label(from) + " swapped with " + label(to) + ".";
|
|
106
106
|
container.dispatchEvent(new Event("compose-layout-change"));
|
|
107
|
+
container.dispatchEvent(new Event("compose-panel-layout-committed"));
|
|
107
108
|
}
|
|
108
109
|
/** @param {"preview" | "commit" | "cancel"} phase @param {FreePlace} place */
|
|
109
110
|
function placeBeside(phase, place) {
|
|
@@ -273,7 +274,9 @@ export function installPanelMovement(container, signal) {
|
|
|
273
274
|
return best;
|
|
274
275
|
}
|
|
275
276
|
for (const [index, panel] of panels.entries()) {
|
|
276
|
-
if (
|
|
277
|
+
if (namedAreas)
|
|
278
|
+
panel.dataset.composeTemplateArea ??= panel.dataset.area;
|
|
279
|
+
else
|
|
277
280
|
panel.style.order = String(index);
|
|
278
281
|
let grip = /** @type {HTMLButtonElement | null} */ (panel.querySelector("[data-compose-grip]"));
|
|
279
282
|
if (!grip) {
|
|
@@ -367,6 +370,7 @@ export function installPanelMovement(container, signal) {
|
|
|
367
370
|
const where = placement.side === "below" ? " below " : " beside ";
|
|
368
371
|
status.textContent = label(from) + " placed" + where + label(placement.beside) + ".";
|
|
369
372
|
container.dispatchEvent(new Event("compose-layout-change"));
|
|
373
|
+
container.dispatchEvent(new Event("compose-panel-layout-committed"));
|
|
370
374
|
}
|
|
371
375
|
select();
|
|
372
376
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"panel-resizing.d.ts","sourceRoot":"","sources":["../../../../src/src/host/renderer/panel-resizing.js"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,gDAJW,WAAW,+
|
|
1
|
+
{"version":3,"file":"panel-resizing.d.ts","sourceRoot":"","sources":["../../../../src/src/host/renderer/panel-resizing.js"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,gDAJW,WAAW,+FA0XrB;kCAhYiC,mBAAmB"}
|
|
@@ -85,6 +85,7 @@ export function installPanelResizing(container, signal, createReflow = createPan
|
|
|
85
85
|
function commitWidth(panel, width) {
|
|
86
86
|
choices.set(panel, width);
|
|
87
87
|
place();
|
|
88
|
+
container.dispatchEvent(new browser.Event("compose-panel-layout-committed"));
|
|
88
89
|
status.textContent = (panel.dataset.panelLabel || "Viewer") + " width " + width + " pixels.";
|
|
89
90
|
}
|
|
90
91
|
/** @param {KeyboardEvent} event @param {HTMLElement} panel @param {number[]} widths */
|
|
@@ -284,6 +285,14 @@ export function installPanelResizing(container, signal, createReflow = createPan
|
|
|
284
285
|
place();
|
|
285
286
|
schedule();
|
|
286
287
|
}, { signal });
|
|
288
|
+
// Entering intrinsic layout drops the row floors of committed placements.
|
|
289
|
+
container.addEventListener("compose-layout-intrinsic", () => {
|
|
290
|
+
if (projectDrag)
|
|
291
|
+
projectDrag();
|
|
292
|
+
else
|
|
293
|
+
place();
|
|
294
|
+
schedule();
|
|
295
|
+
}, { signal });
|
|
287
296
|
container.addEventListener("compose-layout-change", () => {
|
|
288
297
|
placements = placementsAfterSwap();
|
|
289
298
|
manualPreview = undefined;
|
|
@@ -333,7 +342,34 @@ export function installPanelResizing(container, signal, createReflow = createPan
|
|
|
333
342
|
manualPreview = proposed;
|
|
334
343
|
schedule();
|
|
335
344
|
}, { signal });
|
|
345
|
+
// Expose committed preferences to the owning board without touching viewer results or iframes.
|
|
346
|
+
// Symbol.for also connects hosts that embed these controls as standalone JavaScript.
|
|
347
|
+
const slotState = Symbol.for("@mcpview/compose/panel-layout-controls/v1");
|
|
348
|
+
Reflect.set(container, slotState, {
|
|
349
|
+
read: () => ({
|
|
350
|
+
widths: Array.from(choices, ([p, width]) => ({ panel: p.dataset.composePanelId, width })),
|
|
351
|
+
placements: Array.from(placements, ([p, { beside, side }]) => ({
|
|
352
|
+
panel: p.dataset.composePanelId,
|
|
353
|
+
beside: beside.dataset.composePanelId,
|
|
354
|
+
side,
|
|
355
|
+
})),
|
|
356
|
+
}),
|
|
357
|
+
supports: (/** @type {HTMLElement} */ panel, /** @type {number} */ width) => declared.get(panel)?.includes(width) === true,
|
|
358
|
+
restore: (
|
|
359
|
+
/** @type {Array<[HTMLElement, number]>} */ widths,
|
|
360
|
+
/** @type {Array<[HTMLElement, Placement]>} */ positions) => {
|
|
361
|
+
choices.clear();
|
|
362
|
+
for (const [panel, width] of widths)
|
|
363
|
+
choices.set(panel, width);
|
|
364
|
+
placements = new Map(positions);
|
|
365
|
+
lastSlots = panels.map(slot);
|
|
366
|
+
manualPreview = undefined;
|
|
367
|
+
place();
|
|
368
|
+
schedule();
|
|
369
|
+
},
|
|
370
|
+
});
|
|
336
371
|
signal?.addEventListener("abort", () => {
|
|
372
|
+
Reflect.deleteProperty(container, slotState);
|
|
337
373
|
cancelDrag?.();
|
|
338
374
|
observer.disconnect();
|
|
339
375
|
browser.cancelAnimationFrame(pending);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** Read only the last committed layout preferences.
|
|
2
|
+
* @param {HTMLElement} board
|
|
3
|
+
* @returns {import("../../code-mode/layout.ts").PanelLayoutSnapshot | undefined}
|
|
4
|
+
*/
|
|
5
|
+
export function capturePanelLayout(board: HTMLElement): import("../../code-mode/layout.ts").PanelLayoutSnapshot | undefined;
|
|
6
|
+
/** Apply a saved preference only to matching panels and current viewer width declarations.
|
|
7
|
+
* @param {HTMLElement} board
|
|
8
|
+
* @param {unknown} snapshot
|
|
9
|
+
*/
|
|
10
|
+
export function restorePanelLayout(board: HTMLElement, snapshot: unknown): boolean;
|
|
11
|
+
//# sourceMappingURL=panel-snapshot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"panel-snapshot.d.ts","sourceRoot":"","sources":["../../../../src/src/host/renderer/panel-snapshot.js"],"names":[],"mappings":"AAuBA;;;GAGG;AACH,0CAHW,WAAW,GACT,OAAO,2BAA2B,EAAE,mBAAmB,GAAG,SAAS,CAe/E;AAED;;;GAGG;AACH,0CAHW,WAAW,YACX,OAAO,WA2BjB"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { isPanelLayoutSnapshot } from "../../code-mode/layout.js";
|
|
2
|
+
const slotState = Symbol.for("@mcpview/compose/panel-layout-controls/v1");
|
|
3
|
+
/** @param {HTMLElement} board */
|
|
4
|
+
function panelSlots(board) {
|
|
5
|
+
const panels = Array.from(
|
|
6
|
+
/** @type {NodeListOf<HTMLElement>} */ (board.querySelectorAll(":scope > [data-compose-panel]")));
|
|
7
|
+
const ids = panels.map((node) => node.dataset.composePanelId);
|
|
8
|
+
if (!ids.every(Boolean) || new Set(ids).size !== ids.length)
|
|
9
|
+
return;
|
|
10
|
+
const named = panels.every((node) => node.dataset.area);
|
|
11
|
+
// Named areas follow the template even when the viewport changes its number of columns.
|
|
12
|
+
const slots = panels.map((node, i) => named ? node.dataset.composeTemplateArea ?? node.dataset.area ?? "" : String(i));
|
|
13
|
+
if (new Set(slots).size !== slots.length)
|
|
14
|
+
return;
|
|
15
|
+
return { panels, slots, named, byId: new Map(panels.map((p) => [p.dataset.composePanelId, p])) };
|
|
16
|
+
}
|
|
17
|
+
/** Read only the last committed layout preferences.
|
|
18
|
+
* @param {HTMLElement} board
|
|
19
|
+
* @returns {import("../../code-mode/layout.ts").PanelLayoutSnapshot | undefined}
|
|
20
|
+
*/
|
|
21
|
+
export function capturePanelLayout(board) {
|
|
22
|
+
if (board.hasAttribute("data-compose-dragging"))
|
|
23
|
+
return;
|
|
24
|
+
const table = panelSlots(board);
|
|
25
|
+
if (!table)
|
|
26
|
+
return;
|
|
27
|
+
const { panels, named, slots } = table;
|
|
28
|
+
const occupants = new Map(panels.map((panel, i) => [
|
|
29
|
+
named ? panel.dataset.area : (panel.style.order || String(i)),
|
|
30
|
+
panel.dataset.composePanelId,
|
|
31
|
+
]));
|
|
32
|
+
const controls = Reflect.get(board, slotState);
|
|
33
|
+
const geometry = controls?.read() ?? { widths: [], placements: [] };
|
|
34
|
+
const snapshot = { version: 1, order: slots.map((slot) => occupants.get(slot)), ...geometry };
|
|
35
|
+
return isPanelLayoutSnapshot(snapshot) ? snapshot : undefined;
|
|
36
|
+
}
|
|
37
|
+
/** Apply a saved preference only to matching panels and current viewer width declarations.
|
|
38
|
+
* @param {HTMLElement} board
|
|
39
|
+
* @param {unknown} snapshot
|
|
40
|
+
*/
|
|
41
|
+
export function restorePanelLayout(board, snapshot) {
|
|
42
|
+
if (!isPanelLayoutSnapshot(snapshot) || board.hasAttribute("data-compose-dragging"))
|
|
43
|
+
return false;
|
|
44
|
+
const table = panelSlots(board);
|
|
45
|
+
if (!table || snapshot.order.length !== table.panels.length ||
|
|
46
|
+
!snapshot.order.every((id) => table.byId.has(id)))
|
|
47
|
+
return false;
|
|
48
|
+
const controls = Reflect.get(board, slotState);
|
|
49
|
+
if ((snapshot.widths.length || snapshot.placements.length) && !controls)
|
|
50
|
+
return false;
|
|
51
|
+
if (!snapshot.widths.every(({ panel, width }) => controls?.supports(table.byId.get(panel), width)))
|
|
52
|
+
return false;
|
|
53
|
+
snapshot.order.forEach((id, index) => {
|
|
54
|
+
const panel = /** @type {HTMLElement} */ (table.byId.get(id));
|
|
55
|
+
if (table.named)
|
|
56
|
+
panel.dataset.area = table.slots[index];
|
|
57
|
+
else
|
|
58
|
+
panel.style.order = table.slots[index];
|
|
59
|
+
});
|
|
60
|
+
controls?.restore(snapshot.widths.map(({ panel, width }) => [table.byId.get(panel), width]), snapshot.placements.map(({ panel, beside, side }) => [
|
|
61
|
+
table.byId.get(panel),
|
|
62
|
+
{ beside: table.byId.get(beside), side },
|
|
63
|
+
]));
|
|
64
|
+
return true;
|
|
65
|
+
}
|
package/esm/src/version.d.ts
CHANGED
package/esm/src/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mcpview/compose",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"description": "Compose and synchronize multiple MCP Apps UIs into composite dashboards",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mcp",
|
|
@@ -35,6 +35,14 @@
|
|
|
35
35
|
"import": "./esm/src/code-mode/mod.js",
|
|
36
36
|
"require": "./script/src/code-mode/mod.js"
|
|
37
37
|
},
|
|
38
|
+
"./code-mode/layout": {
|
|
39
|
+
"import": "./esm/src/code-mode/layout.js",
|
|
40
|
+
"require": "./script/src/code-mode/layout.js"
|
|
41
|
+
},
|
|
42
|
+
"./code-mode/layout-runs": {
|
|
43
|
+
"import": "./esm/src/code-mode/layout-runs.js",
|
|
44
|
+
"require": "./script/src/code-mode/layout-runs.js"
|
|
45
|
+
},
|
|
38
46
|
"./code-mode/board": {
|
|
39
47
|
"import": "./esm/src/code-mode/board.js",
|
|
40
48
|
"require": "./script/src/code-mode/board.js"
|
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
interface Object {
|
|
3
|
+
/**
|
|
4
|
+
* Determines whether an object has a property with the specified name.
|
|
5
|
+
* @param o An object.
|
|
6
|
+
* @param v A property name.
|
|
7
|
+
*/
|
|
8
|
+
hasOwn(o: object, v: PropertyKey): boolean;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export {};
|
|
1
12
|
declare global {
|
|
2
13
|
interface Array<T> {
|
|
3
14
|
/**
|
|
@@ -47,17 +58,6 @@ declare global {
|
|
|
47
58
|
}
|
|
48
59
|
}
|
|
49
60
|
export {};
|
|
50
|
-
declare global {
|
|
51
|
-
interface Object {
|
|
52
|
-
/**
|
|
53
|
-
* Determines whether an object has a property with the specified name.
|
|
54
|
-
* @param o An object.
|
|
55
|
-
* @param v A property name.
|
|
56
|
-
*/
|
|
57
|
-
hasOwn(o: object, v: PropertyKey): boolean;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
export {};
|
|
61
61
|
declare global {
|
|
62
62
|
interface Error {
|
|
63
63
|
cause?: unknown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_dnt.polyfills.d.ts","sourceRoot":"","sources":["../src/_dnt.polyfills.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"_dnt.polyfills.d.ts","sourceRoot":"","sources":["../src/_dnt.polyfills.ts"],"names":[],"mappings":"AAeA,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd;;;;WAIG;QACH,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC;KAC5C;CACF;AAED,OAAO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EAAE,UAAU,KAAK,OAAO,EACvE,OAAO,CAAC,EAAE,GAAG,GACd,MAAM,CAAC;KACX;CACF;AA4CD,OAAO,EAAE,CAAC;AACV,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,KAAK;QACb,KAAK,CAAC,EAAE,OAAO,CAAC;KACjB;CACF;AAED,OAAO,EAAE,CAAC"}
|
package/script/_dnt.polyfills.js
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// https://github.com/tc39/proposal-accessible-object-hasownproperty/blob/main/polyfill.js
|
|
4
|
+
if (!Object.hasOwn) {
|
|
5
|
+
Object.defineProperty(Object, "hasOwn", {
|
|
6
|
+
value: function (object, property) {
|
|
7
|
+
if (object == null) {
|
|
8
|
+
throw new TypeError("Cannot convert undefined or null to object");
|
|
9
|
+
}
|
|
10
|
+
return Object.prototype.hasOwnProperty.call(Object(object), property);
|
|
11
|
+
},
|
|
12
|
+
configurable: true,
|
|
13
|
+
enumerable: false,
|
|
14
|
+
writable: true,
|
|
15
|
+
});
|
|
16
|
+
}
|
|
3
17
|
function findLastIndex(self, callbackfn, that) {
|
|
4
18
|
const boundFunc = that === undefined ? callbackfn : callbackfn.bind(that);
|
|
5
19
|
let index = self.length - 1;
|
|
@@ -36,17 +50,3 @@ if (!Uint8Array.prototype.findLast) {
|
|
|
36
50
|
return findLast(this, callbackfn, that);
|
|
37
51
|
};
|
|
38
52
|
}
|
|
39
|
-
// https://github.com/tc39/proposal-accessible-object-hasownproperty/blob/main/polyfill.js
|
|
40
|
-
if (!Object.hasOwn) {
|
|
41
|
-
Object.defineProperty(Object, "hasOwn", {
|
|
42
|
-
value: function (object, property) {
|
|
43
|
-
if (object == null) {
|
|
44
|
-
throw new TypeError("Cannot convert undefined or null to object");
|
|
45
|
-
}
|
|
46
|
-
return Object.prototype.hasOwnProperty.call(Object(object), property);
|
|
47
|
-
},
|
|
48
|
-
configurable: true,
|
|
49
|
-
enumerable: false,
|
|
50
|
-
writable: true,
|
|
51
|
-
});
|
|
52
|
-
}
|
|
@@ -3,11 +3,17 @@
|
|
|
3
3
|
* @module
|
|
4
4
|
*/
|
|
5
5
|
import "../../_dnt.polyfills.js";
|
|
6
|
-
import type { ComponentSurface } from "../core/types/components.js";
|
|
6
|
+
import type { ComponentSurface, ViewComponentEventPorts } from "../core/types/components.js";
|
|
7
7
|
import type { CompositeUiDescriptor } from "../core/types/descriptor.js";
|
|
8
8
|
import type { UiLayout } from "../core/types/layout.js";
|
|
9
|
+
import type { UiSyncRule } from "../core/types/sync-rules.js";
|
|
10
|
+
import { SNIPPET_SYNC_META_KEY } from "./sync.js";
|
|
11
|
+
export { SNIPPET_SYNC_META_KEY };
|
|
12
|
+
export { createPanelContexts, type PanelContexts, type PanelContextUpdate, type SendPanelContext, } from "./panel-contexts.js";
|
|
13
|
+
export { connectSnippetBoardLayout, type SnippetBoardLayoutOptions, type SnippetLayoutReceipt, type SnippetLayoutStatus, } from "./layout-publisher.js";
|
|
9
14
|
export { getPanelControlsCss } from "../host/renderer/css/panel-controls.js";
|
|
10
|
-
export {
|
|
15
|
+
export { isPanelLayoutSnapshot, type PanelLayoutSnapshot } from "./layout.js";
|
|
16
|
+
export { capturePanelLayout, installPanelMovement, installPanelResizing, restorePanelLayout, } from "../host/renderer/panel-controls.js";
|
|
11
17
|
/** MCP App result metadata containing the receipts selected by the program. */
|
|
12
18
|
export declare const SNIPPET_PANELS_META_KEY = "io.mcpview/snippet-panels";
|
|
13
19
|
/** A selected provider result. The receipt ID distinguishes calls to the same snippet. */
|
|
@@ -17,6 +23,7 @@ export interface SnippetPanel {
|
|
|
17
23
|
readonly name: string;
|
|
18
24
|
readonly title: string;
|
|
19
25
|
readonly result: Record<string, unknown>;
|
|
26
|
+
readonly events?: ViewComponentEventPorts;
|
|
20
27
|
}
|
|
21
28
|
/** An App-owned view for a receipt, with optional renderer data and component selection. */
|
|
22
29
|
export interface SnippetPanelView {
|
|
@@ -25,6 +32,8 @@ export interface SnippetPanelView {
|
|
|
25
32
|
readonly surface?: ComponentSurface;
|
|
26
33
|
/** Widths offered by this local view in CSS pixels. An empty list disables resizing. */
|
|
27
34
|
readonly supportedWidths?: readonly number[];
|
|
35
|
+
/** Restrict routing to the ports implemented by this local view. */
|
|
36
|
+
readonly events?: ViewComponentEventPorts;
|
|
28
37
|
}
|
|
29
38
|
/** Display options supplied by the board hosting the results. */
|
|
30
39
|
export interface SnippetBoardOptions {
|
|
@@ -46,6 +55,8 @@ export interface SnippetBoardOptions {
|
|
|
46
55
|
* ```
|
|
47
56
|
*/
|
|
48
57
|
export declare function readSnippetPanels(result: unknown): SnippetPanel[];
|
|
58
|
+
/** Read unique, declared Compose routes between panels in this result. */
|
|
59
|
+
export declare function readSnippetSyncRules(result: unknown): UiSyncRule[];
|
|
49
60
|
/**
|
|
50
61
|
* Build a Compose descriptor from the current execution, without making any provider calls.
|
|
51
62
|
* Each child keeps its receipt in `context.panel` and adapter data in `context.view`.
|
|
@@ -63,4 +74,9 @@ export declare function readSnippetPanels(result: unknown): SnippetPanel[];
|
|
|
63
74
|
* ```
|
|
64
75
|
*/
|
|
65
76
|
export declare function composeSnippetBoard(result: unknown, options?: SnippetBoardOptions): CompositeUiDescriptor;
|
|
77
|
+
/**
|
|
78
|
+
* Deliver a JSON event through the current board's declared routes to mounted views.
|
|
79
|
+
* The board owns dispatch and supplies the receipts and data from its active UI.
|
|
80
|
+
*/
|
|
81
|
+
export declare function emitSnippetBoardEvent(descriptor: CompositeUiDescriptor, sourceReceiptId: string, event: string, data: unknown, deliver: (targetReceiptId: string, action: string, data: unknown) => void): void;
|
|
66
82
|
//# sourceMappingURL=board.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"board.d.ts","sourceRoot":"","sources":["../../../src/src/code-mode/board.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,yBAAyB,CAAC;AAMjC,OAAO,KAA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