@antelopejs/dms-lang 0.6.0 → 0.7.1-next.119.gabbc680

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 (69) hide show
  1. package/README.md +6 -7
  2. package/frontend-vue/.prettierignore +1 -0
  3. package/frontend-vue/.prettierrc +1 -3
  4. package/frontend-vue/app/build/components/KeyAddModal.vue +8 -4
  5. package/frontend-vue/app/build/components/KeyEditorDrawer.vue +16 -24
  6. package/frontend-vue/app/build/components/KeyRenameModal.vue +3 -0
  7. package/frontend-vue/app/build/components/LanguageAddModal.vue +13 -5
  8. package/frontend-vue/app/build/components/LanguagePicker.vue +8 -5
  9. package/frontend-vue/app/build/components/LocaleTile.vue +2 -1
  10. package/frontend-vue/app/build/components/PlaceholderText.vue +1 -1
  11. package/frontend-vue/app/build/components/WorkspaceCreateModal.vue +5 -0
  12. package/frontend-vue/app/build/components/WorkspaceRenameModal.vue +8 -4
  13. package/frontend-vue/app/build/components/form/FormRows.vue +3 -1
  14. package/frontend-vue/app/build/components/form/WorkspaceDetailsFields.vue +2 -1
  15. package/frontend-vue/app/build/components/matrix/MatrixCell.vue +7 -3
  16. package/frontend-vue/app/build/components/matrix/MatrixColumns.vue +2 -2
  17. package/frontend-vue/app/build/components/matrix/MatrixGroupHeader.vue +1 -0
  18. package/frontend-vue/app/build/components/matrix/MatrixKeyCell.vue +2 -2
  19. package/frontend-vue/app/build/components/matrix/MatrixToolbar.vue +2 -1
  20. package/frontend-vue/app/build/components/queue/QueueActions.vue +1 -0
  21. package/frontend-vue/app/build/components/queue/QueueDone.vue +3 -0
  22. package/frontend-vue/app/build/components/queue/QueueEditor.vue +11 -7
  23. package/frontend-vue/app/build/components/queue/QueueHeader.vue +9 -3
  24. package/frontend-vue/app/build/components/queue/QueueUpNext.vue +1 -1
  25. package/frontend-vue/app/build/composables/useCellEditor.ts +12 -2
  26. package/frontend-vue/app/build/composables/useCellMoves.ts +1 -0
  27. package/frontend-vue/app/build/composables/useCellSaves.ts +1 -0
  28. package/frontend-vue/app/build/composables/useKeyPanel.ts +4 -0
  29. package/frontend-vue/app/build/composables/useKeySaves.ts +3 -0
  30. package/frontend-vue/app/build/composables/useMatrixColumns.ts +78 -0
  31. package/frontend-vue/app/build/composables/useMatrixExport.ts +1 -0
  32. package/frontend-vue/app/build/composables/useMatrixFilters.ts +6 -0
  33. package/frontend-vue/app/build/composables/useMatrixView.ts +4 -0
  34. package/frontend-vue/app/build/composables/useQueueOrphans.ts +2 -0
  35. package/frontend-vue/app/build/composables/useQueueSave.ts +4 -0
  36. package/frontend-vue/app/build/drawer/KeyLanguageField.vue +11 -17
  37. package/frontend-vue/app/build/drawer/fieldFocus.ts +24 -0
  38. package/frontend-vue/app/build/matrix/MatrixLanguageHeader.vue +2 -2
  39. package/frontend-vue/app/components/LanguageNamespaces.vue +10 -4
  40. package/frontend-vue/app/components/NamespaceCoverage.vue +10 -4
  41. package/frontend-vue/app/components/TranslationMatrix.vue +48 -59
  42. package/frontend-vue/app/components/TranslationQueue.vue +15 -8
  43. package/frontend-vue/app/components/WorkspaceDangerZone.vue +6 -2
  44. package/frontend-vue/app/components/WorkspaceGeneral.vue +11 -3
  45. package/frontend-vue/app/components/WorkspaceList.vue +38 -26
  46. package/frontend-vue/app/components/WorkspaceScope.vue +26 -23
  47. package/frontend-vue/app/composables/translation/useFirstRun.ts +1 -0
  48. package/frontend-vue/app/composables/translation/useKeyActions.ts +10 -0
  49. package/frontend-vue/app/composables/translation/useLangLinks.ts +1 -0
  50. package/frontend-vue/app/composables/translation/useLanguageActions.ts +11 -2
  51. package/frontend-vue/app/composables/translation/useLanguageQueue.ts +10 -0
  52. package/frontend-vue/app/composables/translation/useQueueDrafts.ts +4 -0
  53. package/frontend-vue/app/composables/translation/useQueueSession.ts +6 -0
  54. package/frontend-vue/app/composables/translation/useWorkspaceActions.ts +6 -0
  55. package/frontend-vue/app/composables/translation/useWorkspaceContext.ts +1 -0
  56. package/frontend-vue/app/composables/translation/useWorkspaceFill.ts +4 -0
  57. package/frontend-vue/app/composables/translation/useWorkspaceFlat.ts +11 -4
  58. package/frontend-vue/app/composables/translation/useWorkspaceLabel.ts +2 -0
  59. package/frontend-vue/app/composables/translation/useWorkspaceNameCheck.ts +5 -0
  60. package/frontend-vue/app/composables/translation/useWorkspaceRoute.ts +8 -0
  61. package/frontend-vue/app/utils/keySaveErrors.ts +1 -0
  62. package/frontend-vue/app/utils/keySaves.ts +1 -0
  63. package/frontend-vue/app/utils/matrixExport.ts +1 -0
  64. package/frontend-vue/app/utils/translations.ts +3 -3
  65. package/frontend-vue/app/utils/workspaceBackup.ts +1 -0
  66. package/frontend-vue/build/backend-boundary.ts +7 -2
  67. package/frontend-vue/eslint.config.mjs +20 -36
  68. package/frontend-vue/package.json +8 -8
  69. package/package.json +16 -16
