@estiva-app/interop 0.28.1 → 0.30.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/CHANGELOG.md +35 -0
- package/README.md +17 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/nesting.d.ts +62 -0
- package/dist/nesting.d.ts.map +1 -0
- package/dist/nesting.js +103 -0
- package/dist/nesting.js.map +1 -0
- package/dist/projection.d.ts +28 -2
- package/dist/projection.d.ts.map +1 -1
- package/dist/projection.js +63 -11
- package/dist/projection.js.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +6 -0
- package/src/nesting.ts +132 -0
- package/src/projection.ts +86 -12
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,41 @@ how a declaration is read, is a MAJOR — in `0.x`, a MINOR — even when no
|
|
|
6
6
|
TypeScript signature moved. A consumer upgrading must be able to tell whether
|
|
7
7
|
manifests already published still mean what they meant.
|
|
8
8
|
|
|
9
|
+
## 0.30.0 — 2026-09-23
|
|
10
|
+
|
|
11
|
+
**Nothing a manifest may declare changes, and nothing about how one is read.**
|
|
12
|
+
`commentDecorationsOf` reports more, and a caller that passes a body gets a
|
|
13
|
+
narrower `edit`.
|
|
14
|
+
|
|
15
|
+
- **An edit's attachments fold** (CON-5, RFC 0.4 §7.2.1 as amended
|
|
16
|
+
2026-09-23). A `kind:40003` may carry `imeta`. `CommentDecoration.attachments`
|
|
17
|
+
is the `imeta` set of the newest edit that carries at least one, in the body
|
|
18
|
+
fold's order; a set replaces the target's own, and it is absent when no edit
|
|
19
|
+
carries one, so the target's own attachments stand.
|
|
20
|
+
- **A target may carry its `body`.** When it does, `edit` is about the body:
|
|
21
|
+
its `at` and `by` are the last edit whose content differs from the body it
|
|
22
|
+
replaced, and it is absent when every edit only attached files. `edit.body`
|
|
23
|
+
is still the newest edit's content. A target without `body` gets exactly
|
|
24
|
+
0.29.0's answer.
|
|
25
|
+
|
|
26
|
+
## 0.29.0 — 2026-09-23
|
|
27
|
+
|
|
28
|
+
**The bare file's built-in manifest declares one more action, `move`.** No
|
|
29
|
+
manifest on the relay means anything different, and nothing is read
|
|
30
|
+
differently except one value that used to be ignored. One export is new.
|
|
31
|
+
|
|
32
|
+
- **`move`** (FOL-4) — a `kind:1851` change to the `parent` field SPEC §6.7
|
|
33
|
+
already defined; the value is the new parent's address, or `''` for the top.
|
|
34
|
+
`h` is the file's team and does not change. A consumer that draws every
|
|
35
|
+
field-setting action as a property row will now meet it; keep it out with
|
|
36
|
+
the new `ForeignObject.parentField`, as the title's rename is kept out.
|
|
37
|
+
- **A `parent` change with an empty value moves the file to the top.** 0.28
|
|
38
|
+
read it as "no change" and fell back to the root `a` tag, so a file could be
|
|
39
|
+
moved under another but never out again.
|
|
40
|
+
- **`nestingOf(files)`** — roots, children, breadcrumb, move targets, drawn
|
|
41
|
+
from one team listing with no requests. A file on a cycle is drawn at the
|
|
42
|
+
top; a parent outside the listing is not drawn.
|
|
43
|
+
|
|
9
44
|
## 0.28.1 — 2026-09-22
|
|
10
45
|
|
|
11
46
|
**Nothing a manifest may declare changes, and nothing about how one is read.**
|
package/README.md
CHANGED
|
@@ -252,6 +252,23 @@ input will now draw a "Rename" box under a bare file's card; whether that is
|
|
|
252
252
|
what its card is for is the consumer's call, and the field it sets is the one
|
|
253
253
|
`slots.title.field` names, so the two are one fact either way (PEEK-18).
|
|
254
254
|
|
|
255
|
+
It also declares `move` (a `parent` change; SPEC §6.7). Its value is an
|
|
256
|
+
address, so a text box under a card is the wrong control for it: the object
|
|
257
|
+
names the field in `parentField`, and a consumer drawing property rows keeps
|
|
258
|
+
that one out, as it keeps the title's out, and offers the move where it draws
|
|
259
|
+
the tree.
|
|
260
|
+
|
|
261
|
+
### Nesting
|
|
262
|
+
|
|
263
|
+
`nestingOf(files)` draws a listing's nesting — `roots`, `childrenOf`,
|
|
264
|
+
`ancestorsOf` (a breadcrumb), `parentOf`, `moveTargetsOf` — in memory, from the
|
|
265
|
+
`parentRef` each file already carries. Hand it the whole team listing from
|
|
266
|
+
`resolveFolderContents`, never the answer to a `#a` query: a move is a change
|
|
267
|
+
event whose value no relay indexes, so "what is under X?" asked by tag misses
|
|
268
|
+
every file moved in. A parent outside the listing is not drawn, and a file on a
|
|
269
|
+
cycle is drawn at the top, so every listed file stays reachable and no walk
|
|
270
|
+
loops.
|
|
271
|
+
|
|
255
272
|
## 3. Widgets: draw what you know, degrade honestly
|
|
256
273
|
|
|
257
274
|
`widget` is a *layout hint*, and it may be a single type or an ordered chain:
|
package/dist/index.d.ts
CHANGED
|
@@ -25,6 +25,11 @@
|
|
|
25
25
|
* iframes.
|
|
26
26
|
*/
|
|
27
27
|
export { resolveManifest, resolveForeignObject, resolveForeignEvent, resolveFolderProject, resolveFolderContents, listFolders, KIND_FOLDER_STATE, KIND_CHANNEL_METADATA, KIND_BARE_FILE, BARE_FILE_MANIFEST_ADDRESS, ASPECTS, type Aspect, commentKindsOf, conversationCountsOf, conversationsOf, type ConversationMessage, CONVERSATION_LIMIT, commentDecorationsOf, REACTION_HORIZON, type CommentDecoration, type CommentDecorations, type CommentReaction, type CommentResolution, buildActionEvent, pickWidget, widgetChainProblem, actionProblems, folderOf, MIN_ACTION_DESCRIPTION, CLOSED_WIDGETS, contentFormatOf, BODY_SLOT, CONTENT_FORMAT_TAG, BLOCK_DOCUMENT_FORMAT, type ContentFormat, peopleViaRelay, createProjectionCache, createPeopleCache, MANIFEST_TTL_MS, PROFILE_HIT_TTL_MS, PROFILE_MISS_TTL_MS, type PeopleCache, type PeopleCacheOptions, type ProjectionCache, type ResolvedManifest, type QueryFn, type PeopleFn, type People, type ForeignObject, type FolderProject, type FolderContents, type FolderSummary, type ResolvedSlot, type ResolvedAction, type ActionFormField, type ManifestAction, type ActionEffect, ACTION_EFFECTS, type UnsignedActionEvent, } from './projection.js';
|
|
28
|
+
/**
|
|
29
|
+
* SPEC §6.7's nesting, drawn from one team listing: roots, children,
|
|
30
|
+
* breadcrumbs and move targets, with cycles cut. No requests.
|
|
31
|
+
*/
|
|
32
|
+
export { nestingOf, type Nestable, type Nesting } from './nesting.js';
|
|
28
33
|
/**
|
|
29
34
|
* RFC 0.5 §7's URL grammar — how an object is named in an address bar, and how
|
|
30
35
|
* a pasted link is matched back to one.
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EACrB,WAAW,EACX,iBAAiB,EACjB,qBAAqB,EACrB,cAAc,EACd,0BAA0B,EAC1B,OAAO,EACP,KAAK,MAAM,EACX,cAAc,EACd,oBAAoB,EACpB,eAAe,EACf,KAAK,mBAAmB,EACxB,kBAAkB,EAClB,oBAAoB,EACpB,gBAAgB,EAChB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,gBAAgB,EAChB,UAAU,EACV,kBAAkB,EAClB,cAAc,EACd,QAAQ,EACR,sBAAsB,EACtB,cAAc,EACd,eAAe,EACf,SAAS,EACT,kBAAkB,EAClB,qBAAqB,EACrB,KAAK,aAAa,EAClB,cAAc,EACd,qBAAqB,EACrB,iBAAiB,EACjB,eAAe,EACf,kBAAkB,EAClB,mBAAmB,EACnB,KAAK,WAAW,EAChB,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,OAAO,EACZ,KAAK,QAAQ,EACb,KAAK,MAAM,EACX,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,cAAc,EACd,KAAK,mBAAmB,GACzB,MAAM,iBAAiB,CAAA;AAExB;;;;;;;GAOG;AACH,OAAO,EACL,OAAO,EACP,SAAS,EACT,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,cAAc,EACd,KAAK,UAAU,EACf,KAAK,gBAAgB,GACtB,MAAM,gBAAgB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EACrB,WAAW,EACX,iBAAiB,EACjB,qBAAqB,EACrB,cAAc,EACd,0BAA0B,EAC1B,OAAO,EACP,KAAK,MAAM,EACX,cAAc,EACd,oBAAoB,EACpB,eAAe,EACf,KAAK,mBAAmB,EACxB,kBAAkB,EAClB,oBAAoB,EACpB,gBAAgB,EAChB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,gBAAgB,EAChB,UAAU,EACV,kBAAkB,EAClB,cAAc,EACd,QAAQ,EACR,sBAAsB,EACtB,cAAc,EACd,eAAe,EACf,SAAS,EACT,kBAAkB,EAClB,qBAAqB,EACrB,KAAK,aAAa,EAClB,cAAc,EACd,qBAAqB,EACrB,iBAAiB,EACjB,eAAe,EACf,kBAAkB,EAClB,mBAAmB,EACnB,KAAK,WAAW,EAChB,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,OAAO,EACZ,KAAK,QAAQ,EACb,KAAK,MAAM,EACX,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,cAAc,EACd,KAAK,mBAAmB,GACzB,MAAM,iBAAiB,CAAA;AAExB;;;GAGG;AACH,OAAO,EAAE,SAAS,EAAE,KAAK,QAAQ,EAAE,KAAK,OAAO,EAAE,MAAM,cAAc,CAAA;AAErE;;;;;;;GAOG;AACH,OAAO,EACL,OAAO,EACP,SAAS,EACT,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,cAAc,EACd,KAAK,UAAU,EACf,KAAK,gBAAgB,GACtB,MAAM,gBAAgB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -25,6 +25,11 @@
|
|
|
25
25
|
* iframes.
|
|
26
26
|
*/
|
|
27
27
|
export { resolveManifest, resolveForeignObject, resolveForeignEvent, resolveFolderProject, resolveFolderContents, listFolders, KIND_FOLDER_STATE, KIND_CHANNEL_METADATA, KIND_BARE_FILE, BARE_FILE_MANIFEST_ADDRESS, ASPECTS, commentKindsOf, conversationCountsOf, conversationsOf, CONVERSATION_LIMIT, commentDecorationsOf, REACTION_HORIZON, buildActionEvent, pickWidget, widgetChainProblem, actionProblems, folderOf, MIN_ACTION_DESCRIPTION, CLOSED_WIDGETS, contentFormatOf, BODY_SLOT, CONTENT_FORMAT_TAG, BLOCK_DOCUMENT_FORMAT, peopleViaRelay, createProjectionCache, createPeopleCache, MANIFEST_TTL_MS, PROFILE_HIT_TTL_MS, PROFILE_MISS_TTL_MS, ACTION_EFFECTS, } from './projection.js';
|
|
28
|
+
/**
|
|
29
|
+
* SPEC §6.7's nesting, drawn from one team listing: roots, children,
|
|
30
|
+
* breadcrumbs and move targets, with cycles cut. No requests.
|
|
31
|
+
*/
|
|
32
|
+
export { nestingOf } from './nesting.js';
|
|
28
33
|
/**
|
|
29
34
|
* RFC 0.5 §7's URL grammar — how an object is named in an address bar, and how
|
|
30
35
|
* a pasted link is matched back to one.
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EACrB,WAAW,EACX,iBAAiB,EACjB,qBAAqB,EACrB,cAAc,EACd,0BAA0B,EAC1B,OAAO,EAEP,cAAc,EACd,oBAAoB,EACpB,eAAe,EAEf,kBAAkB,EAClB,oBAAoB,EACpB,gBAAgB,EAKhB,gBAAgB,EAChB,UAAU,EACV,kBAAkB,EAClB,cAAc,EACd,QAAQ,EACR,sBAAsB,EACtB,cAAc,EACd,eAAe,EACf,SAAS,EACT,kBAAkB,EAClB,qBAAqB,EAErB,cAAc,EACd,qBAAqB,EACrB,iBAAiB,EACjB,eAAe,EACf,kBAAkB,EAClB,mBAAmB,EAiBnB,cAAc,GAEf,MAAM,iBAAiB,CAAA;AAExB;;;;;;;GAOG;AACH,OAAO,EACL,OAAO,EACP,SAAS,EACT,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,cAAc,GAGf,MAAM,gBAAgB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EACrB,WAAW,EACX,iBAAiB,EACjB,qBAAqB,EACrB,cAAc,EACd,0BAA0B,EAC1B,OAAO,EAEP,cAAc,EACd,oBAAoB,EACpB,eAAe,EAEf,kBAAkB,EAClB,oBAAoB,EACpB,gBAAgB,EAKhB,gBAAgB,EAChB,UAAU,EACV,kBAAkB,EAClB,cAAc,EACd,QAAQ,EACR,sBAAsB,EACtB,cAAc,EACd,eAAe,EACf,SAAS,EACT,kBAAkB,EAClB,qBAAqB,EAErB,cAAc,EACd,qBAAqB,EACrB,iBAAiB,EACjB,eAAe,EACf,kBAAkB,EAClB,mBAAmB,EAiBnB,cAAc,GAEf,MAAM,iBAAiB,CAAA;AAExB;;;GAGG;AACH,OAAO,EAAE,SAAS,EAA+B,MAAM,cAAc,CAAA;AAErE;;;;;;;GAOG;AACH,OAAO,EACL,OAAO,EACP,SAAS,EACT,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,cAAc,GAGf,MAAM,gBAAgB,CAAA"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Nesting — SPEC §6.7, FOL-4 — drawn from one listing, with no requests.
|
|
3
|
+
*
|
|
4
|
+
* A file names its parent (`ForeignObject.parentRef`); everything a consumer
|
|
5
|
+
* draws from that — which rows are at the top, what opens under a row, the
|
|
6
|
+
* breadcrumb above a file, where it may be moved — is a question about the
|
|
7
|
+
* whole team, and the team's listing (`resolveFolderContents`) is the only
|
|
8
|
+
* read that answers it:
|
|
9
|
+
*
|
|
10
|
+
* - **A move is invisible from the new parent.** Re-parenting is a `kind:1851`
|
|
11
|
+
* change whose `value` is the new parent, and a relay indexes single-letter
|
|
12
|
+
* tags only. "Which files are under X?" asked with `#a: [X]` finds the files
|
|
13
|
+
* *created* under X, still finds the ones moved away, and never finds the
|
|
14
|
+
* ones moved in. The listing folds every change against every file it lists,
|
|
15
|
+
* so its `parentRef` is the current one.
|
|
16
|
+
* - **A breadcrumb costs nothing.** Every ancestor of a file in the team is in
|
|
17
|
+
* the same listing — a sub-file is in its parent's team (SPEC §6.7) — so the
|
|
18
|
+
* chain is walked in memory rather than one request per level.
|
|
19
|
+
*
|
|
20
|
+
* A parent that is not in the listing stops the walk and is not drawn. It is
|
|
21
|
+
* either in another team or something the reader cannot see, and naming it —
|
|
22
|
+
* even as "unavailable" — is the disclosure `resolveFolderContents` exists to
|
|
23
|
+
* avoid.
|
|
24
|
+
*
|
|
25
|
+
* **Cycles are broken here, not refused.** Nothing stops two people writing A
|
|
26
|
+
* under B and B under A, and a relay cannot see the cycle. A file on a cycle is
|
|
27
|
+
* drawn at the top and its parent link is ignored, so every file in the
|
|
28
|
+
* listing stays reachable and no walk loops. A file merely *under* a cycle
|
|
29
|
+
* keeps its parent.
|
|
30
|
+
*/
|
|
31
|
+
/** The three fields nesting reads. `ForeignObject` has all of them. */
|
|
32
|
+
export interface Nestable {
|
|
33
|
+
ref: string;
|
|
34
|
+
address?: string;
|
|
35
|
+
parentRef?: string;
|
|
36
|
+
}
|
|
37
|
+
export interface Nesting<T extends Nestable> {
|
|
38
|
+
/** What the listing draws at the top, in listing order. */
|
|
39
|
+
roots: T[];
|
|
40
|
+
/** The files drawn under `file`, in listing order. Empty for a leaf. */
|
|
41
|
+
childrenOf(file: T): T[];
|
|
42
|
+
/**
|
|
43
|
+
* The chain above `file`, outermost first, not including `file` — a
|
|
44
|
+
* breadcrumb. Empty for a root.
|
|
45
|
+
*/
|
|
46
|
+
ancestorsOf(file: T): T[];
|
|
47
|
+
/** The file this one is drawn under, if any. */
|
|
48
|
+
parentOf(file: T): T | undefined;
|
|
49
|
+
/**
|
|
50
|
+
* Where `file` may be moved: every file in the listing except itself and
|
|
51
|
+
* what is under it, since either would make a cycle. `undefined` in the
|
|
52
|
+
* result means "the top", offered only to a file that has a parent now.
|
|
53
|
+
*/
|
|
54
|
+
moveTargetsOf(file: T): (T | undefined)[];
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* The nesting of one listing.
|
|
58
|
+
*
|
|
59
|
+
* Pure and linear in the listing: a consumer may call it on every render.
|
|
60
|
+
*/
|
|
61
|
+
export declare function nestingOf<T extends Nestable>(files: readonly T[]): Nesting<T>;
|
|
62
|
+
//# sourceMappingURL=nesting.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nesting.d.ts","sourceRoot":"","sources":["../src/nesting.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,uEAAuE;AACvE,MAAM,WAAW,QAAQ;IACvB,GAAG,EAAE,MAAM,CAAA;IACX,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,WAAW,OAAO,CAAC,CAAC,SAAS,QAAQ;IACzC,2DAA2D;IAC3D,KAAK,EAAE,CAAC,EAAE,CAAA;IACV,wEAAwE;IACxE,UAAU,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,EAAE,CAAA;IACxB;;;OAGG;IACH,WAAW,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,EAAE,CAAA;IACzB,gDAAgD;IAChD,QAAQ,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,GAAG,SAAS,CAAA;IAChC;;;;OAIG;IACH,aAAa,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,SAAS,CAAC,EAAE,CAAA;CAC1C;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,CAAC,SAAS,QAAQ,EAAE,KAAK,EAAE,SAAS,CAAC,EAAE,GAAG,OAAO,CAAC,CAAC,CAAC,CAoE7E"}
|
package/dist/nesting.js
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Nesting — SPEC §6.7, FOL-4 — drawn from one listing, with no requests.
|
|
3
|
+
*
|
|
4
|
+
* A file names its parent (`ForeignObject.parentRef`); everything a consumer
|
|
5
|
+
* draws from that — which rows are at the top, what opens under a row, the
|
|
6
|
+
* breadcrumb above a file, where it may be moved — is a question about the
|
|
7
|
+
* whole team, and the team's listing (`resolveFolderContents`) is the only
|
|
8
|
+
* read that answers it:
|
|
9
|
+
*
|
|
10
|
+
* - **A move is invisible from the new parent.** Re-parenting is a `kind:1851`
|
|
11
|
+
* change whose `value` is the new parent, and a relay indexes single-letter
|
|
12
|
+
* tags only. "Which files are under X?" asked with `#a: [X]` finds the files
|
|
13
|
+
* *created* under X, still finds the ones moved away, and never finds the
|
|
14
|
+
* ones moved in. The listing folds every change against every file it lists,
|
|
15
|
+
* so its `parentRef` is the current one.
|
|
16
|
+
* - **A breadcrumb costs nothing.** Every ancestor of a file in the team is in
|
|
17
|
+
* the same listing — a sub-file is in its parent's team (SPEC §6.7) — so the
|
|
18
|
+
* chain is walked in memory rather than one request per level.
|
|
19
|
+
*
|
|
20
|
+
* A parent that is not in the listing stops the walk and is not drawn. It is
|
|
21
|
+
* either in another team or something the reader cannot see, and naming it —
|
|
22
|
+
* even as "unavailable" — is the disclosure `resolveFolderContents` exists to
|
|
23
|
+
* avoid.
|
|
24
|
+
*
|
|
25
|
+
* **Cycles are broken here, not refused.** Nothing stops two people writing A
|
|
26
|
+
* under B and B under A, and a relay cannot see the cycle. A file on a cycle is
|
|
27
|
+
* drawn at the top and its parent link is ignored, so every file in the
|
|
28
|
+
* listing stays reachable and no walk loops. A file merely *under* a cycle
|
|
29
|
+
* keeps its parent.
|
|
30
|
+
*/
|
|
31
|
+
/**
|
|
32
|
+
* The nesting of one listing.
|
|
33
|
+
*
|
|
34
|
+
* Pure and linear in the listing: a consumer may call it on every render.
|
|
35
|
+
*/
|
|
36
|
+
export function nestingOf(files) {
|
|
37
|
+
const byAddress = new Map();
|
|
38
|
+
for (const file of files)
|
|
39
|
+
if (file.address && !byAddress.has(file.address))
|
|
40
|
+
byAddress.set(file.address, file);
|
|
41
|
+
const listedParent = (file) => {
|
|
42
|
+
const parent = file.parentRef ? byAddress.get(file.parentRef) : undefined;
|
|
43
|
+
return parent && parent.ref !== file.ref ? parent : undefined;
|
|
44
|
+
};
|
|
45
|
+
// A file is on a cycle when following parents from it comes back to it.
|
|
46
|
+
// Coloured once per file, so the whole pass is linear.
|
|
47
|
+
const onCycle = new Set();
|
|
48
|
+
const settled = new Set();
|
|
49
|
+
for (const start of files) {
|
|
50
|
+
const path = [];
|
|
51
|
+
const seen = new Map();
|
|
52
|
+
let at = start;
|
|
53
|
+
while (at && !settled.has(at.ref) && !seen.has(at.ref)) {
|
|
54
|
+
seen.set(at.ref, path.length);
|
|
55
|
+
path.push(at);
|
|
56
|
+
at = listedParent(at);
|
|
57
|
+
}
|
|
58
|
+
if (at && seen.has(at.ref)) {
|
|
59
|
+
for (const member of path.slice(seen.get(at.ref)))
|
|
60
|
+
onCycle.add(member.ref);
|
|
61
|
+
}
|
|
62
|
+
for (const walked of path)
|
|
63
|
+
settled.add(walked.ref);
|
|
64
|
+
}
|
|
65
|
+
const parentOf = (file) => (onCycle.has(file.ref) ? undefined : listedParent(file));
|
|
66
|
+
const children = new Map();
|
|
67
|
+
const roots = [];
|
|
68
|
+
for (const file of files) {
|
|
69
|
+
const parent = parentOf(file);
|
|
70
|
+
if (!parent) {
|
|
71
|
+
roots.push(file);
|
|
72
|
+
continue;
|
|
73
|
+
}
|
|
74
|
+
const list = children.get(parent.ref) ?? [];
|
|
75
|
+
list.push(file);
|
|
76
|
+
children.set(parent.ref, list);
|
|
77
|
+
}
|
|
78
|
+
const childrenOf = (file) => children.get(file.ref) ?? [];
|
|
79
|
+
const ancestorsOf = (file) => {
|
|
80
|
+
const chain = [];
|
|
81
|
+
// Terminates: with cycles cut, every walk ends at a root.
|
|
82
|
+
for (let at = parentOf(file); at; at = parentOf(at))
|
|
83
|
+
chain.unshift(at);
|
|
84
|
+
return chain;
|
|
85
|
+
};
|
|
86
|
+
const moveTargetsOf = (file) => {
|
|
87
|
+
const below = new Set([file.ref]);
|
|
88
|
+
const stack = [file];
|
|
89
|
+
while (stack.length) {
|
|
90
|
+
for (const child of childrenOf(stack.pop())) {
|
|
91
|
+
if (below.has(child.ref))
|
|
92
|
+
continue;
|
|
93
|
+
below.add(child.ref);
|
|
94
|
+
stack.push(child);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
// A target needs an address to be named by a `parent` change.
|
|
98
|
+
const targets = files.filter((f) => f.address && !below.has(f.ref));
|
|
99
|
+
return file.parentRef ? [undefined, ...targets.filter((t) => t?.address !== file.parentRef)] : targets;
|
|
100
|
+
};
|
|
101
|
+
return { roots, childrenOf, ancestorsOf, parentOf, moveTarg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AI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAA;IACxG,CAAC,CAAA;IAED,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAA;AACpE,CAAC"}
|
package/dist/projection.d.ts
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* thing the whole exercise argues against.
|
|
14
14
|
*/
|
|
15
15
|
import { type AddressPointer } from '@estiva-app/protocol';
|
|
16
|
-
import { type Profile, type SignedEvent } from '@estiva-app/protocol';
|
|
16
|
+
import { type Imeta, type Profile, type SignedEvent } from '@estiva-app/protocol';
|
|
17
17
|
/** Query the relay. Returns matching events; shape mirrors the HTTP bridge. */
|
|
18
18
|
export type QueryFn = (filters: Record<string, unknown>[]) => Promise<SignedEvent[]>;
|
|
19
19
|
/** An unsigned Nostr event, ready for `sign.ts`. */
|
|
@@ -237,12 +237,25 @@ export interface CommentDecoration {
|
|
|
237
237
|
* The newest `kind:40003` — the body to show, and when. RFC 0.4 §7.2.1: a
|
|
238
238
|
* reader MUST be told the body changed, so this is kept beside the original
|
|
239
239
|
* rather than folded over it; the consumer draws the marker.
|
|
240
|
+
*
|
|
241
|
+
* When the caller passes the target's `body`, `at` and `by` are those of the
|
|
242
|
+
* last edit that **changed** the body — content not byte-identical to the
|
|
243
|
+
* body it replaced — and `edit` is absent when none did (§7.2.1, amended
|
|
244
|
+
* 2026-09-23, CON-5: the mark is about the body). `body` is always the newest
|
|
245
|
+
* edit's content. Without `body` it is the newest edit, as before.
|
|
240
246
|
*/
|
|
241
247
|
edit?: {
|
|
242
248
|
body: string;
|
|
243
249
|
at: number;
|
|
244
250
|
by: string;
|
|
245
251
|
};
|
|
252
|
+
/**
|
|
253
|
+
* The `imeta` set of the newest edit that carries at least one — RFC 0.4
|
|
254
|
+
* §7.2.1 as amended 2026-09-23 (CON-5). A set replaces the target's own; it
|
|
255
|
+
* does not append. Absent when no edit carries one, in which case the
|
|
256
|
+
* target's own attachments stand: an edit with no `imeta` means "unchanged".
|
|
257
|
+
*/
|
|
258
|
+
attachments?: Imeta[];
|
|
246
259
|
/** Every reaction found, in the order the relay holds them. Empty inside the horizon means none. */
|
|
247
260
|
reactions: CommentReaction[];
|
|
248
261
|
/** Oldest first; the last one is the current state. Empty means never resolved. */
|
|
@@ -275,7 +288,8 @@ export interface CommentDecorations {
|
|
|
275
288
|
* Three rules, each from the ticket that established it:
|
|
276
289
|
*
|
|
277
290
|
* - **Edits fold newest-wins** (CON-8). The original stays on the relay and so
|
|
278
|
-
* does every edit; the fold is the reader's, and this is it.
|
|
291
|
+
* does every edit; the fold is the reader's, and this is it. Attachments
|
|
292
|
+
* fold separately (CON-5): the newest edit carrying `imeta` sets them.
|
|
279
293
|
* - **Reactions have a horizon of {@link REACTION_HORIZON} targets** (SPEC
|
|
280
294
|
* §6.6, CON-1) — the *newest* targets by `at`, one budget across whatever
|
|
281
295
|
* id spaces the caller mixes, and the number left out is reported. Edits
|
|
@@ -291,6 +305,7 @@ export interface CommentDecorations {
|
|
|
291
305
|
export declare function commentDecorationsOf(targets: readonly {
|
|
292
306
|
id: string;
|
|
293
307
|
at: number;
|
|
308
|
+
body?: string;
|
|
294
309
|
}[], query: QueryFn): Promise<CommentDecorations>;
|
|
295
310
|
/** How the owning app says its records should be read. */
|
|
296
311
|
interface RecordsRule {
|
|
@@ -987,6 +1002,17 @@ export interface ForeignObject {
|
|
|
987
1002
|
* address cannot be built from it without inventing a pubkey.
|
|
988
1003
|
*/
|
|
989
1004
|
parentRef?: string;
|
|
1005
|
+
/**
|
|
1006
|
+
* The folded field that re-parents this object, when there is one — `parent`
|
|
1007
|
+
* on a bare file (SPEC §6.7), absent for every other kind today (FOL-4).
|
|
1008
|
+
*
|
|
1009
|
+
* **For a consumer that draws field-setting actions as property rows.** The
|
|
1010
|
+
* action setting this field is a move, and its value is an address: drawn as
|
|
1011
|
+
* a text box under a card it asks a person to type `30840:<hex>:<uuid>`. It
|
|
1012
|
+
* is the tree's control, offered where the tree is — the same step aside the
|
|
1013
|
+
* title's rename takes, matched on the field for the same reason.
|
|
1014
|
+
*/
|
|
1015
|
+
parentField?: string;
|
|
990
1016
|
kind: number;
|
|
991
1017
|
/**
|
|
992
1018
|
* The layout hint the owner declared — **a type or an ordered chain of them.**
|
package/dist/projection.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projection.d.ts","sourceRoot":"","sources":["../src/projection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAA0G,KAAK,cAAc,EAAqB,MAAM,sBAAsB,CAAA;AACrL,OAAO,EAAgB,KAAK,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAGnF,+EAA+E;AAC/E,MAAM,MAAM,OAAO,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,KAAK,OAAO,CAAC,WAAW,EAAE,CAAC,CAAA;AAEpF,oDAAoD;AACpD,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,EAAE,MAAM,CAAA;IAClB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,EAAE,EAAE,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;CAChB;AAED;;;;;;;;;;GAUG;AACH,MAAM,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAE5C;;;;;;GAMG;AACH,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;AAE7D,4DAA4D;AAC5D;;;;;GAKG;AACH,eAAO,M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;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC,CA6C1E;AAgHD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,OAAO;AACd,wEAAwE;AACxE,YAAY,CAAC,EAAE,QAAQ;AACvB,6EAA6E;AAC7E,KAAK,CAAC,EAAE,eAAe,GACtB,OAAO,CAAC,cAAc,CAAC,CA0JzB"}
|
package/dist/projection.js
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* thing the whole exercise argues against.
|
|
14
14
|
*/
|
|
15
15
|
import { decodeNaddr, decodeNevent, encodeNaddr, encodeNevent, findNaddrs, pointerToAddress, referenceToPointer } from '@estiva-app/protocol';
|
|
16
|
-
import { parseProfile } from '@estiva-app/protocol';
|
|
16
|
+
import { imetaOf, parseProfile } from '@estiva-app/protocol';
|
|
17
17
|
import { MAX_FILTERS_PER_QUERY, RELAY_PAGE_CEILING } from '@estiva-app/protocol';
|
|
18
18
|
/** The default: one kind:0 query, straight to the relay. */
|
|
19
19
|
/**
|
|
@@ -364,7 +364,8 @@ const DECORATION_TARGETS_PER_FILTER = 100;
|
|
|
364
364
|
* Three rules, each from the ticket that established it:
|
|
365
365
|
*
|
|
366
366
|
* - **Edits fold newest-wins** (CON-8). The original stays on the relay and so
|
|
367
|
-
* does every edit; the fold is the reader's, and this is it.
|
|
367
|
+
* does every edit; the fold is the reader's, and this is it. Attachments
|
|
368
|
+
* fold separately (CON-5): the newest edit carrying `imeta` sets them.
|
|
368
369
|
* - **Reactions have a horizon of {@link REACTION_HORIZON} targets** (SPEC
|
|
369
370
|
* §6.6, CON-1) — the *newest* targets by `at`, one budget across whatever
|
|
370
371
|
* id spaces the caller mixes, and the number left out is reported. Edits
|
|
@@ -409,6 +410,10 @@ export async function commentDecorationsOf(targets, query) {
|
|
|
409
410
|
}
|
|
410
411
|
const seen = new Set();
|
|
411
412
|
const edits = new Map();
|
|
413
|
+
const bodies = new Map();
|
|
414
|
+
for (const t of targets)
|
|
415
|
+
if (t.body !== undefined && !bodies.has(t.id))
|
|
416
|
+
bodies.set(t.id, t.body);
|
|
412
417
|
for (let start = 0; start < filters.length; start += MAX_FILTERS_PER_QUERY) {
|
|
413
418
|
const events = await query(filters.slice(start, start + MAX_FILTERS_PER_QUERY));
|
|
414
419
|
for (const event of events) {
|
|
@@ -425,9 +430,7 @@ export async function commentDecorationsOf(targets, query) {
|
|
|
425
430
|
continue;
|
|
426
431
|
const into = byId[target];
|
|
427
432
|
if (event.kind === KIND_MESSAGE_EDIT) {
|
|
428
|
-
|
|
429
|
-
if (!current || byOrder(current, event) < 0)
|
|
430
|
-
edits.set(target, event);
|
|
433
|
+
edits.set(target, [...(edits.get(target) ?? []), event]);
|
|
431
434
|
}
|
|
432
435
|
else if (event.kind === KIND_REACTION) {
|
|
433
436
|
if (!forReactions.includes(target))
|
|
@@ -452,8 +455,33 @@ export async function commentDecorationsOf(targets, query) {
|
|
|
452
455
|
}
|
|
453
456
|
}
|
|
454
457
|
}
|
|
455
|
-
for (const [target,
|
|
456
|
-
|
|
458
|
+
for (const [target, list] of edits) {
|
|
459
|
+
const ordered = [...list].sort(byOrder);
|
|
460
|
+
const into = byId[target];
|
|
461
|
+
const newest = ordered[ordered.length - 1];
|
|
462
|
+
let body = bodies.get(target);
|
|
463
|
+
if (body === undefined) {
|
|
464
|
+
into.edit = { body: newest.content, at: newest.created_at, by: newest.pubkey };
|
|
465
|
+
}
|
|
466
|
+
else {
|
|
467
|
+
// Replayed from the target's own body, so "byte-identical to the body it
|
|
468
|
+
// replaces" is judged against the body as it then stood.
|
|
469
|
+
let changed;
|
|
470
|
+
for (const edit of ordered) {
|
|
471
|
+
if (edit.content !== body)
|
|
472
|
+
changed = edit;
|
|
473
|
+
body = edit.content;
|
|
474
|
+
}
|
|
475
|
+
if (changed)
|
|
476
|
+
into.edit = { body: newest.content, at: changed.created_at, by: changed.pubkey };
|
|
477
|
+
}
|
|
478
|
+
for (let i = ordered.length - 1; i >= 0; i--) {
|
|
479
|
+
const set = imetaOf(ordered[i]);
|
|
480
|
+
if (set.length > 0) {
|
|
481
|
+
into.attachments = set;
|
|
482
|
+
break;
|
|
483
|
+
}
|
|
484
|
+
}
|
|
457
485
|
}
|
|
458
486
|
const oldestFirst = (a, b) => a.at - b.at || (a.id < b.id ? -1 : 1);
|
|
459
487
|
for (const decoration of Object.values(byId)) {
|
|
@@ -800,6 +828,8 @@ export const KIND_BARE_FILE = 30840;
|
|
|
800
828
|
* should fail loudly rather than find something.
|
|
801
829
|
*/
|
|
802
830
|
export const BARE_FILE_MANIFEST_ADDRESS = 'spec:6.7';
|
|
831
|
+
/** The field a bare file's `kind:1851` re-parent sets (SPEC §6.7). */
|
|
832
|
+
const BARE_FILE_PARENT_FIELD = 'parent';
|
|
803
833
|
const BARE_FILE_MANIFEST = {
|
|
804
834
|
name: 'File',
|
|
805
835
|
about: 'A file no app owns. Its conversation is what every file has; its type adds nothing.',
|
|
@@ -843,8 +873,8 @@ const BARE_FILE_MANIFEST = {
|
|
|
843
873
|
},
|
|
844
874
|
},
|
|
845
875
|
/*
|
|
846
|
-
|
|
847
|
-
of them (FOL-33). A Peek page offering Rename and Delete on a bare file and
|
|
876
|
+
Four actions, and the manifest is the only place a consumer learns of any
|
|
877
|
+
of them (FOL-33; `move` from FOL-4). A Peek page offering Rename and Delete on a bare file and
|
|
848
878
|
nothing on a Ship issue does so because *this* list says `rename` and
|
|
849
879
|
`delete` and Ship's does not — never because the kind is 30840. The rule is
|
|
850
880
|
the one FOL-31 set for `comment`: a control is drawn from a declaration.
|
|
@@ -879,6 +909,23 @@ const BARE_FILE_MANIFEST = {
|
|
|
879
909
|
emits: { kind: 1851, field: 'title' },
|
|
880
910
|
input: { type: 'string' },
|
|
881
911
|
},
|
|
912
|
+
/*
|
|
913
|
+
`move` is the `parent` field SPEC §6.7 already defines, declared so a
|
|
914
|
+
consumer draws the control from here as it draws Rename (FOL-4). The value
|
|
915
|
+
is the new parent's address, or empty for the top of the team. A move
|
|
916
|
+
never changes `h`: nesting organises and never grants access, so a file
|
|
917
|
+
moved under another stays readable by exactly the team it was.
|
|
918
|
+
*/
|
|
919
|
+
{
|
|
920
|
+
id: 'move',
|
|
921
|
+
label: 'Move',
|
|
922
|
+
description: "Put this file under another file in the same team, or back at the top. A change event, so anyone in " +
|
|
923
|
+
'the team may; who can read the file does not change.',
|
|
924
|
+
effect: 'writes',
|
|
925
|
+
appliesTo: [String(KIND_BARE_FILE)],
|
|
926
|
+
emits: { kind: 1851, field: BARE_FILE_PARENT_FIELD },
|
|
927
|
+
input: { type: 'string' },
|
|
928
|
+
},
|
|
882
929
|
{
|
|
883
930
|
id: 'delete',
|
|
884
931
|
label: 'Delete',
|
|
@@ -1571,6 +1618,7 @@ function buildObject(args) {
|
|
|
1571
1618
|
comments: args.comments ?? [],
|
|
1572
1619
|
listsChildren: listsChildrenOf(projection, manifest),
|
|
1573
1620
|
parentRef: parentRefOf(manifest, pointer.kind, root, folded),
|
|
1621
|
+
...(pointer.kind === KIND_BARE_FILE ? { parentField: BARE_FILE_PARENT_FIELD } : {}),
|
|
1574
1622
|
folder: tagValue(root, 'h'),
|
|
1575
1623
|
// Substituted here rather than in the component: `<bech32>` is a NIP-89
|
|
1576
1624
|
// detail, and the widget's job is to draw a link, not to know the spec.
|
|
@@ -1864,9 +1912,12 @@ function parentRefOf(manifest, kind, root, folded = {}) {
|
|
|
1864
1912
|
issue's `project` field works (SPEC §6.7).
|
|
1865
1913
|
*/
|
|
1866
1914
|
if (kind === KIND_BARE_FILE) {
|
|
1867
|
-
|
|
1915
|
+
// A folded empty value is a move to the top, not an absence: falling back
|
|
1916
|
+
// to the root tag would put the file straight back under the parent it
|
|
1917
|
+
// was moved out of (FOL-4).
|
|
1918
|
+
const moved = folded[BARE_FILE_PARENT_FIELD];
|
|
1868
1919
|
if (moved)
|
|
1869
|
-
return moved;
|
|
1920
|
+
return moved.value || undefined;
|
|
1870
1921
|
return root.tags.find((t) => t[0] === 'a' && t[1] && /^\d+:[0-9a-f]{64}:/.test(t[1]))?.[1];
|
|
1871
1922
|
}
|
|
1872
1923
|
for (const [parentKind, projection] of Object.entries(manifest.projections ?? {})) {
|
|
@@ -1987,6 +2038,7 @@ function buildChildObject(args) {
|
|
|
1987
2038
|
// an inconsistent shape is what makes a consumer defensive about a value it
|
|
1988
2039
|
// should be able to trust.
|
|
1989
2040
|
parentRef: parentRefOf(manifest, root.kind, root),
|
|
2041
|
+
...(root.kind === KIND_BARE_FILE ? { parentField: BARE_FILE_PARENT_FIELD } : {}),
|
|
1990
2042
|
folder: tagValue(root, 'h'),
|
|
1991
2043
|
/*
|
|
1992
2044
|
`<bech32>` is whichever form this object actually has.
|