@wssto2/vue-core 0.0.0-stage → 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 (344) hide show
  1. package/README.md +301 -2
  2. package/dist/AdaptivePageShell.vue_vue_type_script_setup_true_lang-CKghARkW.js +396 -0
  3. package/dist/AlertDialog.vue_vue_type_script_setup_true_lang-BZb4qKXo.js +220 -0
  4. package/dist/AsyncSection.vue_vue_type_script_setup_true_lang-B82bl36A.js +131 -0
  5. package/dist/Avatar.vue_vue_type_script_setup_true_lang-CFIheaSr.js +35 -0
  6. package/dist/Badge.vue_vue_type_script_setup_true_lang-DKc6ugmr.js +31 -0
  7. package/dist/Banner.vue_vue_type_script_setup_true_lang-n_wGPIIu.js +36 -0
  8. package/dist/BottomDock.vue_vue_type_script_setup_true_lang-DhlMnPC2.js +31 -0
  9. package/dist/Button.vue_vue_type_script_setup_true_lang-3f0emVNU.js +141 -0
  10. package/dist/DateButton.vue_vue_type_script_setup_true_lang-EcqrfWKz.js +35 -0
  11. package/dist/DiscardChangesModal.vue_vue_type_script_setup_true_lang-Bx5O1RZJ.js +27 -0
  12. package/dist/EmptyState.vue_vue_type_script_setup_true_lang-BeGpHMUP.js +41 -0
  13. package/dist/Icon.vue_vue_type_script_lang-DtC4_mkz.js +109 -0
  14. package/dist/IconTile.vue_vue_type_script_setup_true_lang-Csfv6Sel.js +40 -0
  15. package/dist/LeaveGuardRoot.vue_vue_type_script_setup_true_lang-DH6EB8br.js +25 -0
  16. package/dist/Menu.vue_vue_type_script_setup_true_lang-D44EHXQZ.js +177 -0
  17. package/dist/Modal.vue_vue_type_script_setup_true_lang-DYQgaUtj.js +343 -0
  18. package/dist/NoAccess.vue_vue_type_script_setup_true_lang-OKW8pKYU.js +78 -0
  19. package/dist/Panel.vue_vue_type_script_setup_true_lang-BQmv3cLb.js +138 -0
  20. package/dist/PhotoViewer.vue_vue_type_script_setup_true_lang-DDVQXJRB.js +411 -0
  21. package/dist/ProgressTrack.vue_vue_type_script_setup_true_lang-1DDaNs2W.js +64 -0
  22. package/dist/SectionList.vue_vue_type_script_setup_true_lang-DGcKX_OJ.js +230 -0
  23. package/dist/SelectField.vue_vue_type_script_setup_true_lang-SyFWE33A.js +422 -0
  24. package/dist/Sheet.vue_vue_type_script_setup_true_lang-BLBD5ps8.js +210 -0
  25. package/dist/SwipeActions.vue_vue_type_script_setup_true_lang-CGTuEnTv.js +243 -0
  26. package/dist/Timestamp.vue_vue_type_script_setup_true_lang-CSY_mMm1.js +34 -0
  27. package/dist/Toaster.vue_vue_type_script_setup_true_lang-55boRLAj.js +19 -0
  28. package/dist/Tooltip.vue_vue_type_script_setup_true_lang-BJWPVyfT.js +81 -0
  29. package/dist/access-DdRFrVV1.js +40 -0
  30. package/dist/anchored-Cj4--8dT.js +47 -0
  31. package/dist/app/StartupFailure.vue.d.ts +10 -0
  32. package/dist/app/application.d.ts +129 -0
  33. package/dist/app/contributions.d.ts +35 -0
  34. package/dist/app/effects.d.ts +31 -0
  35. package/dist/app/environment.d.ts +30 -0
  36. package/dist/app/feature.d.ts +127 -0
  37. package/dist/app/index.d.ts +11 -0
  38. package/dist/app/index.js +460 -0
  39. package/dist/app/keepAlive.d.ts +23 -0
  40. package/dist/app/validate.d.ts +36 -0
  41. package/dist/assets/Inter-Italic-Variable-BpDZNMc-.woff2 +0 -0
  42. package/dist/assets/Inter-Variable-6UPButmw.woff2 +0 -0
  43. package/dist/assets/JetBrainsMono-Medium-3S3k2nMz.woff2 +0 -0
  44. package/dist/assets/JetBrainsMono-Regular-BQaDgvhP.woff2 +0 -0
  45. package/dist/button/Button.vue.d.ts +53 -0
  46. package/dist/button/index.d.ts +2 -0
  47. package/dist/button/index.js +6 -0
  48. package/dist/button/shortcut.d.ts +17 -0
  49. package/dist/chrome-D9pwD6iS.js +101 -0
  50. package/dist/client/client.d.ts +45 -0
  51. package/dist/client/encode.d.ts +17 -0
  52. package/dist/client/envelope.d.ts +14 -0
  53. package/dist/client/error.d.ts +50 -0
  54. package/dist/client/index.d.ts +9 -0
  55. package/dist/client/index.js +140 -0
  56. package/dist/client/transport.d.ts +7 -0
  57. package/dist/collection/CollectionCell.vue.d.ts +26 -0
  58. package/dist/collection/CollectionEmptyResult.vue.d.ts +19 -0
  59. package/dist/collection/CollectionFilterMenu.vue.d.ts +16 -0
  60. package/dist/collection/CollectionFilterPanel.vue.d.ts +22 -0
  61. package/dist/collection/CollectionPage.vue.d.ts +44 -0
  62. package/dist/collection/CollectionPager.vue.d.ts +21 -0
  63. package/dist/collection/CollectionTable.vue.d.ts +33 -0
  64. package/dist/collection/CollectionToolbar.vue.d.ts +23 -0
  65. package/dist/collection/RecordIdentity.vue.d.ts +27 -0
  66. package/dist/collection/columns.d.ts +103 -0
  67. package/dist/collection/datePresets.d.ts +11 -0
  68. package/dist/collection/definition.d.ts +84 -0
  69. package/dist/collection/filters.d.ts +86 -0
  70. package/dist/collection/highlight.d.ts +10 -0
  71. package/dist/collection/http.d.ts +24 -0
  72. package/dist/collection/index.d.ts +19 -0
  73. package/dist/collection/index.js +2323 -0
  74. package/dist/collection/location.d.ts +5 -0
  75. package/dist/collection/neighbors.d.ts +49 -0
  76. package/dist/collection/rowInteractions.d.ts +54 -0
  77. package/dist/collection/savedViews.d.ts +32 -0
  78. package/dist/collection/session.d.ts +7 -0
  79. package/dist/collection/slots.d.ts +29 -0
  80. package/dist/collection/state.d.ts +19 -0
  81. package/dist/collection/types.d.ts +57 -0
  82. package/dist/collection/useCollection.d.ts +133 -0
  83. package/dist/content/Avatar.vue.d.ts +18 -0
  84. package/dist/content/Divider.vue.d.ts +6 -0
  85. package/dist/content/KeyValue.vue.d.ts +31 -0
  86. package/dist/content/KeyValueList.vue.d.ts +27 -0
  87. package/dist/content/MicroLabel.vue.d.ts +23 -0
  88. package/dist/content/Panel.vue.d.ts +54 -0
  89. package/dist/content/Timestamp.vue.d.ts +17 -0
  90. package/dist/content/index.d.ts +8 -0
  91. package/dist/content/index.js +107 -0
  92. package/dist/content/initials.d.ts +5 -0
  93. package/dist/content/panel.d.ts +16 -0
  94. package/dist/context-Ch1r4fdN.js +27 -0
  95. package/dist/controlSurface-t7OEFESJ.js +42 -0
  96. package/dist/controls/DateButton.vue.d.ts +36 -0
  97. package/dist/controls/IconTile.vue.d.ts +24 -0
  98. package/dist/controls/PopupButton.vue.d.ts +41 -0
  99. package/dist/controls/SearchInput.vue.d.ts +16 -0
  100. package/dist/controls/SwipeActions.vue.d.ts +30 -0
  101. package/dist/controls/Tabs.vue.d.ts +43 -0
  102. package/dist/controls/controlSurface.d.ts +39 -0
  103. package/dist/controls/index.d.ts +7 -0
  104. package/dist/controls/index.js +81 -0
  105. package/dist/dialogStack-DiTG1rZc.js +26 -0
  106. package/dist/environment-D3nozt9a.js +75 -0
  107. package/dist/error-Bb_dr_Ay.js +36 -0
  108. package/dist/feature-DyDtyMLU.js +47 -0
  109. package/dist/form/CardSelectField.vue.d.ts +25 -0
  110. package/dist/form/CheckboxField.vue.d.ts +41 -0
  111. package/dist/form/ChoiceChips.vue.d.ts +21 -0
  112. package/dist/form/ComboField.vue.d.ts +42 -0
  113. package/dist/form/CommandDialog.vue.d.ts +51 -0
  114. package/dist/form/DateField.vue.d.ts +50 -0
  115. package/dist/form/DateTimeField.vue.d.ts +51 -0
  116. package/dist/form/EditorChrome.vue.d.ts +6 -0
  117. package/dist/form/EditorPage.vue.d.ts +60 -0
  118. package/dist/form/Field.vue.d.ts +67 -0
  119. package/dist/form/FileField.vue.d.ts +43 -0
  120. package/dist/form/FormErrors.vue.d.ts +24 -0
  121. package/dist/form/FormGroup.vue.d.ts +60 -0
  122. package/dist/form/FormGroupButton.vue.d.ts +18 -0
  123. package/dist/form/FormIndent.vue.d.ts +11 -0
  124. package/dist/form/FormRow.vue.d.ts +66 -0
  125. package/dist/form/FormView.vue.d.ts +37 -0
  126. package/dist/form/GroupEditAction.vue.d.ts +27 -0
  127. package/dist/form/GroupSheet.vue.d.ts +43 -0
  128. package/dist/form/I18nField.vue.d.ts +51 -0
  129. package/dist/form/LeaveGuardRoot.vue.d.ts +2 -0
  130. package/dist/form/MoneyField.vue.d.ts +38 -0
  131. package/dist/form/MonthYearField.vue.d.ts +38 -0
  132. package/dist/form/MultiSelectField.vue.d.ts +23 -0
  133. package/dist/form/NumberCell.vue.d.ts +34 -0
  134. package/dist/form/NumberField.vue.d.ts +49 -0
  135. package/dist/form/OptionList.vue.d.ts +27 -0
  136. package/dist/form/OtpInput.vue.d.ts +42 -0
  137. package/dist/form/PhotoField.vue.d.ts +33 -0
  138. package/dist/form/RecordGroupScope.vue.d.ts +22 -0
  139. package/dist/form/SegmentedField.vue.d.ts +24 -0
  140. package/dist/form/SelectField.vue.d.ts +25 -0
  141. package/dist/form/StepForm.vue.d.ts +20 -0
  142. package/dist/form/StepNavigation.vue.d.ts +18 -0
  143. package/dist/form/StepProgress.vue.d.ts +17 -0
  144. package/dist/form/SuggestionList.vue.d.ts +33 -0
  145. package/dist/form/SwitchField.vue.d.ts +42 -0
  146. package/dist/form/TextField.vue.d.ts +86 -0
  147. package/dist/form/TextareaField.vue.d.ts +42 -0
  148. package/dist/form/TimeField.vue.d.ts +40 -0
  149. package/dist/form/control.d.ts +9 -0
  150. package/dist/form/date/Calendar.vue.d.ts +41 -0
  151. package/dist/form/date/DatePickerSheet.vue.d.ts +44 -0
  152. package/dist/form/date/MonthYearPanel.vue.d.ts +35 -0
  153. package/dist/form/date/QuickChips.vue.d.ts +18 -0
  154. package/dist/form/date/TimeColumns.vue.d.ts +22 -0
  155. package/dist/form/date/ValueColumn.vue.d.ts +22 -0
  156. package/dist/form/date/days.d.ts +77 -0
  157. package/dist/form/date/parse.d.ts +36 -0
  158. package/dist/form/date/quickPicks.d.ts +29 -0
  159. package/dist/form/date/time.d.ts +32 -0
  160. package/dist/form/date/useDateText.d.ts +13 -0
  161. package/dist/form/date/useShortcuts.d.ts +7 -0
  162. package/dist/form/date/useTimeText.d.ts +12 -0
  163. package/dist/form/date/useTypedEntry.d.ts +27 -0
  164. package/dist/form/dirty.d.ts +29 -0
  165. package/dist/form/errors.d.ts +22 -0
  166. package/dist/form/field.d.ts +70 -0
  167. package/dist/form/file.d.ts +15 -0
  168. package/dist/form/focus.d.ts +14 -0
  169. package/dist/form/i18nText.d.ts +4 -0
  170. package/dist/form/index.d.ts +72 -0
  171. package/dist/form/index.js +4612 -0
  172. package/dist/form/leaveGuard.d.ts +53 -0
  173. package/dist/form/number.d.ts +20 -0
  174. package/dist/form/options.d.ts +20 -0
  175. package/dist/form/recordGroups.d.ts +43 -0
  176. package/dist/form/sectionStates.d.ts +15 -0
  177. package/dist/form/snapshot.d.ts +4 -0
  178. package/dist/form/stepDraft.d.ts +25 -0
  179. package/dist/form/steps.d.ts +133 -0
  180. package/dist/form/suggestions.d.ts +75 -0
  181. package/dist/form/useCommand.d.ts +37 -0
  182. package/dist/form/useForm.d.ts +140 -0
  183. package/dist/form/useGroupSheet.d.ts +90 -0
  184. package/dist/form/useResourceForm.d.ts +48 -0
  185. package/dist/form/useSaveChrome.d.ts +26 -0
  186. package/dist/form/validation.d.ts +28 -0
  187. package/dist/format/format.d.ts +52 -0
  188. package/dist/format/index.d.ts +2 -0
  189. package/dist/format/index.js +9 -0
  190. package/dist/format-B8mJm946.js +77 -0
  191. package/dist/i18n/index.d.ts +82 -0
  192. package/dist/i18n/index.js +81 -0
  193. package/dist/i18n/messages.d.ts +30 -0
  194. package/dist/i18n/runtime.d.ts +43 -0
  195. package/dist/icon/Icon.vue.d.ts +44 -0
  196. package/dist/icon/core.d.ts +38 -0
  197. package/dist/icon/environment.d.ts +16 -0
  198. package/dist/icon/index.d.ts +28 -0
  199. package/dist/icon/index.js +6 -0
  200. package/dist/icon/parse.d.ts +8 -0
  201. package/dist/index.d.ts +2 -0
  202. package/dist/index.js +4 -0
  203. package/dist/internal/focusable.d.ts +5 -0
  204. package/dist/internal/mediaQuery.d.ts +10 -0
  205. package/dist/internal/perDocument.d.ts +6 -0
  206. package/dist/mediaQuery-CygcXmFW.js +20 -0
  207. package/dist/modal/DiscardChangesModal.vue.d.ts +13 -0
  208. package/dist/modal/Modal.vue.d.ts +111 -0
  209. package/dist/modal/Sheet.vue.d.ts +51 -0
  210. package/dist/modal/index.d.ts +3 -0
  211. package/dist/modal/index.js +8 -0
  212. package/dist/modal/sheetStack.d.ts +12 -0
  213. package/dist/navigation-B33ikiCS.js +52 -0
  214. package/dist/options-CjSz2dQK.js +330 -0
  215. package/dist/overlay/AlertDialog.vue.d.ts +35 -0
  216. package/dist/overlay/Menu.vue.d.ts +63 -0
  217. package/dist/overlay/PhotoViewer.vue.d.ts +61 -0
  218. package/dist/overlay/Popover.vue.d.ts +73 -0
  219. package/dist/overlay/Toaster.vue.d.ts +13 -0
  220. package/dist/overlay/Tooltip.vue.d.ts +37 -0
  221. package/dist/overlay/anchored.d.ts +31 -0
  222. package/dist/overlay/dialogStack.d.ts +27 -0
  223. package/dist/overlay/index.d.ts +10 -0
  224. package/dist/overlay/index.js +23 -0
  225. package/dist/overlay/photoGeometry.d.ts +48 -0
  226. package/dist/overlay/toast.d.ts +33 -0
  227. package/dist/overlay/useDialog.d.ts +36 -0
  228. package/dist/overlay/useSheetDrag.d.ts +41 -0
  229. package/dist/page/AdaptivePageShell.vue.d.ts +73 -0
  230. package/dist/page/BottomDock.vue.d.ts +2 -0
  231. package/dist/page/BottomDockPortal.vue.d.ts +18 -0
  232. package/dist/page/BottomTabBar.vue.d.ts +24 -0
  233. package/dist/page/PageActions.vue.d.ts +13 -0
  234. package/dist/page/PageToolbar.vue.d.ts +29 -0
  235. package/dist/page/RecordHeader.vue.d.ts +36 -0
  236. package/dist/page/ResourceHeader.vue.d.ts +43 -0
  237. package/dist/page/SectionJumper.vue.d.ts +14 -0
  238. package/dist/page/SectionList.vue.d.ts +30 -0
  239. package/dist/page/SectionNavigator.vue.d.ts +66 -0
  240. package/dist/page/SectionPanel.vue.d.ts +45 -0
  241. package/dist/page/bottomDock.d.ts +9 -0
  242. package/dist/page/chrome.d.ts +95 -0
  243. package/dist/page/index.d.ts +19 -0
  244. package/dist/page/index.js +519 -0
  245. package/dist/page/sectionBack.d.ts +7 -0
  246. package/dist/page/sectionIndex.d.ts +48 -0
  247. package/dist/page/types.d.ts +79 -0
  248. package/dist/page/useLargeTitle.d.ts +7 -0
  249. package/dist/page/usePageFocus.d.ts +10 -0
  250. package/dist/perDocument-DUuFrdGU.js +8 -0
  251. package/dist/phone/CountryFlag.vue.d.ts +10 -0
  252. package/dist/phone/CountryPicker.vue.d.ts +25 -0
  253. package/dist/phone/PhoneField.vue.d.ts +62 -0
  254. package/dist/phone/environment.d.ts +10 -0
  255. package/dist/phone/flagLoaders.d.ts +3 -0
  256. package/dist/phone/index.d.ts +5 -0
  257. package/dist/phone/index.js +732 -0
  258. package/dist/phone/phone.d.ts +47 -0
  259. package/dist/platform/access.d.ts +64 -0
  260. package/dist/platform/bootstrap.d.ts +60 -0
  261. package/dist/platform/context.d.ts +20 -0
  262. package/dist/platform/httpSession.d.ts +21 -0
  263. package/dist/platform/index.d.ts +26 -0
  264. package/dist/platform/index.js +108 -0
  265. package/dist/platform/navigation.d.ts +17 -0
  266. package/dist/platform/platform.d.ts +59 -0
  267. package/dist/platform/session.d.ts +87 -0
  268. package/dist/platform-jqlKVJ2e.js +244 -0
  269. package/dist/resource/RecordPager.vue.d.ts +13 -0
  270. package/dist/resource/ResourcePage.vue.d.ts +37 -0
  271. package/dist/resource/index.d.ts +7 -0
  272. package/dist/resource/index.js +250 -0
  273. package/dist/resource/listContext.d.ts +25 -0
  274. package/dist/resource/resource.d.ts +69 -0
  275. package/dist/resource/routeResource.d.ts +55 -0
  276. package/dist/router/NoAccess.vue.d.ts +2 -0
  277. package/dist/router/access.d.ts +33 -0
  278. package/dist/router/defineRoutes.d.ts +64 -0
  279. package/dist/router/guards.d.ts +49 -0
  280. package/dist/router/history.d.ts +17 -0
  281. package/dist/router/index.d.ts +27 -0
  282. package/dist/router/index.js +39 -0
  283. package/dist/router/meta.d.ts +43 -0
  284. package/dist/router/navigation.d.ts +67 -0
  285. package/dist/router/sections.d.ts +53 -0
  286. package/dist/sections-LtxV5Mtk.js +53 -0
  287. package/dist/shell/AccountMenu.vue.d.ts +14 -0
  288. package/dist/shell/AccountMenuContent.vue.d.ts +14 -0
  289. package/dist/shell/AccountMenuItem.vue.d.ts +36 -0
  290. package/dist/shell/AccountSheet.vue.d.ts +16 -0
  291. package/dist/shell/BackofficeShell.vue.d.ts +46 -0
  292. package/dist/shell/HeaderAction.vue.d.ts +26 -0
  293. package/dist/shell/NavigationDrawer.vue.d.ts +36 -0
  294. package/dist/shell/NavigationList.vue.d.ts +29 -0
  295. package/dist/shell/NavigationMenuButton.vue.d.ts +2 -0
  296. package/dist/shell/ShellBrand.vue.d.ts +37 -0
  297. package/dist/shell/ShellSidebar.vue.d.ts +31 -0
  298. package/dist/shell/ShellStage.vue.d.ts +44 -0
  299. package/dist/shell/ShellTopBar.vue.d.ts +37 -0
  300. package/dist/shell/accountMenu.d.ts +10 -0
  301. package/dist/shell/appUpdates.d.ts +21 -0
  302. package/dist/shell/backofficeShell.d.ts +26 -0
  303. package/dist/shell/drawer.d.ts +19 -0
  304. package/dist/shell/drawerDrag.d.ts +43 -0
  305. package/dist/shell/icons.d.ts +7 -0
  306. package/dist/shell/identity.d.ts +22 -0
  307. package/dist/shell/index.d.ts +25 -0
  308. package/dist/shell/index.js +1163 -0
  309. package/dist/shell/links.d.ts +2 -0
  310. package/dist/shell/navigationGroups.d.ts +25 -0
  311. package/dist/shell/progress.d.ts +9 -0
  312. package/dist/shell/viewTransitions.d.ts +21 -0
  313. package/dist/state/AsyncSection.vue.d.ts +34 -0
  314. package/dist/state/Badge.vue.d.ts +30 -0
  315. package/dist/state/Banner.vue.d.ts +32 -0
  316. package/dist/state/DrawnCheck.vue.d.ts +13 -0
  317. package/dist/state/EmptyState.vue.d.ts +33 -0
  318. package/dist/state/FieldNote.vue.d.ts +25 -0
  319. package/dist/state/ProgressTrack.vue.d.ts +20 -0
  320. package/dist/state/Skeleton.vue.d.ts +2 -0
  321. package/dist/state/StatusLine.vue.d.ts +27 -0
  322. package/dist/state/async.d.ts +31 -0
  323. package/dist/state/index.d.ts +12 -0
  324. package/dist/state/index.js +100 -0
  325. package/dist/state/tone.d.ts +6 -0
  326. package/dist/state/useWaitStatus.d.ts +20 -0
  327. package/dist/styles.css +1 -0
  328. package/dist/toast-BTeX0r66.js +129 -0
  329. package/dist/useDialog-wmyNx2j_.js +74 -0
  330. package/dist/useWaitStatus-fsacMl4W.js +24 -0
  331. package/package.json +166 -4
  332. package/src/styles/base.css +206 -0
  333. package/src/styles/collection.css +32 -0
  334. package/src/styles/components.css +79 -0
  335. package/src/styles/fonts/Inter-Italic-Variable.woff2 +0 -0
  336. package/src/styles/fonts/Inter-OFL.txt +93 -0
  337. package/src/styles/fonts/Inter-Variable.woff2 +0 -0
  338. package/src/styles/fonts/JetBrainsMono-Medium.woff2 +0 -0
  339. package/src/styles/fonts/JetBrainsMono-Regular.woff2 +0 -0
  340. package/src/styles/fonts.css +35 -0
  341. package/src/styles/index.css +6 -0
  342. package/src/styles/shell.css +54 -0
  343. package/src/styles/tailwind.css +17 -0
  344. package/src/styles/theme.css +558 -0
