@antelopejs/dms-lang 0.0.7 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (245) hide show
  1. package/README.md +12 -6
  2. package/dist/pages/actions.d.ts +7 -0
  3. package/dist/pages/actions.js +15 -0
  4. package/dist/pages/actions.js.map +1 -0
  5. package/dist/pages/component-action.d.ts +2 -0
  6. package/dist/pages/component-action.js +10 -0
  7. package/dist/pages/component-action.js.map +1 -0
  8. package/dist/pages/header-actions.d.ts +9 -0
  9. package/dist/pages/header-actions.js +146 -0
  10. package/dist/pages/header-actions.js.map +1 -0
  11. package/dist/pages/index.d.ts +6 -0
  12. package/dist/pages/index.js +6 -0
  13. package/dist/pages/index.js.map +1 -1
  14. package/dist/pages/language.d.ts +10 -0
  15. package/dist/pages/language.js +89 -0
  16. package/dist/pages/language.js.map +1 -0
  17. package/dist/pages/languages-table.d.ts +2 -0
  18. package/dist/pages/languages-table.js +120 -0
  19. package/dist/pages/languages-table.js.map +1 -0
  20. package/dist/pages/module.d.ts +7 -1
  21. package/dist/pages/module.js +28 -2
  22. package/dist/pages/module.js.map +1 -1
  23. package/dist/pages/overview.d.ts +2 -1
  24. package/dist/pages/overview.js +83 -8
  25. package/dist/pages/overview.js.map +1 -1
  26. package/dist/pages/page-actions.d.ts +6 -0
  27. package/dist/pages/page-actions.js +10 -0
  28. package/dist/pages/page-actions.js.map +1 -0
  29. package/dist/pages/quick-actions.d.ts +1 -0
  30. package/dist/pages/quick-actions.js +56 -0
  31. package/dist/pages/quick-actions.js.map +1 -0
  32. package/dist/pages/translations.d.ts +7 -1
  33. package/dist/pages/translations.js +47 -10
  34. package/dist/pages/translations.js.map +1 -1
  35. package/dist/pages/workspace-guard.d.ts +1 -0
  36. package/dist/pages/workspace-guard.js +35 -0
  37. package/dist/pages/workspace-guard.js.map +1 -0
  38. package/dist/pages/workspace.d.ts +18 -0
  39. package/dist/pages/workspace.js +162 -0
  40. package/dist/pages/workspace.js.map +1 -0
  41. package/dist/pages/workspaces.d.ts +14 -0
  42. package/dist/pages/workspaces.js +88 -0
  43. package/dist/pages/workspaces.js.map +1 -0
  44. package/dist/routes/publicLocales.d.ts +3 -2
  45. package/dist/routes/publicLocales.js +39 -18
  46. package/dist/routes/publicLocales.js.map +1 -1
  47. package/dist/routes/translations.d.ts +59 -63
  48. package/dist/routes/translations.js +400 -119
  49. package/dist/routes/translations.js.map +1 -1
  50. package/dist/utils/announce.d.ts +9 -0
  51. package/dist/utils/announce.js +29 -0
  52. package/dist/utils/announce.js.map +1 -0
  53. package/dist/utils/blocks.d.ts +8 -0
  54. package/dist/utils/blocks.js +213 -0
  55. package/dist/utils/blocks.js.map +1 -0
  56. package/dist/utils/body.d.ts +1 -0
  57. package/dist/utils/body.js +21 -0
  58. package/dist/utils/body.js.map +1 -0
  59. package/dist/utils/cache.d.ts +3 -0
  60. package/dist/utils/cache.js +32 -0
  61. package/dist/utils/cache.js.map +1 -0
  62. package/dist/utils/catalog.d.ts +7 -0
  63. package/dist/utils/catalog.js +62 -0
  64. package/dist/utils/catalog.js.map +1 -0
  65. package/dist/utils/constants.d.ts +6 -0
  66. package/dist/utils/constants.js +10 -0
  67. package/dist/utils/constants.js.map +1 -0
  68. package/dist/utils/coverage.d.ts +2 -0
  69. package/dist/utils/coverage.js +11 -0
  70. package/dist/utils/coverage.js.map +1 -0
  71. package/dist/utils/dialogs.d.ts +7 -0
  72. package/dist/utils/dialogs.js +103 -0
  73. package/dist/utils/dialogs.js.map +1 -0
  74. package/dist/utils/errors.d.ts +40 -0
  75. package/dist/utils/errors.js +60 -0
  76. package/dist/utils/errors.js.map +1 -0
  77. package/dist/utils/export.d.ts +17 -0
  78. package/dist/utils/export.js +129 -0
  79. package/dist/utils/export.js.map +1 -0
  80. package/dist/utils/json.d.ts +10 -1
  81. package/dist/utils/json.js +127 -19
  82. package/dist/utils/json.js.map +1 -1
  83. package/dist/utils/key-stores.d.ts +3 -0
  84. package/dist/utils/key-stores.js +24 -0
  85. package/dist/utils/key-stores.js.map +1 -0
  86. package/dist/utils/keys.d.ts +23 -0
  87. package/dist/utils/keys.js +252 -0
  88. package/dist/utils/keys.js.map +1 -0
  89. package/dist/utils/languages.d.ts +27 -0
  90. package/dist/utils/languages.js +121 -0
  91. package/dist/utils/languages.js.map +1 -0
  92. package/dist/utils/locale-codes.d.ts +5 -0
  93. package/dist/utils/locale-codes.js +56 -0
  94. package/dist/utils/locale-codes.js.map +1 -0
  95. package/dist/utils/locale-discovery.d.ts +1 -0
  96. package/dist/utils/locale-discovery.js +19 -1
  97. package/dist/utils/locale-discovery.js.map +1 -1
  98. package/dist/utils/message-check.d.ts +1 -0
  99. package/dist/utils/message-check.js +93 -0
  100. package/dist/utils/message-check.js.map +1 -0
  101. package/dist/utils/message-syntax.d.ts +6 -0
  102. package/dist/utils/message-syntax.js +38 -0
  103. package/dist/utils/message-syntax.js.map +1 -0
  104. package/dist/utils/namespaces.d.ts +12 -0
  105. package/dist/utils/namespaces.js +52 -0
  106. package/dist/utils/namespaces.js.map +1 -0
  107. package/dist/utils/notices.d.ts +4 -0
  108. package/dist/utils/notices.js +60 -0
  109. package/dist/utils/notices.js.map +1 -0
  110. package/dist/utils/own.d.ts +2 -3
  111. package/dist/utils/own.js +17 -57
  112. package/dist/utils/own.js.map +1 -1
  113. package/dist/utils/public-url.d.ts +8 -0
  114. package/dist/utils/public-url.js +87 -0
  115. package/dist/utils/public-url.js.map +1 -0
  116. package/dist/utils/registry.d.ts +3 -1
  117. package/dist/utils/registry.js +26 -10
  118. package/dist/utils/registry.js.map +1 -1
  119. package/dist/utils/resolve.d.ts +18 -15
  120. package/dist/utils/resolve.js +98 -151
  121. package/dist/utils/resolve.js.map +1 -1
  122. package/dist/utils/review.d.ts +5 -0
  123. package/dist/utils/review.js +64 -0
  124. package/dist/utils/review.js.map +1 -0
  125. package/dist/utils/snippets.d.ts +7 -0
  126. package/dist/utils/snippets.js +129 -0
  127. package/dist/utils/snippets.js.map +1 -0
  128. package/dist/utils/summary.d.ts +23 -0
  129. package/dist/utils/summary.js +65 -0
  130. package/dist/utils/summary.js.map +1 -0
  131. package/dist/utils/tree.d.ts +2 -17
  132. package/dist/utils/tree.js +21 -126
  133. package/dist/utils/tree.js.map +1 -1
  134. package/dist/utils/workspaces.d.ts +45 -15
  135. package/dist/utils/workspaces.js +256 -164
  136. package/dist/utils/workspaces.js.map +1 -1
  137. package/dist/validation/key.schema.d.ts +71 -0
  138. package/dist/validation/key.schema.js +67 -0
  139. package/dist/validation/key.schema.js.map +1 -0
  140. package/dist/validation/query.schema.d.ts +17 -0
  141. package/dist/validation/query.schema.js +44 -0
  142. package/dist/validation/query.schema.js.map +1 -0
  143. package/dist/validation/validate.d.ts +2 -0
  144. package/dist/validation/validate.js +24 -0
  145. package/dist/validation/validate.js.map +1 -0
  146. package/dist/validation/workspace.schema.d.ts +145 -0
  147. package/dist/validation/workspace.schema.js +83 -0
  148. package/dist/validation/workspace.schema.js.map +1 -0
  149. package/frontend-vue/app/build/components/KeyAddModal.vue +340 -0
  150. package/frontend-vue/app/build/components/KeyEditorDrawer.vue +951 -0
  151. package/frontend-vue/app/build/components/KeyRenameModal.vue +172 -0
  152. package/frontend-vue/app/build/components/LanguageAddModal.vue +199 -0
  153. package/frontend-vue/app/build/components/LanguagePicker.vue +233 -0
  154. package/frontend-vue/app/build/components/LocaleTile.vue +52 -0
  155. package/frontend-vue/app/build/components/PlaceholderText.vue +42 -0
  156. package/frontend-vue/app/build/components/ShortcutKbds.vue +22 -0
  157. package/frontend-vue/app/build/components/WorkspaceCreateModal.vue +193 -0
  158. package/frontend-vue/app/build/components/WorkspaceRenameModal.vue +107 -0
  159. package/frontend-vue/app/build/components/form/FormFieldRow.vue +70 -0
  160. package/frontend-vue/app/build/components/form/FormRows.vue +25 -0
  161. package/frontend-vue/app/build/components/form/WorkspaceDetailsFields.vue +44 -0
  162. package/frontend-vue/app/build/components/matrix/MatrixCell.vue +488 -0
  163. package/frontend-vue/app/build/components/matrix/MatrixColumns.vue +177 -0
  164. package/frontend-vue/app/build/components/matrix/MatrixGroupHeader.vue +57 -0
  165. package/frontend-vue/app/build/components/matrix/MatrixKeyCell.vue +83 -0
  166. package/frontend-vue/app/build/components/matrix/MatrixToolbar.vue +167 -0
  167. package/frontend-vue/app/build/components/queue/QueueActions.vue +60 -0
  168. package/frontend-vue/app/build/components/queue/QueueDone.vue +185 -0
  169. package/frontend-vue/app/build/components/queue/QueueEditor.vue +374 -0
  170. package/frontend-vue/app/build/components/queue/QueueHeader.vue +162 -0
  171. package/frontend-vue/app/build/components/queue/QueueUpNext.vue +61 -0
  172. package/frontend-vue/app/build/composables/useCellEditor.ts +324 -0
  173. package/frontend-vue/app/build/composables/useCellMoves.ts +155 -0
  174. package/frontend-vue/app/build/composables/useCellSaves.ts +339 -0
  175. package/frontend-vue/app/build/composables/useKeyPanel.ts +284 -0
  176. package/frontend-vue/app/build/composables/useKeySaves.ts +280 -0
  177. package/frontend-vue/app/build/composables/useMatrixFilters.ts +213 -0
  178. package/frontend-vue/app/build/composables/useMatrixRows.ts +104 -0
  179. package/frontend-vue/app/build/composables/useMatrixView.ts +181 -0
  180. package/frontend-vue/app/build/composables/useQueueContext.ts +31 -0
  181. package/frontend-vue/app/build/composables/useQueueEditing.ts +53 -0
  182. package/frontend-vue/app/build/composables/useQueueOrphans.ts +54 -0
  183. package/frontend-vue/app/build/composables/useQueueSave.ts +290 -0
  184. package/frontend-vue/app/build/composables/useQueueShortcuts.ts +106 -0
  185. package/frontend-vue/app/build/composables/useQueueToasts.ts +99 -0
  186. package/frontend-vue/app/components/LanguageNamespaces.vue +77 -0
  187. package/frontend-vue/app/components/NamespaceCoverage.vue +222 -0
  188. package/frontend-vue/app/components/TranslationMatrix.vue +809 -0
  189. package/frontend-vue/app/components/TranslationQueue.vue +212 -0
  190. package/frontend-vue/app/components/WorkspaceDangerZone.vue +81 -0
  191. package/frontend-vue/app/components/WorkspaceGeneral.vue +232 -0
  192. package/frontend-vue/app/components/WorkspaceList.vue +454 -0
  193. package/frontend-vue/app/components/WorkspaceScope.vue +384 -0
  194. package/frontend-vue/app/composables/translation/useFirstRun.ts +8 -0
  195. package/frontend-vue/app/composables/translation/useI18nWorkspaces.ts +221 -133
  196. package/frontend-vue/app/composables/translation/useKeyActions.ts +224 -0
  197. package/frontend-vue/app/composables/translation/useLangFormat.ts +10 -0
  198. package/frontend-vue/app/composables/translation/useLangLinks.ts +80 -0
  199. package/frontend-vue/app/composables/translation/useLanguageActions.ts +159 -0
  200. package/frontend-vue/app/composables/translation/useLanguageQueue.ts +232 -0
  201. package/frontend-vue/app/composables/translation/useLocaleNames.ts +166 -0
  202. package/frontend-vue/app/composables/translation/useMutationToast.ts +51 -17
  203. package/frontend-vue/app/composables/translation/useQueueDrafts.ts +115 -0
  204. package/frontend-vue/app/composables/translation/useQueueSession.ts +182 -0
  205. package/frontend-vue/app/composables/translation/useServedConfirm.ts +152 -0
  206. package/frontend-vue/app/composables/translation/useWorkspaceActions.ts +259 -0
  207. package/frontend-vue/app/composables/translation/useWorkspaceContext.ts +46 -15
  208. package/frontend-vue/app/composables/translation/useWorkspaceFlat.ts +322 -70
  209. package/frontend-vue/app/composables/translation/useWorkspaceNameCheck.ts +55 -0
  210. package/frontend-vue/app/composables/translation/useWorkspaceRoute.ts +129 -0
  211. package/frontend-vue/app/config/shortcuts-registry.ts +72 -0
  212. package/frontend-vue/app/types/lang.ts +130 -0
  213. package/frontend-vue/app/utils/boundedCache.ts +22 -0
  214. package/frontend-vue/app/utils/download.ts +16 -0
  215. package/frontend-vue/app/utils/keySaveErrors.ts +61 -0
  216. package/frontend-vue/app/utils/keySaves.ts +108 -0
  217. package/frontend-vue/app/utils/languages.ts +272 -0
  218. package/frontend-vue/app/utils/matrixExport.ts +47 -0
  219. package/frontend-vue/app/utils/queueDrafts.ts +115 -0
  220. package/frontend-vue/app/utils/queuePass.ts +145 -0
  221. package/frontend-vue/app/utils/queueView.ts +22 -0
  222. package/frontend-vue/app/utils/shortcuts.ts +75 -0
  223. package/frontend-vue/app/utils/translations.ts +756 -0
  224. package/frontend-vue/app/utils/workspaceBackup.ts +119 -0
  225. package/frontend-vue/app/utils/workspaces.ts +45 -0
  226. package/frontend-vue/dms.frontend.build.ts +5 -0
  227. package/frontend-vue/dms.frontend.ts +9 -20
  228. package/frontend-vue/i18n/locales/lang-en-GB.json +792 -69
  229. package/frontend-vue/i18n/locales/lang-fr-FR.json +792 -69
  230. package/frontend-vue/package.json +8 -6
  231. package/package.json +8 -6
  232. package/dist/utils/mutations.d.ts +0 -3
  233. package/dist/utils/mutations.js +0 -35
  234. package/dist/utils/mutations.js.map +0 -1
  235. package/frontend-vue/app/build/components/pages/lang/TranslationMatrix.vue +0 -284
  236. package/frontend-vue/app/components/LanguageAddModal.vue +0 -78
  237. package/frontend-vue/app/components/WorkspaceEndpoint.vue +0 -29
  238. package/frontend-vue/app/components/WorkspaceSelector.vue +0 -180
  239. package/frontend-vue/app/components/WorkspaceStatus.vue +0 -24
  240. package/frontend-vue/app/composables/translation/useLanguageCatalog.ts +0 -90
  241. package/frontend-vue/app/composables/translation/useLocaleMeta.ts +0 -18
  242. package/frontend-vue/app/composables/translation/useTranslationProgress.ts +0 -73
  243. package/frontend-vue/app/custom-pages/lang/overview.vue +0 -397
  244. package/frontend-vue/app/custom-pages/lang/translations.vue +0 -498
  245. package/frontend-vue/app/plugins/workspace-sidebar-widget.ts +0 -12
