@1agh/maude 2.0.6 → 2.0.8
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/access/closure.ts +156 -16
- package/apps/studio/access/filters.ts +27 -0
- package/apps/studio/actions/agents.ts +54 -0
- package/apps/studio/actions/ctx.ts +3 -0
- package/apps/studio/actions/defs/sync.ts +13 -0
- package/apps/studio/actions/defs/view.ts +59 -3
- package/apps/studio/actions/keymap.gen.ts +35 -0
- package/apps/studio/actions/menu.ts +2 -0
- package/apps/studio/actions/types.ts +3 -1
- package/apps/studio/actions.manifest.json +136 -1
- package/apps/studio/actions.parity.json +25 -1
- package/apps/studio/annotations/ui/ai-seen.tsx +4 -3
- package/apps/studio/annotations/ui/ride.ts +2 -1
- package/apps/studio/annotations-context-toolbar.tsx +5 -4
- package/apps/studio/annotations-layer.tsx +4 -3
- package/apps/studio/api.ts +383 -128
- package/apps/studio/artboard-activity-overlay.tsx +4 -4
- package/apps/studio/artboard-ai-copies.tsx +4 -4
- package/apps/studio/artboard-freeze.ts +108 -0
- package/apps/studio/artboard-live-gate.tsx +414 -45
- package/apps/studio/artboard-live.ts +526 -31
- package/apps/studio/artboard-placeholder.ts +197 -0
- package/apps/studio/artboard-still-raster.ts +485 -0
- package/apps/studio/artboard-still-warmup.ts +221 -0
- package/apps/studio/artboard-still.ts +1188 -0
- package/apps/studio/artboard-webgl.ts +2 -1
- package/apps/studio/asset-placeholder.tsx +237 -132
- package/apps/studio/asset-upload-bars.tsx +4 -4
- package/apps/studio/bin/_perf-probe-open.mjs +364 -0
- package/apps/studio/bin/_perf-shared.mjs +12 -7
- package/apps/studio/bin/_pw-launch.mjs +26 -1
- package/apps/studio/bin/perf.sh +19 -0
- package/apps/studio/bridge/dgn-protocol.ts +35 -0
- package/apps/studio/canvas-build-sandbox.ts +69 -13
- package/apps/studio/canvas-camera.ts +90 -0
- package/apps/studio/canvas-comment-mount.tsx +9 -9
- package/apps/studio/canvas-lib.tsx +160 -34
- package/apps/studio/canvas-pages-view.tsx +465 -0
- package/apps/studio/canvas-pages.ts +305 -0
- package/apps/studio/canvas-rows.ts +62 -0
- package/apps/studio/canvas-shell.tsx +62 -16
- package/apps/studio/canvas-theme-icons.tsx +41 -0
- package/apps/studio/canvas-theme-pill.tsx +15 -6
- package/apps/studio/canvas-theme.ts +12 -11
- package/apps/studio/client/app.jsx +7 -0
- package/apps/studio/client/canvas-url.js +23 -1
- package/apps/studio/client/hooks/canvas-origin-probe.js +34 -0
- package/apps/studio/client/hooks/use-action-keys.jsx +3 -1
- package/apps/studio/client/hooks/use-canvas-bridge.jsx +1 -1
- package/apps/studio/client/hooks/use-palette-and-panels.jsx +23 -6
- package/apps/studio/client/hooks/use-photo-and-timeline.jsx +16 -8
- package/apps/studio/client/hooks/use-project-data.jsx +11 -2
- package/apps/studio/client/hooks/use-shell-core.jsx +19 -9
- package/apps/studio/client/index-loader.ts +41 -21
- package/apps/studio/client/inspector/inspector-panel.jsx +35 -14
- package/apps/studio/client/shell/viewport.jsx +32 -16
- package/apps/studio/client/tree/tree.jsx +17 -0
- package/apps/studio/client/v2/canvases/canvases-panel.jsx +24 -0
- package/apps/studio/client/v2/canvases/use-canvas-index.js +24 -1
- package/apps/studio/client/v2/code/canvas-error-card.jsx +14 -2
- package/apps/studio/client/v2/code/canvas-imports-card.jsx +7 -3
- package/apps/studio/client/v2/code/canvas-imports-words.js +16 -0
- package/apps/studio/client/v2/code/canvas-waiting-card.jsx +59 -5
- package/apps/studio/client/v2/code/canvas-waiting.js +18 -1
- package/apps/studio/client/v2/code/code-consent-sheet.jsx +87 -0
- package/apps/studio/client/v2/code/code-consent.js +67 -0
- package/apps/studio/client/v2/diagnostics/sync-details/sync-details-model.js +62 -10
- package/apps/studio/client/v2/diagnostics/sync-details/sync-details.jsx +314 -5
- package/apps/studio/client/v2/layers/artboard-layers.jsx +24 -5
- package/apps/studio/client/v2/layers/layers-request.js +49 -0
- package/apps/studio/client/v2/left-panel/canvases-pinned.jsx +93 -3
- package/apps/studio/client/v2/left-panel/ds-boards.js +39 -0
- package/apps/studio/client/v2/left-panel/left-panel-model.js +13 -0
- package/apps/studio/client/v2/left-panel/left-panel.css +24 -0
- package/apps/studio/client/v2/shell/canvas-crash-guard.js +40 -5
- package/apps/studio/client/v2/shell/canvas-mode.js +17 -1
- package/apps/studio/client/v2/shell/floating-panels.css +37 -1
- package/apps/studio/client/v2/shell/mode-switch.jsx +14 -3
- package/apps/studio/client/v2/shell/opening-skeleton.js +118 -0
- package/apps/studio/client/v2/shell/opening-skeleton.jsx +103 -0
- package/apps/studio/client/v2/shell/pages-pick.js +49 -0
- package/apps/studio/client/v2/shell/project-menu-model.js +3 -0
- package/apps/studio/client/v2/shell/share-cluster-host.jsx +3 -1
- package/apps/studio/client/v2/shell/shell-parity.json +8 -0
- package/apps/studio/client/v2/shell/use-canvas-mode-lane.js +30 -0
- package/apps/studio/comments-overlay.tsx +12 -11
- package/apps/studio/config-reload-wire.ts +4 -1
- package/apps/studio/config.schema.json +6 -0
- package/apps/studio/context.ts +37 -1
- package/apps/studio/dist/client.bundle.js +720 -720
- package/apps/studio/dist/comment-mount.js +2 -2
- package/apps/studio/dist/styles.css +1 -1
- package/apps/studio/ds/board/board.css +6 -0
- package/apps/studio/ds/board/ds-bar.tsx +21 -3
- package/apps/studio/ds/board/specimen.tsx +6 -3
- package/apps/studio/ds/board/template.ts +39 -19
- package/apps/studio/ds/cli.ts +7 -1
- package/apps/studio/ds/component-list.ts +2 -1
- package/apps/studio/ds/default.ts +6 -1
- package/apps/studio/ds/ds-resolver.ts +58 -8
- package/apps/studio/ds/engine.ts +3 -1
- package/apps/studio/ds/folder-systems.ts +199 -0
- package/apps/studio/ds/pairing-css.ts +2 -1
- package/apps/studio/ds/rename.ts +10 -3
- package/apps/studio/ds/shell-fallbacks.ts +2 -1
- package/apps/studio/ds/upgrade-stage.ts +6 -2
- package/apps/studio/editing/ai-point-ring.tsx +4 -4
- package/apps/studio/editing/ai-scope-outline.tsx +4 -4
- package/apps/studio/editing/align-bar.tsx +4 -4
- package/apps/studio/editing/anchor-report.ts +3 -2
- package/apps/studio/editing/artboard-handles.tsx +4 -4
- package/apps/studio/editing/corner-dots.tsx +4 -4
- package/apps/studio/editing/crop-mode.tsx +4 -4
- package/apps/studio/editing/drop-chip.tsx +4 -4
- package/apps/studio/editing/empty-report.ts +3 -2
- package/apps/studio/editing/focus-model.tsx +4 -4
- package/apps/studio/editing/gap-bands.tsx +3 -3
- package/apps/studio/editing/hold-rings.tsx +4 -4
- package/apps/studio/editing/lock-badge.tsx +3 -3
- package/apps/studio/editing/long-page.ts +23 -1
- package/apps/studio/editing/nudge.tsx +2 -2
- package/apps/studio/editing/page-activity.ts +4 -3
- package/apps/studio/editing/paste-bar.tsx +4 -4
- package/apps/studio/editing/pen/overlay.tsx +4 -3
- package/apps/studio/editing/place-freely.tsx +3 -3
- package/apps/studio/editing/reorder-slot.tsx +3 -3
- package/apps/studio/editing/selection.tsx +4 -4
- package/apps/studio/editing/size-ghost.tsx +4 -4
- package/apps/studio/editing/tab-order.tsx +4 -4
- package/apps/studio/editing/text-in-place.tsx +4 -4
- package/apps/studio/editing/undo-preview.tsx +3 -3
- package/apps/studio/equal-spacing-handles.tsx +3 -3
- package/apps/studio/frame-clock.ts +89 -0
- package/apps/studio/http.ts +66 -32
- package/apps/studio/index/ds-usage.ts +4 -1
- package/apps/studio/index-cache.ts +272 -0
- package/apps/studio/inspect-overlay.tsx +4 -3
- package/apps/studio/inspect.ts +7 -2
- package/apps/studio/link-chip-overlay.tsx +4 -3
- package/apps/studio/measure-overlay.tsx +4 -3
- package/apps/studio/present/pointer-dot.tsx +3 -2
- package/apps/studio/present/present-media.ts +6 -2
- package/apps/studio/present/present-stage.tsx +3 -2
- package/apps/studio/preview/preview-camera.tsx +3 -2
- package/apps/studio/routes/sync.ts +176 -0
- package/apps/studio/safe-zones-overlay.tsx +3 -2
- package/apps/studio/skip-dirs.ts +103 -47
- package/apps/studio/studio-page-host.ts +70 -0
- package/apps/studio/sync/code-module-consent.ts +86 -0
- package/apps/studio/sync/file-ledger.ts +24 -0
- package/apps/studio/sync/file-plane.ts +458 -53
- package/apps/studio/sync/held-deletes.ts +230 -0
- package/apps/studio/sync/hubs-config.ts +59 -2
- package/apps/studio/sync/index.ts +99 -15
- package/apps/studio/sync/seed-progress.ts +92 -2
- package/apps/studio/sync/settings.ts +36 -1
- package/apps/studio/sync/status.ts +15 -1
- package/apps/studio/sync/writer-registry.ts +5 -0
- package/apps/studio/text-caret.ts +5 -3
- package/apps/studio/toolbars/toolbar-rect.ts +3 -2
- package/apps/studio/use-annotation-resize.tsx +4 -3
- package/apps/studio/use-artboard-drag.tsx +3 -2
- package/apps/studio/use-element-resize.tsx +7 -6
- package/apps/studio/use-grid-track-handles.tsx +5 -4
- package/apps/studio/use-selection-set.tsx +64 -4
- package/apps/studio/use-spacing-handles.tsx +7 -6
- package/apps/studio/video-comp.tsx +55 -42
- package/apps/studio/video-play-overlay.tsx +4 -3
- package/apps/studio/whats-new.json +27 -0
- package/cli/commands/design.mjs +5 -2
- package/cli/commands/hub.mjs +10 -1
- package/cli/lib/bash-guard.mjs +14 -0
- package/cli/lib/design-help.gen.mjs +1 -1
- package/cli/lib/design-link.mjs +42 -17
- package/cli/lib/hub-purge.mjs +183 -0
- package/package.json +8 -8
- package/plugins/design/templates/_shell.html +164 -1
|
@@ -26,8 +26,15 @@
|
|
|
26
26
|
// - there is no per-hub consent row in Settings › Connections to keep in step with.
|
|
27
27
|
//
|
|
28
28
|
// An explicit recorded `false` still wins: a person who said no on this Mac keeps their no.
|
|
29
|
+
//
|
|
30
|
+
// fix/207 — and that person can now change their answer IN THE APP (`createCodeConsentControl`
|
|
31
|
+
// below, behind `POST /_api/sync/code-consent/set`): before it, the only writer was the terminal's
|
|
32
|
+
// `maude design link`, which never asked again once a `false` was recorded, so "re-link and answer
|
|
33
|
+
// yes" could not be followed. The answer is still LOCAL and still the person's: the route is
|
|
34
|
+
// main-origin only, window-only and Can edit, and nothing a hub says reaches it.
|
|
29
35
|
|
|
30
36
|
import { CELL_ZONE, cellDoorUrl } from '../client/v2/cloud/browser-door.js';
|
|
37
|
+
import { getHubRecord, recordCodeModulesAllowed } from './hubs-config.ts';
|
|
31
38
|
import { normHub } from './link-consent.ts';
|
|
32
39
|
|
|
33
40
|
export type CodeModuleConsentHow = 'cell' | 'recorded' | 'cloud';
|
|
@@ -72,3 +79,82 @@ export function codeModuleConsent(o: CodeModuleConsentInput): CodeModuleConsentH
|
|
|
72
79
|
if (hub && normHub(env.MAUDE_APP_BOUND_HUB) === hub && isMaudeCloudCell(hub)) return 'cloud';
|
|
73
80
|
return null;
|
|
74
81
|
}
|
|
82
|
+
|
|
83
|
+
/** What the consent sheet and Sync details show about this Mac's answer for the linked hub. */
|
|
84
|
+
export interface CodeConsentView {
|
|
85
|
+
/** the hub's host, the only name of it the UI shows */
|
|
86
|
+
host: string;
|
|
87
|
+
/** may code modules land here right now */
|
|
88
|
+
allowed: boolean;
|
|
89
|
+
/** why (null = they may not) */
|
|
90
|
+
how: CodeModuleConsentHow | null;
|
|
91
|
+
/** the answer recorded on this Mac (null = none recorded) */
|
|
92
|
+
recorded: boolean | null;
|
|
93
|
+
/** may the person change it here: a signed-in record exists and this is not a cell */
|
|
94
|
+
changeable: boolean;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export type CodeConsentSetResult =
|
|
98
|
+
| { ok: true; changed: boolean; view: CodeConsentView }
|
|
99
|
+
| { ok: false; reason: 'cell' | 'not-signed-in' };
|
|
100
|
+
|
|
101
|
+
export interface CodeConsentControl {
|
|
102
|
+
/** The cached answer the file plane reads at every gate (cheap: no disk read). */
|
|
103
|
+
allowed(): boolean;
|
|
104
|
+
/** Re-read hubs.json; true when the answer changed (a CLI re-link, another window). */
|
|
105
|
+
refresh(): boolean;
|
|
106
|
+
view(): CodeConsentView;
|
|
107
|
+
/** Record the person's answer on this Mac and take it at once. */
|
|
108
|
+
set(allow: boolean): CodeConsentSetResult;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* The live receive consent of one sync runtime (fix/207). `codeModuleConsent` decides; this keeps
|
|
113
|
+
* its answer in memory, re-reads it when hubs.json changes, and writes the person's answer through
|
|
114
|
+
* `recordCodeModulesAllowed` into the PROFILE's hubs.json (`hubsConfigPath()` at call time).
|
|
115
|
+
*/
|
|
116
|
+
export function createCodeConsentControl(o: {
|
|
117
|
+
cellPairing: boolean;
|
|
118
|
+
hubUrl: string;
|
|
119
|
+
env?: Record<string, string | undefined>;
|
|
120
|
+
/** the profile's hubs.json; absent = `hubsConfigPath()` at each read (the process's profile) */
|
|
121
|
+
hubsPath?: string;
|
|
122
|
+
}): CodeConsentControl {
|
|
123
|
+
const record = () => (o.cellPairing ? null : getHubRecord(o.hubUrl, o.hubsPath));
|
|
124
|
+
const decide = () =>
|
|
125
|
+
codeModuleConsent({
|
|
126
|
+
cellPairing: o.cellPairing,
|
|
127
|
+
hubUrl: o.hubUrl,
|
|
128
|
+
storedRecord: record(),
|
|
129
|
+
env: o.env ?? process.env,
|
|
130
|
+
});
|
|
131
|
+
let how = decide();
|
|
132
|
+
let host = '';
|
|
133
|
+
try {
|
|
134
|
+
host = new URL(o.hubUrl).host;
|
|
135
|
+
} catch {
|
|
136
|
+
host = '';
|
|
137
|
+
}
|
|
138
|
+
const view = (): CodeConsentView => {
|
|
139
|
+
const rec = record();
|
|
140
|
+
const recorded = typeof rec?.codeModulesAllowed === 'boolean' ? rec.codeModulesAllowed : null;
|
|
141
|
+
return { host, allowed: how !== null, how, recorded, changeable: !o.cellPairing && !!rec };
|
|
142
|
+
};
|
|
143
|
+
return {
|
|
144
|
+
allowed: () => how !== null,
|
|
145
|
+
refresh() {
|
|
146
|
+
const before = how !== null;
|
|
147
|
+
how = decide();
|
|
148
|
+
return (how !== null) !== before;
|
|
149
|
+
},
|
|
150
|
+
view,
|
|
151
|
+
set(allow) {
|
|
152
|
+
if (o.cellPairing) return { ok: false, reason: 'cell' };
|
|
153
|
+
if (!recordCodeModulesAllowed(o.hubUrl, allow === true, o.hubsPath))
|
|
154
|
+
return { ok: false, reason: 'not-signed-in' };
|
|
155
|
+
const before = how !== null;
|
|
156
|
+
how = decide();
|
|
157
|
+
return { ok: true, changed: (how !== null) !== before, view: view() };
|
|
158
|
+
},
|
|
159
|
+
};
|
|
160
|
+
}
|
|
@@ -100,6 +100,20 @@ export type DeliveryState =
|
|
|
100
100
|
| 'referenced-but-unoffered'
|
|
101
101
|
/** On this disk, and the hub has not acknowledged it. */
|
|
102
102
|
| 'local-only'
|
|
103
|
+
/** Issue #207 — in a folder the project does not sync (`linkedHub.ignoreFolders`). Not waiting. */
|
|
104
|
+
| 'ignored'
|
|
105
|
+
/**
|
|
106
|
+
* Issue #207 (7b) — DELETED ON THIS MAC, HELD: gone from here as part of a batch larger than sync
|
|
107
|
+
* removes from the project unasked (the outbound delete breaker). Waits for the person's answer in
|
|
108
|
+
* Sync details — Delete on the hub too, or Keep on the hub. Never sent, never downloaded meanwhile.
|
|
109
|
+
*/
|
|
110
|
+
| 'delete-held'
|
|
111
|
+
/**
|
|
112
|
+
* Issue #207 (7b) — ON THE HUB ONLY: deleted on this Mac, and the person chose to keep it on the
|
|
113
|
+
* hub. No delete is proposed and the same bytes are never downloaded again; bound to the hash this
|
|
114
|
+
* Mac last saw (`syncedHash ?? lastSeenHash`), so a teammate's new version is a new decision.
|
|
115
|
+
*/
|
|
116
|
+
| 'hub-only'
|
|
103
117
|
/** Upload in flight. */
|
|
104
118
|
| 'pushing'
|
|
105
119
|
/** The hub answered 2xx and gave it a seq. */
|
|
@@ -143,6 +157,14 @@ export interface LedgerRow {
|
|
|
143
157
|
* the ancestor-LEADS failure the whole ordering rule exists to prevent.
|
|
144
158
|
*/
|
|
145
159
|
localHash?: string;
|
|
160
|
+
/**
|
|
161
|
+
* Issue #207 — the last bytes this Mac SAW at this path (set with `localHash`, but never cleared
|
|
162
|
+
* by `noteChanged`). An observation, not an ancestor: it lets a file that is gone from here, and
|
|
163
|
+
* whose bytes the hub holds unchanged, read as deleted HERE rather than offered by the hub — an
|
|
164
|
+
* upload that landed while its answer was lost left no ancestor, and the next pass downloaded
|
|
165
|
+
* the moved-out renders again.
|
|
166
|
+
*/
|
|
167
|
+
lastSeenHash?: string;
|
|
146
168
|
/** Stat cache: the size `localHash` was computed for. */
|
|
147
169
|
size?: number;
|
|
148
170
|
/** Stat cache: the mtime `localHash` was computed for. */
|
|
@@ -420,6 +442,7 @@ export function createFileLedger(opts: FileLedgerOptions): FileLedger {
|
|
|
420
442
|
out[rel] = {
|
|
421
443
|
syncedHash: typeof r.syncedHash === 'string' ? r.syncedHash : null,
|
|
422
444
|
...(typeof r.localHash === 'string' ? { localHash: r.localHash } : {}),
|
|
445
|
+
...(typeof r.lastSeenHash === 'string' ? { lastSeenHash: r.lastSeenHash } : {}),
|
|
423
446
|
...(Number.isInteger(r.remoteSeq) ? { remoteSeq: r.remoteSeq } : {}),
|
|
424
447
|
...(typeof r.remoteHash === 'string' || r.remoteHash === null
|
|
425
448
|
? { remoteHash: r.remoteHash }
|
|
@@ -618,6 +641,7 @@ export function createFileLedger(opts: FileLedgerOptions): FileLedger {
|
|
|
618
641
|
// match is not read at all.
|
|
619
642
|
const r = rowFor(rel);
|
|
620
643
|
r.localHash = hash;
|
|
644
|
+
r.lastSeenHash = hash;
|
|
621
645
|
r.size = size;
|
|
622
646
|
r.mtimeMs = mtimeMs;
|
|
623
647
|
// A file whose bytes differ from the ancestor has unsent work on it, and
|