@wssto2/vue-core 0.16.0 → 0.17.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 (146) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +4 -3
  3. package/bin/architecture/engine.mjs +3 -0
  4. package/bin/architecture/permissions.mjs +56 -0
  5. package/bin/architecture/rules.mjs +17 -0
  6. package/bin/commands/check-architecture.mjs +19 -0
  7. package/bin/config.mjs +2 -0
  8. package/dist/{AccessGate.vue_vue_type_script_setup_true_lang-BH3f0hda.js → AccessGate.vue_vue_type_script_setup_true_lang-Bg8JFAOT.js} +1 -1
  9. package/dist/{ActionRow.vue_vue_type_script_setup_true_lang-DybAIOHS.js → ActionRow.vue_vue_type_script_setup_true_lang-B5IMNnTf.js} +4 -4
  10. package/dist/{Activity-DOUuIkZR.js → Activity-CiYn5E6A.js} +7 -7
  11. package/dist/{AdaptivePageShell.vue_vue_type_script_setup_true_lang-d_dPurWG.js → AdaptivePageShell.vue_vue_type_script_setup_true_lang-oXWQTfBs.js} +1 -1
  12. package/dist/{Changes-BfcbVgmu.js → Changes-Cy8STpLX.js} +3 -3
  13. package/dist/{CollectionPage.vue_vue_type_script_setup_true_lang-B5hSkJ2N.js → CollectionPage.vue_vue_type_script_setup_true_lang-Dr6nFNBB.js} +6 -6
  14. package/dist/{DataTable.vue_vue_type_script_setup_true_lang-DbRS37n3.js → DataTable.vue_vue_type_script_setup_true_lang-D372wlxR.js} +1 -1
  15. package/dist/{DateField.vue_vue_type_script_setup_true_lang-DzCvYHAf.js → DateField.vue_vue_type_script_setup_true_lang-D0KcfW8R.js} +17 -16
  16. package/dist/{DeadLetters-CuMvfXH8.js → DeadLetters-DhJkMpd_.js} +4 -4
  17. package/dist/{FormGroup.vue_vue_type_script_setup_true_lang-dsO1m9Mm.js → FormGroup.vue_vue_type_script_setup_true_lang-lvAuBG-0.js} +2 -2
  18. package/dist/FormRow.vue_vue_type_script_setup_true_lang-CpgNVQF4.js +160 -0
  19. package/dist/{FormView.vue_vue_type_script_setup_true_lang-Bq_Qa4py.js → FormView.vue_vue_type_script_setup_true_lang-D01Jr4UU.js} +5 -5
  20. package/dist/{General-B5vcSEhP.js → General-CwTPC5UP.js} +10 -10
  21. package/dist/{IncidentRecord-wmStcEag.js → IncidentRecord-hXEGuLGg.js} +13 -13
  22. package/dist/{IncidentsList-CFx5tsxP.js → IncidentsList-C41VyDwK.js} +6 -6
  23. package/dist/{NewRolePage-CZxAp7LR.js → NewRolePage-BYYZJkK7.js} +3 -3
  24. package/dist/{NumberField.vue_vue_type_script_setup_true_lang-U-_kcnGr.js → NumberField.vue_vue_type_script_setup_true_lang-BhNZgEW6.js} +7 -6
  25. package/dist/{PersonAccess.vue_vue_type_script_setup_true_lang-BPDh9s2m.js → PersonAccess.vue_vue_type_script_setup_true_lang-mYFuG-Y3.js} +56 -56
  26. package/dist/{ProfilePage-B-T8kBcc.js → ProfilePage-DGEsIycR.js} +13 -13
  27. package/dist/{RecordHeader.vue_vue_type_script_setup_true_lang-Bt5mT19g.js → RecordHeader.vue_vue_type_script_setup_true_lang-B3BnYg1x.js} +1 -1
  28. package/dist/{ResourcePage.vue_vue_type_script_setup_true_lang-DOiFuJnH.js → ResourcePage.vue_vue_type_script_setup_true_lang-1iZtj3rh.js} +1 -1
  29. package/dist/{RoleEditor.vue_vue_type_script_setup_true_lang-CqSsNPCw.js → RoleEditor.vue_vue_type_script_setup_true_lang-BslSDDiM.js} +9 -9
  30. package/dist/{RolePage-zcUWpuDE.js → RolePage-C08ZUqw1.js} +9 -9
  31. package/dist/{RolesPage-C7_zWw-c.js → RolesPage-FOuY1VKg.js} +10 -10
  32. package/dist/{SectionNavigator.vue_vue_type_script_setup_true_lang-BlCx9dVL.js → SectionNavigator.vue_vue_type_script_setup_true_lang-DCTFxfPB.js} +2 -2
  33. package/dist/{SegmentedField.vue_vue_type_script_setup_true_lang-zv_AxpBn.js → SegmentedField.vue_vue_type_script_setup_true_lang-CLR6EvzO.js} +13 -12
  34. package/dist/{SelectField.vue_vue_type_script_setup_true_lang-CLkoPbGm.js → SelectField.vue_vue_type_script_setup_true_lang-D5xYofdb.js} +10 -9
  35. package/dist/{ServiceAccountDialog.vue_vue_type_script_setup_true_lang-C2D_D5Hi.js → ServiceAccountDialog.vue_vue_type_script_setup_true_lang-CDr4WNIb.js} +9 -9
  36. package/dist/{ServiceAccountRecord-BYxpHzTR.js → ServiceAccountRecord-kWwIQGZb.js} +12 -12
  37. package/dist/{ServiceAccountsList-BUuK-RUj.js → ServiceAccountsList-CKy9_YHP.js} +8 -8
  38. package/dist/{Sessions-Cm-Kilwl.js → Sessions-BDc8gdYH.js} +4 -4
  39. package/dist/{SettingsPage-Bavl0K-F.js → SettingsPage-t-8kmFVT.js} +13 -13
  40. package/dist/{SignIn-SfEhFiyM.js → SignIn-CqtkvtCZ.js} +7 -7
  41. package/dist/{SignInPage-BU0n2ehq.js → SignInPage-DcdNKZIb.js} +4 -4
  42. package/dist/{SignIns-Ahbn5cO6.js → SignIns-D4-nGu0B.js} +3 -3
  43. package/dist/{SwitchField.vue_vue_type_script_setup_true_lang-Ds4q0bbl.js → SwitchField.vue_vue_type_script_setup_true_lang-CLtcuofe.js} +15 -14
  44. package/dist/{TextField.vue_vue_type_script_setup_true_lang-CWIeeZRE.js → TextField.vue_vue_type_script_setup_true_lang-CVGh-p3J.js} +7 -6
  45. package/dist/{TextareaField.vue_vue_type_script_setup_true_lang-D2j4s96s.js → TextareaField.vue_vue_type_script_setup_true_lang-YxUlNHSk.js} +6 -5
  46. package/dist/{TimeField.vue_vue_type_script_setup_true_lang-C1mLvOkc.js → TimeField.vue_vue_type_script_setup_true_lang-DHNC_MLt.js} +30 -29
  47. package/dist/{Timestamp.vue_vue_type_script_setup_true_lang-jCXYFLtq.js → Timestamp.vue_vue_type_script_setup_true_lang-d_KuxWjH.js} +1 -1
  48. package/dist/{UserRecord-3pCKMHkq.js → UserRecord-CwZCr9Im.js} +10 -10
  49. package/dist/{UsersList-vw3aDpvo.js → UsersList-Cn19sFgv.js} +4 -4
  50. package/dist/access/index.js +4 -4
  51. package/dist/app/application.d.ts +2 -0
  52. package/dist/app/index.js +2 -2
  53. package/dist/app/validate.d.ts +3 -1
  54. package/dist/{application-CHPpOssP.js → application-CDSweJb9.js} +144 -142
  55. package/dist/collection/authors.d.ts +27 -0
  56. package/dist/collection/index.d.ts +2 -0
  57. package/dist/collection/index.js +81 -76
  58. package/dist/config/index.d.ts +42 -0
  59. package/dist/config/index.js +12 -3
  60. package/dist/content/Panel.vue.d.ts +1 -1
  61. package/dist/content/index.js +2 -2
  62. package/dist/{contributions-9CPT-Z5v.js → contributions-B0x5x5xD.js} +1 -1
  63. package/dist/form/CommandDialog.vue.d.ts +1 -1
  64. package/dist/form/DateField.vue.d.ts +1 -1
  65. package/dist/form/DateTimeField.vue.d.ts +1 -1
  66. package/dist/form/FileField.vue.d.ts +1 -1
  67. package/dist/form/FormRow.vue.d.ts +2 -2
  68. package/dist/form/I18nField.vue.d.ts +2 -2
  69. package/dist/form/TextField.vue.d.ts +1 -1
  70. package/dist/form/TextareaField.vue.d.ts +2 -2
  71. package/dist/form/date/value.d.ts +21 -0
  72. package/dist/form/index.d.ts +1 -0
  73. package/dist/form/index.js +745 -715
  74. package/dist/format/format.d.ts +8 -2
  75. package/dist/format/index.js +1 -1
  76. package/dist/format-C_HXlOYQ.js +136 -0
  77. package/dist/{guards-6fJxfUtk.js → guards-CNJ0ATVC.js} +1 -1
  78. package/dist/i18n/index.d.ts +14 -2
  79. package/dist/i18n/index.js +84 -73
  80. package/dist/i18n/messages.d.ts +10 -1
  81. package/dist/i18n/runtime.d.ts +3 -1
  82. package/dist/identity/index.js +3 -3
  83. package/dist/identity/profile/EmailChangeDialog.vue.d.ts +2 -2
  84. package/dist/identity/users/list.d.ts +1 -1
  85. package/dist/incidents/index.js +1 -1
  86. package/dist/{index-D9_xqF5g.js → index-1HS7O2-e.js} +9 -9
  87. package/dist/{index-nByFc1eL.js → index-BA2w8uwD.js} +86 -86
  88. package/dist/{index-Ct7W_gYE.js → index-SLJWm40T.js} +4 -4
  89. package/dist/index.d.ts +1 -1
  90. package/dist/index.js +1 -1
  91. package/dist/modal/DiscardChangesModal.vue.d.ts +2 -2
  92. package/dist/modal/Modal.vue.d.ts +2 -2
  93. package/dist/modal/Sheet.vue.d.ts +2 -2
  94. package/dist/modules/identity/routes.d.ts +1 -1
  95. package/dist/modules/identity/schemas.d.ts +2 -2
  96. package/dist/{navigation-DMJ6akat.js → navigation-d-JAPBGA.js} +1 -1
  97. package/dist/{neighbors-BpypL3Wb.js → neighbors-Dg_LU9ry.js} +1 -1
  98. package/dist/notifications/index.js +1 -1
  99. package/dist/onboarding/index.js +1 -1
  100. package/dist/options-mOOX6JSS.js +214 -0
  101. package/dist/overlay/AlertDialog.vue.d.ts +3 -3
  102. package/dist/overlay/Menu.vue.d.ts +2 -2
  103. package/dist/overlay/PhotoViewer.vue.d.ts +2 -2
  104. package/dist/overlay/Popover.vue.d.ts +2 -2
  105. package/dist/page/SectionNavigator.vue.d.ts +1 -1
  106. package/dist/page/SectionPanel.vue.d.ts +1 -1
  107. package/dist/page/index.js +3 -3
  108. package/dist/phone/index.js +57 -56
  109. package/dist/platform/index.d.ts +10 -1
  110. package/dist/platform/index.js +16 -15
  111. package/dist/platform/platform.d.ts +4 -2
  112. package/dist/{platform-ORzRR3Tw.js → platform-DU9QFts8.js} +7 -6
  113. package/dist/playwright/config.d.ts +33 -0
  114. package/dist/playwright/index.d.ts +2 -0
  115. package/dist/playwright/index.js +192 -171
  116. package/dist/resource/index.js +1 -1
  117. package/dist/router/index.js +3 -3
  118. package/dist/{rowLayout-QKfNHsML.js → rowLayout-PIuD7MGo.js} +2 -2
  119. package/dist/{sections-CSpJN0Z7.js → sections-BpiRLntE.js} +1 -1
  120. package/dist/{serverMessages-Ce8-MK4e.js → serverMessages-C_KkDvpT.js} +1 -1
  121. package/dist/shell/index.js +4 -4
  122. package/dist/state/NextStepPanel.vue.d.ts +63 -0
  123. package/dist/state/PhaseTiles.vue.d.ts +20 -0
  124. package/dist/state/PhaseTrack.vue.d.ts +48 -0
  125. package/dist/state/RequirementList.vue.d.ts +10 -0
  126. package/dist/state/TodoRow.vue.d.ts +52 -0
  127. package/dist/state/index.d.ts +9 -0
  128. package/dist/state/index.js +731 -126
  129. package/dist/state/phaseStep.d.ts +7 -0
  130. package/dist/state/phaseTile.d.ts +10 -0
  131. package/dist/state/requirementItem.d.ts +16 -0
  132. package/dist/state/todoRow.d.ts +8 -0
  133. package/dist/{state-QDaxntgR.js → state-z1iPF1DT.js} +1 -1
  134. package/dist/styles.css +1 -1
  135. package/dist/{suggestions-q_v3M7G6.js → suggestions-DeMgs_ki.js} +1 -1
  136. package/dist/testing/format.d.ts +1 -1
  137. package/dist/testing/index.js +31 -31
  138. package/dist/{useCommand-DAMgQ5NE.js → useCommand-DQKvro1n.js} +2 -2
  139. package/dist/{useGroupSheet-B-Hs4gNO.js → useGroupSheet-CRw3MUmX.js} +3 -3
  140. package/dist/{usePreferences-BfMXVbSO.js → usePreferences-DB29UTFD.js} +1 -1
  141. package/dist/{useRecordDialog-QPKFH1Ww.js → useRecordDialog-0azHxxvm.js} +1 -1
  142. package/dist/{useResourceForm-Oa6bk3NI.js → useResourceForm-zVuWerSn.js} +1 -1
  143. package/dist/{useTypedEntry-CITij2C_.js → useTypedEntry-BsMV66Yc.js} +46 -45
  144. package/package.json +1 -1
  145. package/dist/format-Cp1h0vsC.js +0 -125
  146. package/dist/options-B48UiYsG.js +0 -368