package/README.md CHANGED
@@ -1,3 +1,302 @@
1
- # Temporary Holding Version
1
+ # @wssto2/vue-core
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ The shared Vue 3 frontend library for go-core applications: the **app shell** (sidebar, top bar, phone drawer, account menu), **list**, **record** and **form** pages, and the controls they are made of. You write features (a typed list, a record, its routes and texts); the library writes the parts every screen repeats: loading, empty and error states, back-to-list, previous / next, section navigation, focus, keyboard, dark mode, reduced motion.
4
+
5
+ It is the extraction of the ARV frontend (design: "Emerald Native"). It has no business knowledge: permissions, menu destinations, icons and the user are **yours**, declared to the type system once.
6
+
7
+ Its plan and rules are in [PLAN.md](PLAN.md).
8
+
9
+ ## What you get
10
+
11
+ | Import | For |
12
+ |---|---|
13
+ | `@wssto2/vue-core/platform` | `readBootstrap`, `createPlatform` (HTTP client, session, access), typed contexts |
14
+ | `@wssto2/vue-core/app` | `createApplication`, `defineFeature`, shell outlets, effects |
15
+ | `@wssto2/vue-core/shell` | `backofficeShell`, the shell's parts for a custom one |
16
+ | `@wssto2/vue-core/router` | `defineRoutes` (typed targets), guards, navigation |
17
+ | `@wssto2/vue-core/collection` | `defineCollection`, `useCollection`, `CollectionPage`, record neighbors |
18
+ | `@wssto2/vue-core/resource`, `/page` | `useRouteResource`, `ResourcePage`, `SectionNavigator`, `AdaptivePageShell` |
19
+ | `@wssto2/vue-core/button`, `/controls`, `/content`, `/state`, `/overlay`, `/modal`, `/icon` | the primitives |
20
+ | `@wssto2/vue-core/i18n`, `/format`, `/client` | messages, formatting, `HttpClient` and `ApiError` |
21
+
22
+ Nothing is reachable by a deep import. The peers are `vue`, `vue-router` and `vue-i18n`; the library never bundles them.
23
+
24
+ ## Install
25
+
26
+ ```bash
27
+ npm install @wssto2/vue-core vue vue-router vue-i18n
28
+ npm install -D vite @vitejs/plugin-vue tailwindcss @tailwindcss/vite typescript vue-tsc
29
+ ```
30
+
31
+ To try a change to the library in an app before it is released, build it and install the packed file: `npm run build && npm pack` here, then `npm install ../vue-core/wssto2-vue-core-<version>.tgz` in the app.
32
+
33
+ <!-- example: docs/examples/vite.config.ts -->
34
+ ```ts
35
+ import tailwindcss from "@tailwindcss/vite";
36
+ import vue from "@vitejs/plugin-vue";
37
+ import { defineConfig } from "vite";
38
+
39
+ // Vue's compiler and Tailwind v4's Vite plugin: the library ships no build setup of its own.
40
+ export default defineConfig({
41
+ plugins: [vue(), tailwindcss()],
42
+ });
43
+ ```
44
+
45
+ The page that hosts the app carries the server's public config, which the library reads once at startup:
46
+
47
+ ```html
48
+ <body class="bg-surface-page text-content">
49
+ <div id="app"></div>
50
+ <script id="app-state" type="application/json">{ "locale": "en", "app_name": "Acme", "api_base": "/api/v1" }</script>
51
+ <script type="module" src="/src/main.ts"></script>
52
+ </body>
53
+ ```
54
+
55
+ ## The composition root
56
+
57
+ One file knows every part of the application. `readBootstrap` validates the page's config, `createPlatform` builds the services everything shares (nothing runs yet), `createApplication` validates the whole composition (duplicate feature ids, route names, contexts, message namespaces, destinations, a missing login route) and throws one error listing every problem, then `mount` starts it.
58
+
59
+ <!-- example: docs/examples/app/main.ts -->
60
+ ```ts
61
+ // The composition root: the one place that knows every part of the application.
62
+ import { createApplication } from "@wssto2/vue-core/app";
63
+ import { createPlatform, readBootstrap } from "@wssto2/vue-core/platform";
64
+ import { backofficeShell } from "@wssto2/vue-core/shell";
65
+ import { createAccountsFeature } from "../accounts/feature";
66
+ import { createTicketsFeature } from "../tickets/feature";
67
+ import { appIcons } from "./declarations";
68
+ import { sessionFeature } from "./session/feature";
69
+ import "./styles.css";
70
+
71
+ // 1. What the server embedded in the page (<script id="app-state" type="application/json">), validated once.
72
+ const config = readBootstrap();
73
+
74
+ // 2. The services every part shares: HTTP client, session, access. Nothing runs yet.
75
+ const platform = createPlatform({ config });
76
+
77
+ // 3. The application: an explicit list of features, and the shell around them.
78
+ const application = createApplication({
79
+ platform,
80
+ shell: backofficeShell(),
81
+ icons: appIcons,
82
+ features: [sessionFeature, createTicketsFeature(platform.http), createAccountsFeature(platform.http)],
83
+ });
84
+
85
+ void application.mount("#app");
86
+ ```
87
+
88
+ Everything else an application sets (locales, persisting the locale, renewing a session, sign-out cleanup, error reporting) is in [app-setup](docs/recipes/app-setup.md). A second shell is in [shell](docs/recipes/shell.md).
89
+
90
+ ## A feature
91
+
92
+ A feature is one value made by `defineFeature`: its routes, typed context, texts, navigation and whatever it contributes to the shell. Declaring it runs nothing; the application installs it.
93
+
94
+ <!-- example: docs/examples/tickets/feature.ts -->
95
+ ```ts
96
+ import { defineFeature, provideContext } from "@wssto2/vue-core/app";
97
+ import type { HttpClient } from "@wssto2/vue-core/client";
98
+ import { localeMessages } from "@wssto2/vue-core/i18n";
99
+ import { createTicketsApi } from "./api";
100
+ import { createTicketList } from "./collection";
101
+ import { TICKETS } from "./context";
102
+ import { ticketRoutes } from "./routes";
103
+
104
+ // A feature is one value: what the application installs for it. Its collaborators are ordinary
105
+ // arguments, visible in the composition root.
106
+ export function createTicketsFeature(http: HttpClient) {
107
+ const api = createTicketsApi(http);
108
+ return defineFeature({
109
+ id: "tickets",
110
+ routes: ticketRoutes.records,
111
+ context: provideContext(TICKETS, { api, list: createTicketList(api) }),
112
+ // Loaded the first time a route of this feature is entered, in the active locale.
113
+ messages: localeMessages("tickets", { en: () => import("./i18n/en.json"), hr: () => import("./i18n/hr.json") }),
114
+ // The backend's menu names destinations; this says which route opens "tickets" and which records keep it highlighted.
115
+ navigation: [{ destination: "tickets", to: ticketRoutes.index, within: ["tickets.record"] }],
116
+ });
117
+ }
118
+ ```
119
+
120
+ Its routes are declared once and used as typed targets. A route with parameters is a function of them; a missing or wrong one does not compile:
121
+
122
+ <!-- example: docs/examples/tickets/routes.ts -->
123
+ ```ts
124
+ import { defineRoutes } from "@wssto2/vue-core/router";
125
+
126
+ export const ticketRoutes = defineRoutes({
127
+ index: {
128
+ name: "tickets.index",
129
+ path: "/tickets",
130
+ component: () => import("./views/Index.vue"),
131
+ meta: { access: "tickets:view", titleKey: "tickets.title" },
132
+ },
133
+ record: {
134
+ name: "tickets.record",
135
+ path: "/tickets/:ticketID",
136
+ component: () => import("./views/Record.vue"),
137
+ meta: { access: "tickets:view", titleKey: "tickets.title", remountOnParam: "ticketID" },
138
+ },
139
+ });
140
+
141
+ // ticketRoutes.index a route without parameters is a value
142
+ // ticketRoutes.record({ ticketID: 12 }) one with parameters is a function; a wrong or missing one does not compile
143
+ ```
144
+
145
+ What its views need (the API, the list definition) comes through a typed context, not a global. `useTickets()` throws a message naming the missing feature if it is not installed:
146
+
147
+ <!-- example: docs/examples/tickets/context.ts -->
148
+ ```ts
149
+ import { defineFeatureContext } from "@wssto2/vue-core/platform";
150
+ import type { TicketsApi } from "./api";
151
+ import type { createTicketList } from "./collection";
152
+
153
+ export interface TicketsDependencies {
154
+ readonly api: TicketsApi;
155
+ readonly list: ReturnType<typeof createTicketList>;
156
+ }
157
+
158
+ // A typed key: `useTickets()` fails with a clear message when the feature is not installed.
159
+ export const [TICKETS, useTickets] = defineFeatureContext<TicketsDependencies>("tickets");
160
+ ```
161
+
162
+ Its texts are JSON files under the feature, loaded the first time one of its routes is entered, in the active locale:
163
+
164
+ <!-- example: docs/examples/tickets/i18n/en.json -->
165
+ ```json
166
+ {
167
+ "title": "Tickets",
168
+ "description": "Everything customers asked for",
169
+ "create": "New ticket",
170
+ "subject": "Subject",
171
+ "status": "Status",
172
+ "assignee": "Assignee",
173
+ "created": "Created",
174
+ "open": "Open",
175
+ "closed": "Closed",
176
+ "record": "Ticket",
177
+ "details": "Details"
178
+ }
179
+ ```
180
+
181
+ The views are [a list page](docs/recipes/list-page.md) and [a record page](docs/recipes/record-page.md).
182
+
183
+ ## Permissions, destinations and icons
184
+
185
+ The library knows none of your permissions, none of your backend's menu destinations and none of your icons. You declare them by merging into three interfaces, like vue-router's `RouteMeta`; after that a typo in `meta.access`, in a navigation binding or in `<Icon name>` is a compile error:
186
+
187
+ <!-- example: docs/examples/app/declarations.ts -->
188
+ ```ts
189
+ // What the application tells the types about itself: its permissions, the destinations of its
190
+ // backend's menu and its icons. Declaration merging, like vue-router's `RouteMeta`: a permission,
191
+ // destination or icon that is not declared here is a compile error where it is used.
192
+ import type { IconSet } from "@wssto2/vue-core/icon";
193
+
194
+ declare module "@wssto2/vue-core/platform" {
195
+ interface PermissionRegistry {
196
+ "tickets:view": true;
197
+ "tickets:update": true;
198
+ "accounts:view": true;
199
+ }
200
+ }
201
+
202
+ declare module "@wssto2/vue-core/router" {
203
+ interface DestinationRegistry {
204
+ tickets: true;
205
+ accounts: true;
206
+ }
207
+ }
208
+
209
+ declare module "@wssto2/vue-core/icon" {
210
+ interface IconRegistry {
211
+ ticketLine: true;
212
+ }
213
+ }
214
+
215
+ /** The SVG sources of the declared icons (here Remix Icon's "coupon"); a feature may bring its own set. */
216
+ export const appIcons = {
217
+ ticketLine:
218
+ '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M21 3C21.5523 3 22 3.44772 22 4V9.5C20.6193 9.5 19.5 10.6193 19.5 12C19.5 13.3807 20.6193 14.5 22 14.5V20C22 20.5523 21.5523 21 21 21H3C2.44772 21 2 20.5523 2 20V14.5C3.38071 14.5 4.5 13.3807 4.5 12C4.5 10.6193 3.38071 9.5 2 9.5V4C2 3.44772 2.44772 3 3 3H21ZM20 5H4V7.8C5.6 8.6 6.5 10.2 6.5 12C6.5 13.8 5.6 15.4 4 16.2V19H20V16.2C18.4 15.4 17.5 13.8 17.5 12C17.5 10.2 18.4 8.6 20 7.8V5Z"></path></svg>',
219
+ } satisfies IconSet;
220
+ ```
221
+
222
+ `access: "tickets:view"` on a route hides the page from anyone without it (a denied address shows a no-access page, live on permission refresh); `access.can("tickets:update")` decides what a component offers. A route's `meta.access` also accepts `{ any: [...] }` and `{ all: [...] }`. The navigation the server sends names destinations (`tickets`); a feature's `navigation` binds each to a route.
223
+
224
+ Icons are SVG sources keyed by name. `icons` takes one set or several partial ones (a feature may bring its own; a name in two sets is an error). The library's own icons (`close`, `search`, `arrowLeftSLine`...) need no registration.
225
+
226
+ ## Styles
227
+
228
+ The library is styled with Tailwind v4 through semantic tokens (`bg-surface-page`, `text-content-muted`, `rounded-group`...). Your app runs its own Tailwind and imports the library's tokens, variants and fonts after it; the library's own utilities are generated from its built package (`tailwind.css` does the `@source`), so there is one CSS build:
229
+
230
+ <!-- example: docs/examples/app/styles.css -->
231
+ ```css
232
+ @import "tailwindcss";
233
+ @import "@wssto2/vue-core/tailwind.css";
234
+ @import "@wssto2/vue-core/fonts.css";
235
+ @import "./brand.css";
236
+ ```
237
+
238
+ The brand accent is a handful of variables you redefine after the import (light on `:root`, dark on `.dark`):
239
+
240
+ <!-- example: docs/examples/app/brand.css -->
241
+ ```css
242
+ /* The brand accent: the palettes and the "Accent" variables of the library's theme.css, redefined
243
+ after it (light on :root, dark on .dark). Status colours never follow the brand. */
244
+ :root {
245
+ --color-primary-50: #EFF6FF;
246
+ --color-primary-100: #DBEAFE;
247
+ --color-primary-200: #BFDBFE;
248
+ --color-primary-300: #93C5FD;
249
+ --color-primary-400: #60A5FA;
250
+ --color-primary-500: #3B82F6;
251
+ --color-primary-600: #2563EB;
252
+ --color-primary-700: #1D4ED8;
253
+ --color-primary-800: #1E40AF;
254
+ --color-primary-900: #1E3A8A;
255
+ --color-primary-950: #172554;
256
+ --color-anchor-800: #1B2A4A;
257
+ --color-anchor-900: #111C33;
258
+ --color-anchor-950: #0A1222;
259
+
260
+ --app-tint: #1D4ED8;
261
+ --app-tint-soft: #E8EFFD;
262
+ --app-control-on: #2563EB;
263
+ --app-tile-brand: #2563EB;
264
+ --app-tile-anchor: #1B2A4A;
265
+ --app-tile-anchor-foreground: #93C5FD;
266
+ --app-content-inverse-accent: #93C5FD;
267
+ }
268
+
269
+ .dark {
270
+ --app-tint: #60A5FA;
271
+ --app-tint-soft: #1B2A4A;
272
+ --app-control-on: #3B82F6;
273
+ --app-content-on-tint: #0A1222;
274
+ --app-tile-anchor: #22335C;
275
+ --app-content-inverse-accent: #1D4ED8;
276
+ }
277
+ ```
278
+
279
+ Dark mode is the `dark` class on `<html>`; nothing is decided for you. An app that does not write Tailwind utilities imports the prebuilt `@wssto2/vue-core/styles.css` instead. More in [theming](docs/recipes/theming.md).
280
+
281
+ ## Texts and locales
282
+
283
+ The library's own texts are under the `core` namespace in English, Croatian, Bosnian and Slovenian (`t("core.actions.cancel")`). `createApplication` merges them into its vue-i18n instance; override any key with `i18n.messages` and restrict the offered locales with `locale.supported`. A feature's texts are a namespace (`localeMessages("tickets", { en: () => import("./i18n/en.json") })`, used as `t("tickets.title")`) loaded per locale on demand. A locale switch (the account menu has one) loads every namespace in use first, so nothing shows a raw key; `locale.onChange` lets you save the choice on the user.
284
+
285
+ ## Recipes
286
+
287
+ - [List page](docs/recipes/list-page.md): a typed collection, columns, filters, row actions, URL state
288
+ - [Record page](docs/recipes/record-page.md): a simple record, a record with sections, regions that load on their own, previous / next
289
+ - [Shell](docs/recipes/shell.md): the default shell, contributions from features, a custom shell
290
+ - [App setup](docs/recipes/app-setup.md): config, session, effects, locales, errors
291
+ - [Forms](docs/recipes/forms.md): form state, fields, a record edited in group sheets, a long form, commands
292
+ - [Theming](docs/recipes/theming.md): brand accent, dark mode, tokens
293
+
294
+ Forms have their own recipe when that phase lands.
295
+
296
+ ## Working on the library
297
+
298
+ ```bash
299
+ npm run check # lint, typecheck (src and the documented examples), docs = examples, tests, build, packed-consumer check
300
+ ```
301
+
302
+ The code in this README and in the recipes is copied from [docs/examples](docs/examples), which `npm run typecheck:docs` compiles against the library's sources and `npm run check:docs` compares with the documents. Change an example, then paste it again.