@burdenoff/fe-libs 2026.1017.12 → 2026.1019.1

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 (59) hide show
  1. package/dist/chrome/AccountSwitcher.js +90 -89
  2. package/dist/chrome/Breadcrumbs.js +1 -1
  3. package/dist/chrome/CommandPalette.js +91 -90
  4. package/dist/chrome/Footer.js +31 -8
  5. package/dist/chrome/GlobalSearch.js +78 -77
  6. package/dist/chrome/HeaderBar.js +1 -1
  7. package/dist/chrome/HeaderThemeSwitcher.js +48 -47
  8. package/dist/chrome/LanguagePickerSheet.js +23 -22
  9. package/dist/chrome/NavCustomizeDialog.d.ts +0 -14
  10. package/dist/chrome/NavCustomizeDialog.js +114 -122
  11. package/dist/chrome/PanelTabs.js +45 -41
  12. package/dist/chrome/PersonaSurfaceControls.d.ts +0 -17
  13. package/dist/chrome/PersonaSurfaceControls.js +115 -118
  14. package/dist/chrome/PluginSettingsPage.js +29 -28
  15. package/dist/chrome/PluginWidgetGrid.js +19 -18
  16. package/dist/chrome/ProductPickerSheet.js +44 -47
  17. package/dist/chrome/ProductSwitcher.js +2 -6
  18. package/dist/chrome/ProfileSwitcher.js +6 -10
  19. package/dist/chrome/ShortcutHelpDialog.js +60 -65
  20. package/dist/chrome/SideNavigation.js +2 -2
  21. package/dist/chrome/Sidebar.js +44 -43
  22. package/dist/chrome/ThemePreferences.js +289 -267
  23. package/dist/chrome/contextSwitcher/EmptyState.js +31 -27
  24. package/dist/chrome/contextSwitcher/OrganizationList.js +40 -30
  25. package/dist/chrome/contextSwitcher/ProjectList.js +48 -44
  26. package/dist/chrome/contextSwitcher/SearchInput.js +44 -40
  27. package/dist/chrome/contextSwitcher/TriggerButton.js +2 -2
  28. package/dist/chrome/contextSwitcher/WorkspaceList.js +36 -32
  29. package/dist/chrome/globalSearch/AdvancedFiltersPanel.js +128 -126
  30. package/dist/chrome/globalSearch/ResultsList.js +25 -27
  31. package/dist/chrome/globalSearch/SearchInput.js +16 -14
  32. package/dist/chrome/notificationCenter/NotificationCardItem.js +58 -47
  33. package/dist/chrome/notificationCenter/NotificationFilters.js +76 -62
  34. package/dist/chrome/notificationCenter/NotificationFooter.js +21 -21
  35. package/dist/chrome/notificationCenter/NotificationHeader.js +67 -63
  36. package/dist/chrome/notificationCenter/NotificationList.js +75 -71
  37. package/dist/chrome/notificationCenter/NotificationPanel.js +37 -33
  38. package/dist/chrome/notificationCenter/PushOptInToggle.js +33 -32
  39. package/dist/chrome/notificationCenter/constants.d.ts +6 -1
  40. package/dist/chrome/notificationCenter/constants.js +12 -11
  41. package/dist/chrome/useThemeOptionLabels.d.ts +33 -0
  42. package/dist/chrome/useThemeOptionLabels.js +39 -0
  43. package/dist/shared/assistant/ui/AssistantMarkdownRenderer.d.ts +6 -6
  44. package/dist/shared/assistant/ui/AssistantMarkdownRenderer.js +86 -85
  45. package/dist/shared/assistant/ui/AssistantMessageItem.js +101 -96
  46. package/dist/shared/assistant/ui/WorkflowAssistantPanel.js +152 -140
  47. package/dist/shared/events/sinks/RybbitSink.js +2 -2
  48. package/dist/shared/providers/shell/authProvider/useAuthActions.d.ts +19 -0
  49. package/dist/shared/providers/shell/authProvider/useAuthActions.js +97 -91
  50. package/dist/shared/providers/shell/interpolateShellLabel.d.ts +3 -0
  51. package/dist/shared/providers/shell/interpolateShellLabel.js +11 -0
  52. package/dist/shared/providers/shell/useAssistantShellLabels.d.ts +45 -0
  53. package/dist/shared/providers/shell/useAssistantShellLabels.js +54 -0
  54. package/dist/shared/tours/TourPlayer.js +33 -32
  55. package/dist/shared/tours/TourTooltip.js +108 -109
  56. package/dist/shared/tours/tourTrigger/MobileTourSheet.js +98 -85
  57. package/dist/shared/tours/tourTrigger/TourListItemDesktop.js +20 -18
  58. package/dist/shared/tours/tourTrigger/TourListItemMobile.js +23 -25
  59. package/package.json +3 -3
