@burdenoff/fe-libs 2026.514.1 → 2026.516.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.
@@ -23,12 +23,22 @@ export declare const PROD_HOSTS: Set<string>;
23
23
  export declare const ALPHA_HOSTS: Set<string>;
24
24
  export declare function getCurrentHostname(): string;
25
25
  /**
26
- * Resolve runtime gateway URLs from the current hostname.
26
+ * Resolve runtime gateway URLs from the current hostname, with an optional
27
+ * env-driven override for localhost dev servers.
27
28
  *
28
29
  * Priority:
29
- * 1. Known production domains (all products) production gateways
30
- * 2. Known alpha/staging domains (all products) alpha gateways
31
- * 3. Everything else local development defaults
30
+ * 1. Known production domains → PROD_GATEWAYS (hostname always wins for real deploys)
31
+ * 2. Known alpha/staging domains → ALPHA_GATEWAYS
32
+ * 3. Localhost-like host: `VITE_GATEWAY_TARGET` env var, case-insensitive
33
+ * - `'prod'` → PROD_GATEWAYS (emits a one-time console warning — mutations write to real data)
34
+ * - `'alpha'` → ALPHA_GATEWAYS
35
+ * - `'local'` or anything else → LOCAL_DEFAULTS
36
+ * 4. Everything else (unknown deployed domain, or localhost with no env):
37
+ * LOCAL_DEFAULTS (fails loud against a missing local stack rather than
38
+ * silently writing to prod — see BOFF-2507).
39
+ *
40
+ * Set the override in `<app-shell>/.env.local` (gitignored by Vite) to test
41
+ * a localhost dev server against a remote backend without editing source.
32
42
  */
33
43
  export declare function resolveGatewayUrls(): RuntimeGatewayUrls;
34
44
  //# sourceMappingURL=gatewayUrls.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"gatewayUrls.d.ts","sourceRoot":"","sources":["../../../src/shared/config/gatewayUrls.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,MAAM,WAAW,kBAAkB;IACjC,gBAAgB,EAAE,MAAM,CAAC;IACzB,aAAa,EAAE,MAAM,CAAC;IACtB,kBAAkB,EAAE,MAAM,CAAC;CAC5B;AAoBD;;;GAGG;AACH,eAAO,MAAM,mBAAmB,UAkC/B,CAAC;AAEF,eAAO,MAAM,UAAU,aAGrB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,WAAW,aAA2D,CAAC;AAEpF,wBAAgB,kBAAkB,IAAI,MAAM,CAG3C;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,IAAI,kBAAkB,CASvD"}
