@blogmcp/sdk 0.10.0 → 0.11.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.
Files changed (53) hide show
  1. package/dist/community/channels.d.ts +3 -2
  2. package/dist/community/client.d.ts +129 -2
  3. package/dist/community/client.js +231 -161
  4. package/dist/community/forum.d.ts +82 -0
  5. package/dist/community/forum.js +96 -0
  6. package/dist/community/index.d.ts +14 -7
  7. package/dist/community/index.js +185 -121
  8. package/dist/community/links.d.ts +38 -0
  9. package/dist/community/links.js +98 -71
  10. package/dist/community/messages.cs.d.ts +160 -1
  11. package/dist/community/messages.cs.js +178 -1
  12. package/dist/community/messages.d.ts +19 -1
  13. package/dist/community/messages.en.d.ts +150 -1
  14. package/dist/community/messages.en.js +161 -1
  15. package/dist/community/messages.js +37 -28
  16. package/dist/community/outcome.d.ts +8 -3
  17. package/dist/community/outcome.js +64 -20
  18. package/dist/community/poll.d.ts +28 -4
  19. package/dist/community/poll.js +70 -47
  20. package/dist/community/realtime/index.d.ts +19 -3
  21. package/dist/community/realtime/index.js +175 -145
  22. package/dist/community/routes.d.ts +36 -1
  23. package/dist/community/routes.js +51 -21
  24. package/dist/community/server/bff.d.ts +25 -2
  25. package/dist/community/server/bff.js +135 -118
  26. package/dist/community/server/host-routes.d.ts +3 -0
  27. package/dist/community/server/host-routes.js +17 -0
  28. package/dist/community/server/index.d.ts +5 -1
  29. package/dist/community/shapes.d.ts +634 -7
  30. package/dist/community/shapes.js +92 -61
  31. package/dist/community/store.d.ts +15 -0
  32. package/dist/community/store.js +65 -61
  33. package/dist/community/topic.d.ts +173 -0
  34. package/dist/community/topic.js +225 -0
  35. package/package.json +3 -3
  36. package/src/community/channels.ts +3 -2
  37. package/src/community/client.ts +209 -5
  38. package/src/community/forum.ts +209 -0
  39. package/src/community/index.ts +146 -2
  40. package/src/community/links.ts +64 -4
  41. package/src/community/messages.cs.ts +179 -1
  42. package/src/community/messages.en.ts +162 -1
  43. package/src/community/messages.ts +25 -2
  44. package/src/community/outcome.ts +50 -1
  45. package/src/community/poll.ts +79 -17
  46. package/src/community/realtime/index.ts +124 -48
  47. package/src/community/routes.ts +42 -1
  48. package/src/community/server/bff.ts +89 -30
  49. package/src/community/server/host-routes.ts +20 -0
  50. package/src/community/server/index.ts +5 -1
  51. package/src/community/shapes.ts +662 -6
  52. package/src/community/store.ts +11 -5
  53. package/src/community/topic.ts +521 -0
@@ -0,0 +1,96 @@
1
+ import { COMMUNITY_TOPIC_TITLE_MAX as c, COMMUNITY_SEARCH_QUERY_MIN as a, COMMUNITY_SEARCH_QUERY_MAX as y, COMMUNITY_SEARCH_PAGES_MAX as d } from "./routes.js";
2
+ import { isKnownBrakeSurface as s } from "./shapes.js";
3
+ const t = (n) => typeof n == "object" && n !== null && !Array.isArray(n), u = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
4
+ function p(n, e) {
5
+ if (typeof e != "string" || !u.test(e)) return null;
6
+ const r = e.toLowerCase();
7
+ return n === "conversation" ? Object.freeze({ conversationId: r }) : n === "category" ? Object.freeze({ categoryId: r }) : null;
8
+ }
9
+ function g(n) {
10
+ if (!t(n)) return null;
11
+ const { conversationId: e, categoryId: r } = n;
12
+ return typeof e == "string" && r === void 0 && u.test(e) ? Object.freeze({ kind: "conversation", id: e.toLowerCase() }) : typeof r == "string" && e === void 0 && u.test(r) ? Object.freeze({ kind: "category", id: r.toLowerCase() }) : null;
13
+ }
14
+ function b(n) {
15
+ if (!t(n)) return null;
16
+ if ("targetKind" in n) {
17
+ const r = p(n.targetKind, n.targetId);
18
+ return r === null ? null : b(r);
19
+ }
20
+ const e = g(n);
21
+ return e === null ? null : `${e.kind}:${e.id}`;
22
+ }
23
+ const l = (n) => n.replace(/\s+/gu, " ").trim();
24
+ function O(n) {
25
+ if (typeof n != "string") return 0;
26
+ const e = l(n);
27
+ return Math.max(e.length, [...e.normalize("NFC")].length);
28
+ }
29
+ function T(n) {
30
+ if (typeof n != "string") return null;
31
+ const e = l(n), r = O(e);
32
+ return r >= 1 && r <= c ? e : null;
33
+ }
34
+ function _(n) {
35
+ if (typeof n != "string") return null;
36
+ const e = n.replace(/\s+/gu, " ").trim();
37
+ return [...e].length >= a && e.length <= y ? e : null;
38
+ }
39
+ function m(n) {
40
+ if (!t(n) || n.hasMore !== !0) return null;
41
+ const e = n.page;
42
+ return typeof e != "number" || !Number.isSafeInteger(e) || e < 1 || e >= d ? null : e + 1;
43
+ }
44
+ function I(n) {
45
+ return !t(n) || typeof n.conversationId != "string" ? !1 : n.kind === "topic" ? !0 : n.kind === "article" && typeof n.articleId == "string";
46
+ }
47
+ function S(n) {
48
+ return Array.isArray(n) ? n.filter(I) : [];
49
+ }
50
+ const C = Object.freeze({
51
+ forum: "forum",
52
+ article_discussions: "articleDiscussions"
53
+ }), i = (n) => typeof n == "string" ? n : "";
54
+ function k(n) {
55
+ if (!t(n)) return null;
56
+ const e = t(n.brake) && typeof n.brake.until == "string" ? n.brake : null;
57
+ return Object.freeze({
58
+ enabled: n.enabled === !0,
59
+ brake: e === null ? null : Object.freeze({ kind: i(e.kind), until: i(e.until), reasonCode: i(e.reasonCode) })
60
+ });
61
+ }
62
+ function h(n, e) {
63
+ return !t(n) || !t(n.surfaces) || !s(e) ? null : k(n.surfaces[C[e]]);
64
+ }
65
+ function w(n, e = Date.now()) {
66
+ if (!t(n) || !t(n.away)) return null;
67
+ const r = n.away.until;
68
+ if (typeof r != "string") return null;
69
+ const o = Date.parse(r);
70
+ return Number.isFinite(o) && o > e ? Object.freeze({ until: r }) : null;
71
+ }
72
+ function E(n, e) {
73
+ if (!t(n) || !t(n.moderator) || typeof e != "string" || e === "") return !1;
74
+ const r = n.moderator.categoryIds;
75
+ if (!Array.isArray(r)) return !1;
76
+ const o = e.toLowerCase();
77
+ return r.some((f) => typeof f == "string" && f.toLowerCase() === o);
78
+ }
79
+ function j(n) {
80
+ return !t(n) || n.code !== "braked" ? null : s(n.surface) ? n.surface : null;
81
+ }
82
+ export {
83
+ j as brakedSurfaceOf,
84
+ w as communityAwayOf,
85
+ b as followKeyOf,
86
+ p as followTargetOf,
87
+ g as followTargetParts,
88
+ _ as forumSearchQueryOf,
89
+ T as forumTopicTitleOf,
90
+ E as isCategoryModerator,
91
+ I as isKnownTopicItem,
92
+ S as knownTopicItemsOf,
93
+ m as nextSearchPage,
94
+ h as surfaceInfoOf,
95
+ O as topicTitleLength
96
+ };
@@ -11,6 +11,10 @@
11
11
  * module's pages and the digest's unsubscribe token in the fragment;
