@open-pencil/cloud 0.17.0-beta.5 → 0.17.0-beta.6

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 (187) hide show
  1. package/dist/client.d.ts +560 -93
  2. package/dist/client.d.ts.map +1 -1
  3. package/dist/client.js +1101 -186
  4. package/dist/client.js.map +1 -1
  5. package/dist/contract.d.ts +2 -2
  6. package/dist/contract.js +2 -2
  7. package/dist/contract2.js +390 -44
  8. package/dist/contract2.js.map +1 -1
  9. package/dist/email.d.ts +366 -3
  10. package/dist/email.d.ts.map +1 -1
  11. package/dist/email.js +1403 -556
  12. package/dist/email.js.map +1 -1
  13. package/dist/errors.js +16 -3
  14. package/dist/errors.js.map +1 -1
  15. package/dist/index.d.ts +878 -37
  16. package/dist/index.d.ts.map +1 -1
  17. package/dist/index2.d.ts +12 -2
  18. package/dist/index2.d.ts.map +1 -1
  19. package/dist/listen.mjs +589 -128
  20. package/dist/listen.mjs.map +1 -1
  21. package/dist/runtime-cloudflare.d.ts +4 -0
  22. package/dist/runtime-cloudflare.d.ts.map +1 -1
  23. package/dist/runtime-cloudflare.js +8689 -6324
  24. package/dist/runtime-cloudflare.js.map +1 -1
  25. package/dist/runtime-node.d.mts +10098 -5401
  26. package/dist/runtime-node.d.mts.map +1 -1
  27. package/dist/server.d.ts +14078 -7909
  28. package/dist/server.d.ts.map +1 -1
  29. package/dist/server.js +11723 -9412
  30. package/dist/server.js.map +1 -1
  31. package/dist/server.mjs +10658 -8649
  32. package/dist/server.mjs.map +1 -1
  33. package/dist/server2.mjs +79 -57
  34. package/dist/server2.mjs.map +1 -1
  35. package/package.json +13 -4
  36. package/src/admin/api/routes.ts +263 -190
  37. package/src/admin/audit/service.ts +9 -1
  38. package/src/admin/bootstrap.ts +86 -0
  39. package/src/admin/documents/service.ts +119 -4
  40. package/src/admin/email/service.ts +2 -1
  41. package/src/admin/enrollment/email.ts +17 -3
  42. package/src/admin/enrollment/service.ts +71 -10
  43. package/src/admin/errors.ts +5 -0
  44. package/src/admin/index.ts +1 -0
  45. package/src/admin/reports/service.ts +9 -3
  46. package/src/admin/schema.ts +6 -5
  47. package/src/admin/users/service.ts +173 -16
  48. package/src/client/api.ts +29 -2
  49. package/src/client/comments.ts +205 -0
  50. package/src/client/device-authorization.ts +4 -20
  51. package/src/client/discovery.ts +4 -2
  52. package/src/client/files/archive.ts +60 -0
  53. package/src/client/files/checksum.ts +7 -0
  54. package/src/client/files/download.ts +122 -0
  55. package/src/client/files/images.ts +89 -0
  56. package/src/client/files/index.ts +15 -0
  57. package/src/client/files/objects.ts +173 -0
  58. package/src/client/files/save.ts +79 -0
  59. package/src/client/index.ts +3 -6
  60. package/src/client/portal/account.ts +20 -2
  61. package/src/client/portal/administration.ts +52 -5
  62. package/src/client/portal/request.ts +4 -2
  63. package/src/client/tour.ts +44 -0
  64. package/src/client/versions.ts +7 -1
  65. package/src/contract/account.ts +61 -11
  66. package/src/contract/admin/index.ts +48 -3
  67. package/src/contract/billing.ts +73 -4
  68. package/src/contract/comments.ts +223 -0
  69. package/src/contract/discovery.ts +47 -19
  70. package/src/contract/index.ts +10 -0
  71. package/src/contract/links.ts +5 -0
  72. package/src/contract/relay.ts +3 -1
  73. package/src/contract/services.ts +44 -4
  74. package/src/contract/workspaces.ts +5 -0
  75. package/src/email/locales/ar.json +28 -0
  76. package/src/email/locales/de.json +28 -0
  77. package/src/email/locales/es.json +28 -0
  78. package/src/email/locales/fr.json +28 -0
  79. package/src/email/locales/it.json +28 -0
  80. package/src/email/locales/ja.json +28 -0
  81. package/src/email/locales/pl.json +28 -0
  82. package/src/email/locales/pt-br.json +28 -0
  83. package/src/email/locales/ru.json +28 -0
  84. package/src/email/locales/zh-cn.json +28 -0
  85. package/src/email/messages.ts +35 -0
  86. package/src/email/render.ts +18 -0
  87. package/src/email/samples.ts +28 -1
  88. package/src/email/schema.ts +29 -3
  89. package/src/email/templates/BrandEmail.vue +3 -1
  90. package/src/email/templates/CommentNotification.vue +39 -0
  91. package/src/email/templates/EnrollmentInvitation.vue +53 -0
  92. package/src/email/templates/TwoStepChanged.vue +17 -2
  93. package/src/email/templates/brand.ts +6 -0
  94. package/src/errors/posthog.ts +28 -4
  95. package/src/runtime/cloudflare/email.ts +2 -0
  96. package/src/runtime/cloudflare/relay/index.ts +21 -6
  97. package/src/runtime/cloudflare/worker.ts +6 -0
  98. package/src/runtime/cloudflare/xml.ts +12 -0
  99. package/src/runtime/node/admin.ts +51 -47
  100. package/src/runtime/node/email/runtime.ts +1 -0
  101. package/src/runtime/node/email/transport.ts +1 -0
  102. package/src/runtime/node/server.ts +8 -2
  103. package/src/runtime/posthog/errors.ts +3 -1
  104. package/src/server/account/actions.ts +3 -1
  105. package/src/server/account/deletion.ts +38 -4
  106. package/src/server/account/routes.ts +67 -46
  107. package/src/server/account/tokens.ts +3 -3
  108. package/src/server/api/router.ts +22 -7
  109. package/src/server/app/checks.ts +6 -1
  110. package/src/server/app/cors.ts +44 -0
  111. package/src/server/app/index.ts +76 -76
  112. package/src/server/app/routes.ts +14 -5
  113. package/src/server/app/services.ts +49 -15
  114. package/src/server/auth/access-control.ts +13 -8
  115. package/src/server/auth/account.ts +13 -12
  116. package/src/server/auth/activity.ts +7 -2
  117. package/src/server/auth/adapter.ts +16 -3
  118. package/src/server/auth/email.ts +29 -17
  119. package/src/server/auth/endpoints.ts +4 -0
  120. package/src/server/auth/factory.ts +83 -64
  121. package/src/server/auth/index.ts +1 -1
  122. package/src/server/auth/methods.ts +162 -0
  123. package/src/server/auth/mfa-assurance.ts +147 -10
  124. package/src/server/auth/rate-limit.ts +31 -0
  125. package/src/server/auth/runtime.ts +19 -5
  126. package/src/server/auth/social-providers.ts +70 -24
  127. package/src/server/billing/index.ts +2 -0
  128. package/src/server/billing/notify.ts +55 -0
  129. package/src/server/billing/seats.ts +17 -0
  130. package/src/server/billing/tokens.ts +1 -1
  131. package/src/server/cleanup/documents.ts +5 -2
  132. package/src/server/cleanup/revisions.ts +6 -3
  133. package/src/server/cleanup/uploads.ts +2 -1
  134. package/src/server/collaboration/relay/connection.ts +7 -2
  135. package/src/server/collaboration/relay/hub.ts +55 -24
  136. package/src/server/collaboration/routes.ts +8 -5
  137. package/src/server/comments/index.ts +9 -0
  138. package/src/server/comments/notify.ts +277 -0
  139. package/src/server/comments/routes.ts +352 -0
  140. package/src/server/comments/rows.ts +249 -0
  141. package/src/server/comments/service.ts +570 -0
  142. package/src/server/community/routes.ts +6 -6
  143. package/src/server/config/deployment.ts +19 -6
  144. package/src/server/config/index.ts +1 -1
  145. package/src/server/config/public.ts +19 -6
  146. package/src/server/config/schema.ts +14 -2
  147. package/src/server/config/toml/schema.ts +27 -4
  148. package/src/server/db/index.ts +2 -1
  149. package/src/server/db/migrate.ts +21 -1
  150. package/src/server/db/migrations/015_comments.ts +57 -0
  151. package/src/server/db/migrations/016_comment_notifications.ts +76 -0
  152. package/src/server/db/migrations/017_invitation_emails.ts +19 -0
  153. package/src/server/db/migrations/018_enrollment_source.ts +17 -0
  154. package/src/server/db/tables.ts +92 -2
  155. package/src/server/documents/access.ts +17 -0
  156. package/src/server/documents/images.ts +6 -1
  157. package/src/server/documents/routes.ts +12 -12
  158. package/src/server/documents/service.ts +19 -5
  159. package/src/server/documents/summary.ts +15 -0
  160. package/src/server/documents/versions/routes.ts +7 -8
  161. package/src/server/documents/versions/service.ts +5 -2
  162. package/src/server/email/service.ts +8 -2
  163. package/src/server/email/types.ts +1 -0
  164. package/src/server/errors/index.ts +48 -3
  165. package/src/server/index.ts +15 -1
  166. package/src/server/internal/routes.ts +8 -2
  167. package/src/server/internal/service.ts +10 -0
  168. package/src/server/invitations/budget.ts +3 -1
  169. package/src/server/invitations/index.ts +1 -0
  170. package/src/server/invitations/links.ts +6 -0
  171. package/src/server/pictures/service.ts +3 -1
  172. package/src/server/policy/workspace.ts +5 -2
  173. package/src/server/reports/routes.ts +2 -2
  174. package/src/server/reports/service.ts +3 -1
  175. package/src/server/services/routes.ts +2 -2
  176. package/src/server/sharing/capabilities/service.ts +1 -1
  177. package/src/server/sharing/document-routes.ts +3 -3
  178. package/src/server/sharing/invitations/service.ts +3 -4
  179. package/src/server/sharing/routes.ts +15 -15
  180. package/src/server/validation.ts +33 -25
  181. package/src/server/workspaces/members.ts +50 -12
  182. package/src/server/workspaces/repository.ts +23 -12
  183. package/src/server/workspaces/routes.ts +8 -8
  184. package/src/services/app.ts +30 -19
  185. package/src/services/config.ts +47 -8
  186. package/src/services/metering.ts +15 -27
  187. package/src/client/billing.ts +0 -80
package/dist/email.js CHANGED
@@ -3,8 +3,9 @@ import { mapValues } from "es-toolkit";
3
3
  import { parseAccept } from "hono/utils/accept";
4
4
  import { atom } from "nanostores";
5
5
  import { render } from "@vue-email/render";
6
- import { createBlock, createCommentVNode, createTextVNode, createVNode, defineComponent, guardReactiveProps, inject, normalizeProps, normalizeStyle, openBlock, provide, renderSlot, resolveDynamicComponent, toDisplayString, withCtx } from "vue";
6
+ import { Fragment, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, guardReactiveProps, inject, normalizeProps, normalizeStyle, openBlock, provide, renderSlot, resolveDynamicComponent, toDisplayString, withCtx } from "vue";
7
7
  import { Body, Button, Container, Head, Heading, Html, Img, Link, Preview, Section, Text } from "@vue-email/components";
8
+ import { isValid } from "js-base64";
8
9
  import * as v from "valibot";
9
10
  //#region src/email/locales/ar.json
