@flowsterix/react 0.1.0
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/adapters/radixDialog.d.ts +18 -0
- package/dist/adapters/radixDialog.d.ts.map +1 -0
- package/dist/chunk-RCASLQRS.mjs +24 -0
- package/dist/chunk-RPA2S5UP.mjs +280 -0
- package/dist/chunk-U757YVZP.mjs +50 -0
- package/dist/components/OverlayBackdrop.d.ts +34 -0
- package/dist/components/OverlayBackdrop.d.ts.map +1 -0
- package/dist/components/TourFocusManager.d.ts +11 -0
- package/dist/components/TourFocusManager.d.ts.map +1 -0
- package/dist/components/TourPopoverPortal.d.ts +57 -0
- package/dist/components/TourPopoverPortal.d.ts.map +1 -0
- package/dist/components/__tests__/TourFocusManager.test.d.ts +2 -0
- package/dist/components/__tests__/TourFocusManager.test.d.ts.map +1 -0
- package/dist/context.d.ts +56 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/hooks/__tests__/scrollMargin.test.d.ts +2 -0
- package/dist/hooks/__tests__/scrollMargin.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/useBodyScrollLock.test.d.ts +2 -0
- package/dist/hooks/__tests__/useBodyScrollLock.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/useHiddenTargetFallback.test.d.ts +2 -0
- package/dist/hooks/__tests__/useHiddenTargetFallback.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/waitForPredicate.test.d.ts +2 -0
- package/dist/hooks/__tests__/waitForPredicate.test.d.ts.map +1 -0
- package/dist/hooks/scrollMargin.d.ts +15 -0
- package/dist/hooks/scrollMargin.d.ts.map +1 -0
- package/dist/hooks/useAdvanceRules.d.ts +3 -0
- package/dist/hooks/useAdvanceRules.d.ts.map +1 -0
- package/dist/hooks/useBodyScrollLock.d.ts +2 -0
- package/dist/hooks/useBodyScrollLock.d.ts.map +1 -0
- package/dist/hooks/useDelayAdvance.d.ts +14 -0
- package/dist/hooks/useDelayAdvance.d.ts.map +1 -0
- package/dist/hooks/useHiddenTargetFallback.d.ts +16 -0
- package/dist/hooks/useHiddenTargetFallback.d.ts.map +1 -0
- package/dist/hooks/useHudDescription.d.ts +13 -0
- package/dist/hooks/useHudDescription.d.ts.map +1 -0
- package/dist/hooks/useHudShortcuts.d.ts +7 -0
- package/dist/hooks/useHudShortcuts.d.ts.map +1 -0
- package/dist/hooks/useHudState.d.ts +27 -0
- package/dist/hooks/useHudState.d.ts.map +1 -0
- package/dist/hooks/useHudTargetIssue.d.ts +21 -0
- package/dist/hooks/useHudTargetIssue.d.ts.map +1 -0
- package/dist/hooks/useTourControls.d.ts +17 -0
- package/dist/hooks/useTourControls.d.ts.map +1 -0
- package/dist/hooks/useTourFocusDominance.d.ts +9 -0
- package/dist/hooks/useTourFocusDominance.d.ts.map +1 -0
- package/dist/hooks/useTourHud.d.ts +61 -0
- package/dist/hooks/useTourHud.d.ts.map +1 -0
- package/dist/hooks/useTourOverlay.d.ts +70 -0
- package/dist/hooks/useTourOverlay.d.ts.map +1 -0
- package/dist/hooks/useTourTarget.d.ts +16 -0
- package/dist/hooks/useTourTarget.d.ts.map +1 -0
- package/dist/hooks/useViewportRect.d.ts +3 -0
- package/dist/hooks/useViewportRect.d.ts.map +1 -0
- package/dist/hooks/waitForPredicate.d.ts +15 -0
- package/dist/hooks/waitForPredicate.d.ts.map +1 -0
- package/dist/index.cjs +4207 -0
- package/dist/index.d.ts +45 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.mjs +3851 -0
- package/dist/labels.d.ts +22 -0
- package/dist/labels.d.ts.map +1 -0
- package/dist/motion/animationAdapter.d.ts +40 -0
- package/dist/motion/animationAdapter.d.ts.map +1 -0
- package/dist/motion/useHudMotion.d.ts +14 -0
- package/dist/motion/useHudMotion.d.ts.map +1 -0
- package/dist/router/index.cjs +275 -0
- package/dist/router/index.d.ts +5 -0
- package/dist/router/index.d.ts.map +1 -0
- package/dist/router/index.mjs +30 -0
- package/dist/router/nextAppRouterAdapter.cjs +224 -0
- package/dist/router/nextAppRouterAdapter.d.ts +2 -0
- package/dist/router/nextAppRouterAdapter.d.ts.map +1 -0
- package/dist/router/nextAppRouterAdapter.mjs +35 -0
- package/dist/router/nextPagesRouterAdapter.cjs +217 -0
- package/dist/router/nextPagesRouterAdapter.d.ts +2 -0
- package/dist/router/nextPagesRouterAdapter.d.ts.map +1 -0
- package/dist/router/nextPagesRouterAdapter.mjs +28 -0
- package/dist/router/reactRouterAdapter.cjs +220 -0
- package/dist/router/reactRouterAdapter.d.ts +2 -0
- package/dist/router/reactRouterAdapter.d.ts.map +1 -0
- package/dist/router/reactRouterAdapter.mjs +31 -0
- package/dist/router/routeGating.d.ts +13 -0
- package/dist/router/routeGating.d.ts.map +1 -0
- package/dist/router/tanstackRouterAdapter.cjs +202 -0
- package/dist/router/tanstackRouterAdapter.d.ts +2 -0
- package/dist/router/tanstackRouterAdapter.d.ts.map +1 -0
- package/dist/router/tanstackRouterAdapter.mjs +7 -0
- package/dist/router/tanstackRouterSync.d.ts +20 -0
- package/dist/router/tanstackRouterSync.d.ts.map +1 -0
- package/dist/router/utils.d.ts +2 -0
- package/dist/router/utils.d.ts.map +1 -0
- package/dist/utils/dom.d.ts +22 -0
- package/dist/utils/dom.d.ts.map +1 -0
- package/dist/utils/focus.d.ts +4 -0
- package/dist/utils/focus.d.ts.map +1 -0
- package/package.json +96 -0
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/router/tanstackRouterAdapter.tsx
|
|
21
|
+
var tanstackRouterAdapter_exports = {};
|
|
22
|
+
__export(tanstackRouterAdapter_exports, {
|
|
23
|
+
useTanStackRouterTourAdapter: () => useTanStackRouterTourAdapter
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(tanstackRouterAdapter_exports);
|
|
26
|
+
var import_react_router = require("@tanstack/react-router");
|
|
27
|
+
var import_react = require("react");
|
|
28
|
+
|
|
29
|
+
// src/utils/dom.ts
|
|
30
|
+
var isBrowser = typeof window !== "undefined" && typeof document !== "undefined";
|
|
31
|
+
|
|
32
|
+
// src/router/routeGating.ts
|
|
33
|
+
var DEFAULT_POLL_MS = 150;
|
|
34
|
+
var normalizePathname = (pathname) => {
|
|
35
|
+
if (typeof pathname !== "string" || pathname.length === 0) {
|
|
36
|
+
return "/";
|
|
37
|
+
}
|
|
38
|
+
return pathname.startsWith("/") ? pathname : `/${pathname}`;
|
|
39
|
+
};
|
|
40
|
+
var normalizePrefixedSegment = (value, prefix) => {
|
|
41
|
+
if (typeof value !== "string" || value.length === 0) {
|
|
42
|
+
return "";
|
|
43
|
+
}
|
|
44
|
+
return value.startsWith(prefix) ? value : `${prefix}${value}`;
|
|
45
|
+
};
|
|
46
|
+
var getWindowPath = () => {
|
|
47
|
+
if (!isBrowser) return "/";
|
|
48
|
+
const { pathname, search, hash } = window.location;
|
|
49
|
+
return normalizePathname(pathname) + normalizePrefixedSegment(search, "?") + normalizePrefixedSegment(hash, "#");
|
|
50
|
+
};
|
|
51
|
+
var normalizeExternalPath = (path) => {
|
|
52
|
+
if (path.length === 0) {
|
|
53
|
+
return "/";
|
|
54
|
+
}
|
|
55
|
+
try {
|
|
56
|
+
const parsed = new URL(path, "http://flowsterix.local");
|
|
57
|
+
return normalizePathname(parsed.pathname) + normalizePrefixedSegment(parsed.search, "?") + normalizePrefixedSegment(parsed.hash, "#");
|
|
58
|
+
} catch {
|
|
59
|
+
const [withoutHash, hash = ""] = path.split("#");
|
|
60
|
+
const [base, search = ""] = withoutHash.split("?");
|
|
61
|
+
return normalizePathname(base) + normalizePrefixedSegment(search ? `?${search}` : "", "?") + normalizePrefixedSegment(hash ? `#${hash}` : "", "#");
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
var RouteGatingChannel = class {
|
|
65
|
+
#listeners = /* @__PURE__ */ new Set();
|
|
66
|
+
#currentPath = getWindowPath();
|
|
67
|
+
#teardown = null;
|
|
68
|
+
#attachDefaultListeners() {
|
|
69
|
+
if (!isBrowser) return;
|
|
70
|
+
if (this.#teardown) return;
|
|
71
|
+
let lastPath = getWindowPath();
|
|
72
|
+
const emitIfChanged = () => {
|
|
73
|
+
const nextPath = getWindowPath();
|
|
74
|
+
if (nextPath === lastPath) return;
|
|
75
|
+
lastPath = nextPath;
|
|
76
|
+
this.notify(nextPath);
|
|
77
|
+
};
|
|
78
|
+
const handler = () => emitIfChanged();
|
|
79
|
+
window.addEventListener("popstate", handler);
|
|
80
|
+
window.addEventListener("hashchange", handler);
|
|
81
|
+
const pollId = window.setInterval(emitIfChanged, DEFAULT_POLL_MS);
|
|
82
|
+
this.#teardown = () => {
|
|
83
|
+
window.removeEventListener("popstate", handler);
|
|
84
|
+
window.removeEventListener("hashchange", handler);
|
|
85
|
+
window.clearInterval(pollId);
|
|
86
|
+
this.#teardown = null;
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
#detachDefaultListeners() {
|
|
90
|
+
if (this.#listeners.size > 0) return;
|
|
91
|
+
this.#teardown?.();
|
|
92
|
+
this.#teardown = null;
|
|
93
|
+
}
|
|
94
|
+
getCurrentPath() {
|
|
95
|
+
if (isBrowser) {
|
|
96
|
+
this.#currentPath = getWindowPath();
|
|
97
|
+
}
|
|
98
|
+
return this.#currentPath;
|
|
99
|
+
}
|
|
100
|
+
notify(path) {
|
|
101
|
+
const resolved = typeof path === "string" && path.length > 0 ? normalizeExternalPath(path) : this.getCurrentPath();
|
|
102
|
+
if (resolved === this.#currentPath) {
|
|
103
|
+
this.#currentPath = resolved;
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
this.#currentPath = resolved;
|
|
107
|
+
for (const listener of Array.from(this.#listeners)) {
|
|
108
|
+
try {
|
|
109
|
+
listener(resolved);
|
|
110
|
+
} catch (error) {
|
|
111
|
+
console.warn("[tour][route-gating] listener error", error);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
subscribe(listener) {
|
|
116
|
+
if (this.#listeners.has(listener)) {
|
|
117
|
+
return () => {
|
|
118
|
+
this.#listeners.delete(listener);
|
|
119
|
+
this.#detachDefaultListeners();
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
this.#listeners.add(listener);
|
|
123
|
+
if (this.#listeners.size === 1) {
|
|
124
|
+
this.#attachDefaultListeners();
|
|
125
|
+
}
|
|
126
|
+
const current = this.getCurrentPath();
|
|
127
|
+
try {
|
|
128
|
+
listener(current);
|
|
129
|
+
} catch (error) {
|
|
130
|
+
console.warn("[tour][route-gating] listener error", error);
|
|
131
|
+
}
|
|
132
|
+
return () => {
|
|
133
|
+
this.#listeners.delete(listener);
|
|
134
|
+
this.#detachDefaultListeners();
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
var routeGatingChannel = new RouteGatingChannel();
|
|
139
|
+
var notifyRouteChange = (path) => {
|
|
140
|
+
routeGatingChannel.notify(path);
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
// src/router/utils.ts
|
|
144
|
+
var ensurePrefix = (value, prefix) => value.startsWith(prefix) ? value : `${prefix}${value}`;
|
|
145
|
+
var isNonEmptyString = (value) => typeof value === "string" && value.length > 0;
|
|
146
|
+
var toSearchString = (value) => {
|
|
147
|
+
if (!isNonEmptyString(value)) {
|
|
148
|
+
if (value instanceof URLSearchParams) {
|
|
149
|
+
const serialized = value.toString();
|
|
150
|
+
return serialized.length > 0 ? `?${serialized}` : "";
|
|
151
|
+
}
|
|
152
|
+
if (typeof value === "object" && value !== null) {
|
|
153
|
+
try {
|
|
154
|
+
const params = new URLSearchParams();
|
|
155
|
+
for (const [key, raw] of Object.entries(
|
|
156
|
+
value
|
|
157
|
+
)) {
|
|
158
|
+
if (raw === void 0 || raw === null) continue;
|
|
159
|
+
params.set(key, String(raw));
|
|
160
|
+
}
|
|
161
|
+
const serialized = params.toString();
|
|
162
|
+
return serialized.length > 0 ? `?${serialized}` : "";
|
|
163
|
+
} catch {
|
|
164
|
+
return "";
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
return "";
|
|
168
|
+
}
|
|
169
|
+
if (value === "?") return "";
|
|
170
|
+
return value.startsWith("?") ? value : ensurePrefix(value, "?");
|
|
171
|
+
};
|
|
172
|
+
var toHashString = (value) => {
|
|
173
|
+
if (!isNonEmptyString(value)) {
|
|
174
|
+
return "";
|
|
175
|
+
}
|
|
176
|
+
if (value === "#") return "";
|
|
177
|
+
return value.startsWith("#") ? value : ensurePrefix(value, "#");
|
|
178
|
+
};
|
|
179
|
+
var createPathString = (pathname, search, hash) => {
|
|
180
|
+
const normalizedPath = isNonEmptyString(pathname) ? pathname.startsWith("/") ? pathname : `/${pathname}` : "/";
|
|
181
|
+
const searchPart = toSearchString(search);
|
|
182
|
+
const hashPart = toHashString(hash);
|
|
183
|
+
return `${normalizedPath}${searchPart}${hashPart}`;
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
// src/router/tanstackRouterAdapter.tsx
|
|
187
|
+
var useTanStackRouterTourAdapter = () => {
|
|
188
|
+
const location = (0, import_react_router.useRouterState)({
|
|
189
|
+
select: (state) => state.location
|
|
190
|
+
});
|
|
191
|
+
(0, import_react.useEffect)(() => {
|
|
192
|
+
const resolvedPathname = typeof location.pathname === "string" && location.pathname.length > 0 ? location.pathname : "/";
|
|
193
|
+
const resolvedSearch = "searchStr" in location && typeof location.searchStr === "string" ? location.searchStr : typeof location.search === "string" ? location.search : "";
|
|
194
|
+
const resolvedHash = typeof location.hash === "string" ? location.hash : "";
|
|
195
|
+
const path = typeof location.href === "string" && location.href.length > 0 ? location.href : createPathString(resolvedPathname, resolvedSearch, resolvedHash);
|
|
196
|
+
notifyRouteChange(path);
|
|
197
|
+
}, [location]);
|
|
198
|
+
};
|
|
199
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
200
|
+
0 && (module.exports = {
|
|
201
|
+
useTanStackRouterTourAdapter
|
|
202
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tanstackRouterAdapter.d.ts","sourceRoot":"","sources":["../../src/router/tanstackRouterAdapter.tsx"],"names":[],"mappings":"AAMA,eAAO,MAAM,4BAA4B,YAyBxC,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
type RouterLike = {
|
|
2
|
+
state: {
|
|
3
|
+
location: {
|
|
4
|
+
pathname: string;
|
|
5
|
+
};
|
|
6
|
+
};
|
|
7
|
+
navigate: (opts: {
|
|
8
|
+
to: string;
|
|
9
|
+
}) => Promise<unknown>;
|
|
10
|
+
};
|
|
11
|
+
export declare const setTourRouter: (router: RouterLike | null) => void;
|
|
12
|
+
export declare const setTanStackRouter: (router: RouterLike | null) => void;
|
|
13
|
+
export declare const getTourRouter: () => RouterLike | null;
|
|
14
|
+
export declare const getTanStackRouter: () => RouterLike | null;
|
|
15
|
+
export interface TanStackRouterSyncProps {
|
|
16
|
+
onRouterAvailable?: (router: RouterLike | null) => void;
|
|
17
|
+
}
|
|
18
|
+
export declare const TanStackRouterSync: ({ onRouterAvailable, }: TanStackRouterSyncProps) => null;
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=tanstackRouterSync.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tanstackRouterSync.d.ts","sourceRoot":"","sources":["../../src/router/tanstackRouterSync.tsx"],"names":[],"mappings":"AAKA,KAAK,UAAU,GAAG;IAChB,KAAK,EAAE;QAAE,QAAQ,EAAE;YAAE,QAAQ,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,CAAA;IACzC,QAAQ,EAAE,CAAC,IAAI,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,CAAC,OAAO,CAAC,CAAA;CACrD,CAAA;AAID,eAAO,MAAM,aAAa,GAAI,QAAQ,UAAU,GAAG,IAAI,SAEtD,CAAA;AAED,eAAO,MAAM,iBAAiB,WAJQ,UAAU,GAAG,IAAI,SAIT,CAAA;AAE9C,eAAO,MAAM,aAAa,QAAO,UAAU,GAAG,IAE7C,CAAA;AAED,eAAO,MAAM,iBAAiB,QAJG,UAAU,GAAG,IAIA,CAAA;AAE9C,MAAM,WAAW,uBAAuB;IACtC,iBAAiB,CAAC,EAAE,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI,KAAK,IAAI,CAAA;CACxD;AAED,eAAO,MAAM,kBAAkB,GAAI,wBAEhC,uBAAuB,SAiCzB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/router/utils.ts"],"names":[],"mappings":"AA0CA,eAAO,MAAM,gBAAgB,GAC3B,UAAU,OAAO,EACjB,SAAS,OAAO,EAChB,OAAO,OAAO,KACb,MASF,CAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare const isBrowser: boolean;
|
|
2
|
+
type RectInit = {
|
|
3
|
+
top: number;
|
|
4
|
+
left: number;
|
|
5
|
+
width: number;
|
|
6
|
+
height: number;
|
|
7
|
+
};
|
|
8
|
+
export type ClientRectLike = RectInit & {
|
|
9
|
+
right: number;
|
|
10
|
+
bottom: number;
|
|
11
|
+
};
|
|
12
|
+
export declare const createRect: ({ top, left, width, height, }: RectInit) => ClientRectLike;
|
|
13
|
+
export declare const toClientRect: (rect: DOMRect | DOMRectReadOnly) => ClientRectLike;
|
|
14
|
+
export declare const getViewportRect: () => ClientRectLike;
|
|
15
|
+
export declare const expandRect: (rect: ClientRectLike, padding: number) => ClientRectLike;
|
|
16
|
+
export declare const isRectInViewport: (rect: ClientRectLike, margin?: number) => boolean;
|
|
17
|
+
export declare const getClientRect: (element: Element) => ClientRectLike;
|
|
18
|
+
export declare const getScrollParents: (element: Element) => Array<Element>;
|
|
19
|
+
export declare const portalHost: () => HTMLElement | null;
|
|
20
|
+
export declare const supportsMasking: () => boolean;
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=dom.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../../src/utils/dom.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,SAC4C,CAAA;AAElE,KAAK,QAAQ,GAAG;IACd,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;CACf,CAAA;AAED,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG;IACtC,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;CACf,CAAA;AAED,eAAO,MAAM,UAAU,GAAI,+BAKxB,QAAQ,KAAG,cAOZ,CAAA;AAEF,eAAO,MAAM,YAAY,GAAI,MAAM,OAAO,GAAG,eAAe,KAAG,cAM3D,CAAA;AAEJ,eAAO,MAAM,eAAe,QAAO,cAgBlC,CAAA;AAED,eAAO,MAAM,UAAU,GACrB,MAAM,cAAc,EACpB,SAAS,MAAM,KACd,cAeF,CAAA;AAED,eAAO,MAAM,gBAAgB,GAAI,MAAM,cAAc,EAAE,eAAU,YAUhE,CAAA;AAED,eAAO,MAAM,aAAa,GAAI,SAAS,OAAO,KAAG,cACF,CAAA;AAe/C,eAAO,MAAM,gBAAgB,GAAI,SAAS,OAAO,KAAG,KAAK,CAAC,OAAO,CA4BhE,CAAA;AAED,eAAO,MAAM,UAAU,0BAA2C,CAAA;AA4BlE,eAAO,MAAM,eAAe,eAM3B,CAAA"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const isFocusableElement: (element: Element | null) => element is HTMLElement;
|
|
2
|
+
export declare const getFocusableIn: (root: Element | Document | null) => Array<HTMLElement>;
|
|
3
|
+
export declare const focusElement: (element: HTMLElement | null | undefined, options?: FocusOptions) => void;
|
|
4
|
+
//# sourceMappingURL=focus.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"focus.d.ts","sourceRoot":"","sources":["../../src/utils/focus.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,kBAAkB,GAC7B,SAAS,OAAO,GAAG,IAAI,KACtB,OAAO,IAAI,WAsBb,CAAA;AAED,eAAO,MAAM,cAAc,GACzB,MAAM,OAAO,GAAG,QAAQ,GAAG,IAAI,KAC9B,KAAK,CAAC,WAAW,CAkBnB,CAAA;AAED,eAAO,MAAM,YAAY,GACvB,SAAS,WAAW,GAAG,IAAI,GAAG,SAAS,EACvC,UAAU,YAAY,SAQvB,CAAA"}
|
package/package.json
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@flowsterix/react",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "React bindings for Flowsterix - guided tours and onboarding flows",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/kvngrf/flowsterix.git",
|
|
9
|
+
"directory": "packages/react"
|
|
10
|
+
},
|
|
11
|
+
"keywords": [
|
|
12
|
+
"tour",
|
|
13
|
+
"onboarding",
|
|
14
|
+
"walkthrough",
|
|
15
|
+
"guide",
|
|
16
|
+
"flow",
|
|
17
|
+
"react"
|
|
18
|
+
],
|
|
19
|
+
"type": "module",
|
|
20
|
+
"sideEffects": false,
|
|
21
|
+
"main": "dist/index.cjs",
|
|
22
|
+
"module": "dist/index.mjs",
|
|
23
|
+
"types": "dist/index.d.ts",
|
|
24
|
+
"exports": {
|
|
25
|
+
".": {
|
|
26
|
+
"types": "./dist/index.d.ts",
|
|
27
|
+
"import": "./dist/index.mjs",
|
|
28
|
+
"require": "./dist/index.cjs",
|
|
29
|
+
"default": "./dist/index.mjs"
|
|
30
|
+
},
|
|
31
|
+
"./router": {
|
|
32
|
+
"types": "./dist/router/index.d.ts",
|
|
33
|
+
"import": "./dist/router/index.mjs",
|
|
34
|
+
"require": "./dist/router/index.cjs",
|
|
35
|
+
"default": "./dist/router/index.mjs"
|
|
36
|
+
},
|
|
37
|
+
"./router/tanstack": {
|
|
38
|
+
"types": "./dist/router/tanstackRouterAdapter.d.ts",
|
|
39
|
+
"import": "./dist/router/tanstackRouterAdapter.mjs",
|
|
40
|
+
"require": "./dist/router/tanstackRouterAdapter.cjs",
|
|
41
|
+
"default": "./dist/router/tanstackRouterAdapter.mjs"
|
|
42
|
+
},
|
|
43
|
+
"./router/react-router": {
|
|
44
|
+
"types": "./dist/router/reactRouterAdapter.d.ts",
|
|
45
|
+
"import": "./dist/router/reactRouterAdapter.mjs",
|
|
46
|
+
"require": "./dist/router/reactRouterAdapter.cjs",
|
|
47
|
+
"default": "./dist/router/reactRouterAdapter.mjs"
|
|
48
|
+
},
|
|
49
|
+
"./router/next-app": {
|
|
50
|
+
"types": "./dist/router/nextAppRouterAdapter.d.ts",
|
|
51
|
+
"import": "./dist/router/nextAppRouterAdapter.mjs",
|
|
52
|
+
"require": "./dist/router/nextAppRouterAdapter.cjs",
|
|
53
|
+
"default": "./dist/router/nextAppRouterAdapter.mjs"
|
|
54
|
+
},
|
|
55
|
+
"./router/next-pages": {
|
|
56
|
+
"types": "./dist/router/nextPagesRouterAdapter.d.ts",
|
|
57
|
+
"import": "./dist/router/nextPagesRouterAdapter.mjs",
|
|
58
|
+
"require": "./dist/router/nextPagesRouterAdapter.cjs",
|
|
59
|
+
"default": "./dist/router/nextPagesRouterAdapter.mjs"
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"files": [
|
|
63
|
+
"dist"
|
|
64
|
+
],
|
|
65
|
+
"dependencies": {
|
|
66
|
+
"@floating-ui/dom": "^1.7.4",
|
|
67
|
+
"@flowsterix/core": "0.1.0"
|
|
68
|
+
},
|
|
69
|
+
"peerDependencies": {
|
|
70
|
+
"react": ">=18",
|
|
71
|
+
"react-dom": ">=18",
|
|
72
|
+
"motion": ">=11",
|
|
73
|
+
"@tanstack/react-router": ">=1",
|
|
74
|
+
"next": ">=13",
|
|
75
|
+
"react-router-dom": ">=6"
|
|
76
|
+
},
|
|
77
|
+
"peerDependenciesMeta": {
|
|
78
|
+
"motion": {
|
|
79
|
+
"optional": false
|
|
80
|
+
},
|
|
81
|
+
"@tanstack/react-router": {
|
|
82
|
+
"optional": true
|
|
83
|
+
},
|
|
84
|
+
"next": {
|
|
85
|
+
"optional": true
|
|
86
|
+
},
|
|
87
|
+
"react-router-dom": {
|
|
88
|
+
"optional": true
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"scripts": {
|
|
92
|
+
"build": "tsup --config tsup.config.ts --format esm,cjs --clean && tsc --build tsconfig.json --force",
|
|
93
|
+
"lint": "eslint src --ext .ts,.tsx",
|
|
94
|
+
"test": "vitest run"
|
|
95
|
+
}
|
|
96
|
+
}
|