12
12
  * communityMentionSpans `@handle` in a body as text spans a page links (never HTML).
13
13
  *
14
+ * M3, the forum (m3-contracts.md §5.2): the client's `forum.*`, `me.follows.*` and `moderation.*`; createTopicStore
15
+ * (a topic over the discussion store, with its header) and pollTopicHead; the forum's helpers (follow targets, the
16
+ * search query, surfaces, away mode, moderators); the forum's paths (categoryPath, topicPath, topicMessageLink).
17
+ *
14
18
  * Browser-safe: nothing here takes a key, a session, a cookie or an IP, and nothing imports `node:*`. This entry
15
19
  * never reaches the server entries (`@blogmcp/sdk/community/server`, `@blogmcp/sdk/consultations/server`), the
16
20
  * adapter client or the delegated-identity minter — test/community/entry-boundary.spec.ts walks its import graph.
@@ -18,22 +22,25 @@
18
22
  */
19
23
  export { createCommunityClient } from './client.js';
20
24
  export type { CommunityClient, CommunityClientConfig, CommunityCallOptions } from './client.js';
21
- export { COMMUNITY_OPS, communityOpPath, newClientMsgId, COMMUNITY_MESSAGE_MAX, COMMUNITY_MESSAGE_LINKS_MAX, COMMUNITY_REPORT_NOTE_MAX, COMMUNITY_APPEAL_MAX, COMMUNITY_NOTICE_DESCRIPTION_MAX, COMMUNITY_NOTIFIER_NAME_MAX, COMMUNITY_DISPLAY_NAME_MIN, COMMUNITY_DISPLAY_NAME_MAX, COMMUNITY_BIO_MAX, COMMUNITY_HANDLE_RE, COMMUNITY_HANDLE_CHANGE_DAYS, COMMUNITY_HEAD_ARTICLES_MAX, COMMUNITY_PAGE_SIZE, COMMUNITY_REPLIES_MAX, COMMUNITY_NOTICE_TURNSTILE_ACTION, COMMUNITY_GOOD_FAITH, COMMUNITY_CLIENT_MSG_ID_RE, } from './routes.js';
25
+ export { COMMUNITY_OPS, communityOpPath, newClientMsgId, COMMUNITY_MESSAGE_MAX, COMMUNITY_MESSAGE_LINKS_MAX, COMMUNITY_REPORT_NOTE_MAX, COMMUNITY_APPEAL_MAX, COMMUNITY_NOTICE_DESCRIPTION_MAX, COMMUNITY_NOTIFIER_NAME_MAX, COMMUNITY_DISPLAY_NAME_MIN, COMMUNITY_DISPLAY_NAME_MAX, COMMUNITY_BIO_MAX, COMMUNITY_HANDLE_RE, COMMUNITY_HANDLE_CHANGE_DAYS, COMMUNITY_HEAD_ARTICLES_MAX, COMMUNITY_PAGE_SIZE, COMMUNITY_REPLIES_MAX, COMMUNITY_NOTICE_TURNSTILE_ACTION, COMMUNITY_GOOD_FAITH, COMMUNITY_CLIENT_MSG_ID_RE, COMMUNITY_TOPIC_TITLE_MAX, COMMUNITY_TOPICS_PAGE_SIZE, COMMUNITY_TOPICS_PAGE_MAX, COMMUNITY_HEAD_TOPICS_MAX, COMMUNITY_SEARCH_QUERY_MIN, COMMUNITY_SEARCH_QUERY_MAX, COMMUNITY_SEARCH_PAGE_SIZE, COMMUNITY_SEARCH_PAGES_MAX, COMMUNITY_FOLLOWS_MAX, COMMUNITY_CATEGORY_SLUG_RE, } from './routes.js';
22
26
  export type { CommunityOp, CommunityOpName, CommunitySurface } from './routes.js';
23
27
  export { COMMUNITY_UI_CODES, COMMUNITY_API_CODES, COMMUNITY_OUTCOME_OF_KB, COMMUNITY_HOST_CODES, COMMUNITY_OUTCOME_OF_HOST, CommunityTransportError, isCommunityTransportError, isCommunityUiCode, isLoggedCommunityOutcome, communityOutcomeOf, communityFailureOf, } from './outcome.js';
24
28
  export type { CommunityUiCode, CommunityApiCode, CommunityHostCode, CommunityOutcome, CommunityFailure, CommunityLogger, } from './outcome.js';
25
29
  export { fetchTransport, isRelativeCommunityBase, assertCommunityBase, communityOpUrl } from './transport.js';
26
30
  export { isInAppBrowser, IN_APP_BROWSER_RE } from './ua.js';
27
31
  export type { CommunityTransport, CommunityTransportAnswer, FetchTransportOptions } from './transport.js';
