@estiva-app/protocol 0.37.0 → 0.39.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 +36 -0
- package/dist/embeds.d.ts +124 -3
- package/dist/embeds.d.ts.map +1 -1
- package/dist/embeds.js +195 -37
- package/dist/embeds.js.map +1 -1
- package/dist/events.d.ts +10 -0
- package/dist/events.d.ts.map +1 -1
- package/dist/events.js +3 -0
- package/dist/events.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/render.d.ts +5 -5
- package/dist/render.js +5 -5
- package/package.json +1 -1
- package/src/embeds.ts +217 -34
- package/src/events.ts +12 -0
- package/src/index.ts +23 -2
- package/src/render.ts +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,42 @@ Every entry answers the wire question explicitly, including when the answer is
|
|
|
4
4
|
nothing (ADR 0002 §4b). A change to the bytes an app publishes is a MAJOR — in
|
|
5
5
|
`0.x`, a MINOR — even when no TypeScript signature moved.
|
|
6
6
|
|
|
7
|
+
## 0.39.0 — 2026-10-16
|
|
8
|
+
|
|
9
|
+
**Wire behaviour: changed, on edits only** (SPEC §13.6.2; Widgets 2). An edit
|
|
10
|
+
now carries an `embed` layout this writer does not know as it was written
|
|
11
|
+
(`Embed.written`, from `embedsOf`), where 0.38.0 rewrote it as `compact`.
|
|
12
|
+
`defaultCardOf` loses the `embeds` option: a link taken out of a message and
|
|
13
|
+
put back gets its default card again, whichever ✕ removed it (Miky, 16 Oct).
|
|
14
|
+
Reading: `lineDrawOf`'s `row` and `nothing` carry `url` when the line is a URL,
|
|
15
|
+
so a reader that cannot read the file draws the URL, not an empty row. A URL
|
|
16
|
+
right after a letter outside the BMP (`𝑎https://…`) is stuck to that word, as
|
|
17
|
+
after any other Unicode letter or number.
|
|
18
|
+
|
|
19
|
+
## 0.38.0 — 2026-10-16
|
|
20
|
+
|
|
21
|
+
**Wire behaviour: changed — where a link sits decides how it draws in a
|
|
22
|
+
message** (SPEC §13.2, §13.6.2, C21, C26, C27; Widgets 2; record
|
|
23
|
+
where-a-link-sits-decides-how-it-draws). No new tag. Reading: a line that is
|
|
24
|
+
only a reference draws the file's row in place, and draws nothing when that
|
|
25
|
+
file has a card or a part under the message: `lineDrawOf` answers it per line
|
|
26
|
+
(`linesOf`), so Peek and Ship draw by one rule (`isOnlyReferenceLine` and
|
|
27
|
+
`isFolderValue` are its parts; a person or a Folder stays a chip).
|
|
28
|
+
Writing: `defaultCardOf` picks the one file that takes the default
|
|
29
|
+
`["embed", V, "detailed"]` at send or on an edit that names it first; the
|
|
30
|
+
file whose conversation the message is in does not count (Miky, 16 Oct), and
|
|
31
|
+
a value that already has an entry keeps it, so a ✕ after sending holds;
|
|
32
|
+
`withCard` sets one value in a folded set, for ✕ (`none`) or an edit's default;
|
|
33
|
+
`buildEdit` takes `embeds` and `mediaTags`, so an edit can carry the whole
|
|
34
|
+
set, written by `embedTagsOf` (normalised, once per value; a value that is not
|
|
35
|
+
an address or event id throws). Also exported: `valuesIn` (what a body names,
|
|
36
|
+
the count `cardsIn` uses) and `valueOfReference`, which Peek and Ship each
|
|
37
|
+
copied. **Changed:** a bare URL stuck to the end of a word (`seehttps://…`)
|
|
38
|
+
is no longer a link, in `urlRunsIn`, `linksAsReferences` and `cardsIn`, so it
|
|
39
|
+
names nothing and takes no `a`; and `cardsIn` now finds a URL by the same
|
|
40
|
+
rules `linksAsReferences` turns it by, run by run, so the target of a link on
|
|
41
|
+
words (`[the plan](https://…)`) names nothing and draws no card.
|
|
42
|
+
|
|
7
43
|
## 0.37.0 — 2026-10-15
|
|
8
44
|
|
|
9
45
|
**Wire behaviour: new — a comment can anchor to a run of blocks and the words
|
package/dist/embeds.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { PartPointer } from './anchors.js';
|
|
2
|
-
import type { RenderBlock } from './render.js';
|
|
2
|
+
import type { RenderBlock, RenderInline } from './render.js';
|
|
3
3
|
export declare const EMBED_TAG = "embed";
|
|
4
4
|
/** How much of a referenced object a card shows, or `none` for no card. */
|
|
5
5
|
export type EmbedLayout = 'compact' | 'detailed' | 'none';
|
|
@@ -8,9 +8,23 @@ export interface Embed {
|
|
|
8
8
|
/** An address (`kind:pubkey:d`) or a 64-hex event id, lowercase hex. */
|
|
9
9
|
value: string;
|
|
10
10
|
layout: EmbedLayout;
|
|
11
|
+
/**
|
|
12
|
+
* The layout as its tag wrote it, when this reader does not know it (and
|
|
13
|
+
* draws it as `compact`). An edit carries it as written ({@link embedTagsOf}),
|
|
14
|
+
* so a density added later is not rewritten by an older writer.
|
|
15
|
+
*/
|
|
16
|
+
written?: string;
|
|
11
17
|
}
|
|
12
18
|
/** The `embed` tag for one reference. */
|
|
13
19
|
export declare function embedTag(value: string, layout: EmbedLayout): string[];
|
|
20
|
+
/**
|
|
21
|
+
* A whole `embed` set as tags, as a send or an edit writes it: each value
|
|
22
|
+
* normalised as {@link embedsOf} reads it, the first entry per value kept, and
|
|
23
|
+
* a layout this writer does not know carried as it was written (`written`).
|
|
24
|
+
* Throws on a value that is neither an address nor an event id, or on a
|
|
25
|
+
* layout that is neither known nor carried, rather than write a tag readers skip.
|
|
26
|
+
*/
|
|
27
|
+
export declare function embedTagsOf(set: readonly Embed[]): string[][];
|
|
14
28
|
/**
|
|
15
29
|
* The `embed` tags on one event, one per value, in tag order.
|
|
16
30
|
*
|
|
@@ -34,6 +48,11 @@ export declare function embedsOf(event: {
|
|
|
34
48
|
* a real issue's card under a link that does not open it (§7.7).
|
|
35
49
|
*/
|
|
36
50
|
export type LinkResolver = (url: string) => string | undefined;
|
|
51
|
+
/**
|
|
52
|
+
* The address or event id a `nostr:` reference names — what an `a`, `q` or
|
|
53
|
+
* `embed` carries for it — or undefined for a person or something unreadable.
|
|
54
|
+
*/
|
|
55
|
+
export declare function valueOfReference(reference: string): string | undefined;
|
|
37
56
|
/**
|
|
38
57
|
* The cards a message asks for, in the order the body first names them.
|
|
39
58
|
*
|
|
@@ -49,6 +68,107 @@ export type LinkResolver = (url: string) => string | undefined;
|
|
|
49
68
|
* default a reader has for that value. Filter them out to get the cards to draw.
|
|
50
69
|
*/
|
|
51
70
|
export declare function cardsIn(embeds: readonly Embed[], blocks: readonly RenderBlock[], parts?: readonly PartPointer[], resolveLink?: LinkResolver): Embed[];
|
|
71
|
+
/**
|
|
72
|
+
* Every address and event id a message's body names, once each, in the order
|
|
73
|
+
* it first names them: by a `nostr:` reference, or by an app link that
|
|
74
|
+
* `resolveLink` resolves (§7.7). A person names no value. Text in a code span
|
|
75
|
+
* names nothing (§13.1). What {@link cardsIn} and {@link defaultCardOf} count.
|
|
76
|
+
*/
|
|
77
|
+
export declare function valuesIn(blocks: readonly RenderBlock[], resolveLink?: LinkResolver): string[];
|
|
78
|
+
/**
|
|
79
|
+
* A block's lines: its inline runs split at each `\n`, the line break both
|
|
80
|
+
* content models use (§13.2). A run that holds a break is cut in two, marks
|
|
81
|
+
* kept; a reference never holds one.
|
|
82
|
+
*/
|
|
83
|
+
export declare function linesOf(block: Pick<RenderBlock, 'inline'>): RenderInline[][];
|
|
84
|
+
/**
|
|
85
|
+
* What a line of a message is only, by §13.2, or undefined when it is a
|
|
86
|
+
* sentence: the `nostr:` reference, or the bare URL, that §13.6.2 draws in its
|
|
87
|
+
* place. `block` is the block the line is in: only a paragraph's and a list
|
|
88
|
+
* item's lines count, never a quote's, a heading's or code's.
|
|
89
|
+
*
|
|
90
|
+
* Whitespace around it is trimmed. Anything else makes it a sentence: other
|
|
91
|
+
* words or punctuation (trailing `.` included), a second reference, a marker
|
|
92
|
+
* around it, a code span, or `[words](url)`. A person (`npub`, `nprofile`)
|
|
93
|
+
* alone on a line stays a chip, so it is not returned. A Folder stays a chip
|
|
94
|
+
* too, but whether a URL names one is known only once it resolves: the reader
|
|
95
|
+
* checks the value ({@link isFolderValue}). A URL returned here still has to
|
|
96
|
+
* resolve by §7.7; one that resolves to nothing, or to something the reader
|
|
97
|
+
* cannot read, stays the URL as written.
|
|
98
|
+
*/
|
|
99
|
+
export declare function isOnlyReferenceLine(line: readonly RenderInline[], block: Pick<RenderBlock, 'type'>): string | undefined;
|
|
100
|
+
/** A Folder's address (`39000:…`): alone on its line it stays a chip, and it never takes the default card (§13.6.2). */
|
|
101
|
+
export declare function isFolderValue(value: string): boolean;
|
|
102
|
+
/**
|
|
103
|
+
* What one line of a message draws (§13.2, §13.6.2):
|
|
104
|
+
* - `sentence` — its runs as they are, each reference its chip;
|
|
105
|
+
* - `row` — the line is only a reference to `value`, drawn as its row;
|
|
106
|
+
* - `nothing` — the same, but `value` has a card or a part under the message,
|
|
107
|
+
* which stands for it (C26);
|
|
108
|
+
* - `url` — a lone URL that names nothing (no app claims it, or the answer has
|
|
109
|
+
* not come back), drawn as the URL as written;
|
|
110
|
+
* - `unreadable` — a lone `nostr:` reference that names no address or event
|
|
111
|
+
* id, drawn as the unreadable row.
|
|
112
|
+
*/
|
|
113
|
+
export type LineDraw = {
|
|
114
|
+
draw: 'sentence';
|
|
115
|
+
} | {
|
|
116
|
+
draw: 'row' | 'nothing';
|
|
117
|
+
value: string;
|
|
118
|
+
url?: string;
|
|
119
|
+
} | {
|
|
120
|
+
draw: 'url';
|
|
121
|
+
url: string;
|
|
122
|
+
} | {
|
|
123
|
+
draw: 'unreadable';
|
|
124
|
+
reference: string;
|
|
125
|
+
};
|
|
126
|
+
/**
|
|
127
|
+
* How a reader draws one of a message's lines ({@link linesOf}) in `block`:
|
|
128
|
+
* {@link isOnlyReferenceLine}, then the value it names, then whether a card
|
|
129
|
+
* stands for it. `cards` is {@link cardsIn}'s answer (its `none` entries draw
|
|
130
|
+
* no card), `parts` the message's `part` pointers. A Folder alone on its line
|
|
131
|
+
* stays a chip, so its line is a sentence. Whether the reader can read a
|
|
132
|
+
* `row`'s object is its own business. One it cannot read draws the unreadable
|
|
133
|
+
* row when the line is a `nostr:` reference; when the line is a URL (`url` is
|
|
134
|
+
* set) it stays the URL as written, never an empty row (§13.6.2).
|
|
135
|
+
*/
|
|
136
|
+
export declare function lineDrawOf(line: readonly RenderInline[], block: Pick<RenderBlock, 'type'>, context?: {
|
|
137
|
+
cards?: readonly Embed[];
|
|
138
|
+
parts?: readonly PartPointer[];
|
|
139
|
+
resolveLink?: LinkResolver;
|
|
140
|
+
}): LineDraw;
|
|
141
|
+
/**
|
|
142
|
+
* The value a writer gives the default card, `["embed", V, "detailed"]`, as
|
|
143
|
+
* it sends or edits a message (§13.6.2), or undefined.
|
|
144
|
+
*
|
|
145
|
+
* `values` is what the body names, resolved ({@link valuesIn}), and `parts`
|
|
146
|
+
* its `part` pointers. A file counts, except a Folder and `here`, the object
|
|
147
|
+
* whose conversation the message is in (Miky, 2026-10-16: the issue a
|
|
148
|
+
* message is about plus one other file gives the other its card); a part's
|
|
149
|
+
* file counts too. A message (an event id) does not. When exactly one file
|
|
150
|
+
* counts, it gets the card, unless a part names it (the part wins, and draws
|
|
151
|
+
* under the message already).
|
|
152
|
+
*
|
|
153
|
+
* On an edit, pass the values the previous folded body named as `previous`:
|
|
154
|
+
* the default is only for a file the edit names first, so a card its author
|
|
155
|
+
* removed with ✕, which left no tag before sending or `none` after, does not
|
|
156
|
+
* come back while the link stays. A link taken out and put back is named
|
|
157
|
+
* first again and gets its card, whichever ✕ removed it (Miky, 2026-10-16).
|
|
158
|
+
* The edit then carries the whole folded set with this one set to `detailed`
|
|
159
|
+
* ({@link withCard}).
|
|
160
|
+
*/
|
|
161
|
+
export declare function defaultCardOf(values: readonly string[], parts?: readonly PartPointer[], options?: {
|
|
162
|
+
here?: string;
|
|
163
|
+
previous?: readonly string[];
|
|
164
|
+
}): string | undefined;
|
|
165
|
+
/**
|
|
166
|
+
* A folded `embed` set with `value` set to `layout`, the rest kept as they
|
|
167
|
+
* are: what an edit carries, since a set replaces (§13.6.2). ✕ on a sent card
|
|
168
|
+
* is `withCard(set, V, 'none')`; adding an edit's default card is
|
|
169
|
+
* `withCard(set, V, 'detailed')`.
|
|
170
|
+
*/
|
|
171
|
+
export declare function withCard(set: readonly Embed[], value: string, layout: EmbedLayout): Embed[];
|
|
52
172
|
/**
|
|
53
173
|
* The `nostr:` reference an app link names, by what `resolveLink` answered for
|
|
54
174
|
* it (§7.7), or undefined: nothing claims it, the answer has not come back, or
|
|
@@ -70,9 +190,10 @@ export declare function urlRunsIn(text: string): {
|
|
|
70
190
|
}[];
|
|
71
191
|
/**
|
|
72
192
|
* A message's tree with each bare app link turned into the reference it names,
|
|
73
|
-
* so a reader draws it as that object
|
|
193
|
+
* so a reader draws it as a reference to that object (SPEC §13.6.2, OPT-18):
|
|
194
|
+
* its chip in a sentence, its row alone on its line.
|
|
74
195
|
*
|
|
75
|
-
* A
|
|
196
|
+
* A link some app
|
|
76
197
|
* claims (§7.7) is a reference written as a URL — the form a message has when
|
|
77
198
|
* it was written before the composer turned pasted links into chips, or by a
|
|
78
199
|
* client that does not. Without this, the two would read differently for no
|
package/dist/embeds.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"embeds.d.ts","sourceRoot":"","sources":["../src/embeds.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"embeds.d.ts","sourceRoot":"","sources":["../src/embeds.ts"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE5D,eAAO,MAAM,SAAS,UAAU,CAAA;AAEhC,2EAA2E;AAC3E,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,UAAU,GAAG,MAAM,CAAA;AAEzD,6BAA6B;AAC7B,MAAM,WAAW,KAAK;IACpB,wEAAwE;IACxE,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,WAAW,CAAA;IACnB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;C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,CAQ1F;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,EAAE,CAWnF;AAaD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,WAAW,EAAE,EAAE,WAAW,EAAE,YAAY,GAAG,WAAW,EAAE,CA0C1G"}
|
package/dist/embeds.js
CHANGED
|
@@ -8,9 +8,11 @@
|
|
|
8
8
|
* name: `compact` is §7.5's closed `row` and `detailed` its closed `card`, so
|
|
9
9
|
* a richer card can come later without changing the wire.
|
|
10
10
|
*
|
|
11
|
-
* A reference with no `embed`
|
|
12
|
-
*
|
|
13
|
-
*
|
|
11
|
+
* A reference with no `embed` draws by where it sits: its chip in a sentence,
|
|
12
|
+
* its row alone on its line ({@link isOnlyReferenceLine}). A reader never adds
|
|
13
|
+
* a card; the default card is the writer's ({@link defaultCardOf}). An `embed`
|
|
14
|
+
* for a value overrides any default, which is why `none` exists: it is the
|
|
15
|
+
* author saying "no card" in an edit that replaces the set (§6.8).
|
|
14
16
|
*
|
|
15
17
|
* Like `part` (§13.6.1), the tags are only half the answer. A card is drawn
|
|
16
18
|
* only while the body — as edited — still names its value, and there is no
|
|
@@ -26,6 +28,27 @@ export const EMBED_TAG = 'embed';
|
|
|
26
28
|
export function embedTag(value, layout) {
|
|
27
29
|
return [EMBED_TAG, value, layout];
|
|
28
30
|
}
|
|
31
|
+
/**
|
|
32
|
+
* A whole `embed` set as tags, as a send or an edit writes it: each value
|
|
33
|
+
* normalised as {@link embedsOf} reads it, the first entry per value kept, and
|
|
34
|
+
* a layout this writer does not know carried as it was written (`written`).
|
|
35
|
+
* Throws on a value that is neither an address nor an event id, or on a
|
|
36
|
+
* layout that is neither known nor carried, rather than write a tag readers skip.
|
|
37
|
+
*/
|
|
38
|
+
export function embedTagsOf(set) {
|
|
39
|
+
const seen = new Set();
|
|
40
|
+
return set.flatMap((e) => {
|
|
41
|
+
const value = normalise(e.value);
|
|
42
|
+
if (!value)
|
|
43
|
+
throw new Error(`not an address or event id: ${e.value}`);
|
|
44
|
+
if (e.layout !== 'compact' && e.layout !== 'detailed' && e.layout !== 'none')
|
|
45
|
+
throw new Error(`not an embed layout: ${String(e.layout)}`);
|
|
46
|
+
if (seen.has(value))
|
|
47
|
+
return [];
|
|
48
|
+
seen.add(value);
|
|
49
|
+
return [[EMBED_TAG, value, (e.layout === 'compact' && e.written) || e.layout]];
|
|
50
|
+
});
|
|
51
|
+
}
|
|
29
52
|
// `partsOf`'s shape: an empty `d` is a valid address (NIP-01).
|
|
30
53
|
const ADDRESS = /^\d+:[0-9a-f]{64}:/;
|
|
31
54
|
const EVENT_ID = /^[0-9a-f]{64}$/;
|
|
@@ -51,7 +74,8 @@ export function embedsOf(event) {
|
|
|
51
74
|
if (!value || seen.has(value))
|
|
52
75
|
continue;
|
|
53
76
|
seen.add(value);
|
|
54
|
-
|
|
77
|
+
const layout = layoutOf(tag[2]);
|
|
78
|
+
out.push(tag[2] && tag[2] !== layout ? { value, layout, written: tag[2] } : { value, layout });
|
|
55
79
|
}
|
|
56
80
|
return out;
|
|
57
81
|
}
|
|
@@ -68,7 +92,6 @@ function normalise(value) {
|
|
|
68
92
|
return `${kind}:${pubkey.toLowerCase()}:${d.join(':')}`;
|
|
69
93
|
}
|
|
70
94
|
const TRAILING = new Set(['.', ',', ';', ':', '!', '?', ')', ']']);
|
|
71
|
-
const URL_RUN = /https?:\/\/[^\s<>"'`]+/g;
|
|
72
95
|
/** A URL run without the sentence's trailing punctuation; stripped by a loop, which stays linear on a hostile run of dots. */
|
|
73
96
|
function trimUrl(url) {
|
|
74
97
|
let end = url.length;
|
|
@@ -76,12 +99,20 @@ function trimUrl(url) {
|
|
|
76
99
|
end--;
|
|
77
100
|
return url.slice(0, end);
|
|
78
101
|
}
|
|
79
|
-
/**
|
|
80
|
-
function
|
|
81
|
-
|
|
102
|
+
/** A URL stuck to the end of a word (`seehttps://…`) is the word's, not a link. */
|
|
103
|
+
function stuckToWord(text, start) {
|
|
104
|
+
if (start === 0)
|
|
105
|
+
return false;
|
|
106
|
+
// The code point before it, so a letter outside the BMP (a surrogate pair) counts too.
|
|
107
|
+
const pair = start >= 2 && /[\uDC00-\uDFFF]/.test(text[start - 1]) && /[\uD800-\uDBFF]/.test(text[start - 2]);
|
|
108
|
+
const at = pair ? start - 2 : start - 1;
|
|
109
|
+
return /[\p{L}\p{N}]/u.test(String.fromCodePoint(text.codePointAt(at)));
|
|
82
110
|
}
|
|
83
|
-
/**
|
|
84
|
-
|
|
111
|
+
/**
|
|
112
|
+
* The address or event id a `nostr:` reference names — what an `a`, `q` or
|
|
113
|
+
* `embed` carries for it — or undefined for a person or something unreadable.
|
|
114
|
+
*/
|
|
115
|
+
export function valueOfReference(reference) {
|
|
85
116
|
const bare = reference.replace(/^nostr:/i, '').toLowerCase();
|
|
86
117
|
try {
|
|
87
118
|
if (bare.startsWith('naddr1'))
|
|
@@ -120,42 +151,44 @@ export function cardsIn(embeds, blocks, parts = [], resolveLink) {
|
|
|
120
151
|
return [];
|
|
121
152
|
const byValue = new Map(embeds.map((e) => [e.value, e]));
|
|
122
153
|
const withPart = new Set(parts.map((p) => normalise(p.address)).filter((v) => !!v));
|
|
154
|
+
return valuesIn(blocks, resolveLink).flatMap((value) => {
|
|
155
|
+
const embed = withPart.has(value) ? undefined : byValue.get(value);
|
|
156
|
+
return embed ? [embed] : [];
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Every address and event id a message's body names, once each, in the order
|
|
161
|
+
* it first names them: by a `nostr:` reference, or by an app link that
|
|
162
|
+
* `resolveLink` resolves (§7.7). A person names no value. Text in a code span
|
|
163
|
+
* names nothing (§13.1). What {@link cardsIn} and {@link defaultCardOf} count.
|
|
164
|
+
*/
|
|
165
|
+
export function valuesIn(blocks, resolveLink) {
|
|
123
166
|
const out = [];
|
|
124
167
|
const seen = new Set();
|
|
125
168
|
const take = (value) => {
|
|
126
|
-
if (!value || seen.has(value)
|
|
127
|
-
return;
|
|
128
|
-
const embed = byValue.get(value);
|
|
129
|
-
if (!embed)
|
|
169
|
+
if (!value || seen.has(value))
|
|
130
170
|
return;
|
|
131
171
|
seen.add(value);
|
|
132
|
-
out.push(
|
|
133
|
-
};
|
|
134
|
-
// Adjacent plain runs are read as one text, so a link a mark splits in two is still one link.
|
|
135
|
-
const scan = (text) => {
|
|
136
|
-
if (!resolveLink || !text.includes('://'))
|
|
137
|
-
return;
|
|
138
|
-
for (const url of urlsIn(text)) {
|
|
139
|
-
const value = resolveLink(url);
|
|
140
|
-
if (value)
|
|
141
|
-
take(normalise(value));
|
|
142
|
-
}
|
|
172
|
+
out.push(value);
|
|
143
173
|
};
|
|
174
|
+
const resolve = (url) => resolveLink && take(normalise(resolveLink(url) ?? ''));
|
|
175
|
+
// Run by run, by the rules {@link linksAsReferences} turns links by, so a URL names a value exactly where it draws as a reference.
|
|
144
176
|
const walk = (bs) => {
|
|
145
177
|
for (const block of bs) {
|
|
146
178
|
if (block.type !== 'codeBlock') {
|
|
147
|
-
let text = '';
|
|
148
179
|
for (const run of block.inline ?? []) {
|
|
149
|
-
if (run.reference
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
180
|
+
if (run.reference)
|
|
181
|
+
take(valueOfReference(run.reference));
|
|
182
|
+
else if (run.marks.includes('code'))
|
|
183
|
+
continue;
|
|
184
|
+
else if (run.href !== undefined) {
|
|
185
|
+
if (run.text === run.href)
|
|
186
|
+
resolve(run.href);
|
|
154
187
|
}
|
|
155
188
|
else
|
|
156
|
-
|
|
189
|
+
for (const { url } of urlRunsIn(run.text))
|
|
190
|
+
resolve(url);
|
|
157
191
|
}
|
|
158
|
-
scan(text);
|
|
159
192
|
}
|
|
160
193
|
if (block.children)
|
|
161
194
|
walk(block.children);
|
|
@@ -164,6 +197,130 @@ export function cardsIn(embeds, blocks, parts = [], resolveLink) {
|
|
|
164
197
|
walk(blocks);
|
|
165
198
|
return out;
|
|
166
199
|
}
|
|
200
|
+
/**
|
|
201
|
+
* A block's lines: its inline runs split at each `\n`, the line break both
|
|
202
|
+
* content models use (§13.2). A run that holds a break is cut in two, marks
|
|
203
|
+
* kept; a reference never holds one.
|
|
204
|
+
*/
|
|
205
|
+
export function linesOf(block) {
|
|
206
|
+
const lines = [[]];
|
|
207
|
+
for (const run of block.inline ?? []) {
|
|
208
|
+
const pieces = run.reference ? [run.text] : run.text.split('\n');
|
|
209
|
+
pieces.forEach((text, i) => {
|
|
210
|
+
if (i > 0)
|
|
211
|
+
lines.push([]);
|
|
212
|
+
if (text)
|
|
213
|
+
lines[lines.length - 1].push(pieces.length === 1 ? run : { ...run, text });
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
return lines;
|
|
217
|
+
}
|
|
218
|
+
const LONE_URL = /^https?:\/\/[^\s<>"'`]+$/;
|
|
219
|
+
const PERSON = /^nostr:(npub1|nprofile1)/i;
|
|
220
|
+
/**
|
|
221
|
+
* What a line of a message is only, by §13.2, or undefined when it is a
|
|
222
|
+
* sentence: the `nostr:` reference, or the bare URL, that §13.6.2 draws in its
|
|
223
|
+
* place. `block` is the block the line is in: only a paragraph's and a list
|
|
224
|
+
* item's lines count, never a quote's, a heading's or code's.
|
|
225
|
+
*
|
|
226
|
+
* Whitespace around it is trimmed. Anything else makes it a sentence: other
|
|
227
|
+
* words or punctuation (trailing `.` included), a second reference, a marker
|
|
228
|
+
* around it, a code span, or `[words](url)`. A person (`npub`, `nprofile`)
|
|
229
|
+
* alone on a line stays a chip, so it is not returned. A Folder stays a chip
|
|
230
|
+
* too, but whether a URL names one is known only once it resolves: the reader
|
|
231
|
+
* checks the value ({@link isFolderValue}). A URL returned here still has to
|
|
232
|
+
* resolve by §7.7; one that resolves to nothing, or to something the reader
|
|
233
|
+
* cannot read, stays the URL as written.
|
|
234
|
+
*/
|
|
235
|
+
export function isOnlyReferenceLine(line, block) {
|
|
236
|
+
if (block.type !== 'paragraph' && block.type !== 'listItem')
|
|
237
|
+
return undefined;
|
|
238
|
+
const runs = line.filter((run) => run.reference || run.text.trim() !== '');
|
|
239
|
+
if (runs.length !== 1 || runs[0].marks.length > 0 || runs[0].href !== undefined)
|
|
240
|
+
return undefined;
|
|
241
|
+
const [run] = runs;
|
|
242
|
+
if (run.reference)
|
|
243
|
+
return PERSON.test(run.reference) ? undefined : run.reference;
|
|
244
|
+
const text = run.text.trim();
|
|
245
|
+
return LONE_URL.test(text) && trimUrl(text) === text ? text : undefined;
|
|
246
|
+
}
|
|
247
|
+
/** A Folder's address (`39000:…`): alone on its line it stays a chip, and it never takes the default card (§13.6.2). */
|
|
248
|
+
export function isFolderValue(value) {
|
|
249
|
+
return value.startsWith('39000:');
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
252
|
+
* How a reader draws one of a message's lines ({@link linesOf}) in `block`:
|
|
253
|
+
* {@link isOnlyReferenceLine}, then the value it names, then whether a card
|
|
254
|
+
* stands for it. `cards` is {@link cardsIn}'s answer (its `none` entries draw
|
|
255
|
+
* no card), `parts` the message's `part` pointers. A Folder alone on its line
|
|
256
|
+
* stays a chip, so its line is a sentence. Whether the reader can read a
|
|
257
|
+
* `row`'s object is its own business. One it cannot read draws the unreadable
|
|
258
|
+
* row when the line is a `nostr:` reference; when the line is a URL (`url` is
|
|
259
|
+
* set) it stays the URL as written, never an empty row (§13.6.2).
|
|
260
|
+
*/
|
|
261
|
+
export function lineDrawOf(line, block, context = {}) {
|
|
262
|
+
const only = isOnlyReferenceLine(line, block);
|
|
263
|
+
if (!only)
|
|
264
|
+
return { draw: 'sentence' };
|
|
265
|
+
const isReference = /^nostr:/i.test(only);
|
|
266
|
+
const value = isReference ? valueOfReference(only) : normalise(context.resolveLink?.(only) ?? '');
|
|
267
|
+
if (!value)
|
|
268
|
+
return isReference ? { draw: 'unreadable', reference: only } : { draw: 'url', url: only };
|
|
269
|
+
if (isFolderValue(value))
|
|
270
|
+
return { draw: 'sentence' };
|
|
271
|
+
const carded = (context.cards ?? []).some((e) => e.value === value && e.layout !== 'none') ||
|
|
272
|
+
(context.parts ?? []).some((p) => normalise(p.address) === value);
|
|
273
|
+
return { draw: carded ? 'nothing' : 'row', value, ...(isReference ? {} : { url: only }) };
|
|
274
|
+
}
|
|
275
|
+
/**
|
|
276
|
+
* The value a writer gives the default card, `["embed", V, "detailed"]`, as
|
|
277
|
+
* it sends or edits a message (§13.6.2), or undefined.
|
|
278
|
+
*
|
|
279
|
+
* `values` is what the body names, resolved ({@link valuesIn}), and `parts`
|
|
280
|
+
* its `part` pointers. A file counts, except a Folder and `here`, the object
|
|
281
|
+
* whose conversation the message is in (Miky, 2026-10-16: the issue a
|
|
282
|
+
* message is about plus one other file gives the other its card); a part's
|
|
283
|
+
* file counts too. A message (an event id) does not. When exactly one file
|
|
284
|
+
* counts, it gets the card, unless a part names it (the part wins, and draws
|
|
285
|
+
* under the message already).
|
|
286
|
+
*
|
|
287
|
+
* On an edit, pass the values the previous folded body named as `previous`:
|
|
288
|
+
* the default is only for a file the edit names first, so a card its author
|
|
289
|
+
* removed with ✕, which left no tag before sending or `none` after, does not
|
|
290
|
+
* come back while the link stays. A link taken out and put back is named
|
|
291
|
+
* first again and gets its card, whichever ✕ removed it (Miky, 2026-10-16).
|
|
292
|
+
* The edit then carries the whole folded set with this one set to `detailed`
|
|
293
|
+
* ({@link withCard}).
|
|
294
|
+
*/
|
|
295
|
+
export function defaultCardOf(values, parts = [], options = {}) {
|
|
296
|
+
const here = normalise(options.here ?? '');
|
|
297
|
+
const withPart = new Set(parts.map((p) => normalise(p.address)).filter((v) => !!v));
|
|
298
|
+
const isFile = (v) => !!v && ADDRESS.test(v) && !isFolderValue(v) && v !== here;
|
|
299
|
+
const files = new Set([...values.map(normalise), ...withPart].filter(isFile));
|
|
300
|
+
if (files.size !== 1)
|
|
301
|
+
return undefined;
|
|
302
|
+
const [file] = files;
|
|
303
|
+
if (withPart.has(file))
|
|
304
|
+
return undefined;
|
|
305
|
+
if (options.previous?.some((v) => normalise(v) === file))
|
|
306
|
+
return undefined;
|
|
307
|
+
return file;
|
|
308
|
+
}
|
|
309
|
+
/**
|
|
310
|
+
* A folded `embed` set with `value` set to `layout`, the rest kept as they
|
|
311
|
+
* are: what an edit carries, since a set replaces (§13.6.2). ✕ on a sent card
|
|
312
|
+
* is `withCard(set, V, 'none')`; adding an edit's default card is
|
|
313
|
+
* `withCard(set, V, 'detailed')`.
|
|
314
|
+
*/
|
|
315
|
+
export function withCard(set, value, layout) {
|
|
316
|
+
const v = normalise(value);
|
|
317
|
+
if (!v)
|
|
318
|
+
throw new Error(`not an address or event id: ${value}`);
|
|
319
|
+
const out = set.filter((e) => e.value !== v);
|
|
320
|
+
const at = set.findIndex((e) => e.value === v);
|
|
321
|
+
out.splice(at === -1 ? out.length : at, 0, { value: v, layout });
|
|
322
|
+
return out;
|
|
323
|
+
}
|
|
167
324
|
/**
|
|
168
325
|
* The `nostr:` reference an app link names, by what `resolveLink` answered for
|
|
169
326
|
* it (§7.7), or undefined: nothing claims it, the answer has not come back, or
|
|
@@ -193,7 +350,7 @@ export function urlRunsIn(text) {
|
|
|
193
350
|
return [];
|
|
194
351
|
const out = [];
|
|
195
352
|
for (const m of text.matchAll(LINK_OR_URL)) {
|
|
196
|
-
if (m[1])
|
|
353
|
+
if (m[1] || stuckToWord(text, m.index))
|
|
197
354
|
continue;
|
|
198
355
|
const start = m.index;
|
|
199
356
|
if (text.slice(Math.max(0, start - 2), start) === '](' || text[start - 1] === '[')
|
|
@@ -215,9 +372,10 @@ export function urlRunsIn(text) {
|
|
|
215
372
|
const LINK_OR_URL = /(\[[^[\]\n]+\]\((?:https?:\/\/|mailto:)[^\s)]+\))|(https?:\/\/[^\s<>"'`]+)/g;
|
|
216
373
|
/**
|
|
217
374
|
* A message's tree with each bare app link turned into the reference it names,
|
|
218
|
-
* so a reader draws it as that object
|
|
375
|
+
* so a reader draws it as a reference to that object (SPEC §13.6.2, OPT-18):
|
|
376
|
+
* its chip in a sentence, its row alone on its line.
|
|
219
377
|
*
|
|
220
|
-
* A
|
|
378
|
+
* A link some app
|
|
221
379
|
* claims (§7.7) is a reference written as a URL — the form a message has when
|
|
222
380
|
* it was written before the composer turned pasted links into chips, or by a
|
|
223
381
|
* client that does not. Without this, the two would read differently for no
|
|
@@ -251,7 +409,7 @@ export function linksAsReferences(blocks, resolveLink) {
|
|
|
251
409
|
let at = 0;
|
|
252
410
|
for (const m of run.text.matchAll(LINK_OR_URL)) {
|
|
253
411
|
// A link on words: neither its target nor a URL in its words is taken.
|
|
254
|
-
if (m[1])
|
|
412
|
+
if (m[1] || stuckToWord(run.text, m.index))
|
|
255
413
|
continue;
|
|
256
414
|
const start = m.index;
|
|
257
415
|
// A link on words whose words carry a mark arrives split across runs: its target follows `](`, and a URL as its words follows `[`.
|
package/dist/embeds.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"embeds.js","sourceRoot":"","sources":["../src/embeds.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAI5G,MAAM,CAAC,MAAM,SAAS,GAAG,OAAO,CAAA;AAYhC,yCAAyC;AACzC,MAAM,UAAU,QAAQ,CAAC,KAAa,EAAE,MAAmB;IACzD,OAAO,CAAC,SAAS,EAAE,KAAK,EAAE,MAAM,CAAC,CAAA;AACnC,CAAC;AAED,+DAA+D;AAC/D,MAAM,OAAO,GAAG,oBAAoB,CAAA;AACpC,MAAM,QAAQ,GAAG,gBAAgB,CAAA;AAEjC;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,QAAQ,CAAC,KAA+C;IACtE,MAAM,GAAG,GAAY,EAAE,CAAA;IAC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|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type BlockDocument } from './blocks.js';
|
|
2
|
+
import { type Embed } from './embeds.js';
|
|
2
3
|
/** A Nostr tag: an array of strings whose first element is the tag name. */
|
|
3
4
|
export type NostrTag = string[];
|
|
4
5
|
/** An event before signing. `pubkey` is 64-char lowercase hex. */
|
|
@@ -471,6 +472,15 @@ export declare function buildEdit(pubkey: string, createdAtMs: number, args: {
|
|
|
471
472
|
targetEventId: string;
|
|
472
473
|
/** The new body, in the target's own format. */
|
|
473
474
|
body: string;
|
|
475
|
+
/**
|
|
476
|
+
* The message's whole `embed` set after this edit, when the edit changes it
|
|
477
|
+
* (SPEC §13.6.2): a set replaces, so every card it keeps is listed, and
|
|
478
|
+
* `none` for each it removes (`withCard`). Omitted or empty, the edit
|
|
479
|
+
* carries none and leaves the set as it was.
|
|
480
|
+
*/
|
|
481
|
+
embeds?: readonly Embed[];
|
|
482
|
+
/** The whole `imeta` set after this edit, when it changes it; it folds the same way (§6.8). */
|
|
483
|
+
mediaTags?: NostrTag[];
|
|
474
484
|
}): UnsignedEvent;
|
|
475
485
|
/**
|
|
476
486
|
* NIP-10 reply context.
|
package/dist/events.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAoCA,OAAO,EAAE,KAAK,aAAa,EAA0B,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAoCA,OAAO,EAAE,KAAK,aAAa,EAA0B,MAAM,aAAa,CAAA;AACxE,OAAO,EAAE,KAAK,KAAK,EAAe,MAAM,aAAa,CAAA;AAErD,4EAA4E;AAC5E,MAAM,MAAM,QAAQ,GAAG,MAAM,EAAE,CAAA;AAE/B,kEAAkE;AAClE,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,EAAE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