@teardown/react-native 1.2.39 → 2.0.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.
Files changed (73) hide show
  1. package/README.md +75 -7
  2. package/package.json +65 -47
  3. package/src/clients/api/api.client.ts +55 -0
  4. package/src/clients/api/index.ts +1 -0
  5. package/src/clients/device/device.adpater-interface.ts +57 -0
  6. package/src/clients/device/device.client.test.ts +195 -0
  7. package/src/clients/device/device.client.ts +69 -0
  8. package/src/clients/device/expo-adapter.ts +128 -0
  9. package/src/clients/device/index.ts +4 -0
  10. package/src/clients/force-update/force-update.client.test.ts +296 -0
  11. package/src/clients/force-update/force-update.client.ts +224 -0
  12. package/src/clients/force-update/index.ts +1 -0
  13. package/src/clients/identity/identity.client.test.ts +454 -0
  14. package/src/clients/identity/identity.client.ts +249 -0
  15. package/src/clients/identity/index.ts +1 -0
  16. package/src/clients/logging/index.ts +1 -0
  17. package/src/clients/logging/logging.client.ts +92 -0
  18. package/src/clients/notifications/notifications.client.ts +10 -0
  19. package/src/clients/storage/index.ts +1 -0
  20. package/src/clients/storage/mmkv-adapter.ts +23 -0
  21. package/src/clients/storage/storage.client.ts +75 -0
  22. package/src/clients/utils/index.ts +1 -0
  23. package/src/clients/utils/utils.client.ts +75 -0
  24. package/src/components/ui/button.tsx +0 -0
  25. package/src/components/ui/input.tsx +0 -0
  26. package/src/contexts/index.ts +1 -0
  27. package/src/contexts/teardown.context.ts +17 -0
  28. package/src/exports/expo.ts +1 -0
  29. package/src/exports/index.ts +16 -0
  30. package/src/exports/mmkv.ts +1 -0
  31. package/src/hooks/use-force-update.ts +38 -0
  32. package/src/hooks/use-session.ts +26 -0
  33. package/src/providers/teardown.provider.tsx +28 -0
  34. package/src/teardown.core.ts +76 -0
  35. package/dist/components/index.d.ts +0 -1
  36. package/dist/components/index.js +0 -3
  37. package/dist/components/index.js.map +0 -1
  38. package/dist/components/teardown-logo.d.ts +0 -4
  39. package/dist/components/teardown-logo.js +0 -35
  40. package/dist/components/teardown-logo.js.map +0 -1
  41. package/dist/containers/index.d.ts +0 -1
  42. package/dist/containers/index.js +0 -18
  43. package/dist/containers/index.js.map +0 -1
  44. package/dist/containers/teardown.container.d.ts +0 -8
  45. package/dist/containers/teardown.container.js +0 -26
  46. package/dist/containers/teardown.container.js.map +0 -1
  47. package/dist/index.d.ts +0 -2
  48. package/dist/index.js +0 -22
  49. package/dist/index.js.map +0 -1
  50. package/dist/plugins/http.plugin.d.ts +0 -23
  51. package/dist/plugins/http.plugin.js +0 -145
  52. package/dist/plugins/http.plugin.js.map +0 -1
  53. package/dist/plugins/index.d.ts +0 -2
  54. package/dist/plugins/index.js +0 -20
  55. package/dist/plugins/index.js.map +0 -1
  56. package/dist/plugins/logging.plugin.d.ts +0 -9
  57. package/dist/plugins/logging.plugin.js +0 -36
  58. package/dist/plugins/logging.plugin.js.map +0 -1
  59. package/dist/plugins/websocket.plugin.d.ts +0 -1
  60. package/dist/plugins/websocket.plugin.js +0 -108
  61. package/dist/plugins/websocket.plugin.js.map +0 -1
  62. package/dist/services/index.d.ts +0 -1
  63. package/dist/services/index.js +0 -18
  64. package/dist/services/index.js.map +0 -1
  65. package/dist/services/teardown.service.d.ts +0 -10
  66. package/dist/services/teardown.service.js +0 -22
  67. package/dist/services/teardown.service.js.map +0 -1
  68. package/dist/teardown.client.d.ts +0 -41
  69. package/dist/teardown.client.js +0 -60
  70. package/dist/teardown.client.js.map +0 -1
  71. package/dist/utils/log.d.ts +0 -5
  72. package/dist/utils/log.js +0 -9
  73. package/dist/utils/log.js.map +0 -1