28
- export { MESSAGE_STATES, AUTHOR_KINDS, NEEDS, RESTRICTION_KINDS, NOTIFICATION_CODES, MODULE_STATES, MUTE_TARGET_KINDS, PUSH_USER_AGENT_CLASSES, REALTIME_EVENT_KINDS, CASE_CATEGORIES, CATEGORY_WITHOUT_NOTIFIER, AGE_BANDS, LEGAL_TEXT_KINDS, isKnownState, isKnownAuthorKind, isKnownAuthor, isKnownNeed, isKnownRestrictionKind, isKnownNotificationCode, isKnownModuleState, isCaseCategory, communityRulesOf, communityLegalSectionsOf, ART9_CONSENT_LAYOUTS, ART9_REFUSALS, ART9_CONTROLLERS_MAX, art9ConsentLayoutOf, art9RefusalOf, art9ControllersOf, TRUST_LABELS, isKnownTrustLabel, } from './shapes.js';
29
- export type { KnownMessageState, MessageState, KnownAuthorKind, AuthorKind, KnownNeed, Need, KnownRestrictionKind, RestrictionKind, KnownNotificationCode, NotificationCode, KnownModuleState, ModuleState, KnownTrustLabel, TrustLabel, ModuleInfo, MemberSettings, MemberSettingsUpdate, MuteEntry, MuteTargetKind, NotificationListInput, PushUserAgentClass, PushVapidKey, RealtimeToken, RealtimeSubscribeToken, RealtimeEvent, RealtimeEventKind, PushSubscribeInput, PushSubscribeAnswer, PushUnsubscribeAnswer, PushStatusAnswer, MemberCaps, CaseCategory, AgeBand, LegalTextKind, AcceptanceState, MemberAuthor, DeletedMemberAuthor, StaffAuthor, SystemAuthor, KnownAuthor, UnknownAuthor, Author, ReactionSummary, PublicMessage, RestrictionInEffect, DiscussionViewerState, Discussion, DiscussionHead, WriteAnswer, ReactionTarget, BlockEntry, PublicProfile, OwnProfile, MyState, NotificationItem, CommunityPage, DecisionSummary, StatementSubject, Statement, AppealItem, ReportItem, CurrentLegalText, CommunityRule, CommunityLegalSection, Art9ConsentLayout, Art9Refusal, Art9Controller, CommunityConsentSettings, MemberExport, NoticeTarget, NoticeReceipt, NoticeStatus, DiscussionListInput, MessagePostInput, MessageEditInput, MessageReportInput, OnboardInput, ProfileUpdateInput, NoticeSubmitInput, } from './shapes.js';
32
+ export { MESSAGE_STATES, AUTHOR_KINDS, NEEDS, RESTRICTION_KINDS, NOTIFICATION_CODES, MODULE_STATES, MUTE_TARGET_KINDS, PUSH_USER_AGENT_CLASSES, REALTIME_EVENT_KINDS, CASE_CATEGORIES, CATEGORY_WITHOUT_NOTIFIER, ESCALATION_CATEGORIES, ADVERSE_EVENT_OUTCOMES, isKnownAdverseEventOutcome, AGE_BANDS, LEGAL_TEXT_KINDS, isKnownState, isKnownAuthorKind, isKnownAuthor, isKnownNeed, isKnownRestrictionKind, isKnownNotificationCode, isKnownModuleState, isCaseCategory, communityRulesOf, communityLegalSectionsOf, ART9_CONSENT_LAYOUTS, ART9_REFUSALS, ART9_CONTROLLERS_MAX, art9ConsentLayoutOf, art9RefusalOf, art9ControllersOf, TRUST_LABELS, isKnownTrustLabel, FORUM_CATEGORY_KINDS, FORUM_CATEGORY_MODES, TOPIC_CREATIONS, TOPIC_STATES, TOPIC_ITEM_KINDS, FORUM_SORTS, FORUM_SPACES, SEARCH_RESULT_KINDS, FOLLOW_TARGET_KINDS, BRAKE_SURFACES, MODERATION_ITEM_KINDS, MODERATION_CASE_STATUSES, MODERATION_SOURCES, MODERATION_RESTRICTIONS, MODERATION_BASES, MODERATOR_TOPIC_STATES, PREMOD_OUTCOMES, isKnownForumCategoryKind, isKnownForumCategoryMode, isKnownTopicState, isKnownBrakeSurface, } from './shapes.js';
33
+ export type { KnownMessageState, MessageState, KnownAuthorKind, AuthorKind, KnownNeed, Need, KnownRestrictionKind, RestrictionKind, KnownNotificationCode, NotificationCode, KnownModuleState, ModuleState, KnownTrustLabel, TrustLabel, ModuleInfo, MemberSettings, MemberSettingsUpdate, MuteEntry, MuteTargetKind, NotificationListInput, PushUserAgentClass, PushVapidKey, RealtimeToken, RealtimeSubscribeToken, RealtimeEvent, RealtimeEventKind, PushSubscribeInput, PushSubscribeAnswer, PushUnsubscribeAnswer, PushStatusAnswer, MemberCaps, CaseCategory, KnownAdverseEventOutcome, AdverseEventOutcome, AgeBand, LegalTextKind, AcceptanceState, MemberAuthor, DeletedMemberAuthor, StaffAuthor, SystemAuthor, KnownAuthor, UnknownAuthor, Author, ReactionSummary, PublicMessage, RestrictionInEffect, DiscussionViewerState, Discussion, DiscussionHead, WriteAnswer, ReactionTarget, BlockEntry, PublicProfile, OwnProfile, MyState, NotificationItem, NotificationConversationKind, CommunityPage, DecisionSummary, StatementSubject, Statement, AppealItem, ReportItem, CurrentLegalText, CommunityRule, CommunityLegalSection, Art9ConsentLayout, Art9Refusal, Art9Controller, CommunityConsentSettings, MemberExport, NoticeTarget, NoticeReceipt, NoticeStatus, DiscussionListInput, MessagePostInput, MessageEditInput, MessageReportInput, OnboardInput, ProfileUpdateInput, NoticeSubmitInput, MessagePostFields, ArticleMessagePostInput, TopicMessagePostInput, SurfaceBrake, SurfaceInfo, ModuleSurfaces, CommunityAway, ModeratorInfo, KnownForumCategoryKind, ForumCategoryKind, KnownForumCategoryMode, ForumCategoryMode, KnownTopicCreation, TopicCreation, KnownTopicState, TopicState, KnownTopicItemKind, TopicItemKind, ForumSort, KnownForumSpace, ForumSpace, KnownSearchResultKind, SearchResultKind, KnownFollowTargetKind, FollowTargetKind, KnownBrakeSurface, BrakeSurface, KnownModerationItemKind, ModerationItemKind, KnownModerationCaseStatus, ModerationCaseStatus, KnownModerationSource, ModerationSource, ModerationRestriction, ModerationBasis, ModeratorTopicState, PremodOutcome, ForumCategoryRef, ForumCategory, ForumTopicItem, ForumArticleItem, UnknownTopicItem, KnownTopicItem, TopicItem, ForumTopicsPage, Topic, TopicViewerState, TopicThread, TopicHead, ForumSearchResult, ForumSearchPage, FollowTarget, Follow, FollowsPage, ModerationItem, ModerationQueuePage, ModerationCaseItem, ModerationCase, ModerationDecideAnswer, ModerationRemovalAnswer, PremodReviewAnswer, TopicCreateAnswer, ForumTopicsListInput, ForumTopicGetInput, ForumTopicCreateInput, ForumSearchInput, FollowSetInput, ModerationQueueInput, ModerationDecideInput, ModerationRemoveInput, ModerationEscalateInput, PremodReviewInput, } from './shapes.js';
30
34
  export { createDiscussionStore, refreshDiscussion, loadMoreDiscussion, viewerNeeds, findMessage, isOwnMessage, reactionsFor, reactionAfter, } from './store.js';
