@blogmcp/community 0.4.0 → 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.
Files changed (150) hide show
  1. package/dist/blogmcp-community-private.global.js +4 -0
  2. package/dist/blogmcp-community.global.js +3 -3
  3. package/dist/chunks/{mount-Ts_r2fwt.js → mount-SKmc4NgD.js} +39 -9
  4. package/dist/chunks/private-mount-bhCQeScD.js +5397 -0
  5. package/dist/core/attrs.d.ts +15 -0
  6. package/dist/core/settings.d.ts +5 -0
  7. package/dist/index.js +2 -2
  8. package/dist/private/core/dock.d.ts +38 -0
  9. package/dist/private/core/push.d.ts +49 -0
  10. package/dist/private/core/realtime.d.ts +57 -0
  11. package/dist/private/core/setup.d.ts +43 -0
  12. package/dist/private/core/view.d.ts +179 -0
  13. package/dist/private/dm/composer.d.ts +34 -0
  14. package/dist/private/dm/controller.d.ts +162 -0
  15. package/dist/private/dm/index.d.ts +14 -0
  16. package/dist/private/dm/links.d.ts +33 -0
  17. package/dist/private/dm/muted.d.ts +37 -0
  18. package/dist/private/dm/search.d.ts +7 -0
  19. package/dist/private/dm/text.d.ts +27 -0
  20. package/dist/private/dm/ui/DmBlocks.vue.d.ts +8 -0
  21. package/dist/private/dm/ui/DmCases.vue.d.ts +8 -0
  22. package/dist/private/dm/ui/DmComposer.vue.d.ts +20 -0
  23. package/dist/private/dm/ui/DmInbox.vue.d.ts +12 -0
  24. package/dist/private/dm/ui/DmLinkWarning.vue.d.ts +8 -0
  25. package/dist/private/dm/ui/DmLocalAids.vue.d.ts +8 -0
  26. package/dist/private/dm/ui/DmMessageText.vue.d.ts +8 -0
  27. package/dist/private/dm/ui/DmNew.vue.d.ts +12 -0
  28. package/dist/private/dm/ui/DmReport.vue.d.ts +8 -0
  29. package/dist/private/dm/ui/DmRequests.vue.d.ts +12 -0
  30. package/dist/private/dm/ui/DmScreens.vue.d.ts +9 -0
  31. package/dist/private/dm/ui/DmThread.vue.d.ts +9 -0
  32. package/dist/private/element.d.ts +23 -0
  33. package/dist/private/global.d.ts +10 -0
  34. package/dist/private/i18n.d.ts +41 -0
  35. package/dist/private/index.d.ts +32 -0
  36. package/dist/private/index.js +57 -0
  37. package/dist/private/mount.d.ts +55 -0
  38. package/dist/private/pages/api.d.ts +44 -0
  39. package/dist/private/pages/element.d.ts +6 -0
  40. package/dist/private/pages/fragment.d.ts +43 -0
  41. package/dist/private/pages/i18n.d.ts +25 -0
  42. package/dist/private/pages/index.d.ts +1 -0
  43. package/dist/private/pages/pages.d.ts +276 -0
  44. package/dist/private/pages/proof.d.ts +36 -0
  45. package/dist/private/pages/provider-view.d.ts +33 -0
  46. package/dist/private/pages/setup.d.ts +42 -0
  47. package/dist/private/pages/ui/AccountPageRoot.vue.d.ts +9 -0
  48. package/dist/private/pages/ui/PageActivation.vue.d.ts +9 -0
  49. package/dist/private/pages/ui/PageAddress.vue.d.ts +8 -0
  50. package/dist/private/pages/ui/PageDeviceApprove.vue.d.ts +8 -0
  51. package/dist/private/pages/ui/PageDevices.vue.d.ts +8 -0
  52. package/dist/private/pages/ui/PageExport.vue.d.ts +8 -0
  53. package/dist/private/pages/ui/PageMessages.vue.d.ts +9 -0
  54. package/dist/private/react.d.ts +12 -0
  55. package/dist/private/react.js +36 -0
  56. package/dist/private/ui/ChatDockRoot.vue.d.ts +20 -0
  57. package/dist/private/ui/LegalText.vue.d.ts +13 -0
  58. package/dist/private/ui/PrivateScreens.vue.d.ts +14 -0
  59. package/dist/private/ui/PrivateViewRoot.vue.d.ts +23 -0
  60. package/dist/private/ui/PromiseBlock.vue.d.ts +9 -0
  61. package/dist/private/ui/ProviderLine.vue.d.ts +8 -0
  62. package/dist/private/ui/ScreenActivation.vue.d.ts +8 -0
  63. package/dist/private/ui/ScreenAddress.vue.d.ts +8 -0
  64. package/dist/private/ui/ScreenApproval.vue.d.ts +8 -0
  65. package/dist/private/ui/ScreenDevices.vue.d.ts +8 -0
  66. package/dist/private/ui/ScreenHome.vue.d.ts +12 -0
  67. package/dist/private/ui/ScreenNotifications.vue.d.ts +8 -0
  68. package/dist/private/ui/ScreenReads.vue.d.ts +8 -0
  69. package/dist/private/ui/ScreenSettings.vue.d.ts +8 -0
  70. package/dist/private/ui/root.d.ts +35 -0
  71. package/dist/private/ui/text.d.ts +22 -0
  72. package/dist/private/vue.d.ts +88 -0
  73. package/dist/private/vue.js +72 -0
  74. package/dist/react.js +14 -14
  75. package/dist/vue.js +14 -14
  76. package/package.json +23 -6
  77. package/src/core/attrs.ts +19 -0
  78. package/src/core/settings.ts +55 -12
  79. package/src/private/core/dock.ts +105 -0
  80. package/src/private/core/push.ts +166 -0
  81. package/src/private/core/realtime.ts +109 -0
  82. package/src/private/core/setup.ts +75 -0
  83. package/src/private/core/view.ts +920 -0
  84. package/src/private/dm/composer.ts +74 -0
  85. package/src/private/dm/controller.ts +636 -0
  86. package/src/private/dm/index.ts +14 -0
  87. package/src/private/dm/links.ts +55 -0
  88. package/src/private/dm/muted.ts +160 -0
  89. package/src/private/dm/search.ts +18 -0
  90. package/src/private/dm/text.ts +60 -0
  91. package/src/private/dm/ui/DmBlocks.vue +27 -0
  92. package/src/private/dm/ui/DmCases.vue +58 -0
  93. package/src/private/dm/ui/DmComposer.vue +68 -0
  94. package/src/private/dm/ui/DmInbox.vue +34 -0
  95. package/src/private/dm/ui/DmLinkWarning.vue +27 -0
  96. package/src/private/dm/ui/DmLocalAids.vue +43 -0
  97. package/src/private/dm/ui/DmMessageText.vue +16 -0
  98. package/src/private/dm/ui/DmNew.vue +46 -0
  99. package/src/private/dm/ui/DmReport.vue +93 -0
  100. package/src/private/dm/ui/DmRequests.vue +50 -0
  101. package/src/private/dm/ui/DmScreens.vue +66 -0
  102. package/src/private/dm/ui/DmThread.vue +235 -0
  103. package/src/private/element.ts +90 -0
  104. package/src/private/global.ts +14 -0
  105. package/src/private/i18n.ts +127 -0
  106. package/src/private/index.ts +68 -0
  107. package/src/private/messages/cs.json +311 -0
  108. package/src/private/messages/en.json +319 -0
  109. package/src/private/mount.ts +103 -0
  110. package/src/private/pages/api.ts +96 -0
  111. package/src/private/pages/build.d.mts +2 -0
  112. package/src/private/pages/build.mjs +72 -0
  113. package/src/private/pages/element.ts +49 -0
  114. package/src/private/pages/fragment.ts +63 -0
  115. package/src/private/pages/i18n.ts +82 -0
  116. package/src/private/pages/index.ts +10 -0
  117. package/src/private/pages/messages/cs.json +97 -0
  118. package/src/private/pages/messages/en.json +97 -0
  119. package/src/private/pages/pages.ts +410 -0
  120. package/src/private/pages/proof.ts +110 -0
  121. package/src/private/pages/provider-view.ts +121 -0
  122. package/src/private/pages/setup.ts +79 -0
  123. package/src/private/pages/ui/AccountPageRoot.vue +45 -0
  124. package/src/private/pages/ui/PageActivation.vue +42 -0
  125. package/src/private/pages/ui/PageAddress.vue +39 -0
  126. package/src/private/pages/ui/PageDeviceApprove.vue +62 -0
  127. package/src/private/pages/ui/PageDevices.vue +84 -0
  128. package/src/private/pages/ui/PageExport.vue +35 -0
  129. package/src/private/pages/ui/PageMessages.vue +39 -0
  130. package/src/private/pages/ui/account.css +6 -0
  131. package/src/private/react.ts +49 -0
  132. package/src/private/shims.d.ts +6 -0
  133. package/src/private/ui/ChatDockRoot.vue +119 -0
  134. package/src/private/ui/LegalText.vue +18 -0
  135. package/src/private/ui/PrivateScreens.vue +61 -0
  136. package/src/private/ui/PrivateViewRoot.vue +70 -0
  137. package/src/private/ui/PromiseBlock.vue +18 -0
  138. package/src/private/ui/ProviderLine.vue +20 -0
  139. package/src/private/ui/ScreenActivation.vue +82 -0
  140. package/src/private/ui/ScreenAddress.vue +37 -0
  141. package/src/private/ui/ScreenApproval.vue +71 -0
  142. package/src/private/ui/ScreenDevices.vue +42 -0
  143. package/src/private/ui/ScreenHome.vue +29 -0
  144. package/src/private/ui/ScreenNotifications.vue +44 -0
  145. package/src/private/ui/ScreenReads.vue +23 -0
  146. package/src/private/ui/ScreenSettings.vue +44 -0
  147. package/src/private/ui/private.css +81 -0
  148. package/src/private/ui/root.ts +89 -0
  149. package/src/private/ui/text.ts +40 -0
  150. package/src/private/vue.ts +87 -0
