@1agh/maude 0.55.0 → 0.56.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/apps/studio/bin/_smart-frames.mjs +187 -20
- package/apps/studio/bin/_smart-frames.test.mjs +59 -4
- package/apps/studio/bin/_transcribe.mjs +40 -3
- package/apps/studio/bin/smoke.sh +7 -1
- package/apps/studio/client/app.jsx +31 -3
- package/apps/studio/client/panels/CloudBar.jsx +44 -5
- package/apps/studio/client/panels/GitPanel.jsx +38 -25
- package/apps/studio/client/panels/SettingsPanel.jsx +239 -27
- package/apps/studio/client/styles/4-components.css +72 -0
- package/apps/studio/cloud/endpoints.ts +56 -3
- package/apps/studio/collab/persistence.ts +29 -2
- package/apps/studio/config.schema.json +3 -3
- package/apps/studio/context.ts +41 -0
- package/apps/studio/dist/client.bundle.js +1464 -1464
- package/apps/studio/dist/comment-mount.js +2 -2
- package/apps/studio/dist/styles.css +1 -1
- package/apps/studio/generation/gemma-models.ts +312 -14
- package/apps/studio/generation/prefs.ts +7 -2
- package/apps/studio/generation/runtime-probe.ts +50 -0
- package/apps/studio/generation/whisper-models.ts +124 -0
- package/apps/studio/hmr-broadcast.ts +67 -0
- package/apps/studio/http.ts +196 -109
- package/apps/studio/input-router.tsx +55 -2
- package/apps/studio/server.ts +11 -9
- package/apps/studio/sync/autocommit.ts +61 -2
- package/apps/studio/sync/cell-pairing.ts +174 -0
- package/apps/studio/sync/codec.ts +11 -5
- package/apps/studio/sync/index.ts +239 -26
- package/apps/studio/sync/limits.ts +49 -0
- package/apps/studio/sync/loopback.ts +21 -0
- package/apps/studio/sync/projection.ts +47 -12
- package/apps/studio/sync/supervisor.ts +178 -0
- package/apps/studio/test/cloud-endpoints.test.ts +95 -0
- package/apps/studio/test/csrf-write-guard.test.ts +19 -2
- package/apps/studio/test/gemma-models.test.ts +245 -0
- package/apps/studio/test/hmr-broadcast.test.ts +57 -1
- package/apps/studio/test/input-router.test.ts +95 -0
- package/apps/studio/test/shared-doc-cell-pairing.test.ts +639 -0
- package/apps/studio/test/sync-autocommit.test.ts +47 -0
- package/apps/studio/test/sync-supervisor.test.ts +212 -0
- package/apps/studio/test/trusted-request-host.test.ts +66 -0
- package/apps/studio/test/whisper-setup.test.ts +97 -0
- package/apps/studio/whats-new.json +27 -0
- package/apps/studio/ws.ts +9 -1
- package/cli/commands/kg.mjs +9 -2
- package/package.json +8 -8
- package/plugins/design/dependencies.json +21 -3
|
@@ -7,8 +7,10 @@ import {
|
|
|
7
7
|
classify,
|
|
8
8
|
crossedDragThreshold,
|
|
9
9
|
DRAG_THRESHOLD_PX,
|
|
10
|
+
isArtboardDragChrome,
|
|
10
11
|
isEditableTarget,
|
|
11
12
|
type Tool,
|
|
13
|
+
yieldsToArtboardDrag,
|
|
12
14
|
} from '../input-router.tsx';
|
|
13
15
|
|
|
14
16
|
const base = (over: Partial<ClassifyInput>): ClassifyInput => ({
|
|
@@ -457,6 +459,99 @@ describe('input-router / isEditableTarget', () => {
|
|
|
457
459
|
});
|
|
458
460
|
});
|
|
459
461
|
|
|
462
|
+
// issue-71 — a bare (no-modifier) pointerdown/mousedown on an artboard's own
|
|
463
|
+
// drag chrome (the label strip + border, OUTSIDE `.dc-artboard-body`) must
|
|
464
|
+
// still be identified so useInputRouter can skip stopImmediatePropagation and
|
|
465
|
+
// let use-artboard-drag.tsx's own bubble-phase onPointerDown arm its
|
|
466
|
+
// pending→dragging state machine — otherwise no artboard could ever be
|
|
467
|
+
// repositioned by dragging its header (the router's capture-phase claim
|
|
468
|
+
// killed the event before it reached that listener).
|
|
469
|
+
describe('input-router / isArtboardDragChrome', () => {
|
|
470
|
+
// `closest(sel)` here mimics Element.closest: return a truthy stub for any
|
|
471
|
+
// selector this fake node "matches" (is, or is a descendant of), null else.
|
|
472
|
+
const fakeTarget = (memberOf: string[]): EventTarget =>
|
|
473
|
+
({
|
|
474
|
+
closest: (sel: string) => (memberOf.includes(sel) ? {} : null),
|
|
475
|
+
}) as unknown as EventTarget;
|
|
476
|
+
|
|
477
|
+
test('null target → false', () => {
|
|
478
|
+
expect(isArtboardDragChrome(null)).toBe(false);
|
|
479
|
+
});
|
|
480
|
+
|
|
481
|
+
test('target with no closest() (non-Element) → false', () => {
|
|
482
|
+
expect(isArtboardDragChrome({} as EventTarget)).toBe(false);
|
|
483
|
+
});
|
|
484
|
+
|
|
485
|
+
test('outside any artboard → false', () => {
|
|
486
|
+
expect(isArtboardDragChrome(fakeTarget([]))).toBe(false);
|
|
487
|
+
});
|
|
488
|
+
|
|
489
|
+
test('the label strip / border chrome (inside an artboard, not its body) → true', () => {
|
|
490
|
+
expect(isArtboardDragChrome(fakeTarget(['[data-dc-screen]']))).toBe(true);
|
|
491
|
+
});
|
|
492
|
+
|
|
493
|
+
test('inside .dc-artboard-body (the canvas content, not chrome) → false', () => {
|
|
494
|
+
expect(isArtboardDragChrome(fakeTarget(['[data-dc-screen]', '.dc-artboard-body']))).toBe(false);
|
|
495
|
+
});
|
|
496
|
+
});
|
|
497
|
+
|
|
498
|
+
// issue-71 — the actual regression: before this fix, useInputRouter's
|
|
499
|
+
// pointerdown/mousedown handlers called `stopImmediatePropagation()` on EVERY
|
|
500
|
+
// claimed action, including a bare click on an artboard's own drag chrome —
|
|
501
|
+
// which killed the event before use-artboard-drag.tsx's bubble-phase
|
|
502
|
+
// onPointerDown (bound to that same artboard) ever saw it, so dragging an
|
|
503
|
+
// artboard by its header did nothing in either the Move or the (former)
|
|
504
|
+
// always-select tool state. `yieldsToArtboardDrag` is the exact decision the
|
|
505
|
+
// handlers now gate `stopImmediatePropagation` on.
|
|
506
|
+
describe('input-router / yieldsToArtboardDrag', () => {
|
|
507
|
+
const chrome = (): EventTarget =>
|
|
508
|
+
({
|
|
509
|
+
closest: (sel: string) => (sel === '[data-dc-screen]' ? {} : null),
|
|
510
|
+
}) as unknown as EventTarget;
|
|
511
|
+
const body = (): EventTarget => ({ closest: () => ({}) }) as unknown as EventTarget; // matches every selector, incl. .dc-artboard-body
|
|
512
|
+
|
|
513
|
+
test('bare click on artboard chrome (the reported bug) → true (let the drag hook see it)', () => {
|
|
514
|
+
const action = classify({ type: 'pointerdown', activeTool: 'move', button: 0 });
|
|
515
|
+
expect(yieldsToArtboardDrag(action, chrome(), { metaKey: false, ctrlKey: false })).toBe(true);
|
|
516
|
+
});
|
|
517
|
+
|
|
518
|
+
test('shift+click on artboard chrome (multi-select-and-drag) → true', () => {
|
|
519
|
+
const action = classify({
|
|
520
|
+
type: 'pointerdown',
|
|
521
|
+
activeTool: 'move',
|
|
522
|
+
button: 0,
|
|
523
|
+
shiftKey: true,
|
|
524
|
+
});
|
|
525
|
+
expect(yieldsToArtboardDrag(action, chrome(), { metaKey: false, ctrlKey: false })).toBe(true);
|
|
526
|
+
});
|
|
527
|
+
|
|
528
|
+
test('cmd+click on artboard chrome (deep-select, not a drag) → false', () => {
|
|
529
|
+
const action = classify({
|
|
530
|
+
type: 'pointerdown',
|
|
531
|
+
activeTool: 'move',
|
|
532
|
+
button: 0,
|
|
533
|
+
metaKey: true,
|
|
534
|
+
});
|
|
535
|
+
expect(yieldsToArtboardDrag(action, chrome(), { metaKey: true, ctrlKey: false })).toBe(false);
|
|
536
|
+
});
|
|
537
|
+
|
|
538
|
+
test('bare click on .dc-artboard-body content (not chrome) → false', () => {
|
|
539
|
+
const action = classify({ type: 'pointerdown', activeTool: 'move', button: 0 });
|
|
540
|
+
expect(yieldsToArtboardDrag(action, body(), { metaKey: false, ctrlKey: false })).toBe(false);
|
|
541
|
+
});
|
|
542
|
+
|
|
543
|
+
test('bare click outside any artboard → false (nothing to yield to)', () => {
|
|
544
|
+
const action = classify({ type: 'pointerdown', activeTool: 'move', button: 0 });
|
|
545
|
+
const outside = { closest: () => null } as unknown as EventTarget;
|
|
546
|
+
expect(yieldsToArtboardDrag(action, outside, { metaKey: false, ctrlKey: false })).toBe(false);
|
|
547
|
+
});
|
|
548
|
+
|
|
549
|
+
test('right-click (context-menu) on chrome → false — not a select at all', () => {
|
|
550
|
+
const action = classify({ type: 'pointerdown', activeTool: 'move', button: 2 });
|
|
551
|
+
expect(yieldsToArtboardDrag(action, chrome(), { metaKey: false, ctrlKey: false })).toBe(false);
|
|
552
|
+
});
|
|
553
|
+
});
|
|
554
|
+
|
|
460
555
|
// T25 — Drag-vs-click threshold. Centralized here so every drag-class gesture
|
|
461
556
|
// (artboard drag, artboard marquee, element marquee, annotation pen/rect/etc.)
|
|
462
557
|
// reads the same value. Microsoft Win32 SM_CXDRAG default + d3-drag convention.
|