@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.
- package/dist/shared/config/gatewayUrls.d.ts +14 -4
- package/dist/shared/config/gatewayUrls.d.ts.map +1 -1
- package/dist/shared/config/gatewayUrls.js +27 -3
- package/dist/shared/tours/TourTrigger.d.ts +14 -5
- package/dist/shared/tours/TourTrigger.d.ts.map +1 -1
- package/dist/shared/tours/TourTrigger.js +189 -99
- package/dist/shared/tours/ToursContext.d.ts +1 -0
- package/dist/shared/tours/ToursContext.d.ts.map +1 -1
- package/dist/shared/tours/ToursContext.js +152 -119
- package/dist/shared/tours/index.d.ts +5 -1
- package/dist/shared/tours/index.d.ts.map +1 -1
- package/dist/shared/tours/progress.d.ts +7 -0
- package/dist/shared/tours/progress.d.ts.map +1 -0
- package/dist/shared/tours/progress.js +12 -0
- package/dist/shared/tours/routeCatalog.d.ts +42 -0
- package/dist/shared/tours/routeCatalog.d.ts.map +1 -0
- package/dist/shared/tours/routeCatalog.js +228 -0
- package/dist/shared/utils/apollo.d.ts.map +1 -1
- package/dist/shared/utils/apollo.js +32 -32
- package/dist/shared/utils/gatewayFetchRewrite.d.ts.map +1 -1
- package/dist/shared/utils/gatewayFetchRewrite.js +3 -3
- package/dist/shared-tours.js +6 -4
- package/dist/shared.js +19 -17
- package/package.json +2 -2
|
@@ -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 (
|
|
30
|
-
* 2. Known alpha/staging domains
|
|
31
|
-
* 3.
|
|
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;
|
|
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
|
-
|
|
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,
|
|
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
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export
|
|
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;
|
|
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 {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
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
|
|
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:
|
|
37
|
+
className: O
|
|
20
38
|
},
|
|
21
39
|
DISMISSED: {
|
|
22
40
|
label: "Dismissed",
|
|
23
|
-
className:
|
|
41
|
+
className: O
|
|
24
42
|
}
|
|
25
43
|
};
|
|
26
|
-
function
|
|
44
|
+
function A({ status: e }) {
|
|
27
45
|
if (!e) return null;
|
|
28
|
-
let t =
|
|
29
|
-
return t ? /* @__PURE__ */
|
|
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
|
-
|
|
36
|
-
|
|
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
|
-
|
|
69
|
+
x(window.innerWidth < 768);
|
|
39
70
|
};
|
|
40
71
|
return e(), window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
|
|
41
|
-
}, []),
|
|
72
|
+
}, []), s(() => {
|
|
42
73
|
let e = (e) => {
|
|
43
|
-
|
|
74
|
+
j.current && !j.current.contains(e.target) && k.current && !k.current.contains(e.target) && y(!1);
|
|
44
75
|
};
|
|
45
|
-
return
|
|
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
|
-
}, [
|
|
79
|
+
}, [a, b]), s(() => {
|
|
49
80
|
let e = (e) => {
|
|
50
|
-
e.key === "Escape" &&
|
|
81
|
+
e.key === "Escape" && y(!1);
|
|
51
82
|
};
|
|
52
|
-
return
|
|
53
|
-
}, [
|
|
54
|
-
let
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
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__ */
|
|
65
|
-
ref:
|
|
66
|
-
onClick: () =>
|
|
154
|
+
/* @__PURE__ */ v("button", {
|
|
155
|
+
ref: k,
|
|
156
|
+
onClick: () => y(!a),
|
|
67
157
|
className: `
|
|
68
158
|
relative p-2 rounded-button transition-colors
|
|
69
|
-
${
|
|
70
|
-
${
|
|
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":
|
|
163
|
+
"aria-expanded": a,
|
|
74
164
|
"aria-haspopup": "true",
|
|
75
165
|
title: "Help & Tours",
|
|
76
|
-
children: [/* @__PURE__ */ f
|
|
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
|
-
|
|
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: () =>
|
|
81
|
-
}), /* @__PURE__ */
|
|
82
|
-
ref:
|
|
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__ */
|
|
175
|
+
/* @__PURE__ */ _("div", {
|
|
86
176
|
className: "flex justify-center pt-3 pb-2",
|
|
87
|
-
children: /* @__PURE__ */
|
|
177
|
+
children: /* @__PURE__ */ _("div", { className: "w-10 h-1 bg-border-default rounded-full" })
|
|
88
178
|
}),
|
|
89
|
-
/* @__PURE__ */
|
|
179
|
+
/* @__PURE__ */ v("div", {
|
|
90
180
|
className: "flex items-center justify-between px-4 pb-3 border-b border-border-subtle",
|
|
91
|
-
children: [/* @__PURE__ */
|
|
181
|
+
children: [/* @__PURE__ */ v("div", {
|
|
92
182
|
className: "flex items-center gap-2",
|
|
93
|
-
children: [/* @__PURE__ */
|
|
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: "
|
|
185
|
+
children: "Product Tours"
|
|
96
186
|
})]
|
|
97
|
-
}), /* @__PURE__ */
|
|
98
|
-
onClick: () =>
|
|
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__ */
|
|
191
|
+
children: /* @__PURE__ */ _(h, { className: "w-5 h-5" })
|
|
102
192
|
})]
|
|
103
193
|
}),
|
|
104
|
-
/* @__PURE__ */
|
|
194
|
+
/* @__PURE__ */ _("div", {
|
|
105
195
|
className: "flex-1 overflow-y-auto p-4",
|
|
106
|
-
children:
|
|
196
|
+
children: I ? /* @__PURE__ */ _("div", {
|
|
107
197
|
className: "flex items-center justify-center py-8",
|
|
108
|
-
children: /* @__PURE__ */
|
|
109
|
-
}) :
|
|
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__ */
|
|
201
|
+
children: [/* @__PURE__ */ _("p", {
|
|
112
202
|
className: "text-sm text-text-secondary mb-4",
|
|
113
|
-
children: "Take a guided tour
|
|
114
|
-
}),
|
|
115
|
-
onClick: () =>
|
|
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__ */
|
|
207
|
+
children: /* @__PURE__ */ v("div", {
|
|
118
208
|
className: "flex items-center justify-between",
|
|
119
|
-
children: [/* @__PURE__ */
|
|
209
|
+
children: [/* @__PURE__ */ v("div", {
|
|
120
210
|
className: "flex-1 min-w-0",
|
|
121
211
|
children: [
|
|
122
|
-
/* @__PURE__ */
|
|
212
|
+
/* @__PURE__ */ v("div", {
|
|
123
213
|
className: "flex items-center gap-2 min-w-0",
|
|
124
|
-
children: [/* @__PURE__ */
|
|
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__ */
|
|
217
|
+
}), /* @__PURE__ */ _(A, { status: e.myProgress?.status })]
|
|
128
218
|
}),
|
|
129
|
-
e.description && /* @__PURE__ */
|
|
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__ */
|
|
223
|
+
/* @__PURE__ */ v("div", {
|
|
134
224
|
className: "flex items-center gap-3 mt-2 text-xs text-text-tertiary",
|
|
135
225
|
children: [
|
|
136
|
-
/* @__PURE__ */
|
|
137
|
-
/* @__PURE__ */
|
|
138
|
-
/* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
238
|
+
children: /* @__PURE__ */ _(p, { className: "w-4 h-4" })
|
|
149
239
|
})]
|
|
150
240
|
})
|
|
151
241
|
}, e.id))]
|
|
152
|
-
}) : /* @__PURE__ */
|
|
242
|
+
}) : /* @__PURE__ */ v("div", {
|
|
153
243
|
className: "text-center py-8",
|
|
154
244
|
children: [
|
|
155
|
-
/* @__PURE__ */ f
|
|
156
|
-
/* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
257
|
+
/* @__PURE__ */ _("div", { className: "h-safe-area-inset-bottom" })
|
|
168
258
|
]
|
|
169
259
|
})] }),
|
|
170
|
-
|
|
171
|
-
ref:
|
|
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__ */
|
|
264
|
+
/* @__PURE__ */ v("div", {
|
|
175
265
|
className: "flex items-center gap-2 px-4 py-3 border-b border-border-subtle",
|
|
176
|
-
children: [/* @__PURE__ */
|
|
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: "
|
|
268
|
+
children: "Product Tours"
|
|
179
269
|
})]
|
|
180
270
|
}),
|
|
181
|
-
/* @__PURE__ */
|
|
271
|
+
/* @__PURE__ */ _("div", {
|
|
182
272
|
className: "max-h-80 overflow-y-auto",
|
|
183
|
-
children:
|
|
273
|
+
children: I ? /* @__PURE__ */ _("div", {
|
|
184
274
|
className: "flex items-center justify-center py-6",
|
|
185
|
-
children: /* @__PURE__ */
|
|
186
|
-
}) :
|
|
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:
|
|
189
|
-
onClick: () =>
|
|
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__ */
|
|
281
|
+
children: /* @__PURE__ */ v("div", {
|
|
192
282
|
className: "flex items-center justify-between",
|
|
193
|
-
children: [/* @__PURE__ */
|
|
283
|
+
children: [/* @__PURE__ */ v("div", {
|
|
194
284
|
className: "flex-1 min-w-0",
|
|
195
285
|
children: [
|
|
196
|
-
/* @__PURE__ */
|
|
286
|
+
/* @__PURE__ */ v("div", {
|
|
197
287
|
className: "flex items-center gap-2 min-w-0",
|
|
198
|
-
children: [/* @__PURE__ */
|
|
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__ */
|
|
291
|
+
}), /* @__PURE__ */ _(A, { status: e.myProgress?.status })]
|
|
202
292
|
}),
|
|
203
|
-
e.description && /* @__PURE__ */
|
|
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__ */
|
|
297
|
+
/* @__PURE__ */ _("div", {
|
|
208
298
|
className: "flex items-center gap-2 mt-1 text-xs text-text-tertiary",
|
|
209
|
-
children: /* @__PURE__ */
|
|
299
|
+
children: /* @__PURE__ */ v("span", { children: [e.steps?.length || 0, " steps"] })
|
|
210
300
|
})
|
|
211
301
|
]
|
|
212
|
-
}), /* @__PURE__ */
|
|
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__ */
|
|
305
|
+
}) : /* @__PURE__ */ _("div", {
|
|
216
306
|
className: "text-center py-6 px-4",
|
|
217
|
-
children: /* @__PURE__ */
|
|
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
|
-
|
|
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__ */
|
|
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 {
|
|
326
|
+
export { j as TourTrigger };
|
|
@@ -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;
|
|
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;AA0TtD,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,SAAS,EAAE,IAAI,EAAE,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,aAAa,EAAE,CACb,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,SAAS,GAAG,WAAW,GAAG,SAAS,EAC3C,MAAM,CAAC,EAAE,MAAM,KACZ,OAAO,CAAC,IAAI,CAAC,CAAC;IACnB,oBAAoB,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACxE,UAAU,EAAE,CACV,SAAS,EACL,cAAc,GACd,gBAAgB,GAChB,cAAc,GACd,gBAAgB,GAChB,aAAa,GACb,gBAAgB,GAChB,cAAc,GACd,aAAa,EACjB,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE;QACR,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACpC,KACE,OAAO,CAAC,IAAI,CAAC,CAAC;IACnB,aAAa,EAAE,IAAI,GAAG,IAAI,CAAC;IAC3B,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5B;AAID,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,SAAS,CAAC;IACpB,0EAA0E;IAC1E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,yEAAyE;IACzE,iBAAiB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IAC7D,kEAAkE;IAClE,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,wBAAgB,aAAa,CAAC,EAC5B,QAAQ,EACR,aAAsB,EACtB,iBAAiB,EACjB,QAAgB,GACjB,EAAE,kBAAkB,2CAqiBpB;AAED,wBAAgB,eAAe,IAAI,iBAAiB,CAMnD;AAED,wBAAgB,mBAAmB,IAAI,iBAAiB,CAmBvD;AAED,wBAAgB,QAAQ;;;;mBApnBP,IAAI;4BAET,MAAM,UACN,SAAS,GAAG,WAAW,GAAG,SAAS,WAClC,MAAM,KACZ,OAAO,CAAC,IAAI,CAAC;EAwnBnB;AAED,wBAAgB,gBAAgB,IAAI,IAAI,GAAG,IAAI,CAG9C"}
|