@burdenoff/fe-libs 2026.1018.1 → 2026.1019.2

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 (65) 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/conversation.d.ts +8 -0
  44. package/dist/shared/assistant/history/historyMapping.js +1 -1
  45. package/dist/shared/assistant/ui/AssistantMarkdownRenderer.d.ts +6 -6
  46. package/dist/shared/assistant/ui/AssistantMarkdownRenderer.js +86 -85
  47. package/dist/shared/assistant/ui/AssistantMessageItem.js +101 -96
  48. package/dist/shared/assistant/ui/AssistantWriteProposalCard.d.ts +2 -0
  49. package/dist/shared/assistant/ui/AssistantWriteProposalCard.js +93 -89
  50. package/dist/shared/assistant/ui/WorkflowAssistantPanel.js +152 -140
  51. package/dist/shared/assistant/ui/useWriteProposals.js +122 -85
  52. package/dist/shared/assistant/writeProposalDiscovery.d.ts +3 -1
  53. package/dist/shared/assistant/writeProposalDiscovery.js +2 -2
  54. package/dist/shared/events/sinks/RybbitSink.js +2 -2
  55. package/dist/shared/providers/shell/interpolateShellLabel.d.ts +3 -0
  56. package/dist/shared/providers/shell/interpolateShellLabel.js +11 -0
  57. package/dist/shared/providers/shell/useAssistantShellLabels.d.ts +45 -0
  58. package/dist/shared/providers/shell/useAssistantShellLabels.js +54 -0
  59. package/dist/shared/tours/TourPlayer.js +33 -32
  60. package/dist/shared/tours/TourTooltip.js +108 -109
  61. package/dist/shared/tours/tourTrigger/MobileTourSheet.js +98 -85
  62. package/dist/shared/tours/tourTrigger/TourListItemDesktop.js +20 -18
  63. package/dist/shared/tours/tourTrigger/TourListItemMobile.js +23 -25
  64. package/dist/shared-assistant.js +188 -188
  65. package/package.json +2 -2
@@ -1,8 +1,9 @@
1
- import { memo as e, useEffect as t, useLayoutEffect as n, useMemo as r, useRef as i, useState as a } from "react";
2
- import { jsx as o, jsxs as s } from "react/jsx-runtime";
1
+ import { useShellLabel as e } from "../providers/shell/useShellLabel.js";
2
+ import { memo as t, useEffect as n, useLayoutEffect as r, useMemo as i, useRef as a, useState as o } from "react";
3
+ import { jsx as s, jsxs as c } from "react/jsx-runtime";
3
4
  //#region src/shared/tours/TourTooltip.tsx
