@blogmcp/community 0.3.0 → 0.3.1

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.
@@ -1397,6 +1397,7 @@ function createThread(o, subject, realtime) {
1397
1397
  onDone: (me) => {
1398
1398
  state.me = me;
1399
1399
  onboarding.value = null;
1400
+ for (const d of [state.composer, state.inline]) if (d?.failure?.code === "onboarding") d.failure = null;
1400
1401
  state.art9RefusedNote = model.state.art9RefusedSent;
1401
1402
  if (offerArt9) {
1402
1403
  if (me.acceptances.art9Consent === "accepted") announce({ key: "panel.art9Given" });
@@ -3596,6 +3597,7 @@ function createCategory(o) {
3596
3597
  onDone: (me) => {
3597
3598
  state.me = me;
3598
3599
  onboarding.value = null;
3600
+ if (state.composer.failure?.code === "onboarding") state.composer.failure = null;
3599
3601
  announce({ key: model.state.art9RefusedSent ? "onboarding.art9RefusedDone" : "onboarding.done" });
3600
3602
  },
3601
3603
  onSignIn: () => {
@@ -4110,6 +4112,12 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
4110
4112
  void ctl.value?.setSort(e.target.value);
4111
4113
  }
4112
4114
  const composerRef = ref(null);
4115
+ watch(
4116
+ () => ctl.value?.onboarding.value ?? null,
4117
+ (now, before) => {
4118
+ if (now === null && before?.state.phase === "done") void nextTick(() => composerRef.value?.focus());
4119
+ }
4120
+ );
4113
4121
  const liveText = ref("");
4114
4122
  watch(
4115
4123
  () => state.value?.announceId,
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { ab, B, S, ac, D, t, r, F, u, s, q, M, N, p, P, V, T, W, R, Q, a0, Z, a5, $, U, a6, a7, O, a9, a8, X, a2, a1, _, Y, f, d, a, n, k, j, o, m, g, c, b, e, h, l, i, z, v, K, G, H, L, J, A, x, w, y, C, I, E, aa, a3, a4 } from "./chunks/mount--2_V2q3M.js";
2
- const VERSION = "0.3.0";
1
+ import { ab, B, S, ac, D, t, r, F, u, s, q, M, N, p, P, V, T, W, R, Q, a0, Z, a5, $, U, a6, a7, O, a9, a8, X, a2, a1, _, Y, f, d, a, n, k, j, o, m, g, c, b, e, h, l, i, z, v, K, G, H, L, J, A, x, w, y, C, I, E, aa, a3, a4 } from "./chunks/mount-BpDqOL7w.js";
2
+ const VERSION = "0.3.1";
3
3
  export {
4
4
  ab as AVATAR_PRESETS,
5
5
  B as BADGE_ELEMENT_TAG,
package/dist/react.js CHANGED
@@ -20,46 +20,46 @@ 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--2_V2q3M.js").then((n) => n.ad)).mountDiscussion);
23
+ return useMounted("discussion", props, async () => (await import("./chunks/mount-BpDqOL7w.js").then((n) => n.ad)).mountDiscussion);
24
24
  }
25
25
  function KbNoticeForm(props) {
26
- return useMounted("notice-form", props, async () => (await import("./chunks/mount--2_V2q3M.js").then((n) => n.ad)).mountNoticeForm);
26
+ return useMounted("notice-form", props, async () => (await import("./chunks/mount-BpDqOL7w.js").then((n) => n.ad)).mountNoticeForm);
27
27
  }
28
28
  function KbMyCommunity(props) {
29
- return useMounted("my-community", props, async () => (await import("./chunks/mount--2_V2q3M.js").then((n) => n.ad)).mountMyCommunity);
29
+ return useMounted("my-community", props, async () => (await import("./chunks/mount-BpDqOL7w.js").then((n) => n.ad)).mountMyCommunity);
30
30
  }
31
31
  function KbNotificationCentre(props) {
32
- return useMounted("notification-centre", props, async () => (await import("./chunks/mount--2_V2q3M.js").then((n) => n.ad)).mountNotificationCentre);
32
+ return useMounted("notification-centre", props, async () => (await import("./chunks/mount-BpDqOL7w.js").then((n) => n.ad)).mountNotificationCentre);
33
33
  }
34
34
  function KbBadge(props) {
35
- return useMounted("badge", props, async () => (await import("./chunks/mount--2_V2q3M.js").then((n) => n.ad)).mountBadge);
35
+ return useMounted("badge", props, async () => (await import("./chunks/mount-BpDqOL7w.js").then((n) => n.ad)).mountBadge);
36
36
  }
37
37
  function KbMemberSettings(props) {
38
- return useMounted("member-settings", props, async () => (await import("./chunks/mount--2_V2q3M.js").then((n) => n.ad)).mountMemberSettings);
38
+ return useMounted("member-settings", props, async () => (await import("./chunks/mount-BpDqOL7w.js").then((n) => n.ad)).mountMemberSettings);
39
39
  }
40
40
  function KbProfile(props) {
41
- return useMounted("profile", props, async () => (await import("./chunks/mount--2_V2q3M.js").then((n) => n.ad)).mountProfile);
41
+ return useMounted("profile", props, async () => (await import("./chunks/mount-BpDqOL7w.js").then((n) => n.ad)).mountProfile);
42
42
  }
43
43
  function KbWelcome(props) {
44
- return useMounted("welcome", props, async () => (await import("./chunks/mount--2_V2q3M.js").then((n) => n.ad)).mountWelcome);
44
+ return useMounted("welcome", props, async () => (await import("./chunks/mount-BpDqOL7w.js").then((n) => n.ad)).mountWelcome);
45
45
  }
46
46
  function KbForum(props) {
47
- return useMounted("forum", props, async () => (await import("./chunks/mount--2_V2q3M.js").then((n) => n.ad)).mountForum);
47
+ return useMounted("forum", props, async () => (await import("./chunks/mount-BpDqOL7w.js").then((n) => n.ad)).mountForum);
48
48
  }
49
49
  function KbForumCategory(props) {
50
- return useMounted("forum-category", props, async () => (await import("./chunks/mount--2_V2q3M.js").then((n) => n.ad)).mountForumCategory);
50
+ return useMounted("forum-category", props, async () => (await import("./chunks/mount-BpDqOL7w.js").then((n) => n.ad)).mountForumCategory);
51
51
  }
52
52
  function KbTopic(props) {
53
- return useMounted("topic", props, async () => (await import("./chunks/mount--2_V2q3M.js").then((n) => n.ad)).mountTopic);
53
+ return useMounted("topic", props, async () => (await import("./chunks/mount-BpDqOL7w.js").then((n) => n.ad)).mountTopic);
54
54
  }
55
55
  function KbForumSearch(props) {
56
- return useMounted("forum-search", props, async () => (await import("./chunks/mount--2_V2q3M.js").then((n) => n.ad)).mountForumSearch);
56
+ return useMounted("forum-search", props, async () => (await import("./chunks/mount-BpDqOL7w.js").then((n) => n.ad)).mountForumSearch);
57
57
  }
58
58
  function KbFollowButton(props) {
59
- return useMounted("follow-button", props, async () => (await import("./chunks/mount--2_V2q3M.js").then((n) => n.ad)).mountFollowButton);
59
+ return useMounted("follow-button", props, async () => (await import("./chunks/mount-BpDqOL7w.js").then((n) => n.ad)).mountFollowButton);
60
60
  }
61
61
  function KbForumModeration(props) {
62
- return useMounted("forum-moderation", props, async () => (await import("./chunks/mount--2_V2q3M.js").then((n) => n.ad)).mountForumModeration);
62
+ return useMounted("forum-moderation", props, async () => (await import("./chunks/mount-BpDqOL7w.js").then((n) => n.ad)).mountForumModeration);
63
63
  }
64
64
  export {
65
65
  KbBadge,
package/dist/vue.js CHANGED
@@ -47,7 +47,7 @@ const KbDiscussion = defineComponent({
47
47
  return useMount(
48
48
  "discussion",
49
49
  () => defined({ ...props }),
50
- async () => (await import("./chunks/mount--2_V2q3M.js").then((n) => n.ad)).mountDiscussion
50
+ async () => (await import("./chunks/mount-BpDqOL7w.js").then((n) => n.ad)).mountDiscussion
51
51
  );
52
52
  }
53
53
  });
@@ -68,7 +68,7 @@ const KbNoticeForm = defineComponent({
68
68
  return useMount(
69
69
  "notice-form",
70
70
  () => defined({ ...props }),
71
- async () => (await import("./chunks/mount--2_V2q3M.js").then((n) => n.ad)).mountNoticeForm
71
+ async () => (await import("./chunks/mount-BpDqOL7w.js").then((n) => n.ad)).mountNoticeForm
72
72
  );
73
73
  }
74
74
  });
@@ -88,7 +88,7 @@ const KbMyCommunity = defineComponent({
88
88
  return useMount(
89
89
  "my-community",
90
90
  () => defined({ ...props }),
91
- async () => (await import("./chunks/mount--2_V2q3M.js").then((n) => n.ad)).mountMyCommunity
91
+ async () => (await import("./chunks/mount-BpDqOL7w.js").then((n) => n.ad)).mountMyCommunity
92
92
  );
93
93
  }
94
94
  });
@@ -107,7 +107,7 @@ const KbNotificationCentre = defineComponent({
107
107
  return useMount(
108
108
  "notification-centre",
109
109
  () => defined({ ...props }),
110
- async () => (await import("./chunks/mount--2_V2q3M.js").then((n) => n.ad)).mountNotificationCentre
110
+ async () => (await import("./chunks/mount-BpDqOL7w.js").then((n) => n.ad)).mountNotificationCentre
111
111
  );
112
112
  }
113
113
  });
@@ -126,7 +126,7 @@ const KbBadge = defineComponent({
126
126
  return useMount(
127
127
  "badge",
128
128
  () => defined({ ...props }),
129
- async () => (await import("./chunks/mount--2_V2q3M.js").then((n) => n.ad)).mountBadge
129
+ async () => (await import("./chunks/mount-BpDqOL7w.js").then((n) => n.ad)).mountBadge
130
130
  );
131
131
  }
132
132
  });
@@ -146,7 +146,7 @@ const KbMemberSettings = defineComponent({
146
146
  return useMount(
147
147
  "member-settings",
148
148
  () => defined({ ...props }),
149
- async () => (await import("./chunks/mount--2_V2q3M.js").then((n) => n.ad)).mountMemberSettings
149
+ async () => (await import("./chunks/mount-BpDqOL7w.js").then((n) => n.ad)).mountMemberSettings
150
150
  );
151
151
  }
152
152
  });
