@the-seeker/feedback-react-native 0.0.0-stage → 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/README.md +215 -2
- package/dist/core/client.d.ts +57 -0
- package/dist/core/client.js +113 -0
- package/dist/core/config.d.ts +59 -0
- package/dist/core/config.js +112 -0
- package/dist/core/request.d.ts +53 -0
- package/dist/core/request.js +86 -0
- package/dist/core/survey.d.ts +12 -0
- package/dist/core/survey.js +26 -0
- package/dist/core/texts.d.ts +104 -0
- package/dist/core/texts.js +140 -0
- package/dist/core/theme.d.ts +6 -0
- package/dist/core/theme.js +55 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +32 -0
- package/dist/ui/Attachments.d.ts +9 -0
- package/dist/ui/Attachments.js +27 -0
- package/dist/ui/FeedbackForm.d.ts +8 -0
- package/dist/ui/FeedbackForm.js +90 -0
- package/dist/ui/FeedbackSheet.d.ts +2 -0
- package/dist/ui/FeedbackSheet.js +32 -0
- package/dist/ui/Inline.d.ts +6 -0
- package/dist/ui/Inline.js +16 -0
- package/dist/ui/Launcher.d.ts +1 -0
- package/dist/ui/Launcher.js +14 -0
- package/dist/ui/Provider.d.ts +21 -0
- package/dist/ui/Provider.js +131 -0
- package/dist/ui/SurveyPrompt.d.ts +2 -0
- package/dist/ui/SurveyPrompt.js +52 -0
- package/dist/ui/context.d.ts +79 -0
- package/dist/ui/context.js +28 -0
- package/dist/ui/device.d.ts +10 -0
- package/dist/ui/device.js +22 -0
- package/dist/ui/forms.d.ts +32 -0
- package/dist/ui/forms.js +62 -0
- package/dist/ui/primitives.d.ts +33 -0
- package/dist/ui/primitives.js +55 -0
- package/dist/ui/prop-state.d.ts +9 -0
- package/dist/ui/prop-state.js +27 -0
- package/dist/ui/storage.d.ts +15 -0
- package/dist/ui/storage.js +35 -0
- package/dist/ui/styles.d.ts +697 -0
- package/dist/ui/styles.js +177 -0
- package/dist/ui/tokens.d.ts +16 -0
- package/dist/ui/tokens.js +62 -0
- package/dist/ui/useSurvey.d.ts +12 -0
- package/dist/ui/useSurvey.js +52 -0
- package/package.json +34 -4
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createStyles = createStyles;
|
|
4
|
+
exports.useFeedbackTheme = useFeedbackTheme;
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const react_native_1 = require("react-native");
|
|
7
|
+
const theme_1 = require("../core/theme");
|
|
8
|
+
const tokens_1 = require("./tokens");
|
|
9
|
+
// Layout scale: 6 inside a group (label → field), 16 between groups, 20 panel inset (web widget values).
|
|
10
|
+
const SPACE = { hair: 4, tight: 6, gap: 8, block: 12, group: 16, panel: 20 };
|
|
11
|
+
const TOUCH = 44;
|
|
12
|
+
// No safe-area module (pure JS): clear the iOS home indicator (34pt) under the launcher and sheet.
|
|
13
|
+
const HOME_INDICATOR = react_native_1.Platform.OS === "ios" ? 12 : 0;
|
|
14
|
+
const LAUNCHER_BOTTOM = 24 + HOME_INDICATOR;
|
|
15
|
+
const SURVEY_ABOVE_LAUNCHER = LAUNCHER_BOTTOM + TOUCH + SPACE.block;
|
|
16
|
+
const SHEET_BOTTOM = SPACE.panel + (react_native_1.Platform.OS === "ios" ? 14 : 0);
|
|
17
|
+
// Native-mobile type scale: headings descend 17 → 15 → 14; inputs stay 16; meta 13.
|
|
18
|
+
const TYPE = {
|
|
19
|
+
title: { fontSize: 17, lineHeight: 22, fontWeight: "600", letterSpacing: -0.2 },
|
|
20
|
+
body: { fontSize: 15, lineHeight: 22 },
|
|
21
|
+
label: { fontSize: 14, lineHeight: 20, fontWeight: "500" },
|
|
22
|
+
input: { fontSize: 16, lineHeight: 22 },
|
|
23
|
+
action: { fontSize: 15, lineHeight: 20, fontWeight: "600" },
|
|
24
|
+
meta: { fontSize: 13, lineHeight: 18 },
|
|
25
|
+
};
|
|
26
|
+
function lift(tokens, depth) {
|
|
27
|
+
return {
|
|
28
|
+
shadowColor: tokens.shadow,
|
|
29
|
+
shadowOffset: { width: 0, height: depth * 6 },
|
|
30
|
+
shadowOpacity: tokens.shadowOpacity,
|
|
31
|
+
shadowRadius: depth * 10,
|
|
32
|
+
elevation: depth * 6,
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
function createStyles(t) {
|
|
36
|
+
const field = { borderRadius: t.radius.field, borderWidth: 1, borderColor: t.input, backgroundColor: t.background };
|
|
37
|
+
return react_native_1.StyleSheet.create({
|
|
38
|
+
launcher: {
|
|
39
|
+
position: "absolute",
|
|
40
|
+
bottom: LAUNCHER_BOTTOM,
|
|
41
|
+
maxWidth: "70%",
|
|
42
|
+
minHeight: TOUCH,
|
|
43
|
+
justifyContent: "center",
|
|
44
|
+
paddingHorizontal: 18,
|
|
45
|
+
borderRadius: t.radius.button,
|
|
46
|
+
backgroundColor: t.accent,
|
|
47
|
+
...lift(t, 1),
|
|
48
|
+
},
|
|
49
|
+
launcherRight: { right: SPACE.panel },
|
|
50
|
+
launcherLeft: { left: SPACE.panel },
|
|
51
|
+
launcherPressed: { opacity: 0.88, transform: [{ scale: 0.97 }] },
|
|
52
|
+
launcherLabel: { ...TYPE.action, color: t.accentText },
|
|
53
|
+
sheetRoot: { flex: 1, justifyContent: "flex-end" },
|
|
54
|
+
// Explicit edges: `absoluteFillObject` is gone in RN 0.86 and `absoluteFill` changed shape across versions.
|
|
55
|
+
scrim: { position: "absolute", top: 0, right: 0, bottom: 0, left: 0, backgroundColor: t.scrim },
|
|
56
|
+
sheet: {
|
|
57
|
+
maxHeight: "90%",
|
|
58
|
+
borderTopLeftRadius: t.radius.panel,
|
|
59
|
+
borderTopRightRadius: t.radius.panel,
|
|
60
|
+
borderTopWidth: 1,
|
|
61
|
+
borderColor: t.border,
|
|
62
|
+
backgroundColor: t.background,
|
|
63
|
+
...lift(t, 2),
|
|
64
|
+
},
|
|
65
|
+
sheetContent: { padding: SPACE.panel, paddingBottom: SHEET_BOTTOM },
|
|
66
|
+
card: {
|
|
67
|
+
padding: SPACE.panel,
|
|
68
|
+
borderRadius: t.radius.panel,
|
|
69
|
+
borderWidth: 1,
|
|
70
|
+
borderColor: t.border,
|
|
71
|
+
backgroundColor: t.background,
|
|
72
|
+
},
|
|
73
|
+
title: { ...TYPE.title, color: t.text },
|
|
74
|
+
description: { ...TYPE.body, marginTop: SPACE.hair, marginBottom: SPACE.group, color: t.mutedText },
|
|
75
|
+
field: { marginBottom: SPACE.group },
|
|
76
|
+
label: { ...TYPE.label, marginBottom: SPACE.tight, color: t.text },
|
|
77
|
+
input: {
|
|
78
|
+
...field,
|
|
79
|
+
...TYPE.input,
|
|
80
|
+
minHeight: TOUCH,
|
|
81
|
+
paddingHorizontal: SPACE.block,
|
|
82
|
+
paddingVertical: 10,
|
|
83
|
+
color: t.text,
|
|
84
|
+
},
|
|
85
|
+
multiline: { minHeight: 120, textAlignVertical: "top" },
|
|
86
|
+
multilineShort: { minHeight: 72, textAlignVertical: "top" },
|
|
87
|
+
inputFocused: { borderColor: t.accent },
|
|
88
|
+
inputInvalid: { borderColor: t.danger },
|
|
89
|
+
fieldFoot: { flexDirection: "row", gap: SPACE.block, marginTop: SPACE.tight },
|
|
90
|
+
error: { ...TYPE.meta, flex: 1, color: t.danger },
|
|
91
|
+
meta: { ...TYPE.meta, color: t.mutedText, fontVariant: ["tabular-nums"] },
|
|
92
|
+
end: { marginStart: "auto" },
|
|
93
|
+
tools: { flexDirection: "row", alignItems: "center", gap: SPACE.block },
|
|
94
|
+
hint: { ...TYPE.meta, marginTop: SPACE.tight, color: t.mutedText },
|
|
95
|
+
strip: { flexDirection: "row", flexWrap: "wrap", gap: SPACE.block, marginTop: SPACE.block },
|
|
96
|
+
thumb: {
|
|
97
|
+
width: 72,
|
|
98
|
+
height: 72,
|
|
99
|
+
borderRadius: Math.min(t.radius.field, 8),
|
|
100
|
+
borderWidth: 1,
|
|
101
|
+
borderColor: t.imageEdge,
|
|
102
|
+
backgroundColor: t.surface,
|
|
103
|
+
},
|
|
104
|
+
removeBadge: {
|
|
105
|
+
position: "absolute",
|
|
106
|
+
top: -SPACE.tight,
|
|
107
|
+
end: -SPACE.tight,
|
|
108
|
+
width: 24,
|
|
109
|
+
height: 24,
|
|
110
|
+
alignItems: "center",
|
|
111
|
+
justifyContent: "center",
|
|
112
|
+
borderRadius: 12,
|
|
113
|
+
borderWidth: 2,
|
|
114
|
+
borderColor: t.background,
|
|
115
|
+
backgroundColor: t.text,
|
|
116
|
+
},
|
|
117
|
+
removePressed: { backgroundColor: t.danger },
|
|
118
|
+
status: { ...TYPE.meta, marginBottom: SPACE.block, color: t.mutedText },
|
|
119
|
+
statusError: { color: t.danger },
|
|
120
|
+
actions: { flexDirection: "row", justifyContent: "flex-end", gap: SPACE.gap },
|
|
121
|
+
button: {
|
|
122
|
+
minHeight: TOUCH,
|
|
123
|
+
minWidth: TOUCH,
|
|
124
|
+
alignItems: "center",
|
|
125
|
+
justifyContent: "center",
|
|
126
|
+
paddingHorizontal: 18,
|
|
127
|
+
borderRadius: t.radius.button,
|
|
128
|
+
borderWidth: 1,
|
|
129
|
+
borderColor: "transparent",
|
|
130
|
+
},
|
|
131
|
+
primary: { backgroundColor: t.accent },
|
|
132
|
+
primaryPressed: { opacity: 0.88 },
|
|
133
|
+
secondary: { borderColor: t.input, backgroundColor: t.background },
|
|
134
|
+
secondaryPressed: { backgroundColor: t.surface },
|
|
135
|
+
ghost: { backgroundColor: "transparent" },
|
|
136
|
+
ghostPressed: { backgroundColor: t.hover },
|
|
137
|
+
disabled: { opacity: 0.5 },
|
|
138
|
+
buttonLabel: { ...TYPE.action, color: t.text },
|
|
139
|
+
primaryLabel: { color: t.accentText },
|
|
140
|
+
thanks: { ...TYPE.body, paddingVertical: SPACE.group, color: t.text },
|
|
141
|
+
surveyDock: { position: "absolute", left: SPACE.group, right: SPACE.group, pointerEvents: "box-none" },
|
|
142
|
+
dockLow: { bottom: LAUNCHER_BOTTOM },
|
|
143
|
+
dockRaised: { bottom: SURVEY_ABOVE_LAUNCHER },
|
|
144
|
+
dockStart: { alignItems: "flex-start" },
|
|
145
|
+
dockEnd: { alignItems: "flex-end" },
|
|
146
|
+
surveyCard: {
|
|
147
|
+
width: "100%",
|
|
148
|
+
maxWidth: 400,
|
|
149
|
+
padding: SPACE.group,
|
|
150
|
+
borderRadius: t.radius.panel,
|
|
151
|
+
borderWidth: 1,
|
|
152
|
+
borderColor: t.border,
|
|
153
|
+
backgroundColor: t.background,
|
|
154
|
+
...lift(t, 2),
|
|
155
|
+
},
|
|
156
|
+
question: { ...TYPE.label, fontWeight: "600", marginBottom: SPACE.block, color: t.text },
|
|
157
|
+
scale: { flexDirection: "row", gap: SPACE.hair },
|
|
158
|
+
score: { ...field, flex: 1, minHeight: TOUCH, alignItems: "center", justifyContent: "center" },
|
|
159
|
+
scoreSelected: { borderColor: t.accent, backgroundColor: t.accent },
|
|
160
|
+
scorePressed: { backgroundColor: t.surface },
|
|
161
|
+
scoreLabel: { ...TYPE.label, color: t.text, fontVariant: ["tabular-nums"] },
|
|
162
|
+
scoreLabelSelected: { color: t.accentText },
|
|
163
|
+
anchors: { flexDirection: "row", justifyContent: "space-between", gap: SPACE.gap, marginTop: SPACE.tight },
|
|
164
|
+
anchorGap: { marginBottom: SPACE.block },
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
/** Resolves the widget theme (light/dark/auto) against the device scheme into tokens and styles. */
|
|
168
|
+
function useFeedbackTheme(config) {
|
|
169
|
+
const system = (0, react_native_1.useColorScheme)();
|
|
170
|
+
const systemScheme = system === "dark" || system === "light" ? system : null;
|
|
171
|
+
return (0, react_1.useMemo)(() => {
|
|
172
|
+
if (config === null)
|
|
173
|
+
return null;
|
|
174
|
+
const tokens = (0, tokens_1.resolveTokens)(config, (0, theme_1.resolveScheme)(config.theme, systemScheme));
|
|
175
|
+
return { tokens, styles: createStyles(tokens) };
|
|
176
|
+
}, [config, systemScheme]);
|
|
177
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Scheme, WidgetConfig } from "../core/config";
|
|
2
|
+
import type { Palette } from "../core/theme";
|
|
3
|
+
export type Tokens = Palette & Readonly<{
|
|
4
|
+
scheme: Scheme;
|
|
5
|
+
input: string;
|
|
6
|
+
danger: string;
|
|
7
|
+
scrim: string;
|
|
8
|
+
surface: string;
|
|
9
|
+
hover: string;
|
|
10
|
+
imageEdge: string;
|
|
11
|
+
shadow: string;
|
|
12
|
+
shadowOpacity: number;
|
|
13
|
+
}>;
|
|
14
|
+
/** `color-mix(in srgb, foreground weight, background)` for `#rrggbb` inputs; falls back to the background. */
|
|
15
|
+
export declare function mixHex(foreground: string, background: string, weight: number): string;
|
|
16
|
+
export declare function resolveTokens(config: WidgetConfig, scheme: Scheme): Tokens;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.mixHex = mixHex;
|
|
4
|
+
exports.resolveTokens = resolveTokens;
|
|
5
|
+
const theme_1 = require("../core/theme");
|
|
6
|
+
// Mirrors the web widget's `:host` custom properties (public/js/feedback.js) for the roles the
|
|
7
|
+
// core palette does not carry: input outline, danger text, scrim, surface and pressed fills.
|
|
8
|
+
const SCHEME_TOKENS = {
|
|
9
|
+
light: {
|
|
10
|
+
input: "rgba(0,0,0,.14)",
|
|
11
|
+
danger: "#c9352b",
|
|
12
|
+
scrim: "rgba(8,9,10,.36)",
|
|
13
|
+
surface: "#faf8f5",
|
|
14
|
+
hover: "#ebe9e6",
|
|
15
|
+
imageEdge: "rgba(0,0,0,.1)",
|
|
16
|
+
shadow: "#000000",
|
|
17
|
+
shadowOpacity: 0.18,
|
|
18
|
+
},
|
|
19
|
+
dark: {
|
|
20
|
+
input: "rgba(255,255,255,.16)",
|
|
21
|
+
danger: "#f87171",
|
|
22
|
+
scrim: "rgba(0,0,0,.6)",
|
|
23
|
+
surface: "#1f2025",
|
|
24
|
+
hover: "#2a2c33",
|
|
25
|
+
imageEdge: "rgba(255,255,255,.1)",
|
|
26
|
+
shadow: "#000000",
|
|
27
|
+
shadowOpacity: 0.5,
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
function channels(hex) {
|
|
31
|
+
if (!/^#[0-9a-f]{6}$/i.test(hex))
|
|
32
|
+
return null;
|
|
33
|
+
const read = (start) => Number.parseInt(hex.slice(start, start + 2), 16);
|
|
34
|
+
return [read(1), read(3), read(5)];
|
|
35
|
+
}
|
|
36
|
+
/** `color-mix(in srgb, foreground weight, background)` for `#rrggbb` inputs; falls back to the background. */
|
|
37
|
+
function mixHex(foreground, background, weight) {
|
|
38
|
+
const fg = channels(foreground);
|
|
39
|
+
const bg = channels(background);
|
|
40
|
+
if (fg === null || bg === null)
|
|
41
|
+
return background;
|
|
42
|
+
const mix = (index) => Math.round(fg[index] * weight + bg[index] * (1 - weight))
|
|
43
|
+
.toString(16)
|
|
44
|
+
.padStart(2, "0");
|
|
45
|
+
return `#${mix(0)}${mix(1)}${mix(2)}`;
|
|
46
|
+
}
|
|
47
|
+
function resolveTokens(config, scheme) {
|
|
48
|
+
const palette = (0, theme_1.resolvePalette)(config, scheme);
|
|
49
|
+
const overrides = config.appearance[scheme];
|
|
50
|
+
const base = SCHEME_TOKENS[scheme];
|
|
51
|
+
// Same derivation as the web widget: a custom background re-tints the surface/pressed fills,
|
|
52
|
+
// a custom border also outlines the inputs.
|
|
53
|
+
const tinted = overrides.background !== undefined;
|
|
54
|
+
return {
|
|
55
|
+
...palette,
|
|
56
|
+
...base,
|
|
57
|
+
scheme,
|
|
58
|
+
input: overrides.border ?? base.input,
|
|
59
|
+
surface: tinted ? mixHex(palette.text, palette.background, 0.04) : base.surface,
|
|
60
|
+
hover: tinted ? mixHex(palette.text, palette.background, 0.09) : base.hover,
|
|
61
|
+
};
|
|
62
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { RefObject } from "react";
|
|
2
|
+
import type { Survey } from "../core/config";
|
|
3
|
+
import type { FeedbackStorage } from "./storage";
|
|
4
|
+
export type SurveySlot = Readonly<{
|
|
5
|
+
survey: Survey | null;
|
|
6
|
+
dismiss: () => void;
|
|
7
|
+
}>;
|
|
8
|
+
/**
|
|
9
|
+
* Same rules as the web widget's scheduleSurvey: path match, cooldown from storage, sample rate,
|
|
10
|
+
* then `delaySeconds`. Re-evaluated whenever the screen changes; shown at most once per provider.
|
|
11
|
+
*/
|
|
12
|
+
export declare function useSurvey(survey: Survey | null, screen: string, storage: RefObject<FeedbackStorage>): SurveySlot;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useSurvey = useSurvey;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const survey_1 = require("../core/survey");
|
|
6
|
+
const prop_state_1 = require("./prop-state");
|
|
7
|
+
const storage_1 = require("./storage");
|
|
8
|
+
async function remember(storage, survey) {
|
|
9
|
+
const error = await (0, storage_1.writeStorage)(storage, (0, survey_1.surveyStorageKey)(survey.id), String(Date.now()));
|
|
10
|
+
if (error !== null)
|
|
11
|
+
(0, prop_state_1.devWarn)(`survey storage write failed: ${error.message}`);
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Same rules as the web widget's scheduleSurvey: path match, cooldown from storage, sample rate,
|
|
15
|
+
* then `delaySeconds`. Re-evaluated whenever the screen changes; shown at most once per provider.
|
|
16
|
+
*/
|
|
17
|
+
function useSurvey(survey, screen, storage) {
|
|
18
|
+
const [active, setActive] = (0, react_1.useState)(null);
|
|
19
|
+
const shown = (0, react_1.useRef)(new Set());
|
|
20
|
+
(0, react_1.useEffect)(() => {
|
|
21
|
+
if (survey === null || shown.current.has(survey.id))
|
|
22
|
+
return;
|
|
23
|
+
let live = true;
|
|
24
|
+
let timer;
|
|
25
|
+
async function schedule(target) {
|
|
26
|
+
const read = await (0, storage_1.readStorage)(storage.current, (0, survey_1.surveyStorageKey)(target.id));
|
|
27
|
+
if (!live)
|
|
28
|
+
return;
|
|
29
|
+
if (!read.ok)
|
|
30
|
+
return (0, prop_state_1.devWarn)(`survey storage read failed: ${read.error.message}`);
|
|
31
|
+
const now = Date.now();
|
|
32
|
+
if (!(0, survey_1.isSurveyEligible)({ survey: target, screen, lastShown: read.value, now, random: Math.random() }))
|
|
33
|
+
return;
|
|
34
|
+
timer = setTimeout(() => {
|
|
35
|
+
shown.current = new Set([...shown.current, target.id]);
|
|
36
|
+
void remember(storage.current, target);
|
|
37
|
+
setActive(target);
|
|
38
|
+
}, target.delaySeconds * 1000);
|
|
39
|
+
}
|
|
40
|
+
void schedule(survey);
|
|
41
|
+
return () => {
|
|
42
|
+
live = false;
|
|
43
|
+
clearTimeout(timer);
|
|
44
|
+
};
|
|
45
|
+
}, [survey, screen, storage]);
|
|
46
|
+
const dismiss = (0, react_1.useCallback)(() => {
|
|
47
|
+
if (active !== null)
|
|
48
|
+
void remember(storage.current, active);
|
|
49
|
+
setActive(null);
|
|
50
|
+
}, [active, storage]);
|
|
51
|
+
return { survey: active, dismiss };
|
|
52
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,36 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@the-seeker/feedback-react-native",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"main": "dist/index.js",
|
|
5
|
+
"types": "dist/index.d.ts",
|
|
6
|
+
"react-native": "dist/index.js",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist",
|
|
9
|
+
"README.md"
|
|
10
|
+
],
|
|
11
|
+
"publishConfig": {
|
|
12
|
+
"access": "public"
|
|
13
|
+
},
|
|
14
|
+
"sideEffects": false,
|
|
15
|
+
"license": "MIT",
|
|
16
|
+
"scripts": {
|
|
17
|
+
"build": "tsc -p tsconfig.build.json",
|
|
18
|
+
"typecheck": "tsc --noEmit",
|
|
19
|
+
"test": "vitest run",
|
|
20
|
+
"prepublishOnly": "npm run typecheck && npm test && npm run build"
|
|
21
|
+
},
|
|
22
|
+
"peerDependencies": {
|
|
23
|
+
"react": ">=18",
|
|
24
|
+
"react-native": ">=0.74"
|
|
25
|
+
},
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"zod": "^4"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"typescript": "^5",
|
|
31
|
+
"vitest": "^4.1.11",
|
|
32
|
+
"@types/react": "^19",
|
|
33
|
+
"react": "19.2.3",
|
|
34
|
+
"react-native": "0.86.x"
|
|
35
|
+
}
|
|
36
|
+
}
|