@wssto2/vue-core 0.16.0 → 0.18.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 (160) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/README.md +5 -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/DynamicCollection.vue.d.ts +69 -0
  56. package/dist/collection/authors.d.ts +27 -0
  57. package/dist/collection/definition.d.ts +4 -4
  58. package/dist/collection/dynamicColumns.d.ts +13 -0
  59. package/dist/collection/index.d.ts +3 -0
  60. package/dist/collection/index.js +196 -142
  61. package/dist/config/index.d.ts +42 -0
  62. package/dist/config/index.js +12 -3
  63. package/dist/content/Panel.vue.d.ts +1 -1
  64. package/dist/content/index.js +2 -2
  65. package/dist/{contributions-9CPT-Z5v.js → contributions-B0x5x5xD.js} +1 -1
  66. package/dist/form/CommandDialog.vue.d.ts +1 -1
  67. package/dist/form/DateField.vue.d.ts +1 -1
  68. package/dist/form/DateTimeField.vue.d.ts +1 -1
  69. package/dist/form/FileField.vue.d.ts +1 -1
  70. package/dist/form/FormRow.vue.d.ts +2 -2
  71. package/dist/form/I18nField.vue.d.ts +2 -2
  72. package/dist/form/TextField.vue.d.ts +1 -1
  73. package/dist/form/TextareaField.vue.d.ts +2 -2
  74. package/dist/form/date/value.d.ts +21 -0
  75. package/dist/form/dynamic/DynamicForm.vue.d.ts +46 -0
  76. package/dist/form/dynamic/RepeatField.vue.d.ts +47 -0
  77. package/dist/form/dynamic/ResourceField.vue.d.ts +38 -0
  78. package/dist/form/dynamic/ResourcePickerList.vue.d.ts +12 -0
  79. package/dist/form/dynamic/RichTextField.vue.d.ts +40 -0
  80. package/dist/form/dynamic/localeMode.d.ts +5 -0
  81. package/dist/form/dynamic/resources.d.ts +34 -0
  82. package/dist/form/dynamic/schema.d.ts +73 -0
  83. package/dist/form/dynamic/validator.d.ts +30 -0
  84. package/dist/form/dynamic/visibility.d.ts +12 -0
  85. package/dist/form/index.d.ts +12 -0
  86. package/dist/form/index.js +2100 -1260
  87. package/dist/format/format.d.ts +8 -2
  88. package/dist/format/index.js +1 -1
  89. package/dist/format-C_HXlOYQ.js +136 -0
  90. package/dist/{guards-6fJxfUtk.js → guards-CNJ0ATVC.js} +1 -1
  91. package/dist/i18n/index.d.ts +14 -2
  92. package/dist/i18n/index.js +86 -75
  93. package/dist/i18n/messages.d.ts +10 -1
  94. package/dist/i18n/runtime.d.ts +3 -1
  95. package/dist/identity/index.js +3 -3
  96. package/dist/identity/profile/EmailChangeDialog.vue.d.ts +2 -2
  97. package/dist/identity/users/list.d.ts +1 -1
  98. package/dist/incidents/index.js +1 -1
  99. package/dist/{index-D9_xqF5g.js → index-1HS7O2-e.js} +9 -9
  100. package/dist/{index-nByFc1eL.js → index-BA2w8uwD.js} +86 -86
  101. package/dist/{index-Ct7W_gYE.js → index-SLJWm40T.js} +4 -4
  102. package/dist/index.d.ts +1 -1
  103. package/dist/index.js +1 -1
  104. package/dist/modal/DiscardChangesModal.vue.d.ts +2 -2
  105. package/dist/modal/Modal.vue.d.ts +2 -2
  106. package/dist/modal/Sheet.vue.d.ts +2 -2
  107. package/dist/modules/identity/routes.d.ts +1 -1
  108. package/dist/modules/identity/schemas.d.ts +2 -2
  109. package/dist/{navigation-DMJ6akat.js → navigation-d-JAPBGA.js} +1 -1
  110. package/dist/{neighbors-BpypL3Wb.js → neighbors-Dg_LU9ry.js} +1 -1
  111. package/dist/notifications/index.js +1 -1
  112. package/dist/onboarding/index.js +1 -1
  113. package/dist/options-mOOX6JSS.js +214 -0
  114. package/dist/overlay/AlertDialog.vue.d.ts +3 -3
  115. package/dist/overlay/Menu.vue.d.ts +2 -2
  116. package/dist/overlay/PhotoViewer.vue.d.ts +2 -2
  117. package/dist/overlay/Popover.vue.d.ts +2 -2
  118. package/dist/page/SectionNavigator.vue.d.ts +1 -1
  119. package/dist/page/SectionPanel.vue.d.ts +1 -1
  120. package/dist/page/index.js +3 -3
  121. package/dist/phone/index.js +57 -56
  122. package/dist/platform/index.d.ts +10 -1
  123. package/dist/platform/index.js +16 -15
  124. package/dist/platform/platform.d.ts +4 -2
  125. package/dist/{platform-ORzRR3Tw.js → platform-DU9QFts8.js} +7 -6
  126. package/dist/playwright/config.d.ts +33 -0
  127. package/dist/playwright/index.d.ts +2 -0
  128. package/dist/playwright/index.js +192 -171
  129. package/dist/resource/index.js +1 -1
  130. package/dist/resources-BZLlAtoS.js +62 -0
  131. package/dist/router/index.js +3 -3
  132. package/dist/{rowLayout-QKfNHsML.js → rowLayout-PIuD7MGo.js} +2 -2
  133. package/dist/{sections-CSpJN0Z7.js → sections-BpiRLntE.js} +1 -1
  134. package/dist/{serverMessages-Ce8-MK4e.js → serverMessages-C_KkDvpT.js} +1 -1
  135. package/dist/shell/index.js +4 -4
  136. package/dist/state/NextStepPanel.vue.d.ts +63 -0
  137. package/dist/state/PhaseTiles.vue.d.ts +20 -0
  138. package/dist/state/PhaseTrack.vue.d.ts +48 -0
  139. package/dist/state/RequirementList.vue.d.ts +10 -0
  140. package/dist/state/TodoRow.vue.d.ts +52 -0
  141. package/dist/state/index.d.ts +9 -0
  142. package/dist/state/index.js +731 -126
  143. package/dist/state/phaseStep.d.ts +7 -0
  144. package/dist/state/phaseTile.d.ts +10 -0
  145. package/dist/state/requirementItem.d.ts +16 -0
  146. package/dist/state/todoRow.d.ts +8 -0
  147. package/dist/{state-QDaxntgR.js → state-z1iPF1DT.js} +1 -1
  148. package/dist/styles.css +1 -1
  149. package/dist/{suggestions-q_v3M7G6.js → suggestions-DeMgs_ki.js} +1 -1
  150. package/dist/testing/format.d.ts +1 -1
  151. package/dist/testing/index.js +31 -31
  152. package/dist/{useCommand-DAMgQ5NE.js → useCommand-DQKvro1n.js} +2 -2
  153. package/dist/{useGroupSheet-B-Hs4gNO.js → useGroupSheet-CRw3MUmX.js} +3 -3
  154. package/dist/{usePreferences-BfMXVbSO.js → usePreferences-DB29UTFD.js} +1 -1
  155. package/dist/{useRecordDialog-QPKFH1Ww.js → useRecordDialog-0azHxxvm.js} +1 -1
  156. package/dist/{useResourceForm-Oa6bk3NI.js → useResourceForm-zVuWerSn.js} +1 -1
  157. package/dist/{useTypedEntry-CITij2C_.js → useTypedEntry-BsMV66Yc.js} +46 -45
  158. package/package.json +6 -1
  159. package/dist/format-Cp1h0vsC.js +0 -125
  160. package/dist/options-B48UiYsG.js +0 -368
