@blogmcp/community 0.4.1 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/blogmcp-community-private.global.js +4 -0
- package/dist/blogmcp-community.global.js +3 -3
- package/dist/chunks/{mount-Ts_r2fwt.js → mount-SKmc4NgD.js} +39 -9
- package/dist/chunks/private-mount-bhCQeScD.js +5397 -0
- package/dist/core/attrs.d.ts +15 -0
- package/dist/core/settings.d.ts +5 -0
- package/dist/index.js +2 -2
- package/dist/private/core/dock.d.ts +38 -0
- package/dist/private/core/push.d.ts +49 -0
- package/dist/private/core/realtime.d.ts +57 -0
- package/dist/private/core/setup.d.ts +43 -0
- package/dist/private/core/view.d.ts +179 -0
- package/dist/private/dm/composer.d.ts +34 -0
- package/dist/private/dm/controller.d.ts +162 -0
- package/dist/private/dm/index.d.ts +14 -0
- package/dist/private/dm/links.d.ts +33 -0
- package/dist/private/dm/muted.d.ts +37 -0
- package/dist/private/dm/search.d.ts +7 -0
- package/dist/private/dm/text.d.ts +27 -0
- package/dist/private/dm/ui/DmBlocks.vue.d.ts +8 -0
- package/dist/private/dm/ui/DmCases.vue.d.ts +8 -0
- package/dist/private/dm/ui/DmComposer.vue.d.ts +20 -0
- package/dist/private/dm/ui/DmInbox.vue.d.ts +12 -0
- package/dist/private/dm/ui/DmLinkWarning.vue.d.ts +8 -0
- package/dist/private/dm/ui/DmLocalAids.vue.d.ts +8 -0
- package/dist/private/dm/ui/DmMessageText.vue.d.ts +8 -0
- package/dist/private/dm/ui/DmNew.vue.d.ts +12 -0
- package/dist/private/dm/ui/DmReport.vue.d.ts +8 -0
- package/dist/private/dm/ui/DmRequests.vue.d.ts +12 -0
- package/dist/private/dm/ui/DmScreens.vue.d.ts +9 -0
- package/dist/private/dm/ui/DmThread.vue.d.ts +9 -0
- package/dist/private/element.d.ts +23 -0
- package/dist/private/global.d.ts +10 -0
- package/dist/private/i18n.d.ts +41 -0
- package/dist/private/index.d.ts +32 -0
- package/dist/private/index.js +57 -0
- package/dist/private/mount.d.ts +55 -0
- package/dist/private/pages/api.d.ts +44 -0
- package/dist/private/pages/element.d.ts +6 -0
- package/dist/private/pages/fragment.d.ts +43 -0
- package/dist/private/pages/i18n.d.ts +25 -0
- package/dist/private/pages/index.d.ts +1 -0
- package/dist/private/pages/pages.d.ts +276 -0
- package/dist/private/pages/proof.d.ts +36 -0
- package/dist/private/pages/provider-view.d.ts +33 -0
- package/dist/private/pages/setup.d.ts +42 -0
- package/dist/private/pages/ui/AccountPageRoot.vue.d.ts +9 -0
- package/dist/private/pages/ui/PageActivation.vue.d.ts +9 -0
- package/dist/private/pages/ui/PageAddress.vue.d.ts +8 -0
- package/dist/private/pages/ui/PageDeviceApprove.vue.d.ts +8 -0
- package/dist/private/pages/ui/PageDevices.vue.d.ts +8 -0
- package/dist/private/pages/ui/PageExport.vue.d.ts +8 -0
- package/dist/private/pages/ui/PageMessages.vue.d.ts +9 -0
- package/dist/private/react.d.ts +12 -0
- package/dist/private/react.js +36 -0
- package/dist/private/ui/ChatDockRoot.vue.d.ts +20 -0
- package/dist/private/ui/LegalText.vue.d.ts +13 -0
- package/dist/private/ui/PrivateScreens.vue.d.ts +14 -0
- package/dist/private/ui/PrivateViewRoot.vue.d.ts +23 -0
- package/dist/private/ui/PromiseBlock.vue.d.ts +9 -0
- package/dist/private/ui/ProviderLine.vue.d.ts +8 -0
- package/dist/private/ui/ScreenActivation.vue.d.ts +8 -0
- package/dist/private/ui/ScreenAddress.vue.d.ts +8 -0
- package/dist/private/ui/ScreenApproval.vue.d.ts +8 -0
- package/dist/private/ui/ScreenDevices.vue.d.ts +8 -0
- package/dist/private/ui/ScreenHome.vue.d.ts +12 -0
- package/dist/private/ui/ScreenNotifications.vue.d.ts +8 -0
- package/dist/private/ui/ScreenReads.vue.d.ts +8 -0
- package/dist/private/ui/ScreenSettings.vue.d.ts +8 -0
- package/dist/private/ui/root.d.ts +35 -0
- package/dist/private/ui/text.d.ts +22 -0
- package/dist/private/vue.d.ts +88 -0
- package/dist/private/vue.js +72 -0
- package/dist/react.js +14 -14
- package/dist/vue.js +14 -14
- package/package.json +23 -6
- package/src/core/attrs.ts +19 -0
- package/src/core/settings.ts +55 -12
- package/src/private/core/dock.ts +105 -0
- package/src/private/core/push.ts +166 -0
- package/src/private/core/realtime.ts +109 -0
- package/src/private/core/setup.ts +75 -0
- package/src/private/core/view.ts +920 -0
- package/src/private/dm/composer.ts +74 -0
- package/src/private/dm/controller.ts +636 -0
- package/src/private/dm/index.ts +14 -0
- package/src/private/dm/links.ts +55 -0
- package/src/private/dm/muted.ts +160 -0
- package/src/private/dm/search.ts +18 -0
- package/src/private/dm/text.ts +60 -0
- package/src/private/dm/ui/DmBlocks.vue +27 -0
- package/src/private/dm/ui/DmCases.vue +58 -0
- package/src/private/dm/ui/DmComposer.vue +68 -0
- package/src/private/dm/ui/DmInbox.vue +34 -0
- package/src/private/dm/ui/DmLinkWarning.vue +27 -0
- package/src/private/dm/ui/DmLocalAids.vue +43 -0
- package/src/private/dm/ui/DmMessageText.vue +16 -0
- package/src/private/dm/ui/DmNew.vue +46 -0
- package/src/private/dm/ui/DmReport.vue +93 -0
- package/src/private/dm/ui/DmRequests.vue +50 -0
- package/src/private/dm/ui/DmScreens.vue +66 -0
- package/src/private/dm/ui/DmThread.vue +235 -0
- package/src/private/element.ts +90 -0
- package/src/private/global.ts +14 -0
- package/src/private/i18n.ts +127 -0
- package/src/private/index.ts +68 -0
- package/src/private/messages/cs.json +311 -0
- package/src/private/messages/en.json +319 -0
- package/src/private/mount.ts +103 -0
- package/src/private/pages/api.ts +96 -0
- package/src/private/pages/build.d.mts +2 -0
- package/src/private/pages/build.mjs +72 -0
- package/src/private/pages/element.ts +49 -0
- package/src/private/pages/fragment.ts +63 -0
- package/src/private/pages/i18n.ts +82 -0
- package/src/private/pages/index.ts +10 -0
- package/src/private/pages/messages/cs.json +97 -0
- package/src/private/pages/messages/en.json +97 -0
- package/src/private/pages/pages.ts +410 -0
- package/src/private/pages/proof.ts +110 -0
- package/src/private/pages/provider-view.ts +121 -0
- package/src/private/pages/setup.ts +79 -0
- package/src/private/pages/ui/AccountPageRoot.vue +45 -0
- package/src/private/pages/ui/PageActivation.vue +42 -0
- package/src/private/pages/ui/PageAddress.vue +39 -0
- package/src/private/pages/ui/PageDeviceApprove.vue +62 -0
- package/src/private/pages/ui/PageDevices.vue +84 -0
- package/src/private/pages/ui/PageExport.vue +35 -0
- package/src/private/pages/ui/PageMessages.vue +39 -0
- package/src/private/pages/ui/account.css +6 -0
- package/src/private/react.ts +49 -0
- package/src/private/shims.d.ts +6 -0
- package/src/private/ui/ChatDockRoot.vue +119 -0
- package/src/private/ui/LegalText.vue +18 -0
- package/src/private/ui/PrivateScreens.vue +61 -0
- package/src/private/ui/PrivateViewRoot.vue +70 -0
- package/src/private/ui/PromiseBlock.vue +18 -0
- package/src/private/ui/ProviderLine.vue +20 -0
- package/src/private/ui/ScreenActivation.vue +82 -0
- package/src/private/ui/ScreenAddress.vue +37 -0
- package/src/private/ui/ScreenApproval.vue +71 -0
- package/src/private/ui/ScreenDevices.vue +42 -0
- package/src/private/ui/ScreenHome.vue +29 -0
- package/src/private/ui/ScreenNotifications.vue +44 -0
- package/src/private/ui/ScreenReads.vue +23 -0
- package/src/private/ui/ScreenSettings.vue +44 -0
- package/src/private/ui/private.css +81 -0
- package/src/private/ui/root.ts +89 -0
- package/src/private/ui/text.ts +40 -0
- package/src/private/vue.ts +87 -0
|
@@ -18,7 +18,10 @@ const ROUTE_KEYS = [
|
|
|
18
18
|
"forumPath",
|
|
19
19
|
"categoryPath",
|
|
20
20
|
"topicPath",
|
|
21
|
-
"searchPath"
|
|
21
|
+
"searchPath",
|
|
22
|
+
"messagesPath",
|
|
23
|
+
"grantPath",
|
|
24
|
+
"grantHandoffPath"
|
|
22
25
|
];
|
|
23
26
|
function isSitePath(path) {
|
|
24
27
|
return typeof path === "string" && /^\/(?![/\\])/.test(path) && !/[\s\\\u0000-\u001f\u007f]/.test(path);
|
|
@@ -67,7 +70,11 @@ function routesWithDefaults(routes, tenant, siteBase = "") {
|
|
|
67
70
|
forumPath: routes.forumPath ?? `${siteBase}${COMMUNITY_ROUTES.forum}`,
|
|
68
71
|
categoryPath: routes.categoryPath ?? `${siteBase}${COMMUNITY_ROUTES.category}`,
|
|
69
72
|
topicPath: routes.topicPath ?? `${siteBase}${COMMUNITY_ROUTES.topic}`,
|
|
70
|
-
searchPath: routes.searchPath ?? `${siteBase}${COMMUNITY_ROUTES.search}
|
|
73
|
+
searchPath: routes.searchPath ?? `${siteBase}${COMMUNITY_ROUTES.search}`,
|
|
74
|
+
// M4 PU2 (§6.2): the private view's page and the two grant routes the host's server serves.
|
|
75
|
+
messagesPath: routes.messagesPath ?? `${siteBase}${COMMUNITY_ROUTES.messages}`,
|
|
76
|
+
grantPath: routes.grantPath ?? `${siteBase}${COMMUNITY_ROUTES.grant}`,
|
|
77
|
+
grantHandoffPath: routes.grantHandoffPath ?? `${siteBase}${COMMUNITY_ROUTES.grantHandoff}`
|
|
71
78
|
};
|
|
72
79
|
}
|
|
73
80
|
function termsBeside(rulesPath) {
|
|
@@ -5917,6 +5924,15 @@ function storePush(value) {
|
|
|
5917
5924
|
} catch {
|
|
5918
5925
|
}
|
|
5919
5926
|
}
|
|
5927
|
+
function sameApplicationServerKey(sub, key) {
|
|
5928
|
+
const raw = sub.options?.applicationServerKey;
|
|
5929
|
+
if (raw === void 0 || raw === null) return null;
|
|
5930
|
+
const bytes = raw instanceof ArrayBuffer ? new Uint8Array(raw) : ArrayBuffer.isView(raw) ? new Uint8Array(raw.buffer, raw.byteOffset, raw.byteLength) : null;
|
|
5931
|
+
if (bytes === null) return null;
|
|
5932
|
+
if (bytes.length !== key.length) return false;
|
|
5933
|
+
for (let i = 0; i < key.length; i++) if (bytes[i] !== key[i]) return false;
|
|
5934
|
+
return true;
|
|
5935
|
+
}
|
|
5920
5936
|
const SETTING_KEYS = ["notifyReply", "notifyMention", "notifyTopic", "pushEnabled", "digestEmail", "quietHours"];
|
|
5921
5937
|
function createMemberSettings(o) {
|
|
5922
5938
|
const { client, swPath } = o;
|
|
@@ -6064,18 +6080,29 @@ function createMemberSettings(o) {
|
|
|
6064
6080
|
const applicationServerKey = base64UrlBytes(vapid.value.publicKey);
|
|
6065
6081
|
if (!applicationServerKey) return fail(null, { ok: false, code: "unavailable" });
|
|
6066
6082
|
const old = await currentSubscription(reg);
|
|
6067
|
-
|
|
6068
|
-
|
|
6083
|
+
const oldKey = old ? sameApplicationServerKey(old, applicationServerKey) : null;
|
|
6084
|
+
if (old && oldKey === false) await old.unsubscribe().catch(() => false);
|
|
6085
|
+
let reused = old !== null && oldKey !== false;
|
|
6086
|
+
const options = { userVisibleOnly: true, applicationServerKey };
|
|
6087
|
+
let sub;
|
|
6088
|
+
try {
|
|
6089
|
+
sub = await reg.pushManager.subscribe(options);
|
|
6090
|
+
} catch (err) {
|
|
6091
|
+
if (!old || oldKey !== null || err?.name !== "InvalidStateError") throw err;
|
|
6092
|
+
await old.unsubscribe().catch(() => false);
|
|
6093
|
+
reused = false;
|
|
6094
|
+
sub = await reg.pushManager.subscribe(options);
|
|
6095
|
+
}
|
|
6069
6096
|
if (disposed) return;
|
|
6070
6097
|
const input = subscriptionInput(sub);
|
|
6071
6098
|
if (!input) {
|
|
6072
|
-
await sub.unsubscribe().catch(() => false);
|
|
6099
|
+
if (!reused) await sub.unsubscribe().catch(() => false);
|
|
6073
6100
|
return fail("refused");
|
|
6074
6101
|
}
|
|
6075
6102
|
const r = await client.me.push.subscribe({ ...input, userAgentClass: userAgentClass() }, call);
|
|
6076
6103
|
if (disposed) return;
|
|
6077
6104
|
if (!r.ok) {
|
|
6078
|
-
await sub.unsubscribe().catch(() => false);
|
|
6105
|
+
if (!reused) await sub.unsubscribe().catch(() => false);
|
|
6079
6106
|
return fail(r.code === "pushRefused" ? "refused" : null, r);
|
|
6080
6107
|
}
|
|
6081
6108
|
storePush({ memberId: me, keyId: r.value.keyId });
|
|
@@ -6099,15 +6126,18 @@ function createMemberSettings(o) {
|
|
|
6099
6126
|
let endpoint = null;
|
|
6100
6127
|
try {
|
|
6101
6128
|
const sub = await currentSubscription(await currentRegistration());
|
|
6102
|
-
endpoint = sub?.endpoint ?? null;
|
|
6103
|
-
await sub?.unsubscribe();
|
|
6129
|
+
endpoint = sub ? subscriptionInput(sub)?.endpoint ?? sub.endpoint ?? null : null;
|
|
6104
6130
|
} catch {
|
|
6105
6131
|
}
|
|
6106
6132
|
if (disposed) return;
|
|
6107
6133
|
if (endpoint) {
|
|
6108
6134
|
const r = await client.me.push.unsubscribe({ endpoint }, call);
|
|
6109
6135
|
if (disposed) return;
|
|
6110
|
-
if (!r.ok)
|
|
6136
|
+
if (!r.ok) {
|
|
6137
|
+
p.failure = r;
|
|
6138
|
+
p.status = "on";
|
|
6139
|
+
return;
|
|
6140
|
+
}
|
|
6111
6141
|
}
|
|
6112
6142
|
storePush(null);
|
|
6113
6143
|
p.status = "off";
|