@1agh/maude 1.2.0 → 1.3.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/README.md +3 -1
- package/apps/studio/acp/index.ts +43 -7
- package/apps/studio/annotations-layer.tsx +191 -116
- package/apps/studio/annotations-model.ts +39 -0
- package/apps/studio/annotations-sync.ts +50 -0
- package/apps/studio/api.ts +689 -36
- package/apps/studio/bin/annotate.mjs +3 -1
- package/apps/studio/bin/server-up.sh +17 -2
- package/apps/studio/canvas-edit.ts +391 -7
- package/apps/studio/canvas-lib.tsx +82 -18
- package/apps/studio/canvas-notice-message.ts +16 -0
- package/apps/studio/canvas-notifications.tsx +19 -0
- package/apps/studio/canvas-shell.tsx +57 -6
- package/apps/studio/client/app.jsx +686 -241
- package/apps/studio/client/apply-edit-request.ts +55 -0
- package/apps/studio/client/export-center.jsx +111 -61
- package/apps/studio/client/github.js +38 -1
- package/apps/studio/client/index-loader.ts +76 -0
- package/apps/studio/client/panels/CloudBar.jsx +52 -6
- package/apps/studio/client/panels/GitPanel.jsx +103 -0
- package/apps/studio/client/panels/OnboardingWizard.jsx +36 -7
- package/apps/studio/client/panels/RepoBranchSwitcher.jsx +92 -27
- package/apps/studio/client/panels/SourceConflictPanel.jsx +166 -0
- package/apps/studio/client/panels/SyncPanel.jsx +113 -0
- package/apps/studio/client/panels/TeamProjects.jsx +376 -0
- package/apps/studio/client/panels/file-deep-link-dialog.jsx +54 -0
- package/apps/studio/client/photo-knobs.jsx +3 -0
- package/apps/studio/client/share-dialog.jsx +91 -0
- package/apps/studio/client/share-link.js +94 -0
- package/apps/studio/client/styles/3-shell-maude.css +35 -18
- package/apps/studio/client/styles/4-components.css +18 -1
- package/apps/studio/client/tree-row-menu.jsx +48 -3
- package/apps/studio/client/whats-new.jsx +26 -32
- package/apps/studio/cloud/endpoints.ts +132 -0
- package/apps/studio/collab/index.ts +4 -0
- package/apps/studio/collab/persistence.ts +5 -1
- package/apps/studio/collab/registry.ts +9 -3
- package/apps/studio/collab/room.ts +13 -2
- package/apps/studio/context.ts +59 -0
- package/apps/studio/dist/client.bundle.js +1586 -1554
- package/apps/studio/dist/runtime/.min-sizes.json +1 -0
- package/apps/studio/dist/runtime/sonner.js +1 -0
- package/apps/studio/dist/styles.css +1 -1
- package/apps/studio/http.ts +289 -18
- package/apps/studio/inspect.ts +19 -0
- package/apps/studio/managed-projects.ts +150 -0
- package/apps/studio/notifications.tsx +292 -0
- package/apps/studio/runtime-bundle.ts +2 -0
- package/apps/studio/server.ts +59 -3
- package/apps/studio/sync/accepted-cold-start.ts +225 -0
- package/apps/studio/sync/accepted-link.ts +320 -0
- package/apps/studio/sync/action-stage.ts +343 -0
- package/apps/studio/sync/agent.ts +12 -60
- package/apps/studio/sync/cell-file-events.ts +3 -0
- package/apps/studio/sync/codec.ts +73 -6
- package/apps/studio/sync/ctl-provider.ts +15 -2
- package/apps/studio/sync/document-discovery.ts +81 -0
- package/apps/studio/sync/file-membership.ts +10 -2
- package/apps/studio/sync/file-plane.ts +309 -26
- package/apps/studio/sync/index.ts +1078 -19
- package/apps/studio/sync/migrate-seed.ts +110 -19
- package/apps/studio/sync/poke.ts +4 -2
- package/apps/studio/sync/presentation.ts +285 -2
- package/apps/studio/sync/projection.ts +820 -23
- package/apps/studio/sync/repeated-module.ts +73 -0
- package/apps/studio/sync/revision-barrier.ts +129 -0
- package/apps/studio/sync/seed-repair.ts +46 -0
- package/apps/studio/sync/source-merge.ts +100 -0
- package/apps/studio/sync/source-ops.ts +289 -0
- package/apps/studio/sync/source-recovery.ts +70 -0
- package/apps/studio/sync/source-validation.ts +56 -0
- package/apps/studio/sync/status.ts +79 -1
- package/apps/studio/sync/transaction-client.ts +460 -0
- package/apps/studio/sync/writer-registry.ts +236 -0
- package/apps/studio/text-caret.ts +35 -0
- package/apps/studio/undo-hud.tsx +9 -87
- package/apps/studio/use-canvas-media-drop.tsx +4 -39
- package/apps/studio/whats-new.json +101 -0
- package/cli/lib/harness/codex-runtime.mjs +4 -1
- package/package.json +9 -8
- package/plugins/design/dependencies.json +3 -3
- package/plugins/design/templates/_shell.html +47 -0
- package/plugins/flow/dependencies.json +3 -3
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
// The executable half of the persistent-writer registry — DDR-241, plan T6.
|
|
2
|
+
//
|
|
3
|
+
// `docs/architecture/project-writer-registry.md` explains every writer; this
|
|
4
|
+
// module is the part a test can hold the code to. Every `/_api/*` route the
|
|
5
|
+
// studio serves is classified here by HOW its persistent effect reaches the
|
|
6
|
+
// project in accepted-revisions mode. A route that is not listed fails
|
|
7
|
+
// `test/sync-writer-registry.test.ts` — a new mutating route cannot ship
|
|
8
|
+
// without someone deciding which lane carries it.
|
|
9
|
+
//
|
|
10
|
+
// Classes:
|
|
11
|
+
// read — no persistent project effect.
|
|
12
|
+
// lane — rewrites canvas source/meta/annotations/comments; reaches the
|
|
13
|
+
// project as a `lane.replace` proposal (watcher import with the
|
|
14
|
+
// base announced by `activity:suppress`, or an API hook that
|
|
15
|
+
// hands the runtime its base).
|
|
16
|
+
// structural — canvas/folder create, move, delete: one manifest action.
|
|
17
|
+
// file-plane — assets, media sidecars, support files: the file plane's own
|
|
18
|
+
// CAS journal (DDR-226), not the canvas kernel (DDR-241 §8).
|
|
19
|
+
// git — operates on the checkout's Git graph; never a project action.
|
|
20
|
+
// local — this machine only: credentials, caches, jobs, activity, UI.
|
|
21
|
+
|
|
22
|
+
export type WriterClass = 'read' | 'lane' | 'structural' | 'file-plane' | 'git' | 'local';
|
|
23
|
+
|
|
24
|
+
export interface WriterEntry {
|
|
25
|
+
class: WriterClass;
|
|
26
|
+
/** Registry row(s) in project-writer-registry.md. */
|
|
27
|
+
rows?: string;
|
|
28
|
+
/** How the effect travels in accepted mode (lane / structural only). */
|
|
29
|
+
via?: string;
|
|
30
|
+
/** The test that proves it (lane / structural only). */
|
|
31
|
+
test?: string;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const LANE_SOURCE = {
|
|
35
|
+
class: 'lane',
|
|
36
|
+
via: 'source write announced by activity:suppress → watcher import → html lane.replace with the announced base',
|
|
37
|
+
test: 'test/sync-accepted-projection.test.ts',
|
|
38
|
+
} as const;
|
|
39
|
+
|
|
40
|
+
export const WRITER_REGISTRY: Record<string, WriterEntry> = {
|
|
41
|
+
// --- canvas source edits (S01–S18, V01–V10)
|
|
42
|
+
'/_api/edit-text': { ...LANE_SOURCE, rows: 'S01' },
|
|
43
|
+
'/_api/edit-css': { ...LANE_SOURCE, rows: 'S02' },
|
|
44
|
+
'/_api/edit-attr': { ...LANE_SOURCE, rows: 'S03' },
|
|
45
|
+
'/_api/reorder': { ...LANE_SOURCE, rows: 'S04' },
|
|
46
|
+
'/_api/delete-element': { ...LANE_SOURCE, rows: 'S05' },
|
|
47
|
+
'/_api/insert-element': { ...LANE_SOURCE, rows: 'S06' },
|
|
48
|
+
'/_api/duplicate-element': { ...LANE_SOURCE, rows: 'S07' },
|
|
49
|
+
'/_api/convert-to-absolute': { ...LANE_SOURCE, rows: 'S08' },
|
|
50
|
+
'/_api/detach-component': { ...LANE_SOURCE, rows: 'S09' },
|
|
51
|
+
'/_api/insert-artboard': { ...LANE_SOURCE, rows: 'S10' },
|
|
52
|
+
'/_api/duplicate-artboard': { ...LANE_SOURCE, rows: 'S11' },
|
|
53
|
+
'/_api/delete-artboard': { ...LANE_SOURCE, rows: 'S12' },
|
|
54
|
+
'/_api/resize-artboard': { ...LANE_SOURCE, rows: 'S13' },
|
|
55
|
+
'/_api/set-artboard-hug': { ...LANE_SOURCE, rows: 'S14' },
|
|
56
|
+
'/_api/set-artboard-style': { ...LANE_SOURCE, rows: 'S15' },
|
|
57
|
+
'/_api/set-artboard-kind': { ...LANE_SOURCE, rows: 'S16' },
|
|
58
|
+
'/_api/set-artboard-label': { ...LANE_SOURCE, rows: 'S16' },
|
|
59
|
+
'/_api/set-artboard-guides': { ...LANE_SOURCE, rows: 'S17' },
|
|
60
|
+
'/_api/set-artboard-print': { ...LANE_SOURCE, rows: 'S17' },
|
|
61
|
+
'/_api/reorder-revert': { ...LANE_SOURCE, rows: 'S18' },
|
|
62
|
+
'/_api/retime-sequence': { ...LANE_SOURCE, rows: 'V01' },
|
|
63
|
+
'/_api/remove-sequence': { ...LANE_SOURCE, rows: 'V02' },
|
|
64
|
+
'/_api/insert-sequence': { ...LANE_SOURCE, rows: 'V03' },
|
|
65
|
+
'/_api/reorder-sequence': { ...LANE_SOURCE, rows: 'V04' },
|
|
66
|
+
'/_api/toggle-hide': { ...LANE_SOURCE, rows: 'V05' },
|
|
67
|
+
'/_api/edit-array-src': { ...LANE_SOURCE, rows: 'V06' },
|
|
68
|
+
'/_api/clip-edit': { ...LANE_SOURCE, rows: 'V07–V10' },
|
|
69
|
+
// --- shared meta, annotations, comments (S19, S23, S24)
|
|
70
|
+
'/_api/canvas-meta': {
|
|
71
|
+
class: 'lane',
|
|
72
|
+
rows: 'S19',
|
|
73
|
+
via: 'onMetaChanged hook → meta lane.replace with the replaced file as base; camera/overlays/locked stay local',
|
|
74
|
+
test: 'test/sync-accepted-runtime.test.ts',
|
|
75
|
+
},
|
|
76
|
+
'/_api/annotations': {
|
|
77
|
+
class: 'lane',
|
|
78
|
+
rows: 'S23',
|
|
79
|
+
via: 'onAnnotationsChanged hook → annotations lane.replace with the base the layer sent',
|
|
80
|
+
test: 'test/sync-accepted-projection.test.ts',
|
|
81
|
+
},
|
|
82
|
+
// --- accepted history (T27/T28)
|
|
83
|
+
'/_api/project/history': { class: 'read' },
|
|
84
|
+
'/_api/project/restore': {
|
|
85
|
+
class: 'lane',
|
|
86
|
+
rows: 'X15',
|
|
87
|
+
via: 'history.restore — a NEW action restoring the canvas lanes (not comments) to a revision',
|
|
88
|
+
test: 'test/sync-accepted-runtime.test.ts',
|
|
89
|
+
},
|
|
90
|
+
'/_api/project/conflict': {
|
|
91
|
+
class: 'lane',
|
|
92
|
+
rows: 'X15',
|
|
93
|
+
via: 'mine: html lane.replace on top of the accepted version (a new action); theirs: accepted body back to disk',
|
|
94
|
+
test: 'test/sync-accepted-runtime.test.ts',
|
|
95
|
+
},
|
|
96
|
+
'/_api/project/ai-action': {
|
|
97
|
+
class: 'lane',
|
|
98
|
+
rows: 'I02',
|
|
99
|
+
via: 'publish: the held AI stage as ONE history action (lane.replace ops); discard: accepted value back to disk',
|
|
100
|
+
test: 'test/sync-accepted-runtime.test.ts',
|
|
101
|
+
},
|
|
102
|
+
'/_api/project/undo': {
|
|
103
|
+
class: 'lane',
|
|
104
|
+
rows: 'S18',
|
|
105
|
+
via: 'history.undo/redo — effect-aware compensation of one of this actor’s actions',
|
|
106
|
+
test: 'test/sync-accepted-runtime.test.ts',
|
|
107
|
+
},
|
|
108
|
+
// --- manifest (S20–S22)
|
|
109
|
+
'/_api/canvas': {
|
|
110
|
+
class: 'structural',
|
|
111
|
+
rows: 'S20',
|
|
112
|
+
via: 'create: cold start doc.create; delete: canvas-deleted → doc.delete; folders: dir.delete',
|
|
113
|
+
test: 'test/sync-accepted-runtime.test.ts',
|
|
114
|
+
},
|
|
115
|
+
'/_api/fs-move': {
|
|
116
|
+
class: 'structural',
|
|
117
|
+
rows: 'S21',
|
|
118
|
+
via: 'retireForMove → doc.move; folders: proposeFolder dir.move',
|
|
119
|
+
test: 'test/sync-accepted-runtime.test.ts',
|
|
120
|
+
},
|
|
121
|
+
'/_api/fs-mkdir': {
|
|
122
|
+
class: 'structural',
|
|
123
|
+
rows: 'S22',
|
|
124
|
+
via: 'proposeFolder dir.create before mkdir',
|
|
125
|
+
test: 'test/sync-accepted-runtime.test.ts',
|
|
126
|
+
},
|
|
127
|
+
'/_api/design/init': {
|
|
128
|
+
class: 'structural',
|
|
129
|
+
rows: 'I12',
|
|
130
|
+
via: 'scaffolded canvases join by cold start doc.create',
|
|
131
|
+
test: 'test/sync-accepted-runtime.test.ts',
|
|
132
|
+
},
|
|
133
|
+
// --- file plane (S25–S30, I04–I11)
|
|
134
|
+
'/_api/photo-edit': { class: 'file-plane', rows: 'S25' },
|
|
135
|
+
'/_api/footage': { class: 'file-plane', rows: 'S26' },
|
|
136
|
+
'/_api/asset': { class: 'file-plane', rows: 'S27' },
|
|
137
|
+
'/_api/assets': { class: 'file-plane', rows: 'S27' },
|
|
138
|
+
'/_api/import-asset': { class: 'file-plane', rows: 'S28/I08' },
|
|
139
|
+
'/_api/import-brand': { class: 'file-plane', rows: 'S28/I07' },
|
|
140
|
+
'/_api/figma/import': { class: 'file-plane', rows: 'I04/I05 (canvases join by cold start)' },
|
|
141
|
+
'/_api/figma/explode': { class: 'file-plane', rows: 'I04/I05 (canvases join by cold start)' },
|
|
142
|
+
'/_api/generate-jobs': { class: 'file-plane', rows: 'S29' },
|
|
143
|
+
'/_api/generate/audio-reuse': { class: 'file-plane', rows: 'S30' },
|
|
144
|
+
'/_api/stickers': { class: 'file-plane', rows: 'S27' },
|
|
145
|
+
'/_api/generate/prefs': { class: 'local', rows: 'S31 (config.assign schema gap)' },
|
|
146
|
+
// --- git (H09/H10)
|
|
147
|
+
'/_api/git/branch': { class: 'git', rows: 'H10' },
|
|
148
|
+
'/_api/git/branches': { class: 'read' },
|
|
149
|
+
'/_api/git/checkout': { class: 'git', rows: 'H09' },
|
|
150
|
+
'/_api/git/commit': { class: 'git', rows: 'H10' },
|
|
151
|
+
'/_api/git/diff': { class: 'read' },
|
|
152
|
+
'/_api/git/discard': { class: 'git', rows: 'H09' },
|
|
153
|
+
'/_api/git/fetch': { class: 'git', rows: 'H10' },
|
|
154
|
+
'/_api/git/fold': { class: 'git', rows: 'H09' },
|
|
155
|
+
'/_api/git/log': { class: 'read' },
|
|
156
|
+
'/_api/git/pull': { class: 'git', rows: 'H09' },
|
|
157
|
+
'/_api/git/push': { class: 'git', rows: 'H10' },
|
|
158
|
+
'/_api/git/resolve': { class: 'git', rows: 'H09' },
|
|
159
|
+
'/_api/git/status': { class: 'read' },
|
|
160
|
+
'/_api/github/clone': { class: 'git', rows: 'H10' },
|
|
161
|
+
'/_api/github/create-project': { class: 'local', rows: 'I12' },
|
|
162
|
+
'/_api/github/create-repo': { class: 'local' },
|
|
163
|
+
'/_api/github/identity': { class: 'local' },
|
|
164
|
+
'/_api/github/invite': { class: 'local' },
|
|
165
|
+
'/_api/github/repos': { class: 'read' },
|
|
166
|
+
'/_api/project/create-local': { class: 'local', rows: 'I12' },
|
|
167
|
+
'/_api/projects/prepare': {
|
|
168
|
+
class: 'local',
|
|
169
|
+
rows: 'H13 (credential + project description for a managed copy)',
|
|
170
|
+
},
|
|
171
|
+
// --- reads
|
|
172
|
+
'/_api/canvas-source': { class: 'read' },
|
|
173
|
+
'/_api/comp-clips': { class: 'read' },
|
|
174
|
+
'/_api/component-map': { class: 'read' },
|
|
175
|
+
'/_api/edit-scope': { class: 'read' },
|
|
176
|
+
'/_api/git-committers': { class: 'read' },
|
|
177
|
+
'/_api/git-user': { class: 'read' },
|
|
178
|
+
'/_api/preflight': { class: 'read' },
|
|
179
|
+
'/_api/setup-readiness': { class: 'read' },
|
|
180
|
+
'/_api/whats-new': { class: 'read' },
|
|
181
|
+
'/_api/figma/probe': { class: 'read' },
|
|
182
|
+
'/_api/figma/status': { class: 'read' },
|
|
183
|
+
'/_api/generate/providers': { class: 'read' },
|
|
184
|
+
'/_api/generate/audio-search': { class: 'read' },
|
|
185
|
+
'/_api/export-history': { class: 'read' },
|
|
186
|
+
// --- this machine only
|
|
187
|
+
'/_api/acp/activity': { class: 'local' },
|
|
188
|
+
'/_api/acp/attachment': { class: 'local' },
|
|
189
|
+
'/_api/acp/chat': { class: 'local' },
|
|
190
|
+
'/_api/acp/chats': { class: 'local' },
|
|
191
|
+
'/_api/acp/focus': { class: 'local' },
|
|
192
|
+
'/_api/acp/running': { class: 'local' },
|
|
193
|
+
'/_api/acp/status': { class: 'local' },
|
|
194
|
+
'/_api/ai': { class: 'local', rows: 'I02' },
|
|
195
|
+
'/_api/ai/end': { class: 'local', rows: 'I02' },
|
|
196
|
+
'/_api/ai/heartbeat': { class: 'local', rows: 'I02' },
|
|
197
|
+
'/_api/ai/start': { class: 'local', rows: 'I02' },
|
|
198
|
+
'/_api/claude/install': { class: 'local' },
|
|
199
|
+
'/_api/claude/install-status': { class: 'local' },
|
|
200
|
+
'/_api/claude/signin': { class: 'local' },
|
|
201
|
+
'/_api/claude/signin-cancel': { class: 'local' },
|
|
202
|
+
'/_api/claude/signin-status': { class: 'local' },
|
|
203
|
+
'/_api/cloud/attach': { class: 'local' },
|
|
204
|
+
'/_api/cloud/attach/code': { class: 'local' },
|
|
205
|
+
'/_api/cloud/detach': { class: 'local' },
|
|
206
|
+
'/_api/cloud/history': { class: 'read' },
|
|
207
|
+
'/_api/cloud/projects': { class: 'read' },
|
|
208
|
+
'/_api/cloud/signin/poll': { class: 'local' },
|
|
209
|
+
'/_api/cloud/signin/start': { class: 'local' },
|
|
210
|
+
'/_api/cloud/signout': { class: 'local' },
|
|
211
|
+
'/_api/cloud/status': { class: 'read' },
|
|
212
|
+
'/_api/debug-bundle': { class: 'local' },
|
|
213
|
+
'/_api/export': { class: 'local' },
|
|
214
|
+
'/_api/export-assemble': { class: 'local' },
|
|
215
|
+
'/_api/export-jobs': { class: 'local' },
|
|
216
|
+
'/_api/export-jobs/download': { class: 'local' },
|
|
217
|
+
'/_api/export-warmup': { class: 'local' },
|
|
218
|
+
'/_api/figma/connect': { class: 'local' },
|
|
219
|
+
'/_api/generate/keyframe-model': { class: 'local' },
|
|
220
|
+
'/_api/generate/keys': { class: 'local' },
|
|
221
|
+
'/_api/generate/whisper-model': { class: 'local' },
|
|
222
|
+
'/_api/hub/link': { class: 'local' },
|
|
223
|
+
'/_api/report': { class: 'local' },
|
|
224
|
+
'/_api/report-fallback': { class: 'local' },
|
|
225
|
+
'/_api/shell-shot': { class: 'local' },
|
|
226
|
+
'/_api/sync/cancel-assets': { class: 'local' },
|
|
227
|
+
'/_api/sync/ownership': { class: 'local' },
|
|
228
|
+
'/_api/sync/resync': { class: 'local', rows: 'X16' },
|
|
229
|
+
'/_api/sync/offline': { class: 'local', rows: 'T19 (pull the whole file plane now)' },
|
|
230
|
+
'/_api/sync/settings': { class: 'local' },
|
|
231
|
+
'/_api/sync/trash': { class: 'local', rows: 'X15 (restore re-enters through cold start)' },
|
|
232
|
+
'/_api/timeline-media': { class: 'local' },
|
|
233
|
+
'/_api/ui-prefs': { class: 'local' },
|
|
234
|
+
'/_api/workspace/disclosure': { class: 'local' },
|
|
235
|
+
'/_api/workspace/sign-in': { class: 'local' },
|
|
236
|
+
};
|
|
@@ -76,6 +76,41 @@ export function placeCaretAt(
|
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
+
/**
|
|
80
|
+
* Collapse an ENTRY select-all to the end of the content, if that is what the
|
|
81
|
+
* selection still is. issue-106: keyboard entry into a text surface (select the
|
|
82
|
+
* stroke, press Enter) leaves `placeCaretAt`'s select-all fallback in place, so
|
|
83
|
+
* the first keystroke replaces the whole body — which is exactly what the
|
|
84
|
+
* retype/rename convention wants for a typed CHARACTER, but never for
|
|
85
|
+
* Shift+Enter, whose entire documented meaning is "add a new line". Without
|
|
86
|
+
* this, Shift+Enter deleted the note and left a blank line in its place.
|
|
87
|
+
*
|
|
88
|
+
* Deliberately narrow: only a selection whose boundaries are still BOTH ends of
|
|
89
|
+
* the editable is collapsed. A user's own drag-selection or a partial range is
|
|
90
|
+
* left alone, so ordinary "replace the selected words" editing keeps native
|
|
91
|
+
* semantics. Returns true when it collapsed something.
|
|
92
|
+
*/
|
|
93
|
+
export function collapseEntrySelectAll(editable: HTMLElement, win: Window): boolean {
|
|
94
|
+
try {
|
|
95
|
+
const sel = win.getSelection();
|
|
96
|
+
if (!sel || sel.rangeCount === 0 || sel.isCollapsed) return false;
|
|
97
|
+
const cur = sel.getRangeAt(0);
|
|
98
|
+
const all = editable.ownerDocument.createRange();
|
|
99
|
+
all.selectNodeContents(editable);
|
|
100
|
+
// Range.START_TO_START / END_TO_END via the instance so no global lookup is
|
|
101
|
+
// needed (the editable may live in another document/realm).
|
|
102
|
+
if (cur.compareBoundaryPoints(cur.START_TO_START, all) !== 0) return false;
|
|
103
|
+
if (cur.compareBoundaryPoints(cur.END_TO_END, all) !== 0) return false;
|
|
104
|
+
all.collapse(false); // to the end
|
|
105
|
+
sel.removeAllRanges();
|
|
106
|
+
sel.addRange(all);
|
|
107
|
+
return true;
|
|
108
|
+
} catch {
|
|
109
|
+
/* selection API unavailable */
|
|
110
|
+
return false;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
79
114
|
const STYLE_ID = 'maude-caret-css';
|
|
80
115
|
|
|
81
116
|
const CARET_CSS = `
|
package/apps/studio/undo-hud.tsx
CHANGED
|
@@ -1,94 +1,16 @@
|
|
|
1
|
-
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
* @purpose Subscribes to `useUndoStack().lastLabel` + `.lastTick` and
|
|
5
|
-
* surfaces a 1.2 s aria-live toast so the user (and a screen
|
|
6
|
-
* reader) knows which edit just got pushed / undone / redone.
|
|
7
|
-
*
|
|
8
|
-
* a11y. The toast renders into `aria-live="polite"` so a screen reader
|
|
9
|
-
* announces "Undo: move 3 artboards" without interrupting in-flight speech.
|
|
10
|
-
* Pointer events are disabled — the HUD is informational only and must
|
|
11
|
-
* never absorb clicks meant for the canvas behind it.
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
import { useEffect, useState } from 'react';
|
|
15
|
-
|
|
1
|
+
/** Announces canvas edit/undo/redo operations through the shared toast stack. */
|
|
2
|
+
import { useEffect, useRef } from 'react';
|
|
3
|
+
import { showCanvasToast } from './canvas-notifications.tsx';
|
|
16
4
|
import { useUndoStackOptional } from './use-undo-stack.tsx';
|
|
17
5
|
|
|
18
|
-
const HUD_CSS = `
|
|
19
|
-
.dc-undo-hud {
|
|
20
|
-
position: fixed;
|
|
21
|
-
top: 16px;
|
|
22
|
-
right: 16px;
|
|
23
|
-
z-index: 7;
|
|
24
|
-
pointer-events: none;
|
|
25
|
-
padding: 6px 10px;
|
|
26
|
-
background: var(--maude-chrome-bg-2, rgba(20, 20, 20, 0.85));
|
|
27
|
-
color: var(--maude-chrome-fg-1, rgba(255, 255, 255, 0.85));
|
|
28
|
-
border: 1px solid var(--maude-chrome-border, rgba(255, 255, 255, 0.08));
|
|
29
|
-
border-radius: 6px;
|
|
30
|
-
font: 11px var(--maude-chrome-font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
|
|
31
|
-
letter-spacing: 0.02em;
|
|
32
|
-
user-select: none;
|
|
33
|
-
opacity: 0;
|
|
34
|
-
transform: translateY(-4px);
|
|
35
|
-
transition: opacity 200ms linear, transform 200ms ease-out;
|
|
36
|
-
}
|
|
37
|
-
.dc-undo-hud[data-visible="true"] {
|
|
38
|
-
opacity: 1;
|
|
39
|
-
transform: translateY(0);
|
|
40
|
-
transition-duration: 120ms;
|
|
41
|
-
}
|
|
42
|
-
@media (prefers-reduced-motion: reduce) {
|
|
43
|
-
.dc-undo-hud {
|
|
44
|
-
transition-duration: 1ms !important;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
`.trim();
|
|
48
|
-
|
|
49
|
-
function ensureStyles(): void {
|
|
50
|
-
if (typeof document === 'undefined') return;
|
|
51
|
-
if (document.getElementById('dc-undo-hud-css')) return;
|
|
52
|
-
const s = document.createElement('style');
|
|
53
|
-
s.id = 'dc-undo-hud-css';
|
|
54
|
-
s.textContent = HUD_CSS;
|
|
55
|
-
document.head.appendChild(s);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
/** Auto-dismiss timeout — matches the post-Wave-3 toast cadence. */
|
|
59
|
-
const DISMISS_MS = 1200;
|
|
60
|
-
|
|
61
6
|
export function UndoHud() {
|
|
62
|
-
ensureStyles();
|
|
63
7
|
const undo = useUndoStackOptional();
|
|
64
|
-
const
|
|
65
|
-
|
|
66
|
-
// Bump visibility every time `lastTick` increments — same tick value means
|
|
67
|
-
// the underlying state did NOT change (provider's no-op fallback returns
|
|
68
|
-
// `lastTick: 0` constantly, so the HUD stays hidden when no provider).
|
|
69
|
-
const tick = undo.lastTick;
|
|
70
|
-
const label = undo.lastLabel;
|
|
71
|
-
|
|
8
|
+
const lastTick = useRef(0);
|
|
72
9
|
useEffect(() => {
|
|
73
|
-
if (
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
const id = window.setTimeout(() => setVisible(false), DISMISS_MS);
|
|
79
|
-
return () => window.clearTimeout(id);
|
|
80
|
-
}, [tick, label]);
|
|
81
|
-
|
|
82
|
-
return (
|
|
83
|
-
<div
|
|
84
|
-
className="dc-undo-hud"
|
|
85
|
-
data-visible={visible ? 'true' : 'false'}
|
|
86
|
-
role="status"
|
|
87
|
-
aria-live="polite"
|
|
88
|
-
aria-atomic="true"
|
|
89
|
-
>
|
|
90
|
-
{label ?? ''}
|
|
91
|
-
</div>
|
|
92
|
-
);
|
|
10
|
+
if (!undo.lastTick || !undo.lastLabel || lastTick.current === undo.lastTick) return;
|
|
11
|
+
lastTick.current = undo.lastTick;
|
|
12
|
+
showCanvasToast(undo.lastLabel, 'undo');
|
|
13
|
+
}, [undo.lastTick, undo.lastLabel]);
|
|
14
|
+
return null;
|
|
93
15
|
}
|
|
94
16
|
UndoHud.displayName = 'UndoHud';
|
|
@@ -22,6 +22,9 @@
|
|
|
22
22
|
*/
|
|
23
23
|
|
|
24
24
|
import { useEffect } from 'react';
|
|
25
|
+
import { showCanvasToast } from './canvas-notifications.tsx';
|
|
26
|
+
|
|
27
|
+
export { showCanvasToast } from './canvas-notifications.tsx';
|
|
25
28
|
|
|
26
29
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
27
30
|
// Pure helpers (exported for unit tests)
|
|
@@ -194,25 +197,6 @@ export async function uploadAsset(file: Blob): Promise<{ path: string } | { erro
|
|
|
194
197
|
// Transient toast (no React state — self-contained DOM, mirrors ensure*Styles)
|
|
195
198
|
|
|
196
199
|
const TOAST_CSS = `
|
|
197
|
-
.dc-media-toast {
|
|
198
|
-
position: fixed;
|
|
199
|
-
left: 50%;
|
|
200
|
-
bottom: 108px;
|
|
201
|
-
transform: translateX(-50%);
|
|
202
|
-
z-index: 9;
|
|
203
|
-
max-width: 360px;
|
|
204
|
-
padding: 8px 14px;
|
|
205
|
-
border-radius: 8px;
|
|
206
|
-
background: #26262b;
|
|
207
|
-
color: #fff;
|
|
208
|
-
font-family: var(--maude-chrome-font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
|
|
209
|
-
font-size: 12px;
|
|
210
|
-
box-shadow: 0 8px 28px rgba(0,0,0,0.34);
|
|
211
|
-
opacity: 0;
|
|
212
|
-
transition: opacity 140ms ease;
|
|
213
|
-
pointer-events: none;
|
|
214
|
-
}
|
|
215
|
-
.dc-media-toast[data-show="1"] { opacity: 1; }
|
|
216
200
|
/* Drop affordance — a focus-accent inset frame while a media drag is over the
|
|
217
201
|
canvas, so the surface reads as a drop target. */
|
|
218
202
|
.dc-media-dragover::after {
|
|
@@ -224,9 +208,6 @@ const TOAST_CSS = `
|
|
|
224
208
|
border-radius: 12px;
|
|
225
209
|
pointer-events: none;
|
|
226
210
|
}
|
|
227
|
-
@media (prefers-reduced-motion: reduce) {
|
|
228
|
-
.dc-media-toast { transition: none; }
|
|
229
|
-
}
|
|
230
211
|
/* feature-4 (2026-07-19) — sandbox-safe confirm dialog (window.confirm is
|
|
231
212
|
silently blocked in the allow-modals-less canvas iframe). HUD-token styled. */
|
|
232
213
|
.dc-confirm-backdrop {
|
|
@@ -364,22 +345,6 @@ export function canvasConfirm(
|
|
|
364
345
|
});
|
|
365
346
|
}
|
|
366
347
|
|
|
367
|
-
/** Show a brief auto-dismissing toast in the canvas (e.g. an upload failure). */
|
|
368
|
-
export function showCanvasToast(message: string): void {
|
|
369
|
-
if (typeof document === 'undefined') return;
|
|
370
|
-
ensureMediaStyles();
|
|
371
|
-
const el = document.createElement('div');
|
|
372
|
-
el.className = 'dc-media-toast';
|
|
373
|
-
el.setAttribute('role', 'status');
|
|
374
|
-
el.textContent = message;
|
|
375
|
-
document.body.appendChild(el);
|
|
376
|
-
requestAnimationFrame(() => el.setAttribute('data-show', '1'));
|
|
377
|
-
setTimeout(() => {
|
|
378
|
-
el.setAttribute('data-show', '0');
|
|
379
|
-
setTimeout(() => el.remove(), 200);
|
|
380
|
-
}, 2600);
|
|
381
|
-
}
|
|
382
|
-
|
|
383
348
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
384
349
|
// Hook
|
|
385
350
|
|
|
@@ -414,7 +379,7 @@ export async function uploadAndAnnounceMedia(
|
|
|
414
379
|
const sizeMb = file.size / (1024 * 1024);
|
|
415
380
|
const res = await uploadAsset(file);
|
|
416
381
|
if ('error' in res) {
|
|
417
|
-
showCanvasToast(`Couldn't add ${mediaKind}: ${res.error}
|
|
382
|
+
showCanvasToast(`Couldn't add ${mediaKind}: ${res.error}`, 'error');
|
|
418
383
|
return;
|
|
419
384
|
}
|
|
420
385
|
const snippet = mediaSnippet(mediaKind, res.path);
|
|
@@ -1,6 +1,107 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "./whats-new.schema.json",
|
|
3
3
|
"entries": [
|
|
4
|
+
{
|
|
5
|
+
"id": "artboard-rename-and-files",
|
|
6
|
+
"version": "1.3.0",
|
|
7
|
+
"date": "2026-09-15",
|
|
8
|
+
"kind": "feature",
|
|
9
|
+
"title": "Rename artboards on the canvas; manage notes and images in the tree",
|
|
10
|
+
"summary": "Double-click an artboard’s name to rename it — everyone on the project sees the new name. Notes, styles, images and videos beside your canvases now have their own ⋯ menu: Rename…, Move to… and Delete. A file a canvas still uses is not moved or deleted from under it; Maude names the canvas that uses it instead.",
|
|
11
|
+
"surface": "design-ui"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"id": "cloud-connect-starts-syncing",
|
|
15
|
+
"version": "1.3.0",
|
|
16
|
+
"date": "2026-09-15",
|
|
17
|
+
"kind": "fix",
|
|
18
|
+
"title": "Connecting a project to Maude Cloud starts syncing right away again",
|
|
19
|
+
"summary": "Connect used to link the project and then ask you to restart Maude before anything synced. It syncs immediately now, a project that is not linked no longer greets you with a stale “Working offline” note, and a large video upload survives a dropped connection instead of failing.",
|
|
20
|
+
"surface": "design-ui"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"id": "file-tree-rename-duplicate",
|
|
24
|
+
"version": "1.3.0",
|
|
25
|
+
"date": "2026-09-15",
|
|
26
|
+
"kind": "feature",
|
|
27
|
+
"title": "Rename and duplicate canvases and folders from the file tree",
|
|
28
|
+
"summary": "The ⋯ menu on a canvas now offers Rename… and Duplicate, and folders can be renamed in place. Teammates see the new name immediately — a canvas they have open follows the rename. Menus near the bottom of a long tree now open upward instead of off-screen, and after ⌘D the copy is what stays selected.",
|
|
29
|
+
"surface": "design-ui"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"id": "open-team-project-no-folder",
|
|
33
|
+
"version": "1.3.0",
|
|
34
|
+
"date": "2026-09-15",
|
|
35
|
+
"kind": "feature",
|
|
36
|
+
"title": "Open your team’s project in one step",
|
|
37
|
+
"summary": "Invited to a project? Choose “Open a project you were invited to”, sign in to Maude Cloud or your team’s server with your email, pick the project and start designing — no folder to choose, no token, no Git. Maude keeps the project’s copy for you and lists it under “Open a team project…”.",
|
|
38
|
+
"surface": "design-ui"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"id": "reliable-project-saving",
|
|
42
|
+
"version": "1.3.0",
|
|
43
|
+
"date": "2026-09-15",
|
|
44
|
+
"kind": "feature",
|
|
45
|
+
"title": "Every change saved, shared and undoable",
|
|
46
|
+
"summary": "In projects that save through accepted revisions, the status says “Saving…” until your team’s project has your change, History lists each action with its author, Undo takes back only your own action, two people changing the same thing end with the later change instead of a conflict, an unfinished AI edit waits for your decision, and large videos upload and download resumably.",
|
|
47
|
+
"surface": "design-ui"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"id": "share-link-deeplink",
|
|
51
|
+
"version": "1.3.0",
|
|
52
|
+
"date": "2026-09-15",
|
|
53
|
+
"kind": "feature",
|
|
54
|
+
"title": "Share a link to any canvas",
|
|
55
|
+
"summary": "Copy a link that opens a canvas or file in the browser or Maude. After signing in, return to the shared file; links to another local project ask before switching.",
|
|
56
|
+
"learnMore": "https://maude.sh/docs/share-links",
|
|
57
|
+
"surface": "design-ui",
|
|
58
|
+
"tour": [
|
|
59
|
+
{
|
|
60
|
+
"target": "[data-testid=\"share-btn\"]",
|
|
61
|
+
"title": "Share this file",
|
|
62
|
+
"body": "Copy a web link, an app link, or a link for this Mac. You can also share another file from its row menu.",
|
|
63
|
+
"placement": "bottom",
|
|
64
|
+
"canvas": true
|
|
65
|
+
}
|
|
66
|
+
]
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"id": "native-codex-shared-workflows",
|
|
70
|
+
"version": "1.3.0",
|
|
71
|
+
"date": "2026-09-15",
|
|
72
|
+
"kind": "feature",
|
|
73
|
+
"title": "Use Maude workflows in Codex",
|
|
74
|
+
"summary": "Install Maude’s design and flow plugins natively in Codex and use the shared workflows alongside Claude Code. The new guide covers setup, dependencies and the browser requirements for working with Design Studio.",
|
|
75
|
+
"learnMore": "https://maude.sh/docs/codex",
|
|
76
|
+
"surface": "design-ui"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"id": "shared-toast-stack-export-errors",
|
|
80
|
+
"version": "1.3.0",
|
|
81
|
+
"date": "2026-09-15",
|
|
82
|
+
"kind": "improvement",
|
|
83
|
+
"title": "Notifications stack and clear themselves",
|
|
84
|
+
"summary": "Export updates, canvas messages and Undo now share a stack that expands when you hover or use the keyboard. Notifications dismiss automatically; long export errors stay short, with the complete message available on demand in export history.",
|
|
85
|
+
"surface": "design-ui"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"id": "source-sync-preserves-valid-canvases",
|
|
89
|
+
"version": "1.3.0",
|
|
90
|
+
"date": "2026-09-15",
|
|
91
|
+
"kind": "fix",
|
|
92
|
+
"title": "Safer canvas source syncing",
|
|
93
|
+
"summary": "Sync now holds incoming canvas code with syntax errors or duplicate declarations and warns you in the Sync panel. Concurrent edits preserve more unchanged code, and recovery copies help you recover local work when a conflicting update is held.",
|
|
94
|
+
"surface": "design-ui"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"id": "sticky-notes-take-a-second-line",
|
|
98
|
+
"version": "1.3.0",
|
|
99
|
+
"date": "2026-09-15",
|
|
100
|
+
"kind": "fix",
|
|
101
|
+
"title": "Sticky notes take a second line",
|
|
102
|
+
"summary": "Shift+Enter in a sticky note could look like it did nothing. A note never grew, and its text is clipped at the card's edge, so on a full note the new line was inserted and then hidden — notes now grow as you type and keep that height. Opening a note from the keyboard selects all of its text so you can retype it, and Shift+Enter used to replace the lot; it now adds a line instead, while typing still replaces. And on a project synced to a workspace, what you have typed into an open note is no longer overwritten mid-keystroke when a collaborator edits the same note.",
|
|
103
|
+
"surface": "design-ui"
|
|
104
|
+
},
|
|
4
105
|
{
|
|
5
106
|
"id": "pdf-export-print-safe-text",
|
|
6
107
|
"version": "1.2.0",
|
|
@@ -384,7 +384,7 @@ async function materializeRuntimeMarketplace({
|
|
|
384
384
|
return root;
|
|
385
385
|
}
|
|
386
386
|
|
|
387
|
-
async function materializePluginSource(item, target, ownedRoot) {
|
|
387
|
+
export async function materializePluginSource(item, target, ownedRoot) {
|
|
388
388
|
await removeOwnedPath(target, ownedRoot);
|
|
389
389
|
await assertTreeHasNoSymlinks(item.value.installPath);
|
|
390
390
|
await cp(item.value.installPath, target, { recursive: true });
|
|
@@ -395,6 +395,9 @@ async function materializePluginSource(item, target, ownedRoot) {
|
|
|
395
395
|
`plugin changed while materializing: ${item.name} (${item.sourceHash} != ${copiedHash})`
|
|
396
396
|
);
|
|
397
397
|
}
|
|
398
|
+
// A source-owned native package already supplies its entry points and paths.
|
|
399
|
+
// Flattening Claude commands over it would break relative reference links.
|
|
400
|
+
if (await pathExists(join(target, '.codex-plugin', 'plugin.json'))) return;
|
|
398
401
|
const commands = await snapshotCommandFiles(target);
|
|
399
402
|
const generatedRoot = join(target, 'skills');
|
|
400
403
|
await mkdir(generatedRoot, { recursive: true });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@1agh/maude",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Marketplace of Claude Code plugins by Michal Dovrtěl: `design` (canvas-first design iteration) + `flow` (generic agentic workflow loop with .ai second brain). Ships the `maude` CLI (with `mdcc` legacy alias) to scaffold workspace, run the design dev server, and manage configs.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -52,16 +52,17 @@
|
|
|
52
52
|
"test:e2e:desktop:acp-cold-start": "pnpm --filter @maude/desktop-e2e e2e:acp-cold-start",
|
|
53
53
|
"test:e2e:desktop:parity": "pnpm --filter @maude/desktop-e2e e2e:parity",
|
|
54
54
|
"test:e2e:desktop:sidecar-respawn": "pnpm --filter @maude/desktop-e2e e2e:sidecar-respawn",
|
|
55
|
+
"test:e2e:desktop:team-project": "pnpm --filter @maude/desktop-e2e e2e:team-project",
|
|
55
56
|
"test:e2e:desktop:parity:cloud": "pnpm --filter @maude/desktop-e2e e2e:parity:cloud"
|
|
56
57
|
},
|
|
57
58
|
"optionalDependencies": {
|
|
58
|
-
"@1agh/maude-darwin-arm64": "1.
|
|
59
|
-
"@1agh/maude-darwin-x64": "1.
|
|
60
|
-
"@1agh/maude-linux-arm64": "1.
|
|
61
|
-
"@1agh/maude-linux-arm64-musl": "1.
|
|
62
|
-
"@1agh/maude-linux-x64": "1.
|
|
63
|
-
"@1agh/maude-linux-x64-musl": "1.
|
|
64
|
-
"@1agh/maude-win32-x64": "1.
|
|
59
|
+
"@1agh/maude-darwin-arm64": "1.3.0",
|
|
60
|
+
"@1agh/maude-darwin-x64": "1.3.0",
|
|
61
|
+
"@1agh/maude-linux-arm64": "1.3.0",
|
|
62
|
+
"@1agh/maude-linux-arm64-musl": "1.3.0",
|
|
63
|
+
"@1agh/maude-linux-x64": "1.3.0",
|
|
64
|
+
"@1agh/maude-linux-x64-musl": "1.3.0",
|
|
65
|
+
"@1agh/maude-win32-x64": "1.3.0"
|
|
65
66
|
},
|
|
66
67
|
"files": [
|
|
67
68
|
"cli",
|
|
@@ -152,11 +152,11 @@
|
|
|
152
152
|
"hardness": "soft",
|
|
153
153
|
"check": {
|
|
154
154
|
"command": "kg version",
|
|
155
|
-
"expectExit": 0
|
|
155
|
+
"expectExit": 0,
|
|
156
|
+
"minVersion": "1.5.1"
|
|
156
157
|
},
|
|
157
158
|
"install": {
|
|
158
|
-
"preferred": "
|
|
159
|
-
"darwin": "curl -fsSL https://github.com/kgaidev/kgai/releases/download/v1.0.0/kg-darwin-arm64 -o /usr/local/bin/kg && chmod +x /usr/local/bin/kg"
|
|
159
|
+
"preferred": "Install kgai >= 1.5.1 using https://github.com/kgaidev/kgai installation instructions; reuse the existing trusted store. Classic file workflows need no kgai installation."
|
|
160
160
|
},
|
|
161
161
|
"autoInstall": false,
|
|
162
162
|
"fallbackBehavior": "Design DS/canvas/brand decisions are not recorded to the kgai graph; the classic .ai/ path (via /flow:record-ddr) and on-disk sidecars are unchanged.",
|