@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
|
@@ -22,6 +22,7 @@ import { canvasArtifacts } from '../canvas-artifacts.ts';
|
|
|
22
22
|
import { canvasSlugFromRel } from '../canvas-slug.ts';
|
|
23
23
|
import type { Paths } from '../context.ts';
|
|
24
24
|
import { dsDepsFor, importsDs, importsDsBoard, specimenRels } from '../ds/ds-resolver.ts';
|
|
25
|
+
import { folderSystemOf, pinnedFolderSystem } from '../ds/folder-systems.ts';
|
|
25
26
|
import {
|
|
26
27
|
CANVAS_LIB_SPEC,
|
|
27
28
|
CARRIES_ALL,
|
|
@@ -431,20 +432,49 @@ function readJsonObject(project: ProjectReader, rel: string): Record<string, unk
|
|
|
431
432
|
}
|
|
432
433
|
|
|
433
434
|
/** The system a canvas renders under — the same chain as `ds-resolver.ts` `canvasSystemFor`
|
|
434
|
-
* (owner by path →
|
|
435
|
-
*
|
|
436
|
-
|
|
435
|
+
* (owner by path → 2.0.7 owner by its own folder → meta `designSystem` (configured, else a folder
|
|
436
|
+
* system of exactly that name) → `defaultDesignSystem` → the first of the merged list), read
|
|
437
|
+
* through the ProjectReader instead of the disk. */
|
|
438
|
+
function canvasSystem(
|
|
439
|
+
project: ProjectReader,
|
|
440
|
+
canvas: string,
|
|
441
|
+
cfg: ClosureConfig,
|
|
442
|
+
files?: ReadonlySet<string>
|
|
443
|
+
): DsSystem | null {
|
|
437
444
|
const systems = cfg.designSystems;
|
|
438
|
-
if (!systems.length) return null;
|
|
439
445
|
const owner = systems.find((s) => canvas.startsWith(`${s.path}/`));
|
|
440
446
|
if (owner) return owner;
|
|
447
|
+
// 2.0.7 — a system folder the config does not list (a cell's config.json never syncs) still owns
|
|
448
|
+
// its own canvases: its board draws its own specimens, never the default system's.
|
|
449
|
+
const hasFile = (r: string) => (files ? files.has(r) : project.text(r) !== null);
|
|
450
|
+
const folder = folderSystemOf(canvas, systems, hasFile);
|
|
451
|
+
if (folder) return folder;
|
|
452
|
+
// …and a canvas that pins it by name renders with it; a name with no such folder stays at the default
|
|
453
|
+
const named = (name: unknown): DsSystem | null =>
|
|
454
|
+
typeof name === 'string' && name
|
|
455
|
+
? (systems.find((s) => s.name === name) ?? pinnedFolderSystem(name, systems, hasFile))
|
|
456
|
+
: null;
|
|
441
457
|
const declared = readJsonObject(
|
|
442
458
|
project,
|
|
443
459
|
canvas.replace(/\.(tsx|html)$/i, '.meta.json')
|
|
444
460
|
)?.designSystem;
|
|
445
|
-
const byMeta =
|
|
461
|
+
const byMeta = named(declared);
|
|
446
462
|
if (byMeta) return byMeta;
|
|
447
|
-
|
|
463
|
+
const byDefault = named(cfg.defaultDesignSystem);
|
|
464
|
+
if (byDefault) return byDefault;
|
|
465
|
+
if (systems.length) return systems[0] ?? null;
|
|
466
|
+
// no configured system: the first folder system by name, as the merged list orders them
|
|
467
|
+
const listed = files ?? new Set(project.list());
|
|
468
|
+
const segs = new Set<string>();
|
|
469
|
+
for (const r of listed) {
|
|
470
|
+
const m = /^system\/([^/]+)\/design-system\.tsx$/.exec(r);
|
|
471
|
+
if (m) segs.add(m[1] as string);
|
|
472
|
+
}
|
|
473
|
+
for (const seg of [...segs].sort()) {
|
|
474
|
+
const f = folderSystemOf(`system/${seg}/design-system.tsx`, systems, (r) => listed.has(r));
|
|
475
|
+
if (f) return f;
|
|
476
|
+
}
|
|
477
|
+
return null;
|
|
448
478
|
}
|
|
449
479
|
|
|
450
480
|
/** A design-system file a canvas-only session reads: not a specimen, not a UI kit. */
|
|
@@ -592,6 +622,9 @@ interface WalkEnv {
|
|
|
592
622
|
listTruncated: boolean;
|
|
593
623
|
/** p8-closure-lows — canvas-shaped entries the listing saw but did not yield (`unlisted`). */
|
|
594
624
|
unlisted: readonly string[];
|
|
625
|
+
/** 2.0.7 (#207) — `files`' openable canvas files (`.tsx`/`.html`, not `_`-prefixed) by NFC slug,
|
|
626
|
+
* and `unlisted` by NFC slug: what `grantedBySlug` scanned the whole listing for, per owner. */
|
|
627
|
+
slugIndex: () => { files: ReadonlyMap<string, string[]>; unlisted: ReadonlySet<string> };
|
|
595
628
|
}
|
|
596
629
|
|
|
597
630
|
function walkEnv(project: ProjectReader, files: ReadonlySet<string>, cfg: ClosureConfig): WalkEnv {
|
|
@@ -727,7 +760,21 @@ function walkEnv(project: ProjectReader, files: ReadonlySet<string>, cfg: Closur
|
|
|
727
760
|
typeof project.present === 'function';
|
|
728
761
|
const listTruncated = !reports || project.listTruncated?.() === true;
|
|
729
762
|
const unlisted = reports ? [...(project.unlisted?.() ?? [])] : [];
|
|
730
|
-
|
|
763
|
+
let slugs: { files: Map<string, string[]>; unlisted: Set<string> } | null = null;
|
|
764
|
+
const slugIndex = () => {
|
|
765
|
+
if (slugs) return slugs;
|
|
766
|
+
const bySlug = new Map<string, string[]>();
|
|
767
|
+
for (const f of files) {
|
|
768
|
+
if (!/\.(tsx|html)$/i.test(f) || f.startsWith('_')) continue;
|
|
769
|
+
const slug = slugNfc(f);
|
|
770
|
+
const list = bySlug.get(slug);
|
|
771
|
+
if (list) list.push(f);
|
|
772
|
+
else bySlug.set(slug, [f]);
|
|
773
|
+
}
|
|
774
|
+
slugs = { files: bySlug, unlisted: new Set(unlisted.map(slugNfc)) };
|
|
775
|
+
return slugs;
|
|
776
|
+
};
|
|
777
|
+
return { files, textOf, isCanvas, cfg, project, known, listTruncated, unlisted, slugIndex };
|
|
731
778
|
}
|
|
732
779
|
|
|
733
780
|
const SAME_NAME_RE =
|
|
@@ -764,6 +811,58 @@ function isUiKitRel(rel: string): boolean {
|
|
|
764
811
|
return segs[2] === 'ui_kits' || (segs[2] === 'preview' && /^ui_kits-/i.test(segs[3] ?? ''));
|
|
765
812
|
}
|
|
766
813
|
|
|
814
|
+
/**
|
|
815
|
+
* 2.0.7 (#207) — a file's import groups, remembered by its path AND its full text. Every canvas's
|
|
816
|
+
* walk reads the shared design-system and helper modules again, and every file event starts a new
|
|
817
|
+
* generation (a new walk env), so one `/_index-data` scanned the same few hundred files once per
|
|
818
|
+
* canvas that reaches them — and again after any write anywhere in the tree. The answer is a pure
|
|
819
|
+
* function of (text, path), and a hit needs the stored text to be EQUAL to the text read now (never
|
|
820
|
+
* a hash or an mtime: a planted file cannot borrow a benign twin's import list), so a cached answer
|
|
821
|
+
* is exactly the answer a fresh scan would give. Bounded by entries and by the text it holds.
|
|
822
|
+
*/
|
|
823
|
+
const GROUPS_MEMO_MAX_ENTRIES = 8192;
|
|
824
|
+
const GROUPS_MEMO_MAX_CHARS = 64 * 1024 * 1024;
|
|
825
|
+
const groupsMemo = new Map<string, { text: string; groups: string[][] }>();
|
|
826
|
+
let groupsMemoChars = 0;
|
|
827
|
+
function walkImportGroups(text: string, rel: string): readonly (readonly string[])[] {
|
|
828
|
+
const hit = groupsMemo.get(rel);
|
|
829
|
+
if (hit && hit.text === text) {
|
|
830
|
+
groupsMemo.delete(rel);
|
|
831
|
+
groupsMemo.set(rel, hit);
|
|
832
|
+
return hit.groups;
|
|
833
|
+
}
|
|
834
|
+
const groups = relativeImportGroups(text, `${VROOT}/${rel}`, VROOT);
|
|
835
|
+
if (hit) {
|
|
836
|
+
groupsMemo.delete(rel);
|
|
837
|
+
groupsMemoChars -= hit.text.length;
|
|
838
|
+
}
|
|
839
|
+
if (text.length <= GROUPS_MEMO_MAX_CHARS / 4) {
|
|
840
|
+
groupsMemo.set(rel, { text, groups });
|
|
841
|
+
groupsMemoChars += text.length;
|
|
842
|
+
while (
|
|
843
|
+
groupsMemo.size > GROUPS_MEMO_MAX_ENTRIES ||
|
|
844
|
+
(groupsMemoChars > GROUPS_MEMO_MAX_CHARS && groupsMemo.size > 1)
|
|
845
|
+
) {
|
|
846
|
+
const [oldest, entry] = groupsMemo.entries().next().value as [
|
|
847
|
+
string,
|
|
848
|
+
{ text: string; groups: string[][] },
|
|
849
|
+
];
|
|
850
|
+
groupsMemo.delete(oldest);
|
|
851
|
+
groupsMemoChars -= entry.text.length;
|
|
852
|
+
}
|
|
853
|
+
}
|
|
854
|
+
return groups;
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
/** Test seam (#207): the import-groups memo's size, and a reset. */
|
|
858
|
+
export const importGroupsMemo = {
|
|
859
|
+
size: () => groupsMemo.size,
|
|
860
|
+
clear: () => {
|
|
861
|
+
groupsMemo.clear();
|
|
862
|
+
groupsMemoChars = 0;
|
|
863
|
+
},
|
|
864
|
+
};
|
|
865
|
+
|
|
767
866
|
/** A canvas slug in Unicode NFC — how the same-name owner rule compares names (p8-closure-lows-2). */
|
|
768
867
|
const slugNfc = (rel: string): string => canvasSlugFromRel(rel, '').normalize('NFC');
|
|
769
868
|
|
|
@@ -774,7 +873,12 @@ function walkImports(
|
|
|
774
873
|
env: WalkEnv,
|
|
775
874
|
canvas: string,
|
|
776
875
|
granted: ReadonlySet<string>
|
|
777
|
-
): {
|
|
876
|
+
): {
|
|
877
|
+
visited: Array<{ rel: string; text: string }>;
|
|
878
|
+
refused: Set<string>;
|
|
879
|
+
missing: Set<string>;
|
|
880
|
+
blocked: boolean;
|
|
881
|
+
} {
|
|
778
882
|
// gate-b-c4e — what an import may pull into the closure. A file of the design root's runtime
|
|
779
883
|
// state never (the build refuses it too); a canvas's board / meta / EDL never (they are that
|
|
780
884
|
// canvas's, not a module). Helpers, components and the design system stay reachable.
|
|
@@ -785,6 +889,9 @@ function walkImports(
|
|
|
785
889
|
const refused = new Set<string>();
|
|
786
890
|
// gate-b-c4l — anything the walk does not follow, or cannot resolve, blocks the canvas.
|
|
787
891
|
let blocked = false;
|
|
892
|
+
// 2.0.7 — the design-root paths of the imports that resolved to no file (a file deleted, renamed or not
|
|
893
|
+
// here yet): they block the canvas like any unresolved import, and the shell names them on its card.
|
|
894
|
+
const missing = new Set<string>();
|
|
788
895
|
// p8-perf-814 (V2-8.14) — a same-name stylesheet's owner that is NO file and has no meta of its
|
|
789
896
|
// own, and that folds to the slug of granted canvases only, IS the granted canvas: its only
|
|
790
897
|
// canvas-ness is the granted canvas's own slug-keyed board. (`Combine-admin.tsx` importing
|
|
@@ -809,13 +916,13 @@ function walkImports(
|
|
|
809
916
|
if (hit !== undefined) return hit;
|
|
810
917
|
let any = false;
|
|
811
918
|
let foreign = false;
|
|
812
|
-
|
|
813
|
-
|
|
919
|
+
const index = env.slugIndex();
|
|
920
|
+
for (const f of index.files.get(slug) ?? []) {
|
|
814
921
|
if (granted.has(f)) any = true;
|
|
815
922
|
else foreign = true;
|
|
816
923
|
}
|
|
817
924
|
// An entry the listing saw but left out is foreign, granted or not: it cannot be read.
|
|
818
|
-
|
|
925
|
+
if (index.unlisted.has(slug)) foreign = true;
|
|
819
926
|
slugOwned.set(slug, any && !foreign);
|
|
820
927
|
return any && !foreign;
|
|
821
928
|
};
|
|
@@ -836,7 +943,7 @@ function walkImports(
|
|
|
836
943
|
};
|
|
837
944
|
// The transitive relative import graph, from the canvas (and the DS override it pulls in).
|
|
838
945
|
const queue: string[] = [canvas];
|
|
839
|
-
const sys = canvasSystem(env.project, canvas, env.cfg);
|
|
946
|
+
const sys = canvasSystem(env.project, canvas, env.cfg, env.files);
|
|
840
947
|
const canvasText = env.textOf(canvas);
|
|
841
948
|
if (sys && canvasText !== null && importsDs(canvasText))
|
|
842
949
|
queue.push(`${sys.path}/preview/_ds.tsx`);
|
|
@@ -880,7 +987,7 @@ function walkImports(
|
|
|
880
987
|
else blocked = true;
|
|
881
988
|
}
|
|
882
989
|
if (!MODULE_EXT_RE.test(rel) && !/\.css$/i.test(rel)) continue;
|
|
883
|
-
for (const group of
|
|
990
|
+
for (const group of walkImportGroups(text, rel)) {
|
|
884
991
|
let resolved = false;
|
|
885
992
|
for (const abs of group) {
|
|
886
993
|
const dep = abs
|
|
@@ -893,10 +1000,20 @@ function walkImports(
|
|
|
893
1000
|
if (ownSurfaceStyle(dep) || importable(dep)) queue.push(dep);
|
|
894
1001
|
else blocked = true;
|
|
895
1002
|
}
|
|
896
|
-
if (!resolved)
|
|
1003
|
+
if (!resolved) {
|
|
1004
|
+
blocked = true;
|
|
1005
|
+
const first = group[0];
|
|
1006
|
+
if (first?.startsWith(`${VROOT}/`))
|
|
1007
|
+
missing.add(
|
|
1008
|
+
first
|
|
1009
|
+
.slice(VROOT.length + 1)
|
|
1010
|
+
.split(sep)
|
|
1011
|
+
.join('/')
|
|
1012
|
+
);
|
|
1013
|
+
}
|
|
897
1014
|
}
|
|
898
1015
|
}
|
|
899
|
-
return { visited, refused, blocked: blocked || refused.size > 0 };
|
|
1016
|
+
return { visited, refused, missing, blocked: blocked || refused.size > 0 };
|
|
900
1017
|
}
|
|
901
1018
|
|
|
902
1019
|
/**
|
|
@@ -922,6 +1039,29 @@ export function canvasImportsReport(
|
|
|
922
1039
|
return out;
|
|
923
1040
|
}
|
|
924
1041
|
|
|
1042
|
+
/**
|
|
1043
|
+
* 2.0.7 — per canvas, the imports that resolve to no file in the design root (sorted; a canvas with none is
|
|
1044
|
+
* absent). Such a canvas is blocked (c4l), so its frame is refused before the build and no build error
|
|
1045
|
+
* could name the file: the shell reads this (`/_index-data` `canvasMissingImports`) to say which file is
|
|
1046
|
+
* missing instead of "It didn't finish loading". Reader-free: the names come from the canvas's own source.
|
|
1047
|
+
*/
|
|
1048
|
+
export function canvasMissingImportsReport(
|
|
1049
|
+
project: ProjectReader,
|
|
1050
|
+
canvases: readonly string[],
|
|
1051
|
+
config?: ClosureConfig
|
|
1052
|
+
): Map<string, string[]> {
|
|
1053
|
+
const files = new Set<string>(project.list());
|
|
1054
|
+
const cfg = config ?? closureConfigOf(readJsonObject(project, 'config.json'));
|
|
1055
|
+
const env = walkEnv(project, files, cfg);
|
|
1056
|
+
const out = new Map<string, string[]>();
|
|
1057
|
+
for (const canvas of canvases) {
|
|
1058
|
+
if (!files.has(canvas)) continue;
|
|
1059
|
+
const { missing } = walkImports(env, canvas, new Set([canvas]));
|
|
1060
|
+
if (missing.size) out.set(canvas, [...missing].sort());
|
|
1061
|
+
}
|
|
1062
|
+
return out;
|
|
1063
|
+
}
|
|
1064
|
+
|
|
925
1065
|
function compute(
|
|
926
1066
|
canvases: string[],
|
|
927
1067
|
project: ProjectReader,
|
|
@@ -980,7 +1120,7 @@ function compute(
|
|
|
980
1120
|
if (DYNAMIC_RES.some((re) => re.test(text))) dynamic.add(canvas);
|
|
981
1121
|
for (const a of existingAssetRefs(text)) closureAssets.add(a);
|
|
982
1122
|
}
|
|
983
|
-
const sys = canvasSystem(project, canvas, cfg);
|
|
1123
|
+
const sys = canvasSystem(project, canvas, cfg, files);
|
|
984
1124
|
// Static asset references in the canvas's own sidecars (meta, board).
|
|
985
1125
|
for (const rel of ownedOf(canvas, twins)) {
|
|
986
1126
|
if (rel === canvas || !TEXT_SCAN_RE.test(rel)) continue;
|
|
@@ -57,6 +57,7 @@ import {
|
|
|
57
57
|
type Closure,
|
|
58
58
|
type ClosureCache,
|
|
59
59
|
canvasImportsReport,
|
|
60
|
+
canvasMissingImportsReport,
|
|
60
61
|
closureFor,
|
|
61
62
|
createClosureCache,
|
|
62
63
|
projectClosureConfig,
|
|
@@ -581,6 +582,11 @@ export interface ProjectVisibility {
|
|
|
581
582
|
* the names to what its reader sees (`filterIndexData`). Memoized per tree generation.
|
|
582
583
|
*/
|
|
583
584
|
canvasImports(canvases: readonly string[]): ReadonlyMap<string, string[]>;
|
|
585
|
+
/**
|
|
586
|
+
* 2.0.7 — of `canvases`, the ones with an import that resolves to no file → those imports
|
|
587
|
+
* (closure.ts `canvasMissingImportsReport`). Memoized per tree generation like `canvasImports`.
|
|
588
|
+
*/
|
|
589
|
+
canvasMissingImports?(canvases: readonly string[]): ReadonlyMap<string, string[]>;
|
|
584
590
|
/**
|
|
585
591
|
* 2.0.2 — resolves once the closure's listing holds a materializing cell's journal media (the
|
|
586
592
|
* first `listMaterializable` answer; later ones refresh in the background). Immediate off a
|
|
@@ -644,11 +650,24 @@ export function projectVisibility(
|
|
|
644
650
|
while (reports.size > 16) reports.delete(reports.keys().next().value as string);
|
|
645
651
|
return report;
|
|
646
652
|
};
|
|
653
|
+
const missingReports = new Map<string, ReadonlyMap<string, string[]>>();
|
|
654
|
+
const canvasMissingImports = (canvases: readonly string[]) => {
|
|
655
|
+
const cfg = config();
|
|
656
|
+
const key = `${generation}\u0002${JSON.stringify(cfg)}\u0003${canvases.join('\u0001')}`;
|
|
657
|
+
const hit = missingReports.get(key);
|
|
658
|
+
if (hit) return hit;
|
|
659
|
+
const report = canvasMissingImportsReport(reader, canvases, cfg);
|
|
660
|
+
missingReports.set(key, report);
|
|
661
|
+
while (missingReports.size > 16)
|
|
662
|
+
missingReports.delete(missingReports.keys().next().value as string);
|
|
663
|
+
return report;
|
|
664
|
+
};
|
|
647
665
|
const src: ProjectVisibility = Object.freeze({
|
|
648
666
|
closureOf,
|
|
649
667
|
visibilityFor,
|
|
650
668
|
current: () => visibilityFor(currentAccess()),
|
|
651
669
|
canvasImports,
|
|
670
|
+
canvasMissingImports,
|
|
652
671
|
ready,
|
|
653
672
|
});
|
|
654
673
|
sources.set(ctx, src);
|
|
@@ -682,6 +701,8 @@ interface IndexDataShape {
|
|
|
682
701
|
canvasImportsCanvases?: Record<string, string[]>;
|
|
683
702
|
// 2.0.5 (#205) — a canvas → the design-root files its built module was refused for (access/refused-inputs.ts)
|
|
684
703
|
canvasRefusedInputs?: Record<string, string[]>;
|
|
704
|
+
// 2.0.7 — a canvas → its imports that resolve to no file (its frame is refused; closure.ts)
|
|
705
|
+
canvasMissingImports?: Record<string, string[]>;
|
|
685
706
|
}
|
|
686
707
|
|
|
687
708
|
/** Repo-relative `.design/ui/x/y.tsx` → every ancestor dir (`.design/ui`, `.design/ui/x`). */
|
|
@@ -748,6 +769,12 @@ export function filterIndexData<T extends IndexDataShape>(
|
|
|
748
769
|
if (data.canvasImportsCanvases) out.canvasImportsCanvases = namesSeen(data.canvasImportsCanvases);
|
|
749
770
|
// 2.0.5 (#205) — the refused files by the same rule: only names this reader sees, no all-hidden entry
|
|
750
771
|
if (data.canvasRefusedInputs) out.canvasRefusedInputs = namesSeen(data.canvasRefusedInputs);
|
|
772
|
+
// 2.0.7 — a missing import is a path that is NOT on disk, read from the canvas's own source, which the
|
|
773
|
+
// reader sees: kept for the canvases it sees (a name `vis.sees` would always drop, there is no such file)
|
|
774
|
+
if (data.canvasMissingImports)
|
|
775
|
+
out.canvasMissingImports = Object.fromEntries(
|
|
776
|
+
Object.entries(data.canvasMissingImports).filter(([k]) => seen(k))
|
|
777
|
+
);
|
|
751
778
|
// S10.4 — the revision fields name systems and revisions: a session sees the ones it renders with.
|
|
752
779
|
if (data.dsConverted) {
|
|
753
780
|
const byName = <V>(m: Record<string, V> | undefined) =>
|
|
@@ -181,6 +181,38 @@ export const AGENT_PATHS: Readonly<Record<ActionId, ActionDefAI>> = {
|
|
|
181
181
|
server: { route: '/_api/sync/cancel-assets', method: 'POST' },
|
|
182
182
|
agent: cli('maude design curl-local -X POST http://127.0.0.1:<port>/_api/sync/cancel-assets'),
|
|
183
183
|
},
|
|
184
|
+
// Issue #207 — which folders a project syncs is the person's choice (a versioned config write
|
|
185
|
+
// that changes what reaches the team), so the AI is never taught it.
|
|
186
|
+
'sync.ignore-folder': {
|
|
187
|
+
effect: 'none',
|
|
188
|
+
minRole: 'edit',
|
|
189
|
+
server: { route: '/_api/sync/settings', method: 'POST' },
|
|
190
|
+
agent: human('hub-link', 'which folders the project syncs is the person’s choice'),
|
|
191
|
+
},
|
|
192
|
+
'sync.sync-folder-again': {
|
|
193
|
+
effect: 'none',
|
|
194
|
+
minRole: 'edit',
|
|
195
|
+
server: { route: '/_api/sync/settings', method: 'POST' },
|
|
196
|
+
agent: human('hub-link', 'which folders the project syncs is the person’s choice'),
|
|
197
|
+
},
|
|
198
|
+
// Issue #207 (7b) — the answer to a batch of local deletes held by the delete breaker. Deleting on the
|
|
199
|
+
// hub removes the files for every teammate (each held on their Mac for their own confirm), so it is
|
|
200
|
+
// the person's decision, never the AI's; keeping them on the hub is only about this Mac's copy.
|
|
201
|
+
'sync.delete-held-on-hub': {
|
|
202
|
+
effect: 'shared',
|
|
203
|
+
minRole: 'edit',
|
|
204
|
+
server: { route: '/_api/sync/held-deletes', method: 'POST' },
|
|
205
|
+
agent: human(
|
|
206
|
+
'hub-link',
|
|
207
|
+
'deleting a batch of files on the project’s hub is the person’s choice'
|
|
208
|
+
),
|
|
209
|
+
},
|
|
210
|
+
'sync.keep-held-on-hub': {
|
|
211
|
+
effect: 'none',
|
|
212
|
+
minRole: 'edit',
|
|
213
|
+
server: { route: '/_api/sync/held-deletes', method: 'POST' },
|
|
214
|
+
agent: human('hub-link', 'which deleted files stay on the hub is the person’s choice'),
|
|
215
|
+
},
|
|
184
216
|
// p8-held-conflict-status — the two versions of a held source conflict (read only): this Mac's file and
|
|
185
217
|
// the project's, kept in `_history/<slug>/sync-recovery/`. `maude design sync status` lists the slugs.
|
|
186
218
|
// No `server`: the action itself only opens a sheet; the read under it is Sync details' own GET.
|
|
@@ -191,6 +223,24 @@ export const AGENT_PATHS: Readonly<Record<ActionId, ActionDefAI>> = {
|
|
|
191
223
|
),
|
|
192
224
|
},
|
|
193
225
|
'sync.get-latest': GIT('/_api/git/pull', 'git pull'),
|
|
226
|
+
// fix/207 — the person's yes / no to shared code (.ts/.js) from the project's hub: it runs on this
|
|
227
|
+
// Mac outside the canvas sandbox (DDR-054), so an agent can never say yes for them (human
|
|
228
|
+
// 'consent'). The route answers only the window's own fetch (routes/sync.ts) and bash-guard names it.
|
|
229
|
+
'sync.allow-code': {
|
|
230
|
+
effect: 'external',
|
|
231
|
+
minRole: 'edit',
|
|
232
|
+
server: { route: '/_api/sync/code-consent/set', method: 'POST' },
|
|
233
|
+
agent: human(
|
|
234
|
+
'consent',
|
|
235
|
+
'the person’s yes to shared code from this project’s hub running on their Mac'
|
|
236
|
+
),
|
|
237
|
+
},
|
|
238
|
+
'sync.stop-code': {
|
|
239
|
+
effect: 'none',
|
|
240
|
+
minRole: 'edit',
|
|
241
|
+
server: { route: '/_api/sync/code-consent/set', method: 'POST' },
|
|
242
|
+
agent: human('consent', 'takes back the person’s yes to shared code'),
|
|
243
|
+
},
|
|
194
244
|
'sync.sign-in-again': {
|
|
195
245
|
effect: 'none',
|
|
196
246
|
agent: human('hub-link', 'signing in to the cloud is the person’s own credential'),
|
|
@@ -1073,6 +1123,10 @@ export const AGENT_PATHS: Readonly<Record<ActionId, ActionDefAI>> = {
|
|
|
1073
1123
|
'view.layers': { effect: 'none', agent: cli('maude design open --panel layers') },
|
|
1074
1124
|
'view.inspector-on-select': PREF(),
|
|
1075
1125
|
'view.minimap': PREF(),
|
|
1126
|
+
// 2.0.7 B2 — Canvas | Pages and its paging are the person's own view of the canvas (the view file, per Mac)
|
|
1127
|
+
'view.pages': PREF(),
|
|
1128
|
+
'pages.next': PREF(),
|
|
1129
|
+
'pages.prev': PREF(),
|
|
1076
1130
|
'view.zoom-controls': PREF(),
|
|
1077
1131
|
'view.print-guides': PREF(),
|
|
1078
1132
|
'present.canvas': NAV('<canvas> --mode present'),
|
|
@@ -38,6 +38,8 @@ export interface ShellKeyState {
|
|
|
38
38
|
assetTileSelected?: boolean;
|
|
39
39
|
/** S8.16 — the one selected picture has other takes (client/v2/assets/takes.js): ← → step between them. */
|
|
40
40
|
selectionHasTakes?: boolean;
|
|
41
|
+
/** 2.0.7 B2 — the active canvas shows Pages (canvas-mode.js `pages`): ⌥⌘P and the Present keys are off. */
|
|
42
|
+
pagesView?: boolean;
|
|
41
43
|
}
|
|
42
44
|
|
|
43
45
|
/** <input> types that take no typing: they act like buttons (a checkbox switch, a radio, a colour well). */
|
|
@@ -73,6 +75,7 @@ export function shellKeyCtx(probe: FocusProbe, s: ShellKeyState): KeyCtx {
|
|
|
73
75
|
if (range) facts.add('rangeFocused');
|
|
74
76
|
if (s.assetTileSelected) facts.add('assetTileSelected');
|
|
75
77
|
if (s.selectionHasTakes) facts.add('selectionHasTakes');
|
|
78
|
+
if (s.pagesView) facts.add('pagesView');
|
|
76
79
|
const selection: SelKind = s.clipSelected ? 'clip' : s.artboardSelected ? 'artboard' : 'none';
|
|
77
80
|
return {
|
|
78
81
|
role: s.readOnly ? 'comment' : 'owner',
|
|
@@ -41,6 +41,19 @@ export const SYNC_ACTIONS: ActionDef[] = [
|
|
|
41
41
|
pick('sync.discard-ai-edit', 'Discard'),
|
|
42
42
|
// Moving now's ✕: `POST /_api/sync/cancel-assets` (the sweep stops; uploads are idempotent)
|
|
43
43
|
pick('sync.cancel-transfer', 'Cancel the transfer'),
|
|
44
|
+
// fix/207 — shared code from the project's hub: Sync details' held row and the canvas-waiting card
|
|
45
|
+
// open the consent sheet; `POST /_api/sync/code-consent/set { allow }` records the answer on this
|
|
46
|
+
// Mac (the window's own fetch only, Can edit).
|
|
47
|
+
pick('sync.allow-code', 'Allow shared code…'),
|
|
48
|
+
pick('sync.stop-code', 'Stop allowing shared code…'),
|
|
49
|
+
// Issue #207 — Sync details › a long run of pictures going up: leave its folder out, or bring a
|
|
50
|
+
// left-out folder back (`POST /_api/sync/settings { addIgnoreFolder | removeIgnoreFolder }`).
|
|
51
|
+
pick('sync.ignore-folder', 'Don’t sync this folder'),
|
|
52
|
+
pick('sync.sync-folder-again', 'Sync it again'),
|
|
53
|
+
// Issue #207 (7b) — Sync details › Deleted on this Mac, held: send the held deletes to the hub as
|
|
54
|
+
// one confirmed batch, or keep the files on the hub (`POST /_api/sync/held-deletes { answer }`).
|
|
55
|
+
pick('sync.delete-held-on-hub', 'Move to the hub’s trash too…'),
|
|
56
|
+
pick('sync.keep-held-on-hub', 'Keep on the hub'),
|
|
44
57
|
// Get latest (moved here from Version history) and Sign in again: every role keeps them
|
|
45
58
|
{ id: 'sync.get-latest', label: 'Get latest', kind: 'command', exec: 'shell', search: ROW },
|
|
46
59
|
{ id: 'sync.sign-in-again', label: 'Sign in again', kind: 'command', exec: 'shell', search: ROW },
|
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
import type { ActionDef } from '../types.ts';
|
|
4
4
|
import { IN_CANVAS, IN_CANVAS_ANY, kb } from './_v1.ts';
|
|
5
5
|
|
|
6
|
+
/** 2.0.7 B2 — what ⌘K says after Preview / Present while the canvas shows Pages. */
|
|
7
|
+
export const PAGES_NOTE = 'switch to Canvas first';
|
|
8
|
+
|
|
6
9
|
export const VIEW_ACTIONS: ActionDef[] = [
|
|
7
10
|
{
|
|
8
11
|
// V2-4.5b (CONTRACT §2 [A7], V2-1.2 §9 Q1): ⌥⌘P switches to Preview; in Preview it toggles back
|
|
@@ -15,7 +18,9 @@ export const VIEW_ACTIONS: ActionDef[] = [
|
|
|
15
18
|
icon: 'eye',
|
|
16
19
|
exec: 'canvas',
|
|
17
20
|
keys: [kb('⌥⌘P', 'global', { inText: true, when: { mode: ['edit', 'preview', 'viewing'] } })],
|
|
18
|
-
|
|
21
|
+
// 2.0.7 B2 — off while the canvas shows Pages (greyed with the reason, never hidden)
|
|
22
|
+
enabled: { notFacts: ['pagesView'] },
|
|
23
|
+
search: { keywords: ['mode', 'live', 'interact', 'edit'], note: PAGES_NOTE },
|
|
19
24
|
},
|
|
20
25
|
{
|
|
21
26
|
// S3.10a — back out of a followed link (S3-links-format §5 "Back"): the PreviewBar's "‹ Homepage". No key
|
|
@@ -400,7 +405,8 @@ export const VIEW_ACTIONS: ActionDef[] = [
|
|
|
400
405
|
exec: 'shell',
|
|
401
406
|
fromCanvas: true,
|
|
402
407
|
keys: [kb('⌥⌘↵', 'global', { when: { mode: ['edit', 'viewing', 'preview'] } })],
|
|
403
|
-
|
|
408
|
+
enabled: { notFacts: ['pagesView'] },
|
|
409
|
+
search: { keywords: ['presentation', 'slideshow', 'artboards', 'selected'], note: PAGES_NOTE },
|
|
404
410
|
},
|
|
405
411
|
{
|
|
406
412
|
// S3.1 — ⇧⌥⌘↵: the same, from the first artboard in canvas order.
|
|
@@ -410,7 +416,8 @@ export const VIEW_ACTIONS: ActionDef[] = [
|
|
|
410
416
|
exec: 'shell',
|
|
411
417
|
fromCanvas: true,
|
|
412
418
|
keys: [kb('⇧⌥⌘↵', 'global', { when: { mode: ['edit', 'viewing', 'preview'] } })],
|
|
413
|
-
|
|
419
|
+
enabled: { notFacts: ['pagesView'] },
|
|
420
|
+
search: { keywords: ['presentation', 'slideshow', 'beginning', 'first'], note: PAGES_NOTE },
|
|
414
421
|
},
|
|
415
422
|
{
|
|
416
423
|
// S3.2b (md-keys, `present` scope): → and space go on, ← and ⇧space go back. With the canvas focused the
|
|
@@ -444,6 +451,8 @@ export const VIEW_ACTIONS: ActionDef[] = [
|
|
|
444
451
|
label: 'Present the canvas',
|
|
445
452
|
kind: 'toggle',
|
|
446
453
|
exec: 'shell',
|
|
454
|
+
enabled: { notFacts: ['pagesView'] },
|
|
455
|
+
search: { note: PAGES_NOTE },
|
|
447
456
|
legacy: { menu: 'Presentation Mode' },
|
|
448
457
|
},
|
|
449
458
|
{
|
|
@@ -550,6 +559,53 @@ export const VIEW_ACTIONS: ActionDef[] = [
|
|
|
550
559
|
kb(`⌥⌘${n}`, 'global', { inText: true, alias: i > 0, when: IN_CANVAS_ANY })
|
|
551
560
|
),
|
|
552
561
|
},
|
|
562
|
+
// 2.0.7 B2 (decision `v2-207-pages-view`) — Canvas | Pages beside Light | Dark on the canvas's pill: Pages shows one
|
|
563
|
+
// artboard at a time, filling the view, in the Present order (else the layout order). Per canvas, per Mac (the view
|
|
564
|
+
// file, `canvasView`). The canvas owns it (canvas-pages.ts); the shell only asks over `run-action`. Edit and Viewing
|
|
565
|
+
// only — Preview and Present are off while it is on (`pagesView`), and Pages does not show in them. No key.
|
|
566
|
+
{
|
|
567
|
+
id: 'view.pages',
|
|
568
|
+
label: 'Pages',
|
|
569
|
+
kind: 'toggle',
|
|
570
|
+
exec: 'canvas',
|
|
571
|
+
enabled: { facts: ['canvasOpen'], mode: ['edit', 'viewing'] },
|
|
572
|
+
help: { group: 'canvas', order: 60 },
|
|
573
|
+
search: { keywords: ['pages', 'one at a time', 'artboards', 'page', 'canvas', 'slides'] },
|
|
574
|
+
},
|
|
575
|
+
{
|
|
576
|
+
// PageDown / PageUp, and → / ← with nothing selected (a selection's arrows nudge it). Only in the canvas, only
|
|
577
|
+
// while Pages is on: anywhere else the canvas leaves the key alone.
|
|
578
|
+
id: 'pages.next',
|
|
579
|
+
label: 'Next page',
|
|
580
|
+
kind: 'command',
|
|
581
|
+
exec: 'canvas',
|
|
582
|
+
enabled: { facts: ['canvasOpen', 'pagesView'] },
|
|
583
|
+
keys: [
|
|
584
|
+
kb('PageDown', 'global', { when: { focus: ['canvas'], mode: ['edit', 'viewing'] } }),
|
|
585
|
+
kb('→', 'global', {
|
|
586
|
+
alias: true,
|
|
587
|
+
when: { focus: ['canvas'], mode: ['edit', 'viewing'], selection: ['none'] },
|
|
588
|
+
}),
|
|
589
|
+
],
|
|
590
|
+
help: { group: 'canvas', order: 61 },
|
|
591
|
+
search: { keywords: ['pages', 'forward', 'artboard', 'page'] },
|
|
592
|
+
},
|
|
593
|
+
{
|
|
594
|
+
id: 'pages.prev',
|
|
595
|
+
label: 'Previous page',
|
|
596
|
+
kind: 'command',
|
|
597
|
+
exec: 'canvas',
|
|
598
|
+
enabled: { facts: ['canvasOpen', 'pagesView'] },
|
|
599
|
+
keys: [
|
|
600
|
+
kb('PageUp', 'global', { when: { focus: ['canvas'], mode: ['edit', 'viewing'] } }),
|
|
601
|
+
kb('←', 'global', {
|
|
602
|
+
alias: true,
|
|
603
|
+
when: { focus: ['canvas'], mode: ['edit', 'viewing'], selection: ['none'] },
|
|
604
|
+
}),
|
|
605
|
+
],
|
|
606
|
+
help: { group: 'canvas', order: 62 },
|
|
607
|
+
search: { keywords: ['pages', 'back', 'artboard', 'page'] },
|
|
608
|
+
},
|
|
553
609
|
// V2-4.10 — ⌘K: every panel's › Advanced fold at once (per Mac, client/v2/fold/fold-store.js).
|
|
554
610
|
{
|
|
555
611
|
id: 'view.advanced-open-all',
|
|
@@ -375,6 +375,7 @@ export const CANVAS_KEYMAP: readonly KeyedAction[] = [
|
|
|
375
375
|
{
|
|
376
376
|
id: 'mode.preview',
|
|
377
377
|
exec: 'canvas',
|
|
378
|
+
enabled: { notFacts: ['pagesView'] },
|
|
378
379
|
keys: [
|
|
379
380
|
{
|
|
380
381
|
chord: '⌥⌘P',
|
|
@@ -422,12 +423,14 @@ export const CANVAS_KEYMAP: readonly KeyedAction[] = [
|
|
|
422
423
|
{
|
|
423
424
|
id: 'present.from-selection',
|
|
424
425
|
exec: 'shell',
|
|
426
|
+
enabled: { notFacts: ['pagesView'] },
|
|
425
427
|
fromCanvas: true,
|
|
426
428
|
keys: [{ chord: '⌥⌘↵', layer: 'global', when: { mode: ['edit', 'viewing', 'preview'] } }],
|
|
427
429
|
},
|
|
428
430
|
{
|
|
429
431
|
id: 'present.from-start',
|
|
430
432
|
exec: 'shell',
|
|
433
|
+
enabled: { notFacts: ['pagesView'] },
|
|
431
434
|
fromCanvas: true,
|
|
432
435
|
keys: [{ chord: '⌥⇧⌘↵', layer: 'global', when: { mode: ['edit', 'viewing', 'preview'] } }],
|
|
433
436
|
},
|
|
@@ -545,6 +548,38 @@ export const CANVAS_KEYMAP: readonly KeyedAction[] = [
|
|
|
545
548
|
},
|
|
546
549
|
],
|
|
547
550
|
},
|
|
551
|
+
{
|
|
552
|
+
id: 'pages.next',
|
|
553
|
+
exec: 'canvas',
|
|
554
|
+
enabled: { facts: ['canvasOpen', 'pagesView'] },
|
|
555
|
+
keys: [
|
|
556
|
+
{
|
|
557
|
+
chord: 'PageDown',
|
|
558
|
+
layer: 'global',
|
|
559
|
+
when: { focus: ['canvas'], mode: ['edit', 'viewing'] },
|
|
560
|
+
},
|
|
561
|
+
{
|
|
562
|
+
chord: '→',
|
|
563
|
+
layer: 'global',
|
|
564
|
+
alias: true,
|
|
565
|
+
when: { focus: ['canvas'], mode: ['edit', 'viewing'], selection: ['none'] },
|
|
566
|
+
},
|
|
567
|
+
],
|
|
568
|
+
},
|
|
569
|
+
{
|
|
570
|
+
id: 'pages.prev',
|
|
571
|
+
exec: 'canvas',
|
|
572
|
+
enabled: { facts: ['canvasOpen', 'pagesView'] },
|
|
573
|
+
keys: [
|
|
574
|
+
{ chord: 'PageUp', layer: 'global', when: { focus: ['canvas'], mode: ['edit', 'viewing'] } },
|
|
575
|
+
{
|
|
576
|
+
chord: '←',
|
|
577
|
+
layer: 'global',
|
|
578
|
+
alias: true,
|
|
579
|
+
when: { focus: ['canvas'], mode: ['edit', 'viewing'], selection: ['none'] },
|
|
580
|
+
},
|
|
581
|
+
],
|
|
582
|
+
},
|
|
548
583
|
{
|
|
549
584
|
id: 'tool.select',
|
|
550
585
|
exec: 'canvas',
|
|
@@ -82,6 +82,8 @@ export const PROJECT_MENU: readonly MenuNode[] = [
|
|
|
82
82
|
{ id: 'view.assets' },
|
|
83
83
|
{ id: 'view.exports' },
|
|
84
84
|
{ id: 'view.annotations' },
|
|
85
|
+
// 2.0.7 B2 — Canvas | Pages (the pill's switch): checked while the canvas shows one artboard at a time
|
|
86
|
+
{ id: 'view.pages' },
|
|
85
87
|
SEP,
|
|
86
88
|
// S3.14 (04 md-keys "Menu › View, amended"): Preview ⌥⌘P opens the group, then S3.1's Present ⌥⌘↵ ·
|
|
87
89
|
// Present from the start ⇧⌥⌘↵ · Present the canvas.
|
|
@@ -69,7 +69,9 @@ export type Fact =
|
|
|
69
69
|
// S8.16 — the one selected picture is a generated take with siblings: ← → step between the takes, not nudge
|
|
70
70
|
| 'selectionHasTakes'
|
|
71
71
|
// p8-v1-drop — a design system in this project is below Conformant: ⌘K offers "Bring it up to the schema"
|
|
72
|
-
| 'dsUpgradeOffered'
|
|
72
|
+
| 'dsUpgradeOffered'
|
|
73
|
+
// 2.0.7 B2 — the active canvas shows Pages (one artboard at a time): Preview and Present are off, paging is on
|
|
74
|
+
| 'pagesView';
|
|
73
75
|
|
|
74
76
|
/** Declarative predicate — serialisable into the manifest, evaluable in the shell, the iframe and
|
|
75
77
|
* (role half) the server. Every present field must hold (AND); `any` is an OR of sub-predicates. */
|