@@ -1,12 +1,12 @@
1
1
  import { resolveGatewayUrls as e } from "../../../config/gatewayUrls.js";
2
- import { addProfile as t, getProfileTokens as n, getProfileUser as r, getProfileWorkspaceToken as i, getProfiles as a, loginProfile as o, logoutAllProfiles as s, removeProfile as c, resolveActiveProfileId as l, setProfileTokens as u, setProfileUser as d, setProfileWorkspaceToken as f, switchProfile as p } from "../ProfileStorageManager.js";
3
- import { clearShellSsoCookies as m, setShellSsoCookies as h } from "../../../utils/authCookie.js";
4
- import { getAuthBridge as g } from "../AuthBridgeClient.js";
5
- import { getCrossOriginLogoutUrl as _ } from "./ssoRelay.js";
6
- import { getJwtExpiry as v } from "./jwt.js";
7
- import { useCallback as y } from "react";
2
+ import { addProfile as t, getActiveProfileId as n, getProfileTokens as r, getProfileUser as i, getProfileWorkspaceToken as a, getProfiles as o, loginProfile as s, logoutAllProfiles as c, removeProfile as l, resolveActiveProfileId as u, setProfileTokens as d, setProfileUser as f, setProfileWorkspaceToken as p, switchProfile as m } from "../ProfileStorageManager.js";
3
+ import { clearShellSsoCookies as h, setShellSsoCookies as g } from "../../../utils/authCookie.js";
4
+ import { getAuthBridge as _ } from "../AuthBridgeClient.js";
5
+ import { getCrossOriginLogoutUrl as v } from "./ssoRelay.js";
6
+ import { getJwtExpiry as y } from "./jwt.js";
7
+ import { useCallback as b } from "react";
8
8
  //#region src/shared/providers/shell/authProvider/useAuthActions.ts
9
- function b(t) {
9
+ function x(t) {
10
10
  if (t) try {
11
11
  let { globalBaseUrl: n } = e();
12
12
  if (!n) return;
@@ -21,164 +21,170 @@ function b(t) {
21
21
  }).catch(() => {});
22
22
  } catch {}
23
23
  }
