@flowsterix/react 0.10.1 → 0.11.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 (62) hide show
  1. package/dist/chunk-AJZMUYBN.mjs +21 -0
  2. package/dist/chunk-D5LQLRSU.cjs +289 -0
  3. package/dist/chunk-FCOKCGV3.cjs +21 -0
  4. package/dist/chunk-HPVLOLCD.cjs +1 -0
  5. package/dist/components/TourPopoverPortal.d.ts +1 -1
  6. package/dist/components/TourPopoverPortal.d.ts.map +1 -1
  7. package/dist/context.d.ts +6 -0
  8. package/dist/context.d.ts.map +1 -1
  9. package/dist/devtools/DevToolsContext.d.ts +31 -0
  10. package/dist/devtools/DevToolsContext.d.ts.map +1 -0
  11. package/dist/devtools/DevToolsProvider.d.ts +9 -0
  12. package/dist/devtools/DevToolsProvider.d.ts.map +1 -0
  13. package/dist/devtools/components/FlowEditModal.d.ts +11 -0
  14. package/dist/devtools/components/FlowEditModal.d.ts.map +1 -0
  15. package/dist/devtools/components/FlowItem.d.ts +8 -0
  16. package/dist/devtools/components/FlowItem.d.ts.map +1 -0
  17. package/dist/devtools/components/FlowsTab.d.ts +5 -0
  18. package/dist/devtools/components/FlowsTab.d.ts.map +1 -0
  19. package/dist/devtools/components/GrabberOverlay.d.ts +8 -0
  20. package/dist/devtools/components/GrabberOverlay.d.ts.map +1 -0
  21. package/dist/devtools/components/ShadowRoot.d.ts +7 -0
  22. package/dist/devtools/components/ShadowRoot.d.ts.map +1 -0
  23. package/dist/devtools/components/StepItem.d.ts +16 -0
  24. package/dist/devtools/components/StepItem.d.ts.map +1 -0
  25. package/dist/devtools/components/StepList.d.ts +17 -0
  26. package/dist/devtools/components/StepList.d.ts.map +1 -0
  27. package/dist/devtools/components/TabNav.d.ts +9 -0
  28. package/dist/devtools/components/TabNav.d.ts.map +1 -0
  29. package/dist/devtools/components/Toolbar.d.ts +11 -0
  30. package/dist/devtools/components/Toolbar.d.ts.map +1 -0
  31. package/dist/devtools/globalBridge.d.ts +24 -0
  32. package/dist/devtools/globalBridge.d.ts.map +1 -0
  33. package/dist/devtools/hooks/useElementInfo.d.ts +7 -0
  34. package/dist/devtools/hooks/useElementInfo.d.ts.map +1 -0
  35. package/dist/devtools/hooks/useFlowsData.d.ts +16 -0
  36. package/dist/devtools/hooks/useFlowsData.d.ts.map +1 -0
  37. package/dist/devtools/hooks/useGrabMode.d.ts +16 -0
  38. package/dist/devtools/hooks/useGrabMode.d.ts.map +1 -0
  39. package/dist/devtools/hooks/useStepStore.d.ts +22 -0
  40. package/dist/devtools/hooks/useStepStore.d.ts.map +1 -0
  41. package/dist/devtools/index.cjs +2715 -0
  42. package/dist/devtools/index.d.ts +32 -0
  43. package/dist/devtools/index.d.ts.map +1 -0
  44. package/dist/devtools/index.mjs +2715 -0
  45. package/dist/devtools/types.d.ts +66 -0
  46. package/dist/devtools/types.d.ts.map +1 -0
  47. package/dist/devtools/utils/selectorGenerator.d.ts +11 -0
  48. package/dist/devtools/utils/selectorGenerator.d.ts.map +1 -0
  49. package/dist/devtools/utils/sourceExtractor.d.ts +45 -0
  50. package/dist/devtools/utils/sourceExtractor.d.ts.map +1 -0
  51. package/dist/devtools/utils/storage.d.ts +5 -0
  52. package/dist/devtools/utils/storage.d.ts.map +1 -0
  53. package/dist/hooks/useHiddenTargetFallback.d.ts.map +1 -1
  54. package/dist/hooks/useTourOverlay.d.ts.map +1 -1
  55. package/dist/index.cjs +724 -892
  56. package/dist/index.mjs +145 -16
  57. package/dist/router/index.cjs +13 -202
  58. package/dist/router/nextAppRouterAdapter.cjs +11 -200
  59. package/dist/router/nextPagesRouterAdapter.cjs +10 -199
  60. package/dist/router/reactRouterAdapter.cjs +10 -199
  61. package/dist/router/tanstackRouterAdapter.cjs +22 -214
  62. package/package.json +10 -1
