@1agh/maude 1.6.13 → 1.8.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/apps/studio/acp/bridge.ts +1 -0
- package/apps/studio/acp/login-state.ts +1 -0
- package/apps/studio/acp/probe.ts +1 -0
- package/apps/studio/annotations/ai-read.ts +3 -0
- package/apps/studio/annotations/ai-write.ts +15 -1
- package/apps/studio/annotations/lock.ts +174 -0
- package/apps/studio/annotations/migrate-v1.ts +1 -0
- package/apps/studio/annotations/registry.ts +3 -0
- package/apps/studio/annotations/v1-adapter.ts +1 -0
- package/apps/studio/annotations-context-toolbar.tsx +39 -0
- package/apps/studio/annotations-layer.tsx +167 -17
- package/apps/studio/annotations-model.ts +9 -0
- package/apps/studio/api.ts +412 -35
- package/apps/studio/asset-upload.ts +174 -0
- package/apps/studio/assets-s3.ts +37 -2
- package/apps/studio/bin/_pdf-playwright.mjs +22 -1
- package/apps/studio/bin/_png-playwright.mjs +20 -1
- package/apps/studio/bin/_region.mjs +92 -0
- package/apps/studio/canvas-build.ts +59 -4
- package/apps/studio/canvas-icons.tsx +18 -0
- package/apps/studio/canvas-lib.tsx +48 -1
- package/apps/studio/canvas-shell.tsx +28 -4
- package/apps/studio/client/app.jsx +109 -22
- package/apps/studio/client/canvas-url.js +9 -0
- package/apps/studio/client/embed-view.jsx +284 -0
- package/apps/studio/client/embed.js +101 -0
- package/apps/studio/client/export-center.jsx +2 -0
- package/apps/studio/client/github.js +36 -3
- package/apps/studio/client/report-bug.jsx +8 -2
- package/apps/studio/context.ts +7 -0
- package/apps/studio/dist/client.bundle.js +2682 -2682
- package/apps/studio/dist/comment-mount.js +2 -2
- package/apps/studio/embed-origins.ts +52 -0
- package/apps/studio/export-dialog.tsx +55 -3
- package/apps/studio/exporters/format-scopes.ts +11 -3
- package/apps/studio/exporters/index.ts +17 -2
- package/apps/studio/exporters/jobs.ts +16 -8
- package/apps/studio/exporters/pdf.ts +10 -2
- package/apps/studio/exporters/png.ts +10 -2
- package/apps/studio/exporters/scope.ts +74 -3
- package/apps/studio/generation/runtime-probe.ts +1 -1
- package/apps/studio/git/service.ts +1 -0
- package/apps/studio/http.ts +186 -13
- package/apps/studio/input-router.tsx +7 -1
- package/apps/studio/path-containment.ts +72 -0
- package/apps/studio/paths.ts +14 -1
- package/apps/studio/read-only-mode.ts +53 -0
- package/apps/studio/server.ts +9 -0
- package/apps/studio/sync/index.ts +74 -13
- package/apps/studio/sync/park.ts +39 -0
- package/apps/studio/sync/presentation.ts +9 -3
- package/apps/studio/sync/writer-registry.ts +5 -0
- package/apps/studio/use-annotation-resize.tsx +4 -1
- package/apps/studio/use-canvas-media-drop.tsx +8 -28
- package/apps/studio/whats-new.json +36 -0
- package/cli/commands/design.mjs +9 -2
- package/cli/commands/hub-workspace.mjs +25 -0
- package/cli/lib/workspace-plan.mjs +51 -0
- package/package.json +9 -9
- package/plugins/design/templates/_shell.html +58 -0
|
@@ -222,6 +222,48 @@
|
|
|
222
222
|
const abs = u.startsWith('/') ? base + u : u;
|
|
223
223
|
return cap ? abs + (abs.includes('?') ? '&' : '?') + 't=' + encodeURIComponent(cap) : abs;
|
|
224
224
|
};
|
|
225
|
+
// DDR-247 — THE AMBIENT COOKIE READS, IT NEVER WRITES. The hub's canvas
|
|
226
|
+
// door authorises a write (POST/PUT/PATCH/DELETE) or a live socket only
|
|
227
|
+
// from an EXPLICIT `?t=`, because the `maude_canvas` cookie is one per
|
|
228
|
+
// canvas origin: inside an embed another tab's full capability would ride
|
|
229
|
+
// it. So every same-origin write and socket this document's code opens
|
|
230
|
+
// carries the capability THIS frame was given — read live, so a re-minted
|
|
231
|
+
// one (`canvas-cap` below) applies at once. In an embed that capability is
|
|
232
|
+
// read-only and the door refuses the write, which is the point. Canvas
|
|
233
|
+
// code could always read `?t=` from its own URL; this exposes nothing new.
|
|
234
|
+
// Cloud only: a desktop canvas has no capability and nothing is wrapped.
|
|
235
|
+
if (cap) {
|
|
236
|
+
const withLiveCap = (u) => {
|
|
237
|
+
try {
|
|
238
|
+
const url = new URL(u, location.href);
|
|
239
|
+
if (url.host !== location.host) return null;
|
|
240
|
+
url.searchParams.set('t', cap);
|
|
241
|
+
return url.toString();
|
|
242
|
+
} catch {
|
|
243
|
+
return null;
|
|
244
|
+
}
|
|
245
|
+
};
|
|
246
|
+
const nativeFetch = window.fetch.bind(window);
|
|
247
|
+
window.fetch = function (input, init) {
|
|
248
|
+
const isReq = typeof Request !== 'undefined' && input instanceof Request;
|
|
249
|
+
const method = String((init && init.method) || (isReq ? input.method : 'GET')).toUpperCase();
|
|
250
|
+
if (method !== 'GET' && method !== 'HEAD') {
|
|
251
|
+
const next = withLiveCap(isReq ? input.url : String(input));
|
|
252
|
+
if (next) input = isReq ? new Request(next, input) : next;
|
|
253
|
+
}
|
|
254
|
+
return nativeFetch(input, init);
|
|
255
|
+
};
|
|
256
|
+
const NativeWebSocket = window.WebSocket;
|
|
257
|
+
const CapWebSocket = function (url, protocols) {
|
|
258
|
+
const next = withLiveCap(String(url)) || url;
|
|
259
|
+
return protocols === undefined
|
|
260
|
+
? new NativeWebSocket(next)
|
|
261
|
+
: new NativeWebSocket(next, protocols);
|
|
262
|
+
};
|
|
263
|
+
CapWebSocket.prototype = NativeWebSocket.prototype;
|
|
264
|
+
Object.setPrototypeOf(CapWebSocket, NativeWebSocket);
|
|
265
|
+
window.WebSocket = CapWebSocket;
|
|
266
|
+
}
|
|
225
267
|
const canvasQuery = shaParam ? ('?sha=' + encodeURIComponent(shaParam)) : '';
|
|
226
268
|
let canvasUrl = canvasRel ? withCap('/' + designRel + '/' + canvasRel + canvasQuery) : null;
|
|
227
269
|
const myFileKey = canvasRel ? (designRel + '/' + canvasRel) : null;
|
|
@@ -333,6 +375,22 @@
|
|
|
333
375
|
if (params.get('hide-chrome') === '1') {
|
|
334
376
|
const styleEl = document.getElementById('canvas-hide-chrome');
|
|
335
377
|
if (styleEl) styleEl.media = 'all';
|
|
378
|
+
// Issue #125 — an export that opted into annotations paints the
|
|
379
|
+
// annotation scene back in (more specific + !important beats the
|
|
380
|
+
// block above). Comment pins + selection chrome stay hidden.
|
|
381
|
+
if (params.get('annotations') === '1') {
|
|
382
|
+
const show = document.createElement('style');
|
|
383
|
+
show.id = 'canvas-export-annotations';
|
|
384
|
+
// `.dc-annot-svg` also owns the <defs> the scene references (the
|
|
385
|
+
// sticky drop-shadow filter) — a filter inside a display:none SVG
|
|
386
|
+
// makes Chromium skip the filtered element entirely, so keep the
|
|
387
|
+
// SVG laid out and hide only its selection chrome.
|
|
388
|
+
show.textContent =
|
|
389
|
+
'.dc-world [data-mdcc-annotations] { display: block !important; }' +
|
|
390
|
+
'html .dc-annot-svg { display: block !important; }' +
|
|
391
|
+
'html .dc-annot-svg > :not(defs) { display: none !important; }';
|
|
392
|
+
document.head.appendChild(show);
|
|
393
|
+
}
|
|
336
394
|
}
|
|
337
395
|
// Shell-owned comment layer toggle. Gallery thumbnails pass `?comments=0`
|
|
338
396
|
// so the comment chrome is suppressed in previews; opened tabs omit it
|