etudes 32.4.0 → 32.5.1

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,24 @@
1
+ import { RefObject } from 'react';
2
+ type Target = HTMLElement | null | RefObject<HTMLElement> | RefObject<HTMLElement | null> | RefObject<HTMLElement | undefined> | undefined;
3
+ type Options = {
4
+ isEnabled?: boolean;
5
+ };
6
+ /**
7
+ * Hook for overriding the browser-default right click context menu action on
8
+ * the window.
9
+ *
10
+ * @param action The function to invoke instead.
11
+ * @param options See {@link Options}.
12
+ */
13
+ export declare function useRightClick(action: () => void, options?: Options): void;
14
+ /**
15
+ * Hook for overriding the browser-default right click context menu action for
16
+ * an element.
17
+ *
18
+ * @param targetRef The target to override. If undefined, the window will be
19
+ * used.
20
+ * @param action The function to invoke instead.
21
+ * @param options See {@link Options}.
22
+ */
23
+ export declare function useRightClick(targetRef: Target, action?: () => void, options?: Options): void;
24
+ export {};
package/build/index.d.ts CHANGED
@@ -32,6 +32,7 @@ export * from './hooks/useMouseLeave.js';
32
32
  export * from './hooks/useOS.js';
33
33
  export * from './hooks/usePrevious.js';
34
34
  export * from './hooks/useRect.js';
35
+ export * from './hooks/useRightClick.js';
35
36
  export * from './hooks/useScrollPositionObserver.js';
36
37
  export * from './hooks/useSessionCache.js';
37
38
  export * from './hooks/useSize.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "etudes",
3
- "version": "32.4.0",
3
+ "version": "32.5.1",
4
4
  "description": "A study of headless React components",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -47,29 +47,29 @@
47
47
  "@eslint/js": "^10.0.1",
48
48
  "@semantic-release/git": "^10.0.1",
49
49
  "@stylistic/eslint-plugin": "^5.10.0",
50
- "@tailwindcss/vite": "^4.3.0",
50
+ "@tailwindcss/vite": "^4.3.1",
51
51
  "@testing-library/react": "^16.3.2",
52
52
  "@testing-library/user-event": "^14.6.1",
53
- "@types/node": "^25.9.1",
54
- "@types/react": "^19.2.16",
53
+ "@types/node": "^25.9.3",
54
+ "@types/react": "^19.2.17",
55
55
  "@types/react-dom": "^19.2.3",
56
56
  "@vitejs/plugin-react": "^6.0.2",
57
- "@vitest/coverage-v8": "^4.1.8",
57
+ "@vitest/coverage-v8": "^4.1.9",
58
58
  "concurrently": "^10.0.3",
59
- "eslint": "^10.4.1",
60
- "eslint-plugin-perfectionist": "^5.9.0",
61
- "happy-dom": "^20.9.0",
59
+ "eslint": "^10.5.0",
60
+ "eslint-plugin-perfectionist": "^5.9.1",
61
+ "happy-dom": "^20.10.5",
62
62
  "react": "^19.2.7",
63
63
  "react-dom": "^19.2.7",
64
64
  "rimraf": "^6.1.3",
65
- "semantic-release": "^25.0.3",
66
- "tailwindcss": "^4.3.0",
65
+ "semantic-release": "^25.0.5",
66
+ "tailwindcss": "^4.3.1",
67
67
  "typescript": "^6.0.3",
68
- "typescript-eslint": "^8.60.1",
68
+ "typescript-eslint": "^8.61.1",
69
69
  "vite": "^8.0.16",
70
70
  "vite-plugin-dts": "^5.0.2",
71
71
  "vite-plugin-svgr": "^5.2.0",
72
- "vitest": "^4.1.8",
72
+ "vitest": "^4.1.9",
73
73
  "wait-on": "^9.0.10"
74
74
  },
75
75
  "dependencies": {