@@ -0,0 +1,92 @@
1
+ export type LogLevel = "none" | "error" | "warn" | "info" | "verbose";
2
+
3
+ const LOG_LEVEL_PRIORITY: Record<LogLevel, number> = {
4
+ none: 0,
5
+ error: 1,
6
+ warn: 2,
7
+ info: 3,
8
+ verbose: 4,
9
+ };
10
+
11
+ export type LoggingClientOptions = {
12
+ logLevel?: LogLevel;
13
+ };
14
+
15
+ export class LoggingClient {
16
+ private logLevel: LogLevel;
17
+
18
+ constructor(options?: LoggingClientOptions) {
19
+ this.logLevel = options?.logLevel ?? "none";
20
+ }
21
+
22
+ setLogLevel(level: LogLevel) {
23
+ this.logLevel = level;
24
+ }
25
+
26
+ getLogLevel(): LogLevel {
27
+ return this.logLevel;
28
+ }
29
+
30
+ shouldLog(level: LogLevel): boolean {
31
+ return LOG_LEVEL_PRIORITY[this.logLevel] >= LOG_LEVEL_PRIORITY[level];
32
+ }
33
+
34
+ createLogger(options: Omit<LoggerOptions, "loggingClient">): Logger {
35
+ return new Logger({
36
+ ...options,
37
+ loggingClient: this,
38
+ });
39
+ }
40
+ }
41
+
42
+ /**
43
+ * Configuration options for logger creation
44
+ */
45
+ export type LoggerOptions = {
46
+ /** Logger name used in log prefixes */
47
+ name: string;
48
+ /** Reference to parent LoggingClient for log level checks */
49
+ loggingClient: LoggingClient;
50
+ };
51
+
52
+ export class Logger {
53
+ /** Bound console methods to preserve call site */
54
+ private boundConsole = {
55
+ log: console.log.bind(console),
56
+ error: console.error.bind(console),
57
+ debug: console.debug.bind(console),
58
+ warn: console.warn.bind(console),
59
+ trace: console.trace.bind(console),
60
+ };
61
+
62
+ constructor(private readonly options: LoggerOptions) { }
63
+
64
+ get prefix() {
65
+ return `[Teardown:${this.options.name}]`;
66
+ }
67
+
68
+ info(message: string, ...args: unknown[]) {
69
+ if (!this.options.loggingClient.shouldLog("info")) return;
70
+ this.boundConsole.log(`${this.prefix} ${message}`, ...args);
71
+ }
72
+
73
+ error(message: string, ...args: unknown[]) {
74
+ if (!this.options.loggingClient.shouldLog("error")) return;
75
+ this.boundConsole.error(`${this.prefix} ${message}`, ...args);
76
+ }
77
+
78
+ debug(message: string, ...args: unknown[]) {
79
+ if (!this.options.loggingClient.shouldLog("verbose")) return;
80
+ this.boundConsole.debug(`${this.prefix} ${message}`, ...args);
81
+ }
82
+
83
+ warn(message: string, ...args: unknown[]) {
84
+ if (!this.options.loggingClient.shouldLog("warn")) return;
85
+ this.boundConsole.warn(`${this.prefix} ${message}`, ...args);
86
+ }
87
+
88
+ trace(message: string, ...args: unknown[]) {
89
+ if (!this.options.loggingClient.shouldLog("verbose")) return;
90
+ this.boundConsole.trace(`${this.prefix} ${message}`, ...args);
91
+ }
92
+ }
@@ -0,0 +1,10 @@
1
+ // import { ApiClient } from "../api/api.client";
2
+
3
+
4
+
5
+ export class NotificationsClient {
6
+ // constructor(private readonly api: ApiClient) { }
7
+
8
+
9
+
10
+ }
@@ -0,0 +1 @@
1
+ export * from "./storage.client";
@@ -0,0 +1,23 @@
1
+ import type { SupportedStorageFactory } from "./storage.client";
2
+ import * as MMKV from "react-native-mmkv";
3
+
4
+ /**
5
+ * Creates a storage factory that uses MMKV for persistence.
6
+ * Each storage key gets its own MMKV instance.
7
+ */
8
+ export const createMMKVStorageFactory = (): SupportedStorageFactory => {
9
+ return (storageKey: string) => {
10
+ const storage = MMKV.createMMKV({ id: storageKey });
11
+
12
+ return {
13
+ preload: () => {
14
+ storage.getAllKeys();
15
+ },
16
+ getItem: (key: string) => storage.getString(key) ?? null,
17
+ setItem: (key: string, value: string) => storage.set(key, value),
18
+ removeItem: (key: string) => storage.remove(key),
19
+ clear: () => storage.clearAll(),
20
+ keys: () => storage.getAllKeys(),
21
+ };
22
+ };
23
+ };
@@ -0,0 +1,75 @@
1
+ import type { Logger, LoggingClient } from "../logging";
2
+
3
+ export type SupportedStorage = {
4
+ preload: () => void;
5
+ getItem: (key: string) => string | null;
6
+ setItem: (key: string, value: string) => void;
7
+ removeItem: (key: string) => void;
8
+ clear: () => void;
9
+ keys: () => string[];
10
+ };
11
+
12
+ export type SupportedStorageFactory = (storageKey: string) => SupportedStorage;
13
+
14
+ export type StorageClientOptions = {
15
+ createStorage: SupportedStorageFactory;
16
+ };
17
+
18
+ export class StorageClient {
19
+
20
+ private readonly logger: Logger;
21
+
22
+ private readonly storage: Map<string, SupportedStorage> = new Map();
23
+
24
+ constructor(logging: LoggingClient, private readonly factory: SupportedStorageFactory) {
25
+ this.logger = logging.createLogger({
26
+ name: "StorageClient",
27
+ });
28
+ }
29
+
30
+ private createStorageKey(storageKey: string): string {
31
+ return `teardown:v1:${storageKey}`;
32
+ }
33
+
34
+ createStorage(storageKey: string): SupportedStorage {
35
+ const fullStorageKey = this.createStorageKey(storageKey);
36
+
37
+ this.logger.debug(`Creating storage for ${fullStorageKey}`);
38
+ if (this.storage.has(fullStorageKey)) {
39
+ this.logger.debug(`Storage already exists for ${fullStorageKey}`);
40
+ const existingStorage = this.storage.get(fullStorageKey);
41
+
42
+ if (existingStorage != null) {
43
+ this.logger.debug(`Returning existing storage for ${fullStorageKey}`);
44
+ return existingStorage;
45
+ }
46
+
47
+ this.logger.error(`Existing storage was found for ${fullStorageKey}, but it was null`);
48
+ }
49
+
50
+ this.logger.debug(`Creating new storage for ${fullStorageKey}`);
51
+ const newStorage = this.factory(fullStorageKey);
52
+ newStorage.preload();
53
+
54
+
55
+ const remappedStorage = {
56
+ ...newStorage,
57
+ clear: () => {
58
+ this.logger.debug(`Clearing storage for ${fullStorageKey}`);
59
+ this.storage.delete(fullStorageKey);
60
+ },
61
+ }
62
+
63
+ this.storage.set(fullStorageKey, remappedStorage);
64
+ this.logger.info(`Storage created for ${fullStorageKey}`);
65
+
66
+ return remappedStorage;
67
+ }
68
+
69
+ shutdown(): void {
70
+ this.storage.forEach((storage) => {
71
+ storage.clear();
72
+ });
73
+ this.storage.clear();
74
+ }
75
+ }
@@ -0,0 +1 @@
1
+ export * from "./utils.client";
@@ -0,0 +1,75 @@
1
+ import type { Logger, LoggingClient } from "../logging";
2
+ import { v4 as uuidv4 } from "uuid";
3
+
4
+ export class UtilsClient {
5
+ private readonly logger: Logger;
6
+
7
+ constructor(logging: LoggingClient) {
8
+ this.logger = logging.createLogger({
9
+ name: "UtilsClient",
10
+ });
11
+ }
12
+
13
+ async generateRandomUUID(): Promise<string> {
14
+ this.logger.debug("Generating random UUID");
15
+ const uuid = uuidv4();
16
+ this.logger.debug(`Random UUID generated: ${uuid}`);
17
+ return uuid;
18
+ // this.logger.debug("Generating random UUID");
19
+ // // Generate a random UUID v4 (xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx)
20
+ // // Uses only Math.random and string manipulation, no dependencies.
21
+ // const hex: string[] = [];
22
+ // for (let i = 0; i < 256; ++i) {
23
+ // hex.push((i < 16 ? "0" : "") + i.toString(16));
24
+ // }
25
+
26
+ // // Seeded random number generator using mulberry32
27
+ // let seedValue = 0;
28
+ // if (seed) {
29
+ // // Simple hash function to convert seed string to number
30
+ // for (let i = 0; i < seed.length; i++) {
31
+ // seedValue = ((seedValue << 5) - seedValue + seed.charCodeAt(i)) | 0;
32
+ // }
33
+ // seedValue = Math.abs(seedValue);
34
+ // }
35
+
36
+ // const seededRandom = (): number => {
37
+ // seedValue = (seedValue + 0x6d2b79f5) | 0;
38
+ // let t = Math.imul(seedValue ^ (seedValue >>> 15), 1 | seedValue);
39
+ // t = (t + Math.imul(t ^ (t >>> 7), 61 | t)) ^ t;
40
+ // return ((t ^ (t >>> 14)) >>> 0) / 4294967296;
41
+ // };
42
+
43
+ // const getRandomByte = (): number => Math.floor((seed ? seededRandom() : Math.random()) * 256);
44
+ // const rnds = new Array(16).fill(0).map(getRandomByte);
45
+
46
+ // // Per spec:
47
+ // rnds[6] = (rnds[6]! & 0x0f) | 0x40; // version 4
48
+ // rnds[8] = (rnds[8]! & 0x3f) | 0x80; // variant 10
49
+
50
+ // const uuid =
51
+ // hex[rnds[0]!]! +
52
+ // hex[rnds[1]!]! +
53
+ // hex[rnds[2]!]! +
54
+ // hex[rnds[3]!]! +
55
+ // "-" +
56
+ // hex[rnds[4]!]! +
57
+ // hex[rnds[5]!]! +
58
+ // "-" +
59
+ // hex[rnds[6]!]! +
60
+ // hex[rnds[7]!]! +
61
+ // "-" +
62
+ // hex[rnds[8]!]! +
63
+ // hex[rnds[9]!]! +
64
+ // "-" +
65
+ // hex[rnds[10]!]! +
66
+ // hex[rnds[11]!]! +
67
+ // hex[rnds[12]!]! +
68
+ // hex[rnds[13]!]! +
69
+ // hex[rnds[14]!]! +
70
+ // hex[rnds[15]!]!;
71
+
72
+ // this.logger.debug(`Random UUID generated: ${uuid}`);
73
+ // return uuid;
74
+ }
75
+ }
File without changes
File without changes
@@ -0,0 +1 @@
1
+ export * from "./teardown.context";
@@ -0,0 +1,17 @@
1
+ import { createContext, useContext } from "react";
2
+
3
+ import type { TeardownCore } from "../teardown.core";
4
+
5
+ export type TeardownContextType = {
6
+ core: TeardownCore;
7
+ };
8
+
9
+ export const TeardownContext = createContext<TeardownContextType | null>(null);
10
+
11
+ export const useTeardown = () => {
12
+ const context = useContext(TeardownContext);
13
+ if (!context) {
14
+ throw new Error("useTeardown must be used within a TeardownProvider");
15
+ }
16
+ return context;
17
+ };
@@ -0,0 +1 @@
1
+ export * from "../clients/device/expo-adapter";
@@ -0,0 +1,16 @@
1
+ export * from "../teardown.core";
2
+
3
+
4
+ // Providers
5
+ export * from "../providers/teardown.provider";
6
+
7
+ // Clients
8
+ export * from "../clients/api";
9
+ export * from "../clients/logging";
10
+ export * from "../clients/utils";
11
+ export * from "../clients/storage";
12
+ export * from "../clients/device/device.client";
13
+
14
+ // Hooks
15
+ export * from "../hooks/use-force-update";
16
+ export * from "../hooks/use-session";
@@ -0,0 +1 @@
1
+ export * from "../clients/storage/mmkv-adapter";
@@ -0,0 +1,38 @@
1
+ import { useEffect, useState } from "react";
2
+ import type { VersionStatus } from "../clients/force-update";
3
+ import { useTeardown } from "../contexts/teardown.context";
4
+
5
+ export type UseForceUpdateResult = {
6
+ /**
7
+ * The current version status.
8
+ */
9
+ versionStatus: VersionStatus;
10
+ /**
11
+ * Whether an update is available for this version, but is not required.
12
+ */
13
+ isUpdateAvailable: boolean;
14
+ /**
15
+ * Whether the the current version is out of date and is forced to be updated. "force_update" - isUpdateAvailable will also be true if this is true.
16
+ */
17
+ isUpdateRequired: boolean;
18
+ };
19
+
20
+ export const useForceUpdate = (): UseForceUpdateResult => {
21
+ const { core } = useTeardown();
22
+
23
+ const [versionStatus, setVersionStatus] = useState<VersionStatus>(
24
+ core.forceUpdate.getVersionStatus()
25
+ );
26
+
27
+ useEffect(() => {
28
+ const unsubscribe = core.forceUpdate.onVersionStatusChange(setVersionStatus);
29
+ return unsubscribe;
30
+ }, [core.forceUpdate]);
31
+
32
+ return {
33
+ versionStatus,
34
+ isUpdateRequired: versionStatus.type === "update_required",
35
+ isUpdateAvailable: versionStatus.type === "update_available" || versionStatus.type === "update_required" || versionStatus.type === "update_recommended",
36
+ };
37
+ };
38
+
@@ -0,0 +1,26 @@
1
+ import { useEffect, useState } from "react";
2
+ import type { Session } from "../clients/identity/identity.client";
3
+ import { useTeardown } from "../contexts/teardown.context";
4
+
5
+ export type UseSessionResult = Session | null
6
+
7
+ export const useSession = (): UseSessionResult => {
8
+ const { core } = useTeardown();
9
+
10
+ const [session, setSession] = useState<Session | null>(
11
+ core.identity.getSessionState()
12
+ );
13
+
14
+ useEffect(() => {
15
+ const unsubscribe = core.identity.onIdentifyStateChange((state) => {
16
+ if (state.type === "identified") {
17
+ setSession(state.session);
18
+ } else {
19
+ setSession(null);
20
+ }
21
+ });
22
+ return unsubscribe;
23
+ }, [core.identity]);
24
+
25
+ return session;
26
+ };
@@ -0,0 +1,28 @@
1
+ import { memo, useEffect, useMemo } from "react";
2
+
3
+ import type { TeardownCore } from "../teardown.core";
4
+ import { TeardownContext } from "../contexts/teardown.context";
5
+
6
+ export { useTeardown } from "../contexts/teardown.context";
7
+
8
+ export type TeardownProviderProps = {
9
+ children: React.ReactNode;
10
+ core: TeardownCore;
11
+ };
12
+
13
+ export const TeardownProvider = memo((props: TeardownProviderProps) => {
14
+ const { children, core } = props;
15
+ const context = useMemo(() => ({ core }), [core]);
16
+
17
+ useEffect(() => {
18
+ return () => {
19
+ core.shutdown();
20
+ };
21
+ }, [core]);
22
+
23
+ return (
24
+ <TeardownContext.Provider value={context}>
25
+ {children}
26
+ </TeardownContext.Provider>
27
+ );
28
+ });
@@ -0,0 +1,76 @@
1
+ import { ApiClient } from "./clients/api";
2
+ import { DeviceClient, type DeviceClientOptions } from "./clients/device/device.client";
3
+ import { ForceUpdateClient, type ForceUpdateClientOptions } from "./clients/force-update";
4
+ import { IdentityClient } from "./clients/identity";
5
+ import { type LogLevel, LoggingClient, type Logger } from "./clients/logging";
6
+ import { StorageClient, type SupportedStorageFactory } from "./clients/storage";
7
+ import { UtilsClient } from "./clients/utils/utils.client";
8
+
9
+ export type TeardownCoreOptions = {
10
+ org_id: string;
11
+ project_id: string;
12
+ api_key: string;
13
+ // environment_slug: string; // TODO: add this back in
14
+ storageFactory: SupportedStorageFactory;
15
+ deviceAdapter: DeviceClientOptions["adapter"];
16
+ forceUpdate?: ForceUpdateClientOptions;
17
+ };
18
+
19
+ export class TeardownCore {
20
+ private readonly logging: LoggingClient;
21
+ private readonly logger: Logger;
22
+ private readonly utils: UtilsClient;
23
+ public readonly api: ApiClient;
24
+ private readonly storage: StorageClient;
25
+ public readonly device: DeviceClient;
26
+ public readonly identity: IdentityClient;
27
+ public readonly forceUpdate: ForceUpdateClient;
28
+
29
+ constructor(private readonly options: TeardownCoreOptions) {
30
+ this.options = options;
31
+
32
+ this.logging = new LoggingClient();
33
+ // this.setLogLevel("verbose");
34
+
35
+ this.logger = this.logging.createLogger({
36
+ name: "TeardownCore",
37
+ });
38
+ this.utils = new UtilsClient(this.logging);
39
+ this.storage = new StorageClient(this.logging, this.options.storageFactory);
40
+ this.api = new ApiClient(this.logging, this.storage, {
41
+ org_id: this.options.org_id,
42
+ project_id: this.options.project_id,
43
+ api_key: this.options.api_key,
44
+ environment_slug: "production",
45
+ });
46
+ this.device = new DeviceClient(this.logging, this.utils, this.storage, {
47
+ adapter: this.options.deviceAdapter,
48
+ });
49
+ this.identity = new IdentityClient(
50
+ this.logging,
51
+ this.utils,
52
+ this.storage,
53
+ this.api,
54
+ this.device
55
+ );
56
+ this.forceUpdate = new ForceUpdateClient(this.logging, this.storage, this.identity, this.options.forceUpdate)
57
+
58
+ void this.initialize().catch((error) => {
59
+ this.logger.error("Error initializing TeardownCore", { error });
60
+ });
61
+
62
+ }
63
+
64
+ async initialize(): Promise<void> {
65
+ await this.identity.initialize();
66
+ }
67
+
68
+ setLogLevel(level: LogLevel): void {
69
+ this.logging.setLogLevel(level);
70
+ }
71
+
72
+ shutdown(): void {
73
+ this.logger.info("Shutting down TeardownCore");
74
+ this.storage.shutdown();
75
+ }
76
+ }
@@ -1 +0,0 @@
1
- export {};
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":""}
@@ -1,4 +0,0 @@
1
- import type { FunctionComponent } from "react";
2
- import { type SvgProps } from "react-native-svg";
3
- export type TeardownLogoProps = SvgProps;
4
- export declare const TeardownLogo: FunctionComponent<TeardownLogoProps>;
@@ -1,35 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.TeardownLogo = void 0;
27
- const react_native_svg_1 = __importStar(require("react-native-svg"));
28
- const TeardownLogo = (props) => {
29
- const {} = props;
30
- return (<react_native_svg_1.default width="350" height="350" viewBox="0 0 350 350" fill="none" {...props}>
31
- <react_native_svg_1.Path fillRule="evenodd" clipRule="evenodd" d="M175.09 345L300 218.574L256.859 174.909L299.821 131.426L174.91 5.00001L50 131.426L93.141 175.091L50.179 218.574L175.09 345ZM114.879 197.093L93.656 218.574L175.09 300.995L256.523 218.574L235.12 196.911L174.91 257.853L114.879 197.093ZM213.382 174.909L174.91 213.848L136.618 175.091L175.09 136.152L213.382 174.909ZM235.12 152.907L175.09 92.147L114.879 153.089L93.477 131.426L174.91 49.005L256.344 131.426L235.12 152.907Z" fill="white"/>
32
- </react_native_svg_1.default>);
33
- };
34
- exports.TeardownLogo = TeardownLogo;
35
- //# sourceMappingURL=teardown-logo.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"teardown-logo.js","sourceRoot":"","sources":["../../src/components/teardown-logo.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,qEAA4D;AAIrD,MAAM,YAAY,GAAyC,CAAC,KAAK,EAAE,EAAE;IAC3E,MAAM,EAAE,GAAG,KAAK,CAAC;IACjB,OAAO,CACN,CAAC,0BAAG,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,CACzE;GAAA,CAAC,uBAAI,CACJ,QAAQ,CAAC,SAAS,CAClB,QAAQ,CAAC,SAAS,CAClB,CAAC,CAAC,maAAma,CACra,IAAI,CAAC,OAAO,EAEd;EAAA,EAAE,0BAAG,CAAC,CACN,CAAC;AACH,CAAC,CAAC;AAZW,QAAA,YAAY,gBAYvB"}
@@ -1 +0,0 @@
1
- export * from './teardown.container';
@@ -1,18 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./teardown.container"), exports);
18
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/containers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC"}
@@ -1,8 +0,0 @@
1
- import type { FunctionComponent, PropsWithChildren } from "react";
2
- import type { PluginTuple, TeardownClient } from "../teardown.client";
3
- export type TeardownContainerOptions = {};
4
- export type TeardownContainerProps<T extends readonly PluginTuple[]> = PropsWithChildren<{
5
- client: TeardownClient<T>;
6
- options?: TeardownContainerOptions;
7
- }>;
8
- export declare const TeardownContainer: FunctionComponent<TeardownContainerProps<any>>;
@@ -1,26 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.TeardownContainer = void 0;
7
- const react_1 = __importDefault(require("react"));
8
- const services_1 = require("../services");
9
- const react_native_safe_area_context_1 = require("react-native-safe-area-context");
10
- const react_native_gesture_handler_1 = require("react-native-gesture-handler");
11
- const TeardownContainer = (props) => {
12
- const { children, client, options } = props;
13
- const providedState = services_1.TeardownService.useProvidedState(client);
14
- return (<react_native_safe_area_context_1.SafeAreaProvider>
15
- <react_native_gesture_handler_1.GestureHandlerRootView>
16
- {/* <BottomSheetModalProvider> TODO: Move this into a theme provider/package */}
17
- {/* <TeardownService.Provider value={providedState}>*/}
18
- {children}
19
- {/* <DebuggerUi {...options?.debugger} />*/}
20
- {/* </TeardownService.Provider>*/}
21
- {/* </BottomSheetModalProvider> */}
22
- </react_native_gesture_handler_1.GestureHandlerRootView>
23
- </react_native_safe_area_context_1.SafeAreaProvider>);
24
- };
25
- exports.TeardownContainer = TeardownContainer;
26
- //# sourceMappingURL=teardown.container.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"teardown.container.js","sourceRoot":"","sources":["../../src/containers/teardown.container.tsx"],"names":[],"mappings":";;;;;;AACA,kDAA0B;AAE1B,0CAA8C;AAC9C,mFAAkE;AAClE,+EAAsE;AAU/D,MAAM,iBAAiB,GAE1B,CAAC,KAAK,EAAE,EAAE;IACb,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IAE5C,MAAM,aAAa,GAAG,0BAAe,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC;IAE/D,OAAO,CACN,CAAC,iDAAgB,CAChB;GAAA,CAAC,qDAAsB,CACtB;IAAA,CAAC,8EAA8E,CAC/E;IAAA,CAAC,0DAA0D,CAC3D;IAAA,CAAC,QAAQ,CACT;IAAA,CAAC,iDAAiD,CAClD;IAAA,CAAC,qCAAqC,CACtC;IAAA,CAAC,iCAAiC,CACnC;GAAA,EAAE,qDAAsB,CACzB;EAAA,EAAE,iDAAgB,CAAC,CACnB,CAAC;AACH,CAAC,CAAC;AAnBW,QAAA,iBAAiB,qBAmB5B"}
package/dist/index.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export * from "./containers";
2
- export * from "./plugins";
package/dist/index.js DELETED
@@ -1,22 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- // export * from './components';
18
- __exportStar(require("./containers"), exports);
19
- // export * from './services';
20
- // export * from "./teardown.client";
21
- __exportStar(require("./plugins"), exports);
22
- //# sourceMappingURL=index.js.map
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gCAAgC;AAChC,+CAA6B;AAC7B,8BAA8B;AAC9B,qCAAqC;AACrC,4CAA0B"}