@wssto2/vue-core 0.12.1 → 0.13.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 (122) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/README.md +4 -2
  3. package/dist/{AccessGate.vue_vue_type_script_setup_true_lang-CzQbD2Pc.js → AccessGate.vue_vue_type_script_setup_true_lang-DEzXovsY.js} +1 -1
  4. package/dist/{Activity-CdkJW68R.js → Activity-ChfxdvXf.js} +24 -23
  5. package/dist/{AdaptivePageShell.vue_vue_type_script_setup_true_lang-D5i77H6S.js → AdaptivePageShell.vue_vue_type_script_setup_true_lang-lPj9hPqV.js} +33 -33
  6. package/dist/{Changes-DxK_QfiB.js → Changes-BCa43_mO.js} +18 -17
  7. package/dist/{CollectionPage.vue_vue_type_script_setup_true_lang-x0jyJ01f.js → CollectionPage.vue_vue_type_script_setup_true_lang-C1GCvyZx.js} +6 -6
  8. package/dist/{DataTable.vue_vue_type_script_setup_true_lang-C_ZytnW-.js → DataTable.vue_vue_type_script_setup_true_lang-B9r9M5Gt.js} +1 -1
  9. package/dist/{DateField.vue_vue_type_script_setup_true_lang-CeNwBbJT.js → DateField.vue_vue_type_script_setup_true_lang-B5UUY1OO.js} +2 -2
  10. package/dist/{DeadLetters-DnA7LP1w.js → DeadLetters-wFTqhISU.js} +5 -5
  11. package/dist/{General-2matxl2Y.js → General-jW7u4MjH.js} +16 -15
  12. package/dist/{IncidentRecord-Bt3G4HlX.js → IncidentRecord-CXzgLKqI.js} +6 -6
  13. package/dist/{IncidentsList-2iwgqp9J.js → IncidentsList-D1MySyXb.js} +6 -6
  14. package/dist/{NewRolePage-DhGFwvk3.js → NewRolePage-CQ5UVaHs.js} +3 -3
  15. package/dist/{NumberField.vue_vue_type_script_setup_true_lang-B3UrXNqH.js → NumberField.vue_vue_type_script_setup_true_lang-YVgf5CP6.js} +1 -1
  16. package/dist/{PersonAccess.vue_vue_type_script_setup_true_lang-DbGZSNQc.js → PersonAccess.vue_vue_type_script_setup_true_lang-CWCt9_dM.js} +2 -2
  17. package/dist/{ProfilePage-CpuyDBAv.js → ProfilePage-Ca3x3UAH.js} +79 -77
  18. package/dist/{RecordHeader.vue_vue_type_script_setup_true_lang-DqGc3Jyo.js → RecordHeader.vue_vue_type_script_setup_true_lang-Do_ATJwT.js} +1 -1
  19. package/dist/{ResourcePage.vue_vue_type_script_setup_true_lang-DljhsTU4.js → ResourcePage.vue_vue_type_script_setup_true_lang-Coz91xht.js} +1 -1
  20. package/dist/{RoleEditor.vue_vue_type_script_setup_true_lang-C0FIotFA.js → RoleEditor.vue_vue_type_script_setup_true_lang-d_aaeXTT.js} +2 -2
  21. package/dist/{RolePage-DaNv049g.js → RolePage-BUj1w1m1.js} +5 -5
  22. package/dist/{RolesPage-6hlzJes_.js → RolesPage-NKzBUsrM.js} +3 -3
  23. package/dist/{SectionNavigator.vue_vue_type_script_setup_true_lang-Dh3sXUt_.js → SectionNavigator.vue_vue_type_script_setup_true_lang-DfKEhTFv.js} +2 -2
  24. package/dist/{ServiceAccountDialog.vue_vue_type_script_setup_true_lang-FJbWxME_.js → ServiceAccountDialog.vue_vue_type_script_setup_true_lang-4nbhEpv_.js} +10 -9
  25. package/dist/{ServiceAccountRecord-0-JF5lRx.js → ServiceAccountRecord-ClbyeLhL.js} +8 -8
  26. package/dist/{ServiceAccountsList-DcsnOcf-.js → ServiceAccountsList-B2VDnYxD.js} +5 -5
  27. package/dist/{Sessions-DgWhpk-i.js → Sessions-BjkciyHH.js} +23 -21
  28. package/dist/{SettingsPage-BXPWATYU.js → SettingsPage-Csb14qsx.js} +7 -7
  29. package/dist/{SignIn-DPoUwHZd.js → SignIn-DPFMv4C7.js} +14 -12
  30. package/dist/{SignInPage-OyrVemro.js → SignInPage-DukoFqkt.js} +2 -2
  31. package/dist/{SignIns-BMDrZVVp.js → SignIns-DvdpNkiS.js} +23 -22
  32. package/dist/{TimeField.vue_vue_type_script_setup_true_lang-D-Em4glH.js → TimeField.vue_vue_type_script_setup_true_lang-DpDXHH7u.js} +2 -2
  33. package/dist/{Timestamp.vue_vue_type_script_setup_true_lang-ClZAAUMd.js → Timestamp.vue_vue_type_script_setup_true_lang-DlEUKWra.js} +1 -1
  34. package/dist/{UserRecord-BW-gdCqi.js → UserRecord-B9SeSWQh.js} +57 -55
  35. package/dist/{UsersList-B3ZF_1Dj.js → UsersList-CREG8q3l.js} +4 -4
  36. package/dist/access/index.js +4 -4
  37. package/dist/app/application.d.ts +14 -6
  38. package/dist/app/current.d.ts +11 -0
  39. package/dist/app/environment.d.ts +8 -0
  40. package/dist/app/index.d.ts +1 -0
  41. package/dist/app/index.js +14 -12
  42. package/dist/application-DomS6sbx.js +435 -0
  43. package/dist/collection/http.d.ts +16 -1
  44. package/dist/collection/index.d.ts +1 -1
  45. package/dist/collection/index.js +34 -32
  46. package/dist/content/Money.vue.d.ts +1 -1
  47. package/dist/content/index.js +151 -158
  48. package/dist/{contributions-CeG4bszd.js → contributions-obnyn03x.js} +1 -1
  49. package/dist/current-B0lHKTWr.js +17 -0
  50. package/dist/form/DateField.vue.d.ts +2 -2
  51. package/dist/form/DateTimeField.vue.d.ts +2 -2
  52. package/dist/form/MoneyField.vue.d.ts +1 -1
  53. package/dist/form/NumberField.vue.d.ts +1 -1
  54. package/dist/form/date/MonthYearPanel.vue.d.ts +1 -1
  55. package/dist/form/date/days.d.ts +3 -3
  56. package/dist/form/index.d.ts +2 -0
  57. package/dist/form/index.js +1111 -1081
  58. package/dist/form/zodErrorMap.d.ts +35 -0
  59. package/dist/format/format.d.ts +51 -6
  60. package/dist/format/index.d.ts +1 -1
  61. package/dist/format/index.js +1 -1
  62. package/dist/format-DoKs29bZ.js +118 -0
  63. package/dist/{guards-Biv_SlGn.js → guards-DGcSfTEh.js} +1 -1
  64. package/dist/http-DOEfFCDA.js +107 -0
  65. package/dist/i18n/index.js +15 -15
  66. package/dist/identity/index.d.ts +2 -0
  67. package/dist/identity/index.js +43 -40
  68. package/dist/identity/usePreferences.d.ts +19 -0
  69. package/dist/incidents/clientErrorReporter.d.ts +2 -1
  70. package/dist/incidents/index.js +1 -1
  71. package/dist/{index-kEHY7hcG.js → index-CRxU_Wh2.js} +61 -61
  72. package/dist/{index-Cq9TuOqH.js → index-DZikGJ8L.js} +457 -511
  73. package/dist/{index-ClJeyW3F.js → index-D_yyd4C2.js} +4 -4
  74. package/dist/index.d.ts +1 -1
  75. package/dist/index.js +1 -1
  76. package/dist/internal/intlLocale.d.ts +5 -2
  77. package/dist/modules/identity/entities.d.ts +4 -0
  78. package/dist/modules/identity/routes.d.ts +5 -2
  79. package/dist/modules/identity/schemas.d.ts +6 -2
  80. package/dist/{navigation-TnVFYRaX.js → navigation-CctcxT51.js} +1 -1
  81. package/dist/{neighbors-OyvGi233.js → neighbors-Csfan8Ho.js} +1 -1
  82. package/dist/notifications/index.js +1 -1
  83. package/dist/onboarding/Tip.vue.d.ts +41 -0
  84. package/dist/onboarding/index.d.ts +1 -0
  85. package/dist/onboarding/index.js +145 -0
  86. package/dist/onboarding/tips.d.ts +5 -0
  87. package/dist/page/index.js +3 -3
  88. package/dist/phone/index.js +74 -74
  89. package/dist/phone/phone.d.ts +3 -3
  90. package/dist/platform/httpSession.d.ts +1 -1
  91. package/dist/platform/index.d.ts +2 -0
  92. package/dist/platform/index.js +16 -13
  93. package/dist/platform/preferences.d.ts +35 -0
  94. package/dist/platform/session.d.ts +6 -1
  95. package/dist/platform-DtISOEt7.js +284 -0
  96. package/dist/playwright/session.d.ts +2 -0
  97. package/dist/preferences-hYhrw8Uy.js +91 -0
  98. package/dist/resource/index.d.ts +1 -0
  99. package/dist/resource/index.js +24 -8
  100. package/dist/resource/read.d.ts +16 -0
  101. package/dist/router/index.js +3 -3
  102. package/dist/{rowLayout-BsKEzEME.js → rowLayout-y1IB_h2r.js} +2 -2
  103. package/dist/{sections-CvUwZ-S1.js → sections-fkW_IJLc.js} +1 -1
  104. package/dist/{serverMessages-B6GHgi40.js → serverMessages-Ddghrewh.js} +1 -1
  105. package/dist/shell/darkMode.d.ts +13 -8
  106. package/dist/shell/index.js +396 -384
  107. package/dist/{state-6KSYsVw0.js → state-CXMexi0l.js} +1 -1
  108. package/dist/styles.css +1 -1
  109. package/dist/testing/app.d.ts +11 -0
  110. package/dist/testing/format.d.ts +4 -2
  111. package/dist/testing/index.d.ts +1 -1
  112. package/dist/testing/index.js +96 -89
  113. package/dist/testing/platform.d.ts +2 -0
  114. package/dist/usePreferences-B8LIZp_f.js +47 -0
  115. package/dist/{useTypedEntry-C_Bk4sI0.js → useTypedEntry-DKs8I1yP.js} +279 -280
  116. package/package.json +6 -2
  117. package/src/styles/components.css +17 -0
  118. package/dist/application-CuzT-0vW.js +0 -420
  119. package/dist/format-D8KUBmbS.js +0 -87
  120. package/dist/http-Dm0uXY9O.js +0 -95
  121. package/dist/intlLocale-CeRU44qJ.js +0 -4
  122. package/dist/platform-BQOX_Ntw.js +0 -283
