@geekity/cms 0.28.0 → 0.29.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/README.md +303 -53
- package/admin/pages/comments/all.njk +3 -1
- package/admin/pages/federation/followers.njk +8 -2
- package/dist/admin/comments.d.ts +2 -0
- package/dist/admin/comments.d.ts.map +1 -1
- package/dist/admin/comments.js +19 -49
- package/dist/admin/comments.js.map +1 -1
- package/dist/admin/documents.d.ts +5 -0
- package/dist/admin/documents.d.ts.map +1 -1
- package/dist/admin/documents.js +45 -17
- package/dist/admin/documents.js.map +1 -1
- package/dist/admin/federation.d.ts +21 -1
- package/dist/admin/federation.d.ts.map +1 -1
- package/dist/admin/federation.js +17 -7
- package/dist/admin/federation.js.map +1 -1
- package/dist/admin/store.d.ts +64 -10
- package/dist/admin/store.d.ts.map +1 -1
- package/dist/admin/store.js +166 -17
- package/dist/admin/store.js.map +1 -1
- package/dist/cli.js +2 -2
- package/dist/cli.js.map +1 -1
- package/dist/comments/form.d.ts +3 -1
- package/dist/comments/form.d.ts.map +1 -1
- package/dist/comments/form.js +2 -1
- package/dist/comments/form.js.map +1 -1
- package/dist/comments/index.d.ts +2 -2
- package/dist/comments/index.d.ts.map +1 -1
- package/dist/comments/index.js +1 -1
- package/dist/comments/index.js.map +1 -1
- package/dist/comments/records.d.ts +24 -20
- package/dist/comments/records.d.ts.map +1 -1
- package/dist/comments/records.js +74 -23
- package/dist/comments/records.js.map +1 -1
- package/dist/comments/reply-notices.d.ts +42 -0
- package/dist/comments/reply-notices.d.ts.map +1 -0
- package/dist/comments/reply-notices.js +76 -0
- package/dist/comments/reply-notices.js.map +1 -0
- package/dist/comments/reply-post.d.ts +49 -0
- package/dist/comments/reply-post.d.ts.map +1 -0
- package/dist/comments/reply-post.js +66 -0
- package/dist/comments/reply-post.js.map +1 -0
- package/dist/comments/routes.d.ts +6 -1
- package/dist/comments/routes.d.ts.map +1 -1
- package/dist/comments/routes.js +49 -21
- package/dist/comments/routes.js.map +1 -1
- package/dist/comments/submission.d.ts +8 -25
- package/dist/comments/submission.d.ts.map +1 -1
- package/dist/comments/submission.js +19 -38
- package/dist/comments/submission.js.map +1 -1
- package/dist/comments/viewer.d.ts.map +1 -1
- package/dist/comments/viewer.js +1 -0
- package/dist/comments/viewer.js.map +1 -1
- package/dist/content/citation.d.ts +1 -0
- package/dist/content/citation.d.ts.map +1 -1
- package/dist/content/citation.js +2 -0
- package/dist/content/citation.js.map +1 -1
- package/dist/content/original.d.ts +6 -1
- package/dist/content/original.d.ts.map +1 -1
- package/dist/content/original.js +7 -4
- package/dist/content/original.js.map +1 -1
- package/dist/content/store.d.ts +43 -11
- package/dist/content/store.d.ts.map +1 -1
- package/dist/content/store.js +170 -10
- package/dist/content/store.js.map +1 -1
- package/dist/content/sync.d.ts +8 -0
- package/dist/content/sync.d.ts.map +1 -1
- package/dist/content/sync.js +164 -71
- package/dist/content/sync.js.map +1 -1
- package/dist/federation/article.d.ts.map +1 -1
- package/dist/federation/article.js +2 -1
- package/dist/federation/article.js.map +1 -1
- package/dist/federation/backfill.d.ts +114 -0
- package/dist/federation/backfill.d.ts.map +1 -0
- package/dist/federation/backfill.js +312 -0
- package/dist/federation/backfill.js.map +1 -0
- package/dist/federation/inbox.js +1 -1
- package/dist/federation/inbox.js.map +1 -1
- package/dist/federation/records.d.ts +13 -0
- package/dist/federation/records.d.ts.map +1 -1
- package/dist/federation/records.js +49 -10
- package/dist/federation/records.js.map +1 -1
- package/dist/federation/replies.d.ts +6 -0
- package/dist/federation/replies.d.ts.map +1 -1
- package/dist/federation/replies.js +18 -1
- package/dist/federation/replies.js.map +1 -1
- package/dist/index.d.ts +11 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +79 -10
- package/dist/index.js.map +1 -1
- package/dist/init.d.ts +1 -1
- package/dist/init.d.ts.map +1 -1
- package/dist/init.js +1 -7
- package/dist/init.js.map +1 -1
- package/dist/web/context.d.ts +18 -3
- package/dist/web/context.d.ts.map +1 -1
- package/dist/web/context.js +17 -4
- package/dist/web/context.js.map +1 -1
- package/dist/web/conversation.d.ts +155 -16
- package/dist/web/conversation.d.ts.map +1 -1
- package/dist/web/conversation.js +602 -135
- package/dist/web/conversation.js.map +1 -1
- package/dist/web/documents.d.ts +0 -22
- package/dist/web/documents.d.ts.map +1 -1
- package/dist/web/documents.js +1 -34
- package/dist/web/documents.js.map +1 -1
- package/dist/web/feed-item.d.ts +12 -8
- package/dist/web/feed-item.d.ts.map +1 -1
- package/dist/web/feed-item.js +10 -10
- package/dist/web/feed-item.js.map +1 -1
- package/dist/web/feed-rss.d.ts.map +1 -1
- package/dist/web/feed-rss.js +34 -10
- package/dist/web/feed-rss.js.map +1 -1
- package/dist/web/feed-source.d.ts +30 -1
- package/dist/web/feed-source.d.ts.map +1 -1
- package/dist/web/feed-source.js +25 -0
- package/dist/web/feed-source.js.map +1 -1
- package/dist/web/feeds.d.ts +1 -1
- package/dist/web/feeds.d.ts.map +1 -1
- package/dist/web/feeds.js +7 -2
- package/dist/web/feeds.js.map +1 -1
- package/dist/web/guids.d.ts +59 -0
- package/dist/web/guids.d.ts.map +1 -0
- package/dist/web/guids.js +79 -0
- package/dist/web/guids.js.map +1 -0
- package/dist/web/index.d.ts +5 -6
- package/dist/web/index.d.ts.map +1 -1
- package/dist/web/index.js +3 -3
- package/dist/web/index.js.map +1 -1
- package/dist/web/redirects.d.ts +12 -0
- package/dist/web/redirects.d.ts.map +1 -1
- package/dist/web/redirects.js +16 -4
- package/dist/web/redirects.js.map +1 -1
- package/dist/web/render.d.ts +19 -9
- package/dist/web/render.d.ts.map +1 -1
- package/dist/web/render.js +44 -42
- package/dist/web/render.js.map +1 -1
- package/dist/web/routes.d.ts +2 -2
- package/dist/web/routes.d.ts.map +1 -1
- package/dist/web/routes.js +94 -31
- package/dist/web/routes.js.map +1 -1
- package/dist/webmention/index.d.ts +1 -1
- package/dist/webmention/index.d.ts.map +1 -1
- package/dist/webmention/index.js +1 -1
- package/dist/webmention/index.js.map +1 -1
- package/dist/webmention/links.d.ts +55 -0
- package/dist/webmention/links.d.ts.map +1 -1
- package/dist/webmention/links.js +162 -0
- package/dist/webmention/links.js.map +1 -1
- package/dist/webmention/microformats.d.ts +15 -0
- package/dist/webmention/microformats.d.ts.map +1 -1
- package/dist/webmention/microformats.js +63 -1
- package/dist/webmention/microformats.js.map +1 -1
- package/dist/webmention/pingback.js +2 -1
- package/dist/webmention/pingback.js.map +1 -1
- package/dist/webmention/receive.d.ts +5 -0
- package/dist/webmention/receive.d.ts.map +1 -1
- package/dist/webmention/receive.js +99 -3
- package/dist/webmention/receive.js.map +1 -1
- package/dist/webmention/reply-context.d.ts +15 -0
- package/dist/webmention/reply-context.d.ts.map +1 -1
- package/dist/webmention/reply-context.js +29 -0
- package/dist/webmention/reply-context.js.map +1 -1
- package/dist/webmention/reply-contexts.d.ts +6 -0
- package/dist/webmention/reply-contexts.d.ts.map +1 -1
- package/dist/webmention/reply-contexts.js +16 -10
- package/dist/webmention/reply-contexts.js.map +1 -1
- package/dist/webmention/routes.d.ts.map +1 -1
- package/dist/webmention/routes.js +2 -1
- package/dist/webmention/routes.js.map +1 -1
- package/dist/webmention/service.d.ts +30 -1
- package/dist/webmention/service.d.ts.map +1 -1
- package/dist/webmention/service.js +172 -32
- package/dist/webmention/service.js.map +1 -1
- package/package.json +1 -2
- package/themes/default/README.md +242 -78
- package/themes/default/layouts/base.njk +8 -0
- package/themes/default/layouts/comment.njk +90 -0
- package/themes/default/layouts/front-page.njk +9 -47
- package/themes/default/layouts/page.njk +2 -0
- package/themes/default/layouts/post.njk +14 -2
- package/themes/default/partials/backlinks.njk +19 -0
- package/themes/default/partials/cited-page.njk +3 -1
- package/themes/default/partials/comment-form.njk +10 -0
- package/themes/default/partials/comment.njk +79 -0
- package/themes/default/partials/conversation.njk +14 -59
- package/themes/default/src/style.css +42 -0
- package/themes/default/static/style.css +67 -0
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { User } from '../admin/accounts.ts';
|
|
1
2
|
import type { AdminStore } from '../admin/store.ts';
|
|
2
3
|
import type { Document } from '../content/document.ts';
|
|
3
4
|
import type { CitedPageReader } from '../content/citation.ts';
|
|
@@ -30,11 +31,12 @@ import type { FeedComment } from './feeds.ts';
|
|
|
30
31
|
*
|
|
31
32
|
* `activitypub` is a reply, a like or a boost the site's inbox was sent.
|
|
32
33
|
* `comment` is the form under the post (TASK-50). `webmention` is another
|
|
33
|
-
* site's post pointing at this one (TASK-51).
|
|
34
|
-
*
|
|
35
|
-
*
|
|
34
|
+
* site's post pointing at this one (TASK-51). `post` is a reply post a user of
|
|
35
|
+
* this site wrote, whose `in-reply-to` names the post or something said under
|
|
36
|
+
* it (TASK-300). All four are the same shape and thread together, which is the
|
|
37
|
+
* whole point of naming the source rather than keeping four lists.
|
|
36
38
|
*/
|
|
37
|
-
export type InteractionSource = 'activitypub' | 'comment' | 'webmention';
|
|
39
|
+
export type InteractionSource = 'activitypub' | 'comment' | 'webmention' | 'post';
|
|
38
40
|
/**
|
|
39
41
|
* What an interaction is.
|
|
40
42
|
*
|
|
@@ -71,6 +73,13 @@ export interface InteractionAuthor {
|
|
|
71
73
|
readonly avatar: string | null;
|
|
72
74
|
/** Their id, which is what identifies them however they are named. */
|
|
73
75
|
readonly actorId: string | null;
|
|
76
|
+
/**
|
|
77
|
+
* Where to follow what they publish, when the site knows (TASK-324): a
|
|
78
|
+
* webmention author's h-card or site, or a site user's author feed. A
|
|
79
|
+
* visitor's own website is only what they typed, and a fediverse actor
|
|
80
|
+
* publishes no feed the site knows of, so both are `null`.
|
|
81
|
+
*/
|
|
82
|
+
readonly feed: string | null;
|
|
74
83
|
}
|
|
75
84
|
/** One thing somebody did to a post: a reply, a like or a boost. */
|
|
76
85
|
export interface Interaction {
|
|
@@ -93,7 +102,7 @@ export interface Interaction {
|
|
|
93
102
|
/** Whether a reader may see it. */
|
|
94
103
|
readonly status: InteractionStatus;
|
|
95
104
|
/** The replies to this one, oldest first. */
|
|
96
|
-
readonly replies:
|
|
105
|
+
readonly replies: ThreadReply[];
|
|
97
106
|
/**
|
|
98
107
|
* What a reply that is an RSVP says (TASK-198): its `rsvp` value and the
|
|
99
108
|
* words for it. A webmention carries one, and so does a fediverse answer
|
|
@@ -104,6 +113,21 @@ export interface Interaction {
|
|
|
104
113
|
readonly label: string;
|
|
105
114
|
};
|
|
106
115
|
}
|
|
116
|
+
/**
|
|
117
|
+
* A comment a reader may not see, standing in the thread for the replies to it
|
|
118
|
+
* that a reader may (TASK-325): it is waiting for a moderator, filed as spam or
|
|
119
|
+
* deleted. It names nobody and says nothing, and there is one only while a
|
|
120
|
+
* visible reply sits under it.
|
|
121
|
+
*/
|
|
122
|
+
export interface WithheldReply {
|
|
123
|
+
/** The hidden comment's id, so its anchor on the post is still there. */
|
|
124
|
+
readonly id: string;
|
|
125
|
+
readonly withheld: true;
|
|
126
|
+
/** The replies under it, oldest first, at least one of them visible. */
|
|
127
|
+
readonly replies: ThreadReply[];
|
|
128
|
+
}
|
|
129
|
+
/** One entry of a thread: a reply, or the placeholder for a hidden one. */
|
|
130
|
+
export type ThreadReply = Interaction | WithheldReply;
|
|
107
131
|
/** How many of each a conversation holds. */
|
|
108
132
|
export interface InteractionCounts {
|
|
109
133
|
/** Replies, counted through the whole thread rather than the top of it. */
|
|
@@ -122,7 +146,7 @@ export interface InteractionCounts {
|
|
|
122
146
|
/** Everything under one post. */
|
|
123
147
|
export interface Conversation {
|
|
124
148
|
/** The replies to the post itself, oldest first, each carrying its own. */
|
|
125
|
-
readonly replies:
|
|
149
|
+
readonly replies: ThreadReply[];
|
|
126
150
|
/** The likes, oldest first. */
|
|
127
151
|
readonly likes: Interaction[];
|
|
128
152
|
/** The boosts and the reposts, oldest first and in one list. */
|
|
@@ -145,10 +169,27 @@ export interface RsvpGroup {
|
|
|
145
169
|
/** Each person's latest answer, oldest first, each an RSVP interaction. */
|
|
146
170
|
readonly people: Interaction[];
|
|
147
171
|
}
|
|
172
|
+
/**
|
|
173
|
+
* Something said in a conversation, with the reply it sits under (TASK-324):
|
|
174
|
+
* what the comments feeds name as what it answers.
|
|
175
|
+
*/
|
|
176
|
+
export interface Placed extends Interaction {
|
|
177
|
+
/**
|
|
178
|
+
* The visible reply it answers, or `null` for the post. A hidden comment in
|
|
179
|
+
* between is passed over, the way the thread already passes over a
|
|
180
|
+
* withdrawn note, so a reader walking the feeds reaches every visible reply.
|
|
181
|
+
*/
|
|
182
|
+
readonly parent: Interaction | null;
|
|
183
|
+
}
|
|
148
184
|
/** One interaction with the post it is about, which a site-wide list needs. */
|
|
149
|
-
export interface SiteInteraction extends
|
|
185
|
+
export interface SiteInteraction extends Placed {
|
|
150
186
|
/** The post it answers. */
|
|
151
187
|
readonly post: Document;
|
|
188
|
+
/**
|
|
189
|
+
* Who wrote the reply it answers, when it answers one a reader can see
|
|
190
|
+
* (TASK-318), and `null` for an answer to the post itself.
|
|
191
|
+
*/
|
|
192
|
+
readonly replyingTo: string | null;
|
|
152
193
|
}
|
|
153
194
|
/** What reading a conversation needs: both indexes and the site's origin. */
|
|
154
195
|
export interface ConversationContext {
|
|
@@ -166,6 +207,8 @@ export interface ConversationContext {
|
|
|
166
207
|
readonly contentDir: string;
|
|
167
208
|
/** The site's public origin, for the post's object id. */
|
|
168
209
|
readonly baseUrl: string;
|
|
210
|
+
/** Who may sign in, for naming the author of a reply post (TASK-300). */
|
|
211
|
+
readonly users: () => readonly User[];
|
|
169
212
|
}
|
|
170
213
|
/**
|
|
171
214
|
* The three questions anything showing a conversation asks.
|
|
@@ -180,13 +223,10 @@ export interface ConversationReader {
|
|
|
180
223
|
/** Everything said about one post, threaded. */
|
|
181
224
|
readonly thread: (document: Document) => Conversation;
|
|
182
225
|
/**
|
|
183
|
-
* How many
|
|
184
|
-
*
|
|
185
|
-
*
|
|
186
|
-
*
|
|
187
|
-
* Counted off the indexes rather than by reading each thread, because the
|
|
188
|
-
* number goes into a feed's own validator: a feed whose comment counts moved
|
|
189
|
-
* is a changed feed, and that has to be cheap for every item of a page.
|
|
226
|
+
* How many visible replies answer each of these documents directly, by
|
|
227
|
+
* permalink: what a reader following `source:comments` finds in its
|
|
228
|
+
* `/replies/` feed (TASK-324). Read off each thread, since that is the only
|
|
229
|
+
* reading that knows which replies a reader sees and where they sit.
|
|
190
230
|
*/
|
|
191
231
|
readonly counts: (documents: readonly Document[]) => Map<string, number>;
|
|
192
232
|
/**
|
|
@@ -198,6 +238,93 @@ export interface ConversationReader {
|
|
|
198
238
|
* indexes have paged, so the pages are read until enough survive.
|
|
199
239
|
*/
|
|
200
240
|
readonly latest: (limit: number) => SiteInteraction[];
|
|
241
|
+
/**
|
|
242
|
+
* One native comment as its own page reads it (TASK-318), or `undefined`
|
|
243
|
+
* for an id that names no approved comment written on this site. The post
|
|
244
|
+
* comes back in whatever state it is in, so the page can answer as the post
|
|
245
|
+
* itself would.
|
|
246
|
+
*/
|
|
247
|
+
readonly comment: (id: string) => CommentThread | undefined;
|
|
248
|
+
/**
|
|
249
|
+
* The id of the reply on a post that a URL names, or `undefined` (TASK-319):
|
|
250
|
+
* a comment by its own page or by the post's `#comment-` anchor, a
|
|
251
|
+
* webmention by the page it was sent from, a fediverse reply by its url or
|
|
252
|
+
* its id. Every stored comment counts whatever its status, because what a
|
|
253
|
+
* reply answers is a fact about it, and whether a reader may see the one it
|
|
254
|
+
* answers is decided when the thread is read.
|
|
255
|
+
*/
|
|
256
|
+
readonly replyNamed: (document: Document, url: string) => string | undefined;
|
|
257
|
+
/**
|
|
258
|
+
* What a URL names on this site, while a reader may see it: a reply (a
|
|
259
|
+
* comment by its page or its anchor, a webmention by the page it was sent
|
|
260
|
+
* from, a fediverse reply by its id or url, a reply post by its permalink)
|
|
261
|
+
* with the post it is on, or a served post or page itself (TASK-300,
|
|
262
|
+
* TASK-326). What a reply post answering it cites, instead of fetching a page.
|
|
263
|
+
*/
|
|
264
|
+
readonly heldAt: (url: string) => HeldAt | undefined;
|
|
265
|
+
/**
|
|
266
|
+
* What a `/replies/` segment names and its direct replies (TASK-324), or
|
|
267
|
+
* `undefined`: a key names a served post or page, or a reply a reader can
|
|
268
|
+
* see, by its feed guid; anything else is a native comment's id.
|
|
269
|
+
*/
|
|
270
|
+
readonly repliesTo: (segment: string) => RepliesOf | undefined;
|
|
271
|
+
/**
|
|
272
|
+
* The document whose conversation a URL is in (TASK-320): the post a
|
|
273
|
+
* comment's page or anchor is on, the post a webmention was sent to, the
|
|
274
|
+
* post a fediverse reply answers however deep, or the document at the URL.
|
|
275
|
+
*/
|
|
276
|
+
readonly documentOf: (url: string) => Document | undefined;
|
|
277
|
+
/**
|
|
278
|
+
* Every page in the conversation a document is in that answers something
|
|
279
|
+
* off this site, with what a reader sees under it (TASK-320): what a
|
|
280
|
+
* salmention is sent from. A reply post answers its `in-reply-to`; a
|
|
281
|
+
* comment's own page answers the webmention reply it is under. One
|
|
282
|
+
* answering something here has nobody to tell: this site already knows.
|
|
283
|
+
*/
|
|
284
|
+
readonly upstreams: (document: Document) => Upstream[];
|
|
285
|
+
}
|
|
286
|
+
/** One page of this site's answering a page elsewhere (TASK-320). */
|
|
287
|
+
export interface Upstream {
|
|
288
|
+
/** The document the page is, or that the comment is on. */
|
|
289
|
+
readonly post: Document;
|
|
290
|
+
/** The page, absolute: a reply post's permalink or a comment's own page. */
|
|
291
|
+
readonly source: string;
|
|
292
|
+
/** What it answers, off this site. */
|
|
293
|
+
readonly target: string;
|
|
294
|
+
/** The replies a reader sees under it, as its page prints them. */
|
|
295
|
+
readonly replies: readonly ThreadReply[];
|
|
296
|
+
}
|
|
297
|
+
/** What one `/replies/` feed is about, and what is in it (TASK-324). */
|
|
298
|
+
export interface RepliesOf {
|
|
299
|
+
/** The document whose conversation it is. */
|
|
300
|
+
readonly post: Document;
|
|
301
|
+
/** The reply whose replies these are, or `null` for the document's own. */
|
|
302
|
+
readonly reply: Interaction | null;
|
|
303
|
+
/** The visible replies directly under it, each carrying its own. */
|
|
304
|
+
readonly replies: Placed[];
|
|
305
|
+
}
|
|
306
|
+
/** What {@link ConversationReader.heldAt} found: a reply and the post it is on, or a post. */
|
|
307
|
+
export type HeldAt = {
|
|
308
|
+
readonly kind: 'reply';
|
|
309
|
+
readonly post: Document;
|
|
310
|
+
readonly reply: Interaction;
|
|
311
|
+
} | {
|
|
312
|
+
readonly kind: 'document';
|
|
313
|
+
readonly post: Document;
|
|
314
|
+
readonly author: InteractionAuthor;
|
|
315
|
+
};
|
|
316
|
+
/** A native comment, what it answers and what answers it (TASK-318). */
|
|
317
|
+
export interface CommentThread {
|
|
318
|
+
/** The post it is on. */
|
|
319
|
+
readonly post: Document;
|
|
320
|
+
/** The comment, carrying its replies at every depth as the thread does. */
|
|
321
|
+
readonly comment: Interaction;
|
|
322
|
+
/**
|
|
323
|
+
* What it answers, from the top-level comment down to its parent. `null`
|
|
324
|
+
* is an ancestor a reader may not see: one waiting for a moderator, filed
|
|
325
|
+
* as spam, deleted or withdrawn.
|
|
326
|
+
*/
|
|
327
|
+
readonly ancestors: readonly (Interaction | null)[];
|
|
201
328
|
}
|
|
202
329
|
/**
|
|
203
330
|
* The reader over one site's two indexes.
|
|
@@ -208,6 +335,11 @@ export interface ConversationReader {
|
|
|
208
335
|
* `this`.
|
|
209
336
|
*/
|
|
210
337
|
export declare function createConversation(context: ConversationContext): ConversationReader;
|
|
338
|
+
/**
|
|
339
|
+
* The URLs a reply post can answer a native comment by: its own page, and its
|
|
340
|
+
* anchor on the post at this absolute permalink.
|
|
341
|
+
*/
|
|
342
|
+
export declare function commentNames(id: string, permalink: string, baseUrl: string): string[];
|
|
211
343
|
/**
|
|
212
344
|
* The `id` a comment is anchored at on the page.
|
|
213
345
|
*
|
|
@@ -215,6 +347,8 @@ export declare function createConversation(context: ConversationContext): Conver
|
|
|
215
347
|
* anchor the post's own Markdown produced.
|
|
216
348
|
*/
|
|
217
349
|
export declare function commentAnchor(id: string): string;
|
|
350
|
+
/** The id of the comment whose page a path is, or `undefined` (TASK-319). */
|
|
351
|
+
export declare function commentIdAt(pathname: string): string | undefined;
|
|
218
352
|
/**
|
|
219
353
|
* Everything said in a conversation, at every depth and in no order: the
|
|
220
354
|
* replies and the mentions.
|
|
@@ -224,7 +358,7 @@ export declare function commentAnchor(id: string): string;
|
|
|
224
358
|
* polling a comments feed would get an entry with an empty body and no way to
|
|
225
359
|
* tell what it was for.
|
|
226
360
|
*/
|
|
227
|
-
export declare function spokenIn(conversation: Conversation):
|
|
361
|
+
export declare function spokenIn(conversation: Conversation): Placed[];
|
|
228
362
|
/**
|
|
229
363
|
* Interactions as a comments feed carries them: newest first, at most `limit`,
|
|
230
364
|
* and every link absolute.
|
|
@@ -234,11 +368,16 @@ export declare function spokenIn(conversation: Conversation): Interaction[];
|
|
|
234
368
|
* is handed over as it stands and sanitised by the feed itself, at the last
|
|
235
369
|
* moment before it becomes bytes this site publishes.
|
|
236
370
|
*/
|
|
237
|
-
export declare function feedComments(said: readonly (
|
|
371
|
+
export declare function feedComments(said: readonly (Placed & {
|
|
238
372
|
post?: Document | undefined;
|
|
373
|
+
replyingTo?: string | null | undefined;
|
|
239
374
|
})[], options: {
|
|
240
375
|
baseUrl: string;
|
|
241
376
|
limit: number;
|
|
242
377
|
cited: CitedPageReader;
|
|
378
|
+
post?: Document | undefined;
|
|
243
379
|
}): FeedComment[];
|
|
380
|
+
/** The entry of a thread with this id that a reader can see, at any depth. */
|
|
381
|
+
export declare function visibleReply(replies: readonly ThreadReply[], id: string): Interaction | undefined;
|
|
382
|
+
export declare function isWithheld(reply: ThreadReply): reply is WithheldReply;
|
|
244
383
|
//# sourceMappingURL=conversation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../../src/web/conversation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../../src/web/conversation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;A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