datakeen-session-react 1.1.6 → 1.1.7

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.
@@ -1,4 +1,4 @@
1
- import { default as React } from 'react';
1
+ import { default as React } from '../../../node_modules/react';
2
2
  interface CameraErrorProps {
3
3
  errorMessage: string;
4
4
  onRetry: () => void;
@@ -1,4 +1,4 @@
1
- import { default as React } from 'react';
1
+ import { default as React } from '../../../node_modules/react';
2
2
  import { CameraFacingMode } from '../../types/camera';
3
3
  interface CameraMaskProps {
4
4
  isDetecting: boolean;
@@ -1,4 +1,4 @@
1
- import { default as React } from 'react';
1
+ import { default as React } from '../../../node_modules/react';
2
2
  interface OrientationToggleProps {
3
3
  onCameraToggle: () => void;
4
4
  }
@@ -1,4 +1,4 @@
1
- import { default as React } from 'react';
1
+ import { default as React } from '../../../node_modules/react';
2
2
  import { onUploadFiles } from '../../types/uploadFiles';
3
3
  interface PhotoConfirmationProps {
4
4
  imageUrl: string;
@@ -1,4 +1,4 @@
1
- import { default as React } from 'react';
1
+ import { default as React } from '../../../node_modules/react';
2
2
  import { ProcessingStep } from '../../types/session';
3
3
  import { onUploadFiles } from '../../types/uploadFiles';
4
4
  interface PhotoProcessingLoaderProps {
@@ -1,4 +1,4 @@
1
- import { default as React } from 'react';
1
+ import { default as React } from '../../../node_modules/react';
2
2
  import { stepObject } from '../../types/session';
3
3
  interface EndFlowProps {
4
4
  stepObject: stepObject;
@@ -1,4 +1,4 @@
1
- import { default as React } from 'react';
1
+ import { default as React } from '../../../node_modules/react';
2
2
  interface SessionExpiredProps {
3
3
  onRetry?: () => void;
4
4
  }
@@ -1,4 +1,4 @@
1
- import { default as React } from 'react';
1
+ import { default as React } from '../../../node_modules/react';
2
2
  interface OTPInputProps {
3
3
  length?: number;
4
4
  value: string;
@@ -1,4 +1,4 @@
1
- import { ReactNode } from 'react';
1
+ import { ReactNode } from '../../../node_modules/react';
2
2
  interface PaperProps {
3
3
  children: ReactNode;
4
4
  className?: string;
@@ -1,4 +1,4 @@
1
- import { default as React } from 'react';
1
+ import { default as React } from '../../../node_modules/react';
2
2
  interface SelectOption {
3
3
  value: string;
4
4
  label: string;
@@ -1,4 +1,4 @@
1
- import { default as React } from 'react';
1
+ import { default as React } from '../../../node_modules/react';
2
2
  import { DrawerItem } from '../../utils/jdiCountry';
3
3
  type Props = {
4
4
  title: string;
@@ -1,10 +1,10 @@
1
- import { ReactNode } from 'react';
1
+ import { ReactNode } from '../../node_modules/react';
2
2
  import { DrawerItem } from '../utils/jdiCountry';
3
3
  type DocumentContextType = {
4
4
  selectedDocumentType: DrawerItem | null;
5
5
  setSelectedDocumentType: (documentType: DrawerItem | null) => void;
6
6
  };
7
- export declare const DocumentContext: import('react').Context<DocumentContextType>;
7
+ export declare const DocumentContext: import('../../node_modules/react').Context<DocumentContextType>;
8
8
  interface DocumentProviderProps {
9
9
  children: ReactNode;
10
10
  }
@@ -1,4 +1,4 @@
1
- import { default as React } from 'react';
1
+ import { default as React } from '../../node_modules/react';
2
2
  export interface SessionConfig {
3
3
  selfie?: boolean;
4
4
  requireMobile?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "datakeen-session-react",
3
- "version": "1.1.6",
3
+ "version": "1.1.7",
4
4
  "description": "React SDK component to manage and render Datakeen session experiences easily.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
package/vite.config.ts CHANGED
@@ -13,6 +13,13 @@ export default defineConfig({
13
13
  insertTypesEntry: true,
14
14
  }),
15
15
  ],
16
+ resolve: {
17
+ alias: {
18
+ // Force React and ReactDOM to resolve to the application's own versions
19
+ react: resolve(__dirname, 'node_modules/react'),
20
+ 'react-dom': resolve(__dirname, 'node_modules/react-dom'),
21
+ },
22
+ },
16
23
  build: {
17
24
  lib: {
18
25
  entry: resolve(__dirname, 'src/index.ts'),