@@ -1,28 +1,28 @@
1
- var _e = Object.defineProperty;
2
- var Ce = (e, n, o) => n in e ? _e(e, n, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[n] = o;
3
- var ae = (e, n, o) => Ce(e, typeof n != "symbol" ? n + "" : n, o);
4
- import { effectScope as V, watch as G, defineComponent as ye, openBlock as Fe, createElementBlock as Ie, createVNode as ne, unref as _, withCtx as ie, createTextVNode as Te, toDisplayString as Pe, shallowRef as qe, computed as De, h as ce, createApp as We } from "vue";
1
+ var Oe = Object.defineProperty;
2
+ var _e = (e, n, o) => n in e ? Oe(e, n, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[n] = o;
3
+ var ae = (e, n, o) => _e(e, typeof n != "symbol" ? n + "" : n, o);
4
+ import { effectScope as V, watch as G, defineComponent as ye, openBlock as Ce, createElementBlock as Ie, createVNode as ne, unref as O, withCtx as ie, createTextVNode as Te, toDisplayString as Pe, shallowRef as qe, computed as De, h as ce, createApp as We } from "vue";
5
5
  import { useI18n as Be, createI18n as He } from "vue-i18n";
6
6
  import { createRouter as Ve, isNavigationFailure as Ge } from "vue-router";
7
7
  import { i as Je } from "./leaveGuard-Cc8yeLxM.js";
8
- import { c as ze, i as Qe, f as Ue } from "./format-Cp1h0vsC.js";
9
- import { coreMessages as le, createMessageRuntime as Xe } from "./i18n/index.js";
10
- import { i as Ye, a as Ze } from "./Icon.vue_vue_type_script_lang-BhhsFYwp.js";
11
- import { i as et, b as tt } from "./bottomDock-BZEiOPYZ.js";
12
- import { i as st, p as ot } from "./chrome-kMBKIB1N.js";
13
- import { i as rt, g as at } from "./platform-ORzRR3Tw.js";
14
- import { c as nt, A as it, r as ue } from "./access-DmAceEo5.js";
15
- import { c as ct, _ as lt } from "./NoAccess.vue_vue_type_script_setup_true_lang-BHzZtZ50.js";
16
- import { i as ut } from "./guards-6fJxfUtk.js";
17
- import { b as ft, c as dt, n as fe } from "./navigation-DMJ6akat.js";
18
- import { c as pt, s as de } from "./contributions-9CPT-Z5v.js";
8
+ import { c as ze, i as Qe, f as Ue } from "./format-C_HXlOYQ.js";
9
+ import { messageLoaders as Xe, coreMessages as le, createMessageRuntime as Ye } from "./i18n/index.js";
10
+ import { i as Ze, a as et } from "./Icon.vue_vue_type_script_lang-BhhsFYwp.js";
11
+ import { i as tt, b as st } from "./bottomDock-BZEiOPYZ.js";
12
+ import { i as ot, p as rt } from "./chrome-kMBKIB1N.js";
13
+ import { i as at, g as nt } from "./platform-DU9QFts8.js";
14
+ import { c as it, A as ct, r as ue } from "./access-DmAceEo5.js";
15
+ import { c as lt, _ as ut } from "./NoAccess.vue_vue_type_script_setup_true_lang-BHzZtZ50.js";
16
+ import { i as ft } from "./guards-CNJ0ATVC.js";
17
+ import { b as dt, c as pt, n as fe } from "./navigation-d-JAPBGA.js";
18
+ import { c as mt, s as de } from "./contributions-B0x5x5xD.js";
19
19
  import { a as pe } from "./environment-Dva-SG8D.js";
20
20
  import { b as me, c as he } from "./describeError-B-NMa--w.js";
21
- import { b as mt } from "./current-CslcEPXp.js";
22
- import { _ as ht } from "./Button.vue_vue_type_script_setup_true_lang-JrqhO99l.js";
23
- import { _ as gt } from "./EmptyState.vue_vue_type_script_setup_true_lang-DbZiO2RF.js";
24
- import { i as wt } from "./feature-DdUAfyi4.js";
25
- function vt(e) {
21
+ import { b as ht } from "./current-CslcEPXp.js";
22
+ import { _ as gt } from "./Button.vue_vue_type_script_setup_true_lang-JrqhO99l.js";
23
+ import { _ as wt } from "./EmptyState.vue_vue_type_script_setup_true_lang-DbZiO2RF.js";
24
+ import { i as vt } from "./feature-DdUAfyi4.js";
25
+ function yt(e) {
26
26
  const { platform: n } = e, o = V();
27
27
  let i = null, v = null, b = !1;
28
28
  function S(l, m) {
@@ -36,7 +36,7 @@ function vt(e) {
36
36
  }
37
37
  return u;
38
38
  }
39
- function M(l) {
39
+ function L(l) {
40
40
  if (l) {
41
41
  l.controller.abort();
42
42
  for (const { owned: m, stop: h } of l.stops.reverse())
@@ -47,7 +47,7 @@ function vt(e) {
47
47
  }
48
48
  }
49
49
  }
50
- const A = (l) => e.effects.filter((m) => m.effect.scope === l), L = (l) => l.status !== "authenticated" ? null : e.sessionKey ? e.sessionKey(l) : String(l.user.id);
50
+ const A = (l) => e.effects.filter((m) => m.effect.scope === l), M = (l) => l.status !== "authenticated" ? null : e.sessionKey ? e.sessionKey(l) : String(l.user.id);
51
51
  return {
52
52
  start() {
53
53
  if (b || i) return;
@@ -58,9 +58,9 @@ function vt(e) {
58
58
  const l = A("session");
59
59
  o.run(
60
60
  () => G(
61
- () => L(n.session.state.value),
61
+ () => M(n.session.state.value),
62
62
  (m) => {
63
- M(v), v = null;
63
+ L(v), v = null;
64
64
  const h = n.session.state.value;
65
65
  m === null || h.status !== "authenticated" || (v = S(
66
66
  l,
@@ -72,11 +72,11 @@ function vt(e) {
72
72
  );
73
73
  },
74
74
  dispose() {
75
- b || (b = !0, o.stop(), M(v), M(i), v = i = null);
75
+ b || (b = !0, o.stop(), L(v), L(i), v = i = null);
76
76
  }
77
77
  };
78
78
  }
79
- const yt = { class: "mx-auto flex min-h-screen max-w-content items-center justify-center p-screen-padding" }, bt = /* @__PURE__ */ ye({
79
+ const bt = { class: "mx-auto flex min-h-screen max-w-content items-center justify-center p-screen-padding" }, $t = /* @__PURE__ */ ye({
80
80
  __name: "StartupFailure",
81
81
  props: {
82
82
  kind: {}
@@ -84,20 +84,20 @@ const yt = { class: "mx-auto flex min-h-screen max-w-content items-center justif
84
84
  emits: ["retry"],
85
85
  setup(e) {
86
86
  const { t: n } = Be();
87
- return (o, i) => (Fe(), Ie("div", yt, [
88
- ne(_(gt), {
89
- title: _(n)("core.startup.title"),
90
- description: _(n)(e.kind === "startup" ? "core.startup.other" : `core.startup.${e.kind}`),
87
+ return (o, i) => (Ce(), Ie("div", bt, [
88
+ ne(O(wt), {
89
+ title: O(n)("core.startup.title"),
90
+ description: O(n)(e.kind === "startup" ? "core.startup.other" : `core.startup.${e.kind}`),
91
91
  icon: "errorWarningLine"
92
92
  }, {
93
93
  actions: ie(() => [
94
- ne(_(ht), {
94
+ ne(O(gt), {
95
95
  prominence: "primary",
96
96
  icon: "refreshLine",
97
97
  onClick: i[0] || (i[0] = (v) => o.$emit("retry"))
98
98
  }, {
99
99
  default: ie(() => [
100
- Te(Pe(_(n)("core.actions.retry")), 1)
100
+ Te(Pe(O(n)("core.actions.retry")), 1)
101
101
  ]),
102
102
  _: 1
103
103
  })
@@ -123,61 +123,61 @@ function* J(e, n = "") {
123
123
  yield { record: o, path: i }, o.children && (yield* J(o.children, i));
124
124
  }
125
125
  }
126
- function $t(e) {
127
- const n = [], o = (s, r) => n.push({ owner: s, message: r }), i = [];
128
- e.features.forEach((s, r) => {
129
- wt(s) ? i.push(s) : o(we, `features[${r}] was not created with defineFeature().`);
126
+ function Et(e) {
127
+ const n = [], o = (s, a) => n.push({ owner: s, message: a }), i = [];
128
+ e.features.forEach((s, a) => {
129
+ vt(s) ? i.push(s) : o(we, `features[${a}] was not created with defineFeature().`);
130
130
  });
131
131
  const v = /* @__PURE__ */ new Map();
132
132
  for (const s of i)
133
133
  v.has(s.id) ? o(w(s), `the feature id "${s.id}" is used twice in the features list.`) : v.set(s.id, s);
134
134
  for (const s of i)
135
- for (const r of s.requires)
136
- v.has(r) || o(w(s), `requires the feature "${r}", which is not in the features list.`);
137
- const b = [], S = /* @__PURE__ */ new Set(), M = (s) => {
135
+ for (const a of s.requires)
136
+ v.has(a) || o(w(s), `requires the feature "${a}", which is not in the features list.`);
137
+ const b = [], S = /* @__PURE__ */ new Set(), L = (s) => {
138
138
  if (S.has(s.id)) return;
139
- const r = b.indexOf(s.id);
140
- if (r !== -1) {
141
- o(w(s), `requirements form a cycle: ${[...b.slice(r), s.id].join(" -> ")}.`), S.add(s.id);
139
+ const a = b.indexOf(s.id);
140
+ if (a !== -1) {
141
+ o(w(s), `requirements form a cycle: ${[...b.slice(a), s.id].join(" -> ")}.`), S.add(s.id);
142
142
  return;
143
143
  }
144
144
  b.push(s.id);
145
145
  for (const c of s.requires) {
146
146
  const f = v.get(c);
147
- f && M(f);
147
+ f && L(f);
148
148
  }
149
149
  b.pop(), S.add(s.id);
150
150
  };
151
- i.forEach(M);
151
+ i.forEach(L);
152
152
  const A = new Set(e.platform.config.capabilities);
153
153
  for (const s of i)
154
- for (const r of s.backend)
155
- A.has(r) || o(w(s), `needs the backend capability "${r}", which the server does not report.`);
156
- const L = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map();
154
+ for (const a of s.backend)
155
+ A.has(a) || o(w(s), `needs the backend capability "${a}", which the server does not report.`);
156
+ const M = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map();
157
157
  for (const s of i) {
158
- for (const r of s.routes) {
159
- const c = r.path.length > 1 ? r.path.replace(/\/$/, "") : r.path, f = l.get(c);
160
- f ? o(w(s), `declares the path "${r.path}", which feature "${f.id}" declares too.`) : l.set(c, s);
158
+ for (const a of s.routes) {
159
+ const c = a.path.length > 1 ? a.path.replace(/\/$/, "") : a.path, f = l.get(c);
160
+ f ? o(w(s), `declares the path "${a.path}", which feature "${f.id}" declares too.`) : l.set(c, s);
161
161
  }
162
- for (const { record: r } of J(s.routes)) {
163
- if (r.meta && "feature" in r.meta && o(w(s), `the route "${String(r.name ?? r.path)}" sets meta.feature, which the runtime owns.`), typeof r.name != "string") continue;
164
- const c = L.get(r.name);
165
- c ? o(w(s), `declares the route name "${r.name}", which feature "${c.id}" declares too.`) : L.set(r.name, s);
162
+ for (const { record: a } of J(s.routes)) {
163
+ if (a.meta && "feature" in a.meta && o(w(s), `the route "${String(a.name ?? a.path)}" sets meta.feature, which the runtime owns.`), typeof a.name != "string") continue;
164
+ const c = M.get(a.name);
165
+ c ? o(w(s), `declares the route name "${a.name}", which feature "${c.id}" declares too.`) : M.set(a.name, s);
166
166
  }
167
167
  }
168
168
  const m = new Set(e.reservedContexts), h = /* @__PURE__ */ new Map();
169
169
  for (const s of i)
170
- for (const { key: r } of s.contexts) {
171
- const c = r.description ?? "a context";
172
- m.has(r) && o(w(s), `provides the context "${c}", which the runtime provides itself.`);
173
- const f = h.get(r);
174
- f ? o(w(s), `provides the context "${c}", which feature "${f.id}" provides too.`) : h.set(r, s);
170
+ for (const { key: a } of s.contexts) {
171
+ const c = a.description ?? "a context";
172
+ m.has(a) && o(w(s), `provides the context "${c}", which the runtime provides itself.`);
173
+ const f = h.get(a);
174
+ f ? o(w(s), `provides the context "${c}", which feature "${f.id}" provides too.`) : h.set(a, s);
175
175
  }
176
- const u = /* @__PURE__ */ new Map(), R = (s, r) => {
177
- for (const c of r) {
176
+ const u = /* @__PURE__ */ new Map(), R = (s, a) => {
177
+ for (const c of a) {
178
178
  const f = u.get(c.namespace);
179
179
  f ? o(s, `declares the message namespace "${c.namespace}", which ${f} declares too.`) : u.set(c.namespace, s);
180
- for (const k of Object.keys(c.loaders))
180
+ for (const k of Object.keys(Xe(c, e.localeFiles)))
181
181
  e.supportedLocales.includes(k) || o(s, `the namespace "${c.namespace}" has a loader for "${k}", which is not a supported locale (${e.supportedLocales.join(", ")}).`);
182
182
  }
183
183
  };
@@ -185,35 +185,35 @@ function $t(e) {
185
185
  R(we, e.messages);
186
186
  const E = (s) => u.has(s);
187
187
  for (const s of i)
188
- for (const { record: r } of J(s.routes))
189
- for (const c of r.meta?.messages ?? [])
190
- E(c) || o(w(s), `the route "${String(r.name ?? r.path)}" needs the message namespace "${c}", which nobody declares.`);
191
- const C = /* @__PURE__ */ new Map();
188
+ for (const { record: a } of J(s.routes))
189
+ for (const c of a.meta?.messages ?? [])
190
+ E(c) || o(w(s), `the route "${String(a.name ?? a.path)}" needs the message namespace "${c}", which nobody declares.`);
191
+ const _ = /* @__PURE__ */ new Map();
192
192
  for (const s of i)
193
- for (const r of s.contributions) {
194
- const c = C.get(r.id);
195
- c ? o(w(s), `declares the shell contribution "${r.id}", which feature "${c.id}" declares too.`) : C.set(r.id, s), e.shellSlots && !r.optional && !e.shellSlots.includes(r.slot) && o(w(s), `contributes "${r.id}" to the slot "${r.slot}", which the shell does not render (it renders ${e.shellSlots.join(", ") || "none"}). Mark it optional to leave it out instead.`);
196
- for (const f of r.messages ?? [])
197
- E(f) || o(w(s), `the contribution "${r.id}" needs the message namespace "${f}", which nobody declares.`);
193
+ for (const a of s.contributions) {
194
+ const c = _.get(a.id);
195
+ c ? o(w(s), `declares the shell contribution "${a.id}", which feature "${c.id}" declares too.`) : _.set(a.id, s), e.shellSlots && !a.optional && !e.shellSlots.includes(a.slot) && o(w(s), `contributes "${a.id}" to the slot "${a.slot}", which the shell does not render (it renders ${e.shellSlots.join(", ") || "none"}). Mark it optional to leave it out instead.`);
196
+ for (const f of a.messages ?? [])
197
+ E(f) || o(w(s), `the contribution "${a.id}" needs the message namespace "${f}", which nobody declares.`);
198
198
  }
199
- const F = /* @__PURE__ */ new Map();
199
+ const C = /* @__PURE__ */ new Map();
200
200
  for (const s of i)
201
- for (const r of s.effects) {
202
- const c = F.get(r.id);
203
- c ? o(w(s), `declares the effect "${r.id}", which feature "${c.id}" declares too.`) : F.set(r.id, s);
204
- const f = r.scope;
205
- f !== "app" && f !== "session" && o(w(s), `the effect "${r.id}" has the scope "${f}"; use "app" or "session".`);
201
+ for (const a of s.effects) {
202
+ const c = C.get(a.id);
203
+ c ? o(w(s), `declares the effect "${a.id}", which feature "${c.id}" declares too.`) : C.set(a.id, s);
204
+ const f = a.scope;
205
+ f !== "app" && f !== "session" && o(w(s), `the effect "${a.id}" has the scope "${f}"; use "app" or "session".`);
206
206
  }
207
207
  return { features: i, issues: n };
208
208
  }
209
- const Et = (e, n, o) => He({
209
+ const kt = (e, n, o) => He({
210
210
  legacy: !1,
211
211
  locale: e,
212
212
  fallbackLocale: n,
213
213
  pluralRules: o?.pluralRules && { ...o.pluralRules },
214
214
  ...o?.missingWarn === !1 && { missingWarn: !1, fallbackWarn: !1 },
215
215
  messages: {}
216
- }), kt = (e) => typeof e == "object" && e !== null && "component" in e && "slots" in e;
216
+ }), St = (e) => typeof e == "object" && e !== null && "component" in e && "slots" in e;
217
217
  function be(e, n) {
218
218
  return e.map((o) => ({
219
219
  ...o,
@@ -222,63 +222,65 @@ function be(e, n) {
222
222
  }));
223
223
  }
224
224
  const ve = (e) => [...new Set(e)];
225
- function Qt(e) {
226
- const { platform: n } = e, o = e.locale?.supported ?? Object.keys(le), i = e.locale?.fallback ?? "en", v = e.shell === void 0 ? void 0 : kt(e.shell) ? e.shell : { component: e.shell, slots: void 0, progress: void 0 }, b = [];
225
+ function Ut(e) {
226
+ const { platform: n } = e, o = e.locale?.supported ?? Object.keys(le), i = e.locale?.fallback ?? "en", v = e.shell === void 0 ? void 0 : St(e.shell) ? e.shell : { component: e.shell, slots: void 0, progress: void 0 }, b = [];
227
227
  o.includes(i) || b.push({ owner: "application", message: `the fallback locale "${i}" is not among the supported locales (${o.join(", ")}).` });
228
228
  for (const t of Object.keys(e.locale?.flags ?? {}))
229
229
  o.includes(t) || b.push({ owner: "application", message: `locale.flags names the locale "${t}", which is not among the supported locales (${o.join(", ")}).` });
230
230
  const S = e.locale?.initial ?? (o.includes(n.config.locale) ? n.config.locale : i);
231
231
  o.includes(S) || b.push({ owner: "application", message: `the initial locale "${S}" is not among the supported locales (${o.join(", ")}).` });
232
- const M = [at, Ue, ot, tt, Ze, fe, de, ue, pe, me, he], A = $t({
232
+ const L = [nt, Ue, rt, st, et, fe, de, ue, pe, me, he], A = Et({
233
233
  features: e.features,
234
234
  platform: n,
235
235
  messages: e.messages ?? [],
236
- reservedContexts: M,
236
+ reservedContexts: L,
237
237
  supportedLocales: o,
238
+ localeFiles: e.localeFiles,
238
239
  shellSlots: v?.slots
239
- }), L = [...b, ...A.issues], l = A.features, m = ft(
240
- l.flatMap((t) => t.navigation.map((a) => ({ feature: t.id, binding: a }))),
240
+ }), M = [...b, ...A.issues], l = A.features, m = dt(
241
+ l.flatMap((t) => t.navigation.map((r) => ({ feature: t.id, binding: r }))),
241
242
  e.navigation
242
243
  );
243
- for (const t of m.issues) L.push({ owner: "navigation", message: t });
244
- if (L.length > 0) throw new ge(L);
245
- const h = Et(S, i, e.i18n), u = h.global;
246
- for (const [t, a] of Object.entries(le)) u.mergeLocaleMessage(t, a);
247
- for (const [t, a] of Object.entries(e.i18n?.messages ?? {})) u.mergeLocaleMessage(t, a);
248
- const { currencySymbol: R, intlLocale: E, datePattern: C, numberSymbols: F, emptyNumber: s, ...r } = e.formatting ?? {}, c = ze({
244
+ for (const t of m.issues) M.push({ owner: "navigation", message: t });
245
+ if (M.length > 0) throw new ge(M);
246
+ const h = kt(S, i, e.i18n), u = h.global;
247
+ for (const [t, r] of Object.entries(le)) u.mergeLocaleMessage(t, r);
248
+ for (const [t, r] of Object.entries(e.i18n?.messages ?? {})) u.mergeLocaleMessage(t, r);
249
+ const { currencySymbol: R, intlLocale: E, datePattern: _, numberSymbols: C, emptyNumber: s, ...a } = e.formatting ?? {}, c = ze({
249
250
  locale: () => u.locale.value,
250
- formatters: r,
251
+ formatters: a,
251
252
  currencySymbol: R,
252
253
  intlLocale: E,
253
- datePattern: C,
254
- numberSymbols: F,
254
+ datePattern: _,
255
+ numberSymbols: C,
255
256
  emptyNumber: s,
256
- translate: (t) => u.t(t)
257
- }), f = [...l.flatMap((t) => t.messages), ...e.messages ?? []], k = (t) => (e.onError ?? St)({ ...t, route: y.currentRoute.value.matched.length > 0 ? y.currentRoute.value.fullPath : null }), z = (t, a) => k({ source: "handled", error: t, detail: a?.detail }), O = Xe({
257
+ translate: (t, r) => u.t(t, r ?? {})
258
+ }), f = [...l.flatMap((t) => t.messages), ...e.messages ?? []], k = (t) => (e.onError ?? Rt)({ ...t, route: y.currentRoute.value.matched.length > 0 ? y.currentRoute.value.fullPath : null }), z = (t, r) => k({ source: "handled", error: t, detail: r?.detail }), K = Ye({
258
259
  target: u,
259
260
  namespaces: f,
260
261
  fallback: i,
261
262
  supported: o,
263
+ localeFiles: e.localeFiles,
262
264
  onFailure: (t) => k({ source: "messages", error: t.error, detail: `${t.namespace} (${t.locale})`, feature: $e.get(t.namespace) })
263
- }), $e = new Map(l.flatMap((t) => t.messages.map((a) => [a.namespace, t.id]))), y = Ve({
264
- history: e.router?.history ?? ct(),
265
+ }), $e = new Map(l.flatMap((t) => t.messages.map((r) => [r.namespace, t.id]))), y = Ve({
266
+ history: e.router?.history ?? lt(),
265
267
  routes: l.flatMap((t) => be(t.routes, t.id)),
266
- scrollBehavior: e.router?.scrollBehavior ?? ((t, a) => t.name === a.name ? !1 : { top: 0 })
268
+ scrollBehavior: e.router?.scrollBehavior ?? ((t, r) => t.name === r.name ? !1 : { top: 0 })
267
269
  }), I = e.router?.login ?? { name: "login" }, Ee = e.router?.home ?? { path: "/" }, T = [], Q = (t) => {
268
270
  try {
269
271
  return y.resolve(t).matched.length > 0 ? null : "matches no route";
270
- } catch (a) {
271
- const p = a instanceof Error ? a.message : String(a);
272
+ } catch (r) {
273
+ const p = r instanceof Error ? r.message : String(r);
272
274
  return p.startsWith("No match for") ? "matches no route" : `cannot be resolved (${p})`;
273
275
  }
274
276
  };
275
- if (l.some((t) => t.routes.some((a) => a.meta?.public !== !0))) {
277
+ if (l.some((t) => t.routes.some((r) => r.meta?.public !== !0))) {
276
278
  const t = Q(I) ?? (y.resolve(I).meta.public === !0 ? null : "is not public (meta.public: true)");
277
279
  t && T.push({ owner: "application", message: `the login route ${JSON.stringify(I)} ${t.replace("matches no route", "does not exist")}, but protected routes are installed: an anonymous visitor would have nowhere to go. Install a feature with the login route or set router.login.` });
278
280
  }
279
- for (const { feature: t, binding: a } of m.destinations.values()) {
280
- const p = Q(a.to);
281
- p && T.push({ owner: `feature "${t}"`, message: `the destination "${a.destination}" is bound to ${JSON.stringify(a.to)}, which ${p}.` });
281
+ for (const { feature: t, binding: r } of m.destinations.values()) {
282
+ const p = Q(r.to);
283
+ p && T.push({ owner: `feature "${t}"`, message: `the destination "${r.destination}" is bound to ${JSON.stringify(r.to)}, which ${p}.` });
282
284
  }
283
285
  if (T.length > 0) throw new ge(T);
284
286
  const j = qe({ status: "idle" }), P = {
@@ -287,13 +289,13 @@ function Qt(e) {
287
289
  locales: o,
288
290
  localeFlags: e.locale?.flags ?? {},
289
291
  setLocale: async (t) => {
290
- const a = u.locale.value, p = await O.setLocale(t);
291
- if (p && u.locale.value !== a) {
292
- const g = (K) => k({ source: "locale", error: K, detail: t });
292
+ const r = u.locale.value, p = await K.setLocale(t);
293
+ if (p && u.locale.value !== r) {
294
+ const g = (F) => k({ source: "locale", error: F, detail: t });
293
295
  try {
294
296
  Promise.resolve(e.locale?.onChange?.(t)).catch(g);
295
- } catch (K) {
296
- g(K);
297
+ } catch (F) {
298
+ g(F);
297
299
  }
298
300
  }
299
301
  return p;
@@ -301,50 +303,50 @@ function Qt(e) {
301
303
  retry: () => H(),
302
304
  report: z
303
305
  }, D = {
304
- contributions: l.flatMap((t) => t.contributions.map((a) => ({ feature: t.id, contribution: a }))),
305
- effects: l.flatMap((t) => t.effects.map((a) => ({ feature: t.id, effect: a })))
306
- }, U = vt({
306
+ contributions: l.flatMap((t) => t.contributions.map((r) => ({ feature: t.id, contribution: r }))),
307
+ effects: l.flatMap((t) => t.effects.map((r) => ({ feature: t.id, effect: r })))
308
+ }, U = yt({
307
309
  effects: D.effects,
308
310
  platform: n,
309
311
  sessionKey: e.sessionKey,
310
- onError: (t, a) => k({ source: "effect", error: t, feature: a.feature, detail: a.effect.id })
311
- }), ke = new Map(l.map((t) => [t.id, t.messages.map((a) => a.namespace)])), X = (t) => ve(D.contributions.filter(({ contribution: a }) => a.scope === t).flatMap(({ contribution: a }) => a.messages ?? [])), Se = X("always"), Re = X("authenticated");
312
+ onError: (t, r) => k({ source: "effect", error: t, feature: r.feature, detail: r.effect.id })
313
+ }), ke = new Map(l.map((t) => [t.id, t.messages.map((r) => r.namespace)])), X = (t) => ve(D.contributions.filter(({ contribution: r }) => r.scope === t).flatMap(({ contribution: r }) => r.messages ?? [])), Se = X("always"), Re = X("authenticated");
312
314
  async function xe(t) {
313
- const a = t.matched.flatMap((g) => [...ke.get(g.meta.feature ?? "") ?? [], ...g.meta.messages ?? []]), p = n.session.state.value.status === "authenticated";
314
- await O.load(ve([...a, ...Se, ...p ? Re : []]));
315
+ const r = t.matched.flatMap((g) => [...ke.get(g.meta.feature ?? "") ?? [], ...g.meta.messages ?? []]), p = n.session.state.value.status === "authenticated";
316
+ await K.load(ve([...r, ...Se, ...p ? Re : []]));
315
317
  }
316
318
  let W = null;
317
319
  function B(t) {
318
- const a = t.meta.titleKey, p = W?.documentTitle.value ?? (a && u.te(a) ? u.t(a) : null), g = (e.router?.documentTitle ?? Rt)(p, n.config.appName);
320
+ const r = t.meta.titleKey, p = W?.documentTitle.value ?? (r && u.te(r) ? u.t(r) : null), g = (e.router?.documentTitle ?? xt)(p, n.config.appName);
319
321
  g !== "" && (document.title = g);
320
322
  }
321
- const Me = dt({ session: n.session, router: y, i18n: u, destinations: m.destinations }), Le = pt(D.contributions, n.session), Ae = nt({ router: y, access: n.access, noAccess: e.noAccess ?? lt }), je = ye({
323
+ const Le = pt({ session: n.session, router: y, i18n: u, destinations: m.destinations }), Me = mt(D.contributions, n.session), Ae = it({ router: y, access: n.access, noAccess: e.noAccess ?? ut }), je = ye({
322
324
  name: "ApplicationRoot",
323
325
  setup() {
324
326
  return () => {
325
327
  const t = j.value;
326
- return t.status === "failed" ? ce(bt, { kind: t.kind, onRetry: () => void H() }) : t.status !== "ready" ? null : ce(v?.component ?? it);
328
+ return t.status === "failed" ? ce($t, { kind: t.kind, onRetry: () => void H() }) : t.status !== "ready" ? null : ce(v?.component ?? ct);
327
329
  };
328
330
  }
329
331
  }), d = We(je);
330
- rt(d, n), d.use(h), Qe(d, c), W = st(d), et(d), Je(d), e.icons && Ye(d, ...Array.isArray(e.icons) ? e.icons : [e.icons]), d.provide(pe, P), e.describeError && d.provide(me, e.describeError), e.describeFieldError && d.provide(he, e.describeFieldError), d.provide(fe, Me), d.provide(de, Le), d.provide(ue, Ae);
331
- for (const t of l) for (const { key: a, value: p } of t.contexts) d.provide(a, p);
332
+ at(d, n), d.use(h), Qe(d, c), W = ot(d), tt(d), Je(d), e.icons && Ze(d, ...Array.isArray(e.icons) ? e.icons : [e.icons]), d.provide(pe, P), e.describeError && d.provide(me, e.describeError), e.describeFieldError && d.provide(he, e.describeFieldError), d.provide(fe, Le), d.provide(de, Me), d.provide(ue, Ae);
333
+ for (const t of l) for (const { key: r, value: p } of t.contexts) d.provide(r, p);
332
334
  let x = !1, Y = !1, Z = !1, ee = !1;
333
335
  const N = [];
334
336
  function Ne() {
335
337
  const t = d.config.errorHandler;
336
- d.config.errorHandler = ($, Oe, re) => {
337
- k({ source: "vue", error: $, detail: re }), t?.($, Oe, re);
338
+ d.config.errorHandler = ($, Ke, re) => {
339
+ k({ source: "vue", error: $, detail: re }), t?.($, Ke, re);
338
340
  };
339
- const a = ($) => k({ source: "unhandledrejection", error: $.reason }), p = ($) => {
341
+ const r = ($) => k({ source: "unhandledrejection", error: $.reason }), p = ($) => {
340
342
  $.error && k({ source: "window", error: $.error });
341
343
  };
342
- window.addEventListener("unhandledrejection", a), window.addEventListener("error", p), N.push(() => {
343
- window.removeEventListener("unhandledrejection", a), window.removeEventListener("error", p);
344
+ window.addEventListener("unhandledrejection", r), window.addEventListener("error", p), N.push(() => {
345
+ window.removeEventListener("unhandledrejection", r), window.removeEventListener("error", p);
344
346
  });
345
347
  const g = l.some(($) => $.holdsExpiredSession);
346
348
  n.session.holdExpired(g), N.push(() => n.session.holdExpired(!1)), N.push(
347
- ut({
349
+ ft({
348
350
  router: y,
349
351
  session: n.session,
350
352
  login: I,
@@ -356,8 +358,8 @@ function Qt(e) {
356
358
  onError: ($) => k({ source: "router", error: $ })
357
359
  })
358
360
  );
359
- const K = V();
360
- K.run(() => G(() => W?.documentTitle.value, () => B(y.currentRoute.value))), N.push(() => K.stop());
361
+ const F = V();
362
+ F.run(() => G(() => W?.documentTitle.value, () => B(y.currentRoute.value))), N.push(() => F.stop());
361
363
  const oe = V();
362
364
  oe.run(
363
365
  () => G(
@@ -369,17 +371,17 @@ function Qt(e) {
369
371
  )
370
372
  ), N.push(() => oe.stop());
371
373
  }
372
- const q = (t, a) => {
373
- j.value = { status: "failed", kind: t, error: a };
374
+ const q = (t, r) => {
375
+ j.value = { status: "failed", kind: t, error: r };
374
376
  };
375
377
  async function te() {
376
378
  j.value = { status: "starting" };
377
379
  const t = await n.session.restore();
378
380
  if (x) return;
379
381
  if (t.status === "failed") return q("session", t.error);
380
- const a = t.status === "authenticated" ? t.user.locale : void 0;
381
- if (typeof a == "string" && a !== u.locale.value && o.includes(a) && await P.setLocale(a), x) return;
382
- const p = await O.loadEssential();
382
+ const r = t.status === "authenticated" ? t.user.locale : void 0;
383
+ if (typeof r == "string" && r !== u.locale.value && o.includes(r) && await P.setLocale(r), x) return;
384
+ const p = await K.loadEssential();
383
385
  if (!x) {
384
386
  if (p.length > 0) return q("messages", p[0].error);
385
387
  try {
@@ -394,7 +396,7 @@ function Qt(e) {
394
396
  }
395
397
  }
396
398
  async function H() {
397
- x || j.value.status !== "failed" || (await O.retry(), await te());
399
+ x || j.value.status !== "failed" || (await K.retry(), await te());
398
400
  }
399
401
  const se = {
400
402
  app: d,
@@ -414,22 +416,22 @@ function Qt(e) {
414
416
  retry: H,
415
417
  dispose() {
416
418
  if (!x) {
417
- x = !0, Ke(), U.dispose(), O.dispose(), Z && d.unmount();
419
+ x = !0, Fe(), U.dispose(), K.dispose(), Z && d.unmount();
418
420
  for (const t of N.reverse()) t();
419
421
  y.options.history.destroy();
420
422
  }
421
423
  }
422
- }, Ke = mt(se);
424
+ }, Fe = ht(se);
423
425
  return se;
424
426
  }
425
- function St(e) {
427
+ function Rt(e) {
426
428
  console.error(`[vue-core] ${e.source}${e.feature ? ` (${e.feature})` : ""}${e.detail ? `: ${e.detail}` : ""}`, e.error);
427
429
  }
428
- function Rt(e, n) {
430
+ function xt(e, n) {
429
431
  return [e, n].filter((o) => !!o).join(" · ");
430
432
  }
431
433
  export {
432
434
  ge as A,
433
- Qt as c,
434
- St as d
435
+ Ut as c,
436
+ Rt as d
435
437
  };
@@ -0,0 +1,27 @@
1
+ /** A person behind a record, as go-core's `meta.author` / `meta.editor` and a list's `meta.authors` carry them. */
2
+ export interface ResourceAuthor {
3
+ readonly id: number;
4
+ readonly name: string;
5
+ readonly email: string | null;
6
+ readonly phone_number: string | null;
7
+ readonly avatar: string | null;
8
+ readonly active: boolean;
9
+ }
10
+ /** The `meta` of a record answer: who created it and who last changed it (and who switched it on or off, where the resource has that). */
11
+ export interface ResourceMeta {
12
+ readonly author: ResourceAuthor | null;
13
+ readonly editor: ResourceAuthor | null;
14
+ readonly activator?: ResourceAuthor | null;
15
+ readonly deactivator?: ResourceAuthor | null;
16
+ readonly [key: string]: unknown;
17
+ }
18
+ /**
19
+ * The person behind a row's `created_by` / `updated_by`: a list answer carries them once, in `meta.authors`.
20
+ *
21
+ * const creator = authorOf(page.meta, row.created_by);
22
+ *
23
+ * Null for no id, no `authors` in the meta, or an id nobody in it has. `A` is your own author type where it has more fields.
24
+ */
25
+ export declare function authorOf<A extends {
26
+ readonly id: number;
27
+ } = ResourceAuthor>(meta: object | null | undefined, id: number | null | undefined): NoInfer<A> | null;
@@ -3,6 +3,8 @@ export type { CollectionDefaults, CollectionDefinition, CollectionDefinitionInpu
3
3
  export { useCollection } from "./useCollection";
4
4
  export type { Collection, CollectionDisplay, LinkedQuery, SavedViewsHandle, UseCollectionOptions } from "./useCollection";
5
5
  export type { CollectionLoader, ListMeta, ListPage, CollectionQuery, CollectionStateSource, LoadContext, SortDirection } from "./types";
6
+ export { authorOf } from "./authors";
7
+ export type { ResourceAuthor, ResourceMeta } from "./authors";
6
8
  export { httpList, listLoader, listParams, readListPage, routeListLoader } from "./http";
7
9
  export { LIST_CONTEXT_PARAM } from "./location";
8
10
  export type { CollectionColumns, Column, ColumnKey, ColumnKind, ColumnValue, MobileRole, RowAction, SlotKey, TableColumns } from "./columns";