@blogmcp/community 0.1.0 → 0.3.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 (114) hide show
  1. package/README.md +162 -13
  2. package/dist/blogmcp-community.global.js +8 -8
  3. package/dist/chunks/mount--2_V2q3M.js +10063 -0
  4. package/dist/core/attrs.d.ts +42 -1
  5. package/dist/core/badge.d.ts +30 -0
  6. package/dist/core/centre.d.ts +28 -0
  7. package/dist/core/digest-token.d.ts +2 -0
  8. package/dist/core/discussion.d.ts +120 -15
  9. package/dist/core/follow.d.ts +26 -0
  10. package/dist/core/format.d.ts +7 -0
  11. package/dist/core/forum-category.d.ts +85 -0
  12. package/dist/core/forum-search.d.ts +35 -0
  13. package/dist/core/forum-state.d.ts +30 -0
  14. package/dist/core/forum-words.d.ts +8 -0
  15. package/dist/core/forum.d.ts +21 -0
  16. package/dist/core/moderation.d.ts +80 -0
  17. package/dist/core/onboarding.d.ts +49 -2
  18. package/dist/core/outcomes.d.ts +2 -1
  19. package/dist/core/panel.d.ts +17 -1
  20. package/dist/core/profile.d.ts +45 -0
  21. package/dist/core/push.d.ts +63 -0
  22. package/dist/core/realtime.d.ts +46 -0
  23. package/dist/core/settings.d.ts +53 -0
  24. package/dist/core/text.d.ts +13 -0
  25. package/dist/core/topic.d.ts +47 -0
  26. package/dist/element.d.ts +47 -1
  27. package/dist/global.d.ts +8 -4
  28. package/dist/index.d.ts +20 -3
  29. package/dist/index.js +62 -12
  30. package/dist/mount.d.ts +89 -0
  31. package/dist/react.d.ts +27 -3
  32. package/dist/react.js +48 -4
  33. package/dist/ui/BadgeView.vue.d.ts +13 -0
  34. package/dist/ui/DiscussionView.vue.d.ts +11 -0
  35. package/dist/ui/FollowButtonView.vue.d.ts +17 -0
  36. package/dist/ui/FollowToggle.vue.d.ts +6 -0
  37. package/dist/ui/ForumCategoryView.vue.d.ts +13 -0
  38. package/dist/ui/ForumModerationView.vue.d.ts +12 -0
  39. package/dist/ui/ForumNotices.vue.d.ts +7 -0
  40. package/dist/ui/ForumSearchView.vue.d.ts +11 -0
  41. package/dist/ui/ForumView.vue.d.ts +12 -0
  42. package/dist/ui/LinkedText.vue.d.ts +1 -0
  43. package/dist/ui/MemberSettingsView.vue.d.ts +13 -0
  44. package/dist/ui/MembersOnly.vue.d.ts +15 -0
  45. package/dist/ui/MessageComposer.vue.d.ts +8 -2
  46. package/dist/ui/MessageMenu.vue.d.ts +2 -0
  47. package/dist/ui/ModeratorDialog.vue.d.ts +11 -0
  48. package/dist/ui/NotificationCentreView.vue.d.ts +12 -0
  49. package/dist/ui/OnboardingSteps.vue.d.ts +1 -1
  50. package/dist/ui/ProfileView.vue.d.ts +13 -0
  51. package/dist/ui/TopicRow.vue.d.ts +10 -0
  52. package/dist/ui/TopicView.vue.d.ts +32 -0
  53. package/dist/ui/WelcomeView.vue.d.ts +12 -0
  54. package/dist/ui/context.d.ts +7 -1
  55. package/dist/ui/discussion-context.d.ts +11 -3
  56. package/dist/vue.d.ts +273 -3
  57. package/dist/vue.js +235 -5
  58. package/package.json +3 -3
  59. package/src/core/attrs.ts +61 -2
  60. package/src/core/badge.ts +120 -0
  61. package/src/core/centre.ts +136 -0
  62. package/src/core/digest-token.ts +26 -0
  63. package/src/core/discussion.ts +497 -46
  64. package/src/core/follow.ts +139 -0
  65. package/src/core/format.ts +22 -0
  66. package/src/core/forum-category.ts +323 -0
  67. package/src/core/forum-search.ts +153 -0
  68. package/src/core/forum-state.ts +59 -0
  69. package/src/core/forum-words.ts +38 -0
  70. package/src/core/forum.ts +83 -0
  71. package/src/core/moderation.ts +414 -0
  72. package/src/core/onboarding.ts +177 -18
  73. package/src/core/outcomes.ts +23 -1
  74. package/src/core/panel.ts +39 -4
  75. package/src/core/profile.ts +155 -0
  76. package/src/core/push.ts +174 -0
  77. package/src/core/realtime.ts +52 -0
  78. package/src/core/settings.ts +363 -0
  79. package/src/core/text.ts +32 -0
  80. package/src/core/topic.ts +234 -0
  81. package/src/element.ts +124 -6
  82. package/src/global.ts +40 -4
  83. package/src/index.ts +84 -2
  84. package/src/mount.ts +250 -1
  85. package/src/react.ts +90 -3
  86. package/src/ui/BadgeView.vue +51 -0
  87. package/src/ui/DiscussionView.vue +43 -3
  88. package/src/ui/FollowButtonView.vue +85 -0
  89. package/src/ui/FollowToggle.vue +39 -0
  90. package/src/ui/ForumCategoryView.vue +243 -0
  91. package/src/ui/ForumModerationView.vue +309 -0
  92. package/src/ui/ForumNotices.vue +23 -0
  93. package/src/ui/ForumSearchView.vue +171 -0
  94. package/src/ui/ForumView.vue +128 -0
  95. package/src/ui/LinkedText.vue +11 -5
  96. package/src/ui/MemberSettingsView.vue +175 -0
  97. package/src/ui/MembersOnly.vue +59 -0
  98. package/src/ui/MessageComposer.vue +64 -11
  99. package/src/ui/MessageItem.vue +36 -7
  100. package/src/ui/MessageMenu.vue +3 -2
  101. package/src/ui/ModeratorDialog.vue +102 -0
  102. package/src/ui/MyCommunityView.vue +12 -0
  103. package/src/ui/NoticeStatusView.vue +15 -2
  104. package/src/ui/NotificationCentreView.vue +193 -0
  105. package/src/ui/OnboardingSteps.vue +17 -6
  106. package/src/ui/ProfileView.vue +102 -0
  107. package/src/ui/TopicRow.vue +70 -0
  108. package/src/ui/TopicView.vue +395 -0
  109. package/src/ui/WelcomeView.vue +72 -0
  110. package/src/ui/context.ts +8 -3
  111. package/src/ui/discussion-context.ts +11 -3
  112. package/src/ui/styles.css +30 -0
  113. package/src/vue.ts +271 -3
  114. package/dist/chunks/mount-DzjwnHyx.js +0 -4597
