* feat(workspace): localize default notebooks and welcome note at first sign-in A new installation always created its five default notebooks, welcome note and note templates in Chinese, whatever the interface language. Members added by the owner got notebooks and templates in the owner's language instead of their own. The seed data is now localized once, at the first sign-in of the workspace's user, using the UI locale the client sends with the login request (Web and Android send it; other clients fall back to Accept-Language, and unsupported languages to English). Migration 0070 marks the default workspace as waiting for this only on an installation nobody has used yet: no users, no notes beyond the welcome note, no edits to it, no extra notebooks, revisions or resources. Existing installations keep their data unchanged. Member workspaces created by the owner are marked when created. The sign-in localizes notebook names, templates, the welcome note and its search document in one transaction that also clears the mark, and replaces only values that still equal a seeded translation. A failed attempt leaves the mark for the next sign-in to retry, and a second sign-in changes nothing. The demo clears the mark so its bilingual seed stays as it is. Refs #483 * fix(workspace): guard seed inserts and title-only welcome edits during localization - Default template and AI prompt inserts in the first-sign-in batch now require the pending marker, so a delayed concurrent sign-in cannot recreate seeds removed after the faster sign-in finished. - The welcome note is treated as untouched only while it keeps the seeded title, the system actor, the seed content hash, and revision 0, so a title-only edit is no longer overwritten. - Add regression tests for both cases. Refs #483
43 lines
1.4 KiB
JSON
43 lines
1.4 KiB
JSON
{
|
|
"name": "@edgeever/shared",
|
|
"version": "0.1.3",
|
|
"private": true,
|
|
"type": "module",
|
|
"exports": {
|
|
".": "./src/index.ts",
|
|
"./diagram-layout": "./src/diagram-layout.ts",
|
|
"./ai-prompt-seeds": "./src/ai-prompt-seeds.ts",
|
|
"./deployment-metadata": "./src/deployment-metadata.ts",
|
|
"./editor-link": "./src/editor-link.ts",
|
|
"./image-display": "./src/image-display.ts",
|
|
"./image-gallery-editing": "./src/image-gallery-editing.ts",
|
|
"./native-image-gallery": "./src/native-image-gallery.ts",
|
|
"./i18n": "./src/i18n/index.ts",
|
|
"./i18n/locales": "./src/i18n/locales.ts",
|
|
"./memo-template-seeds": "./src/memo-template-seeds.ts",
|
|
"./default-workspace-seeds": "./src/default-workspace-seeds.ts",
|
|
"./mathematics": "./src/mathematics.ts",
|
|
"./mobile-editor": "./src/mobile-editor.ts",
|
|
"./mobile-ui": "./src/mobile-ui.ts",
|
|
"./note-image-card": "./src/note-image-card.ts"
|
|
},
|
|
"types": "./src/index.ts",
|
|
"dependencies": {
|
|
"@dagrejs/dagre": "3.1.1",
|
|
"@tiptap/core": "3.31.4",
|
|
"@tiptap/extension-details": "3.31.4",
|
|
"@tiptap/extension-image": "3.31.4",
|
|
"@tiptap/extension-link": "3.31.4",
|
|
"@tiptap/extension-list": "3.31.4",
|
|
"@tiptap/extension-mathematics": "3.31.4",
|
|
"@tiptap/extension-table": "3.31.4",
|
|
"@tiptap/markdown": "3.31.4",
|
|
"@tiptap/pm": "3.31.4",
|
|
"@tiptap/starter-kit": "3.31.4",
|
|
"js-base64": "3.9.3",
|
|
"katex": "0.18.2",
|
|
"yaml": "2.8.3",
|
|
"zod": "4.6.6"
|
|
}
|
|
}
|