@legit-sdk/react 0.2.11 → 0.2.12

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,7 +1,7 @@
1
1
  import { ReactNode } from 'react';
2
- import { openLegitFsWithMemoryFs } from '@legit-sdk/core';
2
+ type OpenLegitFsWithMemoryFs = (typeof import('@legit-sdk/core'))['openLegitFsWithMemoryFs'];
3
3
  export interface LegitContextValue {
4
- legitFs: Awaited<ReturnType<typeof openLegitFsWithMemoryFs>> | null;
4
+ legitFs: Awaited<ReturnType<OpenLegitFsWithMemoryFs>> | null;
5
5
  loading: boolean;
6
6
  head: string | null;
7
7
  rollback: (commitHash: string) => Promise<void>;
@@ -19,3 +19,4 @@ export type LegitConfig = {
19
19
  publicKey?: string;
20
20
  };
21
21
  export declare const LegitProvider: ({ children, config, }: LegitProviderProps) => import("react/jsx-runtime").JSX.Element;
22
+ export {};
package/dist/index.d.ts CHANGED
@@ -1,9 +1,10 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as _legit_sdk_core from '@legit-sdk/core';
2
3
  import { ReactNode } from 'react';
3
- import { openLegitFsWithMemoryFs, HistoryItem, openLegitFs } from '@legit-sdk/core';
4
4
 
5
+ type OpenLegitFsWithMemoryFs = (typeof _legit_sdk_core)['openLegitFsWithMemoryFs'];
5
6
  interface LegitContextValue {
6
- legitFs: Awaited<ReturnType<typeof openLegitFsWithMemoryFs>> | null;
7
+ legitFs: Awaited<ReturnType<OpenLegitFsWithMemoryFs>> | null;
7
8
  loading: boolean;
8
9
  head: string | null;
9
10
  rollback: (commitHash: string) => Promise<void>;
@@ -22,6 +23,8 @@ type LegitConfig = {
22
23
  };
23
24
  declare const LegitProvider: ({ children, config, }: LegitProviderProps) => react_jsx_runtime.JSX.Element;
24
25
 
26
+ type HistoryItem = _legit_sdk_core.HistoryItem;
27
+ type OpenLegitFs = (typeof _legit_sdk_core)['openLegitFs'];
25
28
  interface UseLegitFileOptions {
26
29
  initialData?: string;
27
30
  }
@@ -32,7 +35,7 @@ type UseLegitFileReturn = {
32
35
  getPastState: (commitHash: string) => Promise<string>;
33
36
  loading: boolean;
34
37
  error?: Error;
35
- legitFs: Awaited<ReturnType<typeof openLegitFs>> | null;
38
+ legitFs: Awaited<ReturnType<OpenLegitFs>> | null;
36
39
  };
37
40
  declare function useLegitFile(path: string, options?: UseLegitFileOptions): UseLegitFileReturn;
38
41