package/dist/mount.d.ts CHANGED
@@ -7,6 +7,7 @@
7
7
  */
8
8
  import type { CommunityTransport } from '@blogmcp/sdk/community';
9
9
  import type { CommunityRoutes } from './core/attrs';
10
+ import type { DiscussionRealtime, TopicRealtime } from './core/realtime';
10
11
  interface CommonMountOptions {
11
12
  /** The host's relative base (default `/api/community` under `siteBase`): its proxy or BFF. Never kb-api's URL. */
12
13
  apiBase?: string;
@@ -32,6 +33,11 @@ export interface MountDiscussionOptions extends CommonMountOptions {
32
33
  signInHref?: string;
33
34
  /** Head poll interval in ms (default 20 000; 0 = off). */
34
35
  pollMs?: number;
36
+ /**
37
+ * M2: live updates — `createRealtimeSession` of `@blogmcp/sdk/community/realtime` (the host imports it; the element
38
+ * never does). Absent: the head poll.
39
+ */
40
+ realtime?: DiscussionRealtime;
35
41
  }
36
42
  export interface MountNoticeFormOptions extends CommonMountOptions {
37
43
  /** What is reported: a message, a member (by id or handle) or an article. */
@@ -56,10 +62,93 @@ export interface MountMyCommunityOptions extends CommonMountOptions {
56
62
  /** The site's sign-in page. */
57
63
  signInHref?: string;
58
64
  }
65
+ export interface MountNotificationCentreOptions extends CommonMountOptions {
66
+ /** The site's sign-in page. */
67
+ signInHref?: string;
68
+ }
69
+ export interface MountBadgeOptions extends CommonMountOptions {
70
+ /** The unread count's poll in ms (default 60 000; 0 = once, and when the page is shown again). */
71
+ pollMs?: number;
72
+ }
73
+ export interface MountMemberSettingsOptions extends CommonMountOptions {
74
+ /** The host's service worker route (default `<site-base>/sw.js`, served from `@blogmcp/sdk/community/sw`). */
75
+ swPath?: string;
76
+ /** The site's sign-in page. */
77
+ signInHref?: string;
78
+ }
79
+ export interface MountProfileOptions extends CommonMountOptions {
80
+ /** The member's handle. */
81
+ handle: string;
82
+ /** The site's sign-in page. */
83
+ signInHref?: string;
84
+ }
85
+ export interface MountWelcomeOptions extends CommonMountOptions {
86
+ /** The site's sign-in page (a visitor's link in the profile's place). */
87
+ signInHref?: string;
88
+ }
89
+ /** M3 (m3-contracts.md §5.3): the forum's index — its categories, their latest topics, the search box. */
90
+ export interface MountForumOptions extends CommonMountOptions {
91
+ /** The site's sign-in page (the members-only sentence's link for a visitor). */
92
+ signInHref?: string;
93
+ }
94
+ /** M3: one category's page — its topics, its follow button, the new-topic composer. */
95
+ export interface MountForumCategoryOptions extends CommonMountOptions {
96
+ /** The category's slug. */
97
+ slug: string;
98
+ signInHref?: string;
99
+ }
100
+ /** M3: one topic's page — the discussion's view over the topic, with its header. */
101
+ export interface MountTopicOptions extends CommonMountOptions {
102
+ /** The topic's conversation id. */
103
+ conversationId: string;
104
+ signInHref?: string;
105
+ /** Head poll interval in ms (default 20 000; 0 = off). */
106
+ pollMs?: number;
107
+ /** Live updates — `createRealtimeSession` of `@blogmcp/sdk/community/realtime` (the host imports it). Absent: the head poll. */
108
+ realtime?: TopicRealtime;
109
+ }
110
+ /** M3: the forum's search. */
111
+ export interface MountForumSearchOptions extends CommonMountOptions {
112
+ signInHref?: string;
113
+ }
114
+ /** M3: a follow button — a topic or an article discussion (`conversation`) or a category, by its id. */
115
+ export interface MountFollowButtonOptions extends CommonMountOptions {
116
+ targetKind: 'conversation' | 'category';
117
+ targetId: string;
118
+ /** Whether the member follows it, when the host knows (absent: the member's follows are read). */
119
+ following?: boolean;
120
+ }
121
+ /** M3: a category moderator's queue (renders nothing for a member who moderates nothing). */
122
+ export interface MountForumModerationOptions extends CommonMountOptions {
123
+ /** Narrow the queue to one of the moderator's categories. */
124
+ categoryId?: string;
125
+ }
59
126
  /** Mount `<blogmcp-discussion>`; returns the function that removes it. */
60
127
  export declare function mountDiscussion(o: MountDiscussionOptions): () => void;
61
128
  /** Mount `<blogmcp-notice-form>`; returns the function that removes it. */
62
129
  export declare function mountNoticeForm(o: MountNoticeFormOptions): () => void;
63
130
  /** Mount `<blogmcp-my-community>`; returns the function that removes it. */
64
131
  export declare function mountMyCommunity(o?: MountMyCommunityOptions): () => void;
132
+ /** Mount `<blogmcp-notification-centre>`; returns the function that removes it. */
133
+ export declare function mountNotificationCentre(o?: MountNotificationCentreOptions): () => void;
134
+ /** Mount `<blogmcp-badge>`; returns the function that removes it. */
135
+ export declare function mountBadge(o?: MountBadgeOptions): () => void;
136
+ /** Mount `<blogmcp-member-settings>`; returns the function that removes it. */
137
+ export declare function mountMemberSettings(o?: MountMemberSettingsOptions): () => void;
138
+ /** Mount `<blogmcp-profile>`; returns the function that removes it. */
139
+ export declare function mountProfile(o: MountProfileOptions): () => void;
140
+ /** Mount `<blogmcp-welcome>`; returns the function that removes it. */
141
+ export declare function mountWelcome(o?: MountWelcomeOptions): () => void;
142
+ /** M3: mount `<blogmcp-forum>`; returns the function that removes it. */
143
+ export declare function mountForum(o?: MountForumOptions): () => void;
144
+ /** M3: mount `<blogmcp-forum-category>`; returns the function that removes it. */
145
+ export declare function mountForumCategory(o: MountForumCategoryOptions): () => void;
146
+ /** M3: mount `<blogmcp-topic>`; returns the function that removes it. */
147
+ export declare function mountTopic(o: MountTopicOptions): () => void;
148
+ /** M3: mount `<blogmcp-forum-search>`; returns the function that removes it. */
149
+ export declare function mountForumSearch(o?: MountForumSearchOptions): () => void;
150
+ /** M3: mount `<blogmcp-follow-button>`; returns the function that removes it. */
151
+ export declare function mountFollowButton(o: MountFollowButtonOptions): () => void;
152
+ /** M3: mount `<blogmcp-forum-moderation>`; returns the function that removes it. */
153
+ export declare function mountForumModeration(o?: MountForumModerationOptions): () => void;
65
154
  export {};
package/dist/react.d.ts CHANGED
@@ -1,5 +1,7 @@
1
1
  /**
2
- * `<KbDiscussion>`, `<KbNoticeForm>`, `<KbMyCommunity>` for React (18 and 19, Next.js App Router included — this
2
+ * `<KbDiscussion>`, `<KbNoticeForm>`, `<KbMyCommunity>`, (M2) `<KbNotificationCentre>`, `<KbBadge>`,
3
+ * `<KbMemberSettings>`, `<KbProfile>`, `<KbWelcome>` and (M3) `<KbForum>`, `<KbForumCategory>`, `<KbTopic>`,
4
+ * `<KbForumSearch>`, `<KbFollowButton>`, `<KbForumModeration>` for React (18 and 19, Next.js App Router included — this
3
5
  * module is a client component): each mounts its element after hydration and removes it on unmount. Each
4
6
  * renders one empty `<div>` as the mount point — nothing else, on the server or the client — so the element
5
7
  * sits where the component does and the page's markup is otherwise the site's alone.
@@ -7,11 +9,33 @@
7
9
  * <KbDiscussion articleId={article.id} apiBase="/api/community" signInHref={`/sign-in#${pathname}`} />
8
10
  */
9
11
  import { type ReactElement } from 'react';
10
- import type { MountDiscussionOptions, MountMyCommunityOptions, MountNoticeFormOptions } from './mount';
12
+ import type { MountBadgeOptions, MountDiscussionOptions, MountFollowButtonOptions, MountForumCategoryOptions, MountForumModerationOptions, MountForumOptions, MountForumSearchOptions, MountMemberSettingsOptions, MountMyCommunityOptions, MountNoticeFormOptions, MountNotificationCentreOptions, MountProfileOptions, MountTopicOptions, MountWelcomeOptions } from './mount';
11
13
  export type KbDiscussionProps = Omit<MountDiscussionOptions, 'container'>;
12
14
  export type KbNoticeFormProps = Omit<MountNoticeFormOptions, 'container'>;
13
15
  export type KbMyCommunityProps = Omit<MountMyCommunityOptions, 'container'>;
16
+ export type KbNotificationCentreProps = Omit<MountNotificationCentreOptions, 'container'>;
17
+ export type KbBadgeProps = Omit<MountBadgeOptions, 'container'>;
18
+ export type KbMemberSettingsProps = Omit<MountMemberSettingsOptions, 'container'>;
19
+ export type KbProfileProps = Omit<MountProfileOptions, 'container'>;
20
+ export type KbWelcomeProps = Omit<MountWelcomeOptions, 'container'>;
21
+ export type KbForumProps = Omit<MountForumOptions, 'container'>;
22
+ export type KbForumCategoryProps = Omit<MountForumCategoryOptions, 'container'>;
23
+ export type KbTopicProps = Omit<MountTopicOptions, 'container'>;
24
+ export type KbForumSearchProps = Omit<MountForumSearchOptions, 'container'>;
25
+ export type KbFollowButtonProps = Omit<MountFollowButtonOptions, 'container'>;
26
+ export type KbForumModerationProps = Omit<MountForumModerationOptions, 'container'>;
14
27
  export declare function KbDiscussion(props: KbDiscussionProps): ReactElement;
15
28
  export declare function KbNoticeForm(props: KbNoticeFormProps): ReactElement;
16
29
  export declare function KbMyCommunity(props: KbMyCommunityProps): ReactElement;
17
- export type { MountDiscussionOptions, MountNoticeFormOptions, MountMyCommunityOptions };
30
+ export declare function KbNotificationCentre(props: KbNotificationCentreProps): ReactElement;
31
+ export declare function KbBadge(props: KbBadgeProps): ReactElement;
32
+ export declare function KbMemberSettings(props: KbMemberSettingsProps): ReactElement;
33
+ export declare function KbProfile(props: KbProfileProps): ReactElement;
34
+ export declare function KbWelcome(props: KbWelcomeProps): ReactElement;
35
+ export declare function KbForum(props: KbForumProps): ReactElement;
36
+ export declare function KbForumCategory(props: KbForumCategoryProps): ReactElement;
37
+ export declare function KbTopic(props: KbTopicProps): ReactElement;
38
+ export declare function KbForumSearch(props: KbForumSearchProps): ReactElement;
39
+ export declare function KbFollowButton(props: KbFollowButtonProps): ReactElement;
40
+ export declare function KbForumModeration(props: KbForumModerationProps): ReactElement;
41
+ export type { MountDiscussionOptions, MountNoticeFormOptions, MountMyCommunityOptions, MountNotificationCentreOptions, MountBadgeOptions, MountMemberSettingsOptions, MountProfileOptions, MountWelcomeOptions, MountForumOptions, MountForumCategoryOptions, MountTopicOptions, MountForumSearchOptions, MountFollowButtonOptions, MountForumModerationOptions, };
package/dist/react.js CHANGED
@@ -20,16 +20,60 @@ function useMounted(kind, props, load) {
20
20
  return createElement("div", { ref: host, "data-blogmcp-community": kind });
21
21
  }
22
22
  function KbDiscussion(props) {
23
- return useMounted("discussion", props, async () => (await import("./chunks/mount-DzjwnHyx.js").then((n) => n.l)).mountDiscussion);
23
+ return useMounted("discussion", props, async () => (await import("./chunks/mount--2_V2q3M.js").then((n) => n.ad)).mountDiscussion);
24
24
  }
25
25
  function KbNoticeForm(props) {
26
- return useMounted("notice-form", props, async () => (await import("./chunks/mount-DzjwnHyx.js").then((n) => n.l)).mountNoticeForm);
26
+ return useMounted("notice-form", props, async () => (await import("./chunks/mount--2_V2q3M.js").then((n) => n.ad)).mountNoticeForm);
27
27
  }
28
28
  function KbMyCommunity(props) {
29
- return useMounted("my-community", props, async () => (await import("./chunks/mount-DzjwnHyx.js").then((n) => n.l)).mountMyCommunity);
29
+ return useMounted("my-community", props, async () => (await import("./chunks/mount--2_V2q3M.js").then((n) => n.ad)).mountMyCommunity);
30
+ }
31
+ function KbNotificationCentre(props) {
32
+ return useMounted("notification-centre", props, async () => (await import("./chunks/mount--2_V2q3M.js").then((n) => n.ad)).mountNotificationCentre);
33
+ }
34
+ function KbBadge(props) {
35
+ return useMounted("badge", props, async () => (await import("./chunks/mount--2_V2q3M.js").then((n) => n.ad)).mountBadge);
36
+ }
37
+ function KbMemberSettings(props) {
38
+ return useMounted("member-settings", props, async () => (await import("./chunks/mount--2_V2q3M.js").then((n) => n.ad)).mountMemberSettings);
39
+ }
40
+ function KbProfile(props) {
41
+ return useMounted("profile", props, async () => (await import("./chunks/mount--2_V2q3M.js").then((n) => n.ad)).mountProfile);
42
+ }
43
+ function KbWelcome(props) {
44
+ return useMounted("welcome", props, async () => (await import("./chunks/mount--2_V2q3M.js").then((n) => n.ad)).mountWelcome);
45
+ }
46
+ function KbForum(props) {
47
+ return useMounted("forum", props, async () => (await import("./chunks/mount--2_V2q3M.js").then((n) => n.ad)).mountForum);
48
+ }
49
+ function KbForumCategory(props) {
50
+ return useMounted("forum-category", props, async () => (await import("./chunks/mount--2_V2q3M.js").then((n) => n.ad)).mountForumCategory);
51
+ }
52
+ function KbTopic(props) {
53
+ return useMounted("topic", props, async () => (await import("./chunks/mount--2_V2q3M.js").then((n) => n.ad)).mountTopic);
54
+ }
55
+ function KbForumSearch(props) {
56
+ return useMounted("forum-search", props, async () => (await import("./chunks/mount--2_V2q3M.js").then((n) => n.ad)).mountForumSearch);
57
+ }
58
+ function KbFollowButton(props) {
59
+ return useMounted("follow-button", props, async () => (await import("./chunks/mount--2_V2q3M.js").then((n) => n.ad)).mountFollowButton);
60
+ }
61
+ function KbForumModeration(props) {
62
+ return useMounted("forum-moderation", props, async () => (await import("./chunks/mount--2_V2q3M.js").then((n) => n.ad)).mountForumModeration);
30
63
  }
31
64
  export {
65
+ KbBadge,
32
66
  KbDiscussion,
67
+ KbFollowButton,
68
+ KbForum,
69
+ KbForumCategory,
70
+ KbForumModeration,
71
+ KbForumSearch,
72
+ KbMemberSettings,
33
73
  KbMyCommunity,
34
- KbNoticeForm
74
+ KbNoticeForm,
75
+ KbNotificationCentre,
76
+ KbProfile,
77
+ KbTopic,
78
+ KbWelcome
35
79
  };
@@ -0,0 +1,13 @@
1
+ import type { CommunityTransport } from '@blogmcp/sdk/community';
2
+ type __VLS_Props = {
3
+ apiBase?: string;
4
+ siteBase?: string;
5
+ lang?: string;
6
+ /** JSON (or an object): `notificationsPath` (where the badge links). */
7
+ routes?: string | Record<string, unknown>;
8
+ /** The poll in ms (default 60 000, never less; 0 = read once and when the page is shown again). */
9
+ pollMs?: number;
10
+ transport?: CommunityTransport;
11
+ };
12
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ export default _default;
@@ -1,4 +1,5 @@
1
1
  import { type CommunityTransport } from '@blogmcp/sdk/community';
2
+ import type { DiscussionRealtime } from '../core/realtime';
2
3
  declare const _default: import("vue").DefineComponent<{
3
4
  articleId?: string;
4
5
  /** The host's relative base (default `${siteBase}/api/community`). */
@@ -14,6 +15,11 @@ declare const _default: import("vue").DefineComponent<{
14
15
  pollMs?: number;
15
16
  /** A replacement transport (a property, never an attribute): tests, a signing transport later. */
16
17
  transport?: CommunityTransport;
18
+ /**
19
+ * M2: live updates — the host's session factory (`createRealtimeSession` of `@blogmcp/sdk/community/realtime`), a
20
+ * property, never an attribute. Absent: the head poll.
21
+ */
22
+ realtime?: DiscussionRealtime;
17
23
  }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
18
24
  articleId?: string;
19
25
  /** The host's relative base (default `${siteBase}/api/community`). */
@@ -29,5 +35,10 @@ declare const _default: import("vue").DefineComponent<{
29
35
  pollMs?: number;
30
36
  /** A replacement transport (a property, never an attribute): tests, a signing transport later. */
31
37
  transport?: CommunityTransport;
38
+ /**
39
+ * M2: live updates — the host's session factory (`createRealtimeSession` of `@blogmcp/sdk/community/realtime`), a
40
+ * property, never an attribute. Absent: the head poll.
41
+ */
42
+ realtime?: DiscussionRealtime;
32
43
  }> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
33
44
  export default _default;
@@ -0,0 +1,17 @@
1
+ import { type CommunityTransport } from '@blogmcp/sdk/community';
2
+ type __VLS_Props = {
3
+ /** `conversation` (a topic, an article discussion) or `category`. */
4
+ targetKind?: string;
5
+ /** The conversation's or the category's id. */
6
+ targetId?: string;
7
+ /** `true` / `false` when the host knows whether the member follows it (absent: the member's follows are read). */
8
+ following?: string | boolean;
9
+ apiBase?: string;
10
+ siteBase?: string;
11
+ lang?: string;
12
+ transport?: CommunityTransport;
13
+ };
14
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
15
+ following: string | boolean;
16
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
17
+ export default _default;
@@ -0,0 +1,6 @@
1
+ import type { FollowController } from '../core/follow';
2
+ type __VLS_Props = {
3
+ ctl: FollowController;
4
+ };
5
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
+ export default _default;
@@ -0,0 +1,13 @@
1
+ import { type CommunityTransport } from '@blogmcp/sdk/community';
2
+ type __VLS_Props = {
3
+ /** The category's slug (`les-a-sber`). */
4
+ slug?: string;
5
+ apiBase?: string;
6
+ siteBase?: string;
7
+ lang?: string;
8
+ routes?: string | Record<string, unknown>;
9
+ signInHref?: string;
10
+ transport?: CommunityTransport;
11
+ };
12
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ export default _default;
@@ -0,0 +1,12 @@
1
+ import { type CommunityTransport } from '@blogmcp/sdk/community';
2
+ type __VLS_Props = {
3
+ /** Narrow the queue to one of the moderator's categories (its id). */
4
+ categoryId?: string;
5
+ apiBase?: string;
6
+ siteBase?: string;
7
+ lang?: string;
8
+ routes?: string | Record<string, unknown>;
9
+ transport?: CommunityTransport;
10
+ };
11
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
12
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import type { MyState } from '@blogmcp/sdk/community';
2
+ type __VLS_Props = {
3
+ me: MyState | null;
4
+ now?: number;
5
+ };
6
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
+ export default _default;
@@ -0,0 +1,11 @@
1
+ import { type CommunityTransport } from '@blogmcp/sdk/community';
2
+ type __VLS_Props = {
3
+ apiBase?: string;
4
+ siteBase?: string;
5
+ lang?: string;
6
+ routes?: string | Record<string, unknown>;
7
+ signInHref?: string;
8
+ transport?: CommunityTransport;
9
+ };
10
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
+ export default _default;
@@ -0,0 +1,12 @@
1
+ import { type CommunityTransport } from '@blogmcp/sdk/community';
2
+ type __VLS_Props = {
3
+ apiBase?: string;
4
+ siteBase?: string;
5
+ lang?: string;
6
+ /** JSON (or an object): the host's pages — `forumPath`, `categoryPath`, `topicPath`, `searchPath`, `rulesPath`, … */
7
+ routes?: string | Record<string, unknown>;
8
+ signInHref?: string;
9
+ transport?: CommunityTransport;
10
+ };
11
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
12
+ export default _default;
@@ -1,5 +1,6 @@
1
1
  type __VLS_Props = {
2
2
  text: string | null;
3
+ profilePath?: string | null;
3
4
  };
4
5
  declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
5
6
  export default _default;
@@ -0,0 +1,13 @@
1
+ import { type CommunityTransport } from '@blogmcp/sdk/community';
2
+ type __VLS_Props = {
3
+ apiBase?: string;
4
+ siteBase?: string;
5
+ lang?: string;
6
+ /** The host's service worker script (default `<site-base>/sw.js`): served from @blogmcp/sdk/community/sw. */
7
+ swPath?: string;
8
+ routes?: string | Record<string, unknown>;
9
+ signInHref?: string;
10
+ transport?: CommunityTransport;
11
+ };
12
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ export default _default;
@@ -0,0 +1,15 @@
1
+ import { type CommunityClient, type CommunityFailure } from '@blogmcp/sdk/community';
2
+ import type { Lang } from '../core/i18n';
3
+ type __VLS_Props = {
4
+ failure: CommunityFailure | null;
5
+ client: CommunityClient;
6
+ lang: Lang;
7
+ signInHref?: string;
8
+ rulesHref: string;
9
+ };
10
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
11
+ joined: () => any;
12
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
13
+ onJoined?: (() => any) | undefined;
14
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
+ export default _default;
@@ -1,12 +1,18 @@
1
1
  import type { Draft } from '../core/discussion';
2
2
  type __VLS_Props = {
3
- draft: Draft;
4
- kind: 'new' | 'reply' | 'edit';
3
+ /** M3: `title` (a string) asks for a topic's title too; null or absent: no title. */
4
+ draft: Draft & {
5
+ title?: string | null;
6
+ };
7
+ /** M3: `topic` — a new topic (the title and its opening post). */
8
+ kind: 'new' | 'reply' | 'edit' | 'topic';
5
9
  /** Seconds the draft still waits (the controller's clock). */
6
10
  wait: number;
7
11
  replyingTo?: string | null;
8
12
  /** The host's rules page. */
9
13
  rulesHref?: string;
14
+ /** M2 T10: the distinct mentions one message may carry; null or absent: no limit known here. */
15
+ mentionsMax?: number | null;
10
16
  };
11
17
  declare const _default: import("vue").DefineComponent<__VLS_Props, {
12
18
  focus: () => void | undefined;
@@ -1,6 +1,8 @@
1
1
  import type { MenuItem } from './types';
2
+ /** M3: the toggle's own text (a topic's moderator menu); absent: „Další akce". */
2
3
  type __VLS_Props = {
3
4
  items: MenuItem[];
5
+ label?: string;
4
6
  };
5
7
  declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
6
8
  select: (id: string) => any;
@@ -0,0 +1,11 @@
1
+ import type { TopicController } from '../core/topic';
2
+ type __VLS_Props = {
3
+ ctl: TopicController;
4
+ fallbackFocus?: () => HTMLElement | null;
5
+ };
6
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
7
+ close: () => any;
8
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
9
+ onClose?: (() => any) | undefined;
10
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
+ export default _default;
@@ -0,0 +1,12 @@
1
+ import { type CommunityTransport } from '@blogmcp/sdk/community';
2
+ type __VLS_Props = {
3
+ apiBase?: string;
4
+ siteBase?: string;
5
+ lang?: string;
6
+ /** JSON (or an object): `statementPath`, `myCommunityPath`, `settingsPath`, `articlePath`, … */
7
+ routes?: string | Record<string, unknown>;
8
+ signInHref?: string;
9
+ transport?: CommunityTransport;
10
+ };
11
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
12
+ export default _default;
@@ -1,4 +1,4 @@
1
- import type { OnboardingModel } from '../core/onboarding';
1
+ import { type OnboardingModel } from '../core/onboarding';
2
2
  type __VLS_Props = {
3
3
  model: OnboardingModel;
4
4
  rulesHref: string;
@@ -0,0 +1,13 @@
1
+ import { type CommunityTransport } from '@blogmcp/sdk/community';
2
+ type __VLS_Props = {
3
+ /** The member's handle (`jana_n`, an `@` in front is fine). */
4
+ handle?: string;
5
+ apiBase?: string;
6
+ siteBase?: string;
7
+ lang?: string;
8
+ routes?: string | Record<string, unknown>;
9
+ signInHref?: string;
10
+ transport?: CommunityTransport;
11
+ };
12
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ export default _default;
@@ -0,0 +1,10 @@
1
+ import { type KnownTopicItem } from '@blogmcp/sdk/community';
2
+ import type { FollowController } from '../core/follow';
3
+ type __VLS_Props = {
4
+ item: KnownTopicItem;
5
+ topicHref: string;
6
+ articleHref?: string | null;
7
+ follow?: FollowController | null;
8
+ };
9
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
10
+ export default _default;
@@ -0,0 +1,32 @@
1
+ import { type CommunityTransport } from '@blogmcp/sdk/community';
2
+ import type { TopicRealtime } from '../core/realtime';
3
+ declare const _default: import("vue").DefineComponent<{
4
+ /** The topic's conversation id. */
5
+ conversationId?: string;
6
+ apiBase?: string;
7
+ siteBase?: string;
8
+ lang?: string;
9
+ signInHref?: string;
10
+ /** JSON (or an object): the host's pages — `forumPath`, `categoryPath`, `topicPath`, `rulesPath`, `myCommunityPath`, … */
11
+ routes?: string | Record<string, unknown>;
12
+ /** Head poll interval in ms (default 20 000; 0 = off). */
13
+ pollMs?: number;
14
+ transport?: CommunityTransport;
15
+ /** Live updates — `createRealtimeSession` of `@blogmcp/sdk/community/realtime`, a property. Absent: the head poll. */
16
+ realtime?: TopicRealtime;
17
+ }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
18
+ /** The topic's conversation id. */
19
+ conversationId?: string;
20
+ apiBase?: string;
21
+ siteBase?: string;
22
+ lang?: string;
23
+ signInHref?: string;
24
+ /** JSON (or an object): the host's pages — `forumPath`, `categoryPath`, `topicPath`, `rulesPath`, `myCommunityPath`, … */
25
+ routes?: string | Record<string, unknown>;
26
+ /** Head poll interval in ms (default 20 000; 0 = off). */
27
+ pollMs?: number;
28
+ transport?: CommunityTransport;
29
+ /** Live updates — `createRealtimeSession` of `@blogmcp/sdk/community/realtime`, a property. Absent: the head poll. */
30
+ realtime?: TopicRealtime;
31
+ }> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
32
+ export default _default;
@@ -0,0 +1,12 @@
1
+ import { type CommunityTransport } from '@blogmcp/sdk/community';
2
+ type __VLS_Props = {
3
+ apiBase?: string;
4
+ siteBase?: string;
5
+ lang?: string;
6
+ /** JSON (or an object): `rulesPath`, `discussionsPath`, `settingsPath`, `profilePath`. */
7
+ routes?: string | Record<string, unknown>;
8
+ signInHref?: string;
9
+ transport?: CommunityTransport;
10
+ };
11
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
12
+ export default _default;
@@ -3,6 +3,7 @@
3
3
  * `communityMessage` and nothing else), ids unique to the element, and the dialog's focus handling.
4
4
  */
5
5
  import { type Ref } from 'vue';
6
+ import { type CommunityMessageKey } from '@blogmcp/sdk/community';
6
7
  import type { Lang, TextRef, Translate } from '../core/i18n';
7
8
  export interface TextContext {
8
9
  lang: Ref<Lang>;
@@ -10,7 +11,12 @@ export interface TextContext {
10
11
  /** A TextRef (a controller's outcome) as text. */
11
12
  text(ref: TextRef | null | undefined): string;
12
13
  }
13
- export declare function provideText(lang: Ref<Lang>): TextContext;
14
+ /**
15
+ * The element's texts. `words` (M3) maps a key the shared components name to another key of the catalogue — a topic's
16
+ * thread reads the discussion's components with the forum's words (`composer.label` → `forumText.composer.label`, a
17
+ * post, not a comment) — and a plural key maps by its name without the suffix.
18
+ */
19
+ export declare function provideText(lang: Ref<Lang>, words?: Readonly<Partial<Record<CommunityMessageKey, CommunityMessageKey>>>): TextContext;
14
20
  export declare function useText(): TextContext;
15
21
  /** An id unique on the page (ids live in each element's shadow root, but the labels reference them). */
16
22
  export declare function uid(prefix: string): string;
@@ -1,9 +1,14 @@
1
- /** What the discussion's components share: the controller, the host's routes, what the reader opened. */
1
+ /**
2
+ * What the discussion's components share: the controller, the host's routes, what the reader opened — M3: under a
3
+ * topic too (`<blogmcp-topic>` provides its thread's controller, and the moderator's items of a message's menu).
4
+ */
2
5
  import { type ComputedRef } from 'vue';
3
- import type { DiscussionController } from '../core/discussion';
6
+ import type { DiscussionMessage } from '@blogmcp/sdk/community';
7
+ import type { ThreadController } from '../core/discussion';
4
8
  import type { routesWithDefaults } from '../core/attrs';
9
+ import type { MenuItem } from './types';
5
10
  export interface DiscussionContext {
6
- ctl: DiscussionController;
11
+ ctl: ThreadController;
7
12
  routes: ComputedRef<ReturnType<typeof routesWithDefaults>>;
8
13
  /** Messages of a blocked author the reader opened anyway. */
9
14
  opened: Set<number>;
@@ -14,6 +19,9 @@ export interface DiscussionContext {
14
19
  /** Where the focus goes when the element it came from is gone (a deleted message). */
15
20
  focusHeading(): HTMLElement | null;
16
21
  deleteMessage(seq: number): void;
22
+ /** M3: more items of a message's menu (a category moderator's), and what picking one does. */
23
+ extraMenu?(m: DiscussionMessage): MenuItem[];
24
+ onExtraMenu?(id: string, m: DiscussionMessage): void;
17
25
  }
18
26
  export declare function provideDiscussion(ctx: DiscussionContext): void;
19
27
  export declare function useDiscussion(): DiscussionContext;