@wssto2/vue-core 0.4.23 → 0.4.25

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 (43) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/dist/{Activity-Cu_mAn_m.js → Activity-CI-l_OFl.js} +1 -1
  3. package/dist/{Changes-DW_3-MwX.js → Changes-BdR0R20V.js} +1 -1
  4. package/dist/{DeadLetters-CpcMccCc.js → DeadLetters-CRTeoZS1.js} +1 -1
  5. package/dist/FormErrors.vue_vue_type_script_setup_true_lang-DGOSc-PS.js +295 -0
  6. package/dist/{FormView.vue_vue_type_script_setup_true_lang-CbvMRBOc.js → FormView.vue_vue_type_script_setup_true_lang-BUrYkjmF.js} +1 -1
  7. package/dist/{General-Dbc3qDRz.js → General-hdmVP72B.js} +3 -3
  8. package/dist/{NewRolePage-DPHFJ0I8.js → NewRolePage-BPeKasOp.js} +2 -2
  9. package/dist/PhotoViewer.vue_vue_type_script_setup_true_lang-CY5EZiyK.js +433 -0
  10. package/dist/{ProfilePage-Cc7eiyV2.js → ProfilePage-Dq9lcO5O.js} +3 -3
  11. package/dist/{RoleEditor.vue_vue_type_script_setup_true_lang-2fpYYCXj.js → RoleEditor.vue_vue_type_script_setup_true_lang-B6g2760V.js} +3 -3
  12. package/dist/{RolePage-C0jmkQkO.js → RolePage-BYH-0fVI.js} +3 -3
  13. package/dist/{RolesPage-eb4gqxdW.js → RolesPage-BRm5xDw7.js} +1 -1
  14. package/dist/{Sessions-DSDcj8Yd.js → Sessions-B1eKG_I2.js} +1 -1
  15. package/dist/{SettingsPage-BF7MW1GH.js → SettingsPage-0P38Ty4w.js} +3 -3
  16. package/dist/{SignIn-BR8-RVIk.js → SignIn-Dp8Ji0_r.js} +1 -1
  17. package/dist/{SignInPage-Dcws582A.js → SignInPage-CiStJboK.js} +2 -2
  18. package/dist/{SignIns-3u7YgKqh.js → SignIns-Bo7R2Coi.js} +1 -1
  19. package/dist/{UserRecord-AtZIwCO9.js → UserRecord-DGq_PPy1.js} +3 -3
  20. package/dist/{UsersList-1IeQnvOL.js → UsersList-BulNu4aE.js} +3 -3
  21. package/dist/access/index.js +1 -1
  22. package/dist/form/CommandDialog.vue.d.ts +6 -0
  23. package/dist/form/index.js +9 -9
  24. package/dist/form/useForm.d.ts +5 -1
  25. package/dist/form/useRecordDialog.d.ts +2 -2
  26. package/dist/identity/index.js +1 -1
  27. package/dist/{index--CxZ33h0.js → index-BmowiT1y.js} +12 -12
  28. package/dist/{index-Du3Ti2Zp.js → index-Yy28omu6.js} +4 -4
  29. package/dist/{index-DBTK_iMB.js → index-tnSTp0cM.js} +2 -2
  30. package/dist/index.d.ts +1 -1
  31. package/dist/index.js +1 -1
  32. package/dist/notifications/index.js +1 -1
  33. package/dist/overlay/PhotoViewer.vue.d.ts +4 -3
  34. package/dist/overlay/PhotoViewerAction.vue.d.ts +22 -0
  35. package/dist/overlay/index.d.ts +1 -0
  36. package/dist/overlay/index.js +47 -23
  37. package/dist/{status-QOGPjIHu.js → status-Bh3-Cg7o.js} +1 -1
  38. package/dist/styles.css +1 -1
  39. package/dist/{useCommand-CT1RF_IB.js → useCommand-Cj-APj-P.js} +53 -50
  40. package/dist/{useResourceForm-CQuniKhd.js → useResourceForm-tGYTfKhH.js} +1 -1
  41. package/package.json +1 -1
  42. package/dist/FormErrors.vue_vue_type_script_setup_true_lang-4WQz-TYS.js +0 -286
  43. package/dist/PhotoViewer.vue_vue_type_script_setup_true_lang-QPCW3Xi6.js +0 -411