@@ -2,7 +2,7 @@ import { r as v } from "./route-goWMxDUN.js";
2
2
  import { d as ve, p as me } from "./feature-DdUAfyi4.js";
3
3
  import { ref as C, readonly as $, defineComponent as q, openBlock as _, createBlock as U, unref as s, shallowRef as z, withCtx as A, createTextVNode as X, toDisplayString as L, mergeProps as Z, computed as N, createElementBlock as S, createElementVNode as P, createCommentVNode as R, createVNode as T, Fragment as G, renderList as be, normalizeClass as H, useTemplateRef as he, createSlots as ye } from "vue";
4
4
  import { d as ge } from "./context-Ch1r4fdN.js";
5
- import { u as ee } from "./platform-BQOX_Ntw.js";
5
+ import { u as ee } from "./platform-DtISOEt7.js";
6
6
  import { d as te } from "./defineRoutes-BGAdiIrt.js";
7
7
  import { useI18n as I } from "vue-i18n";
8
8
  import { _ as _e } from "./AccountMenuItem.vue_vue_type_script_setup_true_lang-BIYgaihv.js";
@@ -13,7 +13,7 @@ import { _ as Se } from "./Popover.vue_vue_type_script_setup_true_lang-C20Hf3Hl.
13
13
  import { _ as J } from "./HeaderAction.vue_vue_type_script_setup_true_lang-Da59TLBh.js";