@@ -166,7 +166,7 @@ const KbProfile = defineComponent({
166
166
  return useMount(
167
167
  "profile",
168
168
  () => defined({ ...props }),
169
- async () => (await import("./chunks/mount--2_V2q3M.js").then((n) => n.ad)).mountProfile
169
+ async () => (await import("./chunks/mount-BpDqOL7w.js").then((n) => n.ad)).mountProfile
170
170
  );
171
171
  }
172
172
  });
@@ -185,7 +185,7 @@ const KbWelcome = defineComponent({
185
185
  return useMount(
186
186
  "welcome",
187
187
  () => defined({ ...props }),
188
- async () => (await import("./chunks/mount--2_V2q3M.js").then((n) => n.ad)).mountWelcome
188
+ async () => (await import("./chunks/mount-BpDqOL7w.js").then((n) => n.ad)).mountWelcome
189
189
  );
190
190
  }
191
191
  });
@@ -204,7 +204,7 @@ const KbForum = defineComponent({
204
204
  return useMount(
205
205
  "forum",
206
206
  () => defined({ ...props }),
207
- async () => (await import("./chunks/mount--2_V2q3M.js").then((n) => n.ad)).mountForum
207
+ async () => (await import("./chunks/mount-BpDqOL7w.js").then((n) => n.ad)).mountForum
208
208
  );
209
209
  }
210
210
  });
