@blogmcp/community 0.5.0 → 0.5.2
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 +7 -3
- package/dist/blogmcp-community.global.js +1 -1
- package/dist/chunks/{private-mount-bhCQeScD.js → private-mount-B7EjskRH.js} +208 -44
- package/dist/index.js +1 -1
- package/dist/private/dm/composer.d.ts +4 -3
- package/dist/private/index.js +2 -2
- package/dist/private/react.js +2 -2
- package/dist/private/ui/LegalBlocks.vue.d.ts +10 -0
- package/dist/private/ui/LegalRun.vue.d.ts +7 -0
- package/dist/private/ui/LegalRuns.vue.d.ts +6 -0
- package/dist/private/ui/legal.d.ts +15 -0
- package/dist/private/vue.js +2 -2
- package/package.json +3 -3
- package/src/private/dm/composer.ts +4 -3
- package/src/private/messages/cs.json +5 -2
- package/src/private/messages/en.json +6 -3
- package/src/private/ui/LegalBlocks.vue +30 -0
- package/src/private/ui/LegalRun.vue +13 -0
- package/src/private/ui/LegalRuns.vue +20 -0
- package/src/private/ui/LegalText.vue +10 -3
- package/src/private/ui/ScreenActivation.vue +12 -2
- package/src/private/ui/legal.ts +29 -0
- package/src/private/ui/private.css +9 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { reactive, markRaw, defineComponent, computed, createElementBlock, createCommentVNode, openBlock, createElementVNode, toDisplayString, Fragment, renderList,
|
|
1
|
+
import { reactive, markRaw, defineComponent, computed, createElementBlock, createCommentVNode, openBlock, createElementVNode, toDisplayString, Fragment, renderList, createTextVNode, createBlock, resolveComponent, unref, createVNode, ref, withDirectives, vModelCheckbox, withKeys, withModifiers, vModelText, normalizeClass, watch, onMounted, onBeforeUnmount, useHost, shallowRef, defineCustomElement } from "vue";
|
|
2
2
|
import { PRIVATE_PROMISE_MESSAGES_CS, dmEventEffect, privatePromise, privateBlockOf, createPrivateDmClient, kbOriginOf, createPrivateClient, markPrivateRoot } from "@blogmcp/sdk/community/private";
|
|
3
|
-
import { COMMUNITY_ROUTES, isRelativeCommunityBase, createCommunityClient, isInAppBrowser } from "@blogmcp/sdk/community";
|
|
3
|
+
import { legalTextBlocks, COMMUNITY_ROUTES, isRelativeCommunityBase, createCommunityClient, isInAppBrowser } from "@blogmcp/sdk/community";
|
|
4
4
|
const DOCK_MAX_WINDOWS = 3;
|
|
5
5
|
const DOCK_MOBILE_QUERY = "(max-width:640px)";
|
|
6
6
|
function mediaQuery(query) {
|
|
@@ -124,7 +124,10 @@ const cs = {
|
|
|
124
124
|
"private.activation.submit": "Aktivovat soukromé zprávy",
|
|
125
125
|
"private.activation.declined": "Bez souhlasu se zpracováním údajů o zdraví soukromé zprávy zapnout nejdou, proto zůstávají vypnuté. Tuto volbu si neukládáme, aktivovat je můžete kdykoli.",
|
|
126
126
|
"private.activation.done": "Soukromé zprávy jsou aktivní.",
|
|
127
|
-
"private.activation.
|
|
127
|
+
"private.activation.withdrawContract": "Odstoupit od smlouvy",
|
|
128
|
+
"private.activation.withdrawContractConfirm": "Potvrdit odstoupení od smlouvy",
|
|
129
|
+
"private.activation.endPrivate": "Ukončit soukromé zprávy",
|
|
130
|
+
"private.activation.endPrivateConfirm": "Potvrdit ukončení soukromých zpráv",
|
|
128
131
|
"private.activation.withdrawConfirm": "Soukromé zprávy se vypnou a obsah, který na souhlasu stojí, se po lhůtě smaže. Do té doby to můžete vrátit novou aktivací.",
|
|
129
132
|
"private.activation.withdrawn": "Souhlas je odvolaný.",
|
|
130
133
|
"private.activation.addressFirst": "Před aktivací si nastavte adresu pro schvalování zařízení.",
|
|
@@ -287,7 +290,7 @@ const cs = {
|
|
|
287
290
|
"private.dm.composer.display": "Na obrazovku ji dává tento web, který ji podle smlouvy nesmí číst, ukládat ani měřit.",
|
|
288
291
|
"private.dm.composer.sameEntity": "Na obrazovku ji dává tento web. Web i blogmcp provozuje stejná osoba a píše i kód webu, takže by ji technicky mohla číst; zakazuje jí to zákon.",
|
|
289
292
|
"private.dm.composer.reports": "Když ji kdokoli z vás nahlásí, uvidí ji i s nejvýš 10 předchozími zprávami ten, kdo hlášení vyřizuje.",
|
|
290
|
-
"private.dm.composer.orders": "Na příkaz soudu nebo
|
|
293
|
+
"private.dm.composer.orders": "Na příkaz soudu nebo se souhlasem soudce ji provozovatel musí vydat.",
|
|
291
294
|
"private.dm.composer.delegated": "Web, přes který se přihlašujete, se za vás umí přihlásit jako nové zařízení a nové zprávy by viděl. Každé takové přihlášení vám ohlásíme e-mailem.",
|
|
292
295
|
"private.dm.composer.notE2e": "Zprávy nejsou šifrované koncově.",
|
|
293
296
|
"private.dm.search.label": "Hledat v konverzaci",
|
|
@@ -435,7 +438,10 @@ const en = {
|
|
|
435
438
|
"private.activation.submit": "Activate private messages",
|
|
436
439
|
"private.activation.declined": "Private messages cannot be turned on without the consent to processing health data, so they stay off. This choice is not stored; you can activate them at any time.",
|
|
437
440
|
"private.activation.done": "Private messages are active.",
|
|
438
|
-
"private.activation.
|
|
441
|
+
"private.activation.withdrawContract": "Withdraw from the contract",
|
|
442
|
+
"private.activation.withdrawContractConfirm": "Confirm withdrawal from the contract",
|
|
443
|
+
"private.activation.endPrivate": "End private messages",
|
|
444
|
+
"private.activation.endPrivateConfirm": "Confirm ending private messages",
|
|
439
445
|
"private.activation.withdrawConfirm": "Private messages switch off and the content that relies on the consent is erased after a waiting period. Until then you can undo this by activating again.",
|
|
440
446
|
"private.activation.withdrawn": "Your consent is withdrawn.",
|
|
441
447
|
"private.activation.addressFirst": "Set your device approval address before you activate.",
|
|
@@ -518,7 +524,7 @@ const en = {
|
|
|
518
524
|
"private.promise.display.tenant": "The {site} website puts them on your screen, and its contract forbids it to read, store or measure them.",
|
|
519
525
|
"private.promise.same_entity": "Private messages are run by blogmcp. Today the website and blogmcp are run by the same person ({entity}, company ID {ico}), who also writes the website's code that displays your messages. They could technically read them; the law forbids it. Otherwise the content is opened outside your screen only for a reported message or on an authority's order, and every such opening is logged automatically.",
|
|
520
526
|
"private.promise.reports": "The website's team has no tool for them, except for handling reported messages. If either of you reports a message, whoever handles reports for the operator of private messages sees it with at most 10 preceding messages. That may be an authorised moderator of the {site} website. Whoever reports sees their name before sending.",
|
|
521
|
-
"private.promise.orders": "Data the operator must hand over on a court or
|
|
527
|
+
"private.promise.orders": "Data the operator must hand over on a court's order or with a judge's consent are an exception too.",
|
|
522
528
|
"private.promise.not_e2e": "They are not end-to-end encrypted.",
|
|
523
529
|
"private.promise.delegated": "The website you sign in through can technically sign in as you as a new device. It would not see older messages there without your approval, but it would see new ones, and it could write in your name. That is why blogmcp announces every new sign-in to you by e-mail.",
|
|
524
530
|
"private.error.memberReadOnly": "Your account can only read for now, so you cannot use private messages on this site.",
|
|
@@ -606,7 +612,7 @@ const en = {
|
|
|
606
612
|
"private.dm.composer.display": "This website puts it on the screen, and its contract forbids it to read, store or measure it.",
|
|
607
613
|
"private.dm.composer.sameEntity": "This website puts it on the screen. The website and blogmcp are run by the same person, who also writes the website's code, so they could technically read it; the law forbids it.",
|
|
608
614
|
"private.dm.composer.reports": "If either of you reports it, whoever handles the report sees it with at most 10 preceding messages.",
|
|
609
|
-
"private.dm.composer.orders": "The operator must hand it over on a court or
|
|
615
|
+
"private.dm.composer.orders": "The operator must hand it over on a court's order or with a judge's consent.",
|
|
610
616
|
"private.dm.composer.delegated": "The website you sign in through can sign in as you on a new device and would see new messages. We tell you of every such sign-in by e-mail.",
|
|
611
617
|
"private.dm.composer.notE2e": "Messages are not end-to-end encrypted.",
|
|
612
618
|
"private.dm.search.label": "Search the conversation",
|
|
@@ -2009,17 +2015,17 @@ function httpsHref(value) {
|
|
|
2009
2015
|
function fillDisplay(body, display, acceptedAt) {
|
|
2010
2016
|
return body.replace(/\{\{device_label\}\}/g, display?.deviceLabel ?? "").replace(/\{\{approval_email\}\}/g, display?.approvalEmail ?? "").replace(/\{\{accepted_at\}\}/g, acceptedAt);
|
|
2011
2017
|
}
|
|
2012
|
-
const _hoisted_1$
|
|
2018
|
+
const _hoisted_1$s = {
|
|
2013
2019
|
key: 0,
|
|
2014
2020
|
class: "bcm-p-provider",
|
|
2015
2021
|
"data-provider-line": ""
|
|
2016
2022
|
};
|
|
2017
|
-
const _hoisted_2$
|
|
2023
|
+
const _hoisted_2$r = {
|
|
2018
2024
|
key: 0,
|
|
2019
2025
|
class: "bcm-p-provider-links"
|
|
2020
2026
|
};
|
|
2021
|
-
const _hoisted_3$
|
|
2022
|
-
const _sfc_main$
|
|
2027
|
+
const _hoisted_3$p = ["href"];
|
|
2028
|
+
const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
2023
2029
|
__name: "ProviderLine",
|
|
2024
2030
|
props: {
|
|
2025
2031
|
provider: {},
|
|
@@ -2030,25 +2036,174 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
2030
2036
|
const tx = computed(() => screenText(props.lang));
|
|
2031
2037
|
const links = computed(() => ["contact", "rules", "terms", "privacy"].filter((k) => props.provider?.links[k]).map((k) => ({ k, href: props.provider.links[k] })));
|
|
2032
2038
|
return (_ctx, _cache) => {
|
|
2033
|
-
return __props.provider ? (openBlock(), createElementBlock("footer", _hoisted_1$
|
|
2039
|
+
return __props.provider ? (openBlock(), createElementBlock("footer", _hoisted_1$s, [
|
|
2034
2040
|
createElementVNode("p", null, toDisplayString(tx.value.pt("private.provider.line", { name: __props.provider.name, ico: __props.provider.ico, address: __props.provider.address })), 1),
|
|
2035
|
-
links.value.length > 0 ? (openBlock(), createElementBlock("p", _hoisted_2$
|
|
2041
|
+
links.value.length > 0 ? (openBlock(), createElementBlock("p", _hoisted_2$r, [
|
|
2036
2042
|
(openBlock(true), createElementBlock(Fragment, null, renderList(links.value, (l) => {
|
|
2037
2043
|
return openBlock(), createElementBlock("a", {
|
|
2038
2044
|
key: l.k,
|
|
2039
2045
|
href: l.href,
|
|
2040
2046
|
target: "_blank",
|
|
2041
2047
|
rel: "noopener noreferrer"
|
|
2042
|
-
}, toDisplayString(tx.value.pt(`private.provider.${l.k}`)), 9, _hoisted_3$
|
|
2048
|
+
}, toDisplayString(tx.value.pt(`private.provider.${l.k}`)), 9, _hoisted_3$p);
|
|
2043
2049
|
}), 128))
|
|
2044
2050
|
])) : createCommentVNode("", true)
|
|
2045
2051
|
])) : createCommentVNode("", true);
|
|
2046
2052
|
};
|
|
2047
2053
|
}
|
|
2048
2054
|
});
|
|
2055
|
+
const _hoisted_1$r = { key: 0 };
|
|
2056
|
+
const _hoisted_2$q = { key: 0 };
|
|
2057
|
+
const _hoisted_3$o = { key: 0 };
|
|
2058
|
+
const _hoisted_4$l = { key: 1 };
|
|
2059
|
+
const _hoisted_5$l = { key: 1 };
|
|
2060
|
+
const _hoisted_6$j = { key: 0 };
|
|
2061
|
+
const _hoisted_7$j = { key: 2 };
|
|
2062
|
+
const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
2063
|
+
__name: "LegalRun",
|
|
2064
|
+
props: {
|
|
2065
|
+
run: {}
|
|
2066
|
+
},
|
|
2067
|
+
setup(__props) {
|
|
2068
|
+
return (_ctx, _cache) => {
|
|
2069
|
+
return __props.run.strong ? (openBlock(), createElementBlock("strong", _hoisted_1$r, [
|
|
2070
|
+
__props.run.em ? (openBlock(), createElementBlock("em", _hoisted_2$q, [
|
|
2071
|
+
__props.run.code ? (openBlock(), createElementBlock("code", _hoisted_3$o, toDisplayString(__props.run.text), 1)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
2072
|
+
createTextVNode(toDisplayString(__props.run.text), 1)
|
|
2073
|
+
], 64))
|
|
2074
|
+
])) : __props.run.code ? (openBlock(), createElementBlock("code", _hoisted_4$l, toDisplayString(__props.run.text), 1)) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
2075
|
+
createTextVNode(toDisplayString(__props.run.text), 1)
|
|
2076
|
+
], 64))
|
|
2077
|
+
])) : __props.run.em ? (openBlock(), createElementBlock("em", _hoisted_5$l, [
|
|
2078
|
+
__props.run.code ? (openBlock(), createElementBlock("code", _hoisted_6$j, toDisplayString(__props.run.text), 1)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
2079
|
+
createTextVNode(toDisplayString(__props.run.text), 1)
|
|
2080
|
+
], 64))
|
|
2081
|
+
])) : __props.run.code ? (openBlock(), createElementBlock("code", _hoisted_7$j, toDisplayString(__props.run.text), 1)) : (openBlock(), createElementBlock(Fragment, { key: 3 }, [
|
|
2082
|
+
createTextVNode(toDisplayString(__props.run.text), 1)
|
|
2083
|
+
], 64));
|
|
2084
|
+
};
|
|
2085
|
+
}
|
|
2086
|
+
});
|
|
2087
|
+
function fillBlocks(blocks, fill2) {
|
|
2088
|
+
return blocks.map((b) => {
|
|
2089
|
+
if (b.type === "list") return { ...b, items: b.items.map((item) => ({ blocks: fillBlocks(item.blocks, fill2) })) };
|
|
2090
|
+
return { ...b, runs: b.runs.map((r) => ({ ...r, text: fill2(r.text) })) };
|
|
2091
|
+
});
|
|
2092
|
+
}
|
|
2093
|
+
function linkGroups(runs) {
|
|
2094
|
+
const out = [];
|
|
2095
|
+
for (const run of runs) {
|
|
2096
|
+
const href = run.href ?? null;
|
|
2097
|
+
const last = out[out.length - 1];
|
|
2098
|
+
if (href !== null && last && last.href === href) last.runs.push(run);
|
|
2099
|
+
else out.push({ href, runs: [run] });
|
|
2100
|
+
}
|
|
2101
|
+
return out;
|
|
2102
|
+
}
|
|
2103
|
+
const headingLevel = (level) => Math.min(6, Math.max(3, level + 2));
|
|
2104
|
+
const _hoisted_1$q = ["href"];
|
|
2105
|
+
const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
2106
|
+
__name: "LegalRuns",
|
|
2107
|
+
props: {
|
|
2108
|
+
runs: {}
|
|
2109
|
+
},
|
|
2110
|
+
setup(__props) {
|
|
2111
|
+
const props = __props;
|
|
2112
|
+
const groups = computed(() => linkGroups(props.runs));
|
|
2113
|
+
return (_ctx, _cache) => {
|
|
2114
|
+
return openBlock(true), createElementBlock(Fragment, null, renderList(groups.value, (g, i) => {
|
|
2115
|
+
return openBlock(), createElementBlock(Fragment, { key: i }, [
|
|
2116
|
+
g.href ? (openBlock(), createElementBlock("a", {
|
|
2117
|
+
key: 0,
|
|
2118
|
+
href: g.href,
|
|
2119
|
+
target: "_blank",
|
|
2120
|
+
rel: "noopener noreferrer"
|
|
2121
|
+
}, [
|
|
2122
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(g.runs, (r, k) => {
|
|
2123
|
+
return openBlock(), createBlock(_sfc_main$r, {
|
|
2124
|
+
key: k,
|
|
2125
|
+
run: r
|
|
2126
|
+
}, null, 8, ["run"]);
|
|
2127
|
+
}), 128))
|
|
2128
|
+
], 8, _hoisted_1$q)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(g.runs, (r, k) => {
|
|
2129
|
+
return openBlock(), createBlock(_sfc_main$r, {
|
|
2130
|
+
key: k,
|
|
2131
|
+
run: r
|
|
2132
|
+
}, null, 8, ["run"]);
|
|
2133
|
+
}), 128))
|
|
2134
|
+
], 64);
|
|
2135
|
+
}), 128);
|
|
2136
|
+
};
|
|
2137
|
+
}
|
|
2138
|
+
});
|
|
2139
|
+
const _hoisted_1$p = { key: 0 };
|
|
2140
|
+
const _hoisted_2$p = { key: 1 };
|
|
2141
|
+
const _hoisted_3$n = { key: 2 };
|
|
2142
|
+
const _hoisted_4$k = { key: 3 };
|
|
2143
|
+
const _hoisted_5$k = { key: 1 };
|
|
2144
|
+
const _hoisted_6$i = ["start"];
|
|
2145
|
+
const _hoisted_7$i = { key: 3 };
|
|
2146
|
+
const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
2147
|
+
...{ name: "LegalBlocks" },
|
|
2148
|
+
__name: "LegalBlocks",
|
|
2149
|
+
props: {
|
|
2150
|
+
blocks: {}
|
|
2151
|
+
},
|
|
2152
|
+
setup(__props) {
|
|
2153
|
+
return (_ctx, _cache) => {
|
|
2154
|
+
const _component_LegalBlocks = resolveComponent("LegalBlocks", true);
|
|
2155
|
+
return openBlock(true), createElementBlock(Fragment, null, renderList(__props.blocks, (b, i) => {
|
|
2156
|
+
return openBlock(), createElementBlock(Fragment, { key: i }, [
|
|
2157
|
+
b.type === "heading" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
2158
|
+
unref(headingLevel)(b.level) === 3 ? (openBlock(), createElementBlock("h3", _hoisted_1$p, [
|
|
2159
|
+
createVNode(_sfc_main$q, {
|
|
2160
|
+
runs: b.runs
|
|
2161
|
+
}, null, 8, ["runs"])
|
|
2162
|
+
])) : unref(headingLevel)(b.level) === 4 ? (openBlock(), createElementBlock("h4", _hoisted_2$p, [
|
|
2163
|
+
createVNode(_sfc_main$q, {
|
|
2164
|
+
runs: b.runs
|
|
2165
|
+
}, null, 8, ["runs"])
|
|
2166
|
+
])) : unref(headingLevel)(b.level) === 5 ? (openBlock(), createElementBlock("h5", _hoisted_3$n, [
|
|
2167
|
+
createVNode(_sfc_main$q, {
|
|
2168
|
+
runs: b.runs
|
|
2169
|
+
}, null, 8, ["runs"])
|
|
2170
|
+
])) : (openBlock(), createElementBlock("h6", _hoisted_4$k, [
|
|
2171
|
+
createVNode(_sfc_main$q, {
|
|
2172
|
+
runs: b.runs
|
|
2173
|
+
}, null, 8, ["runs"])
|
|
2174
|
+
]))
|
|
2175
|
+
], 64)) : b.type === "paragraph" ? (openBlock(), createElementBlock("p", _hoisted_5$k, [
|
|
2176
|
+
createVNode(_sfc_main$q, {
|
|
2177
|
+
runs: b.runs
|
|
2178
|
+
}, null, 8, ["runs"])
|
|
2179
|
+
])) : b.type === "list" && b.ordered ? (openBlock(), createElementBlock("ol", {
|
|
2180
|
+
key: 2,
|
|
2181
|
+
start: b.start
|
|
2182
|
+
}, [
|
|
2183
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(b.items, (item, k) => {
|
|
2184
|
+
return openBlock(), createElementBlock("li", { key: k }, [
|
|
2185
|
+
createVNode(_component_LegalBlocks, {
|
|
2186
|
+
blocks: item.blocks
|
|
2187
|
+
}, null, 8, ["blocks"])
|
|
2188
|
+
]);
|
|
2189
|
+
}), 128))
|
|
2190
|
+
], 8, _hoisted_6$i)) : b.type === "list" ? (openBlock(), createElementBlock("ul", _hoisted_7$i, [
|
|
2191
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(b.items, (item, k) => {
|
|
2192
|
+
return openBlock(), createElementBlock("li", { key: k }, [
|
|
2193
|
+
createVNode(_component_LegalBlocks, {
|
|
2194
|
+
blocks: item.blocks
|
|
2195
|
+
}, null, 8, ["blocks"])
|
|
2196
|
+
]);
|
|
2197
|
+
}), 128))
|
|
2198
|
+
])) : createCommentVNode("", true)
|
|
2199
|
+
], 64);
|
|
2200
|
+
}), 128);
|
|
2201
|
+
};
|
|
2202
|
+
}
|
|
2203
|
+
});
|
|
2049
2204
|
const _hoisted_1$o = ["data-text-kind"];
|
|
2050
2205
|
const _hoisted_2$o = { class: "bcm-p-muted" };
|
|
2051
|
-
const _hoisted_3$m = { class: "bcm-p-legal-
|
|
2206
|
+
const _hoisted_3$m = { class: "bcm-p-legal-doc" };
|
|
2052
2207
|
const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
2053
2208
|
__name: "LegalText",
|
|
2054
2209
|
props: {
|
|
@@ -2060,14 +2215,16 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
2060
2215
|
setup(__props) {
|
|
2061
2216
|
const props = __props;
|
|
2062
2217
|
const tx = computed(() => screenText(props.lang));
|
|
2063
|
-
const
|
|
2218
|
+
const blocks = computed(() => fillBlocks(legalTextBlocks(props.text.body), (s) => fillDisplay(s, props.display, props.acceptedAt)));
|
|
2064
2219
|
return (_ctx, _cache) => {
|
|
2065
2220
|
return openBlock(), createElementBlock("article", {
|
|
2066
2221
|
class: "bcm-p-legal",
|
|
2067
2222
|
"data-text-kind": __props.text.kind
|
|
2068
2223
|
}, [
|
|
2069
2224
|
createElementVNode("p", _hoisted_2$o, toDisplayString(tx.value.pt("private.activation.version", { version: __props.text.version })), 1),
|
|
2070
|
-
createElementVNode("div", _hoisted_3$m,
|
|
2225
|
+
createElementVNode("div", _hoisted_3$m, [
|
|
2226
|
+
createVNode(_sfc_main$p, { blocks: blocks.value }, null, 8, ["blocks"])
|
|
2227
|
+
])
|
|
2071
2228
|
], 8, _hoisted_1$o);
|
|
2072
2229
|
};
|
|
2073
2230
|
}
|
|
@@ -2115,39 +2272,41 @@ const _hoisted_5$j = {
|
|
|
2115
2272
|
class: "bcm-p-note"
|
|
2116
2273
|
};
|
|
2117
2274
|
const _hoisted_6$h = { class: "bcm-p-actions" };
|
|
2118
|
-
const _hoisted_7$h = ["
|
|
2119
|
-
const _hoisted_8$e =
|
|
2275
|
+
const _hoisted_7$h = ["data-end"];
|
|
2276
|
+
const _hoisted_8$e = ["disabled"];
|
|
2277
|
+
const _hoisted_9$c = {
|
|
2120
2278
|
key: 0,
|
|
2121
2279
|
"data-activation-state": "refused"
|
|
2122
2280
|
};
|
|
2123
|
-
const
|
|
2281
|
+
const _hoisted_10$9 = {
|
|
2124
2282
|
key: 1,
|
|
2125
2283
|
"data-activation-state": "needed"
|
|
2126
2284
|
};
|
|
2127
|
-
const
|
|
2285
|
+
const _hoisted_11$8 = {
|
|
2128
2286
|
key: 2,
|
|
2129
2287
|
class: "bcm-p-note"
|
|
2130
2288
|
};
|
|
2131
|
-
const
|
|
2289
|
+
const _hoisted_12$8 = {
|
|
2132
2290
|
key: 3,
|
|
2133
2291
|
class: "bcm-p-note"
|
|
2134
2292
|
};
|
|
2135
|
-
const
|
|
2293
|
+
const _hoisted_13$6 = {
|
|
2136
2294
|
key: 5,
|
|
2137
2295
|
class: "bcm-p-announced"
|
|
2138
2296
|
};
|
|
2139
|
-
const
|
|
2140
|
-
const _hoisted_14$5 = { class: "bcm-p-check" };
|
|
2297
|
+
const _hoisted_14$5 = { class: "bcm-p-note" };
|
|
2141
2298
|
const _hoisted_15$5 = { class: "bcm-p-check" };
|
|
2142
2299
|
const _hoisted_16$5 = { class: "bcm-p-check" };
|
|
2143
|
-
const _hoisted_17$3 = {
|
|
2300
|
+
const _hoisted_17$3 = { class: "bcm-p-check" };
|
|
2301
|
+
const _hoisted_18$3 = {
|
|
2144
2302
|
key: 8,
|
|
2145
2303
|
class: "bcm-p-note",
|
|
2146
2304
|
"data-art9-declined": ""
|
|
2147
2305
|
};
|
|
2148
|
-
const
|
|
2149
|
-
const _hoisted_19$3 = ["disabled"];
|
|
2306
|
+
const _hoisted_19$3 = { class: "bcm-p-actions" };
|
|
2150
2307
|
const _hoisted_20$3 = ["disabled"];
|
|
2308
|
+
const _hoisted_21$3 = ["disabled"];
|
|
2309
|
+
const WITHDRAWAL_DAYS = 14;
|
|
2151
2310
|
const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
2152
2311
|
__name: "ScreenActivation",
|
|
2153
2312
|
props: {
|
|
@@ -2164,6 +2323,10 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
2164
2323
|
const art9Tenant = ref(false);
|
|
2165
2324
|
const confirming = ref(false);
|
|
2166
2325
|
const acceptedAt = computed(() => tx.value.when(a.value?.activation.activatedAt ?? null));
|
|
2326
|
+
const endIsWithdrawal = computed(() => {
|
|
2327
|
+
const at = a.value?.activation.activatedAt;
|
|
2328
|
+
return at ? Date.now() < Date.parse(at) + WITHDRAWAL_DAYS * 864e5 : false;
|
|
2329
|
+
});
|
|
2167
2330
|
const display = computed(() => a.value?.display ?? null);
|
|
2168
2331
|
const addressReady = computed(() => s.value.state?.address.state === "verified");
|
|
2169
2332
|
const deviceReady = computed(() => s.value.state?.device.state !== "pending");
|
|
@@ -2202,8 +2365,9 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
2202
2365
|
type: "button",
|
|
2203
2366
|
class: "bcm-p-btn",
|
|
2204
2367
|
"data-action": "withdraw",
|
|
2368
|
+
"data-end": endIsWithdrawal.value ? "withdrawal" : "termination",
|
|
2205
2369
|
onClick: _cache[0] || (_cache[0] = ($event) => confirming.value = true)
|
|
2206
|
-
}, toDisplayString(tx.value.pt("private.activation.
|
|
2370
|
+
}, toDisplayString(tx.value.pt(endIsWithdrawal.value ? "private.activation.withdrawContract" : "private.activation.endPrivate")), 9, _hoisted_7$h)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
2207
2371
|
createElementVNode("button", {
|
|
2208
2372
|
type: "button",
|
|
2209
2373
|
class: "bcm-p-btn bcm-p-danger",
|
|
@@ -2213,7 +2377,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
2213
2377
|
confirming.value = false;
|
|
2214
2378
|
__props.controller.withdraw();
|
|
2215
2379
|
})
|
|
2216
|
-
}, toDisplayString(tx.value.pt("private.
|
|
2380
|
+
}, toDisplayString(tx.value.pt(endIsWithdrawal.value ? "private.activation.withdrawContractConfirm" : "private.activation.endPrivateConfirm")), 9, _hoisted_8$e),
|
|
2217
2381
|
createElementVNode("button", {
|
|
2218
2382
|
type: "button",
|
|
2219
2383
|
class: "bcm-p-btn",
|
|
@@ -2222,8 +2386,8 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
2222
2386
|
], 64))
|
|
2223
2387
|
])
|
|
2224
2388
|
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
2225
|
-
a.value.activation.state === "refused" ? (openBlock(), createElementBlock("p",
|
|
2226
|
-
!addressReady.value ? (openBlock(), createElementBlock("p",
|
|
2389
|
+
a.value.activation.state === "refused" ? (openBlock(), createElementBlock("p", _hoisted_9$c, toDisplayString(tx.value.pt("private.activation.refused")), 1)) : (openBlock(), createElementBlock("p", _hoisted_10$9, toDisplayString(tx.value.pt("private.activation.intro")), 1)),
|
|
2390
|
+
!addressReady.value ? (openBlock(), createElementBlock("p", _hoisted_11$8, toDisplayString(tx.value.pt("private.activation.addressFirst")), 1)) : !deviceReady.value ? (openBlock(), createElementBlock("p", _hoisted_12$8, toDisplayString(tx.value.pt("private.activation.approvedOnly")), 1)) : createCommentVNode("", true),
|
|
2227
2391
|
s.value.promise ? (openBlock(), createBlock(_sfc_main$n, {
|
|
2228
2392
|
key: 4,
|
|
2229
2393
|
keys: s.value.promise.keys,
|
|
@@ -2239,12 +2403,12 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
2239
2403
|
"accepted-at": acceptedAt.value
|
|
2240
2404
|
}, null, 8, ["text", "lang", "display", "accepted-at"]);
|
|
2241
2405
|
}), 128)),
|
|
2242
|
-
a.value.announced.length > 0 ? (openBlock(), createElementBlock("div",
|
|
2406
|
+
a.value.announced.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_13$6, [
|
|
2243
2407
|
(openBlock(true), createElementBlock(Fragment, null, renderList(a.value.announced, (t) => {
|
|
2244
2408
|
return openBlock(), createElementBlock(Fragment, {
|
|
2245
2409
|
key: t.id
|
|
2246
2410
|
}, [
|
|
2247
|
-
createElementVNode("p",
|
|
2411
|
+
createElementVNode("p", _hoisted_14$5, toDisplayString(tx.value.pt("private.activation.announced", { date: tx.value.when(t.effectiveAt, false) })), 1),
|
|
2248
2412
|
createVNode(_sfc_main$o, {
|
|
2249
2413
|
text: t,
|
|
2250
2414
|
lang: __props.lang,
|
|
@@ -2254,7 +2418,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
2254
2418
|
], 64);
|
|
2255
2419
|
}), 128))
|
|
2256
2420
|
])) : createCommentVNode("", true),
|
|
2257
|
-
createElementVNode("label",
|
|
2421
|
+
createElementVNode("label", _hoisted_15$5, [
|
|
2258
2422
|
withDirectives(createElementVNode("input", {
|
|
2259
2423
|
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => acceptTerms.value = $event),
|
|
2260
2424
|
type: "checkbox",
|
|
@@ -2271,7 +2435,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
2271
2435
|
display: display.value,
|
|
2272
2436
|
"accepted-at": acceptedAt.value
|
|
2273
2437
|
}, null, 8, ["text", "lang", "display", "accepted-at"]),
|
|
2274
|
-
createElementVNode("label",
|
|
2438
|
+
createElementVNode("label", _hoisted_16$5, [
|
|
2275
2439
|
withDirectives(createElementVNode("input", {
|
|
2276
2440
|
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => art9Tenant.value = $event),
|
|
2277
2441
|
type: "checkbox",
|
|
@@ -2289,7 +2453,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
2289
2453
|
display: display.value,
|
|
2290
2454
|
"accepted-at": acceptedAt.value
|
|
2291
2455
|
}, null, 8, ["text", "lang", "display", "accepted-at"]),
|
|
2292
|
-
createElementVNode("label",
|
|
2456
|
+
createElementVNode("label", _hoisted_17$3, [
|
|
2293
2457
|
withDirectives(createElementVNode("input", {
|
|
2294
2458
|
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => art9.value = $event),
|
|
2295
2459
|
type: "checkbox",
|
|
@@ -2300,22 +2464,22 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
2300
2464
|
createTextVNode(toDisplayString(tx.value.pt("private.activation.art9")), 1)
|
|
2301
2465
|
])
|
|
2302
2466
|
], 64)) : createCommentVNode("", true),
|
|
2303
|
-
s.value.art9Declined ? (openBlock(), createElementBlock("p",
|
|
2304
|
-
createElementVNode("div",
|
|
2467
|
+
s.value.art9Declined ? (openBlock(), createElementBlock("p", _hoisted_18$3, toDisplayString(tx.value.pt("private.activation.declined")), 1)) : createCommentVNode("", true),
|
|
2468
|
+
createElementVNode("div", _hoisted_19$3, [
|
|
2305
2469
|
createElementVNode("button", {
|
|
2306
2470
|
type: "button",
|
|
2307
2471
|
class: "bcm-p-btn bcm-p-primary",
|
|
2308
2472
|
disabled: !canSubmit.value,
|
|
2309
2473
|
"data-action": "activate",
|
|
2310
2474
|
onClick: _cache[6] || (_cache[6] = ($event) => __props.controller.activate({ acceptTerms: acceptTerms.value, art9: "accept", art9Tenant: art9Tenant.value }))
|
|
2311
|
-
}, toDisplayString(tx.value.pt("private.activation.submit")), 9,
|
|
2475
|
+
}, toDisplayString(tx.value.pt("private.activation.submit")), 9, _hoisted_20$3),
|
|
2312
2476
|
createElementVNode("button", {
|
|
2313
2477
|
type: "button",
|
|
2314
2478
|
class: "bcm-p-btn",
|
|
2315
2479
|
disabled: !canRefuse.value,
|
|
2316
2480
|
"data-action": "refuse",
|
|
2317
2481
|
onClick: _cache[7] || (_cache[7] = ($event) => __props.controller.activate({ acceptTerms: acceptTerms.value, art9: "refuse", art9Tenant: false }))
|
|
2318
|
-
}, toDisplayString(tx.value.pt("private.activation.art9Refuse")), 9,
|
|
2482
|
+
}, toDisplayString(tx.value.pt("private.activation.art9Refuse")), 9, _hoisted_21$3)
|
|
2319
2483
|
])
|
|
2320
2484
|
], 64))
|
|
2321
2485
|
])) : createCommentVNode("", true);
|
|
@@ -4635,7 +4799,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
4635
4799
|
lang: __props.lang
|
|
4636
4800
|
}, null, 8, ["controller", "lang"])) : createCommentVNode("", true),
|
|
4637
4801
|
s.value.screenFailures[current.value] ? (openBlock(), createElementBlock("p", _hoisted_3$2, toDisplayString(tx.value.refText(s.value.screenFailures[current.value] ?? null)), 1)) : createCommentVNode("", true),
|
|
4638
|
-
createVNode(_sfc_main$
|
|
4802
|
+
createVNode(_sfc_main$s, {
|
|
4639
4803
|
provider: s.value.provider,
|
|
4640
4804
|
lang: __props.lang
|
|
4641
4805
|
}, null, 8, ["provider", "lang"])
|
|
@@ -5145,7 +5309,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
5145
5309
|
class: "bcm-p-link",
|
|
5146
5310
|
"data-full-page": ""
|
|
5147
5311
|
}, toDisplayString(tx.value.pt("private.dock.fullPage")), 9, _hoisted_14)) : createCommentVNode("", true),
|
|
5148
|
-
createVNode(_sfc_main$
|
|
5312
|
+
createVNode(_sfc_main$s, {
|
|
5149
5313
|
provider: controller.value?.state.provider ?? null,
|
|
5150
5314
|
lang: unref(lang)
|
|
5151
5315
|
}, null, 8, ["provider", "lang"])
|
|
@@ -5245,7 +5409,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
5245
5409
|
};
|
|
5246
5410
|
}
|
|
5247
5411
|
});
|
|
5248
|
-
const css = "/* The private elements' one stylesheet (each shadow root carries it, with the CSP nonce). Colours follow the host's\n `color-scheme`; a host themes them through the custom properties below. */\n:host {\n --bcm-p-fg: CanvasText;\n --bcm-p-bg: Canvas;\n --bcm-p-muted: GrayText;\n --bcm-p-accent: #2f6f4f;\n --bcm-p-danger: #a3261f;\n --bcm-p-radius: 10px;\n display: block;\n font: inherit;\n color: var(--bcm-p-fg);\n}\n/* The host hides the dock on a page without unmounting it (§6.2): its session and windows stay. */\n:host([hidden-by-host]) {\n display: none !important;\n}\n:host([hidden]) {\n display: none;\n}\n.bcm-p-root { box-sizing: border-box; }\n.bcm-p-root *, .bcm-p-root *::before, .bcm-p-root *::after { box-sizing: inherit; }\n.bcm-p-screen h2 { font-size: 1.15em; margin: 0 0 0.5em; }\n.bcm-p-screen h3 { font-size: 1em; margin: 0.75em 0 0.25em; }\n.bcm-p-muted { color: var(--bcm-p-muted); font-size: 0.9em; }\n.bcm-p-note { border-left: 3px solid var(--bcm-p-accent); padding-left: 0.6em; }\n.bcm-p-warning { border-left: 3px solid var(--bcm-p-danger); padding-left: 0.6em; }\n.bcm-p-error { color: var(--bcm-p-danger); }\n.bcm-p-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }\n.bcm-p-btn {\n font: inherit; cursor: pointer; border: 1px solid currentColor; background: transparent; color: inherit;\n border-radius: var(--bcm-p-radius); padding: 0.45em 0.9em; margin: 0.2em 0.4em 0.2em 0;\n}\n.bcm-p-btn:disabled { opacity: 0.55; cursor: default; }\n.bcm-p-primary { background: var(--bcm-p-accent); border-color: var(--bcm-p-accent); color: #fff; }\n.bcm-p-danger { border-color: var(--bcm-p-danger); color: var(--bcm-p-danger); }\n.bcm-p-link { font: inherit; background: none; border: 0; padding: 0.2em 0; color: var(--bcm-p-accent); cursor: pointer; text-decoration: underline; }\n.bcm-p-icon { font: inherit; background: none; border: 0; cursor: pointer; font-size: 1.3em; line-height: 1; color: inherit; }\n.bcm-p-input { font: inherit; padding: 0.45em; border: 1px solid var(--bcm-p-muted); border-radius: var(--bcm-p-radius); min-width: 10ch; }\n.bcm-p-row { display: flex; gap: 0.5em; align-items: center; flex-wrap: wrap; }\n.bcm-p-actions { display: flex; flex-wrap: wrap; gap: 0.25em; margin: 0.5em 0; }\n.bcm-p-list, .bcm-p-menu { list-style: none; padding: 0; margin: 0.5em 0; }\n.bcm-p-list > li { border-top: 1px solid color-mix(in srgb, var(--bcm-p-muted) 35%, transparent); padding: 0.5em 0; }\n.bcm-p-unread { font-weight: 600; }\n.bcm-p-badge { display: inline-block; font-size: 0.8em; border: 1px solid var(--bcm-p-muted); border-radius: 999px; padding: 0 0.5em; margin-left: 0.4em; }\n.bcm-p-code { font-family: ui-monospace, monospace; font-size: 1.4em; letter-spacing: 0.15em; }\n.bcm-p-check { display: flex; gap: 0.5em; align-items: flex-start; margin: 0.4em 0; }\n.bcm-p-legal { margin: 0.75em 0; }\n.bcm-p-legal-body { white-space: pre-wrap; max-height: 18em; overflow: auto; border: 1px solid color-mix(in srgb, var(--bcm-p-muted) 35%, transparent); border-radius: var(--bcm-p-radius); padding: 0.6em; }\n.bcm-p-provider { margin-top: 1em; font-size: 0.85em; color: var(--bcm-p-muted); }\n.bcm-p-provider-links a { margin-right: 0.8em; color: inherit; }\n.bcm-p-dot { display: inline-block; width: 0.6em; height: 0.6em; border-radius: 50%; background: var(--bcm-p-danger); margin-left: 0.35em; vertical-align: middle; }\n/* The dock: fixed to the bottom corner, windows beside the launcher. */\n.bcm-p-dock { position: fixed; right: 16px; bottom: 16px; z-index: 2147483000; display: flex; align-items: flex-end; gap: 12px; }\n.bcm-p-launcher {\n font: inherit; cursor: pointer; border: 0; border-radius: 999px; padding: 0.7em 1.1em; background: var(--bcm-p-accent); color: #fff;\n box-shadow: 0 4px 16px rgb(0 0 0 / 0.2); text-decoration: none;\n}\n.bcm-p-panel, .bcm-p-window {\n background: var(--bcm-p-bg); border-radius: var(--bcm-p-radius); box-shadow: 0 8px 28px rgb(0 0 0 / 0.25);\n width: 320px; max-height: 70vh; overflow: auto; padding: 0.8em;\n}\n.bcm-p-windows { display: flex; gap: 12px; align-items: flex-end; }\n.bcm-p-window-head { display: flex; justify-content: space-between; align-items: center; gap: 0.5em; }\n.bcm-p-window-head h2 { font-size: 1em; margin: 0; }\n/* A phone: a window takes the whole screen. */\n.bcm-p-mobile .bcm-p-window { position: fixed; inset: 0; width: auto; max-height: none; border-radius: 0; }\n.bcm-p-mobile .bcm-p-panel { position: fixed; left: 8px; right: 8px; bottom: 72px; width: auto; }\n/* The conversations (DM8b): the member's own messages to the right, search hits marked, the composer full width. */\n.bcm-p-dm-messages > li { position: relative; padding-right: 2em; }\n.bcm-p-dm-messages > li > .bcm-p-icon { position: absolute; top: 0.4em; right: 0; }\n.bcm-p-dm-mine { text-align: right; }\n.bcm-p-dm-mine .bcm-p-actions { justify-content: flex-end; }\n.bcm-p-dm-hit { background: color-mix(in srgb, var(--bcm-p-accent) 14%, transparent); }\n.bcm-p-dm-body { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0.2em 0; }\n.bcm-p-dm-meta { margin: 0; }\n.bcm-p-dm-box { width: 100%; resize: vertical; }\n.bcm-p-dm-sentence p { margin: 0.15em 0; }\n.bcm-p-dm-href { overflow-wrap: anywhere; }\n.bcm-p-dm-tabs { margin: 0.25em 0 0.75em; }\n.bcm-p-dm-tabs [aria-current='page'] { font-weight: 600; text-decoration: none; }\n";
|
|
5412
|
+
const css = "/* The private elements' one stylesheet (each shadow root carries it, with the CSP nonce). Colours follow the host's\n `color-scheme`; a host themes them through the custom properties below. */\n:host {\n --bcm-p-fg: CanvasText;\n --bcm-p-bg: Canvas;\n --bcm-p-muted: GrayText;\n --bcm-p-accent: #2f6f4f;\n --bcm-p-danger: #a3261f;\n --bcm-p-radius: 10px;\n display: block;\n font: inherit;\n color: var(--bcm-p-fg);\n}\n/* The host hides the dock on a page without unmounting it (§6.2): its session and windows stay. */\n:host([hidden-by-host]) {\n display: none !important;\n}\n:host([hidden]) {\n display: none;\n}\n.bcm-p-root { box-sizing: border-box; }\n.bcm-p-root *, .bcm-p-root *::before, .bcm-p-root *::after { box-sizing: inherit; }\n.bcm-p-screen h2 { font-size: 1.15em; margin: 0 0 0.5em; }\n.bcm-p-screen h3 { font-size: 1em; margin: 0.75em 0 0.25em; }\n.bcm-p-muted { color: var(--bcm-p-muted); font-size: 0.9em; }\n.bcm-p-note { border-left: 3px solid var(--bcm-p-accent); padding-left: 0.6em; }\n.bcm-p-warning { border-left: 3px solid var(--bcm-p-danger); padding-left: 0.6em; }\n.bcm-p-error { color: var(--bcm-p-danger); }\n.bcm-p-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }\n.bcm-p-btn {\n font: inherit; cursor: pointer; border: 1px solid currentColor; background: transparent; color: inherit;\n border-radius: var(--bcm-p-radius); padding: 0.45em 0.9em; margin: 0.2em 0.4em 0.2em 0;\n}\n.bcm-p-btn:disabled { opacity: 0.55; cursor: default; }\n.bcm-p-primary { background: var(--bcm-p-accent); border-color: var(--bcm-p-accent); color: #fff; }\n.bcm-p-danger { border-color: var(--bcm-p-danger); color: var(--bcm-p-danger); }\n.bcm-p-link { font: inherit; background: none; border: 0; padding: 0.2em 0; color: var(--bcm-p-accent); cursor: pointer; text-decoration: underline; }\n.bcm-p-icon { font: inherit; background: none; border: 0; cursor: pointer; font-size: 1.3em; line-height: 1; color: inherit; }\n.bcm-p-input { font: inherit; padding: 0.45em; border: 1px solid var(--bcm-p-muted); border-radius: var(--bcm-p-radius); min-width: 10ch; }\n.bcm-p-row { display: flex; gap: 0.5em; align-items: center; flex-wrap: wrap; }\n.bcm-p-actions { display: flex; flex-wrap: wrap; gap: 0.25em; margin: 0.5em 0; }\n.bcm-p-list, .bcm-p-menu { list-style: none; padding: 0; margin: 0.5em 0; }\n.bcm-p-list > li { border-top: 1px solid color-mix(in srgb, var(--bcm-p-muted) 35%, transparent); padding: 0.5em 0; }\n.bcm-p-unread { font-weight: 600; }\n.bcm-p-badge { display: inline-block; font-size: 0.8em; border: 1px solid var(--bcm-p-muted); border-radius: 999px; padding: 0 0.5em; margin-left: 0.4em; }\n.bcm-p-code { font-family: ui-monospace, monospace; font-size: 1.4em; letter-spacing: 0.15em; }\n.bcm-p-check { display: flex; gap: 0.5em; align-items: flex-start; margin: 0.4em 0; }\n.bcm-p-legal { margin: 0.75em 0; }\n.bcm-p-legal-body { white-space: pre-wrap; max-height: 18em; overflow: auto; border: 1px solid color-mix(in srgb, var(--bcm-p-muted) 35%, transparent); border-radius: var(--bcm-p-radius); padding: 0.6em; }\n/* A legal text's blocks (LegalBlocks): the same scroll box; a run's `\\n` is a hard line break. */\n.bcm-p-legal-doc { max-height: 18em; overflow: auto; overflow-wrap: anywhere; white-space: pre-line; border: 1px solid color-mix(in srgb, var(--bcm-p-muted) 35%, transparent); border-radius: var(--bcm-p-radius); padding: 0 0.6em; }\n.bcm-p-legal-doc h3, .bcm-p-legal-doc h4, .bcm-p-legal-doc h5, .bcm-p-legal-doc h6 { font-size: 1em; margin: 0.9em 0 0.3em; }\n.bcm-p-legal-doc h3 { font-size: 1.08em; }\n.bcm-p-legal-doc p { margin: 0.5em 0; }\n.bcm-p-legal-doc ul, .bcm-p-legal-doc ol { margin: 0.5em 0; padding-left: 1.4em; }\n.bcm-p-legal-doc li > p { margin: 0.2em 0; }\n.bcm-p-legal-doc code { font-family: ui-monospace, monospace; font-size: 0.92em; }\n.bcm-p-legal-doc a { color: inherit; }\n.bcm-p-provider { margin-top: 1em; font-size: 0.85em; color: var(--bcm-p-muted); }\n.bcm-p-provider-links a { margin-right: 0.8em; color: inherit; }\n.bcm-p-dot { display: inline-block; width: 0.6em; height: 0.6em; border-radius: 50%; background: var(--bcm-p-danger); margin-left: 0.35em; vertical-align: middle; }\n/* The dock: fixed to the bottom corner, windows beside the launcher. */\n.bcm-p-dock { position: fixed; right: 16px; bottom: 16px; z-index: 2147483000; display: flex; align-items: flex-end; gap: 12px; }\n.bcm-p-launcher {\n font: inherit; cursor: pointer; border: 0; border-radius: 999px; padding: 0.7em 1.1em; background: var(--bcm-p-accent); color: #fff;\n box-shadow: 0 4px 16px rgb(0 0 0 / 0.2); text-decoration: none;\n}\n.bcm-p-panel, .bcm-p-window {\n background: var(--bcm-p-bg); border-radius: var(--bcm-p-radius); box-shadow: 0 8px 28px rgb(0 0 0 / 0.25);\n width: 320px; max-height: 70vh; overflow: auto; padding: 0.8em;\n}\n.bcm-p-windows { display: flex; gap: 12px; align-items: flex-end; }\n.bcm-p-window-head { display: flex; justify-content: space-between; align-items: center; gap: 0.5em; }\n.bcm-p-window-head h2 { font-size: 1em; margin: 0; }\n/* A phone: a window takes the whole screen. */\n.bcm-p-mobile .bcm-p-window { position: fixed; inset: 0; width: auto; max-height: none; border-radius: 0; }\n.bcm-p-mobile .bcm-p-panel { position: fixed; left: 8px; right: 8px; bottom: 72px; width: auto; }\n/* The conversations (DM8b): the member's own messages to the right, search hits marked, the composer full width. */\n.bcm-p-dm-messages > li { position: relative; padding-right: 2em; }\n.bcm-p-dm-messages > li > .bcm-p-icon { position: absolute; top: 0.4em; right: 0; }\n.bcm-p-dm-mine { text-align: right; }\n.bcm-p-dm-mine .bcm-p-actions { justify-content: flex-end; }\n.bcm-p-dm-hit { background: color-mix(in srgb, var(--bcm-p-accent) 14%, transparent); }\n.bcm-p-dm-body { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0.2em 0; }\n.bcm-p-dm-meta { margin: 0; }\n.bcm-p-dm-box { width: 100%; resize: vertical; }\n.bcm-p-dm-sentence p { margin: 0.15em 0; }\n.bcm-p-dm-href { overflow-wrap: anywhere; }\n.bcm-p-dm-tabs { margin: 0.25em 0 0.75em; }\n.bcm-p-dm-tabs [aria-current='page'] { font-weight: 600; text-decoration: none; }\n";
|
|
5249
5413
|
const CHAT_DOCK_ELEMENT_TAG = "blogmcp-chat-dock";
|
|
5250
5414
|
const PRIVATE_VIEW_ELEMENT_TAG = "blogmcp-private-view";
|
|
5251
5415
|
const HIDDEN_BY_HOST_ATTR = "hidden-by-host";
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
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-SKmc4NgD.js";
|
|
2
|
-
const VERSION = "0.5.
|
|
2
|
+
const VERSION = "0.5.2";
|
|
3
3
|
export {
|
|
4
4
|
ab as AVATAR_PRESETS,
|
|
5
5
|
B as BADGE_ELEMENT_TAG,
|
|
@@ -6,9 +6,10 @@
|
|
|
6
6
|
* receives what the member is about to write — the other participant; the website's code, which puts it on the screen
|
|
7
7
|
* under tenant rendering (and, where the website and blogmcp are the same legal person, `same_entity`, the line that
|
|
8
8
|
* says this person writes that code and is barred by the law, not by a contract it would sign with itself); whoever
|
|
9
|
-
* handles a report, with the at most 10 preceding messages the matrix gives them;
|
|
10
|
-
* every row, so the list never reads as complete without it; the
|
|
11
|
-
* member (under both renderings); and that the messages are
|
|
9
|
+
* handles a report, with the at most 10 preceding messages the matrix gives them; a court's order or a judge's
|
|
10
|
+
* consent (texts 20, 21, 23 and 24), which is in every row, so the list never reads as complete without it; the
|
|
11
|
+
* delegated addendum where the website can sign in as the member (under both renderings); and that the messages are
|
|
12
|
+
* not end-to-end encrypted. test/private/dm/composer.spec.ts
|
|
12
13
|
* checks every space × identity × rendering × same-entity × host combination against the promise's own keys, and the
|
|
13
14
|
* tone test covers its words with the rest of the conversations' catalogue.
|
|
14
15
|
*
|
package/dist/private/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A, h, C, F, D, L, N, M, E, B, X, n, o, H, T, U, V, t, k, j, P, s, J, I, K, z, G, x, l, e, a, d, b, y, S, w, O, i, q, Z, Q, m, c, R, u, f, v, p, g, r, W, Y } from "../chunks/private-mount-
|
|
2
|
-
const VERSION = "0.5.
|
|
1
|
+
import { A, h, C, F, D, L, N, M, E, B, X, n, o, H, T, U, V, t, k, j, P, s, J, I, K, z, G, x, l, e, a, d, b, y, S, w, O, i, q, Z, Q, m, c, R, u, f, v, p, g, r, W, Y } from "../chunks/private-mount-B7EjskRH.js";
|
|
2
|
+
const VERSION = "0.5.2";
|
|
3
3
|
export {
|
|
4
4
|
A as ACCOUNT_STATE_EVENTS,
|
|
5
5
|
h as APPROVAL_LIMIT_CODES,
|
package/dist/private/react.js
CHANGED
|
@@ -21,14 +21,14 @@ function useMounted(kind, props, load, inPlace = []) {
|
|
|
21
21
|
return { host, element: createElement("div", { ref: host, "data-blogmcp-community": kind }) };
|
|
22
22
|
}
|
|
23
23
|
function KbChatDock(props) {
|
|
24
|
-
const { host, element } = useMounted("chat-dock", props, async () => (await import("../chunks/private-mount-
|
|
24
|
+
const { host, element } = useMounted("chat-dock", props, async () => (await import("../chunks/private-mount-B7EjskRH.js").then((n) => n._)).mountChatDock, ["hiddenByHost"]);
|
|
25
25
|
useEffect(() => {
|
|
26
26
|
host.current?.firstElementChild?.toggleAttribute(HIDDEN_BY_HOST, props.hiddenByHost === true);
|
|
27
27
|
}, [host, props.hiddenByHost]);
|
|
28
28
|
return element;
|
|
29
29
|
}
|
|
30
30
|
function KbPrivateView(props) {
|
|
31
|
-
return useMounted("private-view", props, async () => (await import("../chunks/private-mount-
|
|
31
|
+
return useMounted("private-view", props, async () => (await import("../chunks/private-mount-B7EjskRH.js").then((n) => n._)).mountPrivateView).element;
|
|
32
32
|
}
|
|
33
33
|
export {
|
|
34
34
|
KbChatDock,
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A legal text's blocks (`legalTextBlocks`, §5.11 "Formatting") as elements with text in them, never as markup:
|
|
3
|
+
* headings two levels below the screen's `<h2>`, paragraphs, and lists whose items are this component again.
|
|
4
|
+
*/
|
|
5
|
+
import type { LegalTextBlock } from '@blogmcp/sdk/community';
|
|
6
|
+
type __VLS_Props = {
|
|
7
|
+
blocks: readonly LegalTextBlock[];
|
|
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,7 @@
|
|
|
1
|
+
/** One run of a legal text: its text, inside `<strong>`, `<em>` and `<code>` as its marks say — text, never markup. */
|
|
2
|
+
import type { LegalTextRun } from '@blogmcp/sdk/community';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
run: LegalTextRun;
|
|
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,6 @@
|
|
|
1
|
+
import type { LegalTextRun } from '@blogmcp/sdk/community';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
runs: readonly LegalTextRun[];
|
|
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,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A legal text's blocks on a private screen (m4-contracts.md §5.11 "Formatting"): `legalTextBlocks` of the SDK parses
|
|
3
|
+
* the body's Markdown subset, and the components render the blocks as elements with text in them — never as markup.
|
|
4
|
+
* The session's placeholders are filled in the runs, after parsing, so a filled value is never read as Markdown.
|
|
5
|
+
*/
|
|
6
|
+
import type { LegalTextBlock, LegalTextRun } from '@blogmcp/sdk/community';
|
|
7
|
+
/** The blocks with every run's text passed through `fill`. */
|
|
8
|
+
export declare function fillBlocks(blocks: readonly LegalTextBlock[], fill: (text: string) => string): LegalTextBlock[];
|
|
9
|
+
/** Consecutive runs of one link together (one `<a>`), the rest one by one with no href. */
|
|
10
|
+
export declare function linkGroups(runs: readonly LegalTextRun[]): Array<{
|
|
11
|
+
href: string | null;
|
|
12
|
+
runs: LegalTextRun[];
|
|
13
|
+
}>;
|
|
14
|
+
/** A text's heading level on a screen: two below the screen's own `<h2>`, at most `<h6>`. */
|
|
15
|
+
export declare const headingLevel: (level: number) => 3 | 4 | 5 | 6;
|
package/dist/private/vue.js
CHANGED
|
@@ -50,7 +50,7 @@ const KbChatDock = defineComponent({
|
|
|
50
50
|
props: { ...commonProps, hiddenByHost: Boolean },
|
|
51
51
|
setup(props) {
|
|
52
52
|
const opts = () => defined({ ...props, hiddenByHost: void 0 });
|
|
53
|
-
const host = useMount("chat-dock", opts, async () => (await import("../chunks/private-mount-
|
|
53
|
+
const host = useMount("chat-dock", opts, async () => (await import("../chunks/private-mount-B7EjskRH.js").then((n) => n._)).mountChatDock, (el) => el?.toggleAttribute(HIDDEN_BY_HOST, props.hiddenByHost));
|
|
54
54
|
watch(
|
|
55
55
|
() => props.hiddenByHost,
|
|
56
56
|
(hidden) => host.value?.firstElementChild?.toggleAttribute(HIDDEN_BY_HOST, hidden)
|
|
@@ -62,7 +62,7 @@ const KbPrivateView = defineComponent({
|
|
|
62
62
|
name: "KbPrivateView",
|
|
63
63
|
props: { ...commonProps, screen: String },
|
|
64
64
|
setup(props) {
|
|
65
|
-
const host = useMount("private-view", () => defined({ ...props }), async () => (await import("../chunks/private-mount-
|
|
65
|
+
const host = useMount("private-view", () => defined({ ...props }), async () => (await import("../chunks/private-mount-B7EjskRH.js").then((n) => n._)).mountPrivateView);
|
|
66
66
|
return () => h("div", { ref: host, "data-blogmcp-community": "private-view" });
|
|
67
67
|
}
|
|
68
68
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blogmcp/community",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.2",
|
|
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": {
|
|
@@ -59,8 +59,8 @@
|
|
|
59
59
|
"postpack": "node ../../scripts/pack-dist-types.mjs postpack"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"@blogmcp/sanitize": "^0.14.
|
|
63
|
-
"@blogmcp/sdk": "^0.14.
|
|
62
|
+
"@blogmcp/sanitize": "^0.14.2",
|
|
63
|
+
"@blogmcp/sdk": "^0.14.2",
|
|
64
64
|
"vue": "^3.5.0"
|
|
65
65
|
},
|
|
66
66
|
"peerDependencies": {
|