24
- function x({ user: e, tokens: x, activeId: S, bridgeSyncInProgress: C, onRefreshToken: w, onTokenExpired: T, setActiveId: E, setUser: D, setTokens: O, setWorkspaceTokenLocal: k, setMfaRequiredState: A, setMfaChallengeIdState: j, setIsLoading: M, clearAccounts: N, refreshAccounts: P }) {
25
- let F = y((e, t, n) => {
26
- let r = v(t) ?? Date.now() + 3600 * 1e3, i = {
24
+ function S(e, t, i) {
25
+ if (e) return e;
26
+ if (t?.accessToken) return t.accessToken;
27
+ let a = i ?? n();
28
+ return (a ? r(a)?.accessToken : void 0) || void 0;
29
+ }
30
+ function C({ user: e, tokens: n, activeId: C, bridgeSyncInProgress: w, onRefreshToken: T, onTokenExpired: E, setActiveId: D, setUser: O, setTokens: k, setWorkspaceTokenLocal: A, setMfaRequiredState: j, setMfaChallengeIdState: M, setIsLoading: N, clearAccounts: P, refreshAccounts: F }) {
31
+ let I = b((e, t, n) => {
32
+ let r = y(t) ?? Date.now() + 3600 * 1e3, i = {
27
33
  accessToken: t,
28
34
  refreshToken: n,
29
35
  expiresAt: r
30
- }, s = o(e, i);
31
- E(s), D(e), O(i), k(null), A(!1), j(null), P();
36
+ }, a = s(e, i);
37
+ D(a), O(e), k(i), A(null), j(!1), M(null), F();
32
38
  try {
33
- h(s, window.location.origin);
39
+ g(a, window.location.origin);
34
40
  } catch {}
35
- C.current || g()?.notifyLogin({
41
+ w.current || _()?.notifyLogin({
36
42
  user: e,
37
43
  tokens: {
38
44
  accessToken: t,
39
45
  refreshToken: n,
40
46
  expiresAt: r
41
47
  },
42
- activeAccountId: s,
43
- activeProfileId: s,
44
- profiles: a()
48
+ activeAccountId: a,
49
+ activeProfileId: a,
50
+ profiles: o()
45
51
  });
46
52
  }, [
47
- P,
48
- C,
49
- E,
53
+ F,
54
+ w,
50
55
  D,
51
56
  O,
52
57
  k,
53
58
  A,
54
- j
55
- ]), I = y((e) => {
59
+ j,
60
+ M
61
+ ]), L = b((e) => {
56
62
  let t = e?.authoritative !== !1;
57
- t && !C.current && b(x?.accessToken ?? (S ? n(S)?.accessToken : void 0)), S && c(S);
58
- let a = l();
59
- a ? (E(a), D(r(a)), O(n(a)), k(i(a))) : (E(null), D(null), O(null), k(null)), A(!1), j(null), P();
63
+ t && !w.current && x(S(e?.accessToken, n, C)), C && l(C);
64
+ let o = u();
65
+ o ? (D(o), O(i(o)), k(r(o)), A(a(o))) : (D(null), O(null), k(null), A(null)), j(!1), M(null), F();
60
66
  try {
61
- m();
67
+ h();
62
68
  } catch {}
63
- C.current || g()?.notifyLogout();
64
- let o = t ? _() : null;
65
- o && !C.current && window.location.replace(o);
69
+ w.current || _()?.notifyLogout();
70
+ let s = t ? v() : null;
71
+ s && !w.current && window.location.replace(s);
66
72
  }, [
67
- S,
68
- x,
69
- P,
70
73
  C,
71
- E,
74
+ n,
75
+ F,
76
+ w,
72
77
  D,
73
78
  O,
74
79
  k,
75
80
  A,
76
- j
77
- ]), L = y((n) => {
78
- if (!e || !S) return;
81
+ j,
82
+ M
83
+ ]), R = b((n) => {
84
+ if (!e || !C) return;
79
85
  let r = {
80
86
  ...e,
81
87
  ...n
82
88
  };
83
- D(r), d(S, r), t({
84
- id: S,
89
+ O(r), f(C, r), t({
90
+ id: C,
85
91
  email: r.email,
86
92
  name: r.name ?? `${r.firstName ?? ""} ${r.lastName ?? ""}`.trim(),
87
93
  avatar: r.avatar,
88
94
  lastLogin: (/* @__PURE__ */ new Date()).toISOString()
89
- }), P();
95
+ }), F();
90
96
  }, [
91
97
  e,
92
- S,
93
- P,
94
- D
95
- ]), R = y(async () => {
96
- if (!w || !S) return;
97
- let e = x?.refreshToken ?? n(S)?.refreshToken ?? void 0;
98
+ C,
99
+ F,
100
+ O
101
+ ]), z = b(async () => {
102
+ if (!T || !C) return;
103
+ let e = n?.refreshToken ?? r(C)?.refreshToken ?? void 0;
98
104
  if (e) {
99
- M(!0);
105
+ N(!0);
100
106
  try {
101
- let t = await w(e), n = v(t.accessToken), r = t.expiresAt ?? n ?? Date.now() + 1440 * 60 * 1e3, i = {
107
+ let t = await T(e), n = y(t.accessToken), r = t.expiresAt ?? n ?? Date.now() + 1440 * 60 * 1e3, i = {
102
108
  accessToken: t.accessToken,
103
109
  refreshToken: t.refreshToken ?? e,
104
110
  expiresAt: r
105
111
  };
106
- O(i), u(S, i), C.current || g()?.notifyTokenRefresh({
112
+ k(i), d(C, i), w.current || _()?.notifyTokenRefresh({
107
113
  accessToken: i.accessToken,
108
114
  refreshToken: i.refreshToken,
109
115
  expiresAt: i.expiresAt
110
116
  });
111
117
  } catch (e) {
112
- console.error("Failed to refresh token:", e), x?.expiresAt && x.expiresAt - Date.now() > 0 || (I({ authoritative: !1 }), T?.());
118
+ console.error("Failed to refresh token:", e), n?.expiresAt && n.expiresAt - Date.now() > 0 || (L({ authoritative: !1 }), E?.());
113
119
  } finally {
114
- M(!1);
120
+ N(!1);
115
121
  }
116
122
  }
117
123
  }, [
118
- x,
119
- w,
120
- S,
121
- I,
124
+ n,
122
125
  T,
123
126
  C,
124
- O,
125
- M
126
- ]), z = y((t) => e?.permissions ? e.permissions.includes(t) || e.permissions.includes("*") : !1, [e]), B = y((e) => {
127
- k(e), S && f(S, e);
128
- }, [S, k]), V = y((e, t) => {
129
- A(e), j(t ?? null);
130
- }, [A, j]), H = y((e) => {
131
- if (!p(e)) {
127
+ L,
128
+ E,
129
+ w,
130
+ k,
131
+ N
132
+ ]), B = b((t) => e?.permissions ? e.permissions.includes(t) || e.permissions.includes("*") : !1, [e]), V = b((e) => {
133
+ A(e), C && p(C, e);
134
+ }, [C, A]), H = b((e, t) => {
135
+ j(e), M(t ?? null);
136
+ }, [j, M]), U = b((e) => {
137
+ if (!m(e)) {
132
138
  console.error(`Profile ${e} not found`);
133
139
  return;
134
140
  }
135
- E(e), D(r(e)), O(n(e)), k(i(e)), A(!1), j(null), P(), C.current || g()?.notifyAccountSwitch(e);
141
+ D(e), O(i(e)), k(r(e)), A(a(e)), j(!1), M(null), F(), w.current || _()?.notifyAccountSwitch(e);
136
142
  }, [
137
- P,
138
- C,
139
- E,
143
+ F,
144
+ w,
140
145
  D,
141
146
  O,
142
147
  k,
143
148
  A,
144
- j
145
- ]), U = F, W = y((e) => {
146
- if (e === S) {
149
+ j,
150
+ M
151
+ ]), W = I, G = b((e) => {
152
+ if (e === C) {
147
153
  console.error("Cannot remove active account — logout first");
148
154
  return;
149
155
  }
150
- c(e), P();
151
- }, [S, P]);
156
+ l(e), F();
157
+ }, [C, F]);
152
158
  return {
153
- login: F,
154
- logout: I,
155
- logoutAll: y(() => {
156
- s(), E(null), D(null), O(null), k(null), A(!1), j(null), N();
159
+ login: I,
160
+ logout: L,
161
+ logoutAll: b(() => {
162
+ c(), D(null), O(null), k(null), A(null), j(!1), M(null), P();
157
163
  try {
158
- m();
164
+ h();
159
165
  } catch {}
160
- C.current || g()?.notifyLogoutAll();
161
- let e = _();
162
- e && !C.current && window.location.replace(e);
166
+ w.current || _()?.notifyLogoutAll();
167
+ let e = v();
168
+ e && !w.current && window.location.replace(e);
163
169
  }, [
164
- C,
165
- E,
170
+ w,
166
171
  D,
167
172
  O,
168
173
  k,
169
174
  A,
170
175
  j,
171
- N
176
+ M,
177
+ P
172
178
  ]),
173
- updateUser: L,
174
- refreshAccessToken: R,
175
- hasPermission: z,
176
- setWorkspaceToken: B,
177
- setMfaState: V,
178
- switchAccount: H,
179
- addAccount: U,
180
- removeAccount: W
179
+ updateUser: R,
180
+ refreshAccessToken: z,
181
+ hasPermission: B,
182
+ setWorkspaceToken: V,
183
+ setMfaState: H,
184
+ switchAccount: U,
185
+ addAccount: W,
186
+ removeAccount: G
181
187
  };
182
188
  }
183
189
  //#endregion
184
- export { x as useAuthActions };
190
+ export { C as useAuthActions };
@@ -0,0 +1,3 @@
1
+ import { ReactNode } from 'react';
2
+ /** Keep styled keycaps/names in a translated sentence, including reordered placeholders. */
3
+ export declare function interpolateShellLabel(text: string, parts: Readonly<Record<string, ReactNode>>): ReactNode;
@@ -0,0 +1,11 @@
1
+ import { Fragment as e } from "react";
2
+ import { jsx as t } from "react/jsx-runtime";
3
+ //#region src/shared/providers/shell/interpolateShellLabel.tsx
4
+ function n(n, r) {
5
+ return n.split(/(\{\{[A-Za-z][A-Za-z0-9]*\}\})/g).map((n, i) => {
6
+ let a = n.startsWith("{{") ? n.slice(2, -2) : "";
7
+ return /* @__PURE__ */ t(e, { children: Object.hasOwn(r, a) ? r[a] : n }, i);
8
+ });
9
+ }
10
+ //#endregion
11
+ export { n as interpolateShellLabel };
@@ -0,0 +1,45 @@
1
+ /** Generic shell labels stay separate from the product-prefixed assistant dictionary. */
2
+ export declare function useWorkflowAssistantLabels(): {
3
+ title: string;
4
+ savedPending: string;
5
+ conversationUnavailable: string;
6
+ historyUnavailable: string;
7
+ olderUnavailable: string;
8
+ audioUnavailable: string;
9
+ unknownTurn: string;
10
+ cancelledTurn: string;
11
+ failedTurn: string;
12
+ answerPending: string;
13
+ admissionRefused: string;
14
+ interrupted: string;
15
+ cancelUnconfirmed: string;
16
+ newChat: string;
17
+ savedConversations: string;
18
+ savedAssistantConversations: string;
19
+ noSavedConversations: string;
20
+ loadOlderConversations: string;
21
+ assistantConversation: string;
22
+ loadingYourConversation: string;
23
+ emptyHint: string;
24
+ loadOlderMessages: string;
25
+ you: string;
26
+ generatingAnswer: string;
27
+ readAnswerAloud: string;
28
+ answerSources: string;
29
+ sourceReference: (params: Record<string, string | number>) => string;
30
+ preparingYourAnswer: string;
31
+ dictationUnavailable: string;
32
+ question: string;
33
+ askAQuestion: string;
34
+ stopDictation: string;
35
+ dictateQuestion: string;
36
+ stopAudio: string;
37
+ reloadConversation: string;
38
+ recoverTurn: string;
39
+ cancelTurn: string;
40
+ ask: string;
41
+ };
42
+ export declare function useAssistantChromeLabels(): {
43
+ tokens: string;
44
+ code: string;
45
+ };
@@ -0,0 +1,54 @@
1
+ import { useShellLabel as e } from "./useShellLabel.js";
2
+ //#region src/shared/providers/shell/useAssistantShellLabels.ts
3
+ function t() {
4
+ let t = e();
5
+ return {
6
+ title: t("workflowAssistant.title", "AI assistant"),
7
+ savedPending: t("workflowAssistant.savedPending", "A saved turn is pending. Recover it to check the answer."),
8
+ conversationUnavailable: t("workflowAssistant.conversationUnavailable", "Your conversation is unavailable. Reload it before sending another question."),
9
+ historyUnavailable: t("workflowAssistant.historyUnavailable", "Conversation history is unavailable. Try loading it again."),
10
+ olderUnavailable: t("workflowAssistant.olderUnavailable", "Older messages are unavailable. Try loading them again."),
11
+ audioUnavailable: t("workflowAssistant.audioUnavailable", "Audio playback is unavailable. You can read the answer above."),
12
+ unknownTurn: t("workflowAssistant.unknownTurn", "This turn could not be confirmed. It will not be generated again automatically."),
13
+ cancelledTurn: t("workflowAssistant.cancelledTurn", "This turn was cancelled."),
14
+ failedTurn: t("workflowAssistant.failedTurn", "The assistant could not complete this turn."),
15
+ answerPending: t("workflowAssistant.answerPending", "Your answer is still pending. Recover this turn to check it again."),
16
+ admissionRefused: t("workflowAssistant.admissionRefused", "The assistant could not accept this question. Check your access, available quota or assistant configuration."),
17
+ interrupted: t("workflowAssistant.interrupted", "The connection was interrupted. Recover this turn using the same request."),
18
+ cancelUnconfirmed: t("workflowAssistant.cancelUnconfirmed", "Cancellation could not be confirmed. Recover the saved turn to check its result."),
19
+ newChat: t("workflowAssistant.newChat", "New chat"),
20
+ savedConversations: t("workflowAssistant.savedConversations", "Saved conversations"),
21
+ savedAssistantConversations: t("workflowAssistant.savedAssistantConversations", "Saved assistant conversations"),
22
+ noSavedConversations: t("workflowAssistant.noSavedConversations", "No saved conversations."),
23
+ loadOlderConversations: t("workflowAssistant.loadOlderConversations", "Load older conversations"),
24
+ assistantConversation: t("workflowAssistant.assistantConversation", "Assistant conversation"),
25
+ loadingYourConversation: t("workflowAssistant.loadingYourConversation", "Loading your conversation…"),
26
+ emptyHint: t("workflowAssistant.emptyHint", "Ask a question about the available content."),
27
+ loadOlderMessages: t("workflowAssistant.loadOlderMessages", "Load older messages"),
28
+ you: t("workflowAssistant.you", "You"),
29
+ generatingAnswer: t("workflowAssistant.generatingAnswer", "Generating answer…"),
30
+ readAnswerAloud: t("workflowAssistant.readAnswerAloud", "Read answer aloud"),
31
+ answerSources: t("workflowAssistant.answerSources", "Answer sources"),
32
+ sourceReference: (e) => t("workflowAssistant.sourceReference", "[{{reference}}] Source {{documentId}}", e),
33
+ preparingYourAnswer: t("workflowAssistant.preparingYourAnswer", "Preparing your answer…"),
34
+ dictationUnavailable: t("workflowAssistant.dictationUnavailable", "Dictation is unavailable. You can type your question."),
35
+ question: t("workflowAssistant.question", "Question"),
36
+ askAQuestion: t("workflowAssistant.askAQuestion", "Ask a question…"),
37
+ stopDictation: t("workflowAssistant.stopDictation", "Stop dictation"),
38
+ dictateQuestion: t("workflowAssistant.dictateQuestion", "Dictate question"),
39
+ stopAudio: t("workflowAssistant.stopAudio", "Stop audio"),
40
+ reloadConversation: t("workflowAssistant.reloadConversation", "Reload conversation"),
41
+ recoverTurn: t("workflowAssistant.recoverTurn", "Recover turn"),
42
+ cancelTurn: t("workflowAssistant.cancelTurn", "Cancel turn"),
43
+ ask: t("workflowAssistant.ask", "Ask")
44
+ };
45
+ }
46
+ function n() {
47
+ let t = e();
48
+ return {
49
+ tokens: t("assistantChrome.tokens", "tokens"),
50
+ code: t("markdownEditor.placeholder.code", "code")
51
+ };
52
+ }
53
+ //#endregion
54
+ export { n as useAssistantChromeLabels, t as useWorkflowAssistantLabels };
@@ -1,58 +1,59 @@
1
- import { useTourPlayerContext as e } from "./TourPlayerProvider.js";
2
- import { useCallback as t, useEffect as n } from "react";
3
- import { jsx as r } from "react/jsx-runtime";
1
+ import { useShellLabel as e } from "../providers/shell/useShellLabel.js";
2
+ import { useTourPlayerContext as t } from "./TourPlayerProvider.js";
3
+ import { useCallback as n, useEffect as r } from "react";
4
+ import { jsx as i } from "react/jsx-runtime";
4
5
  //#region src/shared/tours/TourPlayer.tsx
5
- function i({ tour: t, autoStart: r = !1, autoStartDelay: i = 0, onComplete: a, onSkip: o }) {
6
- let { startTour: s, isPlaying: c, isCompleted: l, isSkipped: u, currentTour: d } = e();
7
- return n(() => {
8
- if (t && r && !c) {
9
- let e = setTimeout(() => {
10
- s(t);
6
+ function a({ tour: e, autoStart: n = !1, autoStartDelay: i = 0, onComplete: a, onSkip: o }) {
7
+ let { startTour: s, isPlaying: c, isCompleted: l, isSkipped: u, currentTour: d } = t();
8
+ return r(() => {
9
+ if (e && n && !c) {
10
+ let t = setTimeout(() => {
11
+ s(e);
11
12
  }, i);
12
- return () => clearTimeout(e);
13
+ return () => clearTimeout(t);
13
14
  }
14
15
  }, [
15
- t,
16
- r,
16
+ e,
17
+ n,
17
18
  i,
18
19
  s,
19
20
  c
20
- ]), n(() => {
21
- l && d?.id === t?.id && a?.();
21
+ ]), r(() => {
22
+ l && d?.id === e?.id && a?.();
22
23
  }, [
23
24
  l,
24
25
  d,
25
- t,
26
+ e,
26
27
  a
27
- ]), n(() => {
28
- u && d?.id === t?.id && o?.();
28
+ ]), r(() => {
29
+ u && d?.id === e?.id && o?.();
29
30
  }, [
30
31
  u,
31
32
  d,
32
- t,
33
+ e,
33
34
  o
34
35
  ]), null;
35
36
  }
36
- function a() {
37
- let { startTour: n, isPlaying: r, stopTour: i } = e();
38
- return t((e) => {
39
- r && i(), n(e);
37
+ function o() {
38
+ let { startTour: e, isPlaying: r, stopTour: i } = t();
39
+ return n((t) => {
40
+ r && i(), e(t);
40
41
  }, [
41
- n,
42
+ e,
42
43
  i,
43
44
  r
44
45
  ]);
45
46
  }
46
- function o({ tour: e, children: t, className: n, style: i }) {
47
- let o = a();
48
- return /* @__PURE__ */ r("button", {
47
+ function s({ tour: t, children: n, className: r, style: a }) {
48
+ let s = e(), c = o();
49
+ return /* @__PURE__ */ i("button", {
49
50
  type: "button",
50
- onClick: () => o(e),
51
- className: n,
52
- style: i,
53
- "aria-label": `Start tour: ${e.name}`,
54
- children: t
51
+ onClick: () => c(t),
52
+ className: r,
53
+ style: a,
54
+ "aria-label": s("tours.startNamed", "Start tour: {{name}}", { name: t.name }),
55
+ children: n
55
56
  });
56
57
  }
57
58
  //#endregion
58
- export { i as TourPlayer, o as TourTriggerButton, a as usePlayTour };
59
+ export { a as TourPlayer, s as TourTriggerButton, o as usePlayTour };