31
35
  export type { DiscussionStore, RealtimeEventOutcome, DiscussionState, DiscussionMessage, DiscussionViewer, DiscussionRestriction, MessageChange, ViewerNeeds, } from './store.js';
32
- export { pollDiscussionHead, POLL_INTERVAL_MS, POLL_MAX_BACKOFF_MS } from './poll.js';
33
- export type { PollDiscussionHeadOptions, DiscussionHeadPoller } from './poll.js';
36
+ export { pollDiscussionHead, pollTopicHead, POLL_INTERVAL_MS, POLL_MAX_BACKOFF_MS } from './poll.js';
37
+ export type { PollDiscussionHeadOptions, DiscussionHeadPoller, PollHeadOptions, PollTopicHeadOptions, TopicHeadPoller } from './poll.js';
38
+ export { createTopicStore, refreshTopic, loadMoreTopic, settleTopicFailure, isTopicOpen, isTopicStore, topicHeaderOf, topicTitleOf } from './topic.js';
39
+ export type { TopicStore, TopicStoreState, TopicHeader, TopicViewer, TopicTitle } from './topic.js';
40
+ export { followTargetOf, followTargetParts, followKeyOf, forumTopicTitleOf, topicTitleLength, forumSearchQueryOf, nextSearchPage, isKnownTopicItem, knownTopicItemsOf, surfaceInfoOf, communityAwayOf, isCategoryModerator, brakedSurfaceOf, } from './forum.js';
34
41
  export { COMMUNITY_CHANNELS } from './channels.js';
35
- export { COMMUNITY_ROUTES, COMMUNITY_RECEIPT_RE, statementPath, myCommunityPath, noticeStatusLink, signInLink, receiptFromHash, readReceiptFromHash, profilePath, COMMUNITY_MESSAGE_ANCHOR_PREFIX, communityMessageAnchor, communityMessageSeqFromHash, communityMessageLink, COMMUNITY_DIGEST_TOKEN_RE, digestTokenFromHash, readDigestTokenFromHash, forgetDigestToken, } from './links.js';
42
+ export { COMMUNITY_ROUTES, COMMUNITY_RECEIPT_RE, statementPath, myCommunityPath, noticeStatusLink, signInLink, receiptFromHash, readReceiptFromHash, profilePath, COMMUNITY_MESSAGE_ANCHOR_PREFIX, communityMessageAnchor, communityMessageSeqFromHash, communityMessageLink, communityArticleLink, COMMUNITY_DIGEST_TOKEN_RE, digestTokenFromHash, readDigestTokenFromHash, forgetDigestToken, categoryPath, topicPath, topicMessageLink, } from './links.js';
36
43
  export { COMMUNITY_MENTION_RE, communityMentionSpans, communityMentionHandles } from './mentions.js';
37
44
  export type { CommunityTextSpan } from './mentions.js';
38
- export { COMMUNITY_MESSAGES, communityMessage, communityMessageLanguage, hasCommunityMessage, warningMessageKey, confirmMessageKey, noteMessageKey, notificationMessageKey, trustLabelMessageKey, } from './messages.js';
45
+ export { COMMUNITY_MESSAGES, communityMessage, communityMessageLanguage, hasCommunityMessage, warningMessageKey, confirmMessageKey, noteMessageKey, notificationMessageKey, notificationItemMessageKey, trustLabelMessageKey, adverseOutcomeMessageKey, } from './messages.js';
39
46
  export type { CommunityMessageKey, CommunityMessageLanguage } from './messages.js';