@@ -1,12 +1,12 @@
1
- import { _ as Me, s as He, c as Se, f as et } from "../FormErrors.vue_vue_type_script_setup_true_lang-4WQz-TYS.js";
2
- import { E as Ko, u as Ao, a as Ho } from "../FormErrors.vue_vue_type_script_setup_true_lang-4WQz-TYS.js";
3
- import { f as De, u as st } from "../useCommand-CT1RF_IB.js";
4
- import { _ as Yo, a as Wo } from "../useCommand-CT1RF_IB.js";
1
+ import { _ as Me, s as He, c as Se, f as et } from "../FormErrors.vue_vue_type_script_setup_true_lang-DGOSc-PS.js";
2
+ import { E as Ko, u as Ao, a as Ho } from "../FormErrors.vue_vue_type_script_setup_true_lang-DGOSc-PS.js";
3
+ import { f as De, u as st } from "../useCommand-Cj-APj-P.js";
4
+ import { _ as Yo, a as Wo } from "../useCommand-Cj-APj-P.js";
5
5
  import { ref as N, computed as k, defineComponent as P, openBlock as u, createBlock as O, mergeProps as Q, unref as s, createSlots as ee, withCtx as v, createElementVNode as b, normalizeClass as j, createElementBlock as y, Fragment as ue, renderList as we, createVNode as M, createCommentVNode as T, toDisplayString as _, renderSlot as C, mergeDefaults as ce, useModel as ie, useId as je, withKeys as Ce, withModifiers as be, createTextVNode as Y, mergeModels as se, useTemplateRef as H, shallowRef as Le, watch as de, normalizeProps as Ve, guardReactiveProps as qe, nextTick as he, provide as Re, inject as tt, onBeforeUnmount as Ee, onMounted as rt, toRef as it, toValue as Oe, getCurrentScope as ut, onScopeDispose as dt, shallowReactive as Ue, normalizeStyle as ct, resolveDynamicComponent as ft } from "vue";
6
6
  import { a as Ie } from "../leaveGuard-Cc8yeLxM.js";
7
7
  import { M as Zo, c as Xo, i as Qo, l as en, u as tn } from "../leaveGuard-Cc8yeLxM.js";
8
8
  import { _ as ln } from "../LeaveGuardRoot.vue_vue_type_script_setup_true_lang-Cv7KlA5y.js";
9
- import { u as nn } from "../useResourceForm-CQuniKhd.js";
9
+ import { u as nn } from "../useResourceForm-tGYTfKhH.js";
10
10
  import { _ as te } from "../Icon.vue_vue_type_script_lang-D7oC-d-S.js";
11
11
  import { u as at, _ as ye, f as fe, b as ve, a as lt, c as Ge, e as vt, h as mt, i as pt, d as bt } from "../control-B4SdblL6.js";
12
12
  import { useI18n as oe } from "vue-i18n";
@@ -27,7 +27,7 @@ import { _ as mn } from "../TimeField.vue_vue_type_script_setup_true_lang-DBxKAW
27
27
  import { _ as ge } from "../Button.vue_vue_type_script_setup_true_lang-CL9Qh5yq.js";
28
28
  import { _ as qt, r as Rt } from "../FormGroup.vue_vue_type_script_setup_true_lang-DSwSRsA5.js";
29
29
  import { a as bn, c as gn, p as yn, u as hn } from "../FormGroup.vue_vue_type_script_setup_true_lang-DSwSRsA5.js";
30
- import { _ as wn } from "../FormView.vue_vue_type_script_setup_true_lang-CbvMRBOc.js";
30
+ import { _ as wn } from "../FormView.vue_vue_type_script_setup_true_lang-BUrYkjmF.js";
31
31
  import { i as Ot } from "../intlLocale-CeRU44qJ.js";