4
- var c = 320, l = 16, u = 10, d = 18;
5
- function f() {
5
+ var l = 320, u = 16, d = 10, f = 18;
6
+ function p() {
6
7
  return typeof window > "u" ? {
7
8
  vw: 1024,
8
9
  vh: 768
@@ -11,38 +12,38 @@ function f() {
11
12
  vh: window.innerHeight
12
13
  };
13
14
  }
14
- function p(e, t, n) {
15
- let { vw: r, vh: i } = f(), { width: a, height: o } = n, s = Math.max(l, r - a - l), c = Math.max(l, i - o - l), p = (e) => Math.min(Math.max(e, l), s), m = (e) => Math.min(Math.max(e, l), c);
15
+ function m(e, t, n) {
16
+ let { vw: r, vh: i } = p(), { width: a, height: o } = n, s = Math.max(u, r - a - u), c = Math.max(u, i - o - u), l = (e) => Math.min(Math.max(e, u), s), m = (e) => Math.min(Math.max(e, u), c);
16
17
  if (!e) return {
17
18
  top: m((i - o) / 2),
18
- left: p((r - a) / 2),
19
+ left: l((r - a) / 2),
19
20
  arrowPosition: "none",
20
21
  arrowOffset: 0
21
22
  };
22
- let h = e.top, g = i - e.bottom, _ = e.left, v = r - e.right, y = o + u + l, b = a + u + l, x = g >= y, S = h >= y, C = v >= b, w = _ >= b, T = x ? "BOTTOM" : S ? "TOP" : C ? "RIGHT" : w ? "LEFT" : "BOTTOM", E = t;
23
+ let h = e.top, g = i - e.bottom, _ = e.left, v = r - e.right, y = o + d + u, b = a + d + u, x = g >= y, S = h >= y, C = v >= b, w = _ >= b, T = x ? "BOTTOM" : S ? "TOP" : C ? "RIGHT" : w ? "LEFT" : "BOTTOM", E = t;
23
24
  t === "AUTO" || t === "CENTER" ? E = T : t === "BOTTOM" && x || t === "TOP" && S || t === "RIGHT" && C || t === "LEFT" && w || (E = T);
24
25
  let D = e.left + e.width / 2, O = e.top + e.height / 2, k, A, j;
25
26
  switch (E) {
26
27
  case "TOP":
27
- k = e.top - o - u - l, A = D - a / 2, j = "bottom";
28
+ k = e.top - o - d - u, A = D - a / 2, j = "bottom";
28
29
  break;
29
30
  case "LEFT":
30
- k = O - o / 2, A = e.left - a - u - l, j = "right";
31
+ k = O - o / 2, A = e.left - a - d - u, j = "right";
31
32
  break;
32
33
  case "RIGHT":
33
- k = O - o / 2, A = e.right + u + l, j = "left";
34
+ k = O - o / 2, A = e.right + d + u, j = "left";
34
35
  break;
35
36
  default:
36
- k = e.bottom + u + l, A = D - a / 2, j = "top";
37
+ k = e.bottom + d + u, A = D - a / 2, j = "top";
37
38
  break;
38
39
  }
39
- let M = p(A), N = m(k), P = 0;
40
+ let M = l(A), N = m(k), P = 0;
40
41
  if (j === "top" || j === "bottom") {
41
42
  let e = D - M;
42
- e < 0 || e > a ? j = "none" : P = Math.min(Math.max(e, d), a - d);
43
+ e < 0 || e > a ? j = "none" : P = Math.min(Math.max(e, f), a - f);
43
44
  } else {
44
45
  let e = O - N;
45
- e < 0 || e > o ? j = "none" : P = Math.min(Math.max(e, d), o - d);
46
+ e < 0 || e > o ? j = "none" : P = Math.min(Math.max(e, f), o - f);
46
47
  }
47
48
  return {
48
49
  top: N,
@@ -51,79 +52,79 @@ function p(e, t, n) {
51
52
  arrowOffset: P
52
53
  };
53
54
  }
54
- var m = e(function({ step: e, stepIndex: d, totalSteps: m, onNext: h, onPrevious: g, onSkip: _, onComplete: v, canGoNext: y, canGoPrevious: b, isLastStep: x, placement: S, targetRect: C }) {
55
- let [w, T] = a(!1), E = i(null), [D, O] = a(f), [k, A] = a({
56
- width: c,
55
+ var h = t(function({ step: t, stepIndex: f, totalSteps: h, onNext: g, onPrevious: _, onSkip: v, onComplete: y, canGoNext: b, canGoPrevious: x, isLastStep: S, placement: C, targetRect: w }) {
56
+ let T = e(), [E, D] = o(!1), O = a(null), [k, A] = o(p), [j, M] = o({
57
+ width: l,
57
58
  height: 220
58
- }), j = Math.min(c, D.vw - 2 * l), M = D.vh - 2 * l, N = Math.min(k.height, M);
59
- t(() => {
60
- T(!1);
61
- let e = setTimeout(() => T(!0), 50);
59
+ }), N = Math.min(l, k.vw - 2 * u), P = k.vh - 2 * u, F = Math.min(j.height, P);
60
+ n(() => {
61
+ D(!1);
62
+ let e = setTimeout(() => D(!0), 50);
62
63
  return () => clearTimeout(e);
63
- }, [e.id]), n(() => {
64
+ }, [t.id]), r(() => {
64
65
  let e = () => {
65
- O(f());
66
- let e = E.current;
66
+ A(p());
67
+ let e = O.current;
67
68
  if (!e) return;
68
69
  let t = e.getBoundingClientRect();
69
- A((e) => Math.abs(e.width - t.width) > 1 || Math.abs(e.height - t.height) > 1 ? {
70
+ M((e) => Math.abs(e.width - t.width) > 1 || Math.abs(e.height - t.height) > 1 ? {
70
71
  width: t.width,
71
72
  height: t.height
72
73
  } : e);
73
74
  };
74
75
  return e(), window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
75
76
  }, [
76
- e.id,
77
- e.title,
78
- e.content,
79
- j
77
+ t.id,
78
+ t.title,
79
+ t.content,
80
+ N
80
81
  ]);
81
- let P = r(() => p(C, S, {
82
- width: j,
83
- height: N
82
+ let I = i(() => m(w, C, {
83
+ width: N,
84
+ height: F
84
85
  }), [
86
+ w,
85
87
  C,
86
- S,
87
- j,
88
88
  N,
89
- D.vw,
90
- D.vh
91
- ]), F = e.media?.filter((e) => e.position === "HEADER") ?? [], I = e.media?.filter((e) => e.position === "INLINE" || e.position === "BODY") ?? [];
92
- return /* @__PURE__ */ s("div", {
89
+ F,
90
+ k.vw,
91
+ k.vh
92
+ ]), L = t.media?.filter((e) => e.position === "HEADER") ?? [], R = t.media?.filter((e) => e.position === "INLINE" || e.position === "BODY") ?? [];
93
+ return /* @__PURE__ */ c("div", {
93
94
  className: "tour-tooltip",
94
95
  style: {
95
96
  position: "fixed",
96
- top: P.top,
97
- left: P.left,
98
- width: j,
97
+ top: I.top,
98
+ left: I.left,
99
+ width: N,
99
100
  zIndex: 1e4,
100
- opacity: +!!w,
101
- transform: w ? "translateY(0)" : "translateY(10px)",
101
+ opacity: +!!E,
102
+ transform: E ? "translateY(0)" : "translateY(10px)",
102
103
  transition: "opacity 0.2s ease-out, transform 0.2s ease-out"
103
104
  },
104
105
  role: "dialog",
105
- "aria-labelledby": `tour-step-title-${e.id}`,
106
- "aria-describedby": `tour-step-content-${e.id}`,
107
- children: [/* @__PURE__ */ s("div", {
108
- ref: E,
106
+ "aria-labelledby": `tour-step-title-${t.id}`,
107
+ "aria-describedby": `tour-step-content-${t.id}`,
108
+ children: [/* @__PURE__ */ c("div", {
109
+ ref: O,
109
110
  style: {
110
111
  display: "flex",
111
112
  flexDirection: "column",
112
- maxHeight: M,
113
+ maxHeight: P,
113
114
  backgroundColor: "var(--color-bg-surface)",
114
115
  borderRadius: 12,
115
116
  boxShadow: "0 10px 40px rgba(0, 0, 0, 0.2)",
116
117
  overflow: "hidden"
117
118
  },
118
119
  children: [
119
- F.length > 0 && /* @__PURE__ */ o("div", {
120
+ L.length > 0 && /* @__PURE__ */ s("div", {
120
121
  style: {
121
122
  width: "100%",
122
123
  maxHeight: 160,
123
124
  overflow: "hidden",
124
125
  flexShrink: 0
125
126
  },
126
- children: F.map((e) => e.media.type === "IMAGE" ? /* @__PURE__ */ o("img", {
127
+ children: L.map((e) => e.media.type === "IMAGE" ? /* @__PURE__ */ s("img", {
127
128
  src: e.media.cdnUrl,
128
129
  alt: e.media.altText || e.media.name,
129
130
  style: {
@@ -131,7 +132,7 @@ var m = e(function({ step: e, stepIndex: d, totalSteps: m, onNext: h, onPrevious
131
132
  height: "auto",
132
133
  display: "block"
133
134
  }
134
- }, e.id) : e.media.type === "VIDEO" ? /* @__PURE__ */ o("video", {
135
+ }, e.id) : e.media.type === "VIDEO" ? /* @__PURE__ */ s("video", {
135
136
  src: e.media.cdnUrl,
136
137
  controls: !0,
137
138
  style: {
@@ -140,7 +141,7 @@ var m = e(function({ step: e, stepIndex: d, totalSteps: m, onNext: h, onPrevious
140
141
  }
141
142
  }, e.id) : null)
142
143
  }),
143
- /* @__PURE__ */ s("div", {
144
+ /* @__PURE__ */ c("div", {
144
145
  style: {
145
146
  flex: "1 1 auto",
146
147
  minHeight: 0,
@@ -148,7 +149,7 @@ var m = e(function({ step: e, stepIndex: d, totalSteps: m, onNext: h, onPrevious
148
149
  padding: 20
149
150
  },
150
151
  children: [
151
- /* @__PURE__ */ s("div", {
152
+ /* @__PURE__ */ c("div", {
152
153
  style: {
153
154
  display: "flex",
154
155
  alignItems: "center",
@@ -163,30 +164,28 @@ var m = e(function({ step: e, stepIndex: d, totalSteps: m, onNext: h, onPrevious
163
164
  fontWeight: 500,
164
165
  whiteSpace: "nowrap"
165
166
  },
166
- children: [
167
- "Step ",
168
- d + 1,
169
- " of ",
170
- m
171
- ]
172
- }), /* @__PURE__ */ o("div", {
167
+ children: T("tours.stepProgress", "Step {{step}} of {{total}}", {
168
+ step: f + 1,
169
+ total: h
170
+ })
171
+ }), /* @__PURE__ */ s("div", {
173
172
  style: {
174
173
  display: "flex",
175
174
  gap: 4,
176
175
  flexWrap: "wrap",
177
176
  justifyContent: "flex-end"
178
177
  },
179
- children: Array.from({ length: m }).map((e, t) => /* @__PURE__ */ o("div", { style: {
178
+ children: Array.from({ length: h }).map((e, t) => /* @__PURE__ */ s("div", { style: {
180
179
  width: 8,
181
180
  height: 8,
182
181
  borderRadius: "50%",
183
- backgroundColor: t <= d ? "var(--color-action-primary-bg)" : "var(--color-border-default)",
182
+ backgroundColor: t <= f ? "var(--color-action-primary-bg)" : "var(--color-border-default)",
184
183
  transition: "background-color 0.2s"
185
184
  } }, t))
186
185
  })]
187
186
  }),
188
- /* @__PURE__ */ o("h3", {
189
- id: `tour-step-title-${e.id}`,
187
+ /* @__PURE__ */ s("h3", {
188
+ id: `tour-step-title-${t.id}`,
190
189
  style: {
191
190
  fontSize: 18,
192
191
  fontWeight: 600,
@@ -194,21 +193,21 @@ var m = e(function({ step: e, stepIndex: d, totalSteps: m, onNext: h, onPrevious
194
193
  margin: "0 0 8px 0",
195
194
  lineHeight: 1.3
196
195
  },
197
- children: e.title
196
+ children: t.title
198
197
  }),
199
- /* @__PURE__ */ o("p", {
200
- id: `tour-step-content-${e.id}`,
198
+ /* @__PURE__ */ s("p", {
199
+ id: `tour-step-content-${t.id}`,
201
200
  style: {
202
201
  fontSize: 14,
203
202
  color: "var(--color-text-secondary)",
204
203
  margin: 0,
205
204
  lineHeight: 1.6
206
205
  },
207
- children: e.content
206
+ children: t.content
208
207
  }),
209
- I.length > 0 && /* @__PURE__ */ o("div", {
208
+ R.length > 0 && /* @__PURE__ */ s("div", {
210
209
  style: { marginTop: 12 },
211
- children: I.map((e) => e.media.type === "IMAGE" ? /* @__PURE__ */ o("img", {
210
+ children: R.map((e) => e.media.type === "IMAGE" ? /* @__PURE__ */ s("img", {
212
211
  src: e.media.cdnUrl,
213
212
  alt: e.media.altText || e.media.name,
214
213
  style: {
@@ -220,7 +219,7 @@ var m = e(function({ step: e, stepIndex: d, totalSteps: m, onNext: h, onPrevious
220
219
  })
221
220
  ]
222
221
  }),
223
- /* @__PURE__ */ s("div", {
222
+ /* @__PURE__ */ c("div", {
224
223
  style: {
225
224
  display: "flex",
226
225
  alignItems: "center",
@@ -231,9 +230,9 @@ var m = e(function({ step: e, stepIndex: d, totalSteps: m, onNext: h, onPrevious
231
230
  flexShrink: 0,
232
231
  gap: 8
233
232
  },
234
- children: [/* @__PURE__ */ o("button", {
233
+ children: [/* @__PURE__ */ s("button", {
235
234
  type: "button",
236
- onClick: _,
235
+ onClick: v,
237
236
  style: {
238
237
  padding: "8px 12px",
239
238
  fontSize: 14,
@@ -247,15 +246,15 @@ var m = e(function({ step: e, stepIndex: d, totalSteps: m, onNext: h, onPrevious
247
246
  },
248
247
  onMouseEnter: (e) => e.currentTarget.style.color = "var(--color-text-primary)",
249
248
  onMouseLeave: (e) => e.currentTarget.style.color = "var(--color-text-tertiary)",
250
- children: "Skip tour"
251
- }), /* @__PURE__ */ s("div", {
249
+ children: T("tours.skipTour", "Skip tour")
250
+ }), /* @__PURE__ */ c("div", {
252
251
  style: {
253
252
  display: "flex",
254
253
  gap: 8
255
254
  },
256
- children: [b && /* @__PURE__ */ o("button", {
255
+ children: [x && /* @__PURE__ */ s("button", {
257
256
  type: "button",
258
- onClick: g,
257
+ onClick: _,
259
258
  style: {
260
259
  padding: "8px 16px",
261
260
  fontSize: 14,
@@ -273,72 +272,72 @@ var m = e(function({ step: e, stepIndex: d, totalSteps: m, onNext: h, onPrevious
273
272
  onMouseLeave: (e) => {
274
273
  e.currentTarget.style.backgroundColor = "var(--color-bg-surface)";
275
274
  },
276
- children: "Previous"
277
- }), /* @__PURE__ */ o("button", {
275
+ children: T("common.previous", "Previous")
276
+ }), /* @__PURE__ */ s("button", {
278
277
  type: "button",
279
- onClick: x ? v : h,
280
- disabled: !y,
278
+ onClick: S ? y : g,
279
+ disabled: !b,
281
280
  style: {
282
281
  padding: "8px 16px",
283
282
  fontSize: 14,
284
283
  fontWeight: 500,
285
284
  color: "var(--color-action-primary-text)",
286
- backgroundColor: y ? "var(--color-action-primary-bg)" : "var(--color-action-primary-bgDisabled)",
285
+ backgroundColor: b ? "var(--color-action-primary-bg)" : "var(--color-action-primary-bgDisabled)",
287
286
  border: "none",
288
287
  borderRadius: 6,
289
- cursor: y ? "pointer" : "not-allowed",
288
+ cursor: b ? "pointer" : "not-allowed",
290
289
  transition: "background-color 0.2s",
291
290
  whiteSpace: "nowrap"
292
291
  },
293
292
  onMouseEnter: (e) => {
294
- y && (e.currentTarget.style.backgroundColor = "var(--color-action-primary-bgHover)");
293
+ b && (e.currentTarget.style.backgroundColor = "var(--color-action-primary-bgHover)");
295
294
  },
296
295
  onMouseLeave: (e) => {
297
- e.currentTarget.style.backgroundColor = y ? "var(--color-action-primary-bg)" : "var(--color-action-primary-bgDisabled)";
296
+ e.currentTarget.style.backgroundColor = b ? "var(--color-action-primary-bg)" : "var(--color-action-primary-bgDisabled)";
298
297
  },
299
- children: x ? "Finish" : "Next"
298
+ children: S ? T("tourPreview.finish", "Finish") : T("common.next", "Next")
300
299
  })]
301
300
  })]
302
301
  })
303
302
  ]
304
- }), P.arrowPosition !== "none" && /* @__PURE__ */ o("div", { style: {
303
+ }), I.arrowPosition !== "none" && /* @__PURE__ */ s("div", { style: {
305
304
  position: "absolute",
306
305
  width: 0,
307
306
  height: 0,
308
- ...P.arrowPosition === "top" && {
307
+ ...I.arrowPosition === "top" && {
309
308
  top: -10,
310
- left: P.arrowOffset,
309
+ left: I.arrowOffset,
311
310
  marginLeft: -10,
312
- borderLeft: `${u}px solid transparent`,
313
- borderRight: `${u}px solid transparent`,
314
- borderBottom: `${u}px solid var(--color-bg-surface)`
311
+ borderLeft: `${d}px solid transparent`,
312
+ borderRight: `${d}px solid transparent`,
313
+ borderBottom: `${d}px solid var(--color-bg-surface)`
315
314
  },
316
- ...P.arrowPosition === "bottom" && {
315
+ ...I.arrowPosition === "bottom" && {
317
316
  bottom: -10,
318
- left: P.arrowOffset,
317
+ left: I.arrowOffset,
319
318
  marginLeft: -10,
320
- borderLeft: `${u}px solid transparent`,
321
- borderRight: `${u}px solid transparent`,
322
- borderTop: `${u}px solid var(--color-bg-surface)`
319
+ borderLeft: `${d}px solid transparent`,
320
+ borderRight: `${d}px solid transparent`,
321
+ borderTop: `${d}px solid var(--color-bg-surface)`
323
322
  },
324
- ...P.arrowPosition === "left" && {
323
+ ...I.arrowPosition === "left" && {
325
324
  left: -10,
326
- top: P.arrowOffset,
325
+ top: I.arrowOffset,
327
326
  marginTop: -10,
328
- borderTop: `${u}px solid transparent`,
329
- borderBottom: `${u}px solid transparent`,
330
- borderRight: `${u}px solid var(--color-bg-surface)`
327
+ borderTop: `${d}px solid transparent`,
328
+ borderBottom: `${d}px solid transparent`,
329
+ borderRight: `${d}px solid var(--color-bg-surface)`
331
330
  },
332
- ...P.arrowPosition === "right" && {
331
+ ...I.arrowPosition === "right" && {
333
332
  right: -10,
334
- top: P.arrowOffset,
333
+ top: I.arrowOffset,
335
334
  marginTop: -10,
336
- borderTop: `${u}px solid transparent`,
337
- borderBottom: `${u}px solid transparent`,
338
- borderLeft: `${u}px solid var(--color-bg-surface)`
335
+ borderTop: `${d}px solid transparent`,
336
+ borderBottom: `${d}px solid transparent`,
337
+ borderLeft: `${d}px solid var(--color-bg-surface)`
339
338
  }
340
339
  } })]
341
340
  });
342
341
  });
343
342
  //#endregion
344
- export { m as TourTooltip };
343
+ export { h as TourTooltip };
@@ -1,95 +1,108 @@
1
- import { TourLoadError as e } from "./TourLoadError.js";
2
- import { TourListItemMobile as t } from "./TourListItemMobile.js";
3
- import { forwardRef as n } from "react";
4
- import { ExternalLink as r, HelpCircle as i, Sparkles as a, X as o } from "lucide-react";
5
- import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
6
- import { createPortal as u } from "react-dom";
1
+ import { useShellLabel as e } from "../../providers/shell/useShellLabel.js";
2
+ import { TourLoadError as t } from "./TourLoadError.js";
3
+ import { TourListItemMobile as n } from "./TourListItemMobile.js";
4
+ import { forwardRef as r } from "react";
5
+ import { ExternalLink as i, HelpCircle as a, Sparkles as o, X as s } from "lucide-react";
6
+ import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
7
+ import { createPortal as d } from "react-dom";
7
8
  //#region src/shared/tours/tourTrigger/MobileTourSheet.tsx
8
- var d = n(function({ loading: n, error: d, onRetry: f, tours: p, onClose: m, onStartTour: h, actions: g, onAction: _ }, v) {
9
- let y = !!(g && g.length > 0);
10
- return u(/* @__PURE__ */ l(s, { children: [/* @__PURE__ */ c("div", {
9
+ var f = r(function({ loading: e, error: t, onRetry: n, tours: r, onClose: i, onStartTour: a, actions: o, onAction: s }, f) {
10
+ return d(/* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l("div", {
11
11
  className: "fixed inset-0 bg-black/50 z-[100] animate-in fade-in duration-200",
12
- onClick: m
12
+ onClick: i
13
13
  }), /* @__PURE__ */ l("div", {
14
- ref: v,
14
+ ref: f,
15
15
  className: "fixed inset-x-0 bottom-0 z-[101] bg-bg-surface rounded-t-2xl shadow-xl animate-in slide-in-from-bottom duration-300 max-h-[80vh] flex flex-col",
16
- children: [
17
- /* @__PURE__ */ c("div", {
18
- className: "flex justify-center pt-3 pb-2",
19
- children: /* @__PURE__ */ c("div", { className: "w-10 h-1 bg-border-default rounded-full" })
20
- }),
21
- /* @__PURE__ */ l("div", {
22
- className: "flex items-center justify-between px-4 pb-3 border-b border-border-subtle",
23
- children: [/* @__PURE__ */ l("div", {
24
- className: "flex items-center gap-2",
25
- children: [/* @__PURE__ */ c(a, { className: "size-5 text-action-primary-bg" }), /* @__PURE__ */ c("h2", {
26
- className: "text-lg font-semibold text-text-primary",
27
- children: "Help & tours"
28
- })]
29
- }), /* @__PURE__ */ c("button", {
30
- type: "button",
31
- onClick: m,
32
- className: "p-2 hover:bg-action-ghost-bg-hover rounded-full",
33
- "aria-label": "Close",
34
- children: /* @__PURE__ */ c(o, { className: "size-5" })
16
+ children: /* @__PURE__ */ l(p, {
17
+ loading: e,
18
+ error: t,
19
+ onRetry: n,
20
+ tours: r,
21
+ onClose: i,
22
+ onStartTour: a,
23
+ actions: o,
24
+ onAction: s
25
+ })
26
+ })] }), document.body);
27
+ });
28
+ function p({ loading: r, error: d, onRetry: f, tours: p, onClose: m, onStartTour: h, actions: g, onAction: _ }) {
29
+ let v = e(), y = !!(g && g.length > 0);
30
+ return /* @__PURE__ */ u(c, { children: [
31
+ /* @__PURE__ */ l("div", {
32
+ className: "flex justify-center pt-3 pb-2",
33
+ children: /* @__PURE__ */ l("div", { className: "w-10 h-1 bg-border-default rounded-full" })
34
+ }),
35
+ /* @__PURE__ */ u("div", {
36
+ className: "flex items-center justify-between px-4 pb-3 border-b border-border-subtle",
37
+ children: [/* @__PURE__ */ u("div", {
38
+ className: "flex items-center gap-2",
39
+ children: [/* @__PURE__ */ l(o, { className: "size-5 text-action-primary-bg" }), /* @__PURE__ */ l("h2", {
40
+ className: "text-lg font-semibold text-text-primary",
41
+ children: v("tours.helpTours", "Help & tours")
35
42
  })]
36
- }),
37
- /* @__PURE__ */ l("div", {
38
- className: "flex-1 overflow-y-auto p-4",
39
- children: [n ? /* @__PURE__ */ c("div", {
40
- className: "flex items-center justify-center py-8",
41
- children: /* @__PURE__ */ c("div", { className: "animate-spin rounded-full size-6 border-2 border-action-primary-bg border-t-transparent" })
42
- }) : d ? /* @__PURE__ */ c(e, { onRetry: f }) : p.length > 0 ? /* @__PURE__ */ l("div", {
43
- className: "space-y-3",
44
- children: [/* @__PURE__ */ c("p", {
45
- className: "text-sm text-text-secondary mb-4",
46
- children: "Take a guided tour. Current-page tours are shown first."
47
- }), p.map((e) => /* @__PURE__ */ c(t, {
48
- tour: e,
49
- onStart: h
50
- }, e.id))]
51
- }) : /* @__PURE__ */ l("div", {
52
- className: "text-center py-6",
53
- children: [/* @__PURE__ */ c(i, { className: "size-10 mx-auto text-text-tertiary mb-2" }), /* @__PURE__ */ c("p", {
54
- className: "text-text-secondary",
55
- children: "No guided tours for this page yet"
56
- })]
57
- }), y && /* @__PURE__ */ c("div", {
58
- className: "mt-4 border-t border-border-subtle pt-3 space-y-1",
59
- children: g.map((e) => e.href ? /* @__PURE__ */ l("a", {
60
- href: e.href,
61
- target: "_blank",
62
- rel: "noreferrer",
63
- onClick: () => _?.(e),
64
- className: "flex items-center gap-3 rounded-button px-3 py-3 text-sm text-text-secondary hover:bg-bg-sunken hover:text-text-primary transition-colors",
65
- children: [
66
- e.icon && /* @__PURE__ */ c("span", {
67
- className: "flex size-5 items-center justify-center text-text-muted",
68
- children: e.icon
69
- }),
70
- /* @__PURE__ */ c("span", {
71
- className: "flex-1 truncate",
72
- children: e.label
73
- }),
74
- /* @__PURE__ */ c(r, { className: "size-4 text-text-muted" })
75
- ]
76
- }, e.id) : /* @__PURE__ */ l("button", {
77
- type: "button",
78
- onClick: () => _?.(e),
79
- className: "flex w-full items-center gap-3 rounded-button px-3 py-3 text-left text-sm text-text-secondary hover:bg-bg-sunken hover:text-text-primary transition-colors",
80
- children: [e.icon && /* @__PURE__ */ c("span", {
43
+ }), /* @__PURE__ */ l("button", {
44
+ type: "button",
45
+ onClick: m,
46
+ className: "p-2 hover:bg-action-ghost-bg-hover rounded-full",
47
+ "aria-label": v("common.close", "Close"),
48
+ children: /* @__PURE__ */ l(s, { className: "size-5" })
49
+ })]
50
+ }),
51
+ /* @__PURE__ */ u("div", {
52
+ className: "flex-1 overflow-y-auto p-4",
53
+ children: [r ? /* @__PURE__ */ l("div", {
54
+ className: "flex items-center justify-center py-8",
55
+ children: /* @__PURE__ */ l("div", { className: "animate-spin rounded-full size-6 border-2 border-action-primary-bg border-t-transparent" })
56
+ }) : d ? /* @__PURE__ */ l(t, { onRetry: f }) : p.length > 0 ? /* @__PURE__ */ u("div", {
57
+ className: "space-y-3",
58
+ children: [/* @__PURE__ */ l("p", {
59
+ className: "text-sm text-text-secondary mb-4",
60
+ children: v("tours.orderHint", "Take a guided tour. Current-page tours are shown first.")
61
+ }), p.map((e) => /* @__PURE__ */ l(n, {
62
+ tour: e,
63
+ onStart: h
64
+ }, e.id))]
65
+ }) : /* @__PURE__ */ u("div", {
66
+ className: "text-center py-6",
67
+ children: [/* @__PURE__ */ l(a, { className: "size-10 mx-auto text-text-tertiary mb-2" }), /* @__PURE__ */ l("p", {
68
+ className: "text-text-secondary",
69
+ children: v("tours.noGuidedToursForThisPageYet", "No guided tours for this page yet")
70
+ })]
71
+ }), y && /* @__PURE__ */ l("div", {
72
+ className: "mt-4 border-t border-border-subtle pt-3 space-y-1",
73
+ children: g.map((e) => e.href ? /* @__PURE__ */ u("a", {
74
+ href: e.href,
75
+ target: "_blank",
76
+ rel: "noreferrer",
77
+ onClick: () => _?.(e),
78
+ className: "flex items-center gap-3 rounded-button px-3 py-3 text-sm text-text-secondary hover:bg-bg-sunken hover:text-text-primary transition-colors",
79
+ children: [
80
+ e.icon && /* @__PURE__ */ l("span", {
81
81
  className: "flex size-5 items-center justify-center text-text-muted",
82
82
  children: e.icon
83
- }), /* @__PURE__ */ c("span", {
83
+ }),
84
+ /* @__PURE__ */ l("span", {
84
85
  className: "flex-1 truncate",
85
86
  children: e.label
86
- })]
87
- }, e.id))
88
- })]
89
- }),
90
- /* @__PURE__ */ c("div", { className: "h-safe-area-inset-bottom" })
91
- ]
92
- })] }), document.body);
93
- });
87
+ }),
88
+ /* @__PURE__ */ l(i, { className: "size-4 text-text-muted" })
89
+ ]
90
+ }, e.id) : /* @__PURE__ */ u("button", {
91
+ type: "button",
92
+ onClick: () => _?.(e),
93
+ className: "flex w-full items-center gap-3 rounded-button px-3 py-3 text-left text-sm text-text-secondary hover:bg-bg-sunken hover:text-text-primary transition-colors",
94
+ children: [e.icon && /* @__PURE__ */ l("span", {
95
+ className: "flex size-5 items-center justify-center text-text-muted",
96
+ children: e.icon
97
+ }), /* @__PURE__ */ l("span", {
98
+ className: "flex-1 truncate",
99
+ children: e.label
100
+ })]
101
+ }, e.id))
102
+ })]
103
+ }),
104
+ /* @__PURE__ */ l("div", { className: "h-safe-area-inset-bottom" })
105
+ ] });
106
+ }
94
107
  //#endregion
95
- export { d as MobileTourSheet };
108
+ export { f as MobileTourSheet };