10
11
  var ar_default = {
@@ -46,6 +47,21 @@ var ar_default = {
46
47
  enrollmentRevokedPreview: "لم يعد وصولك إلى OpenPencil Cloud نشطًا.",
47
48
  enrollmentRevoked: "لم يعد وصولك إلى OpenPencil Cloud نشطًا.",
48
49
  enrollmentRevokedAction: "فتح OpenPencil",
50
+ invitationSubject: "يمكنك تجربة OpenPencil Cloud الآن",
51
+ invitationHeading: "Cloud مفتوح",
52
+ invitationPreview: "OpenPencil Cloud مفتوح الآن، ويمكنك تسجيل الدخول.",
53
+ invitationWaitlistSubject: "OpenPencil Cloud جاهز",
54
+ invitationWaitlistPreview: "انضممت إلى قائمة الانتظار؛ وقد فُتح Cloud الآن.",
55
+ invitationWaitlistBeta: "لا يزال إصدارًا تجريبيًا: بعض الميزات معطّلة، وستتعطل بعض الأشياء. حين يحدث ذلك، ردّ على هذه الرسالة وأخبرني، أو {link} إن كان ذلك مريحًا لك. أقرأ الاثنين.",
56
+ invitationWaitlistThanks: "شكرًا لانضمامك إلى قائمة انتظار OpenPencil Cloud. هذه هي الرسالة الوحيدة التي وعدناك بها: فُتح Cloud، ويمكنك تسجيل الدخول الآن.",
57
+ invitationThanks: "وصلنا طلبك قبل مدة لتجربة OpenPencil Cloud. شكرًا على اهتمامك وعلى صبرك. كنا لا نزال نختبره حينها، ولم نكن مستعدين لفتحه لأحد.",
58
+ invitationBeta: "إنه مفتوح الآن، ويمكنك تسجيل الدخول. لا يزال إصدارًا تجريبيًا: بعض الميزات معطّلة، وستتعطل بعض الأشياء. حين يحدث ذلك، ردّ على هذه الرسالة وأخبرني، أو {link} إن كان ذلك مريحًا لك. أقرأ الاثنين.",
59
+ invitationIssueLink: "افتح مشكلة على GitHub",
60
+ invitationDesktop: "لاستخدام Cloud في تطبيق سطح المكتب، تحتاج إلى الإصدار التجريبي من {link}.",
61
+ invitationDownloadLink: "صفحة التنزيل",
62
+ invitationAction: "افتح Cloud",
63
+ invitationSignatureName: "دانيلا",
64
+ invitationSignatureRole: "مؤسس OpenPencil",
49
65
  enrollmentNotificationSubject: "طلب وصول جديد إلى OpenPencil Cloud",
50
66
  enrollmentNotificationHeading: "طلب وصول جديد",
51
67
  enrollmentNotificationPreview: "طلب {email} الوصول إلى OpenPencil Cloud.",
@@ -109,6 +125,9 @@ var ar_default = {
109
125
  passkeyRemoved: "تمت إزالة مفتاح مرور من حسابك.",
110
126
  twoStepResetHeading: "تمت إعادة تعيين تسجيل الدخول بخطوتين",
111
127
  twoStepReset: "أزال أحد المسؤولين تطبيق المصادقة ورموز الاستعادة ومفاتيح المرور الخاصة بك، لتتمكن من إعدادها مجددًا.",
128
+ signInMethodRemovedHeading: "تمت إزالة طريقة لتسجيل الدخول",
129
+ signInMethodRemoved: "أزال أحد المسؤولين طريقة لتسجيل الدخول إلى حسابك: {method}.",
130
+ signInMethodPassword: "كلمة المرور",
112
131
  twoStepNotYou: "إن لم تكن أنت، فغيّر كلمة مرورك وتواصل مع المسؤول.",
113
132
  reviewSecurity: "مراجعة الأمان",
114
133
  storageFullSubject: "ملفاتك على OpenPencil Cloud للقراءة فقط",
@@ -140,6 +159,16 @@ var ar_default = {
140
159
  reportDismissed: "راجع المسؤولون بلاغك بشأن «{document}» ووجدوا أنه لا يخالف القواعد، لذا سيبقى كما هو.",
141
160
  reportDisagree: "إذا كنت لا توافق على ذلك، فراسل {email}.",
142
161
  reportDisagreeAdministrators: "إذا كنت لا توافق على ذلك، فاطلب من مسؤولي الخادم إعادة النظر فيه.",
162
+ commentMentionSubject: "أشار إليك {author} في «{document}»",
163
+ commentReplySubject: "ردّ {author} في «{document}»",
164
+ commentMentionHeading: "تمت الإشارة إليك",
165
+ commentReplyHeading: "رد جديد",
166
+ commentMention: "أشار إليك {author} في تعليق على «{document}»:",
167
+ commentReply: "ردّ {author} في نقاش تشارك فيه على «{document}»:",
168
+ commentSomeone: "شخص ما",
169
+ openComment: "افتح التعليق",
170
+ commentSettings: "تصلك هذه الرسائل وفق إعدادات الإشعارات لديك. غيّرها في {link}.",
171
+ commentSettingsLink: "إعدادات حسابك",
143
172
  waitlistSubject: "أكّد مكانك في قائمة انتظار OpenPencil Cloud",
144
173
  waitlistHeading: "أكّد بريدك الإلكتروني",
145
174
  waitlistPreview: "نقرة واحدة للانضمام إلى قائمة انتظار OpenPencil Cloud.",
@@ -189,6 +218,21 @@ var de_default = {
189
218
  enrollmentRevokedPreview: "Dein Zugang zu OpenPencil Cloud ist nicht mehr aktiv.",
190
219
  enrollmentRevoked: "Dein Zugang zu OpenPencil Cloud ist nicht mehr aktiv.",
191
220
  enrollmentRevokedAction: "OpenPencil öffnen",
221
+ invitationSubject: "Du kannst OpenPencil Cloud jetzt ausprobieren",
222
+ invitationHeading: "Cloud ist geöffnet",
223
+ invitationPreview: "OpenPencil Cloud ist geöffnet, du kannst dich jetzt anmelden.",
224
+ invitationWaitlistSubject: "OpenPencil Cloud ist bereit",
225
+ invitationWaitlistPreview: "Du hast dich auf die Warteliste gesetzt; Cloud ist jetzt offen.",
226
+ invitationWaitlistBeta: "Es ist noch eine Beta: Manche Funktionen sind abgeschaltet, und manches wird kaputtgehen. Wenn das passiert, antworte einfach auf diese E-Mail, oder {link}, wenn dir das lieber ist. Ich lese beides.",
227
+ invitationWaitlistThanks: "Danke, dass du dich auf die Warteliste für OpenPencil Cloud gesetzt hast. Hier ist die eine E-Mail, die wir versprochen haben: Cloud ist offen, und du kannst dich jetzt anmelden.",
228
+ invitationThanks: "Vor einer Weile wolltest du OpenPencil Cloud ausprobieren. Danke, dass du neugierig genug warst zu fragen, und dass du gewartet hast. Wir haben damals noch getestet und waren nicht so weit, jemanden reinzulassen.",
229
+ invitationBeta: "Jetzt ist Cloud geöffnet, und du kannst dich anmelden. Es ist noch eine Beta: Manche Funktionen sind abgeschaltet, und manches wird kaputtgehen. Wenn das passiert, antworte einfach auf diese E-Mail, oder {link}, wenn dir das lieber ist. Ich lese beides.",
230
+ invitationIssueLink: "eröffne ein Issue auf GitHub",
231
+ invitationDesktop: "Für Cloud in der Desktop-App brauchst du die Beta-Version von der {link}.",
232
+ invitationDownloadLink: "Download-Seite",
233
+ invitationAction: "Cloud öffnen",
234
+ invitationSignatureName: "Danila",
235
+ invitationSignatureRole: "Gründer von OpenPencil",
192
236
  enrollmentNotificationSubject: "Neue Zugangsanfrage für OpenPencil Cloud",
193
237
  enrollmentNotificationHeading: "Neue Zugangsanfrage",
194
238
  enrollmentNotificationPreview: "{email} hat Zugang zu OpenPencil Cloud angefragt.",
@@ -252,6 +296,9 @@ var de_default = {
252
296
  passkeyRemoved: "Ein Passkey wurde aus deinem Konto entfernt.",
253
297
  twoStepResetHeading: "Zweistufige Anmeldung zurückgesetzt",
254
298
  twoStepReset: "Ein Administrator hat deine Authenticator-App, Wiederherstellungscodes und Passkeys entfernt, damit du sie neu einrichten kannst.",
299
+ signInMethodRemovedHeading: "Anmeldemethode entfernt",
300
+ signInMethodRemoved: "Ein Administrator hat eine Anmeldemethode deines Kontos entfernt: {method}.",
301
+ signInMethodPassword: "Passwort",
255
302
  twoStepNotYou: "Wenn du das nicht warst, ändere dein Passwort und wende dich an deinen Administrator.",
256
303
  reviewSecurity: "Sicherheit überprüfen",
257
304
  storageFullSubject: "Deine Dateien in OpenPencil Cloud sind schreibgeschützt",
@@ -283,6 +330,16 @@ var de_default = {
283
330
  reportDismissed: "Die Administratoren haben deine Meldung zu „{document}“ geprüft und keinen Regelverstoß festgestellt. Das Dokument bleibt daher unverändert.",
284
331
  reportDisagree: "Wenn du anderer Meinung bist, schreib an {email}.",
285
332
  reportDisagreeAdministrators: "Wenn du anderer Meinung bist, bitte die Administratoren des Servers, es noch einmal zu prüfen.",
333
+ commentMentionSubject: "{author} hat dich in „{document}“ erwähnt",
334
+ commentReplySubject: "{author} hat in „{document}“ geantwortet",
335
+ commentMentionHeading: "Du wurdest erwähnt",
336
+ commentReplyHeading: "Neue Antwort",
337
+ commentMention: "{author} hat dich in einem Kommentar zu „{document}“ erwähnt:",
338
+ commentReply: "{author} hat in einem Thread zu „{document}“ geantwortet, an dem du beteiligt bist:",
339
+ commentSomeone: "Jemand",
340
+ openComment: "Kommentar öffnen",
341
+ commentSettings: "Du bekommst diese E-Mails, wie es deine Benachrichtigungseinstellungen vorsehen. Ändere sie in {link}.",
342
+ commentSettingsLink: "deinen Kontoeinstellungen",
286
343
  waitlistSubject: "Bestätige deinen Platz auf der Warteliste für OpenPencil Cloud",
287
344
  waitlistHeading: "Bestätige deine E-Mail-Adresse",
288
345
  waitlistPreview: "Ein Klick, und du stehst auf der Warteliste für OpenPencil Cloud.",
@@ -332,6 +389,21 @@ var es_default = {
332
389
  enrollmentRevokedPreview: "Tu acceso a OpenPencil Cloud ya no está activo.",
333
390
  enrollmentRevoked: "Tu acceso a OpenPencil Cloud ya no está activo.",
334
391
  enrollmentRevokedAction: "Abrir OpenPencil",
392
+ invitationSubject: "Ya puedes probar OpenPencil Cloud",
393
+ invitationHeading: "Cloud está abierto",
394
+ invitationPreview: "OpenPencil Cloud está abierto y ya puedes iniciar sesión.",
395
+ invitationWaitlistSubject: "OpenPencil Cloud está listo",
396
+ invitationWaitlistPreview: "Te uniste a la lista de espera; Cloud ya está abierto.",
397
+ invitationWaitlistBeta: "Todavía es una beta: algunas funciones están desactivadas y algunas cosas se van a romper. Cuando pase, responde a este correo y cuéntamelo, o {link} si te resulta cómodo. Leo las dos cosas.",
398
+ invitationWaitlistThanks: "Gracias por unirte a la lista de espera de OpenPencil Cloud. Este es el único correo que te prometimos: Cloud ya está abierto y puedes iniciar sesión.",
399
+ invitationThanks: "Hace un tiempo pediste probar OpenPencil Cloud. Gracias por tener la curiosidad de pedirlo, y por esperar. Todavía lo estábamos probando y no estábamos listos para dejar entrar a nadie.",
400
+ invitationBeta: "Ahora está abierto y ya puedes iniciar sesión. Todavía es una beta: algunas funciones están desactivadas y algunas cosas se van a romper. Cuando pase, responde a este correo y cuéntamelo, o {link} si te resulta cómodo. Leo las dos cosas.",
401
+ invitationIssueLink: "abre un issue en GitHub",
402
+ invitationDesktop: "Para usar Cloud en la aplicación de escritorio, necesitas la versión beta de la {link}.",
403
+ invitationDownloadLink: "página de descargas",
404
+ invitationAction: "Abrir Cloud",
405
+ invitationSignatureName: "Danila",
406
+ invitationSignatureRole: "Fundador de OpenPencil",
335
407
  enrollmentNotificationSubject: "Nueva solicitud de acceso a OpenPencil Cloud",
336
408
  enrollmentNotificationHeading: "Nueva solicitud de acceso",
337
409
  enrollmentNotificationPreview: "{email} ha solicitado acceso a OpenPencil Cloud.",
@@ -395,6 +467,9 @@ var es_default = {
395
467
  passkeyRemoved: "Se ha eliminado una llave de acceso de tu cuenta.",
396
468
  twoStepResetHeading: "Se ha restablecido la verificación en dos pasos",
397
469
  twoStepReset: "Un administrador ha eliminado tu app de autenticación, tus códigos de recuperación y tus llaves de acceso para que puedas volver a configurarlos.",
470
+ signInMethodRemovedHeading: "Se ha eliminado un método de inicio de sesión",
471
+ signInMethodRemoved: "Un administrador ha eliminado un método de inicio de sesión de tu cuenta: {method}.",
472
+ signInMethodPassword: "contraseña",
398
473
  twoStepNotYou: "Si no has sido tú, cambia tu contraseña y ponte en contacto con tu administrador.",
399
474
  reviewSecurity: "Revisar seguridad",
400
475
  storageFullSubject: "Tus archivos de OpenPencil Cloud son de solo lectura",
@@ -426,6 +501,16 @@ var es_default = {
426
501
  reportDismissed: "Los administradores han revisado tu denuncia sobre «{document}» y han determinado que no incumple las normas, así que se mantiene tal como está.",
427
502
  reportDisagree: "Si no estás de acuerdo, escribe a {email}.",
428
503
  reportDisagreeAdministrators: "Si no estás de acuerdo, pide a los administradores del servidor que lo revisen de nuevo.",
504
+ commentMentionSubject: "{author} te mencionó en «{document}»",
505
+ commentReplySubject: "{author} respondió en «{document}»",
506
+ commentMentionHeading: "Te mencionaron",
507
+ commentReplyHeading: "Nueva respuesta",
508
+ commentMention: "{author} te mencionó en un comentario de «{document}»:",
509
+ commentReply: "{author} respondió en una conversación de «{document}» en la que participas:",
510
+ commentSomeone: "Alguien",
511
+ openComment: "Abrir el comentario",
512
+ commentSettings: "Recibes estos correos según tus ajustes de notificaciones. Cámbialos en {link}.",
513
+ commentSettingsLink: "los ajustes de tu cuenta",
429
514
  waitlistSubject: "Confirma tu plaza en la lista de espera de OpenPencil Cloud",
430
515
  waitlistHeading: "Confirma tu correo",
431
516
  waitlistPreview: "Un clic para unirte a la lista de espera de OpenPencil Cloud.",
@@ -475,6 +560,21 @@ var fr_default = {
475
560
  enrollmentRevokedPreview: "Votre accès à OpenPencil Cloud n’est plus actif.",
476
561
  enrollmentRevoked: "Votre accès à OpenPencil Cloud n’est plus actif.",
477
562
  enrollmentRevokedAction: "Ouvrir OpenPencil",
563
+ invitationSubject: "Vous pouvez essayer OpenPencil Cloud dès maintenant",
564
+ invitationHeading: "Cloud est ouvert",
565
+ invitationPreview: "OpenPencil Cloud est ouvert, vous pouvez vous connecter.",
566
+ invitationWaitlistSubject: "OpenPencil Cloud est prêt",
567
+ invitationWaitlistPreview: "Vous vous êtes inscrit sur la liste d’attente ; Cloud est ouvert.",
568
+ invitationWaitlistBeta: "C’est encore une bêta : certaines fonctionnalités sont désactivées, et certaines choses vont casser. Quand ça arrive, répondez à cet e-mail pour me le dire, ou {link} si vous préférez. Je lis les deux.",
569
+ invitationWaitlistThanks: "Merci de vous être inscrit sur la liste d’attente d’OpenPencil Cloud. Voici le seul e-mail que nous vous avions promis : Cloud est ouvert, et vous pouvez vous connecter dès maintenant.",
570
+ invitationThanks: "Il y a quelque temps, vous avez demandé à essayer OpenPencil Cloud. Merci pour votre curiosité, et pour votre patience. Nous étions encore en train de le tester et nous n’étions pas prêts à laisser entrer qui que ce soit.",
571
+ invitationBeta: "C’est ouvert maintenant, et vous pouvez vous connecter. C’est encore une bêta : certaines fonctionnalités sont désactivées, et certaines choses vont casser. Quand ça arrive, répondez à cet e-mail pour me le dire, ou {link} si vous préférez. Je lis les deux.",
572
+ invitationIssueLink: "ouvrez une issue sur GitHub",
573
+ invitationDesktop: "Pour utiliser Cloud dans l’application de bureau, il vous faut la version bêta, sur la {link}.",
574
+ invitationDownloadLink: "page de téléchargement",
575
+ invitationAction: "Ouvrir Cloud",
576
+ invitationSignatureName: "Danila",
577
+ invitationSignatureRole: "Fondateur d’OpenPencil",
478
578
  enrollmentNotificationSubject: "Nouvelle demande d’accès à OpenPencil Cloud",
479
579
  enrollmentNotificationHeading: "Nouvelle demande d’accès",
480
580
  enrollmentNotificationPreview: "{email} a demandé l’accès à OpenPencil Cloud.",
@@ -538,6 +638,9 @@ var fr_default = {
538
638
  passkeyRemoved: "Une clé d’accès a été supprimée de votre compte.",
539
639
  twoStepResetHeading: "La connexion en deux étapes a été réinitialisée",
540
640
  twoStepReset: "Un administrateur a supprimé votre app d’authentification, vos codes de récupération et vos clés d’accès pour que vous puissiez les configurer à nouveau.",
641
+ signInMethodRemovedHeading: "Méthode de connexion supprimée",
642
+ signInMethodRemoved: "Un administrateur a supprimé une méthode de connexion de votre compte : {method}.",
643
+ signInMethodPassword: "mot de passe",
541
644
  twoStepNotYou: "Si ce n’était pas vous, changez votre mot de passe et contactez votre administrateur.",
542
645
  reviewSecurity: "Vérifier la sécurité",
543
646
  storageFullSubject: "Vos fichiers OpenPencil Cloud sont en lecture seule",
@@ -569,6 +672,16 @@ var fr_default = {
569
672
  reportDismissed: "Les administrateurs ont examiné votre signalement concernant « {document} » et estimé qu’il n’enfreint pas les règles. Il reste donc tel quel.",
570
673
  reportDisagree: "Si vous n’êtes pas d’accord, écrivez à {email}.",
571
674
  reportDisagreeAdministrators: "Si vous n’êtes pas d’accord, demandez aux administrateurs du serveur de le réexaminer.",
675
+ commentMentionSubject: "{author} vous a mentionné dans « {document} »",
676
+ commentReplySubject: "{author} a répondu dans « {document} »",
677
+ commentMentionHeading: "Vous avez été mentionné",
678
+ commentReplyHeading: "Nouvelle réponse",
679
+ commentMention: "{author} vous a mentionné dans un commentaire sur « {document} » :",
680
+ commentReply: "{author} a répondu dans une discussion de « {document} » à laquelle vous participez :",
681
+ commentSomeone: "Quelqu’un",
682
+ openComment: "Ouvrir le commentaire",
683
+ commentSettings: "Vous recevez ces e-mails selon vos réglages de notifications. Modifiez-les dans {link}.",
684
+ commentSettingsLink: "les réglages de votre compte",
572
685
  waitlistSubject: "Confirmez votre place sur la liste d’attente d’OpenPencil Cloud",
573
686
  waitlistHeading: "Confirmez votre adresse e-mail",
574
687
  waitlistPreview: "Un clic pour rejoindre la liste d’attente d’OpenPencil Cloud.",
@@ -618,6 +731,21 @@ var it_default = {
618
731
  enrollmentRevokedPreview: "Il tuo accesso a OpenPencil Cloud non è più attivo.",
619
732
  enrollmentRevoked: "Il tuo accesso a OpenPencil Cloud non è più attivo.",
620
733
  enrollmentRevokedAction: "Apri OpenPencil",
734
+ invitationSubject: "Ora puoi provare OpenPencil Cloud",
735
+ invitationHeading: "Cloud è aperto",
736
+ invitationPreview: "OpenPencil Cloud è aperto e ora puoi accedere.",
737
+ invitationWaitlistSubject: "OpenPencil Cloud è pronto",
738
+ invitationWaitlistPreview: "Ti sei iscritto alla lista d’attesa; Cloud ora è aperto.",
739
+ invitationWaitlistBeta: "È ancora una beta: alcune funzioni sono disattivate e qualcosa si romperà. Quando succede, rispondi a questa email e dimmelo, oppure {link} se ti trovi a tuo agio. Leggo entrambi.",
740
+ invitationWaitlistThanks: "Grazie per esserti iscritto alla lista d’attesa di OpenPencil Cloud. Ecco l’unica email che ti avevamo promesso: Cloud è aperto e puoi accedere già ora.",
741
+ invitationThanks: "Tempo fa hai chiesto di provare OpenPencil Cloud. Grazie per averlo chiesto e per aver aspettato. Lo stavamo ancora testando e non eravamo pronti a far entrare nessuno.",
742
+ invitationBeta: "Ora è aperto e puoi accedere. È ancora una beta: alcune funzioni sono disattivate e qualcosa si romperà. Quando succede, rispondi a questa email e dimmelo, oppure {link} se ti trovi a tuo agio. Leggo entrambi.",
743
+ invitationIssueLink: "apri una issue su GitHub",
744
+ invitationDesktop: "Per usare Cloud nell’app desktop ti serve la versione beta, dalla {link}.",
745
+ invitationDownloadLink: "pagina dei download",
746
+ invitationAction: "Apri Cloud",
747
+ invitationSignatureName: "Danila",
748
+ invitationSignatureRole: "Fondatore di OpenPencil",
621
749
  enrollmentNotificationSubject: "Nuova richiesta di accesso a OpenPencil Cloud",
622
750
  enrollmentNotificationHeading: "Nuova richiesta di accesso",
623
751
  enrollmentNotificationPreview: "{email} ha richiesto l’accesso a OpenPencil Cloud.",
@@ -681,6 +809,9 @@ var it_default = {
681
809
  passkeyRemoved: "Dal tuo account è stata rimossa una passkey.",
682
810
  twoStepResetHeading: "La verifica in due passaggi è stata reimpostata",
683
811
  twoStepReset: "Un amministratore ha rimosso la tua app di autenticazione, i codici di recupero e le passkey, così puoi configurarli di nuovo.",
812
+ signInMethodRemovedHeading: "Metodo di accesso rimosso",
813
+ signInMethodRemoved: "Un amministratore ha rimosso un metodo di accesso dal tuo account: {method}.",
814
+ signInMethodPassword: "password",
684
815
  twoStepNotYou: "Se non sei stato tu, cambia la password e contatta il tuo amministratore.",
685
816
  reviewSecurity: "Controlla la sicurezza",
686
817
  storageFullSubject: "I tuoi file su OpenPencil Cloud sono in sola lettura",
@@ -712,6 +843,16 @@ var it_default = {
712
843
  reportDismissed: "Gli amministratori hanno esaminato la tua segnalazione su «{document}» e hanno stabilito che non viola le regole, quindi resta com’è.",
713
844
  reportDisagree: "Se non sei d’accordo, scrivi a {email}.",
714
845
  reportDisagreeAdministrators: "Se non sei d’accordo, chiedi agli amministratori del server di ricontrollarlo.",
846
+ commentMentionSubject: "{author} ti ha menzionato in «{document}»",
847
+ commentReplySubject: "{author} ha risposto in «{document}»",
848
+ commentMentionHeading: "Sei stato menzionato",
849
+ commentReplyHeading: "Nuova risposta",
850
+ commentMention: "{author} ti ha menzionato in un commento su «{document}»:",
851
+ commentReply: "{author} ha risposto in una discussione di «{document}» a cui partecipi:",
852
+ commentSomeone: "Qualcuno",
853
+ openComment: "Apri il commento",
854
+ commentSettings: "Ricevi queste email in base alle impostazioni delle notifiche. Cambiale nelle {link}.",
855
+ commentSettingsLink: "impostazioni del tuo account",
715
856
  waitlistSubject: "Conferma il tuo posto nella lista d’attesa di OpenPencil Cloud",
716
857
  waitlistHeading: "Conferma la tua email",
717
858
  waitlistPreview: "Un clic per entrare nella lista d’attesa di OpenPencil Cloud.",
@@ -761,6 +902,21 @@ var ja_default = {
761
902
  enrollmentRevokedPreview: "OpenPencil Cloud へのアクセスは無効になりました。",
762
903
  enrollmentRevoked: "OpenPencil Cloud へのアクセスは無効になりました。",
763
904
  enrollmentRevokedAction: "OpenPencil を開く",
905
+ invitationSubject: "OpenPencil Cloud を試せるようになりました",
906
+ invitationHeading: "Cloud を公開しました",
907
+ invitationPreview: "OpenPencil Cloud を公開しました。今すぐサインインできます。",
908
+ invitationWaitlistSubject: "OpenPencil Cloud の準備ができました",
909
+ invitationWaitlistPreview: "ウェイトリストにご登録いただいた OpenPencil Cloud が利用できるようになりました。",
910
+ invitationWaitlistBeta: "まだベータ版のため、一部の機能はオフになっていて、不具合も出るはずです。問題があれば、このメールに返信して教えてください。抵抗がなければ、{link}こともできます。どちらも私が読んでいます。",
911
+ invitationWaitlistThanks: "OpenPencil Cloud のウェイトリストにご登録いただき、ありがとうございます。お約束していた一度きりのご連絡です。Cloud を公開しました。今すぐサインインできます。",
912
+ invitationThanks: "少し前に OpenPencil Cloud の利用を申し込んでいただきました。興味を持ってくださったこと、そしてお待ちいただいたことに感謝します。その頃はまだテスト中で、どなたにも使っていただける状態ではありませんでした。",
913
+ invitationBeta: "現在は公開中で、サインインしていただけます。まだベータ版のため、一部の機能はオフになっていて、不具合も出るはずです。問題があれば、このメールに返信して教えてください。抵抗がなければ、{link}こともできます。どちらも私が読んでいます。",
914
+ invitationIssueLink: "GitHub で issue を作成する",
915
+ invitationDesktop: "デスクトップアプリで Cloud を使うには、{link}からベータ版を入手してください。",
916
+ invitationDownloadLink: "ダウンロードページ",
917
+ invitationAction: "Cloud を開く",
918
+ invitationSignatureName: "ダニラ",
919
+ invitationSignatureRole: "OpenPencil 創業者",
764
920
  enrollmentNotificationSubject: "OpenPencil Cloud への新しいアクセスリクエスト",
765
921
  enrollmentNotificationHeading: "新しいアクセスリクエスト",
766
922
  enrollmentNotificationPreview: "{email} から OpenPencil Cloud へのアクセスリクエストが届きました。",
@@ -824,6 +980,9 @@ var ja_default = {
824
980
  passkeyRemoved: "アカウントからパスキーが削除されました。",
825
981
  twoStepResetHeading: "2段階認証がリセットされました",
826
982
  twoStepReset: "管理者があなたの認証アプリ、リカバリーコード、パスキーを削除しました。もう一度設定できます。",
983
+ signInMethodRemovedHeading: "サインイン方法が削除されました",
984
+ signInMethodRemoved: "管理者があなたのアカウントのサインイン方法を削除しました: {method}",
985
+ signInMethodPassword: "パスワード",
827
986
  twoStepNotYou: "心当たりがない場合は、パスワードを変更し、管理者に連絡してください。",
828
987
  reviewSecurity: "セキュリティを確認",
829
988
  storageFullSubject: "OpenPencil Cloud のファイルが読み取り専用になりました",
@@ -855,6 +1014,16 @@ var ja_default = {
855
1014
  reportDismissed: "管理者が「{document}」に関するあなたの報告を確認し、ルールに違反していないと判断しました。そのため、ドキュメントはそのまま残ります。",
856
1015
  reportDisagree: "この判断に同意できない場合は、{email} にご連絡ください。",
857
1016
  reportDisagreeAdministrators: "この判断に同意できない場合は、サーバーの管理者に再確認を依頼してください。",
1017
+ commentMentionSubject: "{author}さんが「{document}」であなたをメンションしました",
1018
+ commentReplySubject: "{author}さんが「{document}」で返信しました",
1019
+ commentMentionHeading: "メンションされました",
1020
+ commentReplyHeading: "新しい返信",
1021
+ commentMention: "{author}さんが「{document}」のコメントであなたをメンションしました:",
1022
+ commentReply: "{author}さんが、あなたが参加している「{document}」のスレッドに返信しました:",
1023
+ commentSomeone: "だれか",
1024
+ openComment: "コメントを開く",
1025
+ commentSettings: "これらのメールは通知設定に従って届きます。{link}で変更できます。",
1026
+ commentSettingsLink: "アカウント設定",
858
1027
  waitlistSubject: "OpenPencil Cloud のウェイトリストへの登録を確認してください",
859
1028
  waitlistHeading: "メールアドレスを確認",
860
1029
  waitlistPreview: "ワンクリックで OpenPencil Cloud のウェイトリストに登録できます。",
@@ -904,6 +1073,21 @@ var pl_default = {
904
1073
  enrollmentRevokedPreview: "Twój dostęp do OpenPencil Cloud nie jest już aktywny.",
905
1074
  enrollmentRevoked: "Twój dostęp do OpenPencil Cloud nie jest już aktywny.",
906
1075
  enrollmentRevokedAction: "Otwórz OpenPencil",
1076
+ invitationSubject: "Możesz już wypróbować OpenPencil Cloud",
1077
+ invitationHeading: "Cloud jest otwarty",
1078
+ invitationPreview: "OpenPencil Cloud jest otwarty i możesz się już zalogować.",
1079
+ invitationWaitlistSubject: "OpenPencil Cloud jest gotowy",
1080
+ invitationWaitlistPreview: "Zapisałeś się na listę oczekujących; Cloud jest już otwarty.",
1081
+ invitationWaitlistBeta: "To wciąż beta: niektóre funkcje są wyłączone, a niektóre rzeczy się zepsują. Kiedy tak się stanie, odpisz na tego maila i daj mi znać albo {link}, jeśli wolisz. Czytam jedno i drugie.",
1082
+ invitationWaitlistThanks: "Dziękuję za zapisanie się na listę oczekujących OpenPencil Cloud. Oto jedyny e-mail, który obiecaliśmy: Cloud jest otwarty i możesz się już zalogować.",
1083
+ invitationThanks: "Dziękuję za zainteresowanie OpenPencil Cloud i za cierpliwość. Kiedy przyszła Twoja prośba o dostęp, wciąż go testowaliśmy i nie byliśmy gotowi nikogo wpuścić.",
1084
+ invitationBeta: "Teraz jest otwarty i możesz się zalogować. To wciąż beta: niektóre funkcje są wyłączone, a niektóre rzeczy się zepsują. Kiedy tak się stanie, odpisz na tego maila i daj mi znać albo {link}, jeśli wolisz. Czytam jedno i drugie.",
1085
+ invitationIssueLink: "zgłoś issue na GitHubie",
1086
+ invitationDesktop: "Żeby używać Cloud w aplikacji na komputer, potrzebujesz wersji beta ze {link}.",
1087
+ invitationDownloadLink: "strony pobierania",
1088
+ invitationAction: "Otwórz Cloud",
1089
+ invitationSignatureName: "Danila",
1090
+ invitationSignatureRole: "Założyciel OpenPencil",
907
1091
  enrollmentNotificationSubject: "Nowa prośba o dostęp do OpenPencil Cloud",
908
1092
  enrollmentNotificationHeading: "Nowa prośba o dostęp",
909
1093
  enrollmentNotificationPreview: "{email} prosi o dostęp do OpenPencil Cloud.",
@@ -967,6 +1151,9 @@ var pl_default = {
967
1151
  passkeyRemoved: "Z Twojego konta usunięto klucz dostępu.",
968
1152
  twoStepResetHeading: "Zresetowano logowanie dwuetapowe",
969
1153
  twoStepReset: "Administrator usunął Twoją aplikację uwierzytelniającą, kody odzyskiwania i klucze dostępu, więc możesz skonfigurować je od nowa.",
1154
+ signInMethodRemovedHeading: "Usunięto metodę logowania",
1155
+ signInMethodRemoved: "Administrator usunął metodę logowania z Twojego konta: {method}.",
1156
+ signInMethodPassword: "hasło",
970
1157
  twoStepNotYou: "Jeśli to nie Ty, zmień hasło i skontaktuj się z administratorem.",
971
1158
  reviewSecurity: "Sprawdź zabezpieczenia",
972
1159
  storageFullSubject: "Twoje pliki w OpenPencil Cloud są tylko do odczytu",
@@ -998,6 +1185,16 @@ var pl_default = {
998
1185
  reportDismissed: "Administratorzy sprawdzili Twoje zgłoszenie dotyczące dokumentu „{document}” i uznali, że nie narusza on zasad, więc pozostaje bez zmian.",
999
1186
  reportDisagree: "Jeśli nie zgadzasz się z tą decyzją, napisz na adres {email}.",
1000
1187
  reportDisagreeAdministrators: "Jeśli nie zgadzasz się z tą decyzją, poproś administratorów serwera o ponowne sprawdzenie.",
1188
+ commentMentionSubject: "{author} wspomniał(a) o Tobie w „{document}”",
1189
+ commentReplySubject: "{author} odpowiedział(a) w „{document}”",
1190
+ commentMentionHeading: "Ktoś o Tobie wspomniał",
1191
+ commentReplyHeading: "Nowa odpowiedź",
1192
+ commentMention: "{author} wspomniał(a) o Tobie w komentarzu do „{document}”:",
1193
+ commentReply: "{author} odpowiedział(a) w wątku dokumentu „{document}”, w którym uczestniczysz:",
1194
+ commentSomeone: "Ktoś",
1195
+ openComment: "Otwórz komentarz",
1196
+ commentSettings: "Te e-maile dostajesz zgodnie z ustawieniami powiadomień. Zmienisz je w {link}.",
1197
+ commentSettingsLink: "ustawieniach konta",
1001
1198
  waitlistSubject: "Potwierdź swoje miejsce na liście oczekujących OpenPencil Cloud",
1002
1199
  waitlistHeading: "Potwierdź adres e-mail",
1003
1200
  waitlistPreview: "Jedno kliknięcie, aby dołączyć do listy oczekujących OpenPencil Cloud.",
@@ -1047,6 +1244,21 @@ var pt_br_default = {
1047
1244
  enrollmentRevokedPreview: "Seu acesso ao OpenPencil Cloud não está mais ativo.",
1048
1245
  enrollmentRevoked: "Seu acesso ao OpenPencil Cloud não está mais ativo.",
1049
1246
  enrollmentRevokedAction: "Abrir o OpenPencil",
1247
+ invitationSubject: "Você já pode experimentar o OpenPencil Cloud",
1248
+ invitationHeading: "O Cloud está aberto",
1249
+ invitationPreview: "O OpenPencil Cloud está aberto e você já pode entrar.",
1250
+ invitationWaitlistSubject: "O OpenPencil Cloud está pronto",
1251
+ invitationWaitlistPreview: "Você entrou na lista de espera; o Cloud já está aberto.",
1252
+ invitationWaitlistBeta: "Ainda é uma beta: alguns recursos estão desligados e algumas coisas vão quebrar. Quando acontecer, responda a este e-mail e me conte, ou {link} se preferir. Eu leio os dois.",
1253
+ invitationWaitlistThanks: "Obrigado por entrar na lista de espera do OpenPencil Cloud. Este é o único e-mail que prometemos: o Cloud está aberto, e você já pode entrar.",
1254
+ invitationThanks: "Há um tempo você pediu para experimentar o OpenPencil Cloud. Obrigado pela curiosidade de pedir, e por esperar. Ainda estávamos testando e não estávamos prontos para deixar ninguém entrar.",
1255
+ invitationBeta: "Agora está aberto e você pode entrar. Ainda é uma beta: alguns recursos estão desligados e algumas coisas vão quebrar. Quando acontecer, responda a este e-mail e me conte, ou {link} se preferir. Eu leio os dois.",
1256
+ invitationIssueLink: "abra uma issue no GitHub",
1257
+ invitationDesktop: "Para usar o Cloud no app para computador, você precisa da versão beta da {link}.",
1258
+ invitationDownloadLink: "página de downloads",
1259
+ invitationAction: "Abrir o Cloud",
1260
+ invitationSignatureName: "Danila",
1261
+ invitationSignatureRole: "Fundador do OpenPencil",
1050
1262
  enrollmentNotificationSubject: "Nova solicitação de acesso ao OpenPencil Cloud",
1051
1263
  enrollmentNotificationHeading: "Nova solicitação de acesso",
1052
1264
  enrollmentNotificationPreview: "{email} solicitou acesso ao OpenPencil Cloud.",
@@ -1110,6 +1322,9 @@ var pt_br_default = {
1110
1322
  passkeyRemoved: "Uma chave de acesso foi removida da sua conta.",
1111
1323
  twoStepResetHeading: "A verificação em duas etapas foi redefinida",
1112
1324
  twoStepReset: "Um administrador removeu seu app autenticador, seus códigos de recuperação e suas chaves de acesso para que você possa configurá-los novamente.",
1325
+ signInMethodRemovedHeading: "Forma de entrar removida",
1326
+ signInMethodRemoved: "Um administrador removeu uma forma de entrar na sua conta: {method}.",
1327
+ signInMethodPassword: "senha",
1113
1328
  twoStepNotYou: "Se não foi você, altere sua senha e fale com o administrador.",
1114
1329
  reviewSecurity: "Revisar segurança",
1115
1330
  storageFullSubject: "Seus arquivos do OpenPencil Cloud estão somente leitura",
@@ -1141,6 +1356,16 @@ var pt_br_default = {
1141
1356
  reportDismissed: "Os administradores analisaram sua denúncia sobre “{document}” e concluíram que ele não viola as regras, então ele continua como está.",
1142
1357
  reportDisagree: "Se você não concordar, escreva para {email}.",
1143
1358
  reportDisagreeAdministrators: "Se você não concordar, peça aos administradores do servidor que analisem novamente.",
1359
+ commentMentionSubject: "{author} mencionou você em “{document}”",
1360
+ commentReplySubject: "{author} respondeu em “{document}”",
1361
+ commentMentionHeading: "Você foi mencionado",
1362
+ commentReplyHeading: "Nova resposta",
1363
+ commentMention: "{author} mencionou você em um comentário em “{document}”:",
1364
+ commentReply: "{author} respondeu em uma conversa de “{document}” da qual você participa:",
1365
+ commentSomeone: "Alguém",
1366
+ openComment: "Abrir o comentário",
1367
+ commentSettings: "Você recebe estes e-mails conforme suas configurações de notificação. Altere-as nas {link}.",
1368
+ commentSettingsLink: "configurações da sua conta",
1144
1369
  waitlistSubject: "Confirme seu lugar na lista de espera do OpenPencil Cloud",
1145
1370
  waitlistHeading: "Confirme seu e-mail",
1146
1371
  waitlistPreview: "Só um clique para entrar na lista de espera do OpenPencil Cloud.",
@@ -1190,6 +1415,21 @@ var ru_default = {
1190
1415
  enrollmentRevokedPreview: "Ваш доступ к OpenPencil Cloud больше не действует.",
1191
1416
  enrollmentRevoked: "Ваш доступ к OpenPencil Cloud больше не действует.",
1192
1417
  enrollmentRevokedAction: "Открыть OpenPencil",
1418
+ invitationSubject: "OpenPencil Cloud уже можно попробовать",
1419
+ invitationHeading: "Cloud открыт",
1420
+ invitationPreview: "OpenPencil Cloud открыт, можно входить.",
1421
+ invitationWaitlistSubject: "OpenPencil Cloud готов",
1422
+ invitationWaitlistPreview: "Вы записались в лист ожидания; Cloud уже открыт.",
1423
+ invitationWaitlistBeta: "Это пока бета: часть функций выключена, что-то будет ломаться. Когда сломается, просто ответьте на это письмо или {link}, если так удобнее. Я читаю всё.",
1424
+ invitationWaitlistThanks: "Спасибо, что записались в лист ожидания OpenPencil Cloud. Это то единственное письмо, которое мы обещали: Cloud открыт, и вы уже можете войти.",
1425
+ invitationThanks: "Некоторое время назад вы просили доступ к OpenPencil Cloud. Спасибо за интерес и за терпение: тогда мы ещё тестировали его и не были готовы никого пускать.",
1426
+ invitationBeta: "Теперь он открыт, можно входить. Это пока бета: часть функций выключена, что-то будет ломаться. Когда сломается, просто ответьте на это письмо или {link}, если так удобнее. Я читаю всё.",
1427
+ invitationIssueLink: "заведите issue на GitHub",
1428
+ invitationDesktop: "Чтобы пользоваться Cloud в приложении для компьютера, нужна бета-версия со {link}.",
1429
+ invitationDownloadLink: "страницы загрузки",
1430
+ invitationAction: "Открыть Cloud",
1431
+ invitationSignatureName: "Данила",
1432
+ invitationSignatureRole: "Основатель OpenPencil",
1193
1433
  enrollmentNotificationSubject: "Новая заявка на доступ к OpenPencil Cloud",
1194
1434
  enrollmentNotificationHeading: "Новая заявка на доступ",
1195
1435
  enrollmentNotificationPreview: "{email} запрашивает доступ к OpenPencil Cloud.",
@@ -1253,6 +1493,9 @@ var ru_default = {
1253
1493
  passkeyRemoved: "Из вашего аккаунта удалён ключ доступа.",
1254
1494
  twoStepResetHeading: "Двухэтапный вход сброшен",
1255
1495
  twoStepReset: "Администратор удалил ваше приложение-аутентификатор, резервные коды и ключи доступа, чтобы вы могли настроить их заново.",
1496
+ signInMethodRemovedHeading: "Способ входа удалён",
1497
+ signInMethodRemoved: "Администратор удалил способ входа в ваш аккаунт: {method}.",
1498
+ signInMethodPassword: "пароль",
1256
1499
  twoStepNotYou: "Если это были не вы, смените пароль и обратитесь к администратору.",
1257
1500
  reviewSecurity: "Проверить безопасность",
1258
1501
  storageFullSubject: "Ваши файлы в OpenPencil Cloud доступны только для чтения",
@@ -1284,6 +1527,16 @@ var ru_default = {
1284
1527
  reportDismissed: "Администраторы рассмотрели вашу жалобу на «{document}» и не нашли нарушений правил, поэтому документ остаётся без изменений.",
1285
1528
  reportDisagree: "Если вы не согласны, напишите на {email}.",
1286
1529
  reportDisagreeAdministrators: "Если вы не согласны, попросите администраторов сервера проверить документ ещё раз.",
1530
+ commentMentionSubject: "{author} упомянул(а) вас в «{document}»",
1531
+ commentReplySubject: "{author} ответил(а) в «{document}»",
1532
+ commentMentionHeading: "Вас упомянули",
1533
+ commentReplyHeading: "Новый ответ",
1534
+ commentMention: "{author} упомянул(а) вас в комментарии к «{document}»:",
1535
+ commentReply: "{author} ответил(а) в обсуждении «{document}», в котором вы участвуете:",
1536
+ commentSomeone: "Кто-то",
1537
+ openComment: "Открыть комментарий",
1538
+ commentSettings: "Эти письма приходят по вашим настройкам уведомлений. Изменить их можно в {link}.",
1539
+ commentSettingsLink: "настройках аккаунта",
1287
1540
  waitlistSubject: "Подтвердите место в листе ожидания OpenPencil Cloud",
1288
1541
  waitlistHeading: "Подтвердите почту",
1289
1542
  waitlistPreview: "Один клик — и вы в листе ожидания OpenPencil Cloud.",
@@ -1333,6 +1586,21 @@ var zh_cn_default = {
1333
1586
  enrollmentRevokedPreview: "你的 OpenPencil Cloud 访问权限已失效。",
1334
1587
  enrollmentRevoked: "你的 OpenPencil Cloud 访问权限已失效。",
1335
1588
  enrollmentRevokedAction: "打开 OpenPencil",
1589
+ invitationSubject: "现在可以试用 OpenPencil Cloud 了",
1590
+ invitationHeading: "Cloud 已开放",
1591
+ invitationPreview: "OpenPencil Cloud 已开放,现在就可以登录。",
1592
+ invitationWaitlistSubject: "OpenPencil Cloud 已就绪",
1593
+ invitationWaitlistPreview: "你加入了候补名单;Cloud 现已开放。",
1594
+ invitationWaitlistBeta: "它还是测试版:有些功能尚未开启,也难免会出问题。遇到问题时,直接回复这封邮件告诉我就行;如果你愿意,也可以{link}。两种方式我都会看。",
1595
+ invitationWaitlistThanks: "感谢你加入 OpenPencil Cloud 的候补名单。这是我们承诺的唯一一封邮件:Cloud 已经开放,你现在就可以登录。",
1596
+ invitationThanks: "不久前你申请试用 OpenPencil Cloud。谢谢你的关注,也谢谢你耐心等待。那时我们还在测试,还没准备好对任何人开放。",
1597
+ invitationBeta: "现在已经开放,你可以登录了。它还是测试版:有些功能尚未开启,也难免会出问题。遇到问题时,直接回复这封邮件告诉我就行;如果你愿意,也可以{link}。两种方式我都会看。",
1598
+ invitationIssueLink: "在 GitHub 上提交 issue",
1599
+ invitationDesktop: "要在桌面应用中使用 Cloud,需要从{link}下载测试版。",
1600
+ invitationDownloadLink: "下载页面",
1601
+ invitationAction: "打开 Cloud",
1602
+ invitationSignatureName: "达尼拉",
1603
+ invitationSignatureRole: "OpenPencil 创始人",
1336
1604
  enrollmentNotificationSubject: "新的 OpenPencil Cloud 访问申请",
1337
1605
  enrollmentNotificationHeading: "新的访问申请",
1338
1606
  enrollmentNotificationPreview: "{email} 申请访问 OpenPencil Cloud。",
@@ -1396,6 +1664,9 @@ var zh_cn_default = {
1396
1664
  passkeyRemoved: "你的账号移除了一个通行密钥。",
1397
1665
  twoStepResetHeading: "两步验证已重置",
1398
1666
  twoStepReset: "管理员已移除你的身份验证器应用、恢复码和通行密钥,你可以重新设置。",
1667
+ signInMethodRemovedHeading: "登录方式已移除",
1668
+ signInMethodRemoved: "管理员已从你的账户中移除一种登录方式:{method}。",
1669
+ signInMethodPassword: "密码",
1399
1670
  twoStepNotYou: "如果不是你本人操作,请修改密码并联系管理员。",
1400
1671
  reviewSecurity: "查看安全设置",
1401
1672
  storageFullSubject: "你的 OpenPencil Cloud 文件已变为只读",
@@ -1427,6 +1698,16 @@ var zh_cn_default = {
1427
1698
  reportDismissed: "管理员审核了你对“{document}”的举报,认为它没有违反规则,因此将保持原样。",
1428
1699
  reportDisagree: "如果你不同意,请发送邮件至 {email}。",
1429
1700
  reportDisagreeAdministrators: "如果你不同意,请联系服务器管理员重新审核。",
1701
+ commentMentionSubject: "{author} 在“{document}”中提到了你",
1702
+ commentReplySubject: "{author} 在“{document}”中回复了",
1703
+ commentMentionHeading: "有人提到了你",
1704
+ commentReplyHeading: "新回复",
1705
+ commentMention: "{author} 在“{document}”的评论中提到了你:",
1706
+ commentReply: "{author} 在你参与的“{document}”讨论中回复了:",
1707
+ commentSomeone: "有人",
1708
+ openComment: "打开评论",
1709
+ commentSettings: "你会按通知设置收到这些邮件。可在{link}中更改。",
1710
+ commentSettingsLink: "账户设置",
1430
1711
  waitlistSubject: "确认你在 OpenPencil Cloud 候补名单中的位置",
1431
1712
  waitlistHeading: "确认你的邮箱",
1432
1713
  waitlistPreview: "只需点击一下,即可加入 OpenPencil Cloud 候补名单。",
@@ -1480,6 +1761,21 @@ const emailMessageDefaults = {
1480
1761
  enrollmentRevokedPreview: "Your OpenPencil Cloud access is no longer active.",
1481
1762
  enrollmentRevoked: "Your OpenPencil Cloud access is no longer active.",
1482
1763
  enrollmentRevokedAction: "Open OpenPencil",
1764
+ invitationSubject: "You can try OpenPencil Cloud now",
1765
+ invitationHeading: "Cloud is open",
1766
+ invitationPreview: "OpenPencil Cloud is open, and you can sign in now.",
1767
+ invitationWaitlistSubject: "OpenPencil Cloud is ready",
1768
+ invitationWaitlistPreview: "You joined the waitlist; Cloud is open now.",
1769
+ invitationWaitlistBeta: "It’s still a beta: some features are switched off, and some things will break. When they do, reply to this email and tell me, or {link} if you’re comfortable with that. I read both.",
1770
+ invitationWaitlistThanks: "Thank you for joining the OpenPencil Cloud waitlist. Here’s the one email we promised: Cloud is open, and you can sign in now.",
1771
+ invitationThanks: "A while ago you asked to try OpenPencil Cloud. Thanks for being curious enough to ask, and for waiting. We were still testing it then and weren’t ready to let anyone in.",
1772
+ invitationBeta: "It’s open now, and you can sign in. It’s still a beta: some features are switched off, and some things will break. When they do, reply to this email and tell me, or {link} if you’re comfortable with that. I read both.",
1773
+ invitationIssueLink: "open an issue on GitHub",
1774
+ invitationDesktop: "To use Cloud in the desktop app, you need the beta release from the {link}.",
1775
+ invitationDownloadLink: "download page",
1776
+ invitationAction: "Open Cloud",
1777
+ invitationSignatureName: "Danila",
1778
+ invitationSignatureRole: "Founder of OpenPencil",
1483
1779
  enrollmentNotificationSubject: "New OpenPencil Cloud access request",
1484
1780
  enrollmentNotificationHeading: "New access request",
1485
1781
  enrollmentNotificationPreview: params("{email} requested OpenPencil Cloud access."),
@@ -1543,6 +1839,9 @@ const emailMessageDefaults = {
1543
1839
  passkeyRemoved: "A passkey was removed from your account.",
1544
1840
  twoStepResetHeading: "Two-step sign-in was reset",
1545
1841
  twoStepReset: "An administrator removed your authenticator app, recovery codes, and passkeys, so you can set them up again.",
1842
+ signInMethodRemovedHeading: "Sign-in method removed",
1843
+ signInMethodRemoved: params("An administrator removed {method} from the ways you sign in to your account."),
1844
+ signInMethodPassword: "your password",
1546
1845
  twoStepNotYou: "If this wasn’t you, change your password and contact your administrator.",
1547
1846
  reviewSecurity: "Review security",
1548
1847
  storageFullSubject: "Your OpenPencil Cloud files are read-only",
@@ -1574,6 +1873,16 @@ const emailMessageDefaults = {
1574
1873
  reportDismissed: params("The administrators reviewed your report about “{document}” and found it doesn’t break the rules, so it stays as it is."),
1575
1874
  reportDisagree: params("If you disagree, write to {email}."),
1576
1875
  reportDisagreeAdministrators: "If you disagree, ask the server’s administrators to look at it again.",
1876
+ commentMentionSubject: params("{author} mentioned you in “{document}”"),
1877
+ commentReplySubject: params("{author} replied in “{document}”"),
1878
+ commentMentionHeading: "You were mentioned",
1879
+ commentReplyHeading: "New reply",
1880
+ commentMention: params("{author} mentioned you in a comment on “{document}”:"),
1881
+ commentReply: params("{author} replied in a thread you’re part of on “{document}”:"),
1882
+ commentSomeone: "Someone",
1883
+ openComment: "Open the comment",
1884
+ commentSettings: "You get these emails as your notification settings say. Change them in {link}.",
1885
+ commentSettingsLink: "your account settings",
1577
1886
  waitlistSubject: "Confirm your place on the OpenPencil Cloud waitlist",
1578
1887
  waitlistHeading: "Confirm your email",
1579
1888
  waitlistPreview: "One click to join the OpenPencil Cloud waitlist.",
@@ -1712,6 +2021,10 @@ function acceptedLocale(header) {
1712
2021
  /** The ivory app-icon tile, served as PNG because mail clients do not draw SVG. */
1713
2022
  const LOGO_URL = "https://openpencil.dev/brand/app-icon-1024.png";
1714
2023
  const SITE_URL = "https://openpencil.dev";
2024
+ /** The download page's beta section, with the newest desktop beta's installers. */
2025
+ const DESKTOP_BETA_URL = "https://openpencil.dev/download#beta";
2026
+ /** The repository's bug report form. */
2027
+ const BUG_REPORT_URL = "https://github.com/open-pencil/open-pencil/issues/new?template=bug_report.yml";
1715
2028
  const FONT = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif";
1716
2029
  const INK = "#171717";
1717
2030
  const MUTED = "#6B6B6B";
@@ -1760,6 +2073,12 @@ const styles = {
1760
2073
  padding: "12px 22px",
1761
2074
  textDecoration: "none"
1762
2075
  },
2076
+ signature: {
2077
+ color: "#404040",
2078
+ fontSize: "15px",
2079
+ lineHeight: "1.6",
2080
+ margin: "28px 0 0"
2081
+ },
1763
2082
  note: {
1764
2083
  color: MUTED,
1765
2084
  fontSize: "13px",
@@ -1803,9 +2122,10 @@ var export_helper_default = (sfc, props) => {
1803
2122
  //#region src/email/templates/BrandEmail.vue
1804
2123
  /**
1805
2124
  * The branded email every OpenPencil service sends, in its reader's language and direction: a
1806
- * heading, the paragraphs in the default slot, one button, and small print in `note`.
2125
+ * heading, the paragraphs in the default slot, one button, the sender's name in `signature` when a
2126
+ * person writes, and small print in `note`.
1807
2127
  */
1808
- const _sfc_main$19 = /*@__PURE__*/ defineComponent({
2128
+ const _sfc_main$21 = /*@__PURE__*/ defineComponent({
1809
2129
  __name: "BrandEmail",
1810
2130
  props: {
1811
2131
  preview: {
@@ -1878,7 +2198,7 @@ const _sfc_main$19 = /*@__PURE__*/ defineComponent({
1878
2198
  return __returned__;
1879
2199
  }
1880
2200
  });
1881
- function _sfc_render$19(_ctx, _cache, $props, $setup, $data, $options) {
2201
+ function _sfc_render$21(_ctx, _cache, $props, $setup, $data, $options) {
1882
2202
  return openBlock(), createBlock($setup["HTML"], {
1883
2203
  lang: $setup.locale,
1884
2204
  dir: $setup.dir
@@ -1920,8 +2240,15 @@ function _sfc_render$19(_ctx, _cache, $props, $setup, $data, $options) {
1920
2240
  }, 8, ["href", "style"])]),
1921
2241
  _: 1
1922
2242
  }, 8, ["style"])) : createCommentVNode("v-if", true),
1923
- _ctx.$slots.note ? (openBlock(), createBlock($setup["Text"], {
2243
+ _ctx.$slots.signature ? (openBlock(), createBlock($setup["Text"], {
1924
2244
  key: 1,
2245
+ style: normalizeStyle($setup.styles.signature)
2246
+ }, {
2247
+ default: withCtx(() => [renderSlot(_ctx.$slots, "signature")]),
2248
+ _: 3
2249
+ }, 8, ["style"])) : createCommentVNode("v-if", true),
2250
+ _ctx.$slots.note ? (openBlock(), createBlock($setup["Text"], {
2251
+ key: 2,
1925
2252
  style: normalizeStyle($setup.styles.note)
1926
2253
  }, {
1927
2254
  default: withCtx(() => [renderSlot(_ctx.$slots, "note")]),
@@ -1945,10 +2272,10 @@ function _sfc_render$19(_ctx, _cache, $props, $setup, $data, $options) {
1945
2272
  _: 3
1946
2273
  }, 8, ["lang", "dir"]);
1947
2274
  }
1948
- var BrandEmail_default = /*#__PURE__*/ export_helper_default(_sfc_main$19, [["render", _sfc_render$19], ["__file", "/home/runner/work/open-pencil/open-pencil/packages/cloud/src/email/templates/BrandEmail.vue"]]);
2275
+ var BrandEmail_default = /*#__PURE__*/ export_helper_default(_sfc_main$21, [["render", _sfc_render$21], ["__file", "/home/runner/work/open-pencil/open-pencil/packages/cloud/src/email/templates/BrandEmail.vue"]]);
1949
2276
  //#endregion
1950
2277
  //#region src/email/templates/EmailText.vue
1951
- const _sfc_main$18 = /*@__PURE__*/ defineComponent({
2278
+ const _sfc_main$20 = /*@__PURE__*/ defineComponent({
1952
2279
  __name: "EmailText",
1953
2280
  setup(__props, { expose: __expose }) {
1954
2281
  __expose();
@@ -1967,20 +2294,107 @@ const _sfc_main$18 = /*@__PURE__*/ defineComponent({
1967
2294
  return __returned__;
1968
2295
  }
1969
2296
  });
1970
- function _sfc_render$18(_ctx, _cache, $props, $setup, $data, $options) {
2297
+ function _sfc_render$20(_ctx, _cache, $props, $setup, $data, $options) {
1971
2298
  return openBlock(), createBlock($setup["Text"], { style: normalizeStyle($setup.styles.text) }, {
1972
2299
  default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
1973
2300
  _: 3
1974
2301
  }, 8, ["style"]);
1975
2302
  }
1976
- var EmailText_default = /*#__PURE__*/ export_helper_default(_sfc_main$18, [["render", _sfc_render$18], ["__file", "/home/runner/work/open-pencil/open-pencil/packages/cloud/src/email/templates/EmailText.vue"]]);
2303
+ var EmailText_default = /*#__PURE__*/ export_helper_default(_sfc_main$20, [["render", _sfc_render$20], ["__file", "/home/runner/work/open-pencil/open-pencil/packages/cloud/src/email/templates/EmailText.vue"]]);
2304
+ //#endregion
2305
+ //#region src/email/templates/CommentNotification.vue
2306
+ /** To someone a comment names, or who takes part in its thread: who wrote what, and where. */
2307
+ const _sfc_main$19 = /*@__PURE__*/ defineComponent({
2308
+ __name: "CommentNotification",
2309
+ props: { payload: {
2310
+ type: null,
2311
+ required: true
2312
+ } },
2313
+ setup(__props, { expose: __expose }) {
2314
+ __expose();
2315
+ const localization = useEmailLocalization();
2316
+ const { t } = localization;
2317
+ const words = {
2318
+ author: __props.payload.authorName ?? t.commentSomeone,
2319
+ document: __props.payload.documentName
2320
+ };
2321
+ const lead = __props.payload.reason === "mention" ? t.commentMention(words) : t.commentReply(words);
2322
+ const [beforeLink = "", afterLink = ""] = t.commentSettings.split("{link}");
2323
+ const __returned__ = {
2324
+ localization,
2325
+ t,
2326
+ words,
2327
+ lead,
2328
+ beforeLink,
2329
+ afterLink,
2330
+ get Link() {
2331
+ return Link;
2332
+ },
2333
+ get styles() {
2334
+ return styles;
2335
+ },
2336
+ BrandEmail: BrandEmail_default,
2337
+ EmailText: EmailText_default,
2338
+ get greeting() {
2339
+ return greeting;
2340
+ }
2341
+ };
2342
+ Object.defineProperty(__returned__, "__isScriptSetup", {
2343
+ enumerable: false,
2344
+ value: true
2345
+ });
2346
+ return __returned__;
2347
+ }
2348
+ });
2349
+ function _sfc_render$19(_ctx, _cache, $props, $setup, $data, $options) {
2350
+ return openBlock(), createBlock($setup["BrandEmail"], {
2351
+ preview: $props.payload.excerpt,
2352
+ heading: $props.payload.reason === "mention" ? $setup.t.commentMentionHeading : $setup.t.commentReplyHeading,
2353
+ action: {
2354
+ label: $setup.t.openComment,
2355
+ url: $props.payload.actionURL
2356
+ }
2357
+ }, {
2358
+ note: withCtx(() => [
2359
+ createTextVNode(toDisplayString($setup.beforeLink), 1),
2360
+ createVNode($setup["Link"], {
2361
+ href: $props.payload.settingsURL,
2362
+ style: normalizeStyle($setup.styles.link)
2363
+ }, {
2364
+ default: withCtx(() => [createTextVNode(toDisplayString($setup.t.commentSettingsLink), 1)]),
2365
+ _: 1
2366
+ }, 8, ["href", "style"]),
2367
+ createTextVNode(toDisplayString($setup.afterLink), 1)
2368
+ ]),
2369
+ default: withCtx(() => [
2370
+ createVNode($setup["EmailText"], null, {
2371
+ default: withCtx(() => [createTextVNode(toDisplayString($setup.greeting($setup.localization, $props.payload.name)), 1)]),
2372
+ _: 1
2373
+ }),
2374
+ createVNode($setup["EmailText"], null, {
2375
+ default: withCtx(() => [createTextVNode(toDisplayString($setup.lead), 1)]),
2376
+ _: 1
2377
+ }),
2378
+ createVNode($setup["EmailText"], null, {
2379
+ default: withCtx(() => [createTextVNode("“" + toDisplayString($props.payload.excerpt) + "”", 1)]),
2380
+ _: 1
2381
+ })
2382
+ ]),
2383
+ _: 1
2384
+ }, 8, [
2385
+ "preview",
2386
+ "heading",
2387
+ "action"
2388
+ ]);
2389
+ }
2390
+ var CommentNotification_default = /*#__PURE__*/ export_helper_default(_sfc_main$19, [["render", _sfc_render$19], ["__file", "/home/runner/work/open-pencil/open-pencil/packages/cloud/src/email/templates/CommentNotification.vue"]]);
1977
2391
  //#endregion
1978
2392
  //#region src/email/templates/DocumentBlocked.vue
1979
2393
  /**
1980
2394
  * To a workspace's owner: an administrator took one of its documents down. It says why, when the
1981
2395
  * administrator gave a reason, and where to contest it.
1982
2396
  */
1983
- const _sfc_main$17 = /*@__PURE__*/ defineComponent({
2397
+ const _sfc_main$18 = /*@__PURE__*/ defineComponent({
1984
2398
  __name: "DocumentBlocked",
1985
2399
  props: { payload: {
1986
2400
  type: null,
@@ -2017,7 +2431,7 @@ const _sfc_main$17 = /*@__PURE__*/ defineComponent({
2017
2431
  return __returned__;
2018
2432
  }
2019
2433
  });
2020
- function _sfc_render$17(_ctx, _cache, $props, $setup, $data, $options) {
2434
+ function _sfc_render$18(_ctx, _cache, $props, $setup, $data, $options) {
2021
2435
  return openBlock(), createBlock($setup["BrandEmail"], {
2022
2436
  preview: $setup.t.documentBlocked($setup.document),
2023
2437
  heading: $setup.t.documentBlockedHeading,
@@ -2064,10 +2478,10 @@ function _sfc_render$17(_ctx, _cache, $props, $setup, $data, $options) {
2064
2478
  "action"
2065
2479
  ]);
2066
2480
  }
2067
- var DocumentBlocked_default = /*#__PURE__*/ export_helper_default(_sfc_main$17, [["render", _sfc_render$17], ["__file", "/home/runner/work/open-pencil/open-pencil/packages/cloud/src/email/templates/DocumentBlocked.vue"]]);
2481
+ var DocumentBlocked_default = /*#__PURE__*/ export_helper_default(_sfc_main$18, [["render", _sfc_render$18], ["__file", "/home/runner/work/open-pencil/open-pencil/packages/cloud/src/email/templates/DocumentBlocked.vue"]]);
2068
2482
  //#endregion
2069
2483
  //#region src/email/templates/DocumentInvitation.vue
2070
- const _sfc_main$16 = /*@__PURE__*/ defineComponent({
2484
+ const _sfc_main$17 = /*@__PURE__*/ defineComponent({
2071
2485
  __name: "DocumentInvitation",
2072
2486
  props: { payload: {
2073
2487
  type: null,
@@ -2095,7 +2509,7 @@ const _sfc_main$16 = /*@__PURE__*/ defineComponent({
2095
2509
  return __returned__;
2096
2510
  }
2097
2511
  });
2098
- function _sfc_render$16(_ctx, _cache, $props, $setup, $data, $options) {
2512
+ function _sfc_render$17(_ctx, _cache, $props, $setup, $data, $options) {
2099
2513
  return openBlock(), createBlock($setup["BrandEmail"], {
2100
2514
  preview: $setup.message,
2101
2515
  heading: $setup.t.documentInvitationHeading,
@@ -2116,11 +2530,11 @@ function _sfc_render$16(_ctx, _cache, $props, $setup, $data, $options) {
2116
2530
  "action"
2117
2531
  ]);
2118
2532
  }
2119
- var DocumentInvitation_default = /*#__PURE__*/ export_helper_default(_sfc_main$16, [["render", _sfc_render$16], ["__file", "/home/runner/work/open-pencil/open-pencil/packages/cloud/src/email/templates/DocumentInvitation.vue"]]);
2533
+ var DocumentInvitation_default = /*#__PURE__*/ export_helper_default(_sfc_main$17, [["render", _sfc_render$17], ["__file", "/home/runner/work/open-pencil/open-pencil/packages/cloud/src/email/templates/DocumentInvitation.vue"]]);
2120
2534
  //#endregion
2121
2535
  //#region src/email/templates/DocumentReport.vue
2122
2536
  /** To administrators: someone reported a shared document, in their own words. */
2123
- const _sfc_main$15 = /*@__PURE__*/ defineComponent({
2537
+ const _sfc_main$16 = /*@__PURE__*/ defineComponent({
2124
2538
  __name: "DocumentReport",
2125
2539
  props: { payload: {
2126
2540
  type: null,
@@ -2153,7 +2567,7 @@ const _sfc_main$15 = /*@__PURE__*/ defineComponent({
2153
2567
  return __returned__;
2154
2568
  }
2155
2569
  });
2156
- function _sfc_render$15(_ctx, _cache, $props, $setup, $data, $options) {
2570
+ function _sfc_render$16(_ctx, _cache, $props, $setup, $data, $options) {
2157
2571
  return openBlock(), createBlock($setup["BrandEmail"], {
2158
2572
  preview: $setup.t.documentReportPreview($setup.report),
2159
2573
  heading: $setup.t.documentReportHeading,
@@ -2176,11 +2590,11 @@ function _sfc_render$15(_ctx, _cache, $props, $setup, $data, $options) {
2176
2590
  "action"
2177
2591
  ]);
2178
2592
  }
2179
- var DocumentReport_default = /*#__PURE__*/ export_helper_default(_sfc_main$15, [["render", _sfc_render$15], ["__file", "/home/runner/work/open-pencil/open-pencil/packages/cloud/src/email/templates/DocumentReport.vue"]]);
2593
+ var DocumentReport_default = /*#__PURE__*/ export_helper_default(_sfc_main$16, [["render", _sfc_render$16], ["__file", "/home/runner/work/open-pencil/open-pencil/packages/cloud/src/email/templates/DocumentReport.vue"]]);
2180
2594
  //#endregion
2181
2595
  //#region src/email/templates/DocumentReportDecided.vue
2182
2596
  /** To whoever reported a document: what the administrators decided, and where to disagree. */
2183
- const _sfc_main$14 = /*@__PURE__*/ defineComponent({
2597
+ const _sfc_main$15 = /*@__PURE__*/ defineComponent({
2184
2598
  __name: "DocumentReportDecided",
2185
2599
  props: { payload: {
2186
2600
  type: null,
@@ -2227,7 +2641,7 @@ const _sfc_main$14 = /*@__PURE__*/ defineComponent({
2227
2641
  return __returned__;
2228
2642
  }
2229
2643
  });
2230
- function _sfc_render$14(_ctx, _cache, $props, $setup, $data, $options) {
2644
+ function _sfc_render$15(_ctx, _cache, $props, $setup, $data, $options) {
2231
2645
  return openBlock(), createBlock($setup["BrandEmail"], {
2232
2646
  preview: $setup.decision.message,
2233
2647
  heading: $setup.decision.heading
@@ -2255,11 +2669,11 @@ function _sfc_render$14(_ctx, _cache, $props, $setup, $data, $options) {
2255
2669
  _: 1
2256
2670
  }, 8, ["preview", "heading"]);
2257
2671
  }
2258
- var DocumentReportDecided_default = /*#__PURE__*/ export_helper_default(_sfc_main$14, [["render", _sfc_render$14], ["__file", "/home/runner/work/open-pencil/open-pencil/packages/cloud/src/email/templates/DocumentReportDecided.vue"]]);
2672
+ var DocumentReportDecided_default = /*#__PURE__*/ export_helper_default(_sfc_main$15, [["render", _sfc_render$15], ["__file", "/home/runner/work/open-pencil/open-pencil/packages/cloud/src/email/templates/DocumentReportDecided.vue"]]);
2259
2673
  //#endregion
2260
2674
  //#region src/email/templates/DocumentReportReceived.vue
2261
2675
  /** To whoever reported a document: their report arrived, and they'll hear the decision. */
2262
- const _sfc_main$13 = /*@__PURE__*/ defineComponent({
2676
+ const _sfc_main$14 = /*@__PURE__*/ defineComponent({
2263
2677
  __name: "DocumentReportReceived",
2264
2678
  props: { payload: {
2265
2679
  type: null,
@@ -2281,7 +2695,7 @@ const _sfc_main$13 = /*@__PURE__*/ defineComponent({
2281
2695
  return __returned__;
2282
2696
  }
2283
2697
  });
2284
- function _sfc_render$13(_ctx, _cache, $props, $setup, $data, $options) {
2698
+ function _sfc_render$14(_ctx, _cache, $props, $setup, $data, $options) {
2285
2699
  return openBlock(), createBlock($setup["BrandEmail"], {
2286
2700
  preview: $setup.t.reportReceived($setup.document),
2287
2701
  heading: $setup.t.reportReceivedHeading
@@ -2293,11 +2707,11 @@ function _sfc_render$13(_ctx, _cache, $props, $setup, $data, $options) {
2293
2707
  _: 1
2294
2708
  }, 8, ["preview", "heading"]);
2295
2709
  }
2296
- var DocumentReportReceived_default = /*#__PURE__*/ export_helper_default(_sfc_main$13, [["render", _sfc_render$13], ["__file", "/home/runner/work/open-pencil/open-pencil/packages/cloud/src/email/templates/DocumentReportReceived.vue"]]);
2710
+ var DocumentReportReceived_default = /*#__PURE__*/ export_helper_default(_sfc_main$14, [["render", _sfc_render$14], ["__file", "/home/runner/work/open-pencil/open-pencil/packages/cloud/src/email/templates/DocumentReportReceived.vue"]]);
2297
2711
  //#endregion
2298
2712
  //#region src/email/templates/DocumentRestored.vue
2299
2713
  /** To a workspace's owner: a document an administrator took down is back. */
2300
- const _sfc_main$12 = /*@__PURE__*/ defineComponent({
2714
+ const _sfc_main$13 = /*@__PURE__*/ defineComponent({
2301
2715
  __name: "DocumentRestored",
2302
2716
  props: { payload: {
2303
2717
  type: null,
@@ -2324,7 +2738,7 @@ const _sfc_main$12 = /*@__PURE__*/ defineComponent({
2324
2738
  return __returned__;
2325
2739
  }
2326
2740
  });
2327
- function _sfc_render$12(_ctx, _cache, $props, $setup, $data, $options) {
2741
+ function _sfc_render$13(_ctx, _cache, $props, $setup, $data, $options) {
2328
2742
  return openBlock(), createBlock($setup["BrandEmail"], {
2329
2743
  preview: $setup.t.documentRestored($setup.document),
2330
2744
  heading: $setup.t.documentRestoredHeading,
@@ -2347,11 +2761,11 @@ function _sfc_render$12(_ctx, _cache, $props, $setup, $data, $options) {
2347
2761
  "action"
2348
2762
  ]);
2349
2763
  }
2350
- var DocumentRestored_default = /*#__PURE__*/ export_helper_default(_sfc_main$12, [["render", _sfc_render$12], ["__file", "/home/runner/work/open-pencil/open-pencil/packages/cloud/src/email/templates/DocumentRestored.vue"]]);
2764
+ var DocumentRestored_default = /*#__PURE__*/ export_helper_default(_sfc_main$13, [["render", _sfc_render$13], ["__file", "/home/runner/work/open-pencil/open-pencil/packages/cloud/src/email/templates/DocumentRestored.vue"]]);
2351
2765
  //#endregion
2352
2766
  //#region src/email/templates/EmailChangeRequested.vue
2353
2767
  /** To the address being replaced: which address is taking over, before it confirms. */
2354
- const _sfc_main$11 = /*@__PURE__*/ defineComponent({
2768
+ const _sfc_main$12 = /*@__PURE__*/ defineComponent({
2355
2769
  __name: "EmailChangeRequested",
2356
2770
  props: { payload: {
2357
2771
  type: null,
@@ -2377,7 +2791,7 @@ const _sfc_main$11 = /*@__PURE__*/ defineComponent({
2377
2791
  return __returned__;
2378
2792
  }
2379
2793
  });
2380
- function _sfc_render$11(_ctx, _cache, $props, $setup, $data, $options) {
2794
+ function _sfc_render$12(_ctx, _cache, $props, $setup, $data, $options) {
2381
2795
  return openBlock(), createBlock($setup["BrandEmail"], {
2382
2796
  preview: $setup.t.emailChangePreview({ email: $props.payload.newEmail }),
2383
2797
  heading: $setup.t.emailChangeHeading,
@@ -2407,11 +2821,11 @@ function _sfc_render$11(_ctx, _cache, $props, $setup, $data, $options) {
2407
2821
  "action"
2408
2822
  ]);
2409
2823
  }
2410
- var EmailChangeRequested_default = /*#__PURE__*/ export_helper_default(_sfc_main$11, [["render", _sfc_render$11], ["__file", "/home/runner/work/open-pencil/open-pencil/packages/cloud/src/email/templates/EmailChangeRequested.vue"]]);
2824
+ var EmailChangeRequested_default = /*#__PURE__*/ export_helper_default(_sfc_main$12, [["render", _sfc_render$12], ["__file", "/home/runner/work/open-pencil/open-pencil/packages/cloud/src/email/templates/EmailChangeRequested.vue"]]);
2411
2825
  //#endregion
2412
2826
  //#region src/email/templates/EmailRoot.vue
2413
2827
  /** Renders an email in its reader's language, which it and its layout read. */
2414
- const _sfc_main$10 = /*@__PURE__*/ defineComponent({
2828
+ const _sfc_main$11 = /*@__PURE__*/ defineComponent({
2415
2829
  __name: "EmailRoot",
2416
2830
  props: {
2417
2831
  email: {
@@ -2438,14 +2852,14 @@ const _sfc_main$10 = /*@__PURE__*/ defineComponent({
2438
2852
  return __returned__;
2439
2853
  }
2440
2854
  });
2441
- function _sfc_render$10(_ctx, _cache, $props, $setup, $data, $options) {
2855
+ function _sfc_render$11(_ctx, _cache, $props, $setup, $data, $options) {
2442
2856
  return openBlock(), createBlock(resolveDynamicComponent($props.email), normalizeProps(guardReactiveProps($props.props)), null, 16);
2443
2857
  }
2444
- var EmailRoot_default = /*#__PURE__*/ export_helper_default(_sfc_main$10, [["render", _sfc_render$10], ["__file", "/home/runner/work/open-pencil/open-pencil/packages/cloud/src/email/templates/EmailRoot.vue"]]);
2858
+ var EmailRoot_default = /*#__PURE__*/ export_helper_default(_sfc_main$11, [["render", _sfc_render$11], ["__file", "/home/runner/work/open-pencil/open-pencil/packages/cloud/src/email/templates/EmailRoot.vue"]]);
2445
2859
  //#endregion
2446
2860
  //#region src/email/templates/EmailVerification.vue
2447
2861
  /** Confirms the address a new account signed up with, or one an account is moving to. */
2448
- const _sfc_main$9 = /*@__PURE__*/ defineComponent({
2862
+ const _sfc_main$10 = /*@__PURE__*/ defineComponent({
2449
2863
  __name: "EmailVerification",
2450
2864
  props: { payload: {
2451
2865
  type: null,
@@ -2482,7 +2896,7 @@ const _sfc_main$9 = /*@__PURE__*/ defineComponent({
2482
2896
  return __returned__;
2483
2897
  }
2484
2898
  });
2485
- function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
2899
+ function _sfc_render$10(_ctx, _cache, $props, $setup, $data, $options) {
2486
2900
  return openBlock(), createBlock($setup["BrandEmail"], {
2487
2901
  preview: $setup.copy.preview,
2488
2902
  heading: $setup.copy.heading,
@@ -2506,7 +2920,123 @@ function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
2506
2920
  "action"
2507
2921
  ]);
2508
2922
  }
2509
- var EmailVerification_default = /*#__PURE__*/ export_helper_default(_sfc_main$9, [["render", _sfc_render$9], ["__file", "/home/runner/work/open-pencil/open-pencil/packages/cloud/src/email/templates/EmailVerification.vue"]]);
2923
+ var EmailVerification_default = /*#__PURE__*/ export_helper_default(_sfc_main$10, [["render", _sfc_render$10], ["__file", "/home/runner/work/open-pencil/open-pencil/packages/cloud/src/email/templates/EmailVerification.vue"]]);
2924
+ //#endregion
2925
+ //#region src/email/templates/EnrollmentInvitation.vue
2926
+ /**
2927
+ * A letter from OpenPencil's founder to someone who asked for the official Cloud before it opened,
2928
+ * or joined its waitlist on openpencil.dev: thanks for waiting, it is a beta, and where to say what
2929
+ * breaks. Replies reach a person, through the deployment's reply address. The waitlist gave no
2930
+ * name, so its letter opens with the thanks rather than a greeting.
2931
+ */
2932
+ const _sfc_main$9 = /*@__PURE__*/ defineComponent({
2933
+ __name: "EnrollmentInvitation",
2934
+ props: { payload: {
2935
+ type: null,
2936
+ required: true
2937
+ } },
2938
+ setup(__props, { expose: __expose }) {
2939
+ __expose();
2940
+ const localization = useEmailLocalization();
2941
+ const { t } = localization;
2942
+ const beta = __props.payload.waitlist ? t.invitationWaitlistBeta : t.invitationBeta;
2943
+ const [beforeIssue = "", afterIssue = ""] = beta.split("{link}");
2944
+ const [beforeDownload = "", afterDownload = ""] = t.invitationDesktop.split("{link}");
2945
+ const __returned__ = {
2946
+ localization,
2947
+ t,
2948
+ beta,
2949
+ beforeIssue,
2950
+ afterIssue,
2951
+ beforeDownload,
2952
+ afterDownload,
2953
+ get Link() {
2954
+ return Link;
2955
+ },
2956
+ get BUG_REPORT_URL() {
2957
+ return BUG_REPORT_URL;
2958
+ },
2959
+ get DESKTOP_BETA_URL() {
2960
+ return DESKTOP_BETA_URL;
2961
+ },
2962
+ get styles() {
2963
+ return styles;
2964
+ },
2965
+ BrandEmail: BrandEmail_default,
2966
+ EmailText: EmailText_default,
2967
+ get greeting() {
2968
+ return greeting;
2969
+ }
2970
+ };
2971
+ Object.defineProperty(__returned__, "__isScriptSetup", {
2972
+ enumerable: false,
2973
+ value: true
2974
+ });
2975
+ return __returned__;
2976
+ }
2977
+ });
2978
+ function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
2979
+ return openBlock(), createBlock($setup["BrandEmail"], {
2980
+ preview: $props.payload.waitlist ? $setup.t.invitationWaitlistPreview : $setup.t.invitationPreview,
2981
+ heading: $setup.t.invitationHeading,
2982
+ action: {
2983
+ label: $setup.t.invitationAction,
2984
+ url: $props.payload.actionURL
2985
+ }
2986
+ }, {
2987
+ signature: withCtx(() => [
2988
+ createTextVNode(toDisplayString($setup.t.invitationSignatureName), 1),
2989
+ _cache[0] || (_cache[0] = createElementVNode("br", null, null, -1)),
2990
+ createTextVNode(" " + toDisplayString($setup.t.invitationSignatureRole), 1)
2991
+ ]),
2992
+ default: withCtx(() => [
2993
+ $props.payload.waitlist ? (openBlock(), createBlock($setup["EmailText"], { key: 0 }, {
2994
+ default: withCtx(() => [createTextVNode(toDisplayString($setup.t.invitationWaitlistThanks), 1)]),
2995
+ _: 1
2996
+ })) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createVNode($setup["EmailText"], null, {
2997
+ default: withCtx(() => [createTextVNode(toDisplayString($setup.greeting($setup.localization, $props.payload.name)), 1)]),
2998
+ _: 1
2999
+ }), createVNode($setup["EmailText"], null, {
3000
+ default: withCtx(() => [createTextVNode(toDisplayString($setup.t.invitationThanks), 1)]),
3001
+ _: 1
3002
+ })], 64)),
3003
+ createVNode($setup["EmailText"], null, {
3004
+ default: withCtx(() => [
3005
+ createTextVNode(toDisplayString($setup.beforeIssue), 1),
3006
+ createVNode($setup["Link"], {
3007
+ href: $setup.BUG_REPORT_URL,
3008
+ style: normalizeStyle($setup.styles.link)
3009
+ }, {
3010
+ default: withCtx(() => [createTextVNode(toDisplayString($setup.t.invitationIssueLink), 1)]),
3011
+ _: 1
3012
+ }, 8, ["href", "style"]),
3013
+ createTextVNode(toDisplayString($setup.afterIssue), 1)
3014
+ ]),
3015
+ _: 1
3016
+ }),
3017
+ createVNode($setup["EmailText"], null, {
3018
+ default: withCtx(() => [
3019
+ createTextVNode(toDisplayString($setup.beforeDownload), 1),
3020
+ createVNode($setup["Link"], {
3021
+ href: $setup.DESKTOP_BETA_URL,
3022
+ style: normalizeStyle($setup.styles.link)
3023
+ }, {
3024
+ default: withCtx(() => [createTextVNode(toDisplayString($setup.t.invitationDownloadLink), 1)]),
3025
+ _: 1
3026
+ }, 8, ["href", "style"]),
3027
+ createTextVNode(toDisplayString($setup.afterDownload), 1)
3028
+ ]),
3029
+ _: 1
3030
+ })
3031
+ ]),
3032
+ _: 1
3033
+ }, 8, [
3034
+ "preview",
3035
+ "heading",
3036
+ "action"
3037
+ ]);
3038
+ }
3039
+ var EnrollmentInvitation_default = /*#__PURE__*/ export_helper_default(_sfc_main$9, [["render", _sfc_render$9], ["__file", "/home/runner/work/open-pencil/open-pencil/packages/cloud/src/email/templates/EnrollmentInvitation.vue"]]);
2510
3040
  //#endregion
2511
3041
  //#region src/email/templates/EnrollmentNotification.vue
2512
3042
  /** To administrators: someone asked for access, in their own words. */
@@ -2897,492 +3427,237 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
2897
3427
  }
2898
3428
  var StorageLimitReached_default = /*#__PURE__*/ export_helper_default(_sfc_main$3, [["render", _sfc_render$3], ["__file", "/home/runner/work/open-pencil/open-pencil/packages/cloud/src/email/templates/StorageLimitReached.vue"]]);
2899
3429
  //#endregion
2900
- //#region src/email/templates/TwoStepChanged.vue
2901
- /** How the account proves it's its owner's changed: an authenticator app or a passkey. */
2902
- const _sfc_main$2 = /*@__PURE__*/ defineComponent({
2903
- __name: "TwoStepChanged",
2904
- props: { payload: {
2905
- type: null,
2906
- required: true
2907
- } },
2908
- setup(__props, { expose: __expose }) {
2909
- __expose();
2910
- const localization = useEmailLocalization();
2911
- const { t } = localization;
2912
- const changes = {
2913
- "authenticator-on": {
2914
- heading: t.authenticatorOnHeading,
2915
- message: t.authenticatorOn
2916
- },
2917
- "authenticator-off": {
2918
- heading: t.authenticatorOffHeading,
2919
- message: t.authenticatorOff
2920
- },
2921
- "passkey-added": {
2922
- heading: t.passkeyAddedHeading,
2923
- message: t.passkeyAdded
2924
- },
2925
- "passkey-removed": {
2926
- heading: t.passkeyRemovedHeading,
2927
- message: t.passkeyRemoved
2928
- },
2929
- "reset-by-administrator": {
2930
- heading: t.twoStepResetHeading,
2931
- message: t.twoStepReset
2932
- }
2933
- };
2934
- const __returned__ = {
2935
- localization,
2936
- t,
2937
- changes,
2938
- change: changes[__props.payload.change],
2939
- BrandEmail: BrandEmail_default,
2940
- EmailText: EmailText_default,
2941
- get greeting() {
2942
- return greeting;
2943
- }
2944
- };
2945
- Object.defineProperty(__returned__, "__isScriptSetup", {
2946
- enumerable: false,
2947
- value: true
2948
- });
2949
- return __returned__;
2950
- }
3430
+ //#region src/contract/account.ts
3431
+ /**
3432
+ * Where an account stands: it may use the server, waits for an administrator, was refused or had
3433
+ * its access taken back, has to prove its second step in this session, as after signing in through
3434
+ * a linked account such as Google, or has to accept the server's current terms first.
3435
+ */
3436
+ const cloudAccountStateSchema = v.picklist([
3437
+ "active",
3438
+ "pending",
3439
+ "rejected",
3440
+ "revoked",
3441
+ "two-step",
3442
+ "terms"
3443
+ ]);
3444
+ const cloudIdentitySchema = v.object({
3445
+ userId: v.string(),
3446
+ email: v.pipe(v.string(), v.email()),
3447
+ name: v.string(),
3448
+ /** The account's picture, such as one a social provider gave it. */
3449
+ image: v.optional(v.nullable(v.string())),
3450
+ deploymentRole: v.optional(v.picklist(["user", "admin"]))
2951
3451
  });
2952
- function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
2953
- return openBlock(), createBlock($setup["BrandEmail"], {
2954
- preview: $setup.change.message,
2955
- heading: $setup.change.heading,
2956
- action: {
2957
- label: $setup.t.reviewSecurity,
2958
- url: $props.payload.actionURL
2959
- }
2960
- }, {
2961
- default: withCtx(() => [
2962
- createVNode($setup["EmailText"], null, {
2963
- default: withCtx(() => [createTextVNode(toDisplayString($setup.greeting($setup.localization, $props.payload.name)), 1)]),
2964
- _: 1
2965
- }),
2966
- createVNode($setup["EmailText"], null, {
2967
- default: withCtx(() => [createTextVNode(toDisplayString($setup.change.message), 1)]),
2968
- _: 1
2969
- }),
2970
- createVNode($setup["EmailText"], null, {
2971
- default: withCtx(() => [createTextVNode(toDisplayString($setup.t.twoStepNotYou), 1)]),
2972
- _: 1
2973
- })
2974
- ]),
2975
- _: 1
2976
- }, 8, [
2977
- "preview",
2978
- "heading",
2979
- "action"
2980
- ]);
2981
- }
2982
- var TwoStepChanged_default = /*#__PURE__*/ export_helper_default(_sfc_main$2, [["render", _sfc_render$2], ["__file", "/home/runner/work/open-pencil/open-pencil/packages/cloud/src/email/templates/TwoStepChanged.vue"]]);
2983
- //#endregion
2984
- //#region src/email/templates/WaitlistConfirmation.vue
2985
- /** Asks a waitlist sign-up to confirm its address; its links carry the sign-up's token only. */
2986
- const _sfc_main$1 = /*@__PURE__*/ defineComponent({
2987
- __name: "WaitlistConfirmation",
2988
- props: {
2989
- confirmURL: {
2990
- type: String,
2991
- required: true
2992
- },
2993
- leaveURL: {
2994
- type: String,
2995
- required: true
2996
- }
2997
- },
2998
- setup(__props, { expose: __expose }) {
2999
- __expose();
3000
- const { t } = useEmailLocalization();
3001
- const [beforeLink = "", afterLink = ""] = t.waitlistNote.split("{link}");
3002
- const __returned__ = {
3003
- t,
3004
- beforeLink,
3005
- afterLink,
3006
- get Link() {
3007
- return Link;
3008
- },
3009
- get styles() {
3010
- return styles;
3011
- },
3012
- BrandEmail: BrandEmail_default,
3013
- EmailText: EmailText_default
3014
- };
3015
- Object.defineProperty(__returned__, "__isScriptSetup", {
3016
- enumerable: false,
3017
- value: true
3018
- });
3019
- return __returned__;
3020
- }
3452
+ v.object({
3453
+ user: cloudIdentitySchema,
3454
+ state: cloudAccountStateSchema
3021
3455
  });
3022
- function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
3023
- return openBlock(), createBlock($setup["BrandEmail"], {
3024
- preview: $setup.t.waitlistPreview,
3025
- heading: $setup.t.waitlistHeading,
3026
- action: {
3027
- label: $setup.t.waitlistAction,
3028
- url: $props.confirmURL
3029
- }
3030
- }, {
3031
- note: withCtx(() => [
3032
- createTextVNode(toDisplayString($setup.beforeLink), 1),
3033
- createVNode($setup["Link"], {
3034
- href: $props.leaveURL,
3035
- style: normalizeStyle($setup.styles.link)
3036
- }, {
3037
- default: withCtx(() => [createTextVNode(toDisplayString($setup.t.waitlistLeave), 1)]),
3038
- _: 1
3039
- }, 8, ["href", "style"]),
3040
- createTextVNode(toDisplayString($setup.afterLink), 1)
3041
- ]),
3042
- default: withCtx(() => [createVNode($setup["EmailText"], null, {
3043
- default: withCtx(() => [createTextVNode(toDisplayString($setup.t.waitlist), 1)]),
3044
- _: 1
3045
- })]),
3046
- _: 1
3047
- }, 8, [
3048
- "preview",
3049
- "heading",
3050
- "action"
3051
- ]);
3052
- }
3053
- var WaitlistConfirmation_default = /*#__PURE__*/ export_helper_default(_sfc_main$1, [["render", _sfc_render$1], ["__file", "/home/runner/work/open-pencil/open-pencil/packages/cloud/src/email/templates/WaitlistConfirmation.vue"]]);
3054
- //#endregion
3055
- //#region src/email/templates/WorkspaceInvitation.vue
3056
- const _sfc_main = /*@__PURE__*/ defineComponent({
3057
- __name: "WorkspaceInvitation",
3058
- props: { payload: {
3059
- type: null,
3060
- required: true
3061
- } },
3062
- setup(__props, { expose: __expose }) {
3063
- __expose();
3064
- const { t, dateTime } = useEmailLocalization();
3065
- const names = {
3066
- inviter: __props.payload.inviterName ?? t.someone,
3067
- workspace: __props.payload.workspaceName
3068
- };
3069
- const __returned__ = {
3070
- t,
3071
- dateTime,
3072
- names,
3073
- message: {
3074
- admin: t.workspaceInvitationAdmin,
3075
- editor: t.workspaceInvitationEditor,
3076
- viewer: t.workspaceInvitationViewer
3077
- }[__props.payload.role](names),
3078
- BrandEmail: BrandEmail_default,
3079
- EmailText: EmailText_default
3080
- };
3081
- Object.defineProperty(__returned__, "__isScriptSetup", {
3082
- enumerable: false,
3083
- value: true
3084
- });
3085
- return __returned__;
3086
- }
3456
+ v.object({ version: v.pipe(v.string(), v.minLength(1)) });
3457
+ /**
3458
+ * The providers a person can sign in with besides a password, which this editor has buttons for,
3459
+ * in the order it shows them. Every list of providers in Cloud derives from this one.
3460
+ */
3461
+ const CLOUD_SOCIAL_PROVIDERS = [
3462
+ "google",
3463
+ "apple",
3464
+ "github"
3465
+ ];
3466
+ const cloudSocialProviderSchema = v.picklist(CLOUD_SOCIAL_PROVIDERS);
3467
+ /** Each provider's name, as its owner writes it in every language. */
3468
+ const CLOUD_SOCIAL_PROVIDER_NAMES = {
3469
+ google: "Google",
3470
+ apple: "Apple",
3471
+ github: "GitHub"
3472
+ };
3473
+ const cloudAuthenticationProviderSchema = v.picklist(["credential", ...CLOUD_SOCIAL_PROVIDERS]);
3474
+ const cloudAuthenticationMethodSchema = v.object({
3475
+ id: v.string(),
3476
+ provider: cloudAuthenticationProviderSchema,
3477
+ createdAt: v.string(),
3478
+ canUnlink: v.boolean()
3087
3479
  });
3088
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
3089
- return openBlock(), createBlock($setup["BrandEmail"], {
3090
- preview: $setup.t.workspaceInvitationSubject($setup.names),
3091
- heading: $setup.t.workspaceInvitationHeading($setup.names),
3092
- action: {
3093
- label: $setup.t.workspaceInvitationAction,
3094
- url: $props.payload.acceptanceURL
3095
- }
3096
- }, {
3097
- note: withCtx(() => [createTextVNode(toDisplayString($setup.t.invitationExpires({ date: $setup.dateTime($props.payload.expiresAt) })), 1)]),
3098
- default: withCtx(() => [createVNode($setup["EmailText"], null, {
3099
- default: withCtx(() => [createTextVNode(toDisplayString($setup.message), 1)]),
3100
- _: 1
3101
- }), createVNode($setup["EmailText"], null, {
3102
- default: withCtx(() => [createTextVNode(toDisplayString($setup.t.workspaceInvitationHome), 1)]),
3103
- _: 1
3104
- })]),
3105
- _: 1
3106
- }, 8, [
3107
- "preview",
3108
- "heading",
3109
- "action"
3110
- ]);
3480
+ /** Whether this editor knows `provider`, so a newer server's other providers can be left out. */
3481
+ function isKnownSocialProvider(provider) {
3482
+ return CLOUD_SOCIAL_PROVIDERS.includes(provider);
3111
3483
  }
3112
- var WorkspaceInvitation_default = /*#__PURE__*/ export_helper_default(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/open-pencil/open-pencil/packages/cloud/src/email/templates/WorkspaceInvitation.vue"]]);
3113
- //#endregion
3114
- //#region src/email/render.ts
3115
- function documentInvitationSubject(payload, t) {
3116
- const names = {
3117
- inviter: payload.inviterName ?? t.someone,
3118
- document: payload.documentName
3119
- };
3120
- return payload.permission === "edit" ? t.documentInvitationEditSubject(names) : t.documentInvitationViewSubject(names);
3484
+ /** Whether `provider` is a way to sign in this editor knows: a password or a known provider. */
3485
+ function isKnownAuthenticationProvider(provider) {
3486
+ return provider === "credential" || isKnownSocialProvider(provider);
3121
3487
  }
3122
- const EMAILS = {
3123
- "document-invitation": {
3124
- component: DocumentInvitation_default,
3125
- subject: documentInvitationSubject
3126
- },
3127
- "workspace-invitation": {
3128
- component: WorkspaceInvitation_default,
3129
- subject: (payload, t) => t.workspaceInvitationSubject({
3130
- inviter: payload.inviterName ?? t.someone,
3131
- workspace: payload.workspaceName
3132
- })
3133
- },
3134
- "enrollment-requested": {
3135
- component: EnrollmentUpdate_default,
3136
- props: { kind: "requested" },
3137
- subject: (_payload, t) => t.enrollmentRequestedSubject
3138
- },
3139
- "enrollment-approved": {
3140
- component: EnrollmentUpdate_default,
3141
- props: { kind: "approved" },
3142
- subject: (_payload, t) => t.enrollmentApprovedSubject
3143
- },
3144
- "enrollment-rejected": {
3145
- component: EnrollmentUpdate_default,
3146
- props: { kind: "rejected" },
3147
- subject: (_payload, t) => t.enrollmentRejectedSubject
3148
- },
3149
- "enrollment-revoked": {
3150
- component: EnrollmentUpdate_default,
3151
- props: { kind: "revoked" },
3152
- subject: (_payload, t) => t.enrollmentRevokedSubject
3153
- },
3154
- "admin-enrollment-notification": {
3155
- component: EnrollmentNotification_default,
3156
- subject: (_payload, t) => t.enrollmentNotificationSubject
3157
- },
3158
- "email-verification": {
3159
- component: EmailVerification_default,
3160
- subject: (payload, t) => payload.purpose === "change" ? t.verifyChangeSubject : t.verifyAccountSubject
3161
- },
3162
- "password-reset": {
3163
- component: PasswordReset_default,
3164
- subject: (_payload, t) => t.passwordResetSubject
3165
- },
3166
- "password-changed": {
3167
- component: PasswordChanged_default,
3168
- subject: (_payload, t) => t.passwordChangedSubject
3169
- },
3170
- "email-change-requested": {
3171
- component: EmailChangeRequested_default,
3172
- subject: (_payload, t) => t.emailChangeSubject
3173
- },
3174
- "new-sign-in": {
3175
- component: NewSignIn_default,
3176
- subject: (_payload, t) => t.newSignInSubject
3177
- },
3178
- "two-step-changed": {
3179
- component: TwoStepChanged_default,
3180
- subject: (_payload, t) => t.twoStepSubject
3181
- },
3182
- "document-report": {
3183
- component: DocumentReport_default,
3184
- subject: (_payload, t) => t.documentReportSubject
3185
- },
3186
- "storage-limit-reached": {
3187
- component: StorageLimitReached_default,
3188
- subject: (_payload, t) => t.storageFullSubject
3189
- },
3190
- "document-blocked": {
3191
- component: DocumentBlocked_default,
3192
- subject: (payload, t) => t.documentBlockedSubject({ document: payload.documentName })
3193
- },
3194
- "document-restored": {
3195
- component: DocumentRestored_default,
3196
- subject: (payload, t) => t.documentRestoredSubject({ document: payload.documentName })
3197
- },
3198
- "document-report-received": {
3199
- component: DocumentReportReceived_default,
3200
- subject: (payload, t) => t.reportReceivedSubject({ document: payload.documentName })
3201
- },
3202
- "document-report-decided": {
3203
- component: DocumentReportDecided_default,
3204
- subject: (payload, t) => t.reportDecidedSubject({ document: payload.documentName })
3205
- }
3206
- };
3207
- /** Renders an email component as HTML and as plain text, in its reader's language. */
3208
- async function renderComponent(email, props, subject, localization) {
3209
- const root = {
3210
- email,
3211
- props,
3212
- localization
3213
- };
3214
- const [html, text] = await Promise.all([render(EmailRoot_default, root), render(EmailRoot_default, root, { plainText: true })]);
3215
- return {
3216
- subject,
3217
- html,
3218
- text
3219
- };
3220
- }
3221
- function renderKind(kind, payload, localization) {
3222
- const { component, props, subject } = EMAILS[kind];
3223
- return renderComponent(component, {
3224
- ...props,
3225
- payload
3226
- }, subject(payload, localization.t), localization);
3227
- }
3228
- async function renderTransactionalEmail(content, locale) {
3229
- return renderKind(content.kind, content.payload, emailLocalization(locale));
3230
- }
3231
- /** The waitlist's confirmation email, which the feedback service sends rather than Cloud. */
3232
- async function renderWaitlistConfirmation(links, locale) {
3233
- const localization = emailLocalization(locale);
3234
- return renderComponent(WaitlistConfirmation_default, links, localization.t.waitlistSubject, localization);
3235
- }
3236
- //#endregion
3237
- //#region src/email/samples.ts
3238
- /** Where every sample's button goes. */
3239
- const EMAIL_SAMPLE_URL = "https://cloud.example.com/next";
3488
+ v.object({
3489
+ methods: v.pipe(v.array(v.looseObject({ provider: v.string() })), v.filterItems((method) => isKnownAuthenticationProvider(method.provider)), v.array(cloudAuthenticationMethodSchema)),
3490
+ availableSocialProviders: v.pipe(v.array(v.string()), v.filterItems(isKnownSocialProvider), v.array(cloudSocialProviderSchema))
3491
+ });
3492
+ v.object({
3493
+ currentPassword: v.string(),
3494
+ newPassword: v.string()
3495
+ });
3496
+ v.object({
3497
+ provider: cloudSocialProviderSchema,
3498
+ callbackURL: v.pipe(v.string(), v.url())
3499
+ });
3500
+ v.object({ url: v.pipe(v.string(), v.url()) });
3501
+ v.object({ methodId: v.string() });
3502
+ const accountSecurityErrorCodeSchema = v.picklist([
3503
+ "current_password_invalid",
3504
+ "password_too_short",
3505
+ "password_too_long",
3506
+ "last_authentication_method",
3507
+ "session_not_fresh",
3508
+ "authentication_method_failed",
3509
+ "code_invalid",
3510
+ "email_unchanged",
3511
+ "email_change_unavailable",
3512
+ "current_session",
3513
+ "picture_invalid",
3514
+ "account_sole_admin",
3515
+ "last_admin_required",
3516
+ "terms_changed"
3517
+ ]);
3518
+ v.object({ error: v.object({ code: accountSecurityErrorCodeSchema }) });
3519
+ const cloudMFAStatusSchema = v.object({
3520
+ required: v.boolean(),
3521
+ enabled: v.boolean(),
3522
+ totpEnabled: v.boolean(),
3523
+ assured: v.boolean(),
3524
+ totpAvailable: v.boolean(),
3525
+ passkeysAvailable: v.boolean(),
3526
+ recoveryCodesAvailable: v.boolean()
3527
+ });
3528
+ v.object({ mfa: cloudMFAStatusSchema });
3529
+ v.object({ password: v.optional(v.string()) });
3530
+ v.object({
3531
+ totpURI: v.string(),
3532
+ backupCodes: v.array(v.string())
3533
+ });
3534
+ v.object({ code: v.pipe(v.string(), v.trim(), v.minLength(1)) });
3535
+ v.object({ ok: v.literal(true) });
3536
+ v.object({ backupCodes: v.array(v.string()) });
3537
+ const cloudPasskeySchema = v.object({
3538
+ id: v.string(),
3539
+ name: v.nullish(v.string()),
3540
+ createdAt: v.string()
3541
+ });
3542
+ v.object({ passkeys: v.array(cloudPasskeySchema) });
3543
+ v.object({ id: v.string() });
3240
3544
  /**
3241
- * One email of every kind, with every optional part filled, as previews and tests show them. Its
3242
- * names and addresses are made up.
3545
+ * Personal access tokens: an account's own credentials for scripts and CI, sent as
3546
+ * `Authorization: Bearer <token>`. A token acts as its account on the document API only; it never
3547
+ * changes how the account is reached, makes other tokens, or reaches administration.
3243
3548
  */
3244
- const EMAIL_SAMPLES = [
3245
- {
3246
- kind: "document-invitation",
3247
- payload: {
3248
- inviterName: "Ada",
3249
- documentName: "Homepage",
3250
- permission: "edit",
3251
- expiresAt: "2026-11-20T10:00:00.000Z",
3252
- acceptanceURL: EMAIL_SAMPLE_URL
3253
- }
3254
- },
3255
- {
3256
- kind: "workspace-invitation",
3257
- payload: {
3258
- inviterName: null,
3259
- workspaceName: "Studio",
3260
- role: "viewer",
3261
- expiresAt: "2026-11-20T10:00:00.000Z",
3262
- acceptanceURL: EMAIL_SAMPLE_URL
3263
- }
3264
- },
3265
- ...[
3266
- "enrollment-requested",
3267
- "enrollment-approved",
3268
- "enrollment-rejected",
3269
- "enrollment-revoked"
3270
- ].map((kind) => ({
3271
- kind,
3272
- payload: {
3273
- name: "Ada",
3274
- actionURL: EMAIL_SAMPLE_URL
3275
- }
3276
- })),
3277
- {
3278
- kind: "admin-enrollment-notification",
3279
- payload: {
3280
- requesterEmail: "ada@example.com",
3281
- requesterName: "Ada",
3282
- reason: "Design",
3283
- actionURL: EMAIL_SAMPLE_URL
3284
- }
3285
- },
3286
- {
3287
- kind: "email-verification",
3288
- payload: {
3289
- name: "Ada",
3290
- actionURL: EMAIL_SAMPLE_URL,
3291
- purpose: "change"
3292
- }
3293
- },
3294
- {
3295
- kind: "password-reset",
3296
- payload: {
3297
- name: "Ada",
3298
- actionURL: EMAIL_SAMPLE_URL
3299
- }
3300
- },
3301
- {
3302
- kind: "password-changed",
3303
- payload: {
3304
- name: "Ada",
3305
- actionURL: EMAIL_SAMPLE_URL
3306
- }
3307
- },
3308
- {
3309
- kind: "email-change-requested",
3310
- payload: {
3311
- name: "Ada",
3312
- newEmail: "ada@new.example.com",
3313
- actionURL: EMAIL_SAMPLE_URL
3314
- }
3315
- },
3316
- {
3317
- kind: "new-sign-in",
3318
- payload: {
3319
- name: "Ada",
3320
- signedInAt: "2026-11-13T10:00:00.000Z",
3321
- ipAddress: "203.0.113.9",
3322
- browser: "Firefox",
3323
- system: "Linux",
3324
- desktop: false,
3325
- actionURL: EMAIL_SAMPLE_URL
3326
- }
3327
- },
3328
- {
3329
- kind: "two-step-changed",
3330
- payload: {
3331
- name: "Ada",
3332
- change: "passkey-added",
3333
- actionURL: EMAIL_SAMPLE_URL
3334
- }
3335
- },
3336
- {
3337
- kind: "document-report",
3338
- payload: {
3339
- documentName: "Homepage",
3340
- reason: "copyright",
3341
- description: "Copied",
3342
- actionURL: EMAIL_SAMPLE_URL
3343
- }
3344
- },
3345
- {
3346
- kind: "storage-limit-reached",
3347
- payload: {
3348
- name: "Ada",
3349
- usedBytes: 310 * 1024 ** 2,
3350
- limitBytes: 300 * 1024 ** 2,
3351
- upgradable: true,
3352
- actionURL: EMAIL_SAMPLE_URL
3353
- }
3354
- },
3355
- {
3356
- kind: "document-blocked",
3357
- payload: {
3358
- name: "Ada",
3359
- documentName: "Homepage",
3360
- reason: "Phishing page imitating a bank",
3361
- contactEmail: "abuse@example.com",
3362
- actionURL: EMAIL_SAMPLE_URL
3363
- }
3364
- },
3365
- {
3366
- kind: "document-restored",
3367
- payload: {
3368
- name: "Ada",
3369
- documentName: "Homepage",
3370
- actionURL: EMAIL_SAMPLE_URL
3371
- }
3372
- },
3373
- {
3374
- kind: "document-report-received",
3375
- payload: { documentName: "Homepage" }
3376
- },
3377
- {
3378
- kind: "document-report-decided",
3379
- payload: {
3380
- documentName: "Homepage",
3381
- outcome: "blocked",
3382
- contactEmail: "abuse@example.com"
3383
- }
3384
- }
3549
+ const CLOUD_ACCESS_TOKEN_PREFIX = "opc_";
3550
+ const cloudAccessTokenSchema = v.object({
3551
+ id: v.string(),
3552
+ name: v.string(),
3553
+ /** The token's first characters, prefix included, to tell tokens apart; never the whole token. */
3554
+ start: v.nullable(v.string()),
3555
+ createdAt: v.string(),
3556
+ expiresAt: v.nullable(v.string()),
3557
+ lastUsedAt: v.nullable(v.string())
3558
+ });
3559
+ v.object({ tokens: v.array(cloudAccessTokenSchema) });
3560
+ v.object({
3561
+ name: v.pipe(v.string(), v.trim(), v.minLength(1), v.maxLength(64)),
3562
+ expiresInDays: v.pipe(v.number(), v.integer(), v.minValue(1), v.maxValue(365))
3563
+ });
3564
+ v.object({
3565
+ token: v.pipe(v.string(), v.startsWith(CLOUD_ACCESS_TOKEN_PREFIX)),
3566
+ accessToken: cloudAccessTokenSchema
3567
+ });
3568
+ v.object({ id: v.pipe(v.string(), v.minLength(1)) });
3569
+ v.object({ ok: v.literal(true) });
3570
+ /** Who an account belongs to, as the portal shows it. */
3571
+ const cloudPersonSchema = v.object({
3572
+ id: v.string(),
3573
+ name: v.string(),
3574
+ email: v.pipe(v.string(), v.email()),
3575
+ /** The address of the account's picture, which the server serves; null shows initials. */
3576
+ image: v.nullable(v.string())
3577
+ });
3578
+ /** What a person can see and change about themselves. */
3579
+ const cloudProfileSchema = v.object({
3580
+ ...cloudPersonSchema.entries,
3581
+ createdAt: v.string(),
3582
+ /** Whether the server can send the verification a new email address needs. */
3583
+ emailChangeAvailable: v.boolean()
3584
+ });
3585
+ v.object({ profile: cloudProfileSchema });
3586
+ v.object({ name: v.pipe(v.string(), v.trim(), v.minLength(1), v.maxLength(100)) });
3587
+ v.object({
3588
+ /** The picture's PNG or JPEG bytes, in Base64. */
3589
+ data: v.pipe(v.string(), v.maxLength(Math.ceil(262144 / 3) * 4), v.check((value) => isValid(value))) });
3590
+ v.object({ image: v.string() });
3591
+ v.object({
3592
+ newEmail: v.pipe(v.string(), v.trim(), v.toLowerCase(), v.email()),
3593
+ callbackURL: v.pipe(v.string(), v.url())
3594
+ });
3595
+ /** How a sign-in was made: the method it used, or the desktop app's approved code. */
3596
+ const SIGN_IN_METHODS = [
3597
+ "password",
3598
+ ...CLOUD_SOCIAL_PROVIDERS,
3599
+ "passkey",
3600
+ "two-step",
3601
+ "email-link",
3602
+ "desktop",
3603
+ "other"
3385
3604
  ];
3605
+ const cloudSignInMethodSchema = v.picklist(SIGN_IN_METHODS);
3606
+ /** A method a newer server names that this editor does not know reads as `other`; a value that is
3607
+ * not a method name at all still fails. */
3608
+ const signInMethodResponseSchema = v.pipe(v.string(), v.transform((method) => v.is(cloudSignInMethodSchema, method) ? method : "other"));
3609
+ const cloudAccountSessionSchema = v.object({
3610
+ id: v.string(),
3611
+ /** The session this request was made with. */
3612
+ current: v.boolean(),
3613
+ method: v.nullable(signInMethodResponseSchema),
3614
+ ipAddress: v.nullable(v.string()),
3615
+ /** The browser and system the server read from the client's user agent, such as `Chrome 141`. */
3616
+ browser: v.nullable(v.string()),
3617
+ system: v.nullable(v.string()),
3618
+ createdAt: v.string(),
3619
+ lastActiveAt: v.string(),
3620
+ expiresAt: v.string()
3621
+ });
3622
+ v.object({ sessions: v.array(cloudAccountSessionSchema) });
3623
+ v.object({ sessionId: v.pipe(v.string(), v.minLength(1)) });
3624
+ const cloudSignInSchema = v.object({
3625
+ id: v.string(),
3626
+ method: signInMethodResponseSchema,
3627
+ ipAddress: v.nullable(v.string()),
3628
+ /** The browser and system the server read from the client's user agent, such as `Chrome 141`. */
3629
+ browser: v.nullable(v.string()),
3630
+ system: v.nullable(v.string()),
3631
+ createdAt: v.string()
3632
+ });
3633
+ v.object({ signIns: v.array(cloudSignInSchema) });
3634
+ /** A workspace an account deletion reads: one it would delete, or one that stops it. */
3635
+ const cloudAccountDeletionWorkspaceSchema = v.object({
3636
+ id: v.pipe(v.string(), v.uuid()),
3637
+ name: v.string()
3638
+ });
3639
+ /** A document the account would lose, which Download all saves first. */
3640
+ const cloudAccountDeletionDocumentSchema = v.object({
3641
+ id: v.pipe(v.string(), v.uuid()),
3642
+ name: v.string(),
3643
+ workspaceName: v.string()
3644
+ });
3645
+ /**
3646
+ * What deleting the account takes: the workspaces only it belongs to, which go with their
3647
+ * documents; the ones it leaves to their other members; the ones it alone administers for other
3648
+ * members, which stop the deletion until it makes someone else an admin; and the documents it
3649
+ * would lose, those workspaces' and the ones it created in workspaces it leaves.
3650
+ */
3651
+ const cloudAccountDeletionSchema = v.object({
3652
+ /** The account is the deployment's only administrator, which also stops the deletion. */
3653
+ lastAdministrator: v.boolean(),
3654
+ blockedBy: v.array(cloudAccountDeletionWorkspaceSchema),
3655
+ deletes: v.array(cloudAccountDeletionWorkspaceSchema),
3656
+ leaves: v.array(cloudAccountDeletionWorkspaceSchema),
3657
+ documents: v.array(cloudAccountDeletionDocumentSchema)
3658
+ });
3659
+ v.object({ deletion: cloudAccountDeletionSchema });
3660
+ v.object({ password: v.optional(v.pipe(v.string(), v.minLength(1))) });
3386
3661
  //#endregion
3387
3662
  //#region src/contract/documents.ts
3388
3663
  const CLOUD_PROTOCOL_MAX_UPLOAD_BYTES = 1073741824;
@@ -3597,6 +3872,11 @@ const workspaceSummarySchema = v.object({
3597
3872
  name: v.string(),
3598
3873
  slug: v.string(),
3599
3874
  role: workspaceRoleSchema,
3875
+ /**
3876
+ * Whether the signed-in account owns the workspace, and so pays for its plan and AI credits.
3877
+ * Absent from servers released before it.
3878
+ */
3879
+ owner: v.optional(v.boolean()),
3600
3880
  createdAt: v.string(),
3601
3881
  updatedAt: v.string()
3602
3882
  });
@@ -3721,46 +4001,591 @@ const invitationPreviewFields = {
3721
4001
  expiresAt: v.string(),
3722
4002
  recipientHint: v.string()
3723
4003
  };
3724
- v.variant("kind", [v.object({
3725
- kind: v.literal("document"),
3726
- documentName: v.string(),
3727
- permission: documentPermissionSchema,
3728
- ...invitationPreviewFields
3729
- }), v.object({
3730
- kind: v.literal("workspace"),
3731
- workspaceName: v.string(),
3732
- role: workspaceRoleSchema,
3733
- ...invitationPreviewFields
3734
- })]);
3735
- v.object({
3736
- id: v.pipe(v.string(), v.uuid()),
3737
- documentId: v.pipe(v.string(), v.uuid()),
3738
- email: v.pipe(v.string(), v.email()),
3739
- permission: documentPermissionSchema,
3740
- invitedBy: v.string(),
3741
- invitedAt: v.string(),
3742
- expiresAt: v.string(),
3743
- acceptedAt: v.nullable(v.string())
3744
- });
4004
+ v.variant("kind", [v.object({
4005
+ kind: v.literal("document"),
4006
+ documentName: v.string(),
4007
+ permission: documentPermissionSchema,
4008
+ ...invitationPreviewFields
4009
+ }), v.object({
4010
+ kind: v.literal("workspace"),
4011
+ workspaceName: v.string(),
4012
+ role: workspaceRoleSchema,
4013
+ ...invitationPreviewFields
4014
+ })]);
4015
+ v.object({
4016
+ id: v.pipe(v.string(), v.uuid()),
4017
+ documentId: v.pipe(v.string(), v.uuid()),
4018
+ email: v.pipe(v.string(), v.email()),
4019
+ permission: documentPermissionSchema,
4020
+ invitedBy: v.string(),
4021
+ invitedAt: v.string(),
4022
+ expiresAt: v.string(),
4023
+ acceptedAt: v.nullable(v.string())
4024
+ });
4025
+ //#endregion
4026
+ //#region src/contract/reports.ts
4027
+ /** Why someone reports a document shared with them. */
4028
+ const documentReportReasonSchema = v.picklist([
4029
+ "spam-phishing",
4030
+ "illegal",
4031
+ "copyright",
4032
+ "harassment",
4033
+ "other"
4034
+ ]);
4035
+ v.object({
4036
+ secret: resolveDocumentShareSchema.entries.secret,
4037
+ guestId: resolveDocumentShareSchema.entries.guestId,
4038
+ reason: documentReportReasonSchema,
4039
+ description: v.pipe(v.string(), v.trim(), v.minLength(1), v.maxLength(2e3)),
4040
+ /** Where an administrator may answer; optional, and never shown to the document's people. */
4041
+ replyEmail: v.optional(v.pipe(v.string(), v.trim(), v.toLowerCase(), v.email(), v.maxLength(254)))
4042
+ });
4043
+ v.object({ received: v.literal(true) });
4044
+ //#endregion
4045
+ //#region src/email/templates/TwoStepChanged.vue
4046
+ /**
4047
+ * How the account proves it's its owner's changed: an authenticator app, a passkey, or a way to
4048
+ * sign in an administrator removed.
4049
+ */
4050
+ const _sfc_main$2 = /*@__PURE__*/ defineComponent({
4051
+ __name: "TwoStepChanged",
4052
+ props: { payload: {
4053
+ type: null,
4054
+ required: true
4055
+ } },
4056
+ setup(__props, { expose: __expose }) {
4057
+ __expose();
4058
+ const localization = useEmailLocalization();
4059
+ const { t } = localization;
4060
+ function methodName(provider) {
4061
+ if (provider === "credential") return t.signInMethodPassword;
4062
+ return isKnownSocialProvider(provider) ? CLOUD_SOCIAL_PROVIDER_NAMES[provider] : provider;
4063
+ }
4064
+ const method = __props.payload.method ? methodName(__props.payload.method) : "";
4065
+ const changes = {
4066
+ "authenticator-on": {
4067
+ heading: t.authenticatorOnHeading,
4068
+ message: t.authenticatorOn
4069
+ },
4070
+ "authenticator-off": {
4071
+ heading: t.authenticatorOffHeading,
4072
+ message: t.authenticatorOff
4073
+ },
4074
+ "passkey-added": {
4075
+ heading: t.passkeyAddedHeading,
4076
+ message: t.passkeyAdded
4077
+ },
4078
+ "passkey-removed": {
4079
+ heading: t.passkeyRemovedHeading,
4080
+ message: t.passkeyRemoved
4081
+ },
4082
+ "reset-by-administrator": {
4083
+ heading: t.twoStepResetHeading,
4084
+ message: t.twoStepReset
4085
+ },
4086
+ "sign-in-method-removed": {
4087
+ heading: t.signInMethodRemovedHeading,
4088
+ message: t.signInMethodRemoved({ method })
4089
+ }
4090
+ };
4091
+ const __returned__ = {
4092
+ localization,
4093
+ t,
4094
+ methodName,
4095
+ method,
4096
+ changes,
4097
+ change: changes[__props.payload.change],
4098
+ BrandEmail: BrandEmail_default,
4099
+ EmailText: EmailText_default,
4100
+ get greeting() {
4101
+ return greeting;
4102
+ }
4103
+ };
4104
+ Object.defineProperty(__returned__, "__isScriptSetup", {
4105
+ enumerable: false,
4106
+ value: true
4107
+ });
4108
+ return __returned__;
4109
+ }
4110
+ });
4111
+ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
4112
+ return openBlock(), createBlock($setup["BrandEmail"], {
4113
+ preview: $setup.change.message,
4114
+ heading: $setup.change.heading,
4115
+ action: {
4116
+ label: $setup.t.reviewSecurity,
4117
+ url: $props.payload.actionURL
4118
+ }
4119
+ }, {
4120
+ default: withCtx(() => [
4121
+ createVNode($setup["EmailText"], null, {
4122
+ default: withCtx(() => [createTextVNode(toDisplayString($setup.greeting($setup.localization, $props.payload.name)), 1)]),
4123
+ _: 1
4124
+ }),
4125
+ createVNode($setup["EmailText"], null, {
4126
+ default: withCtx(() => [createTextVNode(toDisplayString($setup.change.message), 1)]),
4127
+ _: 1
4128
+ }),
4129
+ createVNode($setup["EmailText"], null, {
4130
+ default: withCtx(() => [createTextVNode(toDisplayString($setup.t.twoStepNotYou), 1)]),
4131
+ _: 1
4132
+ })
4133
+ ]),
4134
+ _: 1
4135
+ }, 8, [
4136
+ "preview",
4137
+ "heading",
4138
+ "action"
4139
+ ]);
4140
+ }
4141
+ var TwoStepChanged_default = /*#__PURE__*/ export_helper_default(_sfc_main$2, [["render", _sfc_render$2], ["__file", "/home/runner/work/open-pencil/open-pencil/packages/cloud/src/email/templates/TwoStepChanged.vue"]]);
4142
+ //#endregion
4143
+ //#region src/email/templates/WaitlistConfirmation.vue
4144
+ /** Asks a waitlist sign-up to confirm its address; its links carry the sign-up's token only. */
4145
+ const _sfc_main$1 = /*@__PURE__*/ defineComponent({
4146
+ __name: "WaitlistConfirmation",
4147
+ props: {
4148
+ confirmURL: {
4149
+ type: String,
4150
+ required: true
4151
+ },
4152
+ leaveURL: {
4153
+ type: String,
4154
+ required: true
4155
+ }
4156
+ },
4157
+ setup(__props, { expose: __expose }) {
4158
+ __expose();
4159
+ const { t } = useEmailLocalization();
4160
+ const [beforeLink = "", afterLink = ""] = t.waitlistNote.split("{link}");
4161
+ const __returned__ = {
4162
+ t,
4163
+ beforeLink,
4164
+ afterLink,
4165
+ get Link() {
4166
+ return Link;
4167
+ },
4168
+ get styles() {
4169
+ return styles;
4170
+ },
4171
+ BrandEmail: BrandEmail_default,
4172
+ EmailText: EmailText_default
4173
+ };
4174
+ Object.defineProperty(__returned__, "__isScriptSetup", {
4175
+ enumerable: false,
4176
+ value: true
4177
+ });
4178
+ return __returned__;
4179
+ }
4180
+ });
4181
+ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
4182
+ return openBlock(), createBlock($setup["BrandEmail"], {
4183
+ preview: $setup.t.waitlistPreview,
4184
+ heading: $setup.t.waitlistHeading,
4185
+ action: {
4186
+ label: $setup.t.waitlistAction,
4187
+ url: $props.confirmURL
4188
+ }
4189
+ }, {
4190
+ note: withCtx(() => [
4191
+ createTextVNode(toDisplayString($setup.beforeLink), 1),
4192
+ createVNode($setup["Link"], {
4193
+ href: $props.leaveURL,
4194
+ style: normalizeStyle($setup.styles.link)
4195
+ }, {
4196
+ default: withCtx(() => [createTextVNode(toDisplayString($setup.t.waitlistLeave), 1)]),
4197
+ _: 1
4198
+ }, 8, ["href", "style"]),
4199
+ createTextVNode(toDisplayString($setup.afterLink), 1)
4200
+ ]),
4201
+ default: withCtx(() => [createVNode($setup["EmailText"], null, {
4202
+ default: withCtx(() => [createTextVNode(toDisplayString($setup.t.waitlist), 1)]),
4203
+ _: 1
4204
+ })]),
4205
+ _: 1
4206
+ }, 8, [
4207
+ "preview",
4208
+ "heading",
4209
+ "action"
4210
+ ]);
4211
+ }
4212
+ var WaitlistConfirmation_default = /*#__PURE__*/ export_helper_default(_sfc_main$1, [["render", _sfc_render$1], ["__file", "/home/runner/work/open-pencil/open-pencil/packages/cloud/src/email/templates/WaitlistConfirmation.vue"]]);
4213
+ //#endregion
4214
+ //#region src/email/templates/WorkspaceInvitation.vue
4215
+ const _sfc_main = /*@__PURE__*/ defineComponent({
4216
+ __name: "WorkspaceInvitation",
4217
+ props: { payload: {
4218
+ type: null,
4219
+ required: true
4220
+ } },
4221
+ setup(__props, { expose: __expose }) {
4222
+ __expose();
4223
+ const { t, dateTime } = useEmailLocalization();
4224
+ const names = {
4225
+ inviter: __props.payload.inviterName ?? t.someone,
4226
+ workspace: __props.payload.workspaceName
4227
+ };
4228
+ const __returned__ = {
4229
+ t,
4230
+ dateTime,
4231
+ names,
4232
+ message: {
4233
+ admin: t.workspaceInvitationAdmin,
4234
+ editor: t.workspaceInvitationEditor,
4235
+ viewer: t.workspaceInvitationViewer
4236
+ }[__props.payload.role](names),
4237
+ BrandEmail: BrandEmail_default,
4238
+ EmailText: EmailText_default
4239
+ };
4240
+ Object.defineProperty(__returned__, "__isScriptSetup", {
4241
+ enumerable: false,
4242
+ value: true
4243
+ });
4244
+ return __returned__;
4245
+ }
4246
+ });
4247
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
4248
+ return openBlock(), createBlock($setup["BrandEmail"], {
4249
+ preview: $setup.t.workspaceInvitationSubject($setup.names),
4250
+ heading: $setup.t.workspaceInvitationHeading($setup.names),
4251
+ action: {
4252
+ label: $setup.t.workspaceInvitationAction,
4253
+ url: $props.payload.acceptanceURL
4254
+ }
4255
+ }, {
4256
+ note: withCtx(() => [createTextVNode(toDisplayString($setup.t.invitationExpires({ date: $setup.dateTime($props.payload.expiresAt) })), 1)]),
4257
+ default: withCtx(() => [createVNode($setup["EmailText"], null, {
4258
+ default: withCtx(() => [createTextVNode(toDisplayString($setup.message), 1)]),
4259
+ _: 1
4260
+ }), createVNode($setup["EmailText"], null, {
4261
+ default: withCtx(() => [createTextVNode(toDisplayString($setup.t.workspaceInvitationHome), 1)]),
4262
+ _: 1
4263
+ })]),
4264
+ _: 1
4265
+ }, 8, [
4266
+ "preview",
4267
+ "heading",
4268
+ "action"
4269
+ ]);
4270
+ }
4271
+ var WorkspaceInvitation_default = /*#__PURE__*/ export_helper_default(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/open-pencil/open-pencil/packages/cloud/src/email/templates/WorkspaceInvitation.vue"]]);
4272
+ //#endregion
4273
+ //#region src/email/render.ts
4274
+ function documentInvitationSubject(payload, t) {
4275
+ const names = {
4276
+ inviter: payload.inviterName ?? t.someone,
4277
+ document: payload.documentName
4278
+ };
4279
+ return payload.permission === "edit" ? t.documentInvitationEditSubject(names) : t.documentInvitationViewSubject(names);
4280
+ }
4281
+ const EMAILS = {
4282
+ "document-invitation": {
4283
+ component: DocumentInvitation_default,
4284
+ subject: documentInvitationSubject
4285
+ },
4286
+ "workspace-invitation": {
4287
+ component: WorkspaceInvitation_default,
4288
+ subject: (payload, t) => t.workspaceInvitationSubject({
4289
+ inviter: payload.inviterName ?? t.someone,
4290
+ workspace: payload.workspaceName
4291
+ })
4292
+ },
4293
+ "enrollment-requested": {
4294
+ component: EnrollmentUpdate_default,
4295
+ props: { kind: "requested" },
4296
+ subject: (_payload, t) => t.enrollmentRequestedSubject
4297
+ },
4298
+ "enrollment-approved": {
4299
+ component: EnrollmentUpdate_default,
4300
+ props: { kind: "approved" },
4301
+ subject: (_payload, t) => t.enrollmentApprovedSubject
4302
+ },
4303
+ "enrollment-rejected": {
4304
+ component: EnrollmentUpdate_default,
4305
+ props: { kind: "rejected" },
4306
+ subject: (_payload, t) => t.enrollmentRejectedSubject
4307
+ },
4308
+ "enrollment-revoked": {
4309
+ component: EnrollmentUpdate_default,
4310
+ props: { kind: "revoked" },
4311
+ subject: (_payload, t) => t.enrollmentRevokedSubject
4312
+ },
4313
+ "enrollment-invited": {
4314
+ component: EnrollmentInvitation_default,
4315
+ subject: (payload, t) => payload.waitlist ? t.invitationWaitlistSubject : t.invitationSubject
4316
+ },
4317
+ "admin-enrollment-notification": {
4318
+ component: EnrollmentNotification_default,
4319
+ subject: (_payload, t) => t.enrollmentNotificationSubject
4320
+ },
4321
+ "email-verification": {
4322
+ component: EmailVerification_default,
4323
+ subject: (payload, t) => payload.purpose === "change" ? t.verifyChangeSubject : t.verifyAccountSubject
4324
+ },
4325
+ "password-reset": {
4326
+ component: PasswordReset_default,
4327
+ subject: (_payload, t) => t.passwordResetSubject
4328
+ },
4329
+ "password-changed": {
4330
+ component: PasswordChanged_default,
4331
+ subject: (_payload, t) => t.passwordChangedSubject
4332
+ },
4333
+ "email-change-requested": {
4334
+ component: EmailChangeRequested_default,
4335
+ subject: (_payload, t) => t.emailChangeSubject
4336
+ },
4337
+ "new-sign-in": {
4338
+ component: NewSignIn_default,
4339
+ subject: (_payload, t) => t.newSignInSubject
4340
+ },
4341
+ "two-step-changed": {
4342
+ component: TwoStepChanged_default,
4343
+ subject: (_payload, t) => t.twoStepSubject
4344
+ },
4345
+ "document-report": {
4346
+ component: DocumentReport_default,
4347
+ subject: (_payload, t) => t.documentReportSubject
4348
+ },
4349
+ "storage-limit-reached": {
4350
+ component: StorageLimitReached_default,
4351
+ subject: (_payload, t) => t.storageFullSubject
4352
+ },
4353
+ "document-blocked": {
4354
+ component: DocumentBlocked_default,
4355
+ subject: (payload, t) => t.documentBlockedSubject({ document: payload.documentName })
4356
+ },
4357
+ "document-restored": {
4358
+ component: DocumentRestored_default,
4359
+ subject: (payload, t) => t.documentRestoredSubject({ document: payload.documentName })
4360
+ },
4361
+ "document-report-received": {
4362
+ component: DocumentReportReceived_default,
4363
+ subject: (payload, t) => t.reportReceivedSubject({ document: payload.documentName })
4364
+ },
4365
+ "document-report-decided": {
4366
+ component: DocumentReportDecided_default,
4367
+ subject: (payload, t) => t.reportDecidedSubject({ document: payload.documentName })
4368
+ },
4369
+ "comment-notification": {
4370
+ component: CommentNotification_default,
4371
+ subject: (payload, t) => {
4372
+ const words = {
4373
+ author: payload.authorName ?? t.commentSomeone,
4374
+ document: payload.documentName
4375
+ };
4376
+ return payload.reason === "mention" ? t.commentMentionSubject(words) : t.commentReplySubject(words);
4377
+ }
4378
+ }
4379
+ };
4380
+ /** Renders an email component as HTML and as plain text, in its reader's language. */
4381
+ async function renderComponent(email, props, subject, localization) {
4382
+ const root = {
4383
+ email,
4384
+ props,
4385
+ localization
4386
+ };
4387
+ const [html, text] = await Promise.all([render(EmailRoot_default, root), render(EmailRoot_default, root, { plainText: true })]);
4388
+ return {
4389
+ subject,
4390
+ html,
4391
+ text
4392
+ };
4393
+ }
4394
+ function renderKind(kind, payload, localization) {
4395
+ const { component, props, subject } = EMAILS[kind];
4396
+ return renderComponent(component, {
4397
+ ...props,
4398
+ payload
4399
+ }, subject(payload, localization.t), localization);
4400
+ }
4401
+ async function renderTransactionalEmail(content, locale) {
4402
+ return renderKind(content.kind, content.payload, emailLocalization(locale));
4403
+ }
4404
+ /** The waitlist's confirmation email, which the feedback service sends rather than Cloud. */
4405
+ async function renderWaitlistConfirmation(links, locale) {
4406
+ const localization = emailLocalization(locale);
4407
+ return renderComponent(WaitlistConfirmation_default, links, localization.t.waitlistSubject, localization);
4408
+ }
3745
4409
  //#endregion
3746
- //#region src/contract/reports.ts
3747
- /** Why someone reports a document shared with them. */
3748
- const documentReportReasonSchema = v.picklist([
3749
- "spam-phishing",
3750
- "illegal",
3751
- "copyright",
3752
- "harassment",
3753
- "other"
3754
- ]);
3755
- v.object({
3756
- secret: resolveDocumentShareSchema.entries.secret,
3757
- guestId: resolveDocumentShareSchema.entries.guestId,
3758
- reason: documentReportReasonSchema,
3759
- description: v.pipe(v.string(), v.trim(), v.minLength(1), v.maxLength(2e3)),
3760
- /** Where an administrator may answer; optional, and never shown to the document's people. */
3761
- replyEmail: v.optional(v.pipe(v.string(), v.trim(), v.toLowerCase(), v.email(), v.maxLength(254)))
3762
- });
3763
- v.object({ received: v.literal(true) });
4410
+ //#region src/email/samples.ts
4411
+ /** Where every sample's button goes. */
4412
+ const EMAIL_SAMPLE_URL = "https://cloud.example.com/next";
4413
+ /**
4414
+ * One email of every kind, with every optional part filled, as previews and tests show them. Its
4415
+ * names and addresses are made up.
4416
+ */
4417
+ const EMAIL_SAMPLES = [
4418
+ {
4419
+ kind: "document-invitation",
4420
+ payload: {
4421
+ inviterName: "Ada",
4422
+ documentName: "Homepage",
4423
+ permission: "edit",
4424
+ expiresAt: "2026-11-20T10:00:00.000Z",
4425
+ acceptanceURL: EMAIL_SAMPLE_URL
4426
+ }
4427
+ },
4428
+ {
4429
+ kind: "workspace-invitation",
4430
+ payload: {
4431
+ inviterName: null,
4432
+ workspaceName: "Studio",
4433
+ role: "viewer",
4434
+ expiresAt: "2026-11-20T10:00:00.000Z",
4435
+ acceptanceURL: EMAIL_SAMPLE_URL
4436
+ }
4437
+ },
4438
+ ...[
4439
+ "enrollment-requested",
4440
+ "enrollment-approved",
4441
+ "enrollment-rejected",
4442
+ "enrollment-revoked",
4443
+ "enrollment-invited"
4444
+ ].map((kind) => ({
4445
+ kind,
4446
+ payload: {
4447
+ name: "Ada",
4448
+ actionURL: EMAIL_SAMPLE_URL
4449
+ }
4450
+ })),
4451
+ {
4452
+ kind: "enrollment-invited",
4453
+ payload: {
4454
+ name: null,
4455
+ actionURL: EMAIL_SAMPLE_URL,
4456
+ waitlist: true
4457
+ }
4458
+ },
4459
+ {
4460
+ kind: "admin-enrollment-notification",
4461
+ payload: {
4462
+ requesterEmail: "ada@example.com",
4463
+ requesterName: "Ada",
4464
+ reason: "Design",
4465
+ actionURL: EMAIL_SAMPLE_URL
4466
+ }
4467
+ },
4468
+ {
4469
+ kind: "email-verification",
4470
+ payload: {
4471
+ name: "Ada",
4472
+ actionURL: EMAIL_SAMPLE_URL,
4473
+ purpose: "change"
4474
+ }
4475
+ },
4476
+ {
4477
+ kind: "password-reset",
4478
+ payload: {
4479
+ name: "Ada",
4480
+ actionURL: EMAIL_SAMPLE_URL
4481
+ }
4482
+ },
4483
+ {
4484
+ kind: "password-changed",
4485
+ payload: {
4486
+ name: "Ada",
4487
+ actionURL: EMAIL_SAMPLE_URL
4488
+ }
4489
+ },
4490
+ {
4491
+ kind: "email-change-requested",
4492
+ payload: {
4493
+ name: "Ada",
4494
+ newEmail: "ada@new.example.com",
4495
+ actionURL: EMAIL_SAMPLE_URL
4496
+ }
4497
+ },
4498
+ {
4499
+ kind: "new-sign-in",
4500
+ payload: {
4501
+ name: "Ada",
4502
+ signedInAt: "2026-11-13T10:00:00.000Z",
4503
+ ipAddress: "203.0.113.9",
4504
+ browser: "Firefox",
4505
+ system: "Linux",
4506
+ desktop: false,
4507
+ actionURL: EMAIL_SAMPLE_URL
4508
+ }
4509
+ },
4510
+ {
4511
+ kind: "two-step-changed",
4512
+ payload: {
4513
+ name: "Ada",
4514
+ change: "passkey-added",
4515
+ actionURL: EMAIL_SAMPLE_URL
4516
+ }
4517
+ },
4518
+ {
4519
+ kind: "two-step-changed",
4520
+ payload: {
4521
+ name: "Ada",
4522
+ change: "sign-in-method-removed",
4523
+ method: "google",
4524
+ actionURL: EMAIL_SAMPLE_URL
4525
+ }
4526
+ },
4527
+ {
4528
+ kind: "document-report",
4529
+ payload: {
4530
+ documentName: "Homepage",
4531
+ reason: "copyright",
4532
+ description: "Copied",
4533
+ actionURL: EMAIL_SAMPLE_URL
4534
+ }
4535
+ },
4536
+ {
4537
+ kind: "storage-limit-reached",
4538
+ payload: {
4539
+ name: "Ada",
4540
+ usedBytes: 310 * 1024 ** 2,
4541
+ limitBytes: 300 * 1024 ** 2,
4542
+ upgradable: true,
4543
+ actionURL: EMAIL_SAMPLE_URL
4544
+ }
4545
+ },
4546
+ {
4547
+ kind: "document-blocked",
4548
+ payload: {
4549
+ name: "Ada",
4550
+ documentName: "Homepage",
4551
+ reason: "Phishing page imitating a bank",
4552
+ contactEmail: "abuse@example.com",
4553
+ actionURL: EMAIL_SAMPLE_URL
4554
+ }
4555
+ },
4556
+ {
4557
+ kind: "document-restored",
4558
+ payload: {
4559
+ name: "Ada",
4560
+ documentName: "Homepage",
4561
+ actionURL: EMAIL_SAMPLE_URL
4562
+ }
4563
+ },
4564
+ {
4565
+ kind: "document-report-received",
4566
+ payload: { documentName: "Homepage" }
4567
+ },
4568
+ {
4569
+ kind: "document-report-decided",
4570
+ payload: {
4571
+ documentName: "Homepage",
4572
+ outcome: "blocked",
4573
+ contactEmail: "abuse@example.com"
4574
+ }
4575
+ },
4576
+ {
4577
+ kind: "comment-notification",
4578
+ payload: {
4579
+ name: "Ada",
4580
+ authorName: "Grace",
4581
+ documentName: "Homepage",
4582
+ reason: "mention",
4583
+ excerpt: "@Ada can we tighten the heading before launch?",
4584
+ actionURL: EMAIL_SAMPLE_URL,
4585
+ settingsURL: EMAIL_SAMPLE_URL
4586
+ }
4587
+ }
4588
+ ];
3764
4589
  //#endregion
3765
4590
  //#region src/email/schema.ts
3766
4591
  const documentInvitationEmailPayloadSchema = v.object({
@@ -3782,7 +4607,9 @@ const workspaceInvitationEmailPayloadSchema = v.object({
3782
4607
  const enrollmentEmailPayloadSchema = v.object({
3783
4608
  /** Null when the request named no one, so the email greets no one by name. */
3784
4609
  name: v.nullable(v.string()),
3785
- actionURL: v.string()
4610
+ actionURL: v.string(),
4611
+ /** An invitation letter to someone from openpencil.dev's waitlist, who asked nowhere else. */
4612
+ waitlist: v.optional(v.literal(true))
3786
4613
  });
3787
4614
  const adminEnrollmentNotificationPayloadSchema = v.object({
3788
4615
  requesterEmail: v.string(),
@@ -3835,6 +4662,21 @@ const documentReportDecidedPayloadSchema = v.object({
3835
4662
  /** Where to write to disagree: the deployment's abuse address, or null without one. */
3836
4663
  contactEmail: v.nullable(v.pipe(v.string(), v.email()))
3837
4664
  });
4665
+ /** To someone a comment names, or who takes part in its thread: what it says, and where. */
4666
+ const commentNotificationPayloadSchema = v.object({
4667
+ /** The recipient's name, or null when the account has none. */
4668
+ name: v.nullable(v.string()),
4669
+ /** Who wrote the comment, or null when the account has no name. */
4670
+ authorName: v.nullable(v.string()),
4671
+ documentName: v.string(),
4672
+ /** The comment names the recipient, or answers a thread they take part in. */
4673
+ reason: v.picklist(["mention", "reply"]),
4674
+ /** The start of what the comment says. */
4675
+ excerpt: v.string(),
4676
+ actionURL: v.string(),
4677
+ /** Where the recipient chooses which comments they hear about. */
4678
+ settingsURL: v.string()
4679
+ });
3838
4680
  const authenticationEmailPayloadSchema = v.object({
3839
4681
  name: v.string(),
3840
4682
  actionURL: v.optional(v.string()),
@@ -3861,11 +4703,14 @@ const twoStepChangeSchema = v.picklist([
3861
4703
  "authenticator-off",
3862
4704
  "passkey-added",
3863
4705
  "passkey-removed",
3864
- "reset-by-administrator"
4706
+ "reset-by-administrator",
4707
+ "sign-in-method-removed"
3865
4708
  ]);
3866
4709
  const twoStepChangedPayloadSchema = v.object({
3867
4710
  name: v.string(),
3868
4711
  change: twoStepChangeSchema,
4712
+ /** For a removed sign-in method, which: `credential` for a password, or a provider. */
4713
+ method: v.optional(v.string()),
3869
4714
  actionURL: v.string()
3870
4715
  });
3871
4716
  function content(kind, payload) {
@@ -3882,6 +4727,7 @@ const transactionalEmailContentSchema = v.variant("kind", [
3882
4727
  content("enrollment-approved", enrollmentEmailPayloadSchema),
3883
4728
  content("enrollment-rejected", enrollmentEmailPayloadSchema),
3884
4729
  content("enrollment-revoked", enrollmentEmailPayloadSchema),
4730
+ content("enrollment-invited", enrollmentEmailPayloadSchema),
3885
4731
  content("email-verification", authenticationEmailPayloadSchema),
3886
4732
  content("password-reset", authenticationEmailPayloadSchema),
3887
4733
  content("password-changed", authenticationEmailPayloadSchema),
@@ -3893,7 +4739,8 @@ const transactionalEmailContentSchema = v.variant("kind", [
3893
4739
  content("document-blocked", documentBlockedPayloadSchema),
3894
4740
  content("document-restored", documentRestoredPayloadSchema),
3895
4741
  content("document-report-received", documentReportReceivedPayloadSchema),
3896
- content("document-report-decided", documentReportDecidedPayloadSchema)
4742
+ content("document-report-decided", documentReportDecidedPayloadSchema),
4743
+ content("comment-notification", commentNotificationPayloadSchema)
3897
4744
  ]);
3898
4745
  //#endregion
3899
4746
  export { EMAIL_LOCALES, EMAIL_SAMPLES, EMAIL_SAMPLE_URL, acceptedLocale, emailLocale, emailLocalization, emailMessageDefaults, isEmailLocale, renderTransactionalEmail, renderWaitlistConfirmation, transactionalEmailContentSchema };