32
32
  import { a as Mt } from "../environment-Dva-SG8D.js";
33
33
  import { _ as jt } from "../NumberField.vue_vue_type_script_setup_true_lang-DaE5BLm4.js";
@@ -36,7 +36,7 @@ import { u as It, a as We } from "../SelectField.vue_vue_type_script_setup_true_
36
36
  import { _ as $n, b as _n } from "../SelectField.vue_vue_type_script_setup_true_lang-C3FbRQW7.js";
37
37
  import { g as Cn, m as Fn } from "../options-Ba_0uLWN.js";
38
38
  import { _ as Ln } from "../OtpInput.vue_vue_type_script_setup_true_lang-gp4FfWAH.js";
39
- import { _ as Je } from "../PhotoViewer.vue_vue_type_script_setup_true_lang-QPCW3Xi6.js";
39
+ import { _ as Je } from "../PhotoViewer.vue_vue_type_script_setup_true_lang-CY5EZiyK.js";
40
40
  import { _ as zn } from "../SegmentedField.vue_vue_type_script_setup_true_lang-Dg-_ZjgR.js";
41
41
  import { _ as Vn } from "../SwitchField.vue_vue_type_script_setup_true_lang-ALvJisiP.js";
42
42
  import { _ as Rn } from "../TextareaField.vue_vue_type_script_setup_true_lang-BJ4__cvJ.js";
