@pgy-eu/react-native-tour-guide 0.0.0-stage → 0.0.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/LICENSE +20 -0
- package/README.md +993 -2
- package/lib/commonjs/SpotlightOverlay.js +712 -0
- package/lib/commonjs/SpotlightOverlay.js.map +1 -0
- package/lib/commonjs/Tooltip.js +593 -0
- package/lib/commonjs/Tooltip.js.map +1 -0
- package/lib/commonjs/TourGuideContext.js +535 -0
- package/lib/commonjs/TourGuideContext.js.map +1 -0
- package/lib/commonjs/TourGuideOverlay.js +1173 -0
- package/lib/commonjs/TourGuideOverlay.js.map +1 -0
- package/lib/commonjs/TourTarget.js +80 -0
- package/lib/commonjs/TourTarget.js.map +1 -0
- package/lib/commonjs/accessibility.js +49 -0
- package/lib/commonjs/accessibility.js.map +1 -0
- package/lib/commonjs/dev.js +48 -0
- package/lib/commonjs/dev.js.map +1 -0
- package/lib/commonjs/events.js +56 -0
- package/lib/commonjs/events.js.map +1 -0
- package/lib/commonjs/index.js +169 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/shapes.js +158 -0
- package/lib/commonjs/shapes.js.map +1 -0
- package/lib/commonjs/storage.js +116 -0
- package/lib/commonjs/storage.js.map +1 -0
- package/lib/commonjs/themes.js +86 -0
- package/lib/commonjs/themes.js.map +1 -0
- package/lib/commonjs/types.js +6 -0
- package/lib/commonjs/types.js.map +1 -0
- package/lib/commonjs/useTourPersistence.js +135 -0
- package/lib/commonjs/useTourPersistence.js.map +1 -0
- package/lib/commonjs/useTourScroll.js +46 -0
- package/lib/commonjs/useTourScroll.js.map +1 -0
- package/lib/commonjs/utils.js +372 -0
- package/lib/commonjs/utils.js.map +1 -0
- package/lib/commonjs/validation.js +143 -0
- package/lib/commonjs/validation.js.map +1 -0
- package/lib/module/SpotlightOverlay.js +707 -0
- package/lib/module/SpotlightOverlay.js.map +1 -0
- package/lib/module/Tooltip.js +588 -0
- package/lib/module/Tooltip.js.map +1 -0
- package/lib/module/TourGuideContext.js +529 -0
- package/lib/module/TourGuideContext.js.map +1 -0
- package/lib/module/TourGuideOverlay.js +1167 -0
- package/lib/module/TourGuideOverlay.js.map +1 -0
- package/lib/module/TourTarget.js +74 -0
- package/lib/module/TourTarget.js.map +1 -0
- package/lib/module/accessibility.js +43 -0
- package/lib/module/accessibility.js.map +1 -0
- package/lib/module/dev.js +40 -0
- package/lib/module/dev.js.map +1 -0
- package/lib/module/events.js +51 -0
- package/lib/module/events.js.map +1 -0
- package/lib/module/index.js +25 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/shapes.js +152 -0
- package/lib/module/shapes.js.map +1 -0
- package/lib/module/storage.js +111 -0
- package/lib/module/storage.js.map +1 -0
- package/lib/module/themes.js +81 -0
- package/lib/module/themes.js.map +1 -0
- package/lib/module/types.js +4 -0
- package/lib/module/types.js.map +1 -0
- package/lib/module/useTourPersistence.js +130 -0
- package/lib/module/useTourPersistence.js.map +1 -0
- package/lib/module/useTourScroll.js +41 -0
- package/lib/module/useTourScroll.js.map +1 -0
- package/lib/module/utils.js +361 -0
- package/lib/module/utils.js.map +1 -0
- package/lib/module/validation.js +138 -0
- package/lib/module/validation.js.map +1 -0
- package/lib/typescript/commonjs/package.json +1 -0
- package/lib/typescript/commonjs/src/SpotlightOverlay.d.ts +46 -0
- package/lib/typescript/commonjs/src/SpotlightOverlay.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/Tooltip.d.ts +9 -0
- package/lib/typescript/commonjs/src/Tooltip.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/TourGuideContext.d.ts +46 -0
- package/lib/typescript/commonjs/src/TourGuideContext.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/TourGuideOverlay.d.ts +22 -0
- package/lib/typescript/commonjs/src/TourGuideOverlay.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/TourTarget.d.ts +36 -0
- package/lib/typescript/commonjs/src/TourTarget.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/accessibility.d.ts +22 -0
- package/lib/typescript/commonjs/src/accessibility.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/dev.d.ts +22 -0
- package/lib/typescript/commonjs/src/dev.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/events.d.ts +57 -0
- package/lib/typescript/commonjs/src/events.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/index.d.ts +21 -0
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/shapes.d.ts +50 -0
- package/lib/typescript/commonjs/src/shapes.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/storage.d.ts +15 -0
- package/lib/typescript/commonjs/src/storage.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/themes.d.ts +10 -0
- package/lib/typescript/commonjs/src/themes.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types.d.ts +599 -0
- package/lib/typescript/commonjs/src/types.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/useTourPersistence.d.ts +63 -0
- package/lib/typescript/commonjs/src/useTourPersistence.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/useTourScroll.d.ts +36 -0
- package/lib/typescript/commonjs/src/useTourScroll.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/utils.d.ts +97 -0
- package/lib/typescript/commonjs/src/utils.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/validation.d.ts +11 -0
- package/lib/typescript/commonjs/src/validation.d.ts.map +1 -0
- package/lib/typescript/module/package.json +1 -0
- package/lib/typescript/module/src/SpotlightOverlay.d.ts +46 -0
- package/lib/typescript/module/src/SpotlightOverlay.d.ts.map +1 -0
- package/lib/typescript/module/src/Tooltip.d.ts +9 -0
- package/lib/typescript/module/src/Tooltip.d.ts.map +1 -0
- package/lib/typescript/module/src/TourGuideContext.d.ts +46 -0
- package/lib/typescript/module/src/TourGuideContext.d.ts.map +1 -0
- package/lib/typescript/module/src/TourGuideOverlay.d.ts +22 -0
- package/lib/typescript/module/src/TourGuideOverlay.d.ts.map +1 -0
- package/lib/typescript/module/src/TourTarget.d.ts +36 -0
- package/lib/typescript/module/src/TourTarget.d.ts.map +1 -0
- package/lib/typescript/module/src/accessibility.d.ts +22 -0
- package/lib/typescript/module/src/accessibility.d.ts.map +1 -0
- package/lib/typescript/module/src/dev.d.ts +22 -0
- package/lib/typescript/module/src/dev.d.ts.map +1 -0
- package/lib/typescript/module/src/events.d.ts +57 -0
- package/lib/typescript/module/src/events.d.ts.map +1 -0
- package/lib/typescript/module/src/index.d.ts +21 -0
- package/lib/typescript/module/src/index.d.ts.map +1 -0
- package/lib/typescript/module/src/shapes.d.ts +50 -0
- package/lib/typescript/module/src/shapes.d.ts.map +1 -0
- package/lib/typescript/module/src/storage.d.ts +15 -0
- package/lib/typescript/module/src/storage.d.ts.map +1 -0
- package/lib/typescript/module/src/themes.d.ts +10 -0
- package/lib/typescript/module/src/themes.d.ts.map +1 -0
- package/lib/typescript/module/src/types.d.ts +599 -0
- package/lib/typescript/module/src/types.d.ts.map +1 -0
- package/lib/typescript/module/src/useTourPersistence.d.ts +63 -0
- package/lib/typescript/module/src/useTourPersistence.d.ts.map +1 -0
- package/lib/typescript/module/src/useTourScroll.d.ts +36 -0
- package/lib/typescript/module/src/useTourScroll.d.ts.map +1 -0
- package/lib/typescript/module/src/utils.d.ts +97 -0
- package/lib/typescript/module/src/utils.d.ts.map +1 -0
- package/lib/typescript/module/src/validation.d.ts +11 -0
- package/lib/typescript/module/src/validation.d.ts.map +1 -0
- package/llms.txt +62 -0
- package/package.json +281 -4
- package/src/SpotlightOverlay.tsx +742 -0
- package/src/Tooltip.tsx +638 -0
- package/src/TourGuideContext.tsx +644 -0
- package/src/TourGuideOverlay.tsx +1382 -0
- package/src/TourTarget.tsx +74 -0
- package/src/accessibility.ts +60 -0
- package/src/dev.ts +39 -0
- package/src/events.ts +76 -0
- package/src/index.tsx +64 -0
- package/src/shapes.ts +184 -0
- package/src/storage.ts +114 -0
- package/src/themes.ts +83 -0
- package/src/types.ts +648 -0
- package/src/useTourPersistence.ts +147 -0
- package/src/useTourScroll.ts +60 -0
- package/src/utils.ts +401 -0
- package/src/validation.ts +248 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { TourStorage, TourStep, TourGuideConfig } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Hook that adds "show only once" persistence to tours.
|
|
4
|
+
* Wraps `startTour` to check if a tour has been completed before,
|
|
5
|
+
* and automatically marks tours as completed when they finish.
|
|
6
|
+
*
|
|
7
|
+
* @param storage - Optional storage adapter. When omitted, MMKV or
|
|
8
|
+
* AsyncStorage is auto-detected (in that order); with neither installed, an
|
|
9
|
+
* in-memory fallback is used and a dev warning explains persistence won't
|
|
10
|
+
* survive restarts.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```tsx
|
|
14
|
+
* import AsyncStorage from '@react-native-async-storage/async-storage';
|
|
15
|
+
* import { useTourPersistence } from '@wrack/react-native-tour-guide';
|
|
16
|
+
*
|
|
17
|
+
* const { startTour, resetTour, isTourCompleted } = useTourPersistence(AsyncStorage);
|
|
18
|
+
*
|
|
19
|
+
* // Only shows the tour if user hasn't seen it before
|
|
20
|
+
* startTour(steps, { tourId: 'onboarding' });
|
|
21
|
+
*
|
|
22
|
+
* // Force show again
|
|
23
|
+
* await resetTour('onboarding');
|
|
24
|
+
* startTour(steps, { tourId: 'onboarding' });
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export declare const useTourPersistence: (storage?: TourStorage) => {
|
|
28
|
+
startTour: (steps: TourStep[], config?: TourGuideConfig, force?: boolean) => Promise<boolean>;
|
|
29
|
+
isTourCompleted: (tourId: string) => Promise<boolean>;
|
|
30
|
+
resetTour: (tourId: string) => Promise<void>;
|
|
31
|
+
markCompleted: (tourId: string) => Promise<void>;
|
|
32
|
+
currentStep: number;
|
|
33
|
+
isActive: boolean;
|
|
34
|
+
isPaused: boolean;
|
|
35
|
+
activeTourId?: string;
|
|
36
|
+
steps: TourStep[];
|
|
37
|
+
activeSteps: TourStep[];
|
|
38
|
+
config?: import("./types").ResolvedTourGuideConfig;
|
|
39
|
+
defineTour: (tourId: string, steps: TourStep[], config?: TourGuideConfig) => void;
|
|
40
|
+
removeTour: (tourId: string) => void;
|
|
41
|
+
canStartTour: (tourOrSteps: string | TourStep[]) => boolean;
|
|
42
|
+
nextStep: () => void;
|
|
43
|
+
prevStep: () => void;
|
|
44
|
+
skipTour: () => void;
|
|
45
|
+
endTour: () => void;
|
|
46
|
+
goToStep: (index: number) => void;
|
|
47
|
+
pauseTour: () => void;
|
|
48
|
+
resumeTour: () => void;
|
|
49
|
+
setStepCompleted: (stepId: string, completed: boolean) => void;
|
|
50
|
+
registerTarget: (id: string, ref: import("./types").MeasurableRef, style?: import("react-native").StyleProp<import("react-native").ViewStyle>) => void;
|
|
51
|
+
unregisterTarget: (id: string, ref?: import("./types").MeasurableRef) => void;
|
|
52
|
+
getTarget: (id: string) => import("./types").RegisteredTarget | undefined;
|
|
53
|
+
setTargetLayout: (layout: import("./types").SpotlightTarget | null) => void;
|
|
54
|
+
targetLayout: import("./types").SpotlightTarget | null;
|
|
55
|
+
events: import("./events").TourEvents;
|
|
56
|
+
__reportScroll?: (y: number) => void;
|
|
57
|
+
__reportScrollEnd?: () => void;
|
|
58
|
+
__subscribeScroll?: (cb: (y: number) => void) => () => void;
|
|
59
|
+
__subscribeScrollEnd?: (cb: () => void) => () => void;
|
|
60
|
+
__getTrackedScrollY?: () => number | undefined;
|
|
61
|
+
__registerOverlay?: () => () => void;
|
|
62
|
+
};
|
|
63
|
+
//# sourceMappingURL=useTourPersistence.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTourPersistence.d.ts","sourceRoot":"","sources":["../../../../src/useTourPersistence.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAOtE;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,kBAAkB,GAAI,UAAU,WAAW;uBAoEtC,QAAQ,EAAE,WAAW,eAAe,sBAAkB,OAAO,CAAC,OAAO,CAAC;8BArDnC,MAAM,KAAG,OAAO,CAAC,OAAO,CAAC;wBAiC/B,MAAM;4BAdF,MAAM;;;;;;;;0DA+E8vhB,CAAC;;;;;;;;;;;4EAAy0C,CAAC;sCAA+S,CAAC;;;;;;;;;;;CADj7kB,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { NativeScrollEvent, NativeSyntheticEvent } from 'react-native';
|
|
2
|
+
export interface TourScrollBinding {
|
|
3
|
+
/**
|
|
4
|
+
* Spread onto the ScrollView/FlatList the tour scrolls (alongside your
|
|
5
|
+
* `ref={scrollRef}`):
|
|
6
|
+
*
|
|
7
|
+
* ```tsx
|
|
8
|
+
* const { scrollProps } = useTourScroll();
|
|
9
|
+
* <ScrollView ref={scrollRef} {...scrollProps}>…</ScrollView>
|
|
10
|
+
* ```
|
|
11
|
+
*/
|
|
12
|
+
scrollProps: {
|
|
13
|
+
onScroll: (e: NativeSyntheticEvent<NativeScrollEvent>) => void;
|
|
14
|
+
onMomentumScrollEnd: () => void;
|
|
15
|
+
scrollEventThrottle: number;
|
|
16
|
+
};
|
|
17
|
+
/** The individual handlers, for composing with your own. */
|
|
18
|
+
onScroll: (e: NativeSyntheticEvent<NativeScrollEvent>) => void;
|
|
19
|
+
onMomentumScrollEnd: () => void;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Binds a scrollable to the tour. Wiring this up gives the tour three things:
|
|
23
|
+
*
|
|
24
|
+
* 1. **`followTarget`** — with `config.followTarget: true`, the spotlight and
|
|
25
|
+
* tooltip stay glued to the target while the user scrolls freely.
|
|
26
|
+
* 2. **Exact auto-scroll settling** — `onMomentumScrollEnd` tells the tour the
|
|
27
|
+
* programmatic scroll finished, so the highlight lands immediately instead
|
|
28
|
+
* of waiting for position polling to detect the stop.
|
|
29
|
+
* 3. **A tracked scroll offset** — `getCurrentScrollOffset` becomes redundant;
|
|
30
|
+
* the tour reads the offset it saw last.
|
|
31
|
+
*
|
|
32
|
+
* Already have your own onScroll? Compose: call both handlers, or spread
|
|
33
|
+
* `scrollProps` and call your handler from a wrapper.
|
|
34
|
+
*/
|
|
35
|
+
export declare const useTourScroll: () => TourScrollBinding;
|
|
36
|
+
//# sourceMappingURL=useTourScroll.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTourScroll.d.ts","sourceRoot":"","sources":["../../../../src/useTourScroll.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAI5E,MAAM,WAAW,iBAAiB;IAChC;;;;;;;;OAQG;IACH,WAAW,EAAE;QACX,QAAQ,EAAE,CAAC,CAAC,EAAE,oBAAoB,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;QAC/D,mBAAmB,EAAE,MAAM,IAAI,CAAC;QAChC,mBAAmB,EAAE,MAAM,CAAC;KAC7B,CAAC;IACF,4DAA4D;IAC5D,QAAQ,EAAE,CAAC,CAAC,EAAE,oBAAoB,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IAC/D,mBAAmB,EAAE,MAAM,IAAI,CAAC;CACjC;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,aAAa,QAAO,iBAoBhC,CAAC"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import type { EdgeInsets, MeasurableRef, PerPlatform, ResolvedTourGuideConfig, SpotlightTarget, TourGuideConfig } from './types';
|
|
2
|
+
import type { SpotlightBorderRadius } from './shapes';
|
|
3
|
+
/**
|
|
4
|
+
* Compute the best tooltip position based on available screen space.
|
|
5
|
+
* Prefers: bottom > top > right > left.
|
|
6
|
+
* `insets` shrink the usable area so the tour avoids system chrome.
|
|
7
|
+
*/
|
|
8
|
+
interface TooltipPositionOptions {
|
|
9
|
+
target: SpotlightTarget;
|
|
10
|
+
screenWidth: number;
|
|
11
|
+
screenHeight: number;
|
|
12
|
+
tooltipWidth: number;
|
|
13
|
+
tooltipHeight?: number;
|
|
14
|
+
offset?: number;
|
|
15
|
+
insets?: EdgeInsets;
|
|
16
|
+
}
|
|
17
|
+
export declare const computeTooltipPosition: ({ target, screenWidth, screenHeight, tooltipWidth, tooltipHeight, offset, insets, }: TooltipPositionOptions) => "top" | "bottom" | "left" | "right";
|
|
18
|
+
/**
|
|
19
|
+
* Resolve just the safe-area insets (auto-detected, or overridden via
|
|
20
|
+
* `config.insets`) — WITHOUT any `extraInsets`. This is the value that mirrors
|
|
21
|
+
* system chrome like the status bar, and is what corrects `measureInWindow`
|
|
22
|
+
* coordinates on Android (see TourGuideOverlay).
|
|
23
|
+
*/
|
|
24
|
+
export declare const resolveSafeAreaInsets: (config?: {
|
|
25
|
+
insets?: Partial<EdgeInsets>;
|
|
26
|
+
}) => EdgeInsets;
|
|
27
|
+
/**
|
|
28
|
+
* Resolve the effective insets the tour should respect for layout/clamping:
|
|
29
|
+
* the safe area plus any `config.extraInsets` for app chrome like tab bars and
|
|
30
|
+
* headers.
|
|
31
|
+
*/
|
|
32
|
+
export declare const resolveInsets: (config?: {
|
|
33
|
+
insets?: Partial<EdgeInsets>;
|
|
34
|
+
extraInsets?: Partial<EdgeInsets>;
|
|
35
|
+
}) => EdgeInsets;
|
|
36
|
+
/**
|
|
37
|
+
* Validate that a ref is valid and points to a mounted component.
|
|
38
|
+
* Returns true if valid, false otherwise.
|
|
39
|
+
*/
|
|
40
|
+
export declare const validateRef: (ref: MeasurableRef | undefined, stepId: string) => boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Extract border radius values from a View style.
|
|
43
|
+
* Returns a SpotlightBorderRadius (number if uniform, object if per-corner),
|
|
44
|
+
* or undefined if no border radius is specified.
|
|
45
|
+
*
|
|
46
|
+
* Percentage radii (e.g. `'50%'`, supported by React Native 0.76+) are resolved
|
|
47
|
+
* against the target's shorter side when `target` dimensions are provided — this
|
|
48
|
+
* is what keeps a circular avatar (`borderRadius: '50%'`) round instead of square.
|
|
49
|
+
* Without `target`, percentages fall back to the numeric base/0.
|
|
50
|
+
*/
|
|
51
|
+
export declare const extractBorderRadius: (style: any, target?: {
|
|
52
|
+
width: number;
|
|
53
|
+
height: number;
|
|
54
|
+
}) => SpotlightBorderRadius | undefined;
|
|
55
|
+
/**
|
|
56
|
+
* Scroll a scrollable ref to an absolute Y offset.
|
|
57
|
+
*
|
|
58
|
+
* Consumers pass all kinds of scrollables, and each exposes a different imperative
|
|
59
|
+
* API — assuming `scrollTo` crashes with `scrollTo is not a function` on the most
|
|
60
|
+
* common one (`FlatList`). This normalises across:
|
|
61
|
+
*
|
|
62
|
+
* - `ScrollView` (and gesture-handler / Animated wrappers) → `scrollTo`
|
|
63
|
+
* - `FlatList` / `VirtualizedList` → `scrollToOffset`
|
|
64
|
+
* - `SectionList` and other list wrappers → `getScrollResponder()` / `getScrollRef()`
|
|
65
|
+
* - legacy `Animated.ScrollView` → `getNode()`
|
|
66
|
+
* - `KeyboardAwareScrollView` → `scrollToPosition`
|
|
67
|
+
*
|
|
68
|
+
* @returns true if a scroll was actually issued, false if the ref exposes no
|
|
69
|
+
* usable scroll method (the caller should then continue without scrolling
|
|
70
|
+
* rather than leaving the tour stuck).
|
|
71
|
+
*/
|
|
72
|
+
export declare const scrollRefToY: (scrollRef: {
|
|
73
|
+
current: any;
|
|
74
|
+
} | null | undefined, y: number, animated: boolean) => boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Whether a background color is light (true), dark (false), or unparseable
|
|
77
|
+
* (null). Supports #rgb/#rgba/#rrggbb/#rrggbbaa, rgb()/rgba(), and a handful of
|
|
78
|
+
* common named colors — enough for the tooltip-background use case; anything
|
|
79
|
+
* exotic returns null and callers keep their existing defaults.
|
|
80
|
+
*
|
|
81
|
+
* Used to pick readable default text colors when a consumer sets a custom
|
|
82
|
+
* tooltip background: a pale background used to get the built-in white title
|
|
83
|
+
* text, which is invisible.
|
|
84
|
+
*/
|
|
85
|
+
export declare const isLightColor: (color: string) => boolean | null;
|
|
86
|
+
/**
|
|
87
|
+
* Resolve a possibly per-platform value for the running OS.
|
|
88
|
+
* `{ ios: 12, default: 8 }` → 12 on iOS, 8 elsewhere.
|
|
89
|
+
*/
|
|
90
|
+
export declare const osValue: <T>(value: PerPlatform<T> | undefined) => T | undefined;
|
|
91
|
+
/**
|
|
92
|
+
* Resolve every PerPlatform field of a tour config for the running OS.
|
|
93
|
+
* Called once in startTour, so everything downstream reads plain values.
|
|
94
|
+
*/
|
|
95
|
+
export declare const resolvePlatformConfig: (config: TourGuideConfig | undefined) => ResolvedTourGuideConfig | undefined;
|
|
96
|
+
export {};
|
|
97
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/utils.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,UAAU,EACV,aAAa,EAEb,WAAW,EACX,uBAAuB,EACvB,eAAe,EACf,eAAe,EAChB,MAAM,SAAS,CAAC;AAEjB,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAItD;;;;GAIG;AACH,UAAU,sBAAsB;IAC9B,MAAM,EAAE,eAAe,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,UAAU,CAAC;CACrB;AAED,eAAO,MAAM,sBAAsB,GAAI,qFAQpC,sBAAsB,KAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAYvD,CAAC;AAiCF;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,GAAI,SAAS;IAAE,MAAM,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,CAAA;CAAE,KAAG,UAQjF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,aAAa,GAAI,SAAS;IACrC,MAAM,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;IAC7B,WAAW,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;CACnC,KAAG,UASH,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,WAAW,GAAI,KAAK,aAAa,GAAG,SAAS,EAAE,QAAQ,MAAM,KAAG,OAkB5E,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,mBAAmB,GAE9B,OAAO,GAAG,EACV,SAAS;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,KACzC,qBAAqB,GAAG,SAsD1B,CAAC;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,YAAY,GAEvB,WAAW;IAAE,OAAO,EAAE,GAAG,CAAA;CAAE,GAAG,IAAI,GAAG,SAAS,EAC9C,GAAG,MAAM,EACT,UAAU,OAAO,KAChB,OAwCF,CAAC;AAkBF;;;;;;;;;GASG;AACH,eAAO,MAAM,YAAY,GAAI,OAAO,MAAM,KAAG,OAAO,GAAG,IAkCtD,CAAC;AAYF;;;GAGG;AACH,eAAO,MAAM,OAAO,GAAI,CAAC,EAAE,OAAO,WAAW,CAAC,CAAC,CAAC,GAAG,SAAS,KAAG,CAAC,GAAG,SAIlE,CAAC;AAmBF;;;GAGG;AACH,eAAO,MAAM,qBAAqB,GAChC,QAAQ,eAAe,GAAG,SAAS,KAClC,uBAAuB,GAAG,SAiB5B,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ResolvedTourGuideConfig, TourStep } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Validate tour steps and config in development and report actionable warnings.
|
|
4
|
+
*
|
|
5
|
+
* Every check here corresponds to a mistake that otherwise fails *silently* at
|
|
6
|
+
* runtime — the tour simply does nothing, or shows a centered tooltip with no
|
|
7
|
+
* explanation — which is the hardest class of bug to diagnose from the outside.
|
|
8
|
+
* Runs only in dev; it is a no-op in production builds.
|
|
9
|
+
*/
|
|
10
|
+
export declare const validateTour: (steps: TourStep[], config?: ResolvedTourGuideConfig) => void;
|
|
11
|
+
//# sourceMappingURL=validation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../../src/validation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAcjE;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY,GAAI,OAAO,QAAQ,EAAE,EAAE,SAAS,uBAAuB,KAAG,IAwKlF,CAAC"}
|
package/llms.txt
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# @wrack/react-native-tour-guide
|
|
2
|
+
|
|
3
|
+
> A lightweight React Native library for building in-app tours, walkthroughs, onboarding flows, and coach marks. Its spotlight automatically matches each highlighted component's shape (circles stay circular, pills stay pill-shaped, per-corner radii are preserved) with no manual configuration. Works with Expo and React Native CLI, has zero native dependencies (only `react-native-svg`), is written in TypeScript, and is New Architecture (Fabric) ready.
|
|
4
|
+
|
|
5
|
+
## What it does
|
|
6
|
+
|
|
7
|
+
You define a list of steps — which component to highlight (via a `<TourTarget id>` wrapper or a ref) and what text to show — then call `startTour(steps, config)`. The library measures each target, dims the rest of the screen with a spotlight cutout, positions a tooltip, auto-scrolls off-screen targets into view, and animates between steps. It is designed as a headless-friendly tour ENGINE: teams keep the measurement/scrolling/placement/sequencing engine and bring their own design-system UI via component slots or a fully custom tooltip.
|
|
8
|
+
|
|
9
|
+
## Key features
|
|
10
|
+
|
|
11
|
+
- Auto shape matching: the spotlight reads `borderRadius` from the target's style and matches it (uniform, per-corner, fully-rounded/pill, and circle).
|
|
12
|
+
- Smart auto-scroll: scrolls a parent `ScrollView`/`FlatList` so the target and its tooltip are both fully visible; the highlight is hidden during the scroll and revealed once it settles (no flicker).
|
|
13
|
+
- Smart tooltip positioning: auto-detects the best side (top/bottom/left/right) and clamps within safe-area insets so it never renders off-screen.
|
|
14
|
+
- Theming: built-in themes plus a `createTheme()` API; fully customizable tooltip via `renderTooltip`.
|
|
15
|
+
- Pulse animation, backdrop-tap behavior, conditional steps, pause/resume, auto-advance, and "show only once" persistence (`useTourPersistence`).
|
|
16
|
+
- Accessibility: screen-reader announcements (VoiceOver/TalkBack) enabled by default; tooltip text follows the OS font-size setting.
|
|
17
|
+
- Declarative targeting: wrap any element in `<TourTarget id="x">` and reference it from steps with `targetId: 'x'` — no ref threading; handles Android view flattening (`collapsable={false}`) and targets that mount after the tour starts.
|
|
18
|
+
- Bring-your-own-UI (headless): `renderTooltip` (global or per step) receives the stable `TooltipProps` contract (geometry, resolved placement, insets, progress, callbacks); `config.components` slots replace just `NextButton`/`PrevButton`/`SkipButton`/`StepCounter`/`ProgressDots`.
|
|
19
|
+
- Interactive steps: `overlayMode: 'inline'` + `interactive: true` lets users tap the real highlighted element through the spotlight; `completed: false` + `setStepCompleted()` gates Next until they do.
|
|
20
|
+
- `before()` per step: an awaited hook to navigate/fetch before the step is measured (better than guessing a delay).
|
|
21
|
+
- Live target tracking: `followTarget: true` + `useTourScroll()` keeps the spotlight glued to the target during free scrolling; the same hook gives auto-scroll an exact momentum-end settle signal and a tracked scroll offset.
|
|
22
|
+
- Analytics: `events.on('start'|'stepChange'|'end'|'skip'|'pause'|'resume', h)` subscription emitter; `useTourPersistence()` auto-detects MMKV/AsyncStorage (no adapter needed); `keepSpotlight` keeps earlier holes lit; per-platform config values `{ ios, android, web, default }`; `waitForInteractions`, `statusBarStyle`, `supportedOrientations`, `arrowStyle`.
|
|
23
|
+
- Named tours: `defineTour(id, steps, config)` + `startTour('id')` + `canStartTour(id)` (ready once all referenced TourTargets have registered); `targetRegion` highlights a fixed rectangle with no ref (maps, camera views); motion presets `'morph' | 'bounce' | 'fade' | 'none'`; `spotlightStyles.maskPath` draws any custom SVG cutout shape.
|
|
24
|
+
- Auto-scroll works without any offset tracking: destination is derived via `measureLayout`; `getCurrentScrollOffset` is optional.
|
|
25
|
+
- Robustness: dev-time validation of steps/config with actionable warnings (stripped in production), a measurement watchdog so a target that can never be measured falls back to a centered tooltip instead of trapping the user, and contrast-derived tooltip text so custom light backgrounds never render invisible white text.
|
|
26
|
+
|
|
27
|
+
## Installation
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
npm install @wrack/react-native-tour-guide react-native-svg
|
|
31
|
+
# Expo: npx expo install @wrack/react-native-tour-guide react-native-svg
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Minimal usage
|
|
35
|
+
|
|
36
|
+
```tsx
|
|
37
|
+
import { TourGuideProvider, TourGuideOverlay, useTourGuide } from '@wrack/react-native-tour-guide';
|
|
38
|
+
|
|
39
|
+
// Wrap the app once:
|
|
40
|
+
<TourGuideProvider><App /><TourGuideOverlay /></TourGuideProvider>
|
|
41
|
+
|
|
42
|
+
// Start a tour:
|
|
43
|
+
const { startTour } = useTourGuide();
|
|
44
|
+
startTour([{ id: 'welcome', targetRef: buttonRef, title: 'Welcome', description: 'Tap here.' }]);
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Platforms and dependencies
|
|
48
|
+
|
|
49
|
+
- Platforms: iOS and Android (Expo and React Native CLI).
|
|
50
|
+
- Required peer dependency: `react-native-svg`.
|
|
51
|
+
- No native modules of its own; the dark overlay uses an even-odd SVG path (Fabric-safe).
|
|
52
|
+
- Optional, lazily loaded effects: `@react-native-community/blur` (blur), `react-native-linear-gradient` (gradient).
|
|
53
|
+
|
|
54
|
+
## Links
|
|
55
|
+
|
|
56
|
+
- npm: https://www.npmjs.com/package/@wrack/react-native-tour-guide
|
|
57
|
+
- Repository: https://github.com/himanshu-lal4/react-native-tour-guide
|
|
58
|
+
- README: https://github.com/himanshu-lal4/react-native-tour-guide#readme
|
|
59
|
+
|
|
60
|
+
## Comparison
|
|
61
|
+
|
|
62
|
+
Similar libraries include react-native-copilot and rn-tourguide. This library differs by matching the spotlight shape to each target's border radius automatically, auto-scrolling so the target and tooltip both fit on screen, and shipping zero native dependencies (it runs in Expo Go without a custom dev build).
|
package/package.json
CHANGED
|
@@ -1,6 +1,283 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pgy-eu/react-native-tour-guide",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "React Native tour guide, walkthrough, and coach marks library. Auto shape-matching spotlight, smart auto-scroll, themeable tooltips, pulse animation, and a declarative API. Works with Expo and React Native CLI — zero native dependencies, TypeScript, New Architecture ready.",
|
|
5
|
+
"main": "./lib/commonjs/index.js",
|
|
6
|
+
"module": "./lib/module/index.js",
|
|
7
|
+
"types": "./lib/typescript/commonjs/src/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"source": "./src/index.tsx",
|
|
11
|
+
"import": {
|
|
12
|
+
"types": "./lib/typescript/module/src/index.d.ts",
|
|
13
|
+
"default": "./lib/module/index.js"
|
|
14
|
+
},
|
|
15
|
+
"require": {
|
|
16
|
+
"types": "./lib/typescript/commonjs/src/index.d.ts",
|
|
17
|
+
"default": "./lib/commonjs/index.js"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"./package.json": "./package.json"
|
|
21
|
+
},
|
|
22
|
+
"files": [
|
|
23
|
+
"llms.txt",
|
|
24
|
+
"src",
|
|
25
|
+
"lib",
|
|
26
|
+
"android",
|
|
27
|
+
"ios",
|
|
28
|
+
"cpp",
|
|
29
|
+
"*.podspec",
|
|
30
|
+
"react-native.config.js",
|
|
31
|
+
"!ios/build",
|
|
32
|
+
"!android/build",
|
|
33
|
+
"!android/gradle",
|
|
34
|
+
"!android/gradlew",
|
|
35
|
+
"!android/gradlew.bat",
|
|
36
|
+
"!android/local.properties",
|
|
37
|
+
"!**/__tests__",
|
|
38
|
+
"!**/__fixtures__",
|
|
39
|
+
"!**/__mocks__",
|
|
40
|
+
"!**/.*"
|
|
41
|
+
],
|
|
42
|
+
"scripts": {
|
|
43
|
+
"example": "yarn workspace @wrack/react-native-tour-guide-example",
|
|
44
|
+
"test": "jest",
|
|
45
|
+
"typecheck": "tsc",
|
|
46
|
+
"lint": "eslint \"**/*.{js,ts,tsx}\"",
|
|
47
|
+
"clean": "del-cli lib",
|
|
48
|
+
"prepare": "husky && bob build",
|
|
49
|
+
"lint:fix": "eslint \"**/*.{js,ts,tsx}\" --fix",
|
|
50
|
+
"format": "prettier --write \"src/**/*.{ts,tsx}\"",
|
|
51
|
+
"validate": "yarn lint && yarn typecheck && yarn test && yarn build",
|
|
52
|
+
"release": "release-it --only-version",
|
|
53
|
+
"build": "bob build",
|
|
54
|
+
"example:start": "npm --prefix example start",
|
|
55
|
+
"example:ios": "npm --prefix example run ios",
|
|
56
|
+
"example:android": "npm --prefix example run android",
|
|
57
|
+
"example:web": "npm --prefix example run web"
|
|
58
|
+
},
|
|
59
|
+
"keywords": [
|
|
60
|
+
"react-native",
|
|
61
|
+
"react-native-tour-guide",
|
|
62
|
+
"tour-guide",
|
|
63
|
+
"walkthrough",
|
|
64
|
+
"onboarding",
|
|
65
|
+
"coach-marks",
|
|
66
|
+
"coachmarks",
|
|
67
|
+
"copilot",
|
|
68
|
+
"app-tour",
|
|
69
|
+
"user-guide",
|
|
70
|
+
"tutorial",
|
|
71
|
+
"spotlight",
|
|
72
|
+
"highlight",
|
|
73
|
+
"tooltip",
|
|
74
|
+
"feature-discovery",
|
|
75
|
+
"feature-tour",
|
|
76
|
+
"interactive-tour",
|
|
77
|
+
"guided-tour",
|
|
78
|
+
"app-walkthrough",
|
|
79
|
+
"user-onboarding",
|
|
80
|
+
"mobile-tour",
|
|
81
|
+
"react-native-walkthrough",
|
|
82
|
+
"react-native-onboarding",
|
|
83
|
+
"react-native-copilot",
|
|
84
|
+
"react-native-spotlight",
|
|
85
|
+
"react-native-coach-marks",
|
|
86
|
+
"react-native-tutorial",
|
|
87
|
+
"expo",
|
|
88
|
+
"expo-compatible",
|
|
89
|
+
"typescript",
|
|
90
|
+
"ios",
|
|
91
|
+
"android",
|
|
92
|
+
"cross-platform",
|
|
93
|
+
"new-architecture",
|
|
94
|
+
"fabric",
|
|
95
|
+
"turbomodules",
|
|
96
|
+
"svg-masking",
|
|
97
|
+
"animated",
|
|
98
|
+
"customizable",
|
|
99
|
+
"declarative",
|
|
100
|
+
"intro",
|
|
101
|
+
"hints",
|
|
102
|
+
"tips",
|
|
103
|
+
"product-tour",
|
|
104
|
+
"feature-hints",
|
|
105
|
+
"interactive-guide",
|
|
106
|
+
"step-by-step",
|
|
107
|
+
"user-education",
|
|
108
|
+
"app-intro",
|
|
109
|
+
"first-time-user-experience",
|
|
110
|
+
"ftue",
|
|
111
|
+
"react-native-svg"
|
|
112
|
+
],
|
|
113
|
+
"repository": {
|
|
114
|
+
"type": "git",
|
|
115
|
+
"url": "git+https://github.com/himanshu-lal4/react-native-tour-guide.git"
|
|
116
|
+
},
|
|
117
|
+
"author": "Himanshu Lal <himanshulal56@gmail.com> (https://github.com/himanshu-lal4)",
|
|
118
|
+
"license": "MIT",
|
|
119
|
+
"bugs": {
|
|
120
|
+
"url": "https://github.com/himanshu-lal4/react-native-tour-guide/issues"
|
|
121
|
+
},
|
|
122
|
+
"homepage": "https://himanshu-lal4.github.io/react-native-tour-guide/",
|
|
123
|
+
"publishConfig": {
|
|
124
|
+
"registry": "https://registry.npmjs.org/"
|
|
125
|
+
},
|
|
126
|
+
"devDependencies": {
|
|
127
|
+
"@commitlint/config-conventional": "^19.8.1",
|
|
128
|
+
"@react-native/babel-preset": "0.81.1",
|
|
129
|
+
"@release-it/conventional-changelog": "^10.0.1",
|
|
130
|
+
"@testing-library/react-native": "^14.0.1",
|
|
131
|
+
"@types/jest": "^29.5.14",
|
|
132
|
+
"@types/react": "^19.1.12",
|
|
133
|
+
"@typescript-eslint/eslint-plugin": "^8.33.1",
|
|
134
|
+
"@typescript-eslint/parser": "^8.33.1",
|
|
135
|
+
"commitlint": "^19.8.1",
|
|
136
|
+
"del-cli": "^6.0.0",
|
|
137
|
+
"eslint": "^9.35.0",
|
|
138
|
+
"eslint-config-prettier": "^10.1.8",
|
|
139
|
+
"eslint-import-resolver-typescript": "^4.4.4",
|
|
140
|
+
"eslint-plugin-import": "^2.32.0",
|
|
141
|
+
"eslint-plugin-jest": "^29.15.1",
|
|
142
|
+
"eslint-plugin-prettier": "^5.5.4",
|
|
143
|
+
"eslint-plugin-react": "^7.37.5",
|
|
144
|
+
"eslint-plugin-react-hooks": "^5.2.0",
|
|
145
|
+
"eslint-plugin-react-native": "^5.0.0",
|
|
146
|
+
"eslint-plugin-testing-library": "^7.16.2",
|
|
147
|
+
"globals": "^16.3.0",
|
|
148
|
+
"husky": "^9.1.7",
|
|
149
|
+
"jest": "^29.7.0",
|
|
150
|
+
"prettier": "^3.6.2",
|
|
151
|
+
"react": "19.1.0",
|
|
152
|
+
"react-native": "0.81.5",
|
|
153
|
+
"react-native-builder-bob": "^0.40.13",
|
|
154
|
+
"react-native-svg": "^15.8.0",
|
|
155
|
+
"release-it": "^19.0.4",
|
|
156
|
+
"test-renderer": "^1.0.0",
|
|
157
|
+
"typescript": "^5.9.2"
|
|
158
|
+
},
|
|
159
|
+
"peerDependencies": {
|
|
160
|
+
"@react-native-community/blur": "*",
|
|
161
|
+
"@react-native-masked-view/masked-view": "*",
|
|
162
|
+
"react": ">=18.0.0",
|
|
163
|
+
"react-native": ">=0.71.0",
|
|
164
|
+
"react-native-linear-gradient": "*",
|
|
165
|
+
"react-native-safe-area-context": "*",
|
|
166
|
+
"react-native-svg": ">=13.0.0",
|
|
167
|
+
"react-native-web": ">=0.19.0"
|
|
168
|
+
},
|
|
169
|
+
"peerDependenciesMeta": {
|
|
170
|
+
"@react-native-community/blur": {
|
|
171
|
+
"optional": true
|
|
172
|
+
},
|
|
173
|
+
"@react-native-masked-view/masked-view": {
|
|
174
|
+
"optional": true
|
|
175
|
+
},
|
|
176
|
+
"react-native-linear-gradient": {
|
|
177
|
+
"optional": true
|
|
178
|
+
},
|
|
179
|
+
"react-native-safe-area-context": {
|
|
180
|
+
"optional": true
|
|
181
|
+
},
|
|
182
|
+
"react-native-web": {
|
|
183
|
+
"optional": true
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
"workspaces": [
|
|
187
|
+
"example"
|
|
188
|
+
],
|
|
189
|
+
"packageManager": "yarn@3.6.1",
|
|
190
|
+
"jest": {
|
|
191
|
+
"preset": "react-native",
|
|
192
|
+
"modulePathIgnorePatterns": [
|
|
193
|
+
"<rootDir>/example/node_modules",
|
|
194
|
+
"<rootDir>/lib/"
|
|
195
|
+
]
|
|
196
|
+
},
|
|
197
|
+
"commitlint": {
|
|
198
|
+
"extends": [
|
|
199
|
+
"@commitlint/config-conventional"
|
|
200
|
+
],
|
|
201
|
+
"rules": {
|
|
202
|
+
"type-enum": [
|
|
203
|
+
2,
|
|
204
|
+
"always",
|
|
205
|
+
[
|
|
206
|
+
"feat",
|
|
207
|
+
"fix",
|
|
208
|
+
"docs",
|
|
209
|
+
"style",
|
|
210
|
+
"refactor",
|
|
211
|
+
"perf",
|
|
212
|
+
"test",
|
|
213
|
+
"chore",
|
|
214
|
+
"ci",
|
|
215
|
+
"revert"
|
|
216
|
+
]
|
|
217
|
+
],
|
|
218
|
+
"subject-case": [
|
|
219
|
+
0
|
|
220
|
+
],
|
|
221
|
+
"body-max-line-length": [
|
|
222
|
+
0
|
|
223
|
+
],
|
|
224
|
+
"header-max-length": [
|
|
225
|
+
0
|
|
226
|
+
]
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
"release-it": {
|
|
230
|
+
"git": {
|
|
231
|
+
"commitMessage": "chore: release ${version}",
|
|
232
|
+
"tagName": "v${version}"
|
|
233
|
+
},
|
|
234
|
+
"npm": {
|
|
235
|
+
"publish": true
|
|
236
|
+
},
|
|
237
|
+
"github": {
|
|
238
|
+
"release": true
|
|
239
|
+
},
|
|
240
|
+
"plugins": {
|
|
241
|
+
"@release-it/conventional-changelog": {
|
|
242
|
+
"preset": {
|
|
243
|
+
"name": "angular"
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
"prettier": "./.prettierrc.js",
|
|
249
|
+
"react-native-builder-bob": {
|
|
250
|
+
"source": "src",
|
|
251
|
+
"output": "lib",
|
|
252
|
+
"targets": [
|
|
253
|
+
[
|
|
254
|
+
"commonjs",
|
|
255
|
+
{
|
|
256
|
+
"esm": true
|
|
257
|
+
}
|
|
258
|
+
],
|
|
259
|
+
[
|
|
260
|
+
"module",
|
|
261
|
+
{
|
|
262
|
+
"esm": true
|
|
263
|
+
}
|
|
264
|
+
],
|
|
265
|
+
[
|
|
266
|
+
"typescript",
|
|
267
|
+
{
|
|
268
|
+
"project": "tsconfig.build.json"
|
|
269
|
+
}
|
|
270
|
+
]
|
|
271
|
+
]
|
|
272
|
+
},
|
|
273
|
+
"create-react-native-library": {
|
|
274
|
+
"languages": "js",
|
|
275
|
+
"type": "library",
|
|
276
|
+
"version": "0.54.7"
|
|
277
|
+
},
|
|
278
|
+
"eslintIgnore": [
|
|
279
|
+
"node_modules/",
|
|
280
|
+
"lib/",
|
|
281
|
+
"example/"
|
|
282
|
+
]
|
|
283
|
+
}
|