@@ -1,8 +1,9 @@
1
- import { defineComponent as fe, useModel as me, useTemplateRef as z, ref as B, computed as g, watch as ne, nextTick as W, openBlock as w, createElementBlock as $, createElementVNode as f, normalizeClass as P, unref as i, createVNode as M, toDisplayString as T, normalizeStyle as xe, Fragment as ee, renderList as le, createCommentVNode as J, withModifiers as we, withDirectives as _e, vModelText as ke, mergeModels as re, inject as Ce, shallowRef as $e, onBeforeUnmount as De, createBlock as Me, mergeProps as Te, createSlots as Se, withCtx as se, createTextVNode as Ne, renderSlot as Ie, mergeDefaults as Pe } from "vue";
1
+ import { defineComponent as fe, useModel as me, useTemplateRef as z, ref as B, computed as g, watch as ne, nextTick as W, openBlock as w, createElementBlock as $, createElementVNode as f, normalizeClass as P, unref as s, createVNode as M, toDisplayString as T, normalizeStyle as xe, Fragment as ee, renderList as le, createCommentVNode as J, withModifiers as we, withDirectives as _e, vModelText as ke, mergeModels as re, inject as Ce, shallowRef as $e, onBeforeUnmount as De, createBlock as Me, mergeProps as Te, createSlots as Se, withCtx as ie, createTextVNode as Ne, renderSlot as Ie, mergeDefaults as Pe } from "vue";
2
2
  import { useI18n as pe } from "vue-i18n";
3
- import { u as ve } from "../format-Cp1h0vsC.js";
3
+ import { u as ve } from "../format-C_HXlOYQ.js";
4
4
  import { b as Ve } from "../controlSurface-t7OEFESJ.js";
5
- import { c as ie, a as Oe, e as Le, _ as Re, f as Be, b as Ee } from "../options-B48UiYsG.js";
5
+ import { f as se, u as Oe, _ as Le } from "../options-mOOX6JSS.js";
6
+ import { a as Re, f as Be, b as Ee } from "../FormRow.vue_vue_type_script_setup_true_lang-CpgNVQF4.js";
6
7
  import { _ as A } from "../Icon.vue_vue_type_script_lang-BhhsFYwp.js";
7
8
  import { _ as ue } from "../CountryFlag.vue_vue_type_script_setup_true_lang-Kry_vPPZ.js";
8
9
  import { u as Fe } from "../anchored-DpuUwf-9.js";
@@ -13,7 +14,7 @@ function ye(t) {
13
14
  return qe.country_calling_codes[t]?.[0];
14
15
  }
15
16
  const E = (t) => We(t), de = (t) => `+${E(t)}`;
