etudes 22.2.0 → 22.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.
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Hook for copying a blob to the clipboard.
3
+ *
4
+ * @returns The callback to copy a blob to the clipboard.
5
+ */
6
+ export declare function useCopyBlobToClipboard(): (blob: Blob) => Promise<void>;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Hook for downloading a blob as a file.
3
+ *
4
+ * @returns The callback to download a blob.
5
+ */
6
+ export declare function useDownloadBlob(): (blob: Blob, fileName: string) => void;
@@ -1,3 +1,9 @@
1
1
  type ColorScheme = 'light' | 'dark';
2
- export declare function useSystemColorScheme(): ColorScheme;
2
+ /**
3
+ * Hook for getting the current system color scheme. The color scheme is updated
4
+ * automatically when the system color scheme changes.
5
+ *
6
+ * @returns The current system color scheme.
7
+ */
8
+ export declare function useSystemColorScheme(defaultValue?: ColorScheme): ColorScheme;
3
9
  export {};
package/build/index.d.ts CHANGED
@@ -13,6 +13,8 @@ export * from './hocs/WithTooltip.js';
13
13
  export * from './hooks/useAgent.js';
14
14
  export * from './hooks/useClassName.js';
15
15
  export * from './hooks/useClickOutside.js';
16
+ export * from './hooks/useCopyBlobToClipboard.js';
17
+ export * from './hooks/useDownloadBlob.js';
16
18
  export * from './hooks/useDPR.js';
17
19
  export * from './hooks/useDrag.js';
18
20
  export * from './hooks/useDropzone.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "etudes",
3
- "version": "22.2.0",
3
+ "version": "22.3.0",
4
4
  "description": "A study of headless React components",
5
5
  "type": "module",
6
6
  "main": "./build/etudes.umd.cjs",