@@ -0,0 +1,119 @@
1
+ import type {
2
+ WorkspaceDetails,
3
+ WorkspaceLocale,
4
+ WorkspaceType,
5
+ } from '../types/lang'
6
+
7
+ /** The messages of each language of a workspace. */
8
+ export type LocaleMessages = Record<string, Record<string, unknown>>
9
+
10
+ /** A workspace saved as one JSON file: its manifest and every language file. */
11
+ export interface WorkspaceBackup extends WorkspaceDetails {
12
+ format?: string
13
+ version?: number
14
+ id?: string
15
+ defaultLocale?: string
16
+ locales?: WorkspaceLocale[]
17
+ messages: LocaleMessages
18
+ }
19
+
20
+ /** The description and type a request sends: `null` clears them. */
21
+ export interface DetailsChange {
22
+ description?: string | null
23
+ type?: WorkspaceType | null
24
+ }
25
+
26
+ /** A backup as an import sends it: its details may be cleared. */
27
+ export type WorkspaceImport = Omit<WorkspaceBackup, keyof WorkspaceDetails> &
28
+ DetailsChange
29
+
30
+ /** Why a file is no workspace: not one at all, or a backup of a newer format. */
31
+ export type BackupProblem = 'invalid' | 'newer'
32
+
33
+ /** A file read as a workspace backup. */
34
+ interface BackupFound {
35
+ backup: WorkspaceBackup
36
+ problem?: undefined
37
+ }
38
+
39
+ /** A file that is no workspace backup, and why. */
40
+ interface BackupRefused {
41
+ backup?: undefined
42
+ problem: BackupProblem
43
+ }
44
+
45
+ /** What a file holds as a workspace: a backup, else why it is none. */
46
+ export type BackupRead = BackupFound | BackupRefused
47
+
48
+ /** The format every backup declares. */
49
+ export const BACKUP_FORMAT = 'dms-lang.workspace'
50
+ /** The newest backup version this module reads. */
51
+ export const BACKUP_VERSION = 1
52
+
53
+ const JSON_EXTENSION_RE = /\.json$/i
54
+ const INVALID: BackupRead = { problem: 'invalid' }
55
+
56
+ function isRecord(value: unknown): value is Record<string, unknown> {
57
+ return typeof value === 'object' && value !== null && !Array.isArray(value)
58
+ }
59
+
60
+ function isLocaleMessages(value: unknown): value is LocaleMessages {
61
+ if (!isRecord(value)) return false
62
+ const entries = Object.entries(value)
63
+ return (
64
+ entries.length > 0 &&
65
+ entries.every(
66
+ ([code, messages]) => typedLocaleCode(code) && isRecord(messages),
67
+ )
68
+ )
69
+ }
70
+
71
+ function isKnownVersion(version: unknown): version is number {
72
+ return typeof version === 'number' && Number.isInteger(version) && version > 0
73
+ }
74
+
75
+ /**
76
+ * What is wrong with a backup's `format` and `version`: another format, a
77
+ * version that is no version, or one newer than this module reads. Both may
78
+ * be left out (a backup written by hand).
79
+ */
80
+ function backupProblem(
81
+ content: Record<string, unknown>,
82
+ ): BackupProblem | undefined {
83
+ const { format, version } = content
84
+ if (format !== undefined && format !== BACKUP_FORMAT) return 'invalid'
85
+ if (version === undefined) return undefined
86
+ if (!isKnownVersion(version)) return 'invalid'
87
+ return version > BACKUP_VERSION ? 'newer' : undefined
88
+ }
89
+
90
+ function backupRead(content: Record<string, unknown>): BackupRead {
91
+ const problem = backupProblem(content)
92
+ if (problem) return { problem }
93
+ return { backup: content as unknown as WorkspaceBackup }
94
+ }
95
+
96
+ /**
97
+ * What a JSON file holds as a workspace: a backup (`messages` and its
98
+ * manifest, of a format and version this module reads), an export of every
99
+ * language (`{ <locale>: messages }`), or one language file named after its
100
+ * code (`it.json`).
101
+ */
102
+ export function readBackup(content: unknown, fileName = ''): BackupRead {
103
+ if (isRecord(content) && isLocaleMessages(content.messages))
104
+ return backupRead(content)
105
+ if (isLocaleMessages(content)) return { backup: { messages: content } }
106
+ const code = typedLocaleCode(fileName.replace(JSON_EXTENSION_RE, ''))
107
+ if (code && isRecord(content))
108
+ return { backup: { messages: { [code]: content } } }
109
+ return INVALID
110
+ }
111
+
112
+ /** Reads a JSON file as a workspace; a file that is no JSON is no workspace. */
113
+ export function parseBackup(text: string, fileName: string): BackupRead {
114
+ try {
115
+ return readBackup(JSON.parse(text), fileName)
116
+ } catch {
117
+ return INVALID
118
+ }
119
+ }
@@ -0,0 +1,45 @@
1
+ /** The HTTP method an app reads an added workspace's public files with. */
2
+ export const PUBLIC_URL_METHOD = 'GET'
3
+
4
+ /** `kind` keeps the order of the server: project files, modules, then the workspaces created. */
5
+ export type WorkspaceSort = 'kind' | 'name' | 'coverage'
6
+
7
+ export interface ListedWorkspace {
8
+ id: string
9
+ description?: string
10
+ coverage: number
11
+ }
12
+
13
+ type WorkspaceComparator = (a: ListedWorkspace, b: ListedWorkspace) => number
14
+
15
+ const byName: WorkspaceComparator = (a, b) => a.id.localeCompare(b.id)
16
+
17
+ const WORKSPACE_COMPARATORS: Record<WorkspaceSort, WorkspaceComparator> = {
18
+ kind: () => 0,
19
+ name: byName,
20
+ coverage: (a, b) => a.coverage - b.coverage || byName(a, b),
21
+ }
22
+
23
+ /**
24
+ * Whether a workspace's id, description or one of the `labels` shown for it
25
+ * (its kind, its type) holds the search, ignoring case.
26
+ */
27
+ export function matchesWorkspace(
28
+ workspace: ListedWorkspace,
29
+ search: string,
30
+ labels: string[] = [],
31
+ ): boolean {
32
+ const needle = search.trim().toLowerCase()
33
+ if (!needle) return true
34
+ return [workspace.id, workspace.description ?? '', ...labels].some((text) =>
35
+ text.toLowerCase().includes(needle),
36
+ )
37
+ }
38
+
39
+ /** The workspaces in the order picked; least complete first by coverage. */
40
+ export function sortWorkspaces<T extends ListedWorkspace>(
41
+ workspaces: T[],
42
+ sort: WorkspaceSort,
43
+ ): T[] {
44
+ return [...workspaces].sort(WORKSPACE_COMPARATORS[sort])
45
+ }
@@ -0,0 +1,5 @@
1
+ import { defineDmsFrontendBuild } from '#dms/frontend-build'
2
+
3
+ export default defineDmsFrontendBuild((build) => {
4
+ build.registerAutoImports(['app/composables', 'app/utils', 'app/types'])
5
+ })
@@ -1,6 +1,5 @@
1
1
  import { defineAsyncComponent, type Component } from 'vue'