@@ -1,124 +1,188 @@
1
- import { createCommunityClient as o } from "./client.js";
2
- import { COMMUNITY_APPEAL_MAX as t, COMMUNITY_BIO_MAX as T, COMMUNITY_CLIENT_MSG_ID_RE as s, COMMUNITY_DISPLAY_NAME_MAX as O, COMMUNITY_DISPLAY_NAME_MIN as n, COMMUNITY_GOOD_FAITH as E, COMMUNITY_HANDLE_CHANGE_DAYS as i, COMMUNITY_HANDLE_RE as r, COMMUNITY_HEAD_ARTICLES_MAX as I, COMMUNITY_MESSAGE_LINKS_MAX as N, COMMUNITY_MESSAGE_MAX as C, COMMUNITY_NOTICE_DESCRIPTION_MAX as S, COMMUNITY_NOTICE_TURNSTILE_ACTION as m, COMMUNITY_NOTIFIER_NAME_MAX as A, COMMUNITY_OPS as a, COMMUNITY_PAGE_SIZE as U, COMMUNITY_REPLIES_MAX as R, COMMUNITY_REPORT_NOTE_MAX as u, communityOpPath as L, newClientMsgId as Y } from "./routes.js";
3
- import { COMMUNITY_API_CODES as y, COMMUNITY_HOST_CODES as f, COMMUNITY_OUTCOME_OF_HOST as D, COMMUNITY_OUTCOME_OF_KB as g, COMMUNITY_UI_CODES as p, CommunityTransportError as K, communityFailureOf as P, communityOutcomeOf as H, isCommunityTransportError as l, isCommunityUiCode as F, isLoggedCommunityOutcome as d } from "./outcome.js";
4
- import { assertCommunityBase as h, communityOpUrl as X, fetchTransport as w, isRelativeCommunityBase as x } from "./transport.js";
5
- import { IN_APP_BROWSER_RE as k, isInAppBrowser as b } from "./ua.js";
6
- import { AGE_BANDS as V, ART9_CONSENT_LAYOUTS as W, ART9_CONTROLLERS_MAX as q, ART9_REFUSALS as Z, AUTHOR_KINDS as j, CASE_CATEGORIES as z, CATEGORY_WITHOUT_NOTIFIER as J, LEGAL_TEXT_KINDS as Q, MESSAGE_STATES as $, MODULE_STATES as ee, MUTE_TARGET_KINDS as Me, NEEDS as oe, NOTIFICATION_CODES as _e, PUSH_USER_AGENT_CLASSES as te, REALTIME_EVENT_KINDS as Te, RESTRICTION_KINDS as se, TRUST_LABELS as Oe, art9ConsentLayoutOf as ne, art9ControllersOf as Ee, art9RefusalOf as ie, communityLegalSectionsOf as re, communityRulesOf as Ie, isCaseCategory as Ne, isKnownAuthor as Ce, isKnownAuthorKind as Se, isKnownModuleState as me, isKnownNeed as Ae, isKnownNotificationCode as ae, isKnownRestrictionKind as Ue, isKnownState as Re, isKnownTrustLabel as ue } from "./shapes.js";
7
- import { createDiscussionStore as Ye, findMessage as ce, isOwnMessage as ye, loadMoreDiscussion as fe, reactionAfter as De, reactionsFor as ge, refreshDiscussion as pe, viewerNeeds as Ke } from "./store.js";
8
- import { POLL_INTERVAL_MS as He, POLL_MAX_BACKOFF_MS as le, pollDiscussionHead as Fe } from "./poll.js";
9
- import { COMMUNITY_CHANNELS as Ge } from "./channels.js";
10
- import { COMMUNITY_DIGEST_TOKEN_RE as Xe, COMMUNITY_MESSAGE_ANCHOR_PREFIX as we, COMMUNITY_RECEIPT_RE as xe, COMMUNITY_ROUTES as Be, communityMessageAnchor as ke, communityMessageLink as be, communityMessageSeqFromHash as ve, digestTokenFromHash as Ve, forgetDigestToken as We, myCommunityPath as qe, noticeStatusLink as Ze, profilePath as je, readDigestTokenFromHash as ze, readReceiptFromHash as Je, receiptFromHash as Qe, signInLink as $e, statementPath as eM } from "./links.js";
11
- import { COMMUNITY_MENTION_RE as oM, communityMentionHandles as _M, communityMentionSpans as tM } from "./mentions.js";
12
- import { COMMUNITY_MESSAGES as sM, communityMessage as OM, communityMessageLanguage as nM, confirmMessageKey as EM, hasCommunityMessage as iM, noteMessageKey as rM, notificationMessageKey as IM, trustLabelMessageKey as NM, warningMessageKey as CM } from "./messages.js";
1
+ import { createCommunityClient as _ } from "./client.js";
2
+ import { COMMUNITY_APPEAL_MAX as T, COMMUNITY_BIO_MAX as O, COMMUNITY_CATEGORY_SLUG_RE as E, COMMUNITY_CLIENT_MSG_ID_RE as t, COMMUNITY_DISPLAY_NAME_MAX as S, COMMUNITY_DISPLAY_NAME_MIN as i, COMMUNITY_FOLLOWS_MAX as I, COMMUNITY_GOOD_FAITH as r, COMMUNITY_HANDLE_CHANGE_DAYS as n, COMMUNITY_HANDLE_RE as C, COMMUNITY_HEAD_ARTICLES_MAX as s, COMMUNITY_HEAD_TOPICS_MAX as A, COMMUNITY_MESSAGE_LINKS_MAX as N, COMMUNITY_MESSAGE_MAX as a, COMMUNITY_NOTICE_DESCRIPTION_MAX as m, COMMUNITY_NOTICE_TURNSTILE_ACTION as R, COMMUNITY_NOTIFIER_NAME_MAX as U, COMMUNITY_OPS as c, COMMUNITY_PAGE_SIZE as f, COMMUNITY_REPLIES_MAX as u, COMMUNITY_REPORT_NOTE_MAX as Y, COMMUNITY_SEARCH_PAGES_MAX as L, COMMUNITY_SEARCH_PAGE_SIZE as p, COMMUNITY_SEARCH_QUERY_MAX as D, COMMUNITY_SEARCH_QUERY_MIN as y, COMMUNITY_TOPICS_PAGE_MAX as K, COMMUNITY_TOPICS_PAGE_SIZE as P, COMMUNITY_TOPIC_TITLE_MAX as g, communityOpPath as l, newClientMsgId as F } from "./routes.js";
3
+ import { COMMUNITY_API_CODES as G, COMMUNITY_HOST_CODES as d, COMMUNITY_OUTCOME_OF_HOST as w, COMMUNITY_OUTCOME_OF_KB as h, COMMUNITY_UI_CODES as X, CommunityTransportError as x, communityFailureOf as B, communityOutcomeOf as k, isCommunityTransportError as v, isCommunityUiCode as V, isLoggedCommunityOutcome as W } from "./outcome.js";
4
+ import { assertCommunityBase as Q, communityOpUrl as Z, fetchTransport as q, isRelativeCommunityBase as j } from "./transport.js";
5
+ import { IN_APP_BROWSER_RE as J, isInAppBrowser as $ } from "./ua.js";
6
+ import { ADVERSE_EVENT_OUTCOMES as oe, AGE_BANDS as _e, ART9_CONSENT_LAYOUTS as Me, ART9_CONTROLLERS_MAX as Te, ART9_REFUSALS as Oe, AUTHOR_KINDS as Ee, BRAKE_SURFACES as te, CASE_CATEGORIES as Se, CATEGORY_WITHOUT_NOTIFIER as ie, ESCALATION_CATEGORIES as Ie, FOLLOW_TARGET_KINDS as re, FORUM_CATEGORY_KINDS as ne, FORUM_CATEGORY_MODES as Ce, FORUM_SORTS as se, FORUM_SPACES as Ae, LEGAL_TEXT_KINDS as Ne, MESSAGE_STATES as ae, MODERATION_BASES as me, MODERATION_CASE_STATUSES as Re, MODERATION_ITEM_KINDS as Ue, MODERATION_RESTRICTIONS as ce, MODERATION_SOURCES as fe, MODERATOR_TOPIC_STATES as ue, MODULE_STATES as Ye, MUTE_TARGET_KINDS as Le, NEEDS as pe, NOTIFICATION_CODES as De, PREMOD_OUTCOMES as ye, PUSH_USER_AGENT_CLASSES as Ke, REALTIME_EVENT_KINDS as Pe, RESTRICTION_KINDS as ge, SEARCH_RESULT_KINDS as le, TOPIC_CREATIONS as Fe, TOPIC_ITEM_KINDS as He, TOPIC_STATES as Ge, TRUST_LABELS as de, art9ConsentLayoutOf as we, art9ControllersOf as he, art9RefusalOf as Xe, communityLegalSectionsOf as xe, communityRulesOf as Be, isCaseCategory as ke, isKnownAdverseEventOutcome as ve, isKnownAuthor as Ve, isKnownAuthorKind as We, isKnownBrakeSurface as be, isKnownForumCategoryKind as Qe, isKnownForumCategoryMode as Ze, isKnownModuleState as qe, isKnownNeed as je, isKnownNotificationCode as ze, isKnownRestrictionKind as Je, isKnownState as $e, isKnownTopicState as eo, isKnownTrustLabel as oo } from "./shapes.js";
7
+ import { createDiscussionStore as Mo, findMessage as To, isOwnMessage as Oo, loadMoreDiscussion as Eo, reactionAfter as to, reactionsFor as So, refreshDiscussion as io, viewerNeeds as Io } from "./store.js";
8
+ import { POLL_INTERVAL_MS as no, POLL_MAX_BACKOFF_MS as Co, pollDiscussionHead as so, pollTopicHead as Ao } from "./poll.js";
9
+ import { createTopicStore as ao, isTopicOpen as mo, isTopicStore as Ro, loadMoreTopic as Uo, refreshTopic as co, settleTopicFailure as fo, topicHeaderOf as uo, topicTitleOf as Yo } from "./topic.js";
10
+ import { brakedSurfaceOf as po, communityAwayOf as Do, followKeyOf as yo, followTargetOf as Ko, followTargetParts as Po, forumSearchQueryOf as go, forumTopicTitleOf as lo, isCategoryModerator as Fo, isKnownTopicItem as Ho, knownTopicItemsOf as Go, nextSearchPage as wo, surfaceInfoOf as ho, topicTitleLength as Xo } from "./forum.js";
11
+ import { COMMUNITY_CHANNELS as Bo } from "./channels.js";
12
+ import { COMMUNITY_DIGEST_TOKEN_RE as vo, COMMUNITY_MESSAGE_ANCHOR_PREFIX as Vo, COMMUNITY_RECEIPT_RE as Wo, COMMUNITY_ROUTES as bo, categoryPath as Qo, communityArticleLink as Zo, communityMessageAnchor as qo, communityMessageLink as jo, communityMessageSeqFromHash as zo, digestTokenFromHash as Jo, forgetDigestToken as $o, myCommunityPath as e_, noticeStatusLink as o_, profilePath as __, readDigestTokenFromHash as M_, readReceiptFromHash as T_, receiptFromHash as O_, signInLink as E_, statementPath as t_, topicMessageLink as S_, topicPath as i_ } from "./links.js";
13
+ import { COMMUNITY_MENTION_RE as r_, communityMentionHandles as n_, communityMentionSpans as C_ } from "./mentions.js";
14
+ import { COMMUNITY_MESSAGES as A_, adverseOutcomeMessageKey as N_, communityMessage as a_, communityMessageLanguage as m_, confirmMessageKey as R_, hasCommunityMessage as U_, noteMessageKey as c_, notificationItemMessageKey as f_, notificationMessageKey as u_, trustLabelMessageKey as Y_, warningMessageKey as L_ } from "./messages.js";
13
15
  export {
14
- V as AGE_BANDS,
15
- W as ART9_CONSENT_LAYOUTS,
16
- q as ART9_CONTROLLERS_MAX,
17
- Z as ART9_REFUSALS,
18
- j as AUTHOR_KINDS,
19
- z as CASE_CATEGORIES,
20
- J as CATEGORY_WITHOUT_NOTIFIER,
21
- y as COMMUNITY_API_CODES,
22
- t as COMMUNITY_APPEAL_MAX,
23
- T as COMMUNITY_BIO_MAX,
24
- Ge as COMMUNITY_CHANNELS,
25
- s as COMMUNITY_CLIENT_MSG_ID_RE,
26
- Xe as COMMUNITY_DIGEST_TOKEN_RE,
27
- O as COMMUNITY_DISPLAY_NAME_MAX,
28
- n as COMMUNITY_DISPLAY_NAME_MIN,
29
- E as COMMUNITY_GOOD_FAITH,
30
- i as COMMUNITY_HANDLE_CHANGE_DAYS,
31
- r as COMMUNITY_HANDLE_RE,
32
- I as COMMUNITY_HEAD_ARTICLES_MAX,
33
- f as COMMUNITY_HOST_CODES,
34
- oM as COMMUNITY_MENTION_RE,
35
- sM as COMMUNITY_MESSAGES,
36
- we as COMMUNITY_MESSAGE_ANCHOR_PREFIX,
16
+ oe as ADVERSE_EVENT_OUTCOMES,
17
+ _e as AGE_BANDS,
18
+ Me as ART9_CONSENT_LAYOUTS,
19
+ Te as ART9_CONTROLLERS_MAX,
20
+ Oe as ART9_REFUSALS,
21
+ Ee as AUTHOR_KINDS,
22
+ te as BRAKE_SURFACES,
23
+ Se as CASE_CATEGORIES,
24
+ ie as CATEGORY_WITHOUT_NOTIFIER,
25
+ G as COMMUNITY_API_CODES,
26
+ T as COMMUNITY_APPEAL_MAX,
27
+ O as COMMUNITY_BIO_MAX,
28
+ E as COMMUNITY_CATEGORY_SLUG_RE,
29
+ Bo as COMMUNITY_CHANNELS,
30
+ t as COMMUNITY_CLIENT_MSG_ID_RE,
31
+ vo as COMMUNITY_DIGEST_TOKEN_RE,
32
+ S as COMMUNITY_DISPLAY_NAME_MAX,
33
+ i as COMMUNITY_DISPLAY_NAME_MIN,
34
+ I as COMMUNITY_FOLLOWS_MAX,
35
+ r as COMMUNITY_GOOD_FAITH,
36
+ n as COMMUNITY_HANDLE_CHANGE_DAYS,
37
+ C as COMMUNITY_HANDLE_RE,
38
+ s as COMMUNITY_HEAD_ARTICLES_MAX,
39
+ A as COMMUNITY_HEAD_TOPICS_MAX,
40
+ d as COMMUNITY_HOST_CODES,
41
+ r_ as COMMUNITY_MENTION_RE,
42
+ A_ as COMMUNITY_MESSAGES,
43
+ Vo as COMMUNITY_MESSAGE_ANCHOR_PREFIX,
37
44
  N as COMMUNITY_MESSAGE_LINKS_MAX,
38
- C as COMMUNITY_MESSAGE_MAX,
39
- S as COMMUNITY_NOTICE_DESCRIPTION_MAX,
40
- m as COMMUNITY_NOTICE_TURNSTILE_ACTION,
41
- A as COMMUNITY_NOTIFIER_NAME_MAX,
42
- a as COMMUNITY_OPS,
43
- D as COMMUNITY_OUTCOME_OF_HOST,
44
- g as COMMUNITY_OUTCOME_OF_KB,
45
- U as COMMUNITY_PAGE_SIZE,
46
- xe as COMMUNITY_RECEIPT_RE,
47
- R as COMMUNITY_REPLIES_MAX,
48
- u as COMMUNITY_REPORT_NOTE_MAX,
49
- Be as COMMUNITY_ROUTES,
50
- p as COMMUNITY_UI_CODES,
51
- K as CommunityTransportError,
52
- k as IN_APP_BROWSER_RE,
53
- Q as LEGAL_TEXT_KINDS,
54
- $ as MESSAGE_STATES,
55
- ee as MODULE_STATES,
56
- Me as MUTE_TARGET_KINDS,
57
- oe as NEEDS,
58
- _e as NOTIFICATION_CODES,
59
- He as POLL_INTERVAL_MS,
60
- le as POLL_MAX_BACKOFF_MS,
61
- te as PUSH_USER_AGENT_CLASSES,
62
- Te as REALTIME_EVENT_KINDS,
63
- se as RESTRICTION_KINDS,
64
- Oe as TRUST_LABELS,
65
- ne as art9ConsentLayoutOf,
66
- Ee as art9ControllersOf,
67
- ie as art9RefusalOf,
68
- h as assertCommunityBase,
69
- P as communityFailureOf,
70
- re as communityLegalSectionsOf,
71
- _M as communityMentionHandles,
72
- tM as communityMentionSpans,
73
- OM as communityMessage,
74
- ke as communityMessageAnchor,
75
- nM as communityMessageLanguage,
76
- be as communityMessageLink,
77
- ve as communityMessageSeqFromHash,
78
- L as communityOpPath,
79
- X as communityOpUrl,
80
- H as communityOutcomeOf,
81
- Ie as communityRulesOf,
82
- EM as confirmMessageKey,
83
- o as createCommunityClient,
84
- Ye as createDiscussionStore,
85
- Ve as digestTokenFromHash,
86
- w as fetchTransport,
87
- ce as findMessage,
88
- We as forgetDigestToken,
89
- iM as hasCommunityMessage,
90
- Ne as isCaseCategory,
91
- l as isCommunityTransportError,
92
- F as isCommunityUiCode,
93
- b as isInAppBrowser,
94
- Ce as isKnownAuthor,
95
- Se as isKnownAuthorKind,
96
- me as isKnownModuleState,
97
- Ae as isKnownNeed,
98
- ae as isKnownNotificationCode,
99
- Ue as isKnownRestrictionKind,
100
- Re as isKnownState,
101
- ue as isKnownTrustLabel,
102
- d as isLoggedCommunityOutcome,
103
- ye as isOwnMessage,
104
- x as isRelativeCommunityBase,
105
- fe as loadMoreDiscussion,
106
- qe as myCommunityPath,
107
- Y as newClientMsgId,
108
- rM as noteMessageKey,
109
- Ze as noticeStatusLink,
110
- IM as notificationMessageKey,
111
- Fe as pollDiscussionHead,
112
- je as profilePath,
113
- De as reactionAfter,
114
- ge as reactionsFor,
115
- ze as readDigestTokenFromHash,
116
- Je as readReceiptFromHash,
117
- Qe as receiptFromHash,
118
- pe as refreshDiscussion,
119
- $e as signInLink,
120
- eM as statementPath,
121
- NM as trustLabelMessageKey,
122
- Ke as viewerNeeds,
123
- CM as warningMessageKey
45
+ a as COMMUNITY_MESSAGE_MAX,
46
+ m as COMMUNITY_NOTICE_DESCRIPTION_MAX,
47
+ R as COMMUNITY_NOTICE_TURNSTILE_ACTION,
48
+ U as COMMUNITY_NOTIFIER_NAME_MAX,
49
+ c as COMMUNITY_OPS,
50
+ w as COMMUNITY_OUTCOME_OF_HOST,
51
+ h as COMMUNITY_OUTCOME_OF_KB,
52
+ f as COMMUNITY_PAGE_SIZE,
53
+ Wo as COMMUNITY_RECEIPT_RE,
54
+ u as COMMUNITY_REPLIES_MAX,
55
+ Y as COMMUNITY_REPORT_NOTE_MAX,
56
+ bo as COMMUNITY_ROUTES,
57
+ L as COMMUNITY_SEARCH_PAGES_MAX,
58
+ p as COMMUNITY_SEARCH_PAGE_SIZE,
59
+ D as COMMUNITY_SEARCH_QUERY_MAX,
60
+ y as COMMUNITY_SEARCH_QUERY_MIN,
61
+ K as COMMUNITY_TOPICS_PAGE_MAX,
62
+ P as COMMUNITY_TOPICS_PAGE_SIZE,
63
+ g as COMMUNITY_TOPIC_TITLE_MAX,
64
+ X as COMMUNITY_UI_CODES,
65
+ x as CommunityTransportError,
66
+ Ie as ESCALATION_CATEGORIES,
67
+ re as FOLLOW_TARGET_KINDS,
68
+ ne as FORUM_CATEGORY_KINDS,
69
+ Ce as FORUM_CATEGORY_MODES,
70
+ se as FORUM_SORTS,
71
+ Ae as FORUM_SPACES,
72
+ J as IN_APP_BROWSER_RE,
73
+ Ne as LEGAL_TEXT_KINDS,
74
+ ae as MESSAGE_STATES,
75
+ me as MODERATION_BASES,
76
+ Re as MODERATION_CASE_STATUSES,
77
+ Ue as MODERATION_ITEM_KINDS,
78
+ ce as MODERATION_RESTRICTIONS,
79
+ fe as MODERATION_SOURCES,
80
+ ue as MODERATOR_TOPIC_STATES,
81
+ Ye as MODULE_STATES,
82
+ Le as MUTE_TARGET_KINDS,
83
+ pe as NEEDS,
84
+ De as NOTIFICATION_CODES,
85
+ no as POLL_INTERVAL_MS,
86
+ Co as POLL_MAX_BACKOFF_MS,
87
+ ye as PREMOD_OUTCOMES,
88
+ Ke as PUSH_USER_AGENT_CLASSES,
89
+ Pe as REALTIME_EVENT_KINDS,
90
+ ge as RESTRICTION_KINDS,
91
+ le as SEARCH_RESULT_KINDS,
92
+ Fe as TOPIC_CREATIONS,
93
+ He as TOPIC_ITEM_KINDS,
94
+ Ge as TOPIC_STATES,
95
+ de as TRUST_LABELS,
96
+ N_ as adverseOutcomeMessageKey,
97
+ we as art9ConsentLayoutOf,
98
+ he as art9ControllersOf,
99
+ Xe as art9RefusalOf,
100
+ Q as assertCommunityBase,
101
+ po as brakedSurfaceOf,
102
+ Qo as categoryPath,
103
+ Zo as communityArticleLink,
104
+ Do as communityAwayOf,
105
+ B as communityFailureOf,
106
+ xe as communityLegalSectionsOf,
107
+ n_ as communityMentionHandles,
108
+ C_ as communityMentionSpans,
109
+ a_ as communityMessage,
110
+ qo as communityMessageAnchor,
111
+ m_ as communityMessageLanguage,
112
+ jo as communityMessageLink,
113
+ zo as communityMessageSeqFromHash,
114
+ l as communityOpPath,
115
+ Z as communityOpUrl,
116
+ k as communityOutcomeOf,
117
+ Be as communityRulesOf,
118
+ R_ as confirmMessageKey,
119
+ _ as createCommunityClient,
120
+ Mo as createDiscussionStore,
121
+ ao as createTopicStore,
122
+ Jo as digestTokenFromHash,
123
+ q as fetchTransport,
124
+ To as findMessage,
125
+ yo as followKeyOf,
126
+ Ko as followTargetOf,
127
+ Po as followTargetParts,
128
+ $o as forgetDigestToken,
129
+ go as forumSearchQueryOf,
130
+ lo as forumTopicTitleOf,
131
+ U_ as hasCommunityMessage,
132
+ ke as isCaseCategory,
133
+ Fo as isCategoryModerator,
134
+ v as isCommunityTransportError,
135
+ V as isCommunityUiCode,
136
+ $ as isInAppBrowser,
137
+ ve as isKnownAdverseEventOutcome,
138
+ Ve as isKnownAuthor,
139
+ We as isKnownAuthorKind,
140
+ be as isKnownBrakeSurface,
141
+ Qe as isKnownForumCategoryKind,
142
+ Ze as isKnownForumCategoryMode,
143
+ qe as isKnownModuleState,
144
+ je as isKnownNeed,
145
+ ze as isKnownNotificationCode,
146
+ Je as isKnownRestrictionKind,
147
+ $e as isKnownState,
148
+ Ho as isKnownTopicItem,
149
+ eo as isKnownTopicState,
150
+ oo as isKnownTrustLabel,
151
+ W as isLoggedCommunityOutcome,
152
+ Oo as isOwnMessage,
153
+ j as isRelativeCommunityBase,
154
+ mo as isTopicOpen,
155
+ Ro as isTopicStore,
156
+ Go as knownTopicItemsOf,
157
+ Eo as loadMoreDiscussion,
158
+ Uo as loadMoreTopic,
159
+ e_ as myCommunityPath,
160
+ F as newClientMsgId,
161
+ wo as nextSearchPage,
162
+ c_ as noteMessageKey,
163
+ o_ as noticeStatusLink,
164
+ f_ as notificationItemMessageKey,
165
+ u_ as notificationMessageKey,
166
+ so as pollDiscussionHead,
167
+ Ao as pollTopicHead,
168
+ __ as profilePath,
169
+ to as reactionAfter,
170
+ So as reactionsFor,
171
+ M_ as readDigestTokenFromHash,
172
+ T_ as readReceiptFromHash,
173
+ O_ as receiptFromHash,
174
+ io as refreshDiscussion,
175
+ co as refreshTopic,
176
+ fo as settleTopicFailure,
177
+ E_ as signInLink,
178
+ t_ as statementPath,
179
+ ho as surfaceInfoOf,
180
+ uo as topicHeaderOf,
181
+ S_ as topicMessageLink,
182
+ i_ as topicPath,
183
+ Xo as topicTitleLength,
184
+ Yo as topicTitleOf,
185
+ Y_ as trustLabelMessageKey,
186
+ Io as viewerNeeds,
187
+ L_ as warningMessageKey
124
188
  };
