@estiva-app/conversation 0.23.0 → 0.24.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 +55 -0
- package/README.md +3 -2
- package/dist/boxCard.d.ts +25 -6
- package/dist/boxCard.d.ts.map +1 -1
- package/dist/boxCard.js +27 -9
- package/dist/boxCard.js.map +1 -1
- package/dist/composer.d.ts.map +1 -1
- package/dist/composer.js +33 -1
- package/dist/composer.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/openingWords.d.ts +45 -1
- package/dist/openingWords.d.ts.map +1 -1
- package/dist/openingWords.js +83 -17
- package/dist/openingWords.js.map +1 -1
- package/dist/references.d.ts +36 -1
- package/dist/references.d.ts.map +1 -1
- package/dist/references.js +39 -2
- package/dist/references.js.map +1 -1
- package/package.json +1 -1
- package/src/boxCard.ts +38 -9
- package/src/composer.ts +34 -1
- package/src/index.ts +6 -2
- package/src/openingWords.ts +109 -17
- package/src/references.ts +69 -3
package/dist/openingWords.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* A message's opening words, as a caption — what `[`'s row for a comment
|
|
3
|
-
* shows under its author, the same in every app
|
|
3
|
+
* shows under its author, and any preview of a message, the same in every app
|
|
4
|
+
* (PEEKM-6).
|
|
4
5
|
*
|
|
5
6
|
* One line of plain words: marks and line prefixes gone, a link on words as
|
|
6
7
|
* its words, a fenced code block's fences dropped. A `nostr:` reference reads
|
|
@@ -14,9 +15,14 @@
|
|
|
14
15
|
* so the same comment reads the same in an app that has the file loaded and
|
|
15
16
|
* one that does not (Miky, 27 October, PEEKM-6's kickoff).
|
|
16
17
|
*
|
|
18
|
+
* A bare app URL that names a file or a message reads as that reference would
|
|
19
|
+
* (§13.6.2, "A bare app link reads as a reference"), never as the raw URL
|
|
20
|
+
* (Katerina, 30 October, widget review item 20). A URL nothing claims stays
|
|
21
|
+
* as written (§13.1), and so does one in code.
|
|
22
|
+
*
|
|
17
23
|
* why: https://github.com/estiva-app/estiva-docs/blob/main/decisions/a-conversation-is-one-shared-thing-and-only-its-colours-are-the-apps.md
|
|
18
24
|
*/
|
|
19
|
-
import { decodeNpub, parseInlineMarks, referenceToPointer } from '@estiva-app/protocol';
|
|
25
|
+
import { decodeNpub, parseInlineMarks, referenceOfLink, referenceToPointer, urlRunsIn } from '@estiva-app/protocol';
|
|
20
26
|
/** A file's type word by its kind, as `[`'s Files rows name it. */
|
|
21
27
|
const TYPE_WORDS = { 30850: 'Project', 30851: 'Issue', 30840: 'Topic', 30842: 'Document', 39000: 'Folder' };
|
|
22
28
|
const FENCE = /^\s*(?:```|~~~)/;
|
|
@@ -29,6 +35,8 @@ const LINE_PREFIX = /^\s*(?:(?:>|#{1,6})\s+)*(?:(?:[-*+]|\d+[.)])\s+(?:\[[ xX]\]
|
|
|
29
35
|
*/
|
|
30
36
|
const LINK_ON_WORDS = /(?<!!)\[([^[\]\n]+)\]\(((?:https?:\/\/|mailto:)[^\s)]+)\)/g;
|
|
31
37
|
const linkWords = (whole, words, url) => (url.split('(').length > url.split(')').length ? whole : words);
|
|
38
|
+
/** A reference to a file or a message: the ones a caption names by a type word, not by anything its writer typed. */
|
|
39
|
+
const OBJECT_REFERENCE = /^nostr:(?:naddr1|nevent1|note1)/i;
|
|
32
40
|
/** The shortened form §13.1 asks for when a reference names nobody here. */
|
|
33
41
|
function shortened(uri) {
|
|
34
42
|
return `${uri.replace(/^nostr:/i, '').slice(0, 12)}…`;
|
|
@@ -58,29 +66,87 @@ export function referenceWord(uri, nameOf) {
|
|
|
58
66
|
return 'Message';
|
|
59
67
|
return `@${shortened(uri)}`;
|
|
60
68
|
}
|
|
69
|
+
/** A character `text` does not hold, from the private use area. */
|
|
70
|
+
function unusedCharacter(text) {
|
|
71
|
+
for (let code = 0xe000; code <= 0xf8ff; code++) {
|
|
72
|
+
const ch = String.fromCharCode(code);
|
|
73
|
+
if (!text.includes(ch))
|
|
74
|
+
return ch;
|
|
75
|
+
}
|
|
76
|
+
return undefined;
|
|
77
|
+
}
|
|
78
|
+
/** A bare URL as the line reads it: the reference's word in a caption, as written in code or when nothing claims it. */
|
|
79
|
+
function urlWord(url, reading) {
|
|
80
|
+
if (reading.code)
|
|
81
|
+
return url;
|
|
82
|
+
if (reading.mode === 'words')
|
|
83
|
+
return '';
|
|
84
|
+
const reference = reading.resolveLink ? referenceOfLink(url, reading.resolveLink) : undefined;
|
|
85
|
+
return reference ? referenceWord(reference, reading.nameOf) : url;
|
|
86
|
+
}
|
|
87
|
+
/** Each bare URL in a run of plain text, as the line reads it; the rest as it is. */
|
|
88
|
+
function withUrlsRead(text, reading) {
|
|
89
|
+
let out = '';
|
|
90
|
+
let at = 0;
|
|
91
|
+
for (const { url, from, to } of urlRunsIn(text)) {
|
|
92
|
+
out += text.slice(at, from) + urlWord(url, reading);
|
|
93
|
+
at = to;
|
|
94
|
+
}
|
|
95
|
+
return out + text.slice(at);
|
|
96
|
+
}
|
|
97
|
+
/** A `nostr:` reference as the line reads it: its word, or nothing in a message's own words when it names a file or a message. */
|
|
98
|
+
function referenceAs(uri, reading) {
|
|
99
|
+
return reading.mode === 'words' && OBJECT_REFERENCE.test(uri) ? '' : referenceWord(uri, reading.nameOf);
|
|
100
|
+
}
|
|
61
101
|
/**
|
|
62
|
-
* One line's words.
|
|
63
|
-
*
|
|
64
|
-
*
|
|
102
|
+
* One line's words. A bare URL is found in the text the marks leave, as a reader finds it (`urlRunsIn`), and read by
|
|
103
|
+
* {@link urlWord}. A URL written in a link's words names nothing (§13.6.2), so its `://` is broken by a character the
|
|
104
|
+
* line does not hold until the line is read. Protocol's mark reader recurses once per mark, so a line of a few thousand
|
|
105
|
+
* (anyone can post one) overflows the stack; that line then reads as its text with the marker characters dropped,
|
|
106
|
+
* rather than taking down every `[` list that captions it (Peek: Feedback & Bugs 4acb43ac is the reader's own fix).
|
|
65
107
|
*/
|
|
66
|
-
function lineWords(line,
|
|
108
|
+
function lineWords(line, reading) {
|
|
109
|
+
const mark = line.includes('://') ? unusedCharacter(line) : undefined;
|
|
110
|
+
const text = line.replace(LINK_ON_WORDS, (whole, words, url) => {
|
|
111
|
+
const read = linkWords(whole, words, url);
|
|
112
|
+
return read !== whole && mark ? read.replaceAll('://', `:${mark}//`) : read;
|
|
113
|
+
});
|
|
114
|
+
const unmark = (words) => (mark ? words.replaceAll(mark, '') : words);
|
|
67
115
|
try {
|
|
68
|
-
return parseInlineMarks(
|
|
69
|
-
.map((span) => (span.reference ?
|
|
116
|
+
return parseInlineMarks(text)
|
|
117
|
+
.map((span) => (span.reference ? referenceAs(span.reference, reading) : unmark(span.code ? span.text : withUrlsRead(span.text, reading))))
|
|
70
118
|
.join('');
|
|
71
119
|
}
|
|
72
120
|
catch {
|
|
73
|
-
return
|
|
121
|
+
return unmark(withUrlsRead(text.replace(/[*_~`]+/g, ''), reading));
|
|
74
122
|
}
|
|
75
123
|
}
|
|
124
|
+
/** A body's lines on one line, read as `reading` says, a code block's fences dropped. */
|
|
125
|
+
function bodyWords(body, reading) {
|
|
126
|
+
let inCode = false;
|
|
127
|
+
const lines = [];
|
|
128
|
+
for (const line of body.split('\n')) {
|
|
129
|
+
if (FENCE.test(line)) {
|
|
130
|
+
inCode = !inCode;
|
|
131
|
+
continue;
|
|
132
|
+
}
|
|
133
|
+
lines.push(lineWords(line.replace(LINE_PREFIX, ''), { ...reading, code: inCode }));
|
|
134
|
+
}
|
|
135
|
+
return lines.join(' ').replace(/\s+/g, ' ').trim();
|
|
136
|
+
}
|
|
76
137
|
/** A message body's opening words on one line, as a caption: see the module's note. */
|
|
77
|
-
export function openingWords(body, nameOf) {
|
|
78
|
-
return body
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
138
|
+
export function openingWords(body, nameOf, options = {}) {
|
|
139
|
+
return bodyWords(body, { mode: 'caption', nameOf, resolveLink: options.resolveLink });
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* The words a message is found by in `[` (Katerina, 30 October, widget review
|
|
143
|
+
* item 19): what its writer wrote, read as {@link openingWords} reads it, but
|
|
144
|
+
* with no link's raw text — no bare URL, resolved or not — and no type word
|
|
145
|
+
* for a file or a message it names, so typing a file's word finds the file,
|
|
146
|
+
* not every message that links to it. A link on words keeps its words, a
|
|
147
|
+
* person reads as `@Name`, and code is kept as written.
|
|
148
|
+
*/
|
|
149
|
+
export function messageWords(body, nameOf) {
|
|
150
|
+
return bodyWords(body, { mode: 'words', nameOf });
|
|
85
151
|
}
|
|
86
152
|
//# sourceMappingURL=openingWords.js.map
|
package/dist/openingWords.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openingWords.js","sourceRoot":"","sources":["../src/openingWords.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"openingWords.js","sourceRoot":"","sources":["../src/openingWords.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,eAAe,EAAE,kBAAkB,EAAE,SAAS,EAAqB,MAAM,sBAAsB,CAAA;AAEtI,mEAAmE;AACnE,MAAM,UAAU,GAA2B,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAA;AAEnI,MAAM,KAAK,GAAG,iBAAiB,CAAA;AAC/B,kFAAkF;AAClF,MAAM,WAAW,GAAG,oEAAoE,CAAA;AACxF;;;;GAIG;AACH,MAAM,aAAa,GAAG,4DAA4D,CAAA;AAClF,MAAM,SAAS,GAAG,CAAC,KAAa,EAAE,KAAa,EAAE,GAAW,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CA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,YAAY,CAAC,IAAY,EAAE,MAA8C;IACvF,OAAO,SAAS,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAA;AACnD,CAAC"}
|
package/dist/references.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type OpeningWordsOptions } from './openingWords.js';
|
|
1
2
|
/** What a reference names, as the row's type word says it (label objects by type, not app). */
|
|
2
3
|
export type ReferenceType = 'message' | 'issue' | 'project' | 'topic' | 'document';
|
|
3
4
|
/** Something `[` can offer. */
|
|
@@ -18,7 +19,10 @@ export interface ReferenceCandidate {
|
|
|
18
19
|
* none, and on a message. Not matched: search keeps to titles.
|
|
19
20
|
*/
|
|
20
21
|
summary?: string;
|
|
21
|
-
/**
|
|
22
|
+
/**
|
|
23
|
+
* Matched beside `title`: a message's own words ({@link messageWords}), an
|
|
24
|
+
* issue's ref (`CON-33`). A message without it is matched on `caption`.
|
|
25
|
+
*/
|
|
22
26
|
search?: string;
|
|
23
27
|
/** 0 is closest: {@link MESSAGE_TIER} or {@link FILE_TIER}. */
|
|
24
28
|
tier: number;
|
|
@@ -52,6 +56,37 @@ export interface RankedReferences {
|
|
|
52
56
|
messages: ReferenceCandidate[];
|
|
53
57
|
files: ReferenceCandidate[];
|
|
54
58
|
}
|
|
59
|
+
/** One of `[`'s sections, by name: the app gives it its heading. */
|
|
60
|
+
export interface RankedSection {
|
|
61
|
+
name: 'files' | 'messages';
|
|
62
|
+
items: ReferenceCandidate[];
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* {@link rankReferences}' sections in the order `[` draws them: Files, then
|
|
66
|
+
* Messages (Katerina, 2026-10-30), in every app. An empty one is kept: the
|
|
67
|
+
* menu draws no heading for it.
|
|
68
|
+
*/
|
|
69
|
+
export declare function referenceSectionsOf(ranked: RankedReferences): RankedSection[];
|
|
70
|
+
/** A message `[` can offer, as the app holds it. */
|
|
71
|
+
export interface ReferableMessage {
|
|
72
|
+
/** Its event id. */
|
|
73
|
+
id: string;
|
|
74
|
+
/** Its kind, carried in the reference so a reader fetches the right thing: 9 for chat, 1111 for a comment. */
|
|
75
|
+
kind: number;
|
|
76
|
+
/** Who wrote it, as the row names them. */
|
|
77
|
+
author: string;
|
|
78
|
+
body: string;
|
|
79
|
+
/** When it was written, in seconds, or any number that is higher for a newer one. */
|
|
80
|
+
at?: number;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* A message as `[`'s row offers it, the same in every app: its reference
|
|
84
|
+
* (`messageReference`), its author as the title, its opening words as the
|
|
85
|
+
* caption ({@link openingWords}, an app link read as what it names when
|
|
86
|
+
* `resolveLink` has answered for it), and its own words to be found by
|
|
87
|
+
* ({@link messageWords}) — not the raw text of a link in it.
|
|
88
|
+
*/
|
|
89
|
+
export declare function messageCandidate(message: ReferableMessage, tier: number, nameOf: (pubkey: string) => string | undefined, options?: OpeningWordsOptions): ReferenceCandidate;
|
|
55
90
|
export interface RankReferencesInput {
|
|
56
91
|
messages: readonly ReferenceCandidate[];
|
|
57
92
|
files: readonly ReferenceCandidate[];
|
package/dist/references.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"references.d.ts","sourceRoot":"","sources":["../src/references.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"references.d.ts","sourceRoot":"","sources":["../src/references.ts"],"names":[],"mappings":"AA2BA,OAAO,EAA8B,KAAK,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAExF,+FAA+F;AAC/F,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,GAAG,UAAU,CAAA;AAElF,+BAA+B;AAC/B,MAAM,WAAW,kBAAkB;IACjC,gGAAgG;IAChG,EAAE,EAAE,MAAM,CAAA;IACV,iGAAiG;IACjG,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,aAAa,CAAA;IACnB,IAAI,EAAE,MAAM,CAA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D,4DAA4D;IAC5D,SAAS,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAAA;IAC3C;;;;OAIG;IACH,KAAK,IAAI,IAAI,CAAA;CACd;AAED,MAAM,WAAW,sBAAsB;IACrC;;;OAGG;IACH,MAAM,EAAE,iBAAiB,CAAA;IACzB,gEAAgE;IAChE,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,wFAAwF;IACxF,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,8CAA8C;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,eAAe,CAAC,EAAE,MAAM,EAAE,OAAa,EAAE,OAAc,EAAE,SAAa,EAAE,EAAE,sBAAsB,GAAG,eAAe,CAgFjI"}
|
package/dist/references.js
CHANGED
|
@@ -2,12 +2,16 @@
|
|
|
2
2
|
* What `[` offers, and in what order — CON-26's ranking (Miky, 2026-10-02),
|
|
3
3
|
* in one place for every app (PEE-21).
|
|
4
4
|
*
|
|
5
|
-
* Two capped sections,
|
|
5
|
+
* Two capped sections, Files above Messages ({@link referenceSectionsOf};
|
|
6
|
+
* Katerina, 2026-10-30, widget review item 19 — Messages led until then, and
|
|
7
|
+
* typing a file's word picked a message):
|
|
6
8
|
*
|
|
7
|
-
* - **Messages:** this thread or file first, then the parent file's.
|
|
8
9
|
* - **Files:** this Folder first, then files you read recently (your §11 read
|
|
9
10
|
* markers), then everything else, which you reach only by typing (relay
|
|
10
11
|
* search).
|
|
12
|
+
* - **Messages:** this thread or file first, then the parent file's. A message
|
|
13
|
+
* is found by its own words ({@link messageWords}), never by a link's raw
|
|
14
|
+
* text: a row built by {@link messageCandidate} carries them.
|
|
11
15
|
*
|
|
12
16
|
* With nothing typed the tiers set the order. Once you type, a better title
|
|
13
17
|
* match beats a higher tier; an open issue goes before a done or cancelled
|
|
@@ -20,12 +24,45 @@
|
|
|
20
24
|
* markers, a relay search — is the app's: each app holds them differently.
|
|
21
25
|
*/
|
|
22
26
|
import { addrToNaddr } from '@estiva-app/protocol';
|
|
27
|
+
import { messageReference } from './compose.js';
|
|
28
|
+
import { messageWords, openingWords } from './openingWords.js';
|
|
23
29
|
/** Where a message sits relative to the box you are writing in. */
|
|
24
30
|
export const MESSAGE_TIER = { here: 0, parent: 1 };
|
|
25
31
|
/** Where a file sits relative to you. `search` only ever comes from typing. */
|
|
26
32
|
export const FILE_TIER = { folder: 0, recent: 1, search: 2 };
|
|
27
33
|
/** How many rows each section shows (Miky, 2026-10-03): the box stays at the old list's height. */
|
|
28
34
|
export const REFERENCE_CAPS = { messages: 4, files: 6 };
|
|
35
|
+
/**
|
|
36
|
+
* {@link rankReferences}' sections in the order `[` draws them: Files, then
|
|
37
|
+
* Messages (Katerina, 2026-10-30), in every app. An empty one is kept: the
|
|
38
|
+
* menu draws no heading for it.
|
|
39
|
+
*/
|
|
40
|
+
export function referenceSectionsOf(ranked) {
|
|
41
|
+
return [
|
|
42
|
+
{ name: 'files', items: ranked.files },
|
|
43
|
+
{ name: 'messages', items: ranked.messages },
|
|
44
|
+
];
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* A message as `[`'s row offers it, the same in every app: its reference
|
|
48
|
+
* (`messageReference`), its author as the title, its opening words as the
|
|
49
|
+
* caption ({@link openingWords}, an app link read as what it names when
|
|
50
|
+
* `resolveLink` has answered for it), and its own words to be found by
|
|
51
|
+
* ({@link messageWords}) — not the raw text of a link in it.
|
|
52
|
+
*/
|
|
53
|
+
export function messageCandidate(message, tier, nameOf, options = {}) {
|
|
54
|
+
return {
|
|
55
|
+
id: message.id,
|
|
56
|
+
uri: messageReference(message.id, message.kind),
|
|
57
|
+
type: 'message',
|
|
58
|
+
kind: message.kind,
|
|
59
|
+
title: message.author,
|
|
60
|
+
caption: openingWords(message.body, nameOf, options),
|
|
61
|
+
search: messageWords(message.body, nameOf),
|
|
62
|
+
tier,
|
|
63
|
+
...(message.at === undefined ? {} : { at: message.at }),
|
|
64
|
+
};
|
|
65
|
+
}
|
|
29
66
|
const normalize = (text) => text.toLowerCase().replace(/\s+/g, ' ').trim();
|
|
30
67
|
const isWordStart = (text, at) => at === 0 || !/[\p{L}\p{N}]/u.test(text[at - 1]);
|
|
31
68
|
/** The words of `text`: its runs of letters and digits, so `SUM-7.` is `sum`, `7`. */
|
package/dist/references.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"references.js","sourceRoot":"","sources":["../src/references.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAsClD,mEAAmE;AACnE,MAAM,CAAC,MAAM,YAAY,GAAG,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAW,CAAA;AAE3D,+EAA+E;AAC/E,MAAM,CAAC,MAAM,SAAS,GAAG,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAW,CAAA;AAErE,mGAAmG;AACnG,MAAM,CAAC,MAAM,cAAc,GAAG,EAAE,QAAQ,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAW,CAAA;AAsBhE,MAAM,SAAS,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAA;AAElF,MAAM,WAAW,GAAG,CAAC,IAAY,EAAE,EAAU,EAAE,EAAE,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,CAAC,CAAE,CAAC,CAAA;AAElG,sFAAsF;AACtF,MAAM,OAAO,GAAG,CAAC,IAAY,EAAY,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,C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AAE,CAAC;gBAC7B,MAAM,EAAE,CAAA;gBACR,OAAO,EAAE,CAAA;YACX,CAAC;YACD,MAAM,KAAK,GAAG,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;YACjC,IAAI,KAAK;gBAAE,OAAO,KAAK,CAAA;YACvB,IAAI,YAAY,CAAC,KAAK,CAAC,EAAE,CAAC;gBACxB,MAAM,EAAE,CAAA;gBACR,OAAO,EAAE,CAAA;YACX,CAAC;YACD,IAAI,MAAM,EAAE,KAAK,KAAK,KAAK,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC;gBAAE,GAAG,CAAC,KAAK,CAAC,CAAA;YAC7D,KAAK,IAAI,CAAC,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,SAAS,EAAE,CAAC,EAAE,EAAE,CAAC;gBACnD,MAAM,OAAO,GAAG,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAA;gBACtD,IAAI,OAAO;oBAAE,OAAO,OAAO,CAAA;YAC7B,CAAC;YACD,OAAO,EAAE,CAAA;QACX,CAAC;QACD,SAAS,CAAC,QAAQ;YAChB,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;YACvB,OAAO,GAAG,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAA;QACzC,CAAC;QACD,KAAK;YACH,MAAM,EAAE,CAAA;YACR,MAAM,CAAC,KAAK,EAAE,CAAA;YACd,QAAQ,CAAC,KAAK,EAAE,CAAA;QAClB,CAAC;KACF,CAAA;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@estiva-app/conversation",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.24.0",
|
|
4
4
|
"description": "The conversation rules of the Estiva SPEC (§6.2–§6.8, §11): comment and mention strengths, threading, the edit, reaction and attachment folds, NIP-22 comment and reply builders, drafts, NIP-RS read state, membership and unread. A convenience an app adopts, never a requirement.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
package/src/boxCard.ts
CHANGED
|
@@ -9,6 +9,11 @@
|
|
|
9
9
|
* a Folder, a person, a message and the file the conversation is on do not
|
|
10
10
|
* count, a link on words counts by its target, and a plain web link counts
|
|
11
11
|
* for nothing. ✕ takes it off (the box's to keep).
|
|
12
|
+
* - **An edit's card.** The message's own card while the edit still names its
|
|
13
|
+
* file, with its ✕, so it can be seen and taken off there; otherwise the
|
|
14
|
+
* default for a file the edit names first. A card taken off before, with ✕
|
|
15
|
+
* on the sent message, never comes back in an edit (Katerina, 2026-10-30,
|
|
16
|
+
* widget review item 36).
|
|
12
17
|
* - **The live part of each block link**, as the `part` the message will
|
|
13
18
|
* carry, one per file. A part counts as its file and draws instead of a card,
|
|
14
19
|
* so linking an issue and a block of a page shows the block and no card. A
|
|
@@ -21,6 +26,7 @@
|
|
|
21
26
|
* why: https://github.com/estiva-app/estiva-docs/blob/main/decisions/a-link-on-words-counts-toward-the-card.md
|
|
22
27
|
*/
|
|
23
28
|
import {
|
|
29
|
+
cardsIn,
|
|
24
30
|
defaultCardOf,
|
|
25
31
|
toRenderTree,
|
|
26
32
|
valuesIn,
|
|
@@ -41,7 +47,12 @@ export interface BoxLinks {
|
|
|
41
47
|
values: string[]
|
|
42
48
|
/** The block links' parts, one per file, the first link's; none of the conversation's own file. */
|
|
43
49
|
parts: PartPointer[]
|
|
44
|
-
/**
|
|
50
|
+
/**
|
|
51
|
+
* The card under the box, before any ✕: for a new message, the file that
|
|
52
|
+
* gets the default card; for an edit (`folded` given), the message's own
|
|
53
|
+
* card while the edit still names it, else the default for a file the edit
|
|
54
|
+
* names first.
|
|
55
|
+
*/
|
|
45
56
|
card?: string
|
|
46
57
|
/**
|
|
47
58
|
* Every URL the text names, bare or as a link's target, once each: what the
|
|
@@ -59,6 +70,13 @@ export interface BoxLinkContext {
|
|
|
59
70
|
here?: string
|
|
60
71
|
/** An edit's: the values the message named before it, which get no default again. */
|
|
61
72
|
previous?: readonly string[]
|
|
73
|
+
/**
|
|
74
|
+
* An edit's: the message's folded `embed` set (`foldEmbeds`). Its card shows
|
|
75
|
+
* under the box while the edit names its file, and a value it holds as
|
|
76
|
+
* `none` — a card taken off with ✕ after sending — gets no default again,
|
|
77
|
+
* even named afresh.
|
|
78
|
+
*/
|
|
79
|
+
folded?: readonly Embed[]
|
|
62
80
|
}
|
|
63
81
|
|
|
64
82
|
/**
|
|
@@ -70,13 +88,14 @@ export function linkTargetOf(url: string, context: Pick<BoxLinkContext, 'resolve
|
|
|
70
88
|
return context.resolveLink(url) ?? context.blockOf(url)?.address
|
|
71
89
|
}
|
|
72
90
|
|
|
73
|
-
/** What a marker text names, and the one
|
|
91
|
+
/** What a marker text names, and the one card it shows under the box. */
|
|
74
92
|
export function boxLinksOf(text: string, context: BoxLinkContext): BoxLinks {
|
|
75
93
|
// valuesIn asks the resolver about exactly the URLs a reader counts (not one
|
|
76
94
|
// in a code span, nor one in a link's words), so recording its questions
|
|
77
95
|
// gives the URLs without a second URL finder.
|
|
78
96
|
const urls: string[] = []
|
|
79
|
-
const
|
|
97
|
+
const tree = text ? toRenderTree(text, 'marker') : []
|
|
98
|
+
const values = valuesIn(tree, (url) => {
|
|
80
99
|
if (!urls.includes(url)) urls.push(url)
|
|
81
100
|
return context.resolveLink(url)
|
|
82
101
|
})
|
|
@@ -86,7 +105,12 @@ export function boxLinksOf(text: string, context: BoxLinkContext): BoxLinks {
|
|
|
86
105
|
if (part && part.address !== context.here && !parts.has(part.address)) parts.set(part.address, part)
|
|
87
106
|
}
|
|
88
107
|
const kept = [...parts.values()].slice(0, MAX_PARTS)
|
|
89
|
-
const
|
|
108
|
+
const folded = context.folded ?? []
|
|
109
|
+
// The card a reader draws under the message once the edit is saved: the first its folded set holds for what the edit names.
|
|
110
|
+
const current = cardsIn(folded, tree, kept, context.resolveLink).find((embed) => embed.layout !== 'none')?.value
|
|
111
|
+
const takenOff = folded.filter((embed) => embed.layout === 'none').map((embed) => embed.value)
|
|
112
|
+
const previous = takenOff.length > 0 ? [...(context.previous ?? []), ...takenOff] : context.previous
|
|
113
|
+
const card = current ?? defaultCardOf(values, kept, { here: context.here, previous })
|
|
90
114
|
return { values, parts: kept, card, urls }
|
|
91
115
|
}
|
|
92
116
|
|
|
@@ -112,13 +136,18 @@ export function embedsToSend(links: Pick<BoxLinks, 'card'>, removed: ReadonlySet
|
|
|
112
136
|
|
|
113
137
|
/**
|
|
114
138
|
* The `embed` set an edit sends, or undefined to leave the message's as it
|
|
115
|
-
* was.
|
|
116
|
-
*
|
|
117
|
-
* set
|
|
118
|
-
*
|
|
139
|
+
* was. `links` is read with `previous` and `folded`, so its card is the
|
|
140
|
+
* message's own or the default for a file the edit names first. The message's
|
|
141
|
+
* own card, kept, leaves the set as it was; taken off with ✕ in the edit box,
|
|
142
|
+
* it is set `none`. A file named first adds its default; ✕ on that one writes
|
|
143
|
+
* nothing. Either way the whole folded set goes with it, since a set replaces
|
|
144
|
+
* (§13.6.2), and a card removed with ✕, before sending or after, stays removed.
|
|
119
145
|
*/
|
|
120
146
|
export function embedsToEdit(links: Pick<BoxLinks, 'card'>, removed: ReadonlySet<string>, folded: readonly Embed[] | undefined): Embed[] | undefined {
|
|
121
|
-
|
|
147
|
+
if (!links.card) return undefined
|
|
148
|
+
const own = (folded ?? []).some((embed) => embed.value === links.card && embed.layout !== 'none')
|
|
149
|
+
if (removed.has(links.card)) return own ? withCard(folded ?? [], links.card, 'none') : undefined
|
|
150
|
+
return own ? undefined : withCard(folded ?? [], links.card, 'detailed')
|
|
122
151
|
}
|
|
123
152
|
|
|
124
153
|
/** ✕ on a sent message's card: the folded set, with that card `none` and every other kept. */
|
package/src/composer.ts
CHANGED
|
@@ -109,6 +109,39 @@ function chipsAsReferences(node: EditorNode): EditorNode {
|
|
|
109
109
|
return node.content ? { ...node, content: node.content.map(chipsAsReferences) } : node
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
+
/** The chips a message writes as an address: a URL chip or a `nostr:` reference, a person, a message. */
|
|
113
|
+
const ADDRESS_CHIPS = new Set(['reference', 'mention', 'urgentMention', 'captionedReference'])
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Whether text written right after a chip's address would be read as more of
|
|
117
|
+
* it: anything but a space, a sentence's closing punctuation before a space or
|
|
118
|
+
* the end, or a character an address never holds (protocol's `continuesUrl`).
|
|
119
|
+
*/
|
|
120
|
+
const runsOn = (text: string) => text !== '' && !/^(\s|[.,;:!?)\]]+(\s|$))/.test(text) && !/^[<>"'`]/.test(text)
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* A space between a chip and what was typed right after it, where that would
|
|
124
|
+
* run on into its address. "test" typed after a chip with no space was sent as
|
|
125
|
+
* `…/p/<id>test`, which names nothing, and drew as a plain web link (Katerina,
|
|
126
|
+
* 2026-10-30); the box showed the chip, then the word.
|
|
127
|
+
*/
|
|
128
|
+
function spacedAfterChips(node: EditorNode): EditorNode {
|
|
129
|
+
if (!node.content) return node
|
|
130
|
+
const content: EditorNode[] = []
|
|
131
|
+
for (const child of node.content.map(spacedAfterChips)) {
|
|
132
|
+
const last = content[content.length - 1]
|
|
133
|
+
if (last && ADDRESS_CHIPS.has(last.type)) {
|
|
134
|
+
if (child.type === 'text' && child.text !== undefined && runsOn(child.text)) {
|
|
135
|
+
content.push({ ...child, text: ` ${child.text}` })
|
|
136
|
+
continue
|
|
137
|
+
}
|
|
138
|
+
if (ADDRESS_CHIPS.has(child.type)) content.push({ type: 'text', text: ' ' })
|
|
139
|
+
}
|
|
140
|
+
content.push(child)
|
|
141
|
+
}
|
|
142
|
+
return { ...node, content }
|
|
143
|
+
}
|
|
144
|
+
|
|
112
145
|
/**
|
|
113
146
|
* The message a composer's document writes: its marker text, trimmed, and the
|
|
114
147
|
* keys its urgent chips name. A document with no blocks (an edit of a message
|
|
@@ -127,7 +160,7 @@ export function composerText(doc: EditorDocument | EditorNode): ComposerText {
|
|
|
127
160
|
node.content?.forEach(walk)
|
|
128
161
|
}
|
|
129
162
|
walk(doc)
|
|
130
|
-
const text = doc.content?.length ? blockDocumentToMarkerText(fromEditorDocument(chipsAsReferences(doc) as EditorDocument)).trim() : ''
|
|
163
|
+
const text = doc.content?.length ? blockDocumentToMarkerText(fromEditorDocument(chipsAsReferences(spacedAfterChips(doc)) as EditorDocument)).trim() : ''
|
|
131
164
|
return urgent.size > 0 ? { text, urgent: [...urgent] } : { text }
|
|
132
165
|
}
|
|
133
166
|
|
package/src/index.ts
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* apps: it imports no app's data layer, opens no socket, and takes every
|
|
13
13
|
* environment touch — the relay read, the clock, storage — as a parameter.
|
|
14
14
|
*/
|
|
15
|
-
export const CONVERSATION_VERSION = '0.
|
|
15
|
+
export const CONVERSATION_VERSION = '0.24.0'
|
|
16
16
|
|
|
17
17
|
export {
|
|
18
18
|
KIND_MESSAGE,
|
|
@@ -93,13 +93,17 @@ export {
|
|
|
93
93
|
FILE_TIER,
|
|
94
94
|
fileReference,
|
|
95
95
|
MESSAGE_TIER,
|
|
96
|
+
messageCandidate,
|
|
96
97
|
rankReferences,
|
|
97
98
|
REFERENCE_CAPS,
|
|
98
99
|
referenceMatch,
|
|
99
100
|
referenceSearch,
|
|
101
|
+
referenceSectionsOf,
|
|
100
102
|
refMatch,
|
|
101
103
|
type RankedReferences,
|
|
104
|
+
type RankedSection,
|
|
102
105
|
type RankReferencesInput,
|
|
106
|
+
type ReferableMessage,
|
|
103
107
|
type ReferenceCandidate,
|
|
104
108
|
type ReferenceSearch,
|
|
105
109
|
type ReferenceSearchFn,
|
|
@@ -185,7 +189,7 @@ export { peopleNamedInText, newlyNamedPeople, mentionAddsFor, type FileText } fr
|
|
|
185
189
|
|
|
186
190
|
export { KIND_MEMBERSHIP_LIST, namedProfilesOf, rosterOf, byName, mentionablePeople, type NamedProfile } from './people.js'
|
|
187
191
|
|
|
188
|
-
export { openingWords, referenceWord } from './openingWords.js'
|
|
192
|
+
export { messageWords, openingWords, referenceWord, type OpeningWordsOptions } from './openingWords.js'
|
|
189
193
|
|
|
190
194
|
export { archivedLine } from './archivedLine.js'
|
|
191
195
|
|