@useclickly/react 1.1.0 → 1.3.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.
package/dist/index.d.cts CHANGED
@@ -1,3 +1,4 @@
1
+ import * as zustand_middleware from 'zustand/middleware';
1
2
  import * as zustand from 'zustand';
2
3
  import { Annotation } from '@useclickly/core';
3
4
  export { Annotation, AnnotationKind, AnnotationStatus, ScreenshotData } from '@useclickly/core';
@@ -49,7 +50,19 @@ interface AnnotationsStore {
49
50
  * a save back — these annotations already exist on disk. */
50
51
  hydrateStrokes: (strokesById: Record<string, NonNullable<Annotation["strokes"]>>) => void;
51
52
  }
52
- declare const useAnnotations: zustand.UseBoundStore<zustand.StoreApi<AnnotationsStore>>;
53
+ declare const useAnnotations: zustand.UseBoundStore<Omit<zustand.StoreApi<AnnotationsStore>, "setState" | "persist"> & {
54
+ setState(partial: AnnotationsStore | Partial<AnnotationsStore> | ((state: AnnotationsStore) => AnnotationsStore | Partial<AnnotationsStore>), replace?: false | undefined): unknown;
55
+ setState(state: AnnotationsStore | ((state: AnnotationsStore) => AnnotationsStore), replace: true): unknown;
56
+ persist: {
57
+ setOptions: (options: Partial<zustand_middleware.PersistOptions<AnnotationsStore, unknown, unknown>>) => void;
58
+ clearStorage: () => void;
59
+ rehydrate: () => Promise<void> | void;
60
+ hasHydrated: () => boolean;
61
+ onHydrate: (fn: (state: AnnotationsStore) => void) => () => void;
62
+ onFinishHydration: (fn: (state: AnnotationsStore) => void) => () => void;
63
+ getOptions: () => Partial<zustand_middleware.PersistOptions<AnnotationsStore, unknown, unknown>>;
64
+ };
65
+ }>;
53
66
  /**
54
67
  * Subscribe to the annotation list with shallow equality — re-renders
55
68
  * only when items add/remove/reorder/update. Always use this from
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import * as zustand_middleware from 'zustand/middleware';
1
2
  import * as zustand from 'zustand';
2
3
  import { Annotation } from '@useclickly/core';
3
4
  export { Annotation, AnnotationKind, AnnotationStatus, ScreenshotData } from '@useclickly/core';
@@ -49,7 +50,19 @@ interface AnnotationsStore {
49
50
  * a save back — these annotations already exist on disk. */
50
51
  hydrateStrokes: (strokesById: Record<string, NonNullable<Annotation["strokes"]>>) => void;
51
52
  }
52
- declare const useAnnotations: zustand.UseBoundStore<zustand.StoreApi<AnnotationsStore>>;
53
+ declare const useAnnotations: zustand.UseBoundStore<Omit<zustand.StoreApi<AnnotationsStore>, "setState" | "persist"> & {
54
+ setState(partial: AnnotationsStore | Partial<AnnotationsStore> | ((state: AnnotationsStore) => AnnotationsStore | Partial<AnnotationsStore>), replace?: false | undefined): unknown;
55
+ setState(state: AnnotationsStore | ((state: AnnotationsStore) => AnnotationsStore), replace: true): unknown;
56
+ persist: {
57
+ setOptions: (options: Partial<zustand_middleware.PersistOptions<AnnotationsStore, unknown, unknown>>) => void;
58
+ clearStorage: () => void;
59
+ rehydrate: () => Promise<void> | void;
60
+ hasHydrated: () => boolean;
61
+ onHydrate: (fn: (state: AnnotationsStore) => void) => () => void;
62
+ onFinishHydration: (fn: (state: AnnotationsStore) => void) => () => void;
63
+ getOptions: () => Partial<zustand_middleware.PersistOptions<AnnotationsStore, unknown, unknown>>;
64
+ };
65
+ }>;
53
66
  /**
54
67
  * Subscribe to the annotation list with shallow equality — re-renders
55
68
  * only when items add/remove/reorder/update. Always use this from