@@ -224,7 +224,7 @@ const KbForumCategory = defineComponent({
224
224
  return useMount(
225
225
  "forum-category",
226
226
  () => defined({ ...props }),
227
- async () => (await import("./chunks/mount--2_V2q3M.js").then((n) => n.ad)).mountForumCategory
227
+ async () => (await import("./chunks/mount-BpDqOL7w.js").then((n) => n.ad)).mountForumCategory
228
228
  );
229
229
  }
230
230
  });
@@ -247,7 +247,7 @@ const KbTopic = defineComponent({
247
247
  return useMount(
248
248
  "topic",
249
249
  () => defined({ ...props }),
250
- async () => (await import("./chunks/mount--2_V2q3M.js").then((n) => n.ad)).mountTopic
250
+ async () => (await import("./chunks/mount-BpDqOL7w.js").then((n) => n.ad)).mountTopic
251
251
  );
252
252
  }
253
253
  });
@@ -266,7 +266,7 @@ const KbForumSearch = defineComponent({
266
266
  return useMount(
267
267
  "forum-search",
268
268
  () => defined({ ...props }),
269
- async () => (await import("./chunks/mount--2_V2q3M.js").then((n) => n.ad)).mountForumSearch
269
+ async () => (await import("./chunks/mount-BpDqOL7w.js").then((n) => n.ad)).mountForumSearch
270
270
  );
271
271
  }
272
272
  });