@@ -12,6 +12,10 @@
12
12
  * M2 T8: the module's pages (profile, settings, welcome, notifications, discussions) and the digest's unsubscribe
13
13
  * token, which travels in the fragment of the settings page's link (`#u=<kbun_…>`) by the receipt's rule.
14
14
  *
15
+ * M3 (m3-contracts.md §5.1, D-M3-12): the forum's pages — the forum, a category by its slug, a topic by its
16
+ * conversation id (a message by its anchor in the fragment), search. The storefront names its own (`/komunita/forum`,
17
+ * `/komunita/c/:slug`, `/komunita/t/:id`, `/komunita/hledat`) as templates.
18
+ *
15
19
  * Browser-safe; readReceiptFromHash and readDigestTokenFromHash are the functions that touch `window` (on call,
16
20
  * never on import).
17
21
  */
@@ -45,6 +49,14 @@ export declare const COMMUNITY_ROUTES: Readonly<{
45
49
  readonly welcome: "/community/welcome";
46
50
  /** The notification centre (kb-api's fallback for `notifications_link_path`). */
47
51
  readonly notifications: "/community/notifications";
52
+ /** The forum: its categories with their latest topics, and the search box. */
53
+ readonly forum: "/community/forum";
54
+ /** A category's topics; `{slug}` is the category's slug (categoryPath). */
55
+ readonly category: "/community/c/{slug}";
56
+ /** A topic; `{id}` is its conversation id (topicPath), a message's anchor in the fragment (topicMessageLink). */
57
+ readonly topic: "/community/t/{id}";
58
+ /** The forum's search. */
59
+ readonly search: "/community/search";
48
60
  }>;