2
2
  import type { DmsFrontendModule } from '#dms/frontend-module'
3
- import workspaceSidebarWidget from './app/plugins/workspace-sidebar-widget'
4
3
 
5
4
  interface VueModule {
6
5
  default: Component
@@ -9,33 +8,23 @@ interface VueModule {
9
8
  const components = import.meta.glob<VueModule>(
10
9
  './app/{components,build/components}/**/*.vue',
11
10
  )
12
- const pages = import.meta.glob<VueModule>('./app/custom-pages/**/*.vue')
11
+
12
+ function componentName(path: string): string {
13
+ return path
14
+ .split('/')
15
+ .at(-1)!
16
+ .replace(/\.vue$/, '')
17
+ }
13
18
 
14
19
  const frontendModule: DmsFrontendModule = {
20
+ componentPrefix: 'DmsLang',
15
21
  setup(sdk) {
16
22
  for (const [path, loader] of Object.entries(components).sort()) {
17
- const name = path
18
- .split('/')
19
- .at(-1)!
20
- .replace(/\.vue$/, '')
21
23
  sdk.registerComponent(
22
- `DmsLang${name}`,
24
+ componentName(path),
23
25
  defineAsyncComponent(async () => (await loader()).default),
24
26
  )
25
27
  }
26
- for (const [path, loader] of Object.entries(pages).sort()) {
27
- const name = path.replace('./app/custom-pages/', '').replace(/\.vue$/, '')
28
- const component = defineAsyncComponent(
29
- async () => (await loader()).default,
30
- )
31
- sdk.registerPage(name, component, loader)
32
- const componentName = name
33
- .split(/[/_-]/)
34
- .map((part) => `${part[0].toUpperCase()}${part.slice(1)}`)
35
- .join('')
36
- sdk.registerComponent(`Dms${componentName}`, component)
37
- }
38
- sdk.registerPlugin(workspaceSidebarWidget)
39
28
  },
40
29
  }
41
30