@mrmeg/expo-ui 0.1.0 → 0.1.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/README.md +134 -2
- package/dist/components/Accordion.js +4 -4
- package/dist/components/AnimatedView.js +1 -1
- package/dist/components/Badge.js +3 -3
- package/dist/components/BottomSheet.js +4 -4
- package/dist/components/Button.js +31 -15
- package/dist/components/Card.js +4 -4
- package/dist/components/Checkbox.js +5 -5
- package/dist/components/Collapsible.js +3 -3
- package/dist/components/Dialog.js +6 -6
- package/dist/components/Drawer.js +4 -4
- package/dist/components/DropdownMenu.js +5 -5
- package/dist/components/EmptyState.js +5 -5
- package/dist/components/ErrorBoundary.d.ts +4 -0
- package/dist/components/ErrorBoundary.js +1 -9
- package/dist/components/Icon.js +1 -1
- package/dist/components/InputOTP.js +4 -4
- package/dist/components/Label.js +4 -4
- package/dist/components/MaxWidthContainer.js +1 -1
- package/dist/components/Notification.js +6 -6
- package/dist/components/Popover.js +5 -5
- package/dist/components/Progress.js +2 -2
- package/dist/components/RadioGroup.js +4 -4
- package/dist/components/Select.js +6 -6
- package/dist/components/Separator.js +2 -2
- package/dist/components/Skeleton.js +3 -3
- package/dist/components/Slider.js +4 -4
- package/dist/components/StatusBar.js +1 -1
- package/dist/components/StyledText.js +2 -2
- package/dist/components/Switch.js +6 -6
- package/dist/components/Tabs.js +4 -4
- package/dist/components/TextInput.js +7 -7
- package/dist/components/Toggle.js +5 -5
- package/dist/components/ToggleGroup.js +4 -4
- package/dist/components/Tooltip.js +5 -5
- package/dist/components/index.js +35 -35
- package/dist/constants/colors.js +5 -5
- package/dist/constants/fonts.js +75 -71
- package/dist/constants/index.js +3 -3
- package/dist/hooks/index.js +6 -6
- package/dist/hooks/useScalePress.js +1 -1
- package/dist/hooks/useTheme.js +3 -3
- package/dist/index.js +5 -5
- package/dist/lib/index.d.ts +0 -1
- package/dist/lib/index.js +2 -3
- package/dist/state/index.js +2 -2
- package/package.json +52 -34
- package/dist/lib/sentry.d.ts +0 -16
- package/dist/lib/sentry.js +0 -55
package/dist/lib/sentry.js
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Sentry error tracking wrapper.
|
|
3
|
-
*
|
|
4
|
-
* Zero-impact when EXPO_PUBLIC_SENTRY_DSN is not set — no network requests,
|
|
5
|
-
* no global handlers, and no Sentry code in the entry bundle.
|
|
6
|
-
*/
|
|
7
|
-
let initialized = false;
|
|
8
|
-
let sentryModulePromise = null;
|
|
9
|
-
function loadSentry() {
|
|
10
|
-
const dsn = process.env.EXPO_PUBLIC_SENTRY_DSN;
|
|
11
|
-
if (!dsn) {
|
|
12
|
-
if (__DEV__) {
|
|
13
|
-
console.log("Sentry disabled — no EXPO_PUBLIC_SENTRY_DSN set");
|
|
14
|
-
}
|
|
15
|
-
return Promise.resolve(null);
|
|
16
|
-
}
|
|
17
|
-
sentryModulePromise ??= import("@sentry/react-native").then((Sentry) => {
|
|
18
|
-
Sentry.init({
|
|
19
|
-
dsn,
|
|
20
|
-
debug: __DEV__,
|
|
21
|
-
enabled: true,
|
|
22
|
-
environment: __DEV__ ? "development" : "production",
|
|
23
|
-
tracesSampleRate: __DEV__ ? 1.0 : 0.2,
|
|
24
|
-
});
|
|
25
|
-
return Sentry;
|
|
26
|
-
});
|
|
27
|
-
return sentryModulePromise;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Initialize Sentry. Call once at app startup (module scope in _layout.tsx).
|
|
31
|
-
* No-op if sentryDsn is empty.
|
|
32
|
-
*/
|
|
33
|
-
export function setupSentry() {
|
|
34
|
-
if (initialized)
|
|
35
|
-
return;
|
|
36
|
-
initialized = true;
|
|
37
|
-
loadSentry().catch((error) => {
|
|
38
|
-
if (__DEV__) {
|
|
39
|
-
console.warn("Sentry failed to initialize:", error);
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Capture an exception after the optional Sentry bundle has loaded.
|
|
45
|
-
* No-op when Sentry is disabled or failed to initialize.
|
|
46
|
-
*/
|
|
47
|
-
export function captureException(error, context) {
|
|
48
|
-
loadSentry().then((Sentry) => {
|
|
49
|
-
Sentry?.captureException(error, context);
|
|
50
|
-
}).catch((loadError) => {
|
|
51
|
-
if (__DEV__) {
|
|
52
|
-
console.warn("Sentry capture skipped:", loadError);
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
}
|