package/README.md CHANGED
@@ -48,11 +48,11 @@ Restart the backend, then the frontend, and open **Modules › Translations** (`
48
48
 
49
49
  <!-- antelopejs-docs-compat:start -->
50
50
 
51
- | Package | Supported | Tested with |
52
- | ---------------------------- | ----------------- | ----------- |
53
- | `@antelopejs/interface-api` | `>=0.3.1 <1.0.0` | `0.3.2` |
54
- | `@antelopejs/interface-core` | `>=0.4.0 <1.0.0` | `0.4.0` |
55
- | `@antelopejs/interface-dms` | `>=0.13.0 <1.0.0` | `0.13.2` |
51
+ | Package | Supported | Tested with |
52
+ | ---------------------------- | ------------------ | ----------- |
53
+ | `@antelopejs/interface-api` | `>=0.3.3 <0.4.0` | `0.3.3` |
54
+ | `@antelopejs/interface-core` | `>=0.5.1 <0.6.0` | `0.5.1` |
55
+ | `@antelopejs/interface-dms` | `>=0.14.0 <0.15.0` | `0.14.0` |
56
56
 
57
57
  <!-- antelopejs-docs-compat:end -->
58
58
 
@@ -101,8 +101,7 @@ This module installs into [AntelopeJS DMS](https://github.com/AntelopeJS/dms), t
101
101
 
102
102
  | Module | What it adds |
103
103
  | ---------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
104
- | [`dms-builder`](https://github.com/AntelopeJS/dms-builder) | Edit pages, tables and data sources by clicking, as TypeScript that compiles |
105
- | [`dms-ai`](https://github.com/AntelopeJS/dms-ai) | An assistant chat in the dashboard, on your own Claude Code or Codex |
104
+ | [`dms-assistant`](https://github.com/AntelopeJS/dms-assistant) | An assistant chat in the dashboard and its onboarding, on your own Claude Code or Codex |
106
105
  | [`dms-database`](https://github.com/AntelopeJS/dms-database) | Schemas, relation diagrams, a data browser and a query console |
107
106
  | [`dms-api`](https://github.com/AntelopeJS/dms-api) | API health, request logs, per-route statistics and a request tester |
108
107
  | [`dms-automation`](https://github.com/AntelopeJS/dms-automation) | Node-graph automations on schedules, webhooks and DMS events, with a trace for every run |
@@ -0,0 +1 @@
1
+ i18n/locales/*.json
@@ -3,9 +3,7 @@
3
3
  "singleQuote": true,
4
4
  "trailingComma": "all",
5
5
  "endOfLine": "auto",
6
- "plugins": [
7
- "prettier-plugin-tailwindcss"
8
- ],
6
+ "plugins": ["prettier-plugin-tailwindcss"],
9
7
  "useTabs": false,
10
8
  "htmlWhitespaceSensitivity": "ignore",
11
9
  "singleAttributePerLine": true
@@ -1,4 +1,9 @@
1
1
  <script setup lang="ts">
2
+ import { useI18nWorkspaces } from '../../composables/translation/useI18nWorkspaces'
3
+ import { useLocaleNames } from '../../composables/translation/useLocaleNames'
4
+ import { useMutationToast } from '../../composables/translation/useMutationToast'
5
+ import { useWorkspaceFlat } from '../../composables/translation/useWorkspaceFlat'
6
+ import { useWorkspaceLabel } from '../../composables/translation/useWorkspaceLabel'
2
7
  import type { FlatTranslationRow, KeyRowResponse } from '../../types/lang'
3
8
  import {
4
9
  checkMessage,
@@ -196,8 +201,7 @@ function resetForNext() {
196
201
  }
197
202
 
198
203
  function write(key: string): Promise<KeyRowResponse> {
199
- if (isOverride.value)
200
- return updateKey(props.workspace, key, written.value)
204
+ if (isOverride.value) return updateKey(props.workspace, key, written.value)
201
205
  return createKey(props.workspace, key, written.value)
202
206
  }
203
207
 
@@ -276,7 +280,7 @@ async function submit() {
276
280
  />
277
281
  </template>
278
282
  <template #default="{ id }">
279
- <DmsTextarea
283
+ <DmsInputTextarea
280
284
  :id="id"
281
285
  :model-value="valueOf(code)"
282
286
  :rows="code === props.baseLocale ? 2 : 1"
@@ -317,7 +321,7 @@ async function submit() {
317
321
  </template>
318
322
  <template #footer>
319
323
  <div class="flex w-full items-center gap-2">
320
- <DmsCheckbox
324
+ <DmsInputCheckbox
321
325
  v-model="addAnother"
322
326
  :label="$t('dms_lang.key_add.add_another')"
323
327
  />
@@ -1,4 +1,8 @@
1
1
  <script setup lang="ts">
2
+ import { useKeyActions } from '../../composables/translation/useKeyActions'
3
+ import { useLocaleNames } from '../../composables/translation/useLocaleNames'
4
+ import { useMutationToast } from '../../composables/translation/useMutationToast'
5
+ import { useWorkspaceFlat } from '../../composables/translation/useWorkspaceFlat'
2
6
  import type { FlatTranslationRow, KeyPanelHeader } from '../../types/lang'
3
7
  import {
4
8
  storedText,
@@ -25,6 +29,7 @@ import {
25
29
  type MessageIssue,
26
30
  } from '../../utils/translations'
27
31
  import ShortcutKbds from './ShortcutKbds.vue'
32
+ import { useFieldFocus } from '../drawer/fieldFocus'
28
33
  import type { FieldStatus } from '../drawer/fieldStatus'
29
34
  import KeyLanguageField from '../drawer/KeyLanguageField.vue'
30
35
  import { KEY_PANEL_KEYS } from '../../utils/shortcuts'
@@ -104,6 +109,7 @@ const {
104
109
  } = useBaseClearQuestion()
105
110
  const states = useSaveStates(fieldStates)
106
111
  const body = useTemplateRef<HTMLElement>('body')
112
+ const { fieldInput, focusField } = useFieldFocus(body)
107
113
  const fieldIds = useId()
108
114
  let queue: Promise<unknown> = Promise.resolve()
109
115
 
@@ -265,24 +271,6 @@ function fieldIdOf(code: string): string {
265
271
  return `${fieldIds}-${code}`
266
272
  }
267
273
 
268
- function fieldInput(code: string): HTMLTextAreaElement | null {
269
- return (
270
- body.value?.querySelector<HTMLTextAreaElement>(
271
- `[data-locale="${code}"] textarea`,
272
- ) ?? null
273
- )
274
- }
275
-
276
- async function focusField(code?: string, caret?: number) {
277
- if (!code) return
278
- await nextTick()
279
- const input = fieldInput(code)
280
- if (!input) return
281
- input.scrollIntoView({ block: 'nearest' })
282
- input.focus()
283
- if (caret !== undefined) input.setSelectionRange(caret, caret)
284
- }
285
-
286
274
  function insertAtCaret(code: string, token: string) {
287
275
  const input = fieldInput(code)
288
276
  const current = draftOf(code)
@@ -304,16 +292,16 @@ function knownInheritedOf(path: string) {
304
292
  }
305
293
 
306
294
  function settle(codes: string[], values: Record<string, string>) {
307
- const rest = { ...drafts.value }
295
+ const rest = new Map(Object.entries(drafts.value))
308
296
  for (const code of codes) {
309
- const isDone = rest[code] === values[code]
310
- if (isDone) delete rest[code]
297
+ const isDone = rest.get(code) === values[code]
298
+ if (isDone) rest.delete(code)
311
299
  if (isDone) editStarts.end(code)
312
300
  else editStarts.set(code, storedText(values[code]))
313
301
  setFieldState(code, 'idle')
314
302
  states.flashSaved(code)
315
303
  }
316
- drafts.value = rest
304
+ drafts.value = Object.fromEntries(rest)
317
305
  }
318
306
 
319
307
  function collect(codes: string[]) {
@@ -485,7 +473,11 @@ function stayOnKey() {
485
473
 
486
474
  watch(
487
475
  () =>
488
- [props.keys[props.startIndex], props.initialDrafts, props.workspace] as const,
476
+ [
477
+ props.keys[props.startIndex],
478
+ props.initialDrafts,
479
+ props.workspace,
480
+ ] as const,
489
481
  async ([target, , next], _previous, onCleanup) => {
490
482
  if (target === undefined) return
491
483
  if (target === key.value && next === workspace.value) {
@@ -611,7 +603,7 @@ onMounted(() => show(key.value))
611
603
  </span>
612
604
  <template v-else>{{ $t('dms_lang.drawer.autosave') }}</template>
613
605
  </span>
614
- <span class="hidden items-center gap-1 @sm:inline-flex">
606
+ <span class="@sm:inline-flex hidden items-center gap-1">
615
607
  <ShortcutKbds :keys="KEY_PANEL_KEYS.saveNext" />
616
608
  {{ $t('dms_lang.drawer.save_next') }}
617
609
  </span>
@@ -1,4 +1,7 @@
1
1
  <script setup lang="ts">
2
+ import { useI18nWorkspaces } from '../../composables/translation/useI18nWorkspaces'
3
+ import { useMutationToast } from '../../composables/translation/useMutationToast'
4
+ import { useWorkspaceFlat } from '../../composables/translation/useWorkspaceFlat'
2
5
  import {
3
6
  isValidKeyPath,
4
7
  keyPathConflict,
@@ -1,4 +1,12 @@
1
1
  <script setup lang="ts">
2
+ import { useI18nWorkspaces } from '../../composables/translation/useI18nWorkspaces'
3
+ import { useLocaleNames } from '../../composables/translation/useLocaleNames'
4
+ import {
5
+ serverErrorCode,
6
+ useMutationToast,
7
+ } from '../../composables/translation/useMutationToast'
8
+ import { useWorkspaceFlat } from '../../composables/translation/useWorkspaceFlat'
9
+ import { useWorkspaceLabel } from '../../composables/translation/useWorkspaceLabel'
2
10
  import LanguagePicker from './LanguagePicker.vue'
3
11
  import { canonicalLocale, hasSubtags, languageOf } from '../../utils/languages'
4
12
 
@@ -133,8 +141,8 @@ function close(added: boolean) {
133
141
  {{
134
142
  isInvalidCode
135
143
  ? $t('dms_lang.language_add.invalid_code', {
136
- code: search.trim(),
137
- })
144
+ code: search.trim(),
145
+ })
138
146
  : $t('dms_lang.language_add.no_match')
139
147
  }}
140
148
  </template>
@@ -199,9 +207,9 @@ function close(added: boolean) {
199
207
  :label="
200
208
  selectedOption
201
209
  ? $t('dms_lang.language_add.submit_named', {
202
- name: selectedOption.name,
203
- code: selectedOption.code,
204
- })
210
+ name: selectedOption.name,
211
+ code: selectedOption.code,
212
+ })
205
213
  : $t('dms_lang.language_add.submit')
206
214
  "
207
215
  @click="submit"
@@ -1,4 +1,5 @@
1
1
  <script setup lang="ts">
2
+ import { useLocaleNames } from '../../composables/translation/useLocaleNames'
2
3
  import type { SelectMenuItem } from '@nuxt/ui'
3
4
  import { typedLocaleCode, type LanguageOption } from '../../utils/languages'
4
5
  import LocaleTile from './LocaleTile.vue'
@@ -130,11 +131,11 @@ function step(event: KeyboardEvent) {
130
131
  role="listbox"
131
132
  class="max-h-80 space-y-0.5 overflow-y-auto"
132
133
  >
133
- <DmsEyebrow
134
+ <DmsEyebrowLabel
134
135
  v-if="free.length"
135
136
  :label="$t('dms_lang.language_add.suggested', free.length)"
136
137
  size="xs"
137
- class="px-2 pt-1 pb-1.5"
138
+ class="px-2 pb-1.5 pt-1"
138
139
  />
139
140
  <button
140
141
  v-for="option in free"
@@ -169,10 +170,10 @@ function step(event: KeyboardEvent) {
169
170
  />
170
171
  </button>
171
172
  <template v-if="added.length">
172
- <DmsEyebrow
173
+ <DmsEyebrowLabel
173
174
  :label="$t('dms_lang.language_add.already_added')"
174
175
  size="xs"
175
- class="px-2 pt-3 pb-1.5"
176
+ class="px-2 pb-1.5 pt-3"
176
177
  />
177
178
  <div
178
179
  v-for="option in added"
@@ -236,7 +237,9 @@ function step(event: KeyboardEvent) {
236
237
  <span
237
238
  v-else
238
239
  class="text-dimmed truncate"
239
- >{{ props.placeholder }}</span>
240
+ >
241
+ {{ props.placeholder }}
242
+ </span>
240
243
  </template>
241
244
  <template #item-trailing="{ item }">
242
245
  <span class="text-dimmed font-mono text-xs">{{ item.value }}</span>
@@ -1,4 +1,5 @@
1
1
  <script setup lang="ts">
2
+ import { useLocaleNames } from '../../composables/translation/useLocaleNames'
2
3
  type LocaleTileSize = 'sm' | 'md' | 'lg'
3
4
 
4
5
  interface Props {
@@ -42,7 +43,7 @@ const letters = computed(() => tileOf(props.code, props.siblings))
42
43
  SIZE_CLASSES[props.size],
43
44
  letters.length > SHORT_TILE_LENGTH ? WIDE_PADDING[props.size] : '',
44
45
  props.isBase
45
- ? 'text-primary bg-(--dms-accent-tint-strong) ring-1 ring-(--dms-accent-line) ring-inset'
46
+ ? 'text-primary bg-(--dms-accent-tint-strong) ring-(--dms-accent-line) ring-1 ring-inset'
46
47
  : 'bg-elevated text-toned ring-accented ring-1 ring-inset',
47
48
  ]"
48
49
  aria-hidden="true"
@@ -31,7 +31,7 @@ const parts = computed<TextPart[]>(() =>
31
31
  </script>
32
32
 
33
33
  <template>
34
- <span class="break-words whitespace-pre-wrap">
34
+ <span class="whitespace-pre-wrap break-words">
35
35
  <template
36
36
  v-for="(part, index) in parts"
37
37
  :key="index"
@@ -1,4 +1,9 @@
1
1
  <script setup lang="ts">
2
+ import { useI18nWorkspaces } from '../../composables/translation/useI18nWorkspaces'
3
+ import { useLangLinks } from '../../composables/translation/useLangLinks'
4
+ import { useLocaleNames } from '../../composables/translation/useLocaleNames'
5
+ import { useMutationToast } from '../../composables/translation/useMutationToast'
6
+ import { useWorkspaceNameCheck } from '../../composables/translation/useWorkspaceNameCheck'
2
7
  import type { WorkspaceDetails, WorkspaceType } from '../../types/lang'
3
8
  import type { WorkspaceBackup } from '../../utils/workspaceBackup'
4
9
  import { canonicalLocale, searchLanguages } from '../../utils/languages'
@@ -1,4 +1,8 @@
1
1
  <script setup lang="ts">
2
+ import { useI18nWorkspaces } from '../../composables/translation/useI18nWorkspaces'
3
+ import { useLangLinks } from '../../composables/translation/useLangLinks'
4
+ import { useMutationToast } from '../../composables/translation/useMutationToast'
5
+ import { useWorkspaceNameCheck } from '../../composables/translation/useWorkspaceNameCheck'
2
6
  import FormFieldRow from './form/FormFieldRow.vue'
3
7
  import FormRows from './form/FormRows.vue'
4
8
 
@@ -71,11 +75,11 @@ async function submit() {
71
75
  </FormRows>
72
76
  <div class="border-default space-y-2 rounded-md border px-3 py-2.5">
73
77
  <div>
74
- <DmsEyebrow
78
+ <DmsEyebrowLabel
75
79
  :label="$t('dms_lang.workspace_rename.before')"
76
80
  size="xs"
77
81
  />
78
- <code class="text-muted font-mono text-xs break-all">
82
+ <code class="text-muted break-all font-mono text-xs">
79
83
  {{ links.publicLocaleUrl(props.workspace) }}
80
84
  </code>
81
85
  </div>
@@ -84,11 +88,11 @@ async function submit() {
84
88
  class="text-dimmed size-3.5"
85
89
  />
86
90
  <div>
87
- <DmsEyebrow
91
+ <DmsEyebrowLabel
88
92
  :label="$t('dms_lang.workspace_rename.after')"
89
93
  size="xs"
90
94
  />
91
- <code class="text-highlighted font-mono text-xs break-all">
95
+ <code class="text-highlighted break-all font-mono text-xs">
92
96
  {{
93
97
  links.publicLocaleUrl(check.normalized.value || props.workspace)
94
98
  }}
@@ -24,7 +24,9 @@ const props = withDefaults(defineProps<FormRowsProps>(), {
24
24
  <span
25
25
  class="text-error"
26
26
  aria-hidden="true"
27
- >*</span>
27
+ >
28
+ *
29
+ </span>
28
30
  {{ $t('dms.form.required_legend') }}
29
31
  </p>
30
32
  </div>
@@ -1,4 +1,5 @@
1
1
  <script setup lang="ts">
2
+ import { useWorkspaceTypes } from '../../../composables/translation/useWorkspaceActions'
2
3
  /**
3
4
  * What a workspace is for: its free description and its type, as rows of a
4
5
  * hand-built form (`FormRows`).
@@ -20,7 +21,7 @@ const { typeItems, typeOf, descriptionMax } = useWorkspaceTypes()
20
21
  :help="$t('dms_lang.workspace_details.description_help')"
21
22
  >
22
23
  <template #default="{ id }">
23
- <DmsTextarea
24
+ <DmsInputTextarea
24
25
  :id="id"
25
26
  v-model="description"
26
27
  :rows="DESCRIPTION_ROWS"
@@ -372,7 +372,9 @@ function escapeDraft() {
372
372
  <span
373
373
  v-else
374
374
  class="text-dimmed italic"
375
- >—</span>
375
+ >
376
+ —
377
+ </span>
376
378
  </button>
377
379
  <p class="text-error flex items-start gap-1 text-xs">
378
380
  <UIcon
@@ -468,7 +470,7 @@ function escapeDraft() {
468
470
  class="flex items-center gap-2"
469
471
  >
470
472
  <span
471
- class="text-warning font-mono text-[10px] font-bold tracking-wider uppercase"
473
+ class="text-warning font-mono text-[10px] font-bold uppercase tracking-wider"
472
474
  >
473
475
  {{
474
476
  props.isBase
@@ -486,7 +488,9 @@ function escapeDraft() {
486
488
  <span
487
489
  v-else-if="isMissing"
488
490
  class="text-dimmed italic"
489
- >—</span>
491
+ >
492
+ —
493
+ </span>
490
494
  <span
491
495
  v-else-if="props.override"
492
496
  class="block space-y-0.5"
@@ -94,10 +94,10 @@ function onDrop(target: string) {
94
94
  />
95
95
  <template #content>
96
96
  <div class="w-80 p-1.5">
97
- <DmsEyebrow
97
+ <DmsEyebrowLabel
98
98
  :label="$t('dms_lang.matrix.columns_hint')"
99
99
  size="xs"
100
- class="px-2 pt-1.5 pb-2"
100
+ class="px-2 pb-2 pt-1.5"
101
101
  />
102
102
  <ul class="space-y-0.5">
103
103
  <li
@@ -1,4 +1,5 @@
1
1
  <script setup lang="ts">
2
+ import { useLangFormat } from '../../../composables/translation/useLangFormat'
2
3
  interface Props {
3
4
  namespace: string
4
5
  keys: number
@@ -25,7 +25,7 @@ const split = computed(() => props.rowKey.lastIndexOf(NAMESPACE_SEPARATOR) + 1)
25
25
  <div class="flex items-start gap-1.5">
26
26
  <button
27
27
  type="button"
28
- class="hover:text-primary min-w-0 flex-1 text-left font-mono text-xs break-all"
28
+ class="hover:text-primary min-w-0 flex-1 break-all text-left font-mono text-xs"
29
29
  :title="$t('dms_lang.matrix.open_key')"
30
30
  @click="emit('open')"
31
31
  >
@@ -58,7 +58,7 @@ const split = computed(() => props.rowKey.lastIndexOf(NAMESPACE_SEPARATOR) + 1)
58
58
  color="neutral"
59
59
  variant="ghost"
60
60
  icon="i-ph-git-fork"
61
- class="-my-1 shrink-0 opacity-0 transition-opacity group-hover/row:opacity-100 focus-visible:opacity-100 [@media(hover:none)]:opacity-100"
61
+ class="-my-1 shrink-0 opacity-0 transition-opacity focus-visible:opacity-100 group-hover/row:opacity-100 [@media(hover:none)]:opacity-100"
62
62
  :aria-label="$t('dms_lang.matrix.override_named', { key: props.rowKey })"
63
63
  :title="$t('dms_lang.override.action')"
64
64
  @click="emit('override')"
@@ -1,4 +1,5 @@
1
1
  <script setup lang="ts">
2
+ import { useLangFormat } from '../../../composables/translation/useLangFormat'
2
3
  import { watchDebounced } from '@vueuse/core'
3
4
  import type { TranslationFilter } from '../../../types/lang'
4
5
  import type {
@@ -131,7 +132,7 @@ watchDebounced(
131
132
  class="w-full"
132
133
  :aria-label="$t('dms_lang.matrix.filter_label')"
133
134
  />
134
- <DmsSegmented
135
+ <DmsSegmentedControl
135
136
  v-else
136
137
  v-model="filterModel"
137
138
  :items="filterItems"
@@ -1,4 +1,5 @@
1
1
  <script setup lang="ts">
2
+ import { useWorkspaceContext } from '../../../composables/translation/useWorkspaceContext'
2
3
  import { QUEUE_KEYS } from '../../../utils/shortcuts'
3
4
  import ShortcutKbds from '../ShortcutKbds.vue'
4
5
  import { useQueue } from '../../composables/useQueueContext'
@@ -1,4 +1,7 @@
1
1
  <script setup lang="ts">
2
+ import { useLangFormat } from '../../../composables/translation/useLangFormat'
3
+ import { useLangLinks } from '../../../composables/translation/useLangLinks'
4
+ import { useWorkspaceFlat } from '../../../composables/translation/useWorkspaceFlat'
2
5
  import {
3
6
  QUEUE_MODES,
4
7
  type QueueMode,
@@ -1,4 +1,8 @@
1
1
  <script setup lang="ts">
2
+ import { DEFAULT_WORKSPACE } from '../../../composables/translation/useI18nWorkspaces'
3
+ import { useWorkspaceContext } from '../../../composables/translation/useWorkspaceContext'
4
+ import { useWorkspaceFlat } from '../../../composables/translation/useWorkspaceFlat'
5
+ import { useWorkspaceRoute } from '../../../composables/translation/useWorkspaceRoute'
2
6
  import type { FlatTranslationRow } from '../../../types/lang'
3
7
  import type { MessageIssueKind } from '../../../utils/translations'
4
8
  import {
@@ -190,7 +194,7 @@ defineExpose({
190
194
  v-if="contextLocales.length"
191
195
  class="space-y-1"
192
196
  >
193
- <DmsEyebrow
197
+ <DmsEyebrowLabel
194
198
  :label="$t('dms_lang.queue.context')"
195
199
  size="xs"
196
200
  />
@@ -234,7 +238,7 @@ defineExpose({
234
238
  </span>
235
239
  </div>
236
240
 
237
- <DmsBanner
241
+ <DmsNoticeBanner
238
242
  v-if="conflict !== undefined"
239
243
  tone="warning"
240
244
  icon="i-ph-warning"
@@ -261,9 +265,9 @@ defineExpose({
261
265
  @click="save.overwrite"
262
266
  />
263
267
  </template>
264
- </DmsBanner>
268
+ </DmsNoticeBanner>
265
269
 
266
- <DmsBanner
270
+ <DmsNoticeBanner
267
271
  v-if="isOutdated && canEditValues && !drafts.has(props.row.key)"
268
272
  tone="warning"
269
273
  size="sm"
@@ -281,9 +285,9 @@ defineExpose({
281
285
  @click="save.markReviewed"
282
286
  />
283
287
  </template>
284
- </DmsBanner>
288
+ </DmsNoticeBanner>
285
289
 
286
- <DmsBanner
290
+ <DmsNoticeBanner
287
291
  v-if="!canEditValues"
288
292
  tone="info"
289
293
  size="sm"
@@ -307,7 +311,7 @@ defineExpose({
307
311
  :to="overrideLink"
308
312
  />
309
313
  </template>
310
- </DmsBanner>
314
+ </DmsNoticeBanner>
311
315
 
312
316
  <UTextarea
313
317
  ref="textarea"
@@ -1,4 +1,10 @@
1
1
  <script setup lang="ts">
2
+ import { useI18nWorkspaces } from '../../../composables/translation/useI18nWorkspaces'
3
+ import { useLangFormat } from '../../../composables/translation/useLangFormat'
4
+ import { useLangLinks } from '../../../composables/translation/useLangLinks'
5
+ import { useLocaleNames } from '../../../composables/translation/useLocaleNames'
6
+ import { useWorkspaceFlat } from '../../../composables/translation/useWorkspaceFlat'
7
+ import { useWorkspaceRoute } from '../../../composables/translation/useWorkspaceRoute'
2
8
  import type { DropdownMenuItem } from '@nuxt/ui'
3
9
  import { QUEUE_MODES } from '../../../composables/translation/useLanguageQueue'
4
10
  import type { DraftGroup } from '../../../utils/queueDrafts'
@@ -98,7 +104,7 @@ const draftLinks = computed(() => drafts.elsewhere.value.map(draftLink))
98
104
  :siblings="flat.locales"
99
105
  />
100
106
  <div class="grid min-w-0 gap-px">
101
- <DmsEyebrow
107
+ <DmsEyebrowLabel
102
108
  :label="$t('dms_lang.queue.title')"
103
109
  size="xs"
104
110
  />
@@ -146,7 +152,7 @@ const draftLinks = computed(() => drafts.elsewhere.value.map(draftLink))
146
152
  />
147
153
  </div>
148
154
  <div class="flex flex-wrap items-center gap-3">
149
- <DmsMeter
155
+ <DmsMeterBar
150
156
  class="min-w-24 flex-1"
151
157
  :value="session.progress.value"
152
158
  :max="100"
@@ -165,7 +171,7 @@ const draftLinks = computed(() => drafts.elsewhere.value.map(draftLink))
165
171
  :aria-label="$t('dms_lang.queue.scope_clear', { namespace })"
166
172
  @click="namespace = ''"
167
173
  />
168
- <DmsSegmented
174
+ <DmsSegmentedControl
169
175
  v-model="mode"
170
176
  :items="modeItems"
171
177
  size="xs"
@@ -16,7 +16,7 @@ const { upNext, drafts, baseLocale } = session
16
16
  :key="entry.row.key"
17
17
  class="grid grid-cols-[4rem_minmax(0,16rem)_minmax(0,1fr)] items-center gap-3 px-4 py-2"
18
18
  >
19
- <DmsEyebrow
19
+ <DmsEyebrowLabel
20
20
  v-if="offset === 0"
21
21
  :label="$t('dms_lang.queue.up_next')"
22
22
  size="xs"
@@ -83,7 +83,12 @@ function trackDraft(
83
83
  context.isDirty.value = text !== context.options.shownValue(key, code)
84
84
  }
85
85
 
86
- function open(context: EditorContext, key: string, code: string, draft: string) {
86
+ function open(
87
+ context: EditorContext,
88
+ key: string,
89
+ code: string,
90
+ draft: string,
91
+ ) {
87
92
  context.editing.value = { key, code, draft }
88
93
  trackDraft(context, key, code, draft)
89
94
  }
@@ -139,7 +144,12 @@ function startEdit(
139
144
  options.saves.begin(address)
140
145
  context.opened.workspace = options.workspace.value
141
146
  context.opened.isBase = code === options.baseLocale()
142
- open(context, key, code, draft ?? failure?.draft ?? options.shownValue(key, code))
147
+ open(
148
+ context,
149
+ key,
150
+ code,
151
+ draft ?? failure?.draft ?? options.shownValue(key, code),
152
+ )
143
153
  context.cursor.value = { key, code }
144
154
  options.onStart(key)
145
155
  }
@@ -3,6 +3,7 @@ import type { FlatTranslationRow } from '../../types/lang'
3
3
  import type { CellMove, CellRef } from './useCellEditor'
4
4
  import type { MatrixGroup } from './useMatrixFilters'
5
5
  import type { useMatrixRows } from './useMatrixRows'
6
+ import { isRowValueMissing } from '../../utils/translations.ts'
6
7
 
7
8
  /** Forward or backward through the cells. */
8
9
  export type JumpStep = 1 | -1
@@ -17,6 +17,7 @@ import {
17
17
  type KeyWriteFailed,
18
18
  type KeyWriteOutcome,
19
19
  } from './useKeySaves'
20
+ import { useMutationToast } from '../../composables/translation/useMutationToast.ts'
20
21
 
21
22
  export interface CellFailure {
22
23
  /** The text that could not be saved: kept until saved or discarded. */
@@ -6,6 +6,10 @@ import KeyEditorDrawer from '../components/KeyEditorDrawer.vue'
6
6
  import KeyStatus from '../components/KeyStatus.vue'
7
7
  import { NAMESPACE_SEPARATOR } from '../../utils/translations'
8
8
  import type { CellHold } from './useCellSaves'
9
+ import { useI18nWorkspaces } from '../../composables/translation/useI18nWorkspaces.ts'
10
+ import { linkWithQuery } from '../../composables/translation/useLangLinks.ts'
11
+ import { useWorkspaceFlat } from '../../composables/translation/useWorkspaceFlat.ts'
12
+ import { useWorkspaceRoute } from '../../composables/translation/useWorkspaceRoute.ts'
9
13
 
10
14
  export interface PanelRequest {
11
15
  key: string
@@ -16,6 +16,9 @@ import {
16
16
  type SaveState,
17
17
  type WriteLink,
18
18
  } from '../../utils/keySaves'
19
+ import { useI18nWorkspaces } from '../../composables/translation/useI18nWorkspaces.ts'
20
+ import { useMutationToast } from '../../composables/translation/useMutationToast.ts'
21
+ import { useWorkspaceFlat } from '../../composables/translation/useWorkspaceFlat.ts'
19
22
 
20
23
  /** The key a write goes to. */
21
24
  export interface KeyTarget {