49
61
  /** A notifier's receipt: kb-api's `kbnt_` capability token (≤ 512 characters, base64url). */
50
62
  export declare const COMMUNITY_RECEIPT_RE: RegExp;
@@ -60,6 +72,24 @@ export declare function statementPath(template: string | null | undefined, decis
60
72
  * handle, or a template that is no site path, lacks `{handle}` or holds another brace — no link from arbitrary text.
61
73
  */
62
74
  export declare function profilePath(template: string | null | undefined, handle: string): string | null;
75
+ /**
76
+ * M3: a forum category's page — `{slug}` of the template (the host's `categoryPath`; absent, the managed blog's) filled
77
+ * with the category's slug. Null for a slug that is no category slug (COMMUNITY_CATEGORY_SLUG_RE), or a template that is
78
+ * no site path, holds a fragment, lacks `{slug}` or holds another brace — no link from arbitrary text.
79
+ */
80
+ export declare function categoryPath(template: string | null | undefined, slug: string): string | null;
81
+ /**
82
+ * M3: a forum topic's page — `{id}` of the template (the host's `topicPath`; absent, the managed blog's) filled with the
83
+ * topic's conversation id (lower case). Null for an id that is no conversation id (a UUID), or a template that is no
84
+ * site path, holds a fragment, lacks `{id}` or holds another brace.
85
+ */
86
+ export declare function topicPath(template: string | null | undefined, conversationId: string): string | null;
87
+ /**
88
+ * M3: one message on its topic's page — topicPath with the message's anchor in the fragment (`#bcm-msg-<seq>`, the row
89
+ * id the discussion view gives it and reads back with communityMessageSeqFromHash). Null where topicPath is, and for a
90
+ * seq that is none (an optimistic row's).
91
+ */
92
+ export declare function topicMessageLink(template: string | null | undefined, conversationId: string, seq: number): string | null;
63
93
  /**
64
94
  * M2 T10: the id `<blogmcp-discussion>` gives a message's row — `bcm-msg-<seq>` (the seq is the message's number in
65
95
  * its conversation, the same for every reader) — and the fragment a link to that message carries. The element
@@ -77,6 +107,14 @@ export declare function communityMessageSeqFromHash(hash: string): number | null
77
107
  * a fragment, lacks `{slug}` or holds another brace, and for a slug or seq that is none — no link from arbitrary text.
78
108
  */
79
109
  export declare function communityMessageLink(articlePath: string | null | undefined, articleSlug: string | null | undefined, seq: number | null | undefined): string | null;
110
+ /**
111
+ * M3 FX (m3-contracts.md §5.3; the review of wave 1, R20): an article's page — the host's article template
112
+ * (`articlePath`, one `{slug}`) filled with the article's slug (URL-encoded), no fragment: the „Články" category's row
113
+ * of an article discussion (`ForumArticleItem.articleSlug`) links the article its discussion is under. Null as
114
+ * communityMessageLink is (no template, a template that is no site path, holds a fragment, lacks `{slug}` or holds
115
+ * another brace, a slug that is none) — no link from arbitrary text.
116
+ */
117
+ export declare function communityArticleLink(articlePath: string | null | undefined, articleSlug: string | null | undefined): string | null;
80
118
  /** The „Moje komunita" page: the host's path when it is a site path, else the managed blog's. */
81
119
  export declare function myCommunityPath(path?: string | null): string;
82
120
  /**