@marver-design/marver 0.22.1 → 0.23.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +117 -0
- package/README.md +14 -10
- package/dist/agent-BsieQGTD.mjs +99 -0
- package/dist/{bake-CvY8QR3L.mjs → bake-DQtnDB8-.mjs} +1 -1
- package/dist/{board-status-CWGHIdo_.mjs → board-status-BZSzc9Hp.mjs} +69 -610
- package/dist/boards-BRLnoTC3.mjs +620 -0
- package/dist/{boards-BwKI0qWd.mjs → boards-Dv-Ipd8G.mjs} +13 -5
- package/dist/{build-B1kavcpc.mjs → build-_ndp_dXn.mjs} +18 -10
- package/dist/cli.mjs +20 -11
- package/dist/{comments-ClVgfQib.mjs → comments-BlqyZh3D.mjs} +71 -9
- package/dist/{config-DJxMRVD8.mjs → config-BUKprFAp.mjs} +5 -97
- package/dist/{context-D4t59wDi.mjs → context-CdkNiKdJ.mjs} +3 -2
- package/dist/{daemon-PmNqoOAk.mjs → daemon-BvMPdQ3k.mjs} +78 -19
- package/dist/{dev-Cf4wLGe2.mjs → dev-Cf-4eqaC.mjs} +50 -10
- package/dist/{init-C_K-cjBQ.mjs → init-hfZV7TwY.mjs} +10 -4
- package/dist/{ledger-Bu0BjqIe.mjs → ledger-BNXW14Xw.mjs} +1 -6
- package/dist/link-BodAbIQz.mjs +132 -0
- package/dist/{manifest-CcdWx7ud.mjs → manifest-TpfDWldB.mjs} +56 -6
- package/dist/{plugin-C5u07Yhv.mjs → plugin-DoXql0ZZ.mjs} +400 -48
- package/dist/{poster-BduzQBYz.mjs → poster-XBmUvQiL.mjs} +1 -1
- package/dist/{profile-BjAPAJSb.mjs → profile-CrZohD6g.mjs} +1 -1
- package/dist/{publish-bakes-b0jUwvM_.mjs → publish-bakes-KKTHWqq3.mjs} +2 -2
- package/dist/{share--bdSc4G5.mjs → share-BD-wcDQq.mjs} +1 -1
- package/dist/{shot-BAR8hmU9.mjs → shot-DOD8v6fJ.mjs} +2 -2
- package/dist/{shot-BFEuYbaz.mjs → shot-Dh6fV1Lm.mjs} +1 -1
- package/dist/{sync-BZaCWqK-.mjs → sync-DoA1vf4u.mjs} +15 -1
- package/dist/{work-0YopuMt9.mjs → work-ClFFq0Qh.mjs} +9 -3
- package/dist/{work-CLrmY-vQ.mjs → work-ayuL_9Kk.mjs} +72 -1
- package/docs/boards-and-folders.md +60 -7
- package/docs/context.md +10 -2
- package/docs/live-jam.md +11 -0
- package/docs/sticky-notes.md +1 -1
- package/package.json +1 -1
- package/src/client/content/diagram.tsx +7 -1
- package/src/client/content/img-lod.ts +12 -2
- package/src/client/content/index.tsx +73 -6
- package/src/client/content/md.ts +3 -2
- package/src/client/frame-host/inspect.js +23 -0
- package/src/client/shell/App.tsx +21 -10
- package/src/client/shell/BoardList.tsx +26 -6
- package/src/client/shell/LockedApp.tsx +2 -2
- package/src/client/shell/Play.tsx +5 -1
- package/src/client/shell/StatusPicker.tsx +12 -5
- package/src/client/shell/Tip.tsx +25 -5
- package/src/client/shell/board-icons.tsx +15 -1
- package/src/client/shell/canvas/Canvas.tsx +42 -6
- package/src/client/shell/canvas/anchor.ts +41 -0
- package/src/client/shell/canvas/ctl.ts +6 -0
- package/src/client/shell/comments-store.ts +8 -5
- package/src/client/shell/goto.ts +52 -3
- package/src/client/shell/hash.ts +24 -3
- package/src/client/shell/store.ts +261 -36
- package/src/client/shell/styles.css +20 -2
- package/src/client/shell/tidy.ts +34 -3
- package/src/shared/board-types.ts +10 -6
- package/src/shared/frames.ts +3 -0
- package/src/shared/status.ts +17 -8
- package/templates/AGENTS-embedded.md +43 -8
- package/templates/AGENTS-studio.md +43 -8
- package/templates/instructions/boards.md +13 -3
- package/templates/instructions/context.md +6 -2
- package/templates/instructions/iterate.md +29 -16
- package/templates/instructions/jam.md +9 -2
- package/templates/instructions/reference/deck-layouts.md +2 -1
- package/templates/instructions/reference/deck-story.md +2 -1
package/src/client/shell/hash.ts
CHANGED
|
@@ -7,6 +7,9 @@
|
|
|
7
7
|
* #/ default board, fit all
|
|
8
8
|
* #/b/<board> board, fit all
|
|
9
9
|
* #/b/<board>?n=k1,k2 board with nodes selected, camera fit to selection
|
|
10
|
+
* #/b/<board>?f=<scene/frame>,... the same, by FRAME id - the link an agent can write
|
|
11
|
+
* (node keys are the shell's; `marver link` prints these)
|
|
12
|
+
* #/b/<board>?s=<scene>,... the same for every frame of a scene
|
|
10
13
|
* #/b/<board>?c=<id> board with a comment thread open
|
|
11
14
|
* #/i/<token> invite link - opens the claim dialog with the token
|
|
12
15
|
* #/p/<board>?at=<frame-id>&device=<viewport>&theme=<theme> play mode
|
|
@@ -18,6 +21,10 @@
|
|
|
18
21
|
export interface HashState {
|
|
19
22
|
board?: string
|
|
20
23
|
n?: string[]
|
|
24
|
+
/** Frame ids to select + fit - resolved to node keys once the board is loaded. */
|
|
25
|
+
f?: string[]
|
|
26
|
+
/** Scenes whose frames to select + fit. */
|
|
27
|
+
s?: string[]
|
|
21
28
|
c?: string
|
|
22
29
|
invite?: string
|
|
23
30
|
play?: { at?: string; device?: string; theme?: string; slides?: boolean }
|
|
@@ -26,6 +33,17 @@ export interface HashState {
|
|
|
26
33
|
}
|
|
27
34
|
|
|
28
35
|
const BOARD_RE = /^[a-z0-9][a-z0-9-]*$/
|
|
36
|
+
const isFrameId = (at: string) => /^[\w./-]{1,200}$/.test(at) && !at.includes('..')
|
|
37
|
+
|
|
38
|
+
/** The node keys a link names on the loaded board: its keys (`n`), the nodes showing its frames
|
|
39
|
+
* (`f`) and every node of its scenes (`s`) - in board order, each once. A name the board does not
|
|
40
|
+
* show resolves to nothing (the caller decides what an empty answer means). */
|
|
41
|
+
export function linkTargets(h: Pick<HashState, 'n' | 'f' | 's'>, nodes: readonly { key: string; frame: string; missing?: boolean }[]): string[] {
|
|
42
|
+
const keys = new Set(h.n ?? [])
|
|
43
|
+
const frames = new Set(h.f ?? [])
|
|
44
|
+
const scenes = h.s ?? []
|
|
45
|
+
return nodes.filter((n) => keys.has(n.key) || (!n.missing && (frames.has(n.frame) || scenes.some((sc) => n.frame.startsWith(`${sc}/`))))).map((n) => n.key)
|
|
46
|
+
}
|
|
29
47
|
|
|
30
48
|
export function parseHash(hash: string = location.hash): HashState {
|
|
31
49
|
try {
|
|
@@ -40,7 +58,7 @@ export function parseHash(hash: string = location.hash): HashState {
|
|
|
40
58
|
const mf = path.match(/^\/f\/(.+)$/)
|
|
41
59
|
if (mf) {
|
|
42
60
|
const at = decodeURIComponent(mf[1])
|
|
43
|
-
if (
|
|
61
|
+
if (!isFrameId(at)) return {}
|
|
44
62
|
return { focus: { at, device: params.get('device') ?? undefined, theme: params.get('theme') ?? undefined } }
|
|
45
63
|
}
|
|
46
64
|
const m = path.match(/^\/(b|p)\/([^/?]+)$/)
|
|
@@ -48,9 +66,12 @@ export function parseHash(hash: string = location.hash): HashState {
|
|
|
48
66
|
const board = decodeURIComponent(m[2])
|
|
49
67
|
if (!BOARD_RE.test(board)) return {}
|
|
50
68
|
if (m[1] === 'b') {
|
|
51
|
-
const
|
|
69
|
+
const list = (k: string) => (params.get(k) ?? '').split(',').map((s) => s.trim()).filter(Boolean)
|
|
70
|
+
const n = list('n')
|
|
71
|
+
const f = list('f').filter(isFrameId)
|
|
72
|
+
const sc = list('s').filter((x) => /^[\w.-]{1,120}$/.test(x) && !x.includes('..'))
|
|
52
73
|
const c = params.get('c') ?? undefined
|
|
53
|
-
return { board, ...(n.length ? { n } : {}), ...(c && /^[\w-]+$/.test(c) ? { c } : {}) }
|
|
74
|
+
return { board, ...(n.length ? { n } : {}), ...(f.length ? { f } : {}), ...(sc.length ? { s: sc } : {}), ...(c && /^[\w-]+$/.test(c) ? { c } : {}) }
|
|
54
75
|
}
|
|
55
76
|
return {
|
|
56
77
|
board,
|