1
+ {"version":3,"file":"gatewayUrls.d.ts","sourceRoot":"","sources":["../../../src/shared/config/gatewayUrls.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,MAAM,WAAW,kBAAkB;IACjC,gBAAgB,EAAE,MAAM,CAAC;IACzB,aAAa,EAAE,MAAM,CAAC;IACtB,kBAAkB,EAAE,MAAM,CAAC;CAC5B;AAoBD;;;GAGG;AACH,eAAO,MAAM,mBAAmB,UAkC/B,CAAC;AAEF,eAAO,MAAM,UAAU,aAGrB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,WAAW,aAA2D,CAAC;AAEpF,wBAAgB,kBAAkB,IAAI,MAAM,CAG3C;AA8BD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,kBAAkB,IAAI,kBAAkB,CA6BvD"}
@@ -15,9 +15,33 @@ var e = {
15
15
  function o() {
16
16
  return typeof window > "u" ? "" : window.location.hostname.toLowerCase();
17
17
  }
18
- function s() {
18
+ function s(e) {
19
+ return e ? e === "localhost" || e === "127.0.0.1" || e === "0.0.0.0" || e === "[::1]" || e === "::1" || e.endsWith(".localhost") || e.endsWith(".local.burdenoff.com") : !1;
20
+ }
21
+ var c = !1;
22
+ function l() {
19
23
  let r = o();
20
- return i.has(r) ? t : a.has(r) ? e : n;
24
+ if (i.has(r)) return t;
25
+ if (a.has(r)) return e;
26
+ if (s(r)) {
27
+ let n = u();
28
+ if (n === "prod") return c || (c = !0, console.warn("[gatewayUrls] WARNING: localhost dev server is configured to hit PRODUCTION backends (VITE_GATEWAY_TARGET=prod). Any mutation will modify real prod data. Remove the env var or delete .env.local to disable.")), t;
29
+ if (n === "alpha") return e;
30
+ }
31
+ return n;
32
+ }
33
+ function u() {
34
+ try {
35
+ return {
36
+ BASE_URL: "/",
37
+ DEV: !1,
38
+ MODE: "production",
39
+ PROD: !0,
40
+ SSR: !1
41
+ }?.VITE_GATEWAY_TARGET?.toLowerCase();
42
+ } catch {
43
+ return;
44
+ }
21
45
  }
22
46
  //#endregion
23
- export { r as ALL_PRODUCT_DOMAINS, a as ALPHA_HOSTS, i as PROD_HOSTS, o as getCurrentHostname, s as resolveGatewayUrls };
47
+ export { r as ALL_PRODUCT_DOMAINS, a as ALPHA_HOSTS, i as PROD_HOSTS, o as getCurrentHostname, l as resolveGatewayUrls };
@@ -1,6 +1,15 @@
1
- /**
2
- * TourTrigger Header button showing available page tours.
3
- * Responsive: dropdown on desktop, bottom sheet on mobile.
4
- */
5
- export declare function TourTrigger(): import("react/jsx-runtime").JSX.Element | null;
1
+ import { Tour } from './types';
2
+ import { TourCurrentContext } from './routeCatalog';
3
+ export declare function isTourTriggerListCandidate(tour: Tour, productId: string | null | undefined): boolean;
4
+ export declare function getTourTriggerNavigationTarget(tour: Tour, currentPath: string): string | undefined;
5
+ export type TourTriggerStartAction = {
6
+ type: "navigate";
7
+ targetPath: string;
8
+ } | {
9
+ type: "play";
10
+ } | {
11
+ type: "ignore";
12
+ };
13
+ export declare function getTourTriggerStartAction(tour: Tour, currentPath: string, currentContext: TourCurrentContext, canNavigate: boolean): TourTriggerStartAction;
14
+ export declare function TourTrigger(): import("react/jsx-runtime").JSX.Element;
6
15
  //# sourceMappingURL=TourTrigger.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TourTrigger.d.ts","sourceRoot":"","sources":["../../../src/shared/tours/TourTrigger.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAsDH,wBAAgB,WAAW,mDAmQ1B"}
1
+ {"version":3,"file":"TourTrigger.d.ts","sourceRoot":"","sources":["../../../src/shared/tours/TourTrigger.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAQH,OAAO,KAAK,EAAE,IAAI,EAAkB,MAAM,SAAS,CAAC;AACpD,OAAO,EAKL,KAAK,kBAAkB,EACxB,MAAM,gBAAgB,CAAC;AAQxB,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GACnC,OAAO,CAQT;AAED,wBAAgB,8BAA8B,CAC5C,IAAI,EAAE,IAAI,EACV,WAAW,EAAE,MAAM,GAClB,MAAM,GAAG,SAAS,CAMpB;AAED,MAAM,MAAM,sBAAsB,GAC9B;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,GACxC;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAChB;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,CAAC;AAEvB,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,IAAI,EACV,WAAW,EAAE,MAAM,EACnB,cAAc,EAAE,kBAAkB,EAClC,WAAW,EAAE,OAAO,GACnB,sBAAsB,CASxB;AAoDD,wBAAgB,WAAW,4CAO1B"}
@@ -1,11 +1,29 @@
1
1
  import { useSafeShellUi as e } from "../providers/shell/ShellUiProvider.js";
2
2
  import { usePlayTour as t } from "./TourPlayer.js";
3
- import { useSafeToursContext as n } from "./ToursContext.js";
4
- import { useEffect as r, useRef as i, useState as a } from "react";
5
- import { ChevronRight as o, HelpCircle as s, Play as c, Sparkles as l, X as u } from "lucide-react";
6
- import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
3
+ import { getTourContextRank as n, isTourVisibleForContext as r, normalizeTourPath as i, resolveTourTargetPath as a } from "./routeCatalog.js";
4
+ import { useSafeToursContext as o } from "./ToursContext.js";
5
+ import { useEffect as s, useMemo as c, useRef as l, useState as u } from "react";
6
+ import { ChevronRight as d, HelpCircle as f, Play as p, Sparkles as m, X as h } from "lucide-react";
7
+ import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
8
+ import { useInRouterContext as y, useLocation as b, useNavigate as x } from "react-router-dom";
7
9
  //#region src/shared/tours/TourTrigger.tsx
8
- var m = "bg-bg-muted text-text-tertiary", h = {
10
+ var S = 5e3, C = 100, w = 150;
11
+ function T(e, t) {
12
+ let n = t?.trim();
13
+ return !!(n && e.productId.trim() === n && e.isActive && e.steps?.length > 0);
14
+ }
15
+ function E(e, t) {
16
+ let n = a(e);
17
+ if (n) return i(t) === i(n) ? void 0 : n;
18
+ }
19
+ function D(e, t, n, i) {
20
+ let a = E(e, t);
21
+ return a ? i ? {
22
+ type: "navigate",
23
+ targetPath: a
24
+ } : { type: "ignore" } : r(e, n) ? { type: "play" } : { type: "ignore" };
25
+ }
26
+ var O = "bg-bg-muted text-text-tertiary", k = {
9
27
  COMPLETED: {
10
28
  label: "Completed",
11
29
  className: "bg-status-success-bg-subtle text-status-success-text"
@@ -16,126 +34,198 @@ var m = "bg-bg-muted text-text-tertiary", h = {
16
34
  },
17
35
  SKIPPED: {
18
36
  label: "Skipped",
19
- className: m
37
+ className: O
20
38
  },
21
39
  DISMISSED: {
22
40
  label: "Dismissed",
23
- className: m
41
+ className: O
24
42
  }
25
43
  };
26
- function g({ status: e }) {
44
+ function A({ status: e }) {
27
45
  if (!e) return null;
28
- let t = h[e];
29
- return t ? /* @__PURE__ */ f("span", {
46
+ let t = k[e];
47
+ return t ? /* @__PURE__ */ _("span", {
30
48
  className: `shrink-0 inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${t.className}`,
31
49
  children: t.label
32
50
  }) : null;
33
51
  }
34
- function _() {
35
- let [m, h] = a(!1), [_, v] = a(!1), y = i(null), b = i(null), { pageTours: x, loading: S } = n(), C = t(), w = e()?.pageAccessDenied ?? !1;
36
- r(() => {
52
+ function j() {
53
+ return y() ? /* @__PURE__ */ _(M, {}) : /* @__PURE__ */ _(N, { pathname: typeof window > "u" ? "/" : window.location.pathname });
54
+ }
55
+ function M() {
56
+ let e = b(), t = x();
57
+ return /* @__PURE__ */ _(N, {
58
+ pathname: e.pathname,
59
+ navigateTo: (n) => t({
60
+ pathname: n,
61
+ search: e.search
62
+ })
63
+ });
64
+ }
65
+ function N({ pathname: r, navigateTo: i }) {
66
+ let [a, y] = u(!1), [b, x] = u(!1), [E, O] = u(null), k = l(null), j = l(null), { pageTours: M, productId: N, moduleId: P, pageId: F, loading: I } = o(), L = t(), R = !!i, z = e()?.pageAccessDenied ?? !1;
67
+ s(() => {
37
68
  let e = () => {
38
- v(window.innerWidth < 768);
69
+ x(window.innerWidth < 768);
39
70
  };
40
71
  return e(), window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
41
- }, []), r(() => {
72
+ }, []), s(() => {
42
73
  let e = (e) => {
43
- b.current && !b.current.contains(e.target) && y.current && !y.current.contains(e.target) && h(!1);
74
+ j.current && !j.current.contains(e.target) && k.current && !k.current.contains(e.target) && y(!1);
44
75
  };
45
- return m && (document.addEventListener("mousedown", e), _ && (document.body.style.overflow = "hidden")), () => {
76
+ return a && (document.addEventListener("mousedown", e), b && (document.body.style.overflow = "hidden")), () => {
46
77
  document.removeEventListener("mousedown", e), document.body.style.overflow = "";
47
78
  };
48
- }, [m, _]), r(() => {
79
+ }, [a, b]), s(() => {
49
80
  let e = (e) => {
50
- e.key === "Escape" && h(!1);
81
+ e.key === "Escape" && y(!1);
51
82
  };
52
- return m && document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
53
- }, [m]);
54
- let T = (e) => {
55
- h(!1), setTimeout(() => {
56
- C(e);
57
- }, 100);
58
- }, E = x.filter((e) => e.steps && e.steps.length > 0), D = E.length > 0, O = w;
59
- return r(() => {
60
- O && m && h(!1);
61
- }, [O, m]), O ? null : /* @__PURE__ */ p("div", {
83
+ return a && document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
84
+ }, [a]);
85
+ let B = (e) => {
86
+ y(!1);
87
+ let t = D(e, r, {
88
+ productId: N ?? "",
89
+ moduleId: P,
90
+ pageId: F
91
+ }, R);
92
+ if (t.type === "navigate") {
93
+ O(e.id), i?.(t.targetPath);
94
+ return;
95
+ }
96
+ t.type !== "ignore" && window.setTimeout(() => {
97
+ L(e);
98
+ }, C);
99
+ }, V = c(() => ({
100
+ productId: N ?? "",
101
+ moduleId: P,
102
+ pageId: F
103
+ }), [
104
+ P,
105
+ F,
106
+ N
107
+ ]), H = c(() => M.filter((e) => T(e, N)).sort((e, t) => {
108
+ let r = n(e, V) - n(t, V);
109
+ if (r !== 0) return r;
110
+ let i = (t.priority ?? 0) - (e.priority ?? 0);
111
+ return i === 0 ? (e.displayOrder ?? 0) - (t.displayOrder ?? 0) : i;
112
+ }), [
113
+ V,
114
+ N,
115
+ M
116
+ ]);
117
+ s(() => {
118
+ if (!E) return;
119
+ let e = H.find((e) => e.id === E);
120
+ if (!e) {
121
+ O(null);
122
+ return;
123
+ }
124
+ let t = D(e, r, V, R);
125
+ if (t.type === "navigate") return;
126
+ if (t.type === "ignore") {
127
+ O(null);
128
+ return;
129
+ }
130
+ let n = window.setTimeout(() => {
131
+ L(e), O(null);
132
+ }, w);
133
+ return () => window.clearTimeout(n);
134
+ }, [
135
+ H,
136
+ R,
137
+ V,
138
+ r,
139
+ E,
140
+ L
141
+ ]), s(() => {
142
+ if (!E) return;
143
+ let e = window.setTimeout(() => {
144
+ O(null);
145
+ }, S);
146
+ return () => window.clearTimeout(e);
147
+ }, [E]);
148
+ let U = H.length > 0, W = z;
149
+ return s(() => {
150
+ W && a && y(!1);
151
+ }, [W, a]), W ? null : /* @__PURE__ */ v("div", {
62
152
  className: "relative",
63
153
  children: [
64
- /* @__PURE__ */ p("button", {
65
- ref: y,
66
- onClick: () => h(!m),
154
+ /* @__PURE__ */ v("button", {
155
+ ref: k,
156
+ onClick: () => y(!a),
67
157
  className: `
68
158
  relative p-2 rounded-button transition-colors
69
- ${m ? "bg-action-ghost-bg-hover" : "hover:bg-action-ghost-bg-hover"}
70
- ${D ? "text-text-primary" : "text-text-tertiary"}
159
+ ${a ? "bg-action-ghost-bg-hover" : "hover:bg-action-ghost-bg-hover"}
160
+ ${U ? "text-text-primary" : "text-text-tertiary"}
71
161
  `,
72
162
  "aria-label": "Help & Tours",
73
- "aria-expanded": m,
163
+ "aria-expanded": a,
74
164
  "aria-haspopup": "true",
75
165
  title: "Help & Tours",
76
- children: [/* @__PURE__ */ f(s, { className: "w-5 h-5" }), D && /* @__PURE__ */ f("span", { className: "absolute top-1 right-1 w-2 h-2 bg-action-primary-bg rounded-full" })]
166
+ children: [/* @__PURE__ */ _(f, { className: "w-5 h-5" }), U && /* @__PURE__ */ _("span", { className: "absolute top-1 right-1 w-2 h-2 bg-action-primary-bg rounded-full" })]
77
167
  }),
78
- m && _ && /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f("div", {
168
+ a && b && /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _("div", {
79
169
  className: "fixed inset-0 bg-black/50 z-[100] animate-in fade-in duration-200",
80
- onClick: () => h(!1)
81
- }), /* @__PURE__ */ p("div", {
82
- ref: b,
170
+ onClick: () => y(!1)
171
+ }), /* @__PURE__ */ v("div", {
172
+ ref: j,
83
173
  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",
84
174
  children: [
85
- /* @__PURE__ */ f("div", {
175
+ /* @__PURE__ */ _("div", {
86
176
  className: "flex justify-center pt-3 pb-2",
87
- children: /* @__PURE__ */ f("div", { className: "w-10 h-1 bg-border-default rounded-full" })
177
+ children: /* @__PURE__ */ _("div", { className: "w-10 h-1 bg-border-default rounded-full" })
88
178
  }),
89
- /* @__PURE__ */ p("div", {
179
+ /* @__PURE__ */ v("div", {
90
180
  className: "flex items-center justify-between px-4 pb-3 border-b border-border-subtle",
91
- children: [/* @__PURE__ */ p("div", {
181
+ children: [/* @__PURE__ */ v("div", {
92
182
  className: "flex items-center gap-2",
93
- children: [/* @__PURE__ */ f(l, { className: "w-5 h-5 text-action-primary-bg" }), /* @__PURE__ */ f("h2", {
183
+ children: [/* @__PURE__ */ _(m, { className: "w-5 h-5 text-action-primary-bg" }), /* @__PURE__ */ _("h2", {
94
184
  className: "text-lg font-semibold text-text-primary",
95
- children: "Page Tours"
185
+ children: "Product Tours"
96
186
  })]
97
- }), /* @__PURE__ */ f("button", {
98
- onClick: () => h(!1),
187
+ }), /* @__PURE__ */ _("button", {
188
+ onClick: () => y(!1),
99
189
  className: "p-2 hover:bg-action-ghost-bg-hover rounded-full",
100
190
  "aria-label": "Close",
101
- children: /* @__PURE__ */ f(u, { className: "w-5 h-5" })
191
+ children: /* @__PURE__ */ _(h, { className: "w-5 h-5" })
102
192
  })]
103
193
  }),
104
- /* @__PURE__ */ f("div", {
194
+ /* @__PURE__ */ _("div", {
105
195
  className: "flex-1 overflow-y-auto p-4",
106
- children: S ? /* @__PURE__ */ f("div", {
196
+ children: I ? /* @__PURE__ */ _("div", {
107
197
  className: "flex items-center justify-center py-8",
108
- children: /* @__PURE__ */ f("div", { className: "animate-spin rounded-full h-6 w-6 border-2 border-action-primary-bg border-t-transparent" })
109
- }) : E.length > 0 ? /* @__PURE__ */ p("div", {
198
+ children: /* @__PURE__ */ _("div", { className: "animate-spin rounded-full h-6 w-6 border-2 border-action-primary-bg border-t-transparent" })
199
+ }) : H.length > 0 ? /* @__PURE__ */ v("div", {
110
200
  className: "space-y-3",
111
- children: [/* @__PURE__ */ f("p", {
201
+ children: [/* @__PURE__ */ _("p", {
112
202
  className: "text-sm text-text-secondary mb-4",
113
- children: "Take a guided tour to learn about this page:"
114
- }), E.map((e) => /* @__PURE__ */ f("button", {
115
- onClick: () => T(e),
203
+ children: "Take a guided tour. Current-page tours are shown first."
204
+ }), H.map((e) => /* @__PURE__ */ _("button", {
205
+ onClick: () => B(e),
116
206
  className: "w-full p-4 bg-bg-muted hover:bg-action-ghost-bg-hover rounded-xl transition-colors text-left group",
117
- children: /* @__PURE__ */ p("div", {
207
+ children: /* @__PURE__ */ v("div", {
118
208
  className: "flex items-center justify-between",
119
- children: [/* @__PURE__ */ p("div", {
209
+ children: [/* @__PURE__ */ v("div", {
120
210
  className: "flex-1 min-w-0",
121
211
  children: [
122
- /* @__PURE__ */ p("div", {
212
+ /* @__PURE__ */ v("div", {
123
213
  className: "flex items-center gap-2 min-w-0",
124
- children: [/* @__PURE__ */ f("h3", {
214
+ children: [/* @__PURE__ */ _("h3", {
125
215
  className: "min-w-0 flex-1 font-medium text-text-primary truncate",
126
216
  children: e.name
127
- }), /* @__PURE__ */ f(g, { status: e.myProgress?.status })]
217
+ }), /* @__PURE__ */ _(A, { status: e.myProgress?.status })]
128
218
  }),
129
- e.description && /* @__PURE__ */ f("p", {
219
+ e.description && /* @__PURE__ */ _("p", {
130
220
  className: "text-sm text-text-secondary mt-1 line-clamp-2",
131
221
  children: e.description
132
222
  }),
133
- /* @__PURE__ */ p("div", {
223
+ /* @__PURE__ */ v("div", {
134
224
  className: "flex items-center gap-3 mt-2 text-xs text-text-tertiary",
135
225
  children: [
136
- /* @__PURE__ */ p("span", { children: [e.steps?.length || 0, " steps"] }),
137
- /* @__PURE__ */ f("span", { children: "•" }),
138
- /* @__PURE__ */ p("span", { children: [
226
+ /* @__PURE__ */ v("span", { children: [e.steps?.length || 0, " steps"] }),
227
+ /* @__PURE__ */ _("span", { children: "•" }),
228
+ /* @__PURE__ */ v("span", { children: [
139
229
  "~",
140
230
  Math.ceil((e.steps?.length || 0) * .5),
141
231
  " min"
@@ -143,86 +233,86 @@ function _() {
143
233
  ]
144
234
  })
145
235
  ]
146
- }), /* @__PURE__ */ f("div", {
236
+ }), /* @__PURE__ */ _("div", {
147
237
  className: "ml-3 p-2 bg-action-primary-bg rounded-full text-action-primary-text group-hover:scale-110 transition-transform",
148
- children: /* @__PURE__ */ f(c, { className: "w-4 h-4" })
238
+ children: /* @__PURE__ */ _(p, { className: "w-4 h-4" })
149
239
  })]
150
240
  })
151
241
  }, e.id))]
152
- }) : /* @__PURE__ */ p("div", {
242
+ }) : /* @__PURE__ */ v("div", {
153
243
  className: "text-center py-8",
154
244
  children: [
155
- /* @__PURE__ */ f(s, { className: "w-12 h-12 mx-auto text-text-tertiary mb-3" }),
156
- /* @__PURE__ */ f("p", {
245
+ /* @__PURE__ */ _(f, { className: "w-12 h-12 mx-auto text-text-tertiary mb-3" }),
246
+ /* @__PURE__ */ _("p", {
157
247
  className: "text-text-secondary",
158
248
  children: "No tours available for this page"
159
249
  }),
160
- /* @__PURE__ */ f("p", {
250
+ /* @__PURE__ */ _("p", {
161
251
  className: "text-sm text-text-tertiary mt-1",
162
252
  children: "Check back later or explore other pages"
163
253
  })
164
254
  ]
165
255
  })
166
256
  }),
167
- /* @__PURE__ */ f("div", { className: "h-safe-area-inset-bottom" })
257
+ /* @__PURE__ */ _("div", { className: "h-safe-area-inset-bottom" })
168
258
  ]
169
259
  })] }),
170
- m && !_ && /* @__PURE__ */ p("div", {
171
- ref: b,
260
+ a && !b && /* @__PURE__ */ v("div", {
261
+ ref: j,
172
262
  className: "absolute right-0 top-full mt-2 w-80 bg-bg-surface rounded-lg shadow-xl border border-border-subtle z-50 animate-in fade-in slide-in-from-top-2 duration-200",
173
263
  children: [
174
- /* @__PURE__ */ p("div", {
264
+ /* @__PURE__ */ v("div", {
175
265
  className: "flex items-center gap-2 px-4 py-3 border-b border-border-subtle",
176
- children: [/* @__PURE__ */ f(l, { className: "w-4 h-4 text-action-primary-bg" }), /* @__PURE__ */ f("h3", {
266
+ children: [/* @__PURE__ */ _(m, { className: "w-4 h-4 text-action-primary-bg" }), /* @__PURE__ */ _("h3", {
177
267
  className: "font-medium text-text-primary",
178
- children: "Page Tours"
268
+ children: "Product Tours"
179
269
  })]
180
270
  }),
181
- /* @__PURE__ */ f("div", {
271
+ /* @__PURE__ */ _("div", {
182
272
  className: "max-h-80 overflow-y-auto",
183
- children: S ? /* @__PURE__ */ f("div", {
273
+ children: I ? /* @__PURE__ */ _("div", {
184
274
  className: "flex items-center justify-center py-6",
185
- children: /* @__PURE__ */ f("div", { className: "animate-spin rounded-full h-5 w-5 border-2 border-action-primary-bg border-t-transparent" })
186
- }) : E.length > 0 ? /* @__PURE__ */ f("div", {
275
+ children: /* @__PURE__ */ _("div", { className: "animate-spin rounded-full h-5 w-5 border-2 border-action-primary-bg border-t-transparent" })
276
+ }) : H.length > 0 ? /* @__PURE__ */ _("div", {
187
277
  className: "p-2",
188
- children: E.map((e) => /* @__PURE__ */ f("button", {
189
- onClick: () => T(e),
278
+ children: H.map((e) => /* @__PURE__ */ _("button", {
279
+ onClick: () => B(e),
190
280
  className: "w-full p-3 hover:bg-action-ghost-bg-hover rounded-md transition-colors text-left group",
191
- children: /* @__PURE__ */ p("div", {
281
+ children: /* @__PURE__ */ v("div", {
192
282
  className: "flex items-center justify-between",
193
- children: [/* @__PURE__ */ p("div", {
283
+ children: [/* @__PURE__ */ v("div", {
194
284
  className: "flex-1 min-w-0",
195
285
  children: [
196
- /* @__PURE__ */ p("div", {
286
+ /* @__PURE__ */ v("div", {
197
287
  className: "flex items-center gap-2 min-w-0",
198
- children: [/* @__PURE__ */ f("h4", {
288
+ children: [/* @__PURE__ */ _("h4", {
199
289
  className: "min-w-0 flex-1 font-medium text-text-primary text-sm truncate",
200
290
  children: e.name
201
- }), /* @__PURE__ */ f(g, { status: e.myProgress?.status })]
291
+ }), /* @__PURE__ */ _(A, { status: e.myProgress?.status })]
202
292
  }),
203
- e.description && /* @__PURE__ */ f("p", {
293
+ e.description && /* @__PURE__ */ _("p", {
204
294
  className: "text-xs text-text-secondary mt-0.5 line-clamp-1",
205
295
  children: e.description
206
296
  }),
207
- /* @__PURE__ */ f("div", {
297
+ /* @__PURE__ */ _("div", {
208
298
  className: "flex items-center gap-2 mt-1 text-xs text-text-tertiary",
209
- children: /* @__PURE__ */ p("span", { children: [e.steps?.length || 0, " steps"] })
299
+ children: /* @__PURE__ */ v("span", { children: [e.steps?.length || 0, " steps"] })
210
300
  })
211
301
  ]
212
- }), /* @__PURE__ */ f(o, { className: "w-4 h-4 text-text-tertiary group-hover:text-action-primary-bg group-hover:translate-x-0.5 transition-all" })]
302
+ }), /* @__PURE__ */ _(d, { className: "w-4 h-4 text-text-tertiary group-hover:text-action-primary-bg group-hover:translate-x-0.5 transition-all" })]
213
303
  })
214
304
  }, e.id))
215
- }) : /* @__PURE__ */ f("div", {
305
+ }) : /* @__PURE__ */ _("div", {
216
306
  className: "text-center py-6 px-4",
217
- children: /* @__PURE__ */ f("p", {
307
+ children: /* @__PURE__ */ _("p", {
218
308
  className: "text-sm text-text-secondary",
219
309
  children: "No tours available for this page"
220
310
  })
221
311
  })
222
312
  }),
223
- E.length > 0 && /* @__PURE__ */ f("div", {
313
+ H.length > 0 && /* @__PURE__ */ _("div", {
224
314
  className: "px-4 py-2 border-t border-border-subtle bg-bg-muted/50 rounded-b-lg",
225
- children: /* @__PURE__ */ f("p", {
315
+ children: /* @__PURE__ */ _("p", {
226
316
  className: "text-xs text-text-tertiary text-center",
227
317
  children: "Click a tour to start the guided walkthrough"
228
318
  })
@@ -233,4 +323,4 @@ function _() {
233
323
  });
234
324
  }
235
325
  //#endregion
236
- export { _ as TourTrigger };
326
+ export { j as TourTrigger };
@@ -15,6 +15,7 @@ export interface ToursContextValue {
15
15
  metadata?: Record<string, unknown>;
16
16
  }) => Promise<void>;
17
17
  autoStartTour: Tour | null;
18
+ productId: string | undefined;
18
19
  moduleId: string | undefined;
19
20
  pageId: string | undefined;
20
21
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ToursContext.d.ts","sourceRoot":"","sources":["../../../src/shared/tours/ToursContext.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAQL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAQf,OAAO,EAAoB,KAAK,IAAI,EAAE,MAAM,SAAS,CAAC;AAwTtD,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,SAAS,EAAE,IAAI,EAAE,CAAC;IAClB,OAAO,EAAE,OAAO,CAA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