@shakenbake/react-native 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/dist/ShakeNbakeProvider.d.ts +26 -0
- package/dist/ShakeNbakeProvider.d.ts.map +1 -0
- package/dist/ShakeNbakeProvider.js +338 -0
- package/dist/ShakeNbakeProvider.js.map +1 -0
- package/dist/__tests__/capture.test.d.ts +2 -0
- package/dist/__tests__/capture.test.d.ts.map +1 -0
- package/dist/__tests__/capture.test.js +93 -0
- package/dist/__tests__/capture.test.js.map +1 -0
- package/dist/__tests__/collectors.test.d.ts +2 -0
- package/dist/__tests__/collectors.test.d.ts.map +1 -0
- package/dist/__tests__/collectors.test.js +212 -0
- package/dist/__tests__/collectors.test.js.map +1 -0
- package/dist/__tests__/drawing-canvas.test.d.ts +2 -0
- package/dist/__tests__/drawing-canvas.test.d.ts.map +1 -0
- package/dist/__tests__/drawing-canvas.test.js +503 -0
- package/dist/__tests__/drawing-canvas.test.js.map +1 -0
- package/dist/__tests__/provider.test.d.ts +2 -0
- package/dist/__tests__/provider.test.d.ts.map +1 -0
- package/dist/__tests__/provider.test.js +431 -0
- package/dist/__tests__/provider.test.js.map +1 -0
- package/dist/__tests__/report-form.test.d.ts +2 -0
- package/dist/__tests__/report-form.test.d.ts.map +1 -0
- package/dist/__tests__/report-form.test.js +178 -0
- package/dist/__tests__/report-form.test.js.map +1 -0
- package/dist/__tests__/triggers.test.d.ts +2 -0
- package/dist/__tests__/triggers.test.d.ts.map +1 -0
- package/dist/__tests__/triggers.test.js +53 -0
- package/dist/__tests__/triggers.test.js.map +1 -0
- package/dist/annotate/DrawingCanvas.d.ts +13 -0
- package/dist/annotate/DrawingCanvas.d.ts.map +1 -0
- package/dist/annotate/DrawingCanvas.js +475 -0
- package/dist/annotate/DrawingCanvas.js.map +1 -0
- package/dist/annotate/types.d.ts +72 -0
- package/dist/annotate/types.d.ts.map +1 -0
- package/dist/annotate/types.js +34 -0
- package/dist/annotate/types.js.map +1 -0
- package/dist/annotate/useDrawingOperations.d.ts +88 -0
- package/dist/annotate/useDrawingOperations.d.ts.map +1 -0
- package/dist/annotate/useDrawingOperations.js +186 -0
- package/dist/annotate/useDrawingOperations.js.map +1 -0
- package/dist/capture/screenshot.d.ts +31 -0
- package/dist/capture/screenshot.d.ts.map +1 -0
- package/dist/capture/screenshot.js +90 -0
- package/dist/capture/screenshot.js.map +1 -0
- package/dist/context/collectors.d.ts +25 -0
- package/dist/context/collectors.d.ts.map +1 -0
- package/dist/context/collectors.js +244 -0
- package/dist/context/collectors.js.map +1 -0
- package/dist/hooks/useShakeNbake.d.ts +28 -0
- package/dist/hooks/useShakeNbake.d.ts.map +1 -0
- package/dist/hooks/useShakeNbake.js +30 -0
- package/dist/hooks/useShakeNbake.js.map +1 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +49 -0
- package/dist/index.js.map +1 -0
- package/dist/triggers/shake.d.ts +16 -0
- package/dist/triggers/shake.d.ts.map +1 -0
- package/dist/triggers/shake.js +41 -0
- package/dist/triggers/shake.js.map +1 -0
- package/dist/ui/ReportForm.d.ts +33 -0
- package/dist/ui/ReportForm.d.ts.map +1 -0
- package/dist/ui/ReportForm.js +608 -0
- package/dist/ui/ReportForm.js.map +1 -0
- package/dist/ui/form-validation.d.ts +26 -0
- package/dist/ui/form-validation.d.ts.map +1 -0
- package/dist/ui/form-validation.js +44 -0
- package/dist/ui/form-validation.js.map +1 -0
- package/dist/ui/state-machine.d.ts +70 -0
- package/dist/ui/state-machine.d.ts.map +1 -0
- package/dist/ui/state-machine.js +107 -0
- package/dist/ui/state-machine.js.map +1 -0
- package/package.json +57 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// ---------------------------------------------------------------------------
|
|
3
|
+
// @shakenbake/react-native — Report form validation
|
|
4
|
+
//
|
|
5
|
+
// Pure functions for validating report form input. Extracted so they can be
|
|
6
|
+
// unit-tested without React or React Native dependencies.
|
|
7
|
+
// ---------------------------------------------------------------------------
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.validateTitle = validateTitle;
|
|
10
|
+
exports.validateForm = validateForm;
|
|
11
|
+
exports.isFormValid = isFormValid;
|
|
12
|
+
/**
|
|
13
|
+
* Validates the title field.
|
|
14
|
+
* - Required (non-empty after trim)
|
|
15
|
+
* - Minimum 3 characters after trim
|
|
16
|
+
*/
|
|
17
|
+
function validateTitle(title) {
|
|
18
|
+
const trimmed = title.trim();
|
|
19
|
+
if (trimmed.length === 0) {
|
|
20
|
+
return { field: 'title', message: 'Title is required' };
|
|
21
|
+
}
|
|
22
|
+
if (trimmed.length < 3) {
|
|
23
|
+
return { field: 'title', message: 'Title must be at least 3 characters' };
|
|
24
|
+
}
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Validates the complete form. Returns an array of field errors (empty = valid).
|
|
29
|
+
*/
|
|
30
|
+
function validateForm(fields) {
|
|
31
|
+
const errors = [];
|
|
32
|
+
const titleError = validateTitle(fields.title);
|
|
33
|
+
if (titleError) {
|
|
34
|
+
errors.push(titleError);
|
|
35
|
+
}
|
|
36
|
+
return errors;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Returns true if the form is valid for submission.
|
|
40
|
+
*/
|
|
41
|
+
function isFormValid(fields) {
|
|
42
|
+
return validateForm(fields).length === 0;
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=form-validation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-validation.js","sourceRoot":"","sources":["../../src/ui/form-validation.ts"],"names":[],"mappings":";AAAA,8EAA8E;AAC9E,oDAAoD;AACpD,EAAE;AACF,4EAA4E;AAC5E,0DAA0D;AAC1D,8EAA8E;;AAe9E,sCASC;AAKD,oCASC;AAKD,kCAEC;AAnCD;;;;GAIG;AACH,SAAgB,aAAa,CAAC,KAAa;IACzC,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;IAC7B,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACzB,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,mBAAmB,EAAE,CAAC;IAC1D,CAAC;IACD,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACvB,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,qCAAqC,EAAE,CAAC;IAC5E,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;GAEG;AACH,SAAgB,YAAY,CAAC,MAE5B;IACC,MAAM,MAAM,GAAiB,EAAE,CAAC;IAChC,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAC/C,IAAI,UAAU,EAAE,CAAC;QACf,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAC1B,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;GAEG;AACH,SAAgB,WAAW,CAAC,MAAyB;IACnD,OAAO,YAAY,CAAC,MAAM,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC;AAC3C,CAAC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { CaptureResult, SubmitResult, DeviceContext } from '@shakenbake/core';
|
|
2
|
+
/**
|
|
3
|
+
* States in the bug-reporting flow.
|
|
4
|
+
*/
|
|
5
|
+
export type FlowStep = 'idle' | 'triggered' | 'capturing' | 'annotating' | 'form' | 'submitting' | 'success' | 'error';
|
|
6
|
+
/**
|
|
7
|
+
* Data carried through the flow.
|
|
8
|
+
*/
|
|
9
|
+
export interface FlowData {
|
|
10
|
+
captureResult?: CaptureResult;
|
|
11
|
+
annotatedScreenshot?: string;
|
|
12
|
+
originalScreenshot?: string;
|
|
13
|
+
context?: Partial<DeviceContext>;
|
|
14
|
+
submitResult?: SubmitResult;
|
|
15
|
+
error?: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Complete flow state.
|
|
19
|
+
*/
|
|
20
|
+
export interface FlowState {
|
|
21
|
+
step: FlowStep;
|
|
22
|
+
data: FlowData;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Actions that can transition the flow state.
|
|
26
|
+
*/
|
|
27
|
+
export type FlowAction = {
|
|
28
|
+
type: 'TRIGGER';
|
|
29
|
+
} | {
|
|
30
|
+
type: 'CAPTURE_START';
|
|
31
|
+
} | {
|
|
32
|
+
type: 'CAPTURE_DONE';
|
|
33
|
+
captureResult: CaptureResult;
|
|
34
|
+
context: Partial<DeviceContext>;
|
|
35
|
+
} | {
|
|
36
|
+
type: 'CAPTURE_ERROR';
|
|
37
|
+
error: string;
|
|
38
|
+
} | {
|
|
39
|
+
type: 'ANNOTATE_DONE';
|
|
40
|
+
annotatedScreenshot: string;
|
|
41
|
+
originalScreenshot: string;
|
|
42
|
+
} | {
|
|
43
|
+
type: 'ANNOTATE_CANCEL';
|
|
44
|
+
} | {
|
|
45
|
+
type: 'RE_ANNOTATE';
|
|
46
|
+
} | {
|
|
47
|
+
type: 'SUBMIT_START';
|
|
48
|
+
} | {
|
|
49
|
+
type: 'SUBMIT_DONE';
|
|
50
|
+
result: SubmitResult;
|
|
51
|
+
} | {
|
|
52
|
+
type: 'SUBMIT_ERROR';
|
|
53
|
+
error: string;
|
|
54
|
+
} | {
|
|
55
|
+
type: 'RETRY';
|
|
56
|
+
} | {
|
|
57
|
+
type: 'RESET';
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* Creates the initial idle state.
|
|
61
|
+
*/
|
|
62
|
+
export declare function createFlowState(): FlowState;
|
|
63
|
+
/**
|
|
64
|
+
* Pure reducer for the flow state machine.
|
|
65
|
+
*
|
|
66
|
+
* Returns a new FlowState given the current state and an action.
|
|
67
|
+
* Invalid transitions return the current state unchanged.
|
|
68
|
+
*/
|
|
69
|
+
export declare function flowReducer(state: FlowState, action: FlowAction): FlowState;
|
|
70
|
+
//# sourceMappingURL=state-machine.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"state-machine.d.ts","sourceRoot":"","sources":["../../src/ui/state-machine.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEnF;;GAEG;AACH,MAAM,MAAM,QAAQ,GAChB,MAAM,GACN,WAAW,GACX,WAAW,GACX,YAAY,GACZ,MAAM,GACN,YAAY,GACZ,SAAS,GACT,OAAO,CAAC;AAEZ;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,OAAO,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;IACjC,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,EAAE,QAAQ,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,MAAM,UAAU,GAClB;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,GACnB;IAAE,IAAI,EAAE,eAAe,CAAA;CAAE,GACzB;IAAE,IAAI,EAAE,cAAc,CAAC;IAAC,aAAa,EAAE,aAAa,CAAC;IAAC,OAAO,EAAE,OAAO,CAAC,aAAa,CAAC,CAAA;CAAE,GACvF;IAAE,IAAI,EAAE,eAAe,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GACxC;IAAE,IAAI,EAAE,eAAe,CAAC;IAAC,mBAAmB,EAAE,MAAM,CAAC;IAAC,kBAAkB,EAAE,MAAM,CAAA;CAAE,GAClF;IAAE,IAAI,EAAE,iBAAiB,CAAA;CAAE,GAC3B;IAAE,IAAI,EAAE,aAAa,CAAA;CAAE,GACvB;IAAE,IAAI,EAAE,cAAc,CAAA;CAAE,GACxB;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,MAAM,EAAE,YAAY,CAAA;CAAE,GAC7C;IAAE,IAAI,EAAE,cAAc,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GACvC;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,GACjB;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,CAAC;AAEtB;;GAEG;AACH,wBAAgB,eAAe,IAAI,SAAS,CAE3C;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,GAAG,SAAS,CAoF3E"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// ---------------------------------------------------------------------------
|
|
3
|
+
// @shakenbake/react-native — ShakeNbake flow state machine
|
|
4
|
+
//
|
|
5
|
+
// Pure state machine logic for the bug-reporting flow. Extracted from the
|
|
6
|
+
// provider so it can be unit-tested without React or React Native.
|
|
7
|
+
// ---------------------------------------------------------------------------
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.createFlowState = createFlowState;
|
|
10
|
+
exports.flowReducer = flowReducer;
|
|
11
|
+
/**
|
|
12
|
+
* Creates the initial idle state.
|
|
13
|
+
*/
|
|
14
|
+
function createFlowState() {
|
|
15
|
+
return { step: 'idle', data: {} };
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Pure reducer for the flow state machine.
|
|
19
|
+
*
|
|
20
|
+
* Returns a new FlowState given the current state and an action.
|
|
21
|
+
* Invalid transitions return the current state unchanged.
|
|
22
|
+
*/
|
|
23
|
+
function flowReducer(state, action) {
|
|
24
|
+
switch (action.type) {
|
|
25
|
+
case 'TRIGGER':
|
|
26
|
+
if (state.step !== 'idle')
|
|
27
|
+
return state;
|
|
28
|
+
return { step: 'triggered', data: {} };
|
|
29
|
+
case 'CAPTURE_START':
|
|
30
|
+
if (state.step !== 'triggered')
|
|
31
|
+
return state;
|
|
32
|
+
return { step: 'capturing', data: {} };
|
|
33
|
+
case 'CAPTURE_DONE':
|
|
34
|
+
if (state.step !== 'capturing')
|
|
35
|
+
return state;
|
|
36
|
+
return {
|
|
37
|
+
step: 'annotating',
|
|
38
|
+
data: {
|
|
39
|
+
captureResult: action.captureResult,
|
|
40
|
+
context: action.context,
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
case 'CAPTURE_ERROR':
|
|
44
|
+
if (state.step !== 'capturing')
|
|
45
|
+
return state;
|
|
46
|
+
return {
|
|
47
|
+
step: 'error',
|
|
48
|
+
data: { error: action.error },
|
|
49
|
+
};
|
|
50
|
+
case 'ANNOTATE_DONE':
|
|
51
|
+
if (state.step !== 'annotating')
|
|
52
|
+
return state;
|
|
53
|
+
return {
|
|
54
|
+
step: 'form',
|
|
55
|
+
data: {
|
|
56
|
+
...state.data,
|
|
57
|
+
annotatedScreenshot: action.annotatedScreenshot,
|
|
58
|
+
originalScreenshot: action.originalScreenshot,
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
case 'ANNOTATE_CANCEL':
|
|
62
|
+
if (state.step !== 'annotating')
|
|
63
|
+
return state;
|
|
64
|
+
return createFlowState();
|
|
65
|
+
case 'RE_ANNOTATE':
|
|
66
|
+
if (state.step !== 'form')
|
|
67
|
+
return state;
|
|
68
|
+
return {
|
|
69
|
+
step: 'annotating',
|
|
70
|
+
data: {
|
|
71
|
+
captureResult: state.data.captureResult,
|
|
72
|
+
context: state.data.context,
|
|
73
|
+
},
|
|
74
|
+
};
|
|
75
|
+
case 'SUBMIT_START':
|
|
76
|
+
if (state.step !== 'form')
|
|
77
|
+
return state;
|
|
78
|
+
return { step: 'submitting', data: { ...state.data } };
|
|
79
|
+
case 'SUBMIT_DONE':
|
|
80
|
+
if (state.step !== 'submitting')
|
|
81
|
+
return state;
|
|
82
|
+
return {
|
|
83
|
+
step: 'success',
|
|
84
|
+
data: { ...state.data, submitResult: action.result },
|
|
85
|
+
};
|
|
86
|
+
case 'SUBMIT_ERROR':
|
|
87
|
+
if (state.step !== 'submitting')
|
|
88
|
+
return state;
|
|
89
|
+
return {
|
|
90
|
+
step: 'error',
|
|
91
|
+
data: { ...state.data, error: action.error },
|
|
92
|
+
};
|
|
93
|
+
case 'RETRY':
|
|
94
|
+
if (state.step !== 'error')
|
|
95
|
+
return state;
|
|
96
|
+
// Return to form if we have screenshot data, otherwise reset
|
|
97
|
+
if (state.data.annotatedScreenshot) {
|
|
98
|
+
return { step: 'form', data: { ...state.data, error: undefined } };
|
|
99
|
+
}
|
|
100
|
+
return createFlowState();
|
|
101
|
+
case 'RESET':
|
|
102
|
+
return createFlowState();
|
|
103
|
+
default:
|
|
104
|
+
return state;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
//# sourceMappingURL=state-machine.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"state-machine.js","sourceRoot":"","sources":["../../src/ui/state-machine.ts"],"names":[],"mappings":";AAAA,8EAA8E;AAC9E,2DAA2D;AAC3D,EAAE;AACF,0EAA0E;AAC1E,mEAAmE;AACnE,8EAA8E;;AAyD9E,0CAEC;AAQD,kCAoFC;AAjGD;;GAEG;AACH,SAAgB,eAAe;IAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;AACpC,CAAC;AAED;;;;;GAKG;AACH,SAAgB,WAAW,CAAC,KAAgB,EAAE,MAAkB;IAC9D,QAAQ,MAAM,CAAC,IAAI,EAAE,CAAC;QACpB,KAAK,SAAS;YACZ,IAAI,KAAK,CAAC,IAAI,KAAK,MAAM;gBAAE,OAAO,KAAK,CAAC;YACxC,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;QAEzC,KAAK,eAAe;Y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6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"import": "./dist/index.js",
|
|
11
|
+
"default": "./dist/index.js"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"files": ["dist"],
|
|
15
|
+
"scripts": {
|
|
16
|
+
"build": "tsc",
|
|
17
|
+
"typecheck": "tsc --noEmit",
|
|
18
|
+
"lint": "echo 'lint placeholder'",
|
|
19
|
+
"test": "vitest run",
|
|
20
|
+
"dev": "tsc --watch",
|
|
21
|
+
"clean": "rm -rf dist *.tsbuildinfo"
|
|
22
|
+
},
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@shakenbake/core": "0.0.1"
|
|
25
|
+
},
|
|
26
|
+
"peerDependencies": {
|
|
27
|
+
"react": ">=18.0.0",
|
|
28
|
+
"react-native": ">=0.76.0",
|
|
29
|
+
"react-native-shake": ">=6.0.0",
|
|
30
|
+
"react-native-view-shot": ">=4.0.0",
|
|
31
|
+
"expo-device": ">=7.0.0",
|
|
32
|
+
"expo-network": ">=7.0.0",
|
|
33
|
+
"expo-battery": ">=9.0.0",
|
|
34
|
+
"expo-localization": ">=16.0.0",
|
|
35
|
+
"expo-constants": ">=17.0.0",
|
|
36
|
+
"expo-screen-orientation": ">=8.0.0",
|
|
37
|
+
"@react-native-community/netinfo": ">=11.0.0",
|
|
38
|
+
"@shopify/react-native-skia": ">=2.0.0"
|
|
39
|
+
},
|
|
40
|
+
"peerDependenciesMeta": {
|
|
41
|
+
"react-native-shake": { "optional": true },
|
|
42
|
+
"react-native-view-shot": { "optional": true },
|
|
43
|
+
"@shopify/react-native-skia": { "optional": true },
|
|
44
|
+
"expo-device": { "optional": true },
|
|
45
|
+
"expo-network": { "optional": true },
|
|
46
|
+
"expo-battery": { "optional": true },
|
|
47
|
+
"expo-localization": { "optional": true },
|
|
48
|
+
"expo-constants": { "optional": true },
|
|
49
|
+
"expo-screen-orientation": { "optional": true },
|
|
50
|
+
"@react-native-community/netinfo": { "optional": true }
|
|
51
|
+
},
|
|
52
|
+
"devDependencies": {
|
|
53
|
+
"@types/react": "^19.0.0",
|
|
54
|
+
"typescript": "^5.8.0",
|
|
55
|
+
"vitest": "^3.1.0"
|
|
56
|
+
}
|
|
57
|
+
}
|