@@ -286,7 +286,7 @@ const KbFollowButton = defineComponent({
286
286
  return useMount(
287
287
  "follow-button",
288
288
  () => defined({ ...props }),
289
- async () => (await import("./chunks/mount--2_V2q3M.js").then((n) => n.ad)).mountFollowButton
289
+ async () => (await import("./chunks/mount-BpDqOL7w.js").then((n) => n.ad)).mountFollowButton
290
290
  );
291
291
  }
292
292
  });
@@ -305,7 +305,7 @@ const KbForumModeration = defineComponent({
305
305
  return useMount(
306
306
  "forum-moderation",
307
307
  () => defined({ ...props }),
308
- async () => (await import("./chunks/mount--2_V2q3M.js").then((n) => n.ad)).mountForumModeration
308
+ async () => (await import("./chunks/mount-BpDqOL7w.js").then((n) => n.ad)).mountForumModeration
309
309
  );
310
310
  }
311
311
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blogmcp/community",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Community elements for your own site: the discussion under an article, the DSA notice form and the reader's „My community” panel. Custom elements + Vue/React wrappers + a script build, over @blogmcp/sdk/community.",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -1018,6 +1018,9 @@ function createThread(o: ThreadControllerOptions, subject: Subject, realtime: An
1018
1018
  onDone: (me) => {
1019
1019
  state.me = me
1020
1020
  onboarding.value = null
1021
+ // F-S8-2: an ONBOARDING_REQUIRED that opened it (a write refused mid-page, e.g. a newer rules text) is answered —
1022
+ // the composer comes back with its text and without that sentence; the member sends it again.
1023
+ for (const d of [state.composer, state.inline]) if (d?.failure?.code === 'onboarding') d.failure = null
1021
1024
  // A refused art. 9 consent (`public_write`): the member joined, and is told what the refusal leaves.
1022
1025
  state.art9RefusedNote = model.state.art9RefusedSent
1023
1026
  if (offerArt9) {
@@ -209,6 +209,9 @@ export function createCategory(o: {
209
209
  onDone: (me) => {
210
210
  state.me = me
211
211
  onboarding.value = null
212
+ // F-S8-2: the ONBOARDING_REQUIRED that opened it is answered — the composer comes back with its text and without
213
+ // that sentence, as a topic's composer does after the consent; the member sends it again.
214
+ if (state.composer.failure?.code === 'onboarding') state.composer.failure = null
212
215
  announce({ key: model.state.art9RefusedSent ? 'onboarding.art9RefusedDone' : 'onboarding.done' })
213
216
  },
214
217
  onSignIn: () => {
@@ -155,6 +155,13 @@ function onSort(e: Event): void {
155
155
  }
156
156
 
157
157
  const composerRef = ref<InstanceType<typeof MessageComposer> | null>(null)
158
+ // The onboarding finished where the composer was: the focus goes back to the composer, as a topic's composer takes it.
159
+ watch(
160
+ () => ctl.value?.onboarding.value ?? null,
161
+ (now, before) => {
162
+ if (now === null && before?.state.phase === 'done') void nextTick(() => composerRef.value?.focus())
163
+ },
164
+ )
158
165
  // One live region, present from the start; the same outcome twice is announced twice (cleared in between).
159
166
  const liveText = ref('')
160
167
  watch(