@@ -2017,8 +2017,8 @@ function jo(l) {
2017
2017
  command: a,
2018
2018
  form: a.form,
2019
2019
  editing: t,
2020
- create() {
2021
- t.value = null, a.present();
2020
+ create(o) {
2021
+ t.value = null, a.present(o);
2022
2022
  },
2023
2023
  edit(o) {
2024
2024
  t.value = o, a.present(l.toValues?.(o));
@@ -84,7 +84,11 @@ export interface FormOptions<Values extends object, Output = Values> {
84
84
  readonly describeFieldError?: (message: string, field: string) => string;
85
85
  /** The draft's name for a field the server names, given the whole dotted path (`tax_id` is `taxId`, `lines.0.unit_price` is `lines.0.unitPrice`). Default: the same name. */
86
86
  readonly serverField?: (field: string) => string;
87
- /** The sentence for a failure; return undefined for the library's default of that kind. */
87
+ /**
88
+ * The sentence for a failure; return undefined for the default: the reason a request was refused as `useDescribeError` words it (the app's own
89
+ * describer first, a reason code the client translates, the server's sentence for a business rule, the library's words for forbidden, conflict,
90
+ * offline), the library's per-kind sentence for a server fault, a validator refusal, a refusal that names fields ("check the marked fields") and `refresh`.
91
+ */
88
92
  readonly failureMessage?: (kind: FormFailureKind, error: unknown) => string | undefined;
89
93
  }
90
94
  type Fields<Values> = readonly (keyof Values & string)[];
@@ -20,8 +20,8 @@ export interface RecordDialog<Values extends object, Output = Values, Done = unk
20
20
  readonly form: Command<Values, Output, Done>["form"];
21
21
  /** The row being edited, `null` for a new record: the title, the fields that only a new one has, "Save and add another". */
22
22
  readonly editing: Readonly<Ref<Row | null>>;
23
- /** Opens the dialog for a new record, with the defaults. */
24
- create(): void;
23
+ /** Opens the dialog for a new record, with the defaults; `initial` is laid over them as the starting point (a suggested category), and is not an edit: the untouched dialog closes without asking. */
24
+ create(initial?: Partial<Values>): void;
25
25
  /** Opens it for `row`: `toValues(row)` over the defaults. */
26
26
  edit(row: Row): void;
27
27
  }
@@ -1,4 +1,4 @@
1
- import { _ as t, h as n, j as a, i, k as o, d as r, l as d, m as u, n as y, r as l, o as I, s as f, q as p, t as A, f as c } from "../index--CxZ33h0.js";
1
+ import { _ as t, h as n, j as a, i, k as o, d as r, l as d, m as u, n as y, r as l, o as I, s as f, q as p, t as A, f as c } from "../index-BmowiT1y.js";
2
2
  export {
3
3
  t as SignInAsButton,
4
4
  n as identityFeature,
@@ -14,12 +14,12 @@ import { useRouter as J, useRoute as de } from "vue-router";
14
14
  import { _ as Q } from "./Icon.vue_vue_type_script_lang-D7oC-d-S.js";
15
15
  import { _ as L } from "./Button.vue_vue_type_script_setup_true_lang-CL9Qh5yq.js";
16
16
  import { u as fe } from "./leaveGuard-Cc8yeLxM.js";
17
- import { _ as he } from "./FormView.vue_vue_type_script_setup_true_lang-CbvMRBOc.js";
17
+ import { _ as he } from "./FormView.vue_vue_type_script_setup_true_lang-BUrYkjmF.js";
18
18
  import { _ as ye } from "./TextField.vue_vue_type_script_setup_true_lang-CP2WeU36.js";
19
19
  import { u as ge } from "./mediaQuery-CygcXmFW.js";
20
20
  import { u as ve } from "./useDialog-CXR3hN0G.js";
21
21
  import { c as _e } from "./closeOverlays-CjVsIrpL.js";
22
- import { u as be } from "./FormErrors.vue_vue_type_script_setup_true_lang-4WQz-TYS.js";
22
+ import { u as be } from "./FormErrors.vue_vue_type_script_setup_true_lang-DGOSc-PS.js";
23
23
  import { u as we } from "./format-D8X4zsx6.js";
24
24
  import { _ as xe } from "./AccountMenuItem.vue_vue_type_script_setup_true_lang-CPeNxh5K.js";
25
25
  import { b as Ee } from "./routeResource-DlTsGTg_.js";
@@ -315,7 +315,7 @@ function Cs(e) {
315
315
  const Ye = async (e) => {
316
316
  await B(e.http);
317
317
  }, Je = z({
318
- login: { name: "login", path: "/login", component: () => import("./SignInPage-Dcws582A.js"), meta: { public: !0, titleKey: "core.identity.signin.title" } }
318
+ login: { name: "login", path: "/login", component: () => import("./SignInPage-CiStJboK.js"), meta: { public: !0, titleKey: "core.identity.signin.title" } }
319
319
  });
320
320
  function Os(e = {}) {
321
321
  return H({
@@ -334,7 +334,7 @@ function Os(e = {}) {
334
334
  });
335
335
  }
336
336
  const Z = z({
337
- index: { name: "profile", path: "/profile", component: () => import("./ProfilePage-Cc7eiyV2.js"), meta: { titleKey: "core.profile.title" } }
337
+ index: { name: "profile", path: "/profile", component: () => import("./ProfilePage-Dq9lcO5O.js"), meta: { titleKey: "core.profile.title" } }
338
338
  }), Qe = /* @__PURE__ */ E({
339
339
  __name: "ProfileMenuItem",
340
340
  setup(e) {
@@ -358,19 +358,19 @@ function es(e) {
358
358
  return { name: `users.record.${e.path}`, path: e.path, component: s, meta: { ...e.meta } };
359
359
  }
360
360
  const W = "iam.user:view", qs = "iam.user:manage", ss = "iam.user.activity:view", ee = z({
361
- index: { name: "users.index", path: "/users", component: () => import("./UsersList-1IeQnvOL.js"), meta: { access: W, titleKey: "core.users.title" } },
361
+ index: { name: "users.index", path: "/users", component: () => import("./UsersList-BulNu4aE.js"), meta: { access: W, titleKey: "core.users.title" } },
362
362
  record: {
363
363
  name: "users.record",
364
364
  path: "/users/:id",
365
- component: () => import("./UserRecord-AtZIwCO9.js"),
365
+ component: () => import("./UserRecord-DGq_PPy1.js"),
366
366
  meta: { access: W, titleKey: "core.users.title", remountOnParam: "id" },
367
367
  children: [
368
- { name: "users.record.general", path: "general", component: () => import("./General-Dbc3qDRz.js"), meta: { section: { labelKey: "core.users.sections.general", icon: "user3Line", groupKey: "core.users.section_groups.person" } } },
369
- { name: "users.record.signin", path: "signin", component: () => import("./SignIn-BR8-RVIk.js"), meta: { section: { labelKey: "core.users.sections.signin", icon: "key2Line", groupKey: "core.users.section_groups.access" } } },
370
- { name: "users.record.sessions", path: "sessions", component: () => import("./Sessions-DSDcj8Yd.js"), meta: { section: { labelKey: "core.users.sections.sessions", icon: "deviceLine", groupKey: "core.users.section_groups.access" } } },
371
- { name: "users.record.signins", path: "signins", component: () => import("./SignIns-3u7YgKqh.js"), meta: { section: { labelKey: "core.users.sections.signins", icon: "timeFill", groupKey: "core.users.section_groups.activity" } } },
372
- { name: "users.record.changes", path: "changes", component: () => import("./Changes-DW_3-MwX.js"), meta: { section: { labelKey: "core.users.sections.changes", icon: "edit", groupKey: "core.users.section_groups.activity" } } },
373
- { name: "users.record.activity", path: "activity", component: () => import("./Activity-Cu_mAn_m.js"), meta: { access: ss, section: { labelKey: "core.users.sections.activity", icon: "listCheck", groupKey: "core.users.section_groups.activity" } } }
368
+ { name: "users.record.general", path: "general", component: () => import("./General-hdmVP72B.js"), meta: { section: { labelKey: "core.users.sections.general", icon: "user3Line", groupKey: "core.users.section_groups.person" } } },
369
+ { name: "users.record.signin", path: "signin", component: () => import("./SignIn-Dp8Ji0_r.js"), meta: { section: { labelKey: "core.users.sections.signin", icon: "key2Line", groupKey: "core.users.section_groups.access" } } },
370
+ { name: "users.record.sessions", path: "sessions", component: () => import("./Sessions-B1eKG_I2.js"), meta: { section: { labelKey: "core.users.sections.sessions", icon: "deviceLine", groupKey: "core.users.section_groups.access" } } },
371
+ { name: "users.record.signins", path: "signins", component: () => import("./SignIns-Bo7R2Coi.js"), meta: { section: { labelKey: "core.users.sections.signins", icon: "timeFill", groupKey: "core.users.section_groups.activity" } } },
372
+ { name: "users.record.changes", path: "changes", component: () => import("./Changes-BdR0R20V.js"), meta: { section: { labelKey: "core.users.sections.changes", icon: "edit", groupKey: "core.users.section_groups.activity" } } },
373
+ { name: "users.record.activity", path: "activity", component: () => import("./Activity-CI-l_OFl.js"), meta: { access: ss, section: { labelKey: "core.users.sections.activity", icon: "listCheck", groupKey: "core.users.section_groups.activity" } } }
374
374
  ]
375
375
  }
376
376
  });
@@ -16,7 +16,7 @@ import { _ as Oe } from "./AsyncSection.vue_vue_type_script_setup_true_lang-Blj6
16
16
  import { u as Ae } from "./useLoad-M7V-AVwR.js";
17
17
  import { _ as De, a as Ke } from "./SelectField.vue_vue_type_script_setup_true_lang-C3FbRQW7.js";
18
18
  import { _ as Be } from "./SegmentedField.vue_vue_type_script_setup_true_lang-Dg-_ZjgR.js";
19
- import { u as Pe, _ as Ue } from "./useCommand-CT1RF_IB.js";
19
+ import { u as Pe, _ as Ue } from "./useCommand-Cj-APj-P.js";
20
20
  import { u as Fe } from "./platform-q3cjODLx.js";
21
21
  import { _ as Ge } from "./IconTile.vue_vue_type_script_setup_true_lang-_FXvaj93.js";
22
22
  import { u as Me } from "./mediaQuery-CygcXmFW.js";
@@ -43,12 +43,12 @@ const C = {
43
43
  viewAccess: "iam.user:view",
44
44
  manageBindings: "iam.user:manage"
45
45
  }, re = Ee({
46
- roles: { name: "access.roles", path: "/iam/roles", component: () => import("./RolesPage-eb4gqxdW.js"), meta: { access: F.viewRoles, titleKey: "core.access.title" } },
47
- newRole: { name: "access.roles.new", path: "/iam/roles/new", component: () => import("./NewRolePage-DPHFJ0I8.js"), meta: { access: F.manageRoles, titleKey: "core.access.new_title" } },
46
+ roles: { name: "access.roles", path: "/iam/roles", component: () => import("./RolesPage-BRm5xDw7.js"), meta: { access: F.viewRoles, titleKey: "core.access.title" } },
47
+ newRole: { name: "access.roles.new", path: "/iam/roles/new", component: () => import("./NewRolePage-BPeKasOp.js"), meta: { access: F.manageRoles, titleKey: "core.access.new_title" } },
48
48
  role: {
49
49
  name: "access.role",
50
50
  path: "/iam/roles/:ref",
51
- component: () => import("./RolePage-C0jmkQkO.js"),
51
+ component: () => import("./RolePage-BYH-0fVI.js"),
52
52
  // A role's ref (its key, or the id of a custom one) swaps in place when a link leads to another role.
53
53
  meta: { access: F.viewRoles, titleKey: "core.access.title", remountOnParam: "ref" }
54
54
  }
@@ -31,9 +31,9 @@ const M = {
31
31
  deadLettersRetryAll: y("POST", "/v1/events/dead-letters/retry", { permission: "events.deadletter:retry" }),
32
32
  consumers: y("GET", "/v1/events/consumers", { permission: "events.deadletter:view" })
33
33
  }, [ke, ee] = fe("vue-core.notifications"), we = "events.deadletter:view", bt = "events.deadletter:retry", J = Z({
34
- index: { name: "events.deadletters", path: "/events/dead-letters", component: () => import("./DeadLetters-CpcMccCc.js"), meta: { access: we, titleKey: "core.notifications.dead_letters.title" } }
34
+ index: { name: "events.deadletters", path: "/events/dead-letters", component: () => import("./DeadLetters-CRTeoZS1.js"), meta: { access: we, titleKey: "core.notifications.dead_letters.title" } }
35
35
  }), j = Z({
36
- index: { name: "notifications.settings", path: "/profile/notifications", component: () => import("./SettingsPage-BF7MW1GH.js"), meta: { titleKey: "core.notifications.settings.title" } }
36
+ index: { name: "notifications.settings", path: "/profile/notifications", component: () => import("./SettingsPage-0P38Ty4w.js"), meta: { titleKey: "core.notifications.settings.title" } }
37
37
  }), Te = /* @__PURE__ */ z({
38
38
  __name: "SettingsMenuItem",
39
39
  setup(o) {
package/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  /** The version of @wssto2/vue-core (kept equal to package.json by index.test.ts). */
2
- export declare const version = "0.4.23";
2
+ export declare const version = "0.4.25";
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- const o = "0.4.23";
1
+ const o = "0.4.25";
2
2
  export {
3
3
  o as version
4
4
  };
@@ -1,4 +1,4 @@
1
- import { d as s, e as o, n as a, a as i, b as n } from "../index-DBTK_iMB.js";
1
+ import { d as s, e as o, n as a, a as i, b as n } from "../index-tnSTp0cM.js";
2
2
  export {
3
3
  s as deadLettersRoutes,
4
4
  o as eventsRoutes,
@@ -15,8 +15,9 @@ export interface PhotoViewerItem {
15
15
  * and a strip of thumbnails. It is a dialog like `Modal`: the page behind is inert, Tab stays inside, Escape closes and focus goes back
16
16
  * to what opened it. Under reduced motion nothing animates.
17
17
  *
18
- * Keys: ← → photos, + − zoom, 0 fits the screen again, R rotates, Esc closes. `#actions` (given the photo on show) adds your own buttons to the header:
19
- * "Make cover", "Delete".
18
+ * Keys: ← → photos, + − zoom, 0 fits the screen again, R rotates, Esc closes. `#actions` (given the photo on show) adds your own buttons:
19
+ * "Make cover", "Delete". They sit in the header on a wide screen and in a toolbar under the photo on a phone (the header keeps the counter, rotate,
20
+ * download and close); the slot renders in one place at a time.
20
21
  *
21
22
  * <PhotoViewer ref="viewer" :items="photos" title="VW Golf 8" />
22
23
  * <button @click="viewer?.present(index)">…</button> viewer.value?.dismiss()
@@ -27,7 +28,7 @@ type __VLS_Props = {
27
28
  title?: string;
28
29
  };
29
30
  type __VLS_Slots = {
30
- /** Next to the zoom buttons: what the app does with the photo on show (make it the cover, delete it). */
31
+ /** What the app does with the photo on show (make it the cover, delete it): in the header next to the zoom buttons, in a bottom toolbar on a phone. */
31
32
  actions?: (scope: {
32
33
  item: PhotoViewerItem;
33
34
  index: number;
@@ -0,0 +1,22 @@
1
+ /**
2
+ * One of the app's own actions in `PhotoViewer`'s `#actions` slot ("Make cover", "Delete"), styled for the viewer's dark surface in the
3
+ * header and in the phone toolbar (44 px tall). `tone="critical"` is the destructive one, in the danger colour. A disabled action stays
4
+ * focusable (`aria-disabled`), like the viewer's own buttons at the end of their range, so focus does not fall out of the dialog.
5
+ *
6
+ * <PhotoViewer :items="photos"><template #actions="{ index }">
7
+ * <PhotoViewerAction :label="t('makeCover')" @select="makeCover(index)" />
8
+ * <PhotoViewerAction :label="t('delete')" tone="critical" @select="remove(index)" />
9
+ * </template></PhotoViewer>
10
+ */
11
+ type __VLS_Props = {
12
+ label: string;
13
+ /** `critical` for a destructive action (Delete). */
14
+ tone?: "critical";
15
+ disabled?: boolean;
16
+ };
17
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
18
+ select: () => any;
19
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
20
+ onSelect?: (() => any) | undefined;
21
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
22
+ export default _default;
@@ -8,3 +8,4 @@ export { INERT_SKIP_ATTR, useOpenDialogCount } from "./dialogStack";
8
8
  export { INITIAL_FOCUS_SKIP_ATTR, useDialog, type DialogOptions } from "./useDialog";
9
9
  export { COMPACT_MEDIA_QUERY, useCompactPresentation } from "../internal/mediaQuery";
10
10
  export { default as PhotoViewer, type PhotoViewerItem } from "./PhotoViewer.vue";
11
+ export { default as PhotoViewerAction } from "./PhotoViewerAction.vue";
@@ -1,25 +1,49 @@
1
- import { _ as e } from "../AlertDialog.vue_vue_type_script_setup_true_lang-whA4WLdl.js";
2
- import { _ as a } from "../Menu.vue_vue_type_script_setup_true_lang-DsFOeCVe.js";
3
- import { _ as p } from "../Popover.vue_vue_type_script_setup_true_lang-C70GrCP7.js";
4
- import { _ as m } from "../Toaster.vue_vue_type_script_setup_true_lang-55boRLAj.js";
5
- import { _ as x } from "../Tooltip.vue_vue_type_script_setup_true_lang-mErNPt8e.js";
6
- import { t as T } from "../toast-CqSDTWRX.js";
7
- import { I as i, u as A } from "../dialogStack-DZZg55w0.js";
8
- import { I as P, u as l } from "../useDialog-CXR3hN0G.js";
9
- import { C as D, u as R } from "../mediaQuery-CygcXmFW.js";
10
- import { _ as E } from "../PhotoViewer.vue_vue_type_script_setup_true_lang-QPCW3Xi6.js";
1
+ import { _ as x } from "../AlertDialog.vue_vue_type_script_setup_true_lang-whA4WLdl.js";
2
+ import { _ as w } from "../Menu.vue_vue_type_script_setup_true_lang-DsFOeCVe.js";
3
+ import { _ as I } from "../Popover.vue_vue_type_script_setup_true_lang-C70GrCP7.js";
4
+ import { _ as v } from "../Toaster.vue_vue_type_script_setup_true_lang-55boRLAj.js";
5
+ import { _ as P } from "../Tooltip.vue_vue_type_script_setup_true_lang-mErNPt8e.js";
6
+ import { t as y } from "../toast-CqSDTWRX.js";
7
+ import { I as k, u as E } from "../dialogStack-DZZg55w0.js";
8
+ import { I as S, u as B } from "../useDialog-CXR3hN0G.js";
9
+ import { C as O, u as V } from "../mediaQuery-CygcXmFW.js";
10
+ import { _ as N } from "../PhotoViewer.vue_vue_type_script_setup_true_lang-CY5EZiyK.js";
11
+ import { defineComponent as s, openBlock as r, createElementBlock as n, normalizeClass as l, toDisplayString as c } from "vue";
12
+ const p = ["aria-disabled"], m = /* @__PURE__ */ s({
13
+ __name: "PhotoViewerAction",
14
+ props: {
15
+ label: {},
16
+ tone: {},
17
+ disabled: { type: Boolean }
18
+ },
19
+ emits: ["select"],
20
+ setup(o, { emit: t }) {
21
+ const e = o, i = t;
22
+ function a() {
23
+ e.disabled || i("select");
24
+ }
25
+ return (f, u) => (r(), n("button", {
26
+ type: "button",
27
+ "aria-disabled": e.disabled || void 0,
28
+ "data-part": "photo-viewer-action",
29
+ class: l(["flex min-h-11 shrink-0 cursor-pointer items-center justify-center rounded-full bg-white/8 px-4 text-subheadline font-medium whitespace-nowrap transition-colors duration-motion-fast hover:bg-white/16 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[#6ee7b7] aria-disabled:cursor-default aria-disabled:opacity-40 aria-disabled:hover:bg-white/8", e.tone === "critical" ? "text-[#ff8a80]" : "text-[#f1f5f3]"]),
30
+ onClick: a
31
+ }, c(e.label), 11, p));
32
+ }
33
+ });
11
34
  export {
12
- e as AlertDialog,
13
- D as COMPACT_MEDIA_QUERY,
14
- i as INERT_SKIP_ATTR,
15
- P as INITIAL_FOCUS_SKIP_ATTR,
16
- a as Menu,
17
- E as PhotoViewer,
18
- p as Popover,
19
- m as Toaster,
20
- x as Tooltip,
21
- T as toast,
22
- R as useCompactPresentation,
23
- l as useDialog,
24
- A as useOpenDialogCount
35
+ x as AlertDialog,
36
+ O as COMPACT_MEDIA_QUERY,
37
+ k as INERT_SKIP_ATTR,
38
+ S as INITIAL_FOCUS_SKIP_ATTR,
39
+ w as Menu,
40
+ N as PhotoViewer,
41
+ m as PhotoViewerAction,
42
+ I as Popover,
43
+ v as Toaster,
44
+ P as Tooltip,
45
+ y as toast,
46
+ V as useCompactPresentation,
47
+ B as useDialog,
48
+ E as useOpenDialogCount
25
49
  };
@@ -1,5 +1,5 @@
1
1
  import { a, r as o } from "./http-D_D9YbLH.js";
2
- import { i as r } from "./index--CxZ33h0.js";
2
+ import { i as r } from "./index-BmowiT1y.js";
3
3
  const n = ["active", "locked", "inactive", "all"];
4
4
  function l(i) {
5
5
  return a({