@blogmcp/community 0.3.1 → 0.4.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.
- package/README.md +9 -3
- package/dist/blogmcp-community.global.js +7 -7
- package/dist/chunks/{mount-BpDqOL7w.js → mount-Ts_r2fwt.js} +134 -76
- package/dist/core/attrs.d.ts +14 -1
- package/dist/core/onboarding.d.ts +10 -0
- package/dist/index.js +2 -2
- package/dist/react.js +14 -14
- package/dist/ui/MembersOnly.vue.d.ts +1 -0
- package/dist/ui/OnboardingSteps.vue.d.ts +1 -0
- package/dist/vue.js +14 -14
- package/package.json +3 -3
- package/src/core/attrs.ts +18 -1
- package/src/core/onboarding.ts +50 -11
- package/src/ui/DiscussionView.vue +1 -1
- package/src/ui/ForumCategoryView.vue +2 -2
- package/src/ui/ForumSearchView.vue +1 -0
- package/src/ui/ForumView.vue +1 -0
- package/src/ui/MembersOnly.vue +2 -2
- package/src/ui/MyCommunityView.vue +1 -1
- package/src/ui/OnboardingSteps.vue +30 -3
- package/src/ui/TopicView.vue +2 -2
package/README.md
CHANGED
|
@@ -146,12 +146,15 @@ siblings register one element alone.
|
|
|
146
146
|
|
|
147
147
|
```html
|
|
148
148
|
<blogmcp-discussion article-id="…" api-base="/api/community" sign-in-href="/prihlaseni"></blogmcp-discussion>
|
|
149
|
-
<script src="https://cdn.jsdelivr.net/npm/@blogmcp/community@0.
|
|
149
|
+
<script src="https://cdn.jsdelivr.net/npm/@blogmcp/community@0.4.0/dist/blogmcp-community.global.js" nonce="…"></script>
|
|
150
150
|
```
|
|
151
151
|
|
|
152
152
|
The script build (`@blogmcp/community/global`) registers all fourteen elements. It exposes
|
|
153
153
|
`window.BlogmcpCommunity` and gives the elements its own `nonce`.
|
|
154
154
|
|
|
155
|
+
Pin 0.4.0 or later against a knowledge base that asks for the terms at joining (O-16): there a first join must
|
|
156
|
+
carry the terms text's id, which an older element never sends, so its readers' first join is refused.
|
|
157
|
+
|
|
155
158
|
## Attributes
|
|
156
159
|
|
|
157
160
|
| Element | Attribute | |
|
|
@@ -188,11 +191,14 @@ The script build (`@blogmcp/community/global`) registers all fourteen elements.
|
|
|
188
191
|
| | `following` | `true` / `false` when your page knows it (left out: the element reads the member's follows) |
|
|
189
192
|
| `<blogmcp-forum-moderation>` | `category-id` | one of the moderator's categories only (left out: all of them) |
|
|
190
193
|
|
|
191
|
-
`routes` names your community pages: `statementPath` (with `{id}`), `myCommunityPath`, `rulesPath`,
|
|
194
|
+
`routes` names your community pages: `statementPath` (with `{id}`), `myCommunityPath`, `rulesPath`, `termsPath`,
|
|
192
195
|
`reportPath`, `noticesPath` and, with the module, `profilePath` (with `{handle}`), `settingsPath`,
|
|
193
196
|
`notificationsPath`, `welcomePath` and `discussionsPath`, and with the forum `forumPath`, `categoryPath` (with
|
|
194
197
|
`{slug}`), `topicPath` (with `{id}`, the topic's conversation id) and `searchPath`. Each is a full path on your site, used as it is. A page you leave out
|
|
195
|
-
falls back to the managed blog's pages: `${site-base}/community/…`. `
|
|
198
|
+
falls back to the managed blog's pages: `${site-base}/community/…`. `termsPath` (from 0.4.0) is your discussion
|
|
199
|
+
terms page, which the onboarding links beside the rules: left out, it is `…/community/terms` beside a rules page
|
|
200
|
+
that ends in `/community/rules` (its locale prefix kept); with a rules page of another shape and no `termsPath`, the
|
|
201
|
+
onboarding shows the terms' text in the step itself. `articlePath` (with `{slug}`; no default)
|
|
196
202
|
is your article page — the managed blogs' `/blog/articles/{slug}`, a shop's `/blog/{slug}`: the notification
|
|
197
203
|
centre links a reply or a mention to its message there (`…/<slug>#bcm-msg-<seq>`), and without it those rows stay
|
|
198
204
|
text. The discussion gives every message the anchor `bcm-msg-<seq>` and, opened at one, scrolls to it itself once
|