14
14
  import { useRouter as Te } from "vue-router";
15
15
  import { _ as K } from "./Button.vue_vue_type_script_setup_true_lang-C74hcb0N.js";
16
- import { u as Ee } from "./format-D8KUBmbS.js";
16
+ import { u as Ee } from "./format-DoKs29bZ.js";
17
17
  import { _ as Pe } from "./Icon.vue_vue_type_script_lang-BhhsFYwp.js";
18
18
  import { _ as Ce } from "./AsyncSection.vue_vue_type_script_setup_true_lang-DGzQ-Snp.js";
19
19
  const E = {
@@ -135,9 +135,9 @@ function Me(n = ee().http, t = W()) {
135
135
  return { state: $(e), hash: $(i), busy: $(a), inspect: c, enable: u, disable: g };
136
136
  }
137
137
  const Ne = "events.deadletter:view", $t = "events.deadletter:retry", Y = te({
138
- index: { name: "events.deadletters", path: "/events/dead-letters", component: () => import("./DeadLetters-DnA7LP1w.js"), meta: { access: Ne, titleKey: "core.notifications.dead_letters.title" } }
138
+ index: { name: "events.deadletters", path: "/events/dead-letters", component: () => import("./DeadLetters-wFTqhISU.js"), meta: { access: Ne, titleKey: "core.notifications.dead_letters.title" } }
139
139
  }), j = te({
140
- index: { name: "notifications.settings", path: "/profile/notifications", component: () => import("./SettingsPage-BXPWATYU.js"), meta: { titleKey: "core.notifications.settings.title" } }
140
+ index: { name: "notifications.settings", path: "/profile/notifications", component: () => import("./SettingsPage-Csb14qsx.js"), meta: { titleKey: "core.notifications.settings.title" } }
141
141
  }), Oe = /* @__PURE__ */ q({
142
142
  __name: "SettingsMenuItem",
143
143
  setup(n) {
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.12.1";
2
+ export declare const version = "0.13.0";
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- const o = "0.12.1";
1
+ const o = "0.13.0";
2
2
  export {
3
3
  o as version
4
4
  };
@@ -1,2 +1,5 @@
1
- /** The locale to give `Intl` for the app's active one. Not for a language's own name: `DisplayNames` knows `bs` ("bosanski"). */
2
- export declare const intlLocale: (locale: string) => string;
1
+ /**
2
+ * The locale to give `Intl` for the app's active one; `overrides` is the application's own map (`en` → `en-GB`) and wins over the library's.
3
+ * Not for a language's own name: `DisplayNames` knows `bs` ("bosanski").
4
+ */
5
+ export declare const intlLocale: (locale: string, overrides?: Readonly<Record<string, string>>) => string;
@@ -63,6 +63,9 @@ export type PersonRef = {
63
63
  id: number;
64
64
  name: string;
65
65
  };
66
+ export type PreferencesResponse = {
67
+ preferences: unknown;
68
+ };
66
69
  export type ProfileResponse = {
67
70
  id: number;
68
71
  login: string;
@@ -97,6 +100,7 @@ export type SessionResponse = {
97
100
  impersonator?: Impersonator | null;
98
101
  access: MyAccess;
99
102
  navigation?: Node[];
103
+ preferences?: unknown;
100
104
  };
101
105
  export type SignInEvent = "signed_in" | "wrong_password" | "locked_out" | "refused_inactive" | "signed_in_as" | "unlocked" | "signed_out_everywhere" | "session_revoked";
102
106
  export type SignInRow = {
@@ -1,5 +1,5 @@
1
1
  import { type ListResult, type QueryValue } from "../../client";
2
- import type { ActivityRow, ChangeRow, DeactivateResult, PendingEmail, ProfileResponse, SessionList, SessionResponse, SignInRow, UnlockResult, UserDetail, UserRow } from "./entities";
2
+ import type { ActivityRow, ChangeRow, DeactivateResult, PendingEmail, PreferencesResponse, ProfileResponse, SessionList, SessionResponse, SignInRow, UnlockResult, UserDetail, UserRow } from "./entities";
3
3
  export declare const identityRoutes: {
4
4
  readonly login: import("../../client").ApiRoute<{
5
5
  login: string;
@@ -24,7 +24,7 @@ export declare const identityRoutes: {
24
24
  order_dir?: string | undefined;
25
25
  page?: number | undefined;
26
26
  per_page?: number | undefined;
27
- last_sign_in?: "idle" | "never" | undefined;
27
+ last_sign_in?: "never" | "idle" | undefined;
28
28
  } & Record<string, QueryValue>, ListResult<UserRow>, unknown>;
29
29
  readonly usersShow: import("../../client").ApiRoute<{
30
30
  id: number;
@@ -119,4 +119,7 @@ export declare const identityRoutes: {
119
119
  readonly profileRevokeSession: import("../../client").ApiRoute<{
120
120
  session_id: number;
121
121
  }, void, unknown>;
122
+ readonly preferencesUpdate: import("../../client").ApiRoute<{
123
+ preferences: unknown;
124
+ }, PreferencesResponse, unknown>;
122
125
  };
@@ -55,8 +55,8 @@ export declare const DeactivateUserInputSchema: z.ZodObject<{
55
55
  }, z.core.$strip>;
56
56
  export type DeactivateUserInput = z.infer<typeof DeactivateUserInputSchema>;
57
57
  export declare const LastSignInFilterSchema: z.ZodEnum<{
58
- idle: "idle";
59
58
  never: "never";
59
+ idle: "idle";
60
60
  }>;
61
61
  export type LastSignInFilter = z.infer<typeof LastSignInFilterSchema>;
62
62
  export declare const UserViewSchema: z.ZodEnum<{
@@ -79,8 +79,8 @@ export declare const ListUsersInputSchema: z.ZodObject<{
79
79
  page: z.ZodOptional<z.ZodNumber>;
80
80
  per_page: z.ZodOptional<z.ZodNumber>;
81
81
  last_sign_in: z.ZodOptional<z.ZodEnum<{
82
- idle: "idle";
83
82
  never: "never";
83
+ idle: "idle";
84
84
  }>>;
85
85
  }, z.core.$strip>;
86
86
  export type ListUsersInput = z.infer<typeof ListUsersInputSchema>;
@@ -135,6 +135,10 @@ export declare const SignInsInputSchema: z.ZodObject<{
135
135
  per_page: z.ZodOptional<z.ZodNumber>;
136
136
  }, z.core.$strip>;
137
137
  export type SignInsInput = z.infer<typeof SignInsInputSchema>;
138
+ export declare const UpdatePreferencesInputSchema: z.ZodObject<{
139
+ preferences: z.ZodUnknown;
140
+ }, z.core.$strip>;
141
+ export type UpdatePreferencesInput = z.infer<typeof UpdatePreferencesInputSchema>;
138
142
  export declare const UpdateProfileInputSchema: z.ZodObject<{
139
143
  name: z.ZodString;
140
144
  phone: z.ZodOptional<z.ZodString>;
@@ -1,6 +1,6 @@
1
1
  import { computed as k } from "vue";
2
2
  import { d as y } from "./context-Ch1r4fdN.js";
3
- import { h as N } from "./platform-BQOX_Ntw.js";
3
+ import { h as N } from "./platform-DtISOEt7.js";
4
4
  function F(l, a = {}) {
5
5
  const i = /* @__PURE__ */ new Map(), o = [];
6
6
  for (const e of l) {
@@ -1,7 +1,7 @@
1
1
  import { computed as j, ref as z, shallowRef as I, watch as F, getCurrentScope as J, onScopeDispose as Q } from "vue";
2
2
  import { useRoute as O } from "vue-router";
3
3
  import { i as N } from "./error-CD7x0Jrz.js";
4
- import { L as k, d as B, e as D, o as U, q as V } from "./state-6KSYsVw0.js";
4
+ import { L as k, d as B, e as D, o as U, q as V } from "./state-CXMexi0l.js";
5
5
  function K(l, t, n, g) {
6
6
  return typeof t == "string" ? t : { ...t, query: { ...t.query, [n]: D(l, g) } };
7
7
  }
@@ -1,4 +1,4 @@
1
- import { d as s, e as a, n as o, b as i, c as n, f as u } from "../index-ClJeyW3F.js";
1
+ import { d as s, e as a, n as o, b as i, c as n, f as u } from "../index-D_yyd4C2.js";
2
2
  export {
3
3
  s as deadLettersRoutes,
4
4
  a as eventsRoutes,
@@ -0,0 +1,41 @@
1
+ import { type IconName } from "../icon";
2
+ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<{
3
+ /** Which tip this is; what is stored once it is closed. */
4
+ id: string;
5
+ /** A CSS selector (the first visible match) or the element itself. */
6
+ anchor: string | Element | null;
7
+ title: string;
8
+ /** The sentence under the title; or the default slot. */
9
+ text?: string;
10
+ /** False holds the tip back (something else comes first). */
11
+ ready?: boolean;
12
+ /** Where in the preferences the closed ids are kept, as a path of keys. */
13
+ dismissedAt?: readonly string[];
14
+ icon?: IconName;
15
+ }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
16
+ /** Which tip this is; what is stored once it is closed. */
17
+ id: string;
18
+ /** A CSS selector (the first visible match) or the element itself. */
19
+ anchor: string | Element | null;
20
+ title: string;
21
+ /** The sentence under the title; or the default slot. */
22
+ text?: string;
23
+ /** False holds the tip back (something else comes first). */
24
+ ready?: boolean;
25
+ /** Where in the preferences the closed ids are kept, as a path of keys. */
26
+ dismissedAt?: readonly string[];
27
+ icon?: IconName;
28
+ }> & Readonly<{}>, {
29
+ text: string;
30
+ icon: IconName;
31
+ ready: boolean;
32
+ dismissedAt: readonly string[];
33
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
34
+ default?: (props: {}) => any;
35
+ }>;
36
+ export default _default;
37
+ type __VLS_WithSlots<T, S> = T & {
38
+ new (): {
39
+ $slots: S;
40
+ };
41
+ };
@@ -0,0 +1 @@
1
+ export { default as Tip } from "./Tip.vue";
@@ -0,0 +1,145 @@
1
+ import { defineComponent as L, ref as d, computed as x, watch as v, nextTick as H, onBeforeUnmount as O, openBlock as F, createBlock as j, Teleport as q, createVNode as w, Transition as U, withCtx as Y, createElementBlock as G, withKeys as J, withModifiers as Q, normalizeStyle as M, unref as n, createElementVNode as l, normalizeClass as W, toDisplayString as k, renderSlot as X, createTextVNode as Z, createCommentVNode as ee } from "vue";
2
+ import { useI18n as te } from "vue-i18n";
3
+ import { _ as V } from "../Icon.vue_vue_type_script_lang-BhhsFYwp.js";
4
+ import { u as ne } from "../usePreferences-B8LIZp_f.js";
5
+ import { u as oe, a as h } from "../anchored-DpuUwf-9.js";
6
+ const ie = (o) => typeof o == "object" && o !== null && !Array.isArray(o);
7
+ function se(o, e) {
8
+ const s = e.reduce((i, r) => ie(i) ? i[r] : void 0, o);
9
+ return Array.isArray(s) ? s.filter((i) => typeof i == "string") : [];
10
+ }
11
+ function ae(o, e) {
12
+ return o.reduceRight((s, i) => ({ [i]: s }), e);
13
+ }
14
+ const le = ["aria-label", "data-test", "onKeydown"], re = { class: "grid size-8 shrink-0 place-items-center rounded-lg bg-tint-soft text-content-link" }, ce = { class: "flex min-w-0 flex-1 flex-col gap-1" }, de = { class: "text-subheadline font-semibold" }, ue = { class: "text-footnote text-content-muted" }, fe = ["data-test"], me = ["aria-label"], c = d(null), be = /* @__PURE__ */ L({
15
+ __name: "Tip",
16
+ props: {
17
+ id: {},
18
+ anchor: {},
19
+ title: {},
20
+ text: { default: void 0 },
21
+ ready: { type: Boolean, default: !0 },
22
+ dismissedAt: { default: () => ["tips_dismissed"] },
23
+ icon: { default: "informationLine" }
24
+ },
25
+ setup(o) {
26
+ const e = o, { t: s } = te(), i = ne(), r = d(null), S = d(null), A = d(null), a = d(null);
27
+ let u = null;
28
+ const E = x(() => se(i.value.value, e.dismissedAt)), y = x(() => e.ready && !E.value.includes(e.id)), T = x(() => y.value && a.value !== null && c.value === e.id), P = (t) => t instanceof HTMLElement && t.getClientRects().length > 0 && getComputedStyle(t).visibility !== "hidden", z = () => typeof e.anchor == "string" ? [...document.querySelectorAll(e.anchor)].find(P) ?? null : e.anchor, C = 150, R = 6e3;
29
+ function $() {
30
+ f();
31
+ const t = z();
32
+ if (t) return B(t);
33
+ let b = 0;
34
+ u = setInterval(() => {
35
+ const p = z();
36
+ (p || ++b * C > R) && (f(), B(p));
37
+ }, C);
38
+ }
39
+ function B(t) {
40
+ a.value = t, I();
41
+ }
42
+ function f() {
43
+ u && clearInterval(u), u = null;
44
+ }
45
+ function I() {
46
+ y.value && a.value && c.value === null && (c.value = e.id);
47
+ }
48
+ function N() {
49
+ c.value === e.id && (c.value = null);
50
+ }
51
+ v([y, () => e.anchor], ([t]) => t ? $() : (f(), N()), { immediate: !0 }), v(c, (t) => t === null && I());
52
+ const { style: D, arrowStyle: K, resolvedPlacement: m } = oe(r, {
53
+ reference: () => a.value,
54
+ placement: () => "bottom-start",
55
+ offset: 12,
56
+ padding: 12,
57
+ arrow: A
58
+ });
59
+ v(T, (t, b, p) => {
60
+ const g = a.value;
61
+ !t || !g || (g.setAttribute("data-tip-anchor", ""), p(() => g.removeAttribute("data-tip-anchor")));
62
+ }, { immediate: !0 }), v(r, (t) => {
63
+ t && (document.activeElement === null || document.activeElement === document.body) && H(() => S.value?.focus({ preventScroll: !0 }));
64
+ });
65
+ function _() {
66
+ const t = r.value?.contains(document.activeElement) === !0;
67
+ i.save(ae(e.dismissedAt, [.../* @__PURE__ */ new Set([...E.value, e.id])])), t && a.value instanceof HTMLElement && a.value.focus({ preventScroll: !0 });
68
+ }
69
+ return O(() => {
70
+ f(), N();
71
+ }), (t, b) => (F(), j(q, { to: "body" }, [
72
+ w(U, {
73
+ "enter-active-class": "transition-opacity duration-motion-fast ease-motion-standard",
74
+ "enter-from-class": "opacity-0",
75
+ "leave-active-class": "pointer-events-none transition-opacity duration-motion-fast ease-motion-standard",
76
+ "leave-to-class": "opacity-0"
77
+ }, {
78
+ default: Y(() => [
79
+ T.value ? (F(), G("div", {
80
+ key: 0,
81
+ ref_key: "panel",
82
+ ref: r,
83
+ role: "dialog",
84
+ tabindex: "-1",
85
+ "aria-label": e.title,
86
+ "data-test": `tip-${e.id}`,
87
+ style: M(n(D)),
88
+ class: "z-1000 flex w-80 max-w-[calc(100vw-1.5rem)] gap-3 rounded-2xl bg-surface-cell p-4 text-content-strong shadow-dialog ring-1 ring-border-separator outline-none",
89
+ onKeydown: J(Q(_, ["stop", "prevent"]), ["esc"])
90
+ }, [
91
+ l("span", {
92
+ ref_key: "arrowEl",
93
+ ref: A,
94
+ "aria-hidden": "true",
95
+ class: W(["absolute size-3 rotate-45 bg-surface-cell", {
96
+ "-bottom-1.5": n(h)(n(m)) === "bottom",
97
+ "-top-1.5": n(h)(n(m)) === "top",
98
+ "-left-1.5": n(h)(n(m)) === "left",
99
+ "-right-1.5": n(h)(n(m)) === "right"
100
+ }]),
101
+ style: M(n(K))
102
+ }, null, 6),
103
+ l("span", re, [
104
+ w(n(V), {
105
+ name: e.icon,
106
+ size: 16
107
+ }, null, 8, ["name"])
108
+ ]),
109
+ l("div", ce, [
110
+ l("span", de, k(e.title), 1),
111
+ l("span", ue, [
112
+ X(t.$slots, "default", {}, () => [
113
+ Z(k(e.text), 1)
114
+ ])
115
+ ]),
116
+ l("button", {
117
+ ref_key: "ok",
118
+ ref: S,
119
+ type: "button",
120
+ class: "mt-1 self-start text-subheadline font-semibold text-content-link hover:underline",
121
+ "data-test": `tip-ok-${e.id}`,
122
+ onClick: _
123
+ }, k(n(s)("core.tip.ok")), 9, fe)
124
+ ]),
125
+ l("button", {
126
+ type: "button",
127
+ class: "hit-target -mt-1 -mr-1 grid size-6 shrink-0 place-items-center rounded-full bg-fill text-content-muted hover:bg-fill-strong",
128
+ "aria-label": n(s)("core.actions.close"),
129
+ onClick: _
130
+ }, [
131
+ w(n(V), {
132
+ name: "close",
133
+ size: 12
134
+ })
135
+ ], 8, me)
136
+ ], 44, le)) : ee("", !0)
137
+ ]),
138
+ _: 3
139
+ })
140
+ ]));
141
+ }
142
+ });
143
+ export {
144
+ be as Tip
145
+ };
@@ -0,0 +1,5 @@
1
+ import type { PreferencesPatch } from "../platform";
2
+ /** The ids stored at `path` of the preferences (`["onboarding", "tips_dismissed"]`); none when it is not a list of texts. */
3
+ export declare function storedIds(preferences: object, path: readonly string[]): readonly string[];
4
+ /** The patch that stores `ids` at `path`: `["a", "b"]` and `[x]` give `{ a: { b: [x] } }`. */
5
+ export declare function idsPatch(path: readonly string[], ids: readonly string[]): PreferencesPatch<Record<string, unknown>>;
@@ -1,14 +1,14 @@
1
- import { _ as W, a as X, b as Y, c as Z, p as ee, u as te, d as ae } from "../AdaptivePageShell.vue_vue_type_script_setup_true_lang-D5i77H6S.js";
1
+ import { _ as W, a as X, b as Y, c as Z, p as ee, u as te, d as ae } from "../AdaptivePageShell.vue_vue_type_script_setup_true_lang-lPj9hPqV.js";
2
2
  import { _ as se } from "../BottomDock.vue_vue_type_script_setup_true_lang-CjN7xYEr.js";
3
3
  import { b as ne, i as re, u as ie } from "../bottomDock-BZEiOPYZ.js";
4
4
  import { _ as x } from "../BottomDockPortal.vue_vue_type_script_setup_true_lang-DmwR-2SP.js";
5
5
  import { defineComponent as v, openBlock as a, createBlock as b, withCtx as c, createElementVNode as s, normalizeStyle as k, createElementBlock as l, Fragment as y, renderList as B, normalizeClass as d, unref as _, createCommentVNode as p, toDisplayString as f, useModel as S, useId as C, useTemplateRef as P, computed as $, mergeProps as w, createSlots as T, renderSlot as m, mergeModels as D } from "vue";
6
6
  import { _ as L } from "../Icon.vue_vue_type_script_lang-BhhsFYwp.js";
7
- import { _ as ue } from "../RecordHeader.vue_vue_type_script_setup_true_lang-DqGc3Jyo.js";
7
+ import { _ as ue } from "../RecordHeader.vue_vue_type_script_setup_true_lang-Do_ATJwT.js";
8
8
  import { c as pe, i as fe, p as me, a as be, u as ge, b as ve } from "../chrome-nUcmVu8G.js";
9
9
  import { s as z, u as I } from "../sectionIndex-BS0ic5W7.js";
10
10
  import { p as he, a as xe } from "../sectionIndex-BS0ic5W7.js";
11
- import { _ as ye } from "../SectionNavigator.vue_vue_type_script_setup_true_lang-Dh3sXUt_.js";
11
+ import { _ as ye } from "../SectionNavigator.vue_vue_type_script_setup_true_lang-DfKEhTFv.js";
12
12
  import { a as Se, _ as Ce } from "../SectionList.vue_vue_type_script_setup_true_lang-DR0_NsqC.js";
13
13
  import { _ as A } from "../Panel.vue_vue_type_script_setup_true_lang-D_Wg42hu.js";
14
14
  const K = ["aria-label"], M = ["aria-label"], N = ["aria-selected", "tabindex", "onClick"], R = { class: "relative" }, E = {