@@ -0,0 +1,21 @@
1
+ // src/devtools/DevToolsContext.tsx
2
+ import { createContext, useContext } from "react";
3
+ var DevToolsContext = createContext(null);
4
+ function useDevToolsContext() {
5
+ return useContext(DevToolsContext);
6
+ }
7
+ function useDevToolsContextRequired() {
8
+ const context = useContext(DevToolsContext);
9
+ if (!context) {
10
+ throw new Error(
11
+ "useDevToolsContext must be used within a TourProvider with devtools enabled"
12
+ );
13
+ }
14
+ return context;
15
+ }
16
+
17
+ export {
18
+ DevToolsContext,
19
+ useDevToolsContext,
20
+ useDevToolsContextRequired
21
+ };
@@ -0,0 +1,289 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }// src/utils/dom.ts
2
+ var isBrowser = typeof window !== "undefined" && typeof document !== "undefined";
3
+ var createRect = ({
4
+ top,
5
+ left,
6
+ width,
7
+ height
8
+ }) => ({
9
+ top,
10
+ left,
11
+ width,
12
+ height,
13
+ right: left + width,
14
+ bottom: top + height
15
+ });
16
+ var toClientRect = (rect) => createRect({
17
+ top: rect.top,
18
+ left: rect.left,
19
+ width: rect.width,
20
+ height: rect.height
21
+ });
22
+ var getViewportRect = () => {
23
+ if (!isBrowser) {
24
+ return createRect({ top: 0, left: 0, width: 0, height: 0 });
25
+ }
26
+ const clientWidth = document.documentElement.clientWidth;
27
+ const clientHeight = document.documentElement.clientHeight;
28
+ const width = clientWidth > 0 ? clientWidth : window.innerWidth;
29
+ const height = clientHeight > 0 ? clientHeight : window.innerHeight;
30
+ return createRect({
31
+ top: 0,
32
+ left: 0,
33
+ width,
34
+ height
35
+ });
36
+ };
37
+ var expandRect = (rect, padding) => {
38
+ if (!isBrowser) return rect;
39
+ const viewport = getViewportRect();
40
+ const spaceTop = rect.top;
41
+ const spaceBottom = viewport.height - rect.bottom;
42
+ const spaceLeft = rect.left;
43
+ const spaceRight = viewport.width - rect.right;
44
+ const verticalPadding = Math.min(padding, spaceTop, spaceBottom);
45
+ const horizontalPadding = Math.min(padding, spaceLeft, spaceRight);
46
+ return createRect({
47
+ top: rect.top - verticalPadding,
48
+ left: rect.left - horizontalPadding,
49
+ width: rect.width + horizontalPadding * 2,
50
+ height: rect.height + verticalPadding * 2
51
+ });
52
+ };
53
+ var getClientRect = (element) => toClientRect(element.getBoundingClientRect());
54
+ var SCROLLABLE_OVERFLOW = /(auto|scroll|overlay)/i;
55
+ var isElementScrollable = (node) => {
56
+ if (!isBrowser) return false;
57
+ const style = window.getComputedStyle(node);
58
+ if (style.position === "fixed") return false;
59
+ return SCROLLABLE_OVERFLOW.test(style.overflow) || SCROLLABLE_OVERFLOW.test(style.overflowX) || SCROLLABLE_OVERFLOW.test(style.overflowY);
60
+ };
61
+ var getScrollParents = (element) => {
62
+ if (!isBrowser) return [];
63
+ const parents = [];
64
+ const seen = /* @__PURE__ */ new Set();
65
+ let current = element.parentElement;
66
+ while (current && current !== document.documentElement) {
67
+ if (current !== document.body && isElementScrollable(current)) {
68
+ if (!seen.has(current)) {
69
+ parents.push(current);
70
+ seen.add(current);
71
+ }
72
+ }
73
+ current = current.parentElement;
74
+ }
75
+ const scrollingElement = document.scrollingElement;
76
+ if (scrollingElement && scrollingElement instanceof Element && !seen.has(scrollingElement) && isElementScrollable(scrollingElement)) {
77
+ parents.push(scrollingElement);
78
+ seen.add(scrollingElement);
79
+ }
80
+ return parents;
81
+ };
82
+ var portalHost = () => isBrowser ? document.body : null;
83
+ var cachedMaskSupport = null;
84
+ var detectMaskSupport = () => {
85
+ if (!isBrowser) return false;
86
+ if ("CSS" in window) {
87
+ try {
88
+ if (window.CSS.supports("mask-image", "linear-gradient(#000,#000)")) {
89
+ return true;
90
+ }
91
+ if (window.CSS.supports("-webkit-mask-image", "linear-gradient(#000,#000)")) {
92
+ return true;
93
+ }
94
+ } catch (error) {
95
+ if (typeof console !== "undefined") {
96
+ console.warn("Flowsterix: CSS.supports check failed", error);
97
+ }
98
+ }
99
+ }
100
+ const probe = document.createElement("div");
101
+ return "maskImage" in probe.style || "webkitMaskImage" in probe.style;
102
+ };
103
+ var supportsMasking = () => {
104
+ if (!isBrowser) return false;
105
+ if (cachedMaskSupport === null) {
106
+ cachedMaskSupport = detectMaskSupport();
107
+ }
108
+ return cachedMaskSupport;
109
+ };
110
+
111
+ // src/router/routeGating.ts
112
+ var DEFAULT_POLL_MS = 150;
113
+ var normalizePathname = (pathname) => {
114
+ if (typeof pathname !== "string" || pathname.length === 0) {
115
+ return "/";
116
+ }
117
+ return pathname.startsWith("/") ? pathname : `/${pathname}`;
118
+ };
119
+ var normalizePrefixedSegment = (value, prefix) => {
120
+ if (typeof value !== "string" || value.length === 0) {
121
+ return "";
122
+ }
123
+ return value.startsWith(prefix) ? value : `${prefix}${value}`;
124
+ };
125
+ var getWindowPath = () => {
126
+ if (!isBrowser) return "/";
127
+ const { pathname, search, hash } = window.location;
128
+ return normalizePathname(pathname) + normalizePrefixedSegment(search, "?") + normalizePrefixedSegment(hash, "#");
129
+ };
130
+ var normalizeExternalPath = (path) => {
131
+ if (path.length === 0) {
132
+ return "/";
133
+ }
134
+ try {
135
+ const parsed = new URL(path, "http://flowsterix.local");
136
+ return normalizePathname(parsed.pathname) + normalizePrefixedSegment(parsed.search, "?") + normalizePrefixedSegment(parsed.hash, "#");
137
+ } catch (e) {
138
+ const [withoutHash, hash = ""] = path.split("#");
139
+ const [base, search = ""] = withoutHash.split("?");
140
+ return normalizePathname(base) + normalizePrefixedSegment(search ? `?${search}` : "", "?") + normalizePrefixedSegment(hash ? `#${hash}` : "", "#");
141
+ }
142
+ };
143
+ var RouteGatingChannel = class {
144
+ #listeners = /* @__PURE__ */ new Set();
145
+ #currentPath = getWindowPath();
146
+ #teardown = null;
147
+ #attachDefaultListeners() {
148
+ if (!isBrowser) return;
149
+ if (this.#teardown) return;
150
+ let lastPath = getWindowPath();
151
+ const emitIfChanged = () => {
152
+ const nextPath = getWindowPath();
153
+ if (nextPath === lastPath) return;
154
+ lastPath = nextPath;
155
+ this.notify(nextPath);
156
+ };
157
+ const handler = () => emitIfChanged();
158
+ window.addEventListener("popstate", handler);
159
+ window.addEventListener("hashchange", handler);
160
+ const pollId = window.setInterval(emitIfChanged, DEFAULT_POLL_MS);
161
+ this.#teardown = () => {
162
+ window.removeEventListener("popstate", handler);
163
+ window.removeEventListener("hashchange", handler);
164
+ window.clearInterval(pollId);
165
+ this.#teardown = null;
166
+ };
167
+ }
168
+ #detachDefaultListeners() {
169
+ if (this.#listeners.size > 0) return;
170
+ _optionalChain([this, 'access', _ => _.#teardown, 'optionalCall', _2 => _2()]);
171
+ this.#teardown = null;
172
+ }
173
+ getCurrentPath() {
174
+ if (isBrowser) {
175
+ this.#currentPath = getWindowPath();
176
+ }
177
+ return this.#currentPath;
178
+ }
179
+ notify(path) {
180
+ const resolved = typeof path === "string" && path.length > 0 ? normalizeExternalPath(path) : this.getCurrentPath();
181
+ if (resolved === this.#currentPath) {
182
+ this.#currentPath = resolved;
183
+ return;
184
+ }
185
+ this.#currentPath = resolved;
186
+ for (const listener of Array.from(this.#listeners)) {
187
+ try {
188
+ listener(resolved);
189
+ } catch (error) {
190
+ console.warn("[tour][route-gating] listener error", error);
191
+ }
192
+ }
193
+ }
194
+ subscribe(listener) {
195
+ if (this.#listeners.has(listener)) {
196
+ return () => {
197
+ this.#listeners.delete(listener);
198
+ this.#detachDefaultListeners();
199
+ };
200
+ }
201
+ this.#listeners.add(listener);
202
+ if (this.#listeners.size === 1) {
203
+ this.#attachDefaultListeners();
204
+ }
205
+ const current = this.getCurrentPath();
206
+ try {
207
+ listener(current);
208
+ } catch (error) {
209
+ console.warn("[tour][route-gating] listener error", error);
210
+ }
211
+ return () => {
212
+ this.#listeners.delete(listener);
213
+ this.#detachDefaultListeners();
214
+ };
215
+ }
216
+ };
217
+ var routeGatingChannel = new RouteGatingChannel();
218
+ var getCurrentRoutePath = () => routeGatingChannel.getCurrentPath();
219
+ var notifyRouteChange = (path) => {
220
+ routeGatingChannel.notify(path);
221
+ };
222
+ var subscribeToRouteChanges = (listener) => {
223
+ return routeGatingChannel.subscribe(listener);
224
+ };
225
+ var matchRoute = (params) => {
226
+ const { pattern, path } = params;
227
+ if (!pattern) return true;
228
+ if (typeof pattern === "string") return path === pattern;
229
+ return pattern.test(path);
230
+ };
231
+
232
+ // src/router/utils.ts
233
+ var ensurePrefix = (value, prefix) => value.startsWith(prefix) ? value : `${prefix}${value}`;
234
+ var isNonEmptyString = (value) => typeof value === "string" && value.length > 0;
235
+ var toSearchString = (value) => {
236
+ if (!isNonEmptyString(value)) {
237
+ if (value instanceof URLSearchParams) {
238
+ const serialized = value.toString();
239
+ return serialized.length > 0 ? `?${serialized}` : "";
240
+ }
241
+ if (typeof value === "object" && value !== null) {
242
+ try {
243
+ const params = new URLSearchParams();
244
+ for (const [key, raw] of Object.entries(
245
+ value
246
+ )) {
247
+ if (raw === void 0 || raw === null) continue;
248
+ params.set(key, String(raw));
249
+ }
250
+ const serialized = params.toString();
251
+ return serialized.length > 0 ? `?${serialized}` : "";
252
+ } catch (e2) {
253
+ return "";
254
+ }
255
+ }
256
+ return "";
257
+ }
258
+ if (value === "?") return "";
259
+ return value.startsWith("?") ? value : ensurePrefix(value, "?");
260
+ };
261
+ var toHashString = (value) => {
262
+ if (!isNonEmptyString(value)) {
263
+ return "";
264
+ }
265
+ if (value === "#") return "";
266
+ return value.startsWith("#") ? value : ensurePrefix(value, "#");
267
+ };
268
+ var createPathString = (pathname, search, hash) => {
269
+ const normalizedPath = isNonEmptyString(pathname) ? pathname.startsWith("/") ? pathname : `/${pathname}` : "/";
270
+ const searchPart = toSearchString(search);
271
+ const hashPart = toHashString(hash);
272
+ return `${normalizedPath}${searchPart}${hashPart}`;
273
+ };
274
+
275
+
276
+
277
+
278
+
279
+
280
+
281
+
282
+
283
+
284
+
285
+
286
+
287
+
288
+
289
+ exports.isBrowser = isBrowser; exports.getViewportRect = getViewportRect; exports.expandRect = expandRect; exports.getClientRect = getClientRect; exports.getScrollParents = getScrollParents; exports.portalHost = portalHost; exports.supportsMasking = supportsMasking; exports.routeGatingChannel = routeGatingChannel; exports.getCurrentRoutePath = getCurrentRoutePath; exports.notifyRouteChange = notifyRouteChange; exports.subscribeToRouteChanges = subscribeToRouteChanges; exports.matchRoute = matchRoute; exports.createPathString = createPathString;
@@ -0,0 +1,21 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/devtools/DevToolsContext.tsx
2
+ var _react = require('react');
3
+ var DevToolsContext = _react.createContext.call(void 0, null);
4
+ function useDevToolsContext() {
5
+ return _react.useContext.call(void 0, DevToolsContext);
6
+ }
7
+ function useDevToolsContextRequired() {
8
+ const context = _react.useContext.call(void 0, DevToolsContext);
9
+ if (!context) {
10
+ throw new Error(
11
+ "useDevToolsContext must be used within a TourProvider with devtools enabled"
12
+ );
13
+ }
14
+ return context;
15
+ }
16
+
17
+
18
+
19
+
20
+
21
+ exports.DevToolsContext = DevToolsContext; exports.useDevToolsContext = useDevToolsContext; exports.useDevToolsContextRequired = useDevToolsContextRequired;
@@ -0,0 +1 @@
1
+ "use strict";
@@ -57,6 +57,6 @@ export interface TourPopoverPortalProps {
57
57
  */
58
58
  isInGracePeriod?: boolean;
59
59
  }
60
- export declare const TourPopoverPortal: ({ target, children, offset, width, maxWidth, zIndex, placement, role, ariaLabel, ariaDescribedBy, ariaModal, descriptionId, descriptionText, onContainerChange, layoutId, containerComponent, contentComponent, transitionsOverride, }: TourPopoverPortalProps) => import("react").ReactPortal | null;
60
+ export declare const TourPopoverPortal: ({ target, children, offset, width, maxWidth, zIndex, placement, role, ariaLabel, ariaDescribedBy, ariaModal, descriptionId, descriptionText, onContainerChange, layoutId, containerComponent, contentComponent, transitionsOverride, isInGracePeriod, }: TourPopoverPortalProps) => import("react").ReactPortal | null;
61
61
  export {};
62
62
  //# sourceMappingURL=Tour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
@@ -51,6 +51,12 @@ export interface TourContextValue {
51
51
  setDelayInfo: Dispatch<SetStateAction<DelayAdvanceInfo | null>>;
52
52
  backdropInteraction: BackdropInteractionMode;
53
53
  lockBodyScroll: boolean;
54
+ /** @internal - DevTools: get flow state from storage */
55
+ getFlowState: (flowId: string) => Promise<FlowState | null>;
56
+ /** @internal - DevTools: delete flow storage entry */
57
+ deleteFlowStorage: (flowId: string) => Promise<void>;
58
+ /** @internal - DevTools: update flow storage entry */
59
+ updateFlowStorage: (flowId: string, state: FlowState) => Promise<void>;
54
60
  }
55
61
  export declare const TourProvider: ({ flows, children, storageAdapter, storageNamespace, persistOnChange, defaultDebug, animationAdapter: animationAdapterProp, reducedMotionAdapter, autoDetectReducedMotion, analytics, backdropInteraction: backdropInteractionProp, lockBodyScroll: lockBodyScrollProp, labels: labelsProp, onVersionMismatch, }: PropsWithChildren<TourProviderProps>) => import("react/jsx-runtime").JSX.Element;
56
62
  export declare const useTour: () => TourContextValue;
@@ -1 +1 @@
1
- {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/context.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,uBAAuB,EACvB,YAAY,EACZ,QAAQ,EACR,qBAAqB,EACrB,gBAAgB,EAChB,cAAc,EACd,UAAU,EACV,SAAS,EAET,YAAY,EAEZ,gBAAgB,EAChB,IAAI,EACJ,cAAc,EAEd,mBAAmB,EACpB,MAAM,kBAAkB,CAAA;AAUzB,OAAO,KAAK,EACV,QAAQ,EACR,iBAAiB,EACjB,SAAS,EACT,cAAc,EACf,MAAM,OAAO,CAAA;AAUd,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAE1C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AAkBjE,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,E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AAM,IAAI,CAAA;IACvB,SAAS,EAAE,gBAAgB,GAAG,IAAI,CAAA;IAClC,gBAAgB;IAChB,YAAY,EAAE,QAAQ,CAAC,cAAc,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAC,CAAA;IAC/D,mBAAmB,EAAE,uBAAuB,CAAA;IAC5C,cAAc,EAAE,OAAO,CAAA;IACvB,wDAAwD;IACxD,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC,CAAA;IAC3D,sDAAsD;IACtD,iBAAiB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IACpD,sDAAsD;IACtD,iBAAiB,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;CACvE;AAeD,eAAO,MAAM,YAAY,GAAI,kTAe1B,iBAAiB,CAAC,iBAAiB,CAAC,4CAuuBtC,CAAA;AAiCD,eAAO,MAAM,OAAO,QAAO,gBAM1B,CAAA;AAED,eAAO,MAAM,aAAa,GACxB,SAAS,SAAS,OAAO,CAAC,MAAM,UAAU,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC,EAE9D,OAAO,SAAS,EAChB,SAAS,CAAC,OAAO,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,KAAK,IAAI,SAQ7D,CAAA"}
@@ -0,0 +1,31 @@
1
+ import type { FlowDefinition, FlowState, StorageAdapter } from '@flowsterix/core';
2
+ import type { ReactNode } from 'react';
3
+ export interface FlowStorageEntry {
4
+ flowId: string;
5
+ state: FlowState | null;
6
+ definition: FlowDefinition<ReactNode>;
7
+ }
8
+ export interface DevToolsContextValue {
9
+ /** All registered flows */
10
+ flows: Map<string, FlowDefinition<ReactNode>>;
11
+ /** Current active flow ID */
12
+ activeFlowId: string | null;
13
+ /** Current flow state */
14
+ state: FlowState | null;
15
+ /** Storage adapter for reading/writing flow state */
16
+ storageAdapter: StorageAdapter | null;
17
+ /** Storage namespace prefix */
18
+ storageNamespace: string | null;
19
+ /** Cancel a flow by ID */
20
+ cancelFlow: (flowId: string) => void;
21
+ /** Delete flow storage entry */
22
+ deleteFlowStorage: (flowId: string) => Promise<void>;
23
+ /** Update flow storage entry */
24
+ updateFlowStorage: (flowId: string, state: FlowState) => Promise<void>;
25
+ /** Get current flow state from storage */
26
+ getFlowState: (flowId: string) => Promise<FlowState | null>;
27
+ }
28
+ export declare const DevToolsContext: import("react").Context<DevToolsContextValue | null>;
29
+ export declare function useDevToolsContext(): DevToolsContextValue | null;
30
+ export declare function useDevToolsContextRequired(): DevToolsContextValue;
31
+ //# sourceMappingURL=DevToolsContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DevToolsContext.d.ts","sourceRoot":"","sources":["../../src/devtools/DevToolsContext.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACjF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGtC,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,SAAS,GAAG,IAAI,CAAA;IACvB,UAAU,EAAE,cAAc,CAAC,SAAS,CAAC,CAAA;CACtC;AAED,MAAM,WAAW,oBAAoB;IACnC,2BAA2B;IAC3B,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,SAAS,CAAC,CAAC,CAAA;IAC7C,6BAA6B;IAC7B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,yBAAyB;IACzB,KAAK,EAAE,SAAS,GAAG,IAAI,CAAA;IACvB,qDAAqD;IACrD,cAAc,EAAE,cAAc,GAAG,IAAI,CAAA;IACrC,+BAA+B;IAC/B,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAA;IAC/B,0BAA0B;IAC1B,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAA;IACpC,gCAAgC;IAChC,iBAAiB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IACpD,gCAAgC;IAChC,iBAAiB,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IACtE,0CAA0C;IAC1C,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC,CAAA;CAC5D;AAED,eAAO,MAAM,eAAe,sDAAmD,CAAA;AAE/E,wBAAgB,kBAAkB,IAAI,oBAAoB,GAAG,IAAI,CAEhE;AAED,wBAAgB,0BAA0B,IAAI,oBAAoB,CAQjE"}
@@ -0,0 +1,9 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { DevToolsTab } from './types';
3
+ export interface DevToolsProviderProps {
4
+ children: ReactNode;
5
+ enabled?: boolean;
6
+ defaultTab?: DevToolsTab;
7
+ }
8
+ export declare function DevToolsProvider(props: DevToolsProviderProps): import("react/jsx-runtime").JSX.Element;
9
+ //# sourceMappingURL=DevToolsProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DevToolsProvider.d.ts","sourceRoot":"","sources":["../../src/devtools/DevToolsProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAYtC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAoF1C,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,SAAS,CAAA;IACnB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,UAAU,CAAC,EAAE,WAAW,CAAA;CACzB;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,2CAsR5D"}
@@ -0,0 +1,11 @@
1
+ import type { FlowState } from '@flowsterix/core';
2
+ export interface FlowEditModalProps {
3
+ isOpen: boolean;
4
+ flowId: string;
5
+ initialState: FlowState;
6
+ onClose: () => void;
7
+ onSave: (state: FlowState) => void;
8
+ container?: Element | null;
9
+ }
10
+ export declare function FlowEditModal(props: FlowEditModalProps): import("react").ReactPortal | null;
11
+ //# sourceMappingURL=FlowEditModal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FlowEditModal.d.ts","sourceRoot":"","sources":["../../../src/devtools/components/FlowEditModal.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAwHjD,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,OAAO,CAAA;IACf,MAAM,EAAE,MAAM,CAAA;IACd,YAAY,EAAE,SAAS,CAAA;IACvB,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,MAAM,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,CAAA;IAClC,SAAS,CAAC,EAAE,OAAO,GAAG,IAAI,CAAA;CAC3B;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,sCAwItD"}
@@ -0,0 +1,8 @@
1
+ import type { FlowData } from '../hooks/useFlowsData';
2
+ export interface FlowItemProps {
3
+ flow: FlowData;
4
+ onEdit: () => void;
5
+ onDelete: () => void;
6
+ }
7
+ export declare function FlowItem(props: FlowItemProps): import("react/jsx-runtime").JSX.Element;
8
+ //# sourceMappingURL=FlowItem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FlowItem.d.ts","sourceRoot":"","sources":["../../../src/devtools/components/FlowItem.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAmIrD,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,QAAQ,CAAA;IACd,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,QAAQ,EAAE,MAAM,IAAI,CAAA;CACrB;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,2CAoH5C"}
@@ -0,0 +1,5 @@
1
+ export interface FlowsTabProps {
2
+ container?: Element | null;
3
+ }
4
+ export declare function FlowsTab(props: FlowsTabProps): import("react/jsx-runtime").JSX.Element;
5
+ //# sourceMappingURL=FlowsTab.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FlowsTab.d.ts","sourceRoot":"","sources":["../../../src/devtools/components/FlowsTab.tsx"],"names":[],"mappings":"AAqFA,MAAM,WAAW,aAAa;IAC5B,SAAS,CAAC,EAAE,OAAO,GAAG,IAAI,CAAA;CAC3B;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,2CA6G5C"}
@@ -0,0 +1,8 @@
1
+ import type { ElementInfo } from '../types';
2
+ export interface GrabberOverlayProps {
3
+ isGrabbing: boolean;
4
+ hoveredInfo: ElementInfo | null;
5
+ container?: Element | DocumentFragment | null;
6
+ }
7
+ export declare function GrabberOverlay(props: GrabberOverlayProps): import("react").ReactPortal | null;
8
+ //# sourceMappingURL=GrabberOverlay.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GrabberOverlay.d.ts","sourceRoot":"","sources":["../../../src/devtools/components/GrabberOverlay.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAyH3C,MAAM,WAAW,mBAAmB;IAClC,UAAU,EAAE,OAAO,CAAA;IACnB,WAAW,EAAE,WAAW,GAAG,IAAI,CAAA;IAC/B,SAAS,CAAC,EAAE,OAAO,GAAG,gBAAgB,GAAG,IAAI,CAAA;CAC9C;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,sCAuHxD"}
@@ -0,0 +1,7 @@
1
+ import type { ReactNode } from 'react';
2
+ interface ShadowRootProps {
3
+ children: ReactNode;
4
+ }
5
+ export declare function ShadowRoot(props: ShadowRootProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
7
+ //# sourceMappingURL=ShadowRoot.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ShadowRoot.d.ts","sourceRoot":"","sources":["../../../src/devtools/components/ShadowRoot.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAItC,UAAU,eAAe;IACvB,QAAQ,EAAE,SAAS,CAAA;CACpB;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,2CAmChD"}
@@ -0,0 +1,16 @@
1
+ import type { GrabbedStep } from '../types';
2
+ export interface StepItemProps {
3
+ step: GrabbedStep;
4
+ index: number;
5
+ onDelete: () => void;
6
+ isDragActive?: boolean;
7
+ isBeingDragged?: boolean;
8
+ }
9
+ export declare function SortableStepItem(props: StepItemProps): import("react/jsx-runtime").JSX.Element;
10
+ export interface StepItemDragPreviewProps {
11
+ step: GrabbedStep;
12
+ index: number;
13
+ }
14
+ export declare function StepItemDragPreview(props: StepItemDragPreviewProps): import("react/jsx-runtime").JSX.Element;
15
+ export { SortableStepItem as StepItem };
16
+ //# sourceMappingURL=StepItem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StepItem.d.ts","sourceRoot":"","sources":["../../../src/devtools/components/StepItem.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAuJ3C,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,WAAW,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,IAAI,CAAA;IACpB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,cAAc,CAAC,EAAE,OAAO,CAAA;CACzB;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,aAAa,2CA+GpD;AAGD,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,WAAW,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;CACd;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,2CA8DlE;AAGD,OAAO,EAAE,gBAAgB,IAAI,QAAQ,EAAE,CAAA"}
@@ -0,0 +1,17 @@
1
+ import type { DevToolsExport, GrabbedStep, GrabMode } from '../types';
2
+ export interface StepListProps {
3
+ steps: GrabbedStep[];
4
+ mode: GrabMode;
5
+ onToggleGrab: () => void;
6
+ onDeleteStep: (params: {
7
+ id: string;
8
+ }) => void;
9
+ onReorderSteps: (params: {
10
+ fromIndex: number;
11
+ toIndex: number;
12
+ }) => void;
13
+ onClearAll: () => void;
14
+ onExport: () => DevToolsExport;
15
+ }
16
+ export declare function StepList(props: StepListProps): import("react/jsx-runtime").JSX.Element | null;
17
+ //# sourceMappingURL=StepList.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StepList.d.ts","sourceRoot":"","sources":["../../../src/devtools/components/StepList.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAqDrE,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,WAAW,EAAE,CAAA;IACpB,IAAI,EAAE,QAAQ,CAAA;IACd,YAAY,EAAE,MAAM,IAAI,CAAA;IACxB,YAAY,EAAE,CAAC,MAAM,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAA;IAC9C,cAAc,EAAE,CAAC,MAAM,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAA;IACxE,UAAU,EAAE,MAAM,IAAI,CAAA;IACtB,QAAQ,EAAE,MAAM,cAAc,CAAA;CAC/B;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,kDAgJ5C"}
@@ -0,0 +1,9 @@
1
+ import type { DevToolsTab } from '../types';
2
+ export interface TabNavProps {
3
+ activeTab: DevToolsTab;
4
+ onTabChange: (tab: DevToolsTab) => void;
5
+ stepCount: number;
6
+ flowCount: number;
7
+ }
8
+ export declare function TabNav(props: TabNavProps): import("react/jsx-runtime").JSX.Element;
9
+ //# sourceMappingURL=TabNav.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TabNav.d.ts","sourceRoot":"","sources":["../../../src/devtools/components/TabNav.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAmD3C,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,WAAW,CAAA;IACtB,WAAW,EAAE,CAAC,GAAG,EAAE,WAAW,KAAK,IAAI,CAAA;IACvC,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,wBAAgB,MAAM,CAAC,KAAK,EAAE,WAAW,2CAiDxC"}
@@ -0,0 +1,11 @@
1
+ import type { GrabMode } from '../types';
2
+ export interface ToolbarProps {
3
+ mode: GrabMode;
4
+ stepCount: number;
5
+ onToggleGrab: () => void;
6
+ onExport: () => void;
7
+ onCopyForAI: () => void;
8
+ onReset: () => void;
9
+ }
10
+ export declare function Toolbar(props: ToolbarProps): import("react/jsx-runtime").JSX.Element;
11
+ //# sourceMappingURL=Toolbar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Toolbar.d.ts","sourceRoot":"","sources":["../../../src/devtools/components/Toolbar.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AA+FxC,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,QAAQ,CAAA;IACd,SAAS,EAAE,MAAM,CAAA;IACjB,YAAY,EAAE,MAAM,IAAI,CAAA;IACxB,QAAQ,EAAE,MAAM,IAAI,CAAA;IACpB,WAAW,EAAE,MAAM,IAAI,CAAA;IACvB,OAAO,EAAE,MAAM,IAAI,CAAA;CACpB;AAED,wBAAgB,OAAO,CAAC,KAAK,EAAE,YAAY,2CA6K1C"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Global bridge for sharing TourProvider state with DevTools.
3
+ *
4
+ * This is needed because Vite pre-bundles entry points separately,
5
+ * creating different React context instances. Using window as a
6
+ * shared namespace bypasses this issue.
7
+ */
8
+ import type { FlowDefinition, FlowState } from '@flowsterix/core';
9
+ import type { ReactNode } from 'react';
10
+ export interface DevToolsBridgeValue {
11
+ flows: Map<string, FlowDefinition<ReactNode>>;
12
+ activeFlowId: string | null;
13
+ state: FlowState | null;
14
+ cancel: () => void;
15
+ getFlowState: (flowId: string) => Promise<FlowState | null>;
16
+ deleteFlowStorage: (flowId: string) => Promise<void>;
17
+ updateFlowStorage: (flowId: string, state: FlowState) => Promise<void>;
18
+ }
19
+ type Listener = (value: DevToolsBridgeValue | null) => void;
20
+ export declare function setDevToolsBridge(value: DevToolsBridgeValue | null): void;
21
+ export declare function getDevToolsBridge(): DevToolsBridgeValue | null;
22
+ export declare function subscribeDevToolsBridge(listener: Listener): () => void;
23
+ export {};
24
+ //# sourceMappingURL=globalBridge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"globalBridge.d.ts","sourceRoot":"","sources":["../../src/devtools/globalBridge.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,SAAS,CAAC,CAAC,CAAA;IAC7C,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,KAAK,EAAE,SAAS,GAAG,IAAI,CAAA;IACvB,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC,CAAA;IAC3D,iBAAiB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IACpD,iBAAiB,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;CACvE;AAED,KAAK,QAAQ,GAAG,CAAC,KAAK,EAAE,mBAAmB,GAAG,IAAI,KAAK,IAAI,CAAA;AAqB3D,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,mBAAmB,GAAG,IAAI,GAAG,IAAI,CAMzE;AAED,wBAAgB,iBAAiB,IAAI,mBAAmB,GAAG,IAAI,CAE9D;AAED,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,IAAI,CAMtE"}
@@ -0,0 +1,7 @@
1
+ import type { ElementInfo } from '../types';
2
+ export declare function useElementInfo(): {
3
+ getElementInfo: (params: {
4
+ element: Element;
5
+ }) => ElementInfo;
6
+ };
7
+ //# sourceMappingURL=useElementInfo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useElementInfo.d.ts","sourceRoot":"","sources":["../../../src/devtools/hooks/useElementInfo.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAI3C,wBAAgB,cAAc;6BACgB;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,KAAG,WAAW;EA2B/E"}
@@ -0,0 +1,16 @@
1
+ import type { FlowDefinition, FlowState } from '@flowsterix/core';
2
+ import type { ReactNode } from 'react';
3
+ export interface FlowData {
4
+ flowId: string;
5
+ definition: FlowDefinition<ReactNode>;
6
+ state: FlowState | null;
7
+ isActive: boolean;
8
+ }
9
+ export interface UseFlowsDataResult {
10
+ flows: FlowData[];
11
+ refreshFlows: () => Promise<void>;
12
+ deleteFlow: (flowId: string) => Promise<void>;
13
+ updateFlow: (flowId: string, state: FlowState) => Promise<void>;
14
+ }
15
+ export declare function useFlowsData(): UseFlowsDataResult;
16
+ //# sourceMappingURL=useFlowsData.d.ts.map