@estiva-app/interop 0.60.0 → 0.62.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 +51 -0
- package/dist/folders.d.ts +4 -2
- package/dist/folders.d.ts.map +1 -1
- package/dist/folders.js +2 -2
- package/dist/folders.js.map +1 -1
- package/dist/objectUrl.d.ts +43 -9
- package/dist/objectUrl.d.ts.map +1 -1
- package/dist/objectUrl.js +94 -19
- package/dist/objectUrl.js.map +1 -1
- package/dist/projection.d.ts +24 -9
- package/dist/projection.d.ts.map +1 -1
- package/dist/projection.js +18 -27
- package/dist/projection.js.map +1 -1
- package/dist/references.d.ts +3 -2
- package/dist/references.d.ts.map +1 -1
- package/dist/references.js +3 -2
- package/dist/references.js.map +1 -1
- package/package.json +1 -1
- package/src/folders.ts +6 -4
- package/src/objectUrl.ts +105 -17
- package/src/projection.ts +43 -37
- package/src/references.ts +3 -2
package/dist/projection.js
CHANGED
|
@@ -697,6 +697,15 @@ export function folderOf(root) {
|
|
|
697
697
|
}
|
|
698
698
|
return tagValue(root, 'h') ?? tagValue(root, 'buzz-channel') ?? null;
|
|
699
699
|
}
|
|
700
|
+
/**
|
|
701
|
+
* {@link ForeignObject.folder}: `h`, then `buzz-channel` (LTX-4) — where a
|
|
702
|
+
* change or a comment on the file goes. Not {@link folderOf}'s `d` fallback for
|
|
703
|
+
* a `kind:39000`: a Folder drawn as a file kept no `folder` before, and
|
|
704
|
+
* consumers gate "start inside" and membership on it.
|
|
705
|
+
*/
|
|
706
|
+
function writeFolderOf(root) {
|
|
707
|
+
return tagValue(root, 'h') ?? tagValue(root, 'buzz-channel');
|
|
708
|
+
}
|
|
700
709
|
/**
|
|
701
710
|
* Does the event carry this tag with this value — on **any** of them?
|
|
702
711
|
*
|
|
@@ -885,13 +894,10 @@ const BARE_FILE_MANIFEST = {
|
|
|
885
894
|
slots: {
|
|
886
895
|
title: { tag: 'title', fold: 'title' },
|
|
887
896
|
/*
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
to an older change. Ship's body slot is the same fold, minus the
|
|
892
|
-
`tag`: a `30840` carries its text in `content`, never in a tag.
|
|
897
|
+
No `body`: a topic is a conversation and has no text (SPEC §6.7,
|
|
898
|
+
2026-10-19), so nothing draws one and no document app lists it.
|
|
899
|
+
why: https://github.com/estiva-app/estiva-docs/blob/main/decisions/a-document-app-writes-what-a-files-app-shares.md
|
|
893
900
|
*/
|
|
894
|
-
body: { fold: 'description', field: 'content' },
|
|
895
901
|
// A bare file may hold bare files — a sub-topic under a topic. Children
|
|
896
902
|
// of *other* kinds are found the other way round, by their own `a`
|
|
897
903
|
// (`parentRefOf` below), which is FOL-4's generic direction; this slot
|
|
@@ -943,7 +949,8 @@ const BARE_FILE_MANIFEST = {
|
|
|
943
949
|
},
|
|
944
950
|
/*
|
|
945
951
|
The manifest is the only place a consumer learns of any of these actions
|
|
946
|
-
(FOL-33; `move` from FOL-4
|
|
952
|
+
(FOL-33; `move` from FOL-4). No `describe`: Leaf 1 added one and LTX took
|
|
953
|
+
it out again, since a topic has no text (SPEC §6.7). A Peek page offering Rename and Delete on a bare file and
|
|
947
954
|
nothing on a Ship issue does so because *this* list says `rename` and
|
|
948
955
|
`delete` and Ship's does not — never because the kind is 30840. The rule is
|
|
949
956
|
the one FOL-31 set for `comment`: a control is drawn from a declaration.
|
|
@@ -978,24 +985,6 @@ const BARE_FILE_MANIFEST = {
|
|
|
978
985
|
emits: { kind: 1851, field: 'title' },
|
|
979
986
|
input: { type: 'string' },
|
|
980
987
|
},
|
|
981
|
-
/*
|
|
982
|
-
`describe` replaces the file's text with a whole §13.3 block document —
|
|
983
|
-
a snapshot, last save wins (SPEC §6.7, decided 2026-10-13; live merging
|
|
984
|
-
between open windows is a later layer). The shape of Ship's
|
|
985
|
-
`describe-issue`, so a consumer that edits one edits both, and finds it
|
|
986
|
-
by `emits.field` rather than by this id. Every save is a full copy, so a
|
|
987
|
-
writer saves on leave, never per keystroke.
|
|
988
|
-
*/
|
|
989
|
-
{
|
|
990
|
-
id: 'describe',
|
|
991
|
-
label: 'Edit',
|
|
992
|
-
description: "Replace this file's text with new text. A change event, so anyone in the Folder may, and every app " +
|
|
993
|
-
'reading the file folds it over the text it was made with; the later save wins.',
|
|
994
|
-
effect: 'writes',
|
|
995
|
-
appliesTo: [String(KIND_BARE_FILE)],
|
|
996
|
-
emits: { kind: 1851, field: 'description' },
|
|
997
|
-
input: { type: 'string', format: BLOCK_DOCUMENT_FORMAT },
|
|
998
|
-
},
|
|
999
988
|
/*
|
|
1000
989
|
`summarize` sets the file's one-line summary (SPEC §6.12): plain text, so
|
|
1001
990
|
its input declares no `format` (§7.3), and a consumer finds it by
|
|
@@ -2358,7 +2347,8 @@ function buildObject(args) {
|
|
|
2358
2347
|
listsChildren: listsChildrenOf(projection, manifest),
|
|
2359
2348
|
parentRef: parentRefOf(manifest, pointer.kind, root, folded),
|
|
2360
2349
|
...parentFieldsOf(manifest, pointer.kind),
|
|
2361
|
-
folder:
|
|
2350
|
+
folder: writeFolderOf(root),
|
|
2351
|
+
scopedTo: tagValue(root, 'h'),
|
|
2362
2352
|
// Substituted here rather than in the component: `<bech32>` is a NIP-89
|
|
2363
2353
|
// detail, and the widget's job is to draw a link, not to know the spec.
|
|
2364
2354
|
openUrl: args.webTemplate?.replace('<bech32>', naddr),
|
|
@@ -3531,7 +3521,8 @@ function buildChildObject(args) {
|
|
|
3531
3521
|
// should be able to trust.
|
|
3532
3522
|
parentRef: parentRefOf(manifest, root.kind, root, folded),
|
|
3533
3523
|
...parentFieldsOf(manifest, root.kind),
|
|
3534
|
-
folder:
|
|
3524
|
+
folder: writeFolderOf(root),
|
|
3525
|
+
scopedTo: tagValue(root, 'h'),
|
|
3535
3526
|
/*
|
|
3536
3527
|
`<bech32>` is whichever form this object actually has.
|
|
3537
3528
|
|