@@ -0,0 +1,319 @@
1
+ {
2
+ "private.title": "Private messages",
3
+ "private.loading": "Loading private messages…",
4
+ "private.signIn": "Private messages are for signed-in members. Sign in on the website.",
5
+ "private.failed": "Private messages could not be loaded right now. Please try again in a moment.",
6
+ "private.retry": "Try again",
7
+ "private.back": "Back",
8
+ "private.close": "Close",
9
+ "private.confirm": "Confirm",
10
+ "private.cancel": "Cancel",
11
+ "private.readOnly": "Private messages are read-only now. You can still view and download your content.",
12
+ "private.link.providerPage": "Private messages open on the blogmcp page that runs them.",
13
+ "private.link.open": "Open private messages",
14
+ "private.menu.title": "Private messages account",
15
+ "private.menu.activation": "Activation",
16
+ "private.menu.address": "Approval address",
17
+ "private.menu.approval": "Device approval",
18
+ "private.menu.devices": "Devices",
19
+ "private.menu.reads": "Read log",
20
+ "private.menu.notifications": "Notifications",
21
+ "private.menu.settings": "Settings",
22
+ "private.error.generic": "That did not work. Please try again.",
23
+ "private.error.network": "The connection failed. Check your connection and try again.",
24
+ "private.error.tooFast": "Too many attempts at once. Please try again in a moment.",
25
+ "private.error.devicePending": "This device is still waiting for approval.",
26
+ "private.error.addressRequired": "Set your device approval address first.",
27
+ "private.error.activationRequired": "Activate private messages first.",
28
+ "private.error.textChanged": "The text has changed in the meantime. Please read the new version.",
29
+ "private.error.notFound": "This is no longer valid. Please reload the page.",
30
+ "private.error.unavailable": "This part of private messages is not available right now.",
31
+ "private.error.approvalInvalid": "That code does not match. Check it and enter it again.",
32
+ "private.error.approvalExhausted": "This approval request is no longer valid: it expired, or too many wrong codes were entered. Please start a new one.",
33
+ "private.error.addressLocked": "The approval address cannot be set now: it is already verified, or another device is setting it.",
34
+ "private.error.restricted": "This action is not allowed right now: private messages are in a restricted mode.",
35
+ "private.error.identity": "Private messages on this website are not available for an account signed in through this website.",
36
+ "private.error.deviceRemoved": "This device was signed out. Please reload the page and have it approved again.",
37
+ "private.provider.line": "Private messages are run by {name}, company ID {ico}, {address}.",
38
+ "private.provider.contact": "Contact",
39
+ "private.provider.rules": "Rules",
40
+ "private.provider.terms": "Terms",
41
+ "private.provider.privacy": "Privacy",
42
+ "private.address.title": "Device approval address",
43
+ "private.address.why": "blogmcp writes to this address when a new device signs in, and sends a link to approve it.",
44
+ "private.address.none": "You have not set the address yet. You set it on a blogmcp page.",
45
+ "private.address.pending": "The address is waiting for confirmation. Open the link in the e-mail you received.",
46
+ "private.address.verified": "The address is confirmed: {email}",
47
+ "private.address.resetLock": "A new address can be set from {date}.",
48
+ "private.address.open": "Set the address on the blogmcp page",
49
+ "private.address.linkReady": "The link is ready and valid until {time}:",
50
+ "private.address.linkOpen": "Continue to the blogmcp page",
51
+ "private.activation.title": "Activate private messages",
52
+ "private.activation.intro": "Before you start writing private messages, please read the texts below.",
53
+ "private.activation.active": "Your private messages have been active since {date}.",
54
+ "private.activation.needed": "Your private messages are not active yet.",
55
+ "private.activation.refused": "You declined the processing of health data, so private messages stay off. You can activate them again at any time.",
56
+ "private.activation.announced": "A new version of the text, taking effect on {date}:",
57
+ "private.activation.version": "Version {version}",
58
+ "private.activation.acceptTerms": "I agree to the terms of private messages.",
59
+ "private.activation.art9": "I agree to the processing of health data as described in the text above.",
60
+ "private.activation.art9Tenant": "I also agree to the processing of health data as described in the website's text above.",
61
+ "private.activation.art9Refuse": "I do not agree to the processing of health data",
62
+ "private.activation.submit": "Activate private messages",
63
+ "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.",
64
+ "private.activation.done": "Private messages are active.",
65
+ "private.activation.withdraw": "Withdraw consent and end the activation",
66
+ "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.",
67
+ "private.activation.withdrawn": "Your consent is withdrawn.",
68
+ "private.activation.addressFirst": "Set your device approval address before you activate.",
69
+ "private.activation.approvedOnly": "Only an approved device can activate.",
70
+ "private.approval.title": "Approve this device",
71
+ "private.approval.pending": "This device cannot see earlier messages yet. Approve it from your approved device, or by e-mail.",
72
+ "private.approval.byCode": "I have a code from my approved device",
73
+ "private.approval.codeStarted": "On your approved device, open Private messages, then Device approval, and show the code. Then type it here.",
74
+ "private.approval.codeLabel": "Code from the approved device",
75
+ "private.approval.redeem": "Approve",
76
+ "private.approval.byEmail": "Approve by e-mail",
77
+ "private.approval.emailSent": "We sent an e-mail to your approval address. The page it links to will ask for this code:",
78
+ "private.approval.emailWhere": "The code belongs here only, on the device you are approving. If anyone else asks for it, do not give it to them.",
79
+ "private.approval.expires": "Valid until {time}.",
80
+ "private.approval.approved": "The device is approved.",
81
+ "private.approval.requests": "Devices waiting for approval",
82
+ "private.approval.noRequests": "Another device is not waiting for approval right now.",
83
+ "private.approval.request": "{label}, requested {time}, network {ip}",
84
+ "private.approval.otherNetwork": "Careful: this device is on another network than you. Show the code only to a device you are holding.",
85
+ "private.approval.show": "Show the code",
86
+ "private.approval.shownCode": "Code for the new device: {code}",
87
+ "private.approval.deny": "Deny",
88
+ "private.approval.denied": "The request is denied.",
89
+ "private.devices.title": "Your devices",
90
+ "private.devices.this": "This device",
91
+ "private.devices.state.first": "Approved",
92
+ "private.devices.state.approved": "Approved",
93
+ "private.devices.state.pending": "Waiting for approval",
94
+ "private.devices.signIn": "Signed in {date} from network {ip}",
95
+ "private.devices.lastSeen": "Last used {date}",
96
+ "private.devices.signOut": "Sign out",
97
+ "private.devices.signedOut": "The device is signed out.",
98
+ "private.devices.signOutAll": "Sign out every other device",
99
+ "private.devices.signedOutAll": "Devices signed out: {count}",
100
+ "private.devices.forget": "Forget this device",
101
+ "private.devices.forgetConfirm": "The device signs out and forgets its key. Next time it signs in as a new device that needs approval.",
102
+ "private.devices.forgotten": "The device is forgotten.",
103
+ "private.reads.title": "Read log",
104
+ "private.reads.why": "Every read of private messages is logged by hour and device, so you can spot a read that was not yours.",
105
+ "private.reads.row": "{hour}, {device}: {count} reads",
106
+ "private.reads.empty": "Reads were not logged here in the last 90 days.",
107
+ "private.notifications.title": "Notifications",
108
+ "private.notifications.empty": "There are no notifications yet.",
109
+ "private.notifications.markAll": "Mark all as read",
110
+ "private.notifications.more": "Show older notifications",
111
+ "private.notifications.code.device_new": "A new device signed in.",
112
+ "private.notifications.code.device_request": "A new device asks for approval.",
113
+ "private.notifications.code.private_decision": "A decision was made on a report that concerns you.",
114
+ "private.notifications.code.private_statement": "You have a statement of reasons for a decision that concerns you.",
115
+ "private.notifications.code.private_terms_change": "The terms of private messages are changing.",
116
+ "private.notifications.code.private_read_only": "Private messages are becoming read-only.",
117
+ "private.notifications.code.private_erasure_pending": "A participant's messages in one of your conversations will be erased soon. Report anything you need to keep.",
118
+ "private.push.title": "Notifications in this browser",
119
+ "private.push.enable": "Turn notifications on",
120
+ "private.push.disable": "Turn notifications off",
121
+ "private.push.on": "Notifications are on in this browser.",
122
+ "private.push.unsupported": "This browser does not support notifications.",
123
+ "private.push.denied": "The browser blocks notifications. You can allow them in its settings.",
124
+ "private.push.refused": "Notifications could not be turned on.",
125
+ "private.push.offFailed": "Notifications could not be turned off and are still on. Please try again.",
126
+ "private.push.stale": "This browser's notifications belong to the website's old key. Turn the notifications in the website's community settings off and on again, then turn them on here too.",
127
+ "private.settings.title": "Private messages settings",
128
+ "private.settings.audience": "Who can write to me",
129
+ "private.settings.audience.nobody": "Only people from my conversations",
130
+ "private.settings.audience.shared": "People from shared discussions and my contacts",
131
+ "private.settings.audience.anyone": "Any member",
132
+ "private.settings.readReceipts": "Show that I have read a message",
133
+ "private.settings.typing": "Show that I am typing",
134
+ "private.settings.saved": "Saved.",
135
+ "private.settings.unavailable": "Settings become available once private messages start.",
136
+ "private.dock.open": "Open private messages",
137
+ "private.dock.unread": "You have new notifications",
138
+ "private.dock.conversations": "Conversations",
139
+ "private.dock.noConversations": "Conversations appear here once private messages start.",
140
+ "private.dock.account": "Account and devices",
141
+ "private.dock.fullPage": "Open on a full page",
142
+ "private.dock.windows": "Open windows",
143
+ "private.promise.dm.core": "Private messages are only for you and the other participant. They are run by blogmcp.",
144
+ "private.promise.group.core": "Groups are for members only; a team member sees one only while visibly in the group with a badge.",
145
+ "private.promise.display.tenant": "The {site} website puts them on your screen, and its contract forbids it to read, store or measure them.",
146
+ "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.",
147
+ "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.",
148
+ "private.promise.orders": "Data the operator must hand over on a court or police order are an exception too.",
149
+ "private.promise.not_e2e": "They are not end-to-end encrypted.",
150
+ "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.",
151
+ "private.error.memberReadOnly": "Your account can only read for now, so you cannot use private messages on this site.",
152
+ "private.error.memberDeletion": "You asked for your account to be deleted, so private messages are no longer available to you.",
153
+ "private.error.quota": "This has been tried too many times today. Please try again later.",
154
+ "private.approval.limited.hour": "Too many approval requests came from this network in the last hour. Please try again in an hour.",
155
+ "private.approval.limited.day": "You have asked to approve a device too many times today. Please try again tomorrow.",
156
+ "private.approval.limited.device": "This device had too many unanswered or denied requests in the last 24 hours. Please try again tomorrow, or approve it with a code from an approved device.",
157
+ "private.approval.tryAgain": "Try again",
158
+ "private.menu.messages": "Conversations",
159
+ "private.dm.title": "Private messages",
160
+ "private.dm.unavailable": "Conversations cannot be opened in this view right now. Please reload the page.",
161
+ "private.dm.tabs.inbox": "Conversations",
162
+ "private.dm.tabs.new": "Write a new one",
163
+ "private.dm.tabs.requests": "Requests",
164
+ "private.dm.tabs.blocks": "Blocked",
165
+ "private.dm.tabs.cases": "Reports and decisions",
166
+ "private.dm.inbox.empty": "You have no conversations yet. Start one under Write a new one.",
167
+ "private.dm.inbox.unread": "unread: {count}",
168
+ "private.dm.inbox.lastActivity": "Last activity {date}",
169
+ "private.dm.inbox.more": "Load more",
170
+ "private.dm.counterpart.name": "{name} (@{handle})",
171
+ "private.dm.counterpart.deleted": "Deleted account",
172
+ "private.dm.request.sent": "Request awaiting acceptance",
173
+ "private.dm.request.received": "Conversation request",
174
+ "private.dm.request.accept": "Accept",
175
+ "private.dm.request.delete": "Delete",
176
+ "private.dm.request.blockReport": "Block and report",
177
+ "private.dm.request.accepted": "The request is accepted: you can write to each other now.",
178
+ "private.dm.request.deleted": "The request is deleted. We do not tell the sender, but it also goes from their list.",
179
+ "private.dm.requests.title": "Conversation requests",
180
+ "private.dm.requests.why": "Someone you share no discussion or contact with yet has written to you. Until you accept, they cannot see whether you read it, and its links are inactive.",
181
+ "private.dm.requests.empty": "There are no other requests waiting right now.",
182
+ "private.dm.requests.at": "Received {date}",
183
+ "private.dm.requests.read": "Read the request",
184
+ "private.dm.requests.waiting": "Requests waiting: {count}",
185
+ "private.dm.new.title": "Write a new message",
186
+ "private.dm.new.handle": "The handle of the person you want to write to",
187
+ "private.dm.new.placeholder": "@handle",
188
+ "private.dm.new.check": "Check",
189
+ "private.dm.new.direct": "You can write directly.",
190
+ "private.dm.new.request": "Your first message arrives as a request: text only, and its links stay inactive for the recipient until they accept it.",
191
+ "private.dm.new.no": "You cannot write to this person right now.",
192
+ "private.dm.new.unknown": "We cannot find anyone with this handle here, or they cannot receive your message right now.",
193
+ "private.dm.new.open": "Continue to the message",
194
+ "private.dm.thread.messages": "Messages",
195
+ "private.dm.thread.older": "Load older messages",
196
+ "private.dm.thread.empty": "There are no messages in this conversation yet.",
197
+ "private.dm.thread.typing": "Typing…",
198
+ "private.dm.thread.clear": "Clear the conversation for me",
199
+ "private.dm.thread.clearConfirm": "The messages go from your view only; the other participant keeps them.",
200
+ "private.dm.thread.cleared": "The conversation is cleared for you.",
201
+ "private.dm.message.you": "You",
202
+ "private.dm.message.them": "The other participant",
203
+ "private.dm.message.editedMark": "edited",
204
+ "private.dm.message.tombstone": "This message was deleted.",
205
+ "private.dm.message.removed": "Removed",
206
+ "private.dm.message.muted": "This message contains a word you muted.",
207
+ "private.dm.message.show": "Show",
208
+ "private.dm.message.read": "Read",
209
+ "private.dm.message.replyTo": "In reply to: {excerpt}",
210
+ "private.dm.message.actions": "Message options",
211
+ "private.dm.message.reply": "Reply",
212
+ "private.dm.message.edit": "Edit",
213
+ "private.dm.message.editLabel": "The edited message",
214
+ "private.dm.message.save": "Save",
215
+ "private.dm.message.edited": "The message is edited.",
216
+ "private.dm.message.deleteForAll": "Delete for everyone",
217
+ "private.dm.message.deleted": "The message is deleted for everyone.",
218
+ "private.dm.message.hide": "Delete for me",
219
+ "private.dm.message.hidden": "The message is deleted for you.",
220
+ "private.dm.message.report": "Report",
221
+ "private.dm.pending.queued": "Waiting to be sent.",
222
+ "private.dm.pending.sending": "Sending…",
223
+ "private.dm.pending.waiting": "Not sent yet; we will try again by ourselves.",
224
+ "private.dm.pending.failed": "Not sent.",
225
+ "private.dm.pending.discard": "Discard",
226
+ "private.dm.composer.label": "Message",
227
+ "private.dm.composer.placeholder": "Write a message",
228
+ "private.dm.composer.send": "Send",
229
+ "private.dm.composer.replyTo": "Replying to: {excerpt}",
230
+ "private.dm.composer.rulesReminder": "Write as you would speak face to face. The website's rules apply to private messages too.",
231
+ "private.dm.composer.rulesLink": "Rules",
232
+ "private.dm.composer.participants": "The other participant receives this message, and you see it.",
233
+ "private.dm.composer.display": "This website puts it on the screen, and its contract forbids it to read, store or measure it.",
234
+ "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.",
235
+ "private.dm.composer.reports": "If either of you reports it, whoever handles the report sees it with at most 10 preceding messages.",
236
+ "private.dm.composer.orders": "The operator must hand it over on a court or police order.",
237
+ "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.",
238
+ "private.dm.composer.notE2e": "Messages are not end-to-end encrypted.",
239
+ "private.dm.search.label": "Search the conversation",
240
+ "private.dm.search.placeholder": "Search loaded messages",
241
+ "private.dm.search.result": "Found: {count}.",
242
+ "private.dm.search.local": "Only the messages loaded on this device are searched; older ones are found once you load them.",
243
+ "private.dm.search.title": "Search",
244
+ "private.dm.search.settings": "Searching a conversation runs on this device only, in the messages it has loaded. What you search for is not sent anywhere.",
245
+ "private.dm.muted.title": "Muted words",
246
+ "private.dm.muted.why": "Messages with these words are folded away in a conversation. The list is kept in this browser only and matched here; it is not sent.",
247
+ "private.dm.muted.notKept": "This browser does not keep the list: it lasts until the page is closed.",
248
+ "private.dm.muted.label": "A word to mute",
249
+ "private.dm.muted.add": "Mute",
250
+ "private.dm.muted.remove": "Remove",
251
+ "private.dm.link.title": "A link from a private message",
252
+ "private.dm.link.where": "The link goes to {host}.",
253
+ "private.dm.link.why": "The other participant sent it. Open it only if you trust them and the address looks right.",
254
+ "private.dm.link.continue": "Open the link",
255
+ "private.dm.block.action": "Block",
256
+ "private.dm.block.confirm": "This person will not be able to write to you. They only see that they cannot write to you right now.",
257
+ "private.dm.block.done": "Blocked.",
258
+ "private.dm.block.remove": "Unblock",
259
+ "private.dm.block.removed": "Unblocked.",
260
+ "private.dm.blocks.title": "Blocked people",
261
+ "private.dm.blocks.why": "A blocked person cannot send you private messages. They are not told that you blocked them.",
262
+ "private.dm.blocks.empty": "Your list of blocked people is empty for now.",
263
+ "private.dm.blocks.since": "since {date}",
264
+ "private.dm.report.title": "Report a message",
265
+ "private.dm.report.requestTitle": "Block and report the request",
266
+ "private.dm.report.line": "What is wrong",
267
+ "private.dm.report.line.rules": "It breaks the website's rules",
268
+ "private.dm.report.line.illegal": "It is illegal",
269
+ "private.dm.report.category": "Kind",
270
+ "private.dm.report.category.fraud_spam": "Fraud or spam",
271
+ "private.dm.report.category.harassment": "Harassment",
272
+ "private.dm.report.category.hate": "Hate",
273
+ "private.dm.report.category.threats": "Threats",
274
+ "private.dm.report.category.sexual_content": "Sexual content",
275
+ "private.dm.report.category.child_at_risk": "A child at risk",
276
+ "private.dm.report.category.self_harm": "Self-harm",
277
+ "private.dm.report.category.doxxing": "Someone's personal data exposed",
278
+ "private.dm.report.category.copyright": "Copyright infringement",
279
+ "private.dm.report.category.terrorism": "Terrorism",
280
+ "private.dm.report.category.drugs": "Drugs",
281
+ "private.dm.report.category.other_illegal": "Other illegal content",
282
+ "private.dm.report.category.rules": "Breaking the website's rules",
283
+ "private.dm.report.category.adverse_event": "An adverse effect of a product",
284
+ "private.dm.report.category.third_party_health_data": "Another person's health data",
285
+ "private.dm.report.category.suspected_minor": "The writer may be a child",
286
+ "private.dm.report.preview": "Who receives it",
287
+ "private.dm.report.toPlatform": "The report goes to blogmcp's team that handles reports of private messages (blogmcp T&S).",
288
+ "private.dm.report.toPersons": "The report goes to the authorised persons: {names}.",
289
+ "private.dm.report.requestToRules": "The report goes to whoever handles rule breaches for the operator of private messages. That may be an authorised moderator of this website.",
290
+ "private.dm.report.range": "Together with it they see these messages ({count}):",
291
+ "private.dm.report.requestWhat": "The report receives the request the sender sent you, and the sender is blocked. The request then goes.",
292
+ "private.dm.report.block": "Also block the sender",
293
+ "private.dm.report.note": "Anything to add? (optional)",
294
+ "private.dm.report.anonymous": "We do not tell the person reported who reported them.",
295
+ "private.dm.report.send": "Send the report",
296
+ "private.dm.report.blockAndSend": "Block and send the report",
297
+ "private.dm.report.sent": "The report is sent.",
298
+ "private.dm.report.done": "The report is sent. We will let you know of the decision.",
299
+ "private.dm.report.manufacturerWhy": "You can also report an adverse effect to the manufacturer. We do not pass the report of a private message on to them; write to them yourself:",
300
+ "private.dm.report.manufacturer": "Report to the manufacturer",
301
+ "private.dm.cases.title": "Your reports and decisions",
302
+ "private.dm.cases.empty": "There are no reports or decisions about you yet.",
303
+ "private.dm.cases.row": "Case of {date}",
304
+ "private.dm.cases.statement": "Read the statement of reasons",
305
+ "private.dm.cases.open": "Awaiting a decision.",
306
+ "private.dm.statement.title": "Statement of reasons of {date}",
307
+ "private.dm.statement.closesAt": "You can appeal until {date}.",
308
+ "private.dm.appeal.label": "Why you disagree with the decision",
309
+ "private.dm.appeal.send": "Send the appeal",
310
+ "private.dm.appeal.sent": "The appeal is sent.",
311
+ "private.dm.appeal.closed": "The time to appeal has passed.",
312
+ "private.dm.error.notAllowed": "You cannot write to this person right now.",
313
+ "private.dm.error.editWindow": "The message can no longer be edited: the time to edit has passed. You can delete it for yourself.",
314
+ "private.dm.error.deleteWindow": "It can no longer be deleted for everyone: the time has passed. You can delete it for yourself.",
315
+ "private.dm.error.notFound": "This conversation or message is no longer here.",
316
+ "private.dm.error.tooFast": "You are sending too many messages right now. Please try again later.",
317
+ "private.dm.error.notYet": "This part of private messages is not available yet.",
318
+ "private.dm.error.cancelled": "Sending was stopped."
319
+ }
@@ -0,0 +1,103 @@
1
+ /**
2
+ * Put a private element on the page from code (what the private Vue and React wrappers do). The element is defined
3
+ * first, every attribute and property set before it connects, and the returned function removes it again.
4
+ *
5
+ * Browser only: this module imports `@blogmcp/sdk/community/private`, which refuses to load on a server (the device
6
+ * key must never exist there). The wrappers import it lazily, after hydration.
7
+ */
8
+ import type { CommunityTransport } from '@blogmcp/sdk/community'
9
+ import type { PrivateClient } from '@blogmcp/sdk/community/private'
10
+ import type { CommunityRoutes } from '../core/attrs'
11
+ import type { PrivateDockRealtime } from './core/dock'
12
+ import type { PrivatePushPort } from './core/push'
13
+ import { CHAT_DOCK_ELEMENT_TAG, HIDDEN_BY_HOST_ATTR, PRIVATE_VIEW_ELEMENT_TAG, defineChatDockElement, definePrivateViewElement } from './element'
14
+
15
+ interface CommonPrivateMountOptions {
16
+ /** kb-api's public origin (`https://<slug>.blogmcp.ai`): the private client's only origin. */
17
+ kbOrigin: string
18
+ /** The host's relative base for its own `me/get` (default `/api/community` under `siteBase`). */
19
+ apiBase?: string
20
+ siteBase?: string
21
+ lang?: string
22
+ /** The host's pages and grant routes (`grantPath`, `grantHandoffPath`, `messagesPath`, …). */
23
+ routes?: CommunityRoutes
24
+ /** The website's name, for the promise. */
25
+ siteName?: string
26
+ /** The host's worker route (default `<site-base>/sw.js`), for this browser's private push. */
27
+ swPath?: string
28
+ /** The account host's origin (`https://<slug>--account.<base>`): the `provider_page` link. */
29
+ accountOrigin?: string
30
+ nonce?: string
31
+ /** A replacement for the host's transport (tests). */
32
+ transport?: CommunityTransport
33
+ /** A private client the host made itself (tests, or a host with its own UI around the view). */
34
+ client?: PrivateClient
35
+ /** A replacement for this browser's push glue (tests); null offers no private push. */
36
+ push?: PrivatePushPort | null
37
+ /**
38
+ * The live inbox (§6.3): the SDK's `createPrivateRealtime` — the element starts it with its own private client — or
39
+ * a source of the host's own (`{ subscribe(listener) }`).
40
+ */
41
+ realtime?: PrivateDockRealtime
42
+ /** Where the element goes; default `document.body`. */
43
+ container?: Element
44
+ }
45
+
46
+ export interface MountChatDockOptions extends CommonPrivateMountOptions {
47
+ /** Hide the dock by CSS without unmounting it (the regulated preset's pages). */
48
+ hiddenByHost?: boolean
49
+ }
50
+
51
+ export interface MountPrivateViewOptions extends CommonPrivateMountOptions {
52
+ /** The screen to open first (`devices`, `notifications`, …). */
53
+ screen?: string
54
+ }
55
+
56
+ type Settable = HTMLElement & Record<string, unknown>
57
+
58
+ function attrs(el: Element, values: Record<string, string | undefined>): void {
59
+ for (const [name, value] of Object.entries(values)) if (value !== undefined && value !== '') el.setAttribute(name, value)
60
+ }
61
+
62
+ function common(el: Settable, o: CommonPrivateMountOptions): void {
63
+ attrs(el, {
64
+ 'kb-origin': o.kbOrigin,
65
+ 'api-base': o.apiBase,
66
+ 'site-base': o.siteBase,
67
+ lang: o.lang,
68
+ routes: o.routes ? JSON.stringify(o.routes) : undefined,
69
+ 'site-name': o.siteName,
70
+ 'sw-path': o.swPath,
71
+ 'account-origin': o.accountOrigin,
72
+ nonce: o.nonce,
73
+ })
74
+ if (o.transport) el.transport = o.transport
75
+ if (o.client) el.client = o.client
76
+ if (o.push !== undefined) el.push = o.push
77
+ if (o.realtime) el.realtime = o.realtime
78
+ }
79
+
80
+ function place(el: HTMLElement, o: { container?: Element }): () => void {
81
+ ;(o.container ?? document.body).appendChild(el)
82
+ return () => el.remove()
83
+ }
84
+
85
+ /** Mount `<blogmcp-chat-dock>` (in the host's root layout, once); returns the function that removes it. */
86
+ export function mountChatDock(o: MountChatDockOptions): () => void {
87
+ if (typeof document === 'undefined') return () => {}
88
+ defineChatDockElement({ nonce: o.nonce })
89
+ const el = document.createElement(CHAT_DOCK_ELEMENT_TAG) as Settable
90
+ common(el, o)
91
+ if (o.hiddenByHost) el.setAttribute(HIDDEN_BY_HOST_ATTR, '')
92
+ return place(el, o)
93
+ }
94
+
95
+ /** Mount `<blogmcp-private-view>`; returns the function that removes it. */
96
+ export function mountPrivateView(o: MountPrivateViewOptions): () => void {
97
+ if (typeof document === 'undefined') return () => {}
98
+ definePrivateViewElement({ nonce: o.nonce })
99
+ const el = document.createElement(PRIVATE_VIEW_ELEMENT_TAG) as Settable
100
+ common(el, o)
101
+ attrs(el, { screen: o.screen })
102
+ return place(el, o)
103
+ }
@@ -0,0 +1,96 @@
1
+ /**
2
+ * The account pages' client of the account surface (m4-contracts.md §5.8, §5.10, Appendix A.2): `account/*`
3
+ * operations, each a POST of a JSON body to this host's own origin, authenticated by the capability in the body.
4
+ *
5
+ * It spells no route and opens no connection of its own (test/closed-paths.spec.ts holds every file under src/private/
6
+ * to that): the paths are the SDK's generated copy of kb-api's route list (`PRIVATE_ROUTES`), and the request is the
7
+ * public SDK's `fetchTransport` — POST, JSON, `mode: 'same-origin'`, `redirect: 'error'`, `cache: 'no-store'` — over
8
+ * the base `/api/community`, which stands in for kb-api's `/community` mount exactly as the public operations' base
9
+ * does (`communityOpPath`; the ingress strips `/api`). A same-origin POST carries this host's `Origin`, which the
10
+ * account router's browser guard requires; the account host sets no cookie and the ingress strips any, so the
11
+ * transport's `credentials: 'same-origin'` sends nothing.
12
+ *
13
+ * Every answer is an outcome, never a throw: kb-api's `{ ok: true, … }` as the value, its `{ ok: false, code }` as the
14
+ * refusal, `NETWORK` when nothing answered and `BAD_ANSWER` for a body that is not kb-api's.
15
+ */
16
+ import { fetchTransport, type CommunityOp, type CommunityTransport } from '@blogmcp/sdk/community'
17
+ import { PRIVATE_ROUTES } from '@blogmcp/sdk/community/private'
18
+
19
+ /** The account surface's operations the pages call (Appendix A.2). */
20
+ export const ACCOUNT_PAGE_OPS = Object.freeze([
21
+ 'address/set',
22
+ 'address/verify',
23
+ 'address/change/request',
24
+ 'address/change/confirm',
25
+ 'device/approval/get',
26
+ 'device/approve',
27
+ 'device/list',
28
+ 'device/sign-out',
29
+ 'device/sign-out-all',
30
+ 'reads/list',
31
+ 'export/confirm',
32
+ 'export/download',
33
+ 'activation/dispute',
34
+ 'activation/end',
35
+ ] as const)
36
+ export type AccountPageOp = (typeof ACCOUNT_PAGE_OPS)[number]
37
+
38
+ /** The ingress's prefix (`strip-api`) in front of kb-api's own paths. */
39
+ const API_PREFIX = '/api'
40
+ /** The host base the operations are served under on the account host. */
41
+ export const ACCOUNT_API_BASE = `${API_PREFIX}/community`
42
+
43
+ /** The surface's segment in a route's path. */
44
+ const ACCOUNT_SEGMENT = '/account/'
45
+
46
+ /** One account operation's path as kb-api serves it, from the SDK's route list; null while kb-api serves none. */
47
+ export function accountRoutePath(op: AccountPageOp): string | null {
48
+ return PRIVATE_ROUTES.find((r) => r.path.endsWith(`${ACCOUNT_SEGMENT}${op}`) && r.path.slice(0, -op.length).endsWith(ACCOUNT_SEGMENT))?.path ?? null
49
+ }
50
+
51
+ /**
52
+ * The URL a key-bound approval's proof signs (`htu`, §5.10 B-66): the operation's URL on this origin as kb-api
53
+ * computes it (`approveProofHtu`, KB_ACCOUNT_ORIGIN plus `/api` and the route).
54
+ */
55
+ export function accountOperationUrl(origin: string, op: AccountPageOp): string | null {
56
+ const path = accountRoutePath(op)
57
+ return path === null ? null : `${origin}${API_PREFIX}${path}`
58
+ }
59
+
60
+ export type AccountOutcome<T> = { ok: true; value: T } | { ok: false; code: string; status: number | null }
61
+
62
+ export interface AccountApi {
63
+ call<T = Record<string, unknown>>(op: AccountPageOp, body: Record<string, unknown>): Promise<AccountOutcome<T>>
64
+ }
65
+
66
+ /** A refusal code as kb-api spells them. */
67
+ const CODE_RE = /^[A-Z][A-Z0-9_]{0,63}$/
68
+
69
+ export const ACCOUNT_TIMEOUT_MS = 15_000
70
+
71
+ export function createAccountApi(options: { transport?: CommunityTransport; timeoutMs?: number } = {}): AccountApi {
72
+ const transport = options.transport ?? fetchTransport(ACCOUNT_API_BASE)
73
+ return {
74
+ async call<T>(op: AccountPageOp, body: Record<string, unknown>): Promise<AccountOutcome<T>> {
75
+ const path = accountRoutePath(op)
76
+ // An operation kb-api's list does not name yet (DM7b's export before it lands) is not asked at all.
77
+ if (path === null) return { ok: false, code: 'UNKNOWN_PATH', status: null }
78
+ const operation = Object.freeze({ name: op, method: 'POST', path, surface: 'public' }) as unknown as CommunityOp
79
+ let answer: Awaited<ReturnType<CommunityTransport>>
80
+ try {
81
+ answer = await transport(operation, body, AbortSignal.timeout(options.timeoutMs ?? ACCOUNT_TIMEOUT_MS))
82
+ } catch {
83
+ return { ok: false, code: 'NETWORK', status: null }
84
+ }
85
+ const b = answer.body
86
+ if (!b || typeof b !== 'object' || Array.isArray(b)) return { ok: false, code: 'BAD_ANSWER', status: answer.status }
87
+ const rec = b as Record<string, unknown>
88
+ if (rec.ok === true && answer.status >= 200 && answer.status < 300) {
89
+ const { ok: _ok, ...value } = rec
90
+ return { ok: true, value: value as T }
91
+ }
92
+ const code = typeof rec.code === 'string' && CODE_RE.test(rec.code) ? rec.code : 'BAD_ANSWER'
93
+ return { ok: false, code, status: answer.status }
94
+ },
95
+ }
96
+ }
@@ -0,0 +1,2 @@
1
+ /** The account pages' script build (build.mjs): writes `<outDir>/account.js` and resolves to its path. */
2
+ export declare function buildAccountPages(outDir: string, options?: { logLevel?: 'info' | 'warn' | 'error' | 'silent'; minify?: boolean }): Promise<string>
@@ -0,0 +1,72 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * The account pages' script build (m4-contracts.md §6.4): `account.js`, one classic IIFE with Vue, the private SDK and
4
+ * the pages bundled in, which kb-api serves on the account host under `/_account/` (routes/account-pages.ts).
5
+ *
6
+ * node src/private/pages/build.mjs <outDir>
7
+ *
8
+ * It writes only `<outDir>/account.js` and never touches the package's `dist/`: the image builds it in a stage of its
9
+ * own (competitor-monitor/docker/Dockerfile.kb-api) and copies the file beside kb-api's e-mail templates; the bundle
10
+ * scan (test/account-pages/bundle.spec.ts) builds it into a temporary directory. The package's own builds
11
+ * (`vite.config.ts`, `vite.private.config.ts`) never include it: no host loads the account pages.
12
+ *
13
+ * A plain `.mjs`, not a `.ts` beside the pages: it is build tooling, so it stays outside the pages' TypeScript and the
14
+ * private tree's import scans, which hold the code that runs in a member's browser.
15
+ */
16
+ import { readFileSync } from 'node:fs'
17
+ import { dirname, resolve } from 'node:path'
18
+ import { fileURLToPath } from 'node:url'
19
+ import { build } from 'vite'
20
+ import vue from '@vitejs/plugin-vue'
21
+
22
+ const here = dirname(fileURLToPath(import.meta.url))
23
+ const pkgRoot = resolve(here, '../../..')
24
+
25
+ /** Build `account.js` into `outDir` (absolute or relative to the working directory); resolves to the file's path. */
26
+ export async function buildAccountPages(outDir, options = {}) {
27
+ if (typeof outDir !== 'string' || outDir === '') throw new TypeError('buildAccountPages needs an output directory')
28
+ const out = resolve(outDir)
29
+ const version = JSON.parse(readFileSync(resolve(pkgRoot, 'package.json'), 'utf8')).version
30
+ await build({
31
+ configFile: false,
32
+ root: pkgRoot,
33
+ logLevel: options.logLevel ?? 'warn',
34
+ plugins: [vue()],
35
+ define: {
36
+ __BLOGMCP_COMMUNITY_VERSION__: JSON.stringify(version),
37
+ __VUE_OPTIONS_API__: 'false',
38
+ __VUE_PROD_DEVTOOLS__: 'false',
39
+ __VUE_PROD_HYDRATION_MISMATCH_DETAILS__: 'false',
40
+ 'process.env.NODE_ENV': JSON.stringify('production'),
41
+ },
42
+ build: {
43
+ outDir: out,
44
+ emptyOutDir: false,
45
+ copyPublicDir: false,
46
+ minify: options.minify ?? true,
47
+ sourcemap: false,
48
+ lib: {
49
+ entry: resolve(here, 'index.ts'),
50
+ formats: ['iife'],
51
+ name: 'BlogmcpAccountPages',
52
+ fileName: () => 'account.js',
53
+ },
54
+ },
55
+ })
56
+ return resolve(out, 'account.js')
57
+ }
58
+
59
+ if (process.argv[1] && resolve(process.argv[1]) === fileURLToPath(import.meta.url)) {
60
+ const outDir = process.argv[2]
61
+ if (!outDir) {
62
+ console.error('usage: node src/private/pages/build.mjs <outDir>')
63
+ process.exit(2)
64
+ }
65
+ buildAccountPages(outDir, { logLevel: 'info' }).then(
66
+ (file) => console.log(`[account-pages] built ${file}`),
67
+ (err) => {
68
+ console.error('[account-pages] the build failed:', err?.message ?? err)
69
+ process.exit(1)
70
+ },
71
+ )
72
+ }