16
- function Dt(t, a) {
17
+ function Mt(t, a) {
17
18
  let e = (t ?? "").replace(/\D/g, "");
18
19
  if (e.length < 6) return null;
19
20
  let n = "";
@@ -67,7 +68,7 @@ function be(t) {
67
68
  const a = Ye(t), e = ze(t);
68
69
  return e === "TOO_SHORT" ? { kind: "too_short", country: a } : e === "TOO_LONG" ? { kind: "too_long", country: a } : e !== void 0 ? { kind: "invalid", country: a } : he(t)?.isValid() ? null : { kind: "invalid", country: a };
69
70
  }
70
- const Mt = (t) => be(t) === null;
71
+ const Tt = (t) => be(t) === null;
71
72
  function ge(t, a) {
72
73
  try {
73
74
  return new Intl.DisplayNames([a], { type: "region" }).of(t) ?? t;
@@ -76,9 +77,9 @@ function ge(t, a) {
76
77
  }
77
78
  }
78
79
  function Je(t, a, e) {
79
- const n = ie(t.trim());
80
+ const n = se(t.trim());
80
81
  if (n === "") return e;
81
- const l = n.replace(/\D/g, ""), x = new Intl.DisplayNames([a], { type: "region" }), p = (h) => ie(x.of(h) ?? h), _ = n.startsWith("+") || /^\d+$/.test(n);
82
+ const l = n.replace(/\D/g, ""), x = new Intl.DisplayNames([a], { type: "region" }), p = (h) => se(x.of(h) ?? h), _ = n.startsWith("+") || /^\d+$/.test(n);
82
83
  return e.filter((h) => _ ? E(h).startsWith(l) : p(h).includes(n) || h.toLowerCase() === n);
83
84
  }
84
85
  const Qe = ["id", "disabled", "aria-label", "aria-expanded"], Ze = { class: "tabular-nums" }, et = ["id", "aria-label"], tt = {
@@ -89,7 +90,7 @@ const Qe = ["id", "disabled", "aria-label", "aria-expanded"], Ze = { class: "tab
89
90
  key: 0,
90
91
  class: "px-3 py-2 text-footnote text-content-muted",
91
92
  role: "status"
92
- }, at = { class: "border-t border-border-separator px-3 py-2" }, lt = ["aria-controls", "aria-activedescendant", "aria-label", "placeholder"], st = /* @__PURE__ */ fe({
93
+ }, at = { class: "border-t border-border-separator px-3 py-2" }, lt = ["aria-controls", "aria-activedescendant", "aria-label", "placeholder"], it = /* @__PURE__ */ fe({
93
94
  __name: "CountryPicker",
94
95
  props: /* @__PURE__ */ re({
95
96
  id: {},
@@ -104,7 +105,7 @@ const Qe = ["id", "disabled", "aria-label", "aria-expanded"], Ze = { class: "tab
104
105
  setup(t, { expose: a, emit: e }) {
105
106
  const n = t, l = me(t, "modelValue"), x = e, { t: p } = pe(), _ = ve(), h = z("root"), V = z("trigger"), k = z("panel"), K = z("search"), C = B(!1), v = B(""), d = B(0), O = g(() => {
106
107
  const o = /* @__PURE__ */ new Map();
107
- for (const s of te()) o.set(s, ge(s, _.intlLocale));
108
+ for (const i of te()) o.set(i, ge(i, _.intlLocale));
108
109
  return o;
109
110
  }), S = (o) => O.value.get(o) ?? o, D = g(() => {
110
111
  const o = n.common.filter((c) => O.value.has(c));
@@ -112,15 +113,15 @@ const Qe = ["id", "disabled", "aria-label", "aria-expanded"], Ze = { class: "tab
112
113
  const c = Je(v.value, _.intlLocale, te());
113
114
  return [{ title: null, countries: [...c.filter((r) => o.includes(r)), ...c.filter((r) => !o.includes(r))] }];
114
115
  }
115
- const s = te().filter((c) => !o.includes(c)).sort((c, r) => S(c).localeCompare(S(r), _.intlLocale));
116
- return [{ title: p("core.form.phone.common"), countries: o }, { title: p("core.form.phone.all"), countries: s }].filter((c) => c.countries.length > 0);
117
- }), y = g(() => D.value.flatMap((o) => o.countries)), F = g(() => D.value.map((o, s) => D.value.slice(0, s).reduce((c, r) => c + r.countries.length, 0))), U = (o) => `${n.id}-country-${o}`, { style: Q } = Fe(k, {
116
+ const i = te().filter((c) => !o.includes(c)).sort((c, r) => S(c).localeCompare(S(r), _.intlLocale));
117
+ return [{ title: p("core.form.phone.common"), countries: o }, { title: p("core.form.phone.all"), countries: i }].filter((c) => c.countries.length > 0);
118
+ }), y = g(() => D.value.flatMap((o) => o.countries)), F = g(() => D.value.map((o, i) => D.value.slice(0, i).reduce((c, r) => c + r.countries.length, 0))), U = (o) => `${n.id}-country-${o}`, { style: Q } = Fe(k, {
118
119
  reference: () => V.value,
119
120
  placement: () => "bottom-start",
120
121
  offset: 4,
121
122
  padding: 8,
122
- fit: (o, s) => {
123
- o.style.width = "min(20rem, calc(100vw - 1rem))", o.style.maxHeight = `${Math.max(200, Math.min(380, s.height))}px`;
123
+ fit: (o, i) => {
124
+ o.style.width = "min(20rem, calc(100vw - 1rem))", o.style.maxHeight = `${Math.max(200, Math.min(380, i.height))}px`;
124
125
  }
125
126
  });
126
127
  async function j() {
@@ -143,14 +144,14 @@ const Qe = ["id", "disabled", "aria-label", "aria-expanded"], Ze = { class: "tab
143
144
  o.preventDefault(), d.value = Math.min(Math.max(d.value + (o.key === "ArrowDown" ? 1 : -1), 0), y.value.length - 1);
144
145
  else if (o.key === "Enter") {
145
146
  o.preventDefault();
146
- const s = y.value[d.value];
147
- s && L(s);
147
+ const i = y.value[d.value];
148
+ i && L(i);
148
149
  }
149
150
  }
150
151
  function R(o) {
151
152
  (o.key === "ArrowDown" || o.key === "ArrowUp") && (o.preventDefault(), j());
152
153
  }
153
- return a({ focus: () => V.value?.focus() }), (o, s) => (w(), $("div", {
154
+ return a({ focus: () => V.value?.focus() }), (o, i) => (w(), $("div", {
154
155
  ref_key: "root",
155
156
  ref: h,
156
157
  class: "shrink-0",
@@ -162,17 +163,17 @@ const Qe = ["id", "disabled", "aria-label", "aria-expanded"], Ze = { class: "tab
162
163
  ref: V,
163
164
  type: "button",
164
165
  disabled: n.disabled,
165
- "aria-label": i(p)("core.form.phone.country", { country: S(l.value) }),
166
+ "aria-label": s(p)("core.form.phone.country", { country: S(l.value) }),
166
167
  "aria-haspopup": "listbox",
167
168
  "aria-expanded": C.value,
168
169
  "data-test": "country-button",
169
170
  class: P(["flex h-full min-h-8 cursor-pointer items-center gap-1.5 whitespace-nowrap text-body font-medium text-content-strong focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus disabled:cursor-not-allowed compact:border-r compact:border-border-separator", n.surface]),
170
- onClick: s[0] || (s[0] = (c) => C.value ? N(!0) : j()),
171
+ onClick: i[0] || (i[0] = (c) => C.value ? N(!0) : j()),
171
172
  onKeydown: R
172
173
  }, [
173
174
  M(ue, { country: l.value }, null, 8, ["country"]),
174
- f("span", Ze, T(i(de)(l.value)), 1),
175
- M(i(A), {
175
+ f("span", Ze, T(s(de)(l.value)), 1),
176
+ M(s(A), {
176
177
  name: "arrowDownSLine",
177
178
  size: 14,
178
179
  class: "text-content-muted"
@@ -182,14 +183,14 @@ const Qe = ["id", "disabled", "aria-label", "aria-expanded"], Ze = { class: "tab
182
183
  key: 0,
183
184
  ref_key: "panel",
184
185
  ref: k,
185
- style: xe(i(Q)),
186
+ style: xe(s(Q)),
186
187
  "data-test": "country-list",
187
188
  class: "z-1000 flex flex-col overflow-hidden rounded-menu bg-surface-overlay shadow-float"
188
189
  }, [
189
190
  f("div", {
190
191
  id: `${n.id}-countries`,
191
192
  role: "listbox",
192
- "aria-label": i(p)("core.form.phone.countries"),
193
+ "aria-label": s(p)("core.form.phone.countries"),
193
194
  class: "min-h-0 flex-1 overflow-y-auto p-2"
194
195
  }, [
195
196
  (w(!0), $(ee, null, le(D.value, (c, r) => (w(), $(ee, {
@@ -204,7 +205,7 @@ const Qe = ["id", "disabled", "aria-label", "aria-expanded"], Ze = { class: "tab
204
205
  "data-test": "country-option",
205
206
  "data-country": u,
206
207
  class: P(["flex cursor-pointer items-center gap-2.5 rounded-control px-2 py-2 text-body", (F.value[r] ?? 0) + b === d.value ? "bg-tint-soft" : "hover:bg-fill"]),
207
- onMousedown: s[1] || (s[1] = we(() => {
208
+ onMousedown: i[1] || (i[1] = we(() => {
208
209
  }, ["prevent"])),
209
210
  onMouseenter: (m) => d.value = (F.value[r] ?? 0) + b,
210
211
  onClick: (m) => L(u)
@@ -213,16 +214,16 @@ const Qe = ["id", "disabled", "aria-label", "aria-expanded"], Ze = { class: "tab
213
214
  f("span", {
214
215
  class: P(["min-w-0 flex-1 truncate text-content-strong", u === l.value ? "font-semibold" : ""])
215
216
  }, T(S(u)), 3),
216
- f("span", nt, T(i(de)(u)), 1)
217
+ f("span", nt, T(s(de)(u)), 1)
217
218
  ], 42, ot))), 128))
218
219
  ], 64))), 128)),
219
- y.value.length === 0 ? (w(), $("p", rt, T(i(p)("core.form.phone.no_match")), 1)) : J("", !0)
220
+ y.value.length === 0 ? (w(), $("p", rt, T(s(p)("core.form.phone.no_match")), 1)) : J("", !0)
220
221
  ], 8, et),
221
222
  f("div", at, [
222
223
  _e(f("input", {
223
224
  ref_key: "search",
224
225
  ref: K,
225
- "onUpdate:modelValue": s[2] || (s[2] = (c) => v.value = c),
226
+ "onUpdate:modelValue": i[2] || (i[2] = (c) => v.value = c),
226
227
  type: "text",
227
228
  role: "combobox",
228
229
  autocomplete: "off",
@@ -230,8 +231,8 @@ const Qe = ["id", "disabled", "aria-label", "aria-expanded"], Ze = { class: "tab
230
231
  "aria-expanded": "true",
231
232
  "aria-controls": `${n.id}-countries`,
232
233
  "aria-activedescendant": y.value[d.value] ? U(y.value[d.value]) : void 0,
233
- "aria-label": i(p)("core.form.phone.search"),
234
- placeholder: i(p)("core.form.phone.search"),
234
+ "aria-label": s(p)("core.form.phone.search"),
235
+ placeholder: s(p)("core.form.phone.search"),
235
236
  "data-test": "country-search",
236
237
  class: "block w-full border-0 bg-transparent p-0 text-body text-content-strong placeholder:text-content-muted focus:outline-none focus:ring-0",
237
238
  onKeydown: G
@@ -242,14 +243,14 @@ const Qe = ["id", "disabled", "aria-label", "aria-expanded"], Ze = { class: "tab
242
243
  ], 4)) : J("", !0)
243
244
  ], 544));
244
245
  }
245
- }), it = Symbol("vue-core.phoneDefaults"), ut = { class: "w-full min-w-0" }, ct = ["id", "value", "name", "placeholder", "disabled", "required", "aria-required", "aria-invalid", "aria-describedby"], dt = {
246
+ }), st = Symbol("vue-core.phoneDefaults"), ut = { class: "w-full min-w-0" }, ct = ["id", "value", "name", "placeholder", "disabled", "required", "aria-required", "aria-invalid", "aria-describedby"], dt = {
246
247
  key: 0,
247
248
  class: "mt-1.5 flex items-center gap-1.5 text-footnote text-status-success-content",
248
249
  "data-test": "phone-kind"
249
250
  }, ft = ["href", "aria-label", "title"], mt = ["href", "aria-label", "title"], pt = ["aria-label", "title"], vt = {
250
251
  class: "sr-only",
251
252
  role: "status"
252
- }, Tt = /* @__PURE__ */ fe({
253
+ }, St = /* @__PURE__ */ fe({
253
254
  __name: "PhoneField",
254
255
  props: /* @__PURE__ */ re(/* @__PURE__ */ Pe({
255
256
  label: {},
@@ -272,7 +273,7 @@ const Qe = ["id", "disabled", "aria-label", "aria-expanded"], Ze = { class: "tab
272
273
  }),
273
274
  emits: ["update:modelValue"],
274
275
  setup(t, { expose: a }) {
275
- const e = t, n = me(t, "modelValue"), { t: l } = pe(), x = ve(), p = Ce(it, {}), _ = !!Oe(), h = Le("text", () => e.error || L.value ? "error" : e.disabled ? "locked" : "rest"), V = g(() => _ ? Ve(e.width) : "w-full"), k = z("input"), K = g(() => e.defaultCountry ?? p.defaultCountry ?? (e.commonCountries ?? p.commonCountries ?? ce)[0] ?? "HR"), C = g(() => e.commonCountries ?? p.commonCountries ?? ce), v = $e(K.value), d = B("");
276
+ const e = t, n = me(t, "modelValue"), { t: l } = pe(), x = ve(), p = Ce(st, {}), _ = !!Re(), h = Oe("text", () => e.error || L.value ? "error" : e.disabled ? "locked" : "rest"), V = g(() => _ ? Ve(e.width) : "w-full"), k = z("input"), K = g(() => e.defaultCountry ?? p.defaultCountry ?? (e.commonCountries ?? p.commonCountries ?? ce)[0] ?? "HR"), C = g(() => e.commonCountries ?? p.commonCountries ?? ce), v = $e(K.value), d = B("");
276
277
  let O = null;
277
278
  function S(r) {
278
279
  v.value = r.country, d.value = r.text;
@@ -315,34 +316,34 @@ const Qe = ["id", "disabled", "aria-label", "aria-expanded"], Ze = { class: "tab
315
316
  if (r)
316
317
  return r.country ? l(`core.form.phone.${r.kind}`, { country: ge(r.country, x.intlLocale) }) : l("core.form.phone.invalid_any");
317
318
  }), G = g(() => n.value !== "" && !L.value ? Xe(n.value) : void 0), R = g(() => He(n.value)), o = B(!1);
318
- let s = null;
319
+ let i = null;
319
320
  async function c() {
320
321
  try {
321
322
  await navigator.clipboard.writeText(R.value);
322
323
  } catch {
323
324
  return;
324
325
  }
325
- o.value = !0, s && clearTimeout(s), s = setTimeout(() => o.value = !1, 1800);
326
+ o.value = !0, i && clearTimeout(i), i = setTimeout(() => o.value = !1, 1800);
326
327
  }
327
- return De(() => s && clearTimeout(s)), a({ focus: () => k.value?.focus() }), (r, u) => (w(), Me(Re, Te({ ...i(Be)(e), error: e.error ?? H.value }, {
328
+ return De(() => i && clearTimeout(i)), a({ focus: () => k.value?.focus() }), (r, u) => (w(), Me(Le, Te({ ...s(Be)(e), error: e.error ?? H.value }, {
328
329
  value: n.value === "" ? null : R.value,
329
330
  "value-style": "numeric"
330
331
  }), Se({
331
- default: se(({ id: b, describedby: m, invalid: I }) => [
332
+ default: ie(({ id: b, describedby: m, invalid: I }) => [
332
333
  f("div", ut, [
333
334
  f("div", {
334
335
  class: P(["flex items-stretch gap-1.5", V.value])
335
336
  }, [
336
- M(st, {
337
+ M(it, {
337
338
  id: b,
338
339
  "model-value": v.value,
339
340
  common: C.value,
340
341
  disabled: e.disabled,
341
- surface: `${i(h)} px-2.5`,
342
+ surface: `${s(h)} px-2.5`,
342
343
  onPicked: j
343
344
  }, null, 8, ["id", "model-value", "common", "disabled", "surface"]),
344
345
  f("div", {
345
- class: P(["min-w-0 flex-1", i(h)])
346
+ class: P(["min-w-0 flex-1", s(h)])
346
347
  }, [
347
348
  f("input", {
348
349
  id: b,
@@ -368,12 +369,12 @@ const Qe = ["id", "disabled", "aria-label", "aria-expanded"], Ze = { class: "tab
368
369
  ], 2)
369
370
  ], 2),
370
371
  G.value && !(e.error ?? H.value) ? (w(), $("p", dt, [
371
- M(i(A), {
372
+ M(s(A), {
372
373
  name: "checkCustom",
373
374
  size: 14,
374
375
  class: "shrink-0"
375
376
  }),
376
- Ne(" " + T(i(l)(`core.form.phone.kind_${G.value}`)), 1)
377
+ Ne(" " + T(s(l)(`core.form.phone.kind_${G.value}`)), 1)
377
378
  ])) : J("", !0)
378
379
  ])
379
380
  ]),
@@ -381,7 +382,7 @@ const Qe = ["id", "disabled", "aria-label", "aria-expanded"], Ze = { class: "tab
381
382
  }, [
382
383
  n.value !== "" ? {
383
384
  name: "readonly",
384
- fn: se(() => [
385
+ fn: ie(() => [
385
386
  f("div", {
386
387
  class: P(["flex w-full min-w-0 flex-wrap items-center gap-x-2 gap-y-1.5", _ ? "justify-end" : ""]),
387
388
  "data-test": "phone-read"
@@ -391,24 +392,24 @@ const Qe = ["id", "disabled", "aria-label", "aria-expanded"], Ze = { class: "tab
391
392
  }, T(R.value), 3),
392
393
  f("a", {
393
394
  href: `tel:${n.value}`,
394
- "aria-label": i(l)("core.form.phone.call"),
395
- title: i(l)("core.form.phone.call"),
395
+ "aria-label": s(l)("core.form.phone.call"),
396
+ title: s(l)("core.form.phone.call"),
396
397
  "data-test": "phone-call",
397
398
  class: "flex size-9 shrink-0 items-center justify-center rounded-full bg-tint-soft text-content-link transition-colors duration-motion-fast hover:bg-fill focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus"
398
399
  }, [
399
- M(i(A), {
400
+ M(s(A), {
400
401
  name: "phone",
401
402
  size: 18
402
403
  })
403
404
  ], 8, ft),
404
405
  f("a", {
405
406
  href: `sms:${n.value}`,
406
- "aria-label": i(l)("core.form.phone.message"),
407
- title: i(l)("core.form.phone.message"),
407
+ "aria-label": s(l)("core.form.phone.message"),
408
+ title: s(l)("core.form.phone.message"),
408
409
  "data-test": "phone-message",
409
410
  class: "flex size-9 shrink-0 items-center justify-center rounded-full bg-tint-soft text-content-link transition-colors duration-motion-fast hover:bg-fill focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus"
410
411
  }, [
411
- M(i(A), {
412
+ M(s(A), {
412
413
  name: "message",
413
414
  size: 18
414
415
  })
@@ -419,18 +420,18 @@ const Qe = ["id", "disabled", "aria-label", "aria-expanded"], Ze = { class: "tab
419
420
  }),
420
421
  f("button", {
421
422
  type: "button",
422
- "aria-label": i(l)("core.form.phone.copy"),
423
- title: i(l)("core.form.phone.copy"),
423
+ "aria-label": s(l)("core.form.phone.copy"),
424
+ title: s(l)("core.form.phone.copy"),
424
425
  "data-test": "phone-copy",
425
426
  class: "flex size-9 shrink-0 cursor-pointer items-center justify-center rounded-full bg-fill text-content-strong transition-colors duration-motion-fast hover:bg-fill-strong focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus",
426
427
  onClick: c
427
428
  }, [
428
- M(i(A), {
429
+ M(s(A), {
429
430
  name: o.value ? "checkCustom" : "copy",
430
431
  size: 18
431
432
  }, null, 8, ["name"])
432
433
  ], 8, pt),
433
- f("span", vt, T(o.value ? i(l)("core.form.phone.copied") : ""), 1)
434
+ f("span", vt, T(o.value ? s(l)("core.form.phone.copied") : ""), 1)
434
435
  ], 2)
435
436
  ]),
436
437
  key: "0"
@@ -440,14 +441,14 @@ const Qe = ["id", "disabled", "aria-label", "aria-expanded"], Ze = { class: "tab
440
441
  });
441
442
  export {
442
443
  ce as COMMON_COUNTRIES,
443
- Tt as PhoneField,
444
+ St as PhoneField,
444
445
  ge as countryName,
445
446
  de as dialCode,
446
447
  He as formatInternational,
447
- Mt as isValidPhone,
448
+ Tt as isValidPhone,
448
449
  Ye as phoneCountry,
449
- it as phoneDefaultsKey,
450
+ st as phoneDefaultsKey,
450
451
  Xe as phoneKind,
451
452
  be as phoneProblem,
452
- Dt as whatsAppLink
453
+ Mt as whatsAppLink
453
454
  };
@@ -9,7 +9,7 @@ export { parseNavigation } from "./navigation";
9
9
  export type { NavigationNode } from "./navigation";
10
10
  export { httpSessionAdapter, parseSessionPayload } from "./httpSession";
11
11
  export type { HttpSessionOptions, UserParser } from "./httpSession";
12
- export { createPlatform, installPlatform, platformKey, usePlatform } from "./platform";
12
+ export { createPlatform, installPlatform, platformKey, useAccess, usePlatform } from "./platform";
13
13
  export type { Platform, PlatformOptions } from "./platform";
14
14
  export { mergePatch, preferencesOf } from "./preferences";
15
15
  export type { Preferences, PreferencesPatch } from "./preferences";
@@ -24,6 +24,15 @@ export type { BeforeSignOutHook, Session, SessionAdapter, SessionEnd, SessionImp
24
24
  * declare module "@wssto2/vue-core/platform" {
25
25
  * interface PermissionRegistry { "tickets:view": true; "tickets:update": true }
26
26
  * }
27
+ *
28
+ * An application with a generated union declares it in one line, and may split the rest across features (each
29
+ * feature's `routes.ts` adds its own keys the same way):
30
+ *
31
+ * declare module "@wssto2/vue-core/platform" {
32
+ * interface PermissionRegistry extends Record<GeneratedPermission, true> {}
33
+ * }
34
+ *
35
+ * `usePlatform().access`, `useAccess()`, `AccessGate` and route `meta.access` are all typed from it.
27
36
  */
28
37
  export interface PermissionRegistry {
29
38
  }
@@ -5,12 +5,12 @@ var S = (s) => {
5
5
  var O = (s, t, e) => t in s ? N(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
6
6
  var $ = (s, t, e) => O(s, typeof t != "symbol" ? t + "" : t, e), w = (s, t, e) => t.has(s) || S("Cannot " + e);
7
7
  var o = (s, t, e) => (w(s, t, "read from private field"), e ? e.call(s) : t.get(s)), l = (s, t, e) => t.has(s) ? S("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(s) : t.set(s, e), f = (s, t, e, r) => (w(s, t, "write to private field"), r ? r.call(s, e) : t.set(s, e), e), h = (s, t, e) => (w(s, t, "access private method"), e);
8
- import { u as v } from "../platform-ORzRR3Tw.js";
9
- import { b as F, c as G, a as K, d as U, h as _, e as z, i as D, p as H, f as Q, g as R } from "../platform-ORzRR3Tw.js";
10
- import { M as W, d as X } from "../context-Ch1r4fdN.js";
11
- import { m as Z, p as k } from "../preferences-hYhrw8Uy.js";
8
+ import { u as v } from "../platform-DU9QFts8.js";
9
+ import { b as F, c as G, a as K, d as U, h as _, e as z, i as D, p as H, f as Q, g as R, j as V } from "../platform-DU9QFts8.js";
10
+ import { M as X, d as Y } from "../context-Ch1r4fdN.js";
11
+ import { m as k, p as tt } from "../preferences-hYhrw8Uy.js";
12
12
  import { computed as E } from "vue";
13
- import { _ as et } from "../AccessGate.vue_vue_type_script_setup_true_lang-BH3f0hda.js";
13
+ import { _ as st } from "../AccessGate.vue_vue_type_script_setup_true_lang-Bg8JFAOT.js";
14
14
  class m extends Error {
15
15
  constructor(e, r = [], n) {
16
16
  super(r.length > 0 ? `${e}: ${r.join("; ")}` : e);
@@ -19,7 +19,7 @@ class m extends Error {
19
19
  this.name = "BootstrapError", this.issues = r, this.cause = n?.cause;
20
20
  }
21
21
  }
22
- const x = (s) => s === null ? "null" : Array.isArray(s) ? "array" : typeof s, B = (s) => typeof s == "object" && s !== null && !Array.isArray(s);
22
+ const x = (s) => s === null ? "null" : Array.isArray(s) ? "array" : typeof s, j = (s) => typeof s == "object" && s !== null && !Array.isArray(s);
23
23
  var a, c, p, d, u, g;
24
24
  const b = class b {
25
25
  /** @internal use the `fields` passed to `extend`. */
@@ -54,7 +54,7 @@ const b = class b {
54
54
  /** A nested object, read with the same checks; issues are reported as `parent.child`. */
55
55
  section(t) {
56
56
  const e = o(this, a)[t];
57
- return B(e) ? new b(e, `${o(this, c)}${t}.`, o(this, p)) : (this.fail(t, `expected object, got ${x(e)}`), new b({}, `${o(this, c)}${t}.`, o(this, p), !0));
57
+ return j(e) ? new b(e, `${o(this, c)}${t}.`, o(this, p)) : (this.fail(t, `expected object, got ${x(e)}`), new b({}, `${o(this, c)}${t}.`, o(this, p), !0));
58
58
  }
59
59
  };
60
60
  a = new WeakMap(), c = new WeakMap(), p = new WeakMap(), d = new WeakMap(), u = new WeakSet(), g = function(t, e, r, n) {
@@ -63,7 +63,7 @@ a = new WeakMap(), c = new WeakMap(), p = new WeakMap(), d = new WeakMap(), u =
63
63
  };
64
64
  let A = b;
65
65
  function P(s, t) {
66
- if (!B(s))
66
+ if (!j(s))
67
67
  throw new m("Invalid bootstrap config", [`expected a JSON object, got ${x(s)}`]);
68
68
  const e = [], r = new A(s, "", e), n = r.string("locale");
69
69
  n === "" && r.fail("locale", "must not be empty");
@@ -87,8 +87,8 @@ function L(s = {}) {
87
87
  let y;
88
88
  try {
89
89
  y = JSON.parse(i);
90
- } catch (j) {
91
- throw new m(`Bootstrap config in ${n} is not valid JSON`, [], { cause: j });
90
+ } catch (B) {
91
+ throw new m(`Bootstrap config in ${n} is not valid JSON`, [], { cause: B });
92
92
  }
93
93
  return P(y, e);
94
94
  }
@@ -100,25 +100,26 @@ function M() {
100
100
  });
101
101
  }
102
102
  export {
103
- et as AccessGate,
103
+ st as AccessGate,
104
104
  m as BootstrapError,
105
105
  A as BootstrapFields,
106
- W as MissingContextError,
106
+ X as MissingContextError,
107
107
  F as beforeSignOutTimeout,
108
108
  G as createAccessClient,
109
109
  K as createPlatform,
110
110
  U as createSession,
111
- X as defineFeatureContext,
111
+ Y as defineFeatureContext,
112
112
  _ as heldSession,
113
113
  z as httpSessionAdapter,
114
114
  D as installPlatform,
115
- Z as mergePatch,
115
+ k as mergePatch,
116
116
  P as parseBootstrap,
117
117
  H as parseNavigation,
118
118
  Q as parseSessionPayload,
119
119
  R as platformKey,
120
- k as preferencesOf,
120
+ tt as preferencesOf,
121
121
  L as readBootstrap,
122
+ V as useAccess,
122
123
  v as usePlatform,
123
124
  M as useSessionUser
124
125
  };
@@ -2,7 +2,7 @@ import type { App, InjectionKey } from "vue";
2
2
  import { type HttpClient, type HttpClientOptions, type Transport } from "../client";
3
3
  import { type AccessClient, type AccessClientOptions } from "./access";
4
4
  import type { BootstrapConfig } from "./bootstrap";
5
- import type { RegisteredConfig, RegisteredUser } from "./index";
5
+ import type { Permission, RegisteredConfig, RegisteredUser } from "./index";
6
6
  import { type BeforeSignOutHook, type Session, type SessionAdapter, type SessionUser } from "./session";
7
7
  /**
8
8
  * One application's shared services. Everything in it belongs to this instance alone. Bare `Platform` is the
@@ -13,7 +13,7 @@ export interface Platform<U extends SessionUser = RegisteredUser, C extends Boot
13
13
  readonly http: HttpClient;
14
14
  readonly session: Session<U>;
15
15
  /** Reads the session's access; empty until the session is restored or established. */
16
- readonly access: AccessClient;
16
+ readonly access: AccessClient<Permission>;
17
17
  }
18
18
  export interface PlatformOptions<U extends SessionUser, C extends BootstrapConfig> extends AccessClientOptions {
19
19
  /** The validated bootstrap config (`readBootstrap()`); its `apiBase` prefixes every request. */
@@ -65,4 +65,6 @@ export declare function createPlatform<U extends SessionUser, C extends Bootstra
65
65
  }): Platform<U, C>;
66
66
  export declare const platformKey: InjectionKey<Platform>;
67
67
  export declare const usePlatform: () => Platform;
68
+ /** What the signed-in user may do: the platform's access client, typed to the registered permissions. */
69
+ export declare const useAccess: () => AccessClient<Permission>;
68
70
  export declare function installPlatform(app: App, platform: Platform): void;
@@ -243,7 +243,7 @@ function D(e, r = {}) {
243
243
  };
244
244
  return d;
245
245
  }
246
- function V(e) {
246
+ function W(e) {
247
247
  const r = U({
248
248
  baseUrl: e.config.apiBase,
249
249
  transport: e.transport,
@@ -265,12 +265,12 @@ function V(e) {
265
265
  );
266
266
  return { config: e.config, http: r, session: u, access: s };
267
267
  }
268
- const q = _("platform"), K = q[0], W = q[1];
269
- function X(e, r) {
268
+ const q = _("platform"), K = q[0], L = q[1], X = () => L().access;
269
+ function Y(e, r) {
270
270
  e.provide(K, r);
271
271
  }
272
272
  export {
273
- V as a,
273
+ W as a,
274
274
  E as b,
275
275
  N as c,
276
276
  D as d,
@@ -278,7 +278,8 @@ export {
278
278
  Q as f,
279
279
  K as g,
280
280
  k as h,
281
- X as i,
281
+ Y as i,
282
+ X as j,
282
283
  P as p,
283
- W as u
284
+ L as u
284
285
  };
@@ -0,0 +1,33 @@
1
+ import { type PlaywrightTestConfig } from "@playwright/test";
2
+ /** Any Playwright config field; `webServer` is the one server this preset starts, so a part of it is enough. */
3
+ export type PlaywrightOverrides = Omit<PlaywrightTestConfig, "webServer"> & {
4
+ webServer?: {
5
+ command?: string;
6
+ url?: string;
7
+ port?: number;
8
+ reuseExistingServer?: boolean;
9
+ timeout?: number;
10
+ cwd?: string;
11
+ env?: Record<string, string>;
12
+ };
13
+ };
14
+ export interface PlaywrightConfigOptions {
15
+ /** Where the specs live, relative to the config file. Default `"./e2e"`. */
16
+ testDir?: string;
17
+ /** The zone the specs and the browser run in (specs build expected times with local Dates, and a CI runner is UTC). Sets `TZ` and `timezoneId`; unset leaves both alone. */
18
+ timezone?: string;
19
+ /** Spec globs to leave out (opt-in screenshot specs). Default none. */
20
+ ignore?: string[];
21
+ /** The dev server's port when `E2E_PORT` is not set, which runs a second checkout's suite on its own server. Default 5173. */
22
+ port?: number;
23
+ /** The JSON report `vue-core e2e-timings` reads (`e2eTimings.report`). Default `"e2e-timings/results.json"`. */
24
+ report?: string;
25
+ }
26
+ /**
27
+ * The Playwright config of an application on vue-core: its dev server (`npm run dev -- --port`, reused when one runs outside CI), Chromium,
28
+ * fully parallel specs, and in CI `forbidOnly`, two retries and two workers, the `github` reporter instead of `html`, plus the JSON report
29
+ * `vue-core e2e-timings` reads. `overrides` replaces any field; `use` and `webServer` merge one level deep.
30
+ *
31
+ * export default playwrightConfig({ timezone: "Europe/Zagreb" });
32
+ */
33
+ export declare function playwrightConfig(options?: PlaywrightConfigOptions, overrides?: PlaywrightOverrides): PlaywrightTestConfig;
@@ -11,3 +11,5 @@ export type { ProfileAnswers, ProfileCall, ProfileOptions } from "./profile";
11
11
  export { activity, ago, change, freshState, person, serveUsers, serviceAccount, session, signin } from "./users";
12
12
  export type { UsersOptions, UsersRequest, UsersState, Write } from "./users";
13
13
  export type { Call } from "./request";
14
+ export { playwrightConfig } from "./config";
15
+ export type { PlaywrightConfigOptions, PlaywrightOverrides } from "./config";