electron-findbar 3.3.2 → 3.4.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.
Files changed (2) hide show
  1. package/README.md +2 -18
  2. package/package.json +2 -3
package/README.md CHANGED
@@ -19,23 +19,6 @@ Install the `electron-findbar` package via [npm](https://www.npmjs.com/package/e
19
19
  npm install electron-findbar
20
20
  ```
21
21
 
22
- ## Development & Build
23
-
24
- This project is written in **TypeScript** and uses **Webpack** for bundling and minification.
25
-
26
- ### Prerequisites
27
-
28
- - Node.js >= 12.0.0
29
- - npm
30
-
31
- ### Setup
32
-
33
- Install dependencies:
34
-
35
- ```sh
36
- npm install
37
- ```
38
-
39
22
  ## Overview
40
23
 
41
24
  The `electron-findbar` package creates a `BrowserWindow`-based component designed to emulate the Chrome findbar layout, leveraging the `webContents.findInPage` method to navigate through matches. Inter-process communication (IPC) is used for interaction between the `main` and `renderer` processes.
@@ -191,7 +174,8 @@ webContents.on('before-input-event', (event, input) => {
191
174
  const key = input.key.toLowerCase()
192
175
 
193
176
  // Detect Ctrl+F (Windows/Linux) or Command+F (macOS)
194
- if (input.control || input.meta) {
177
+ const isMac = process.platform === 'darwin'
178
+ if ((isMac && input.meta) || (!isMac && input.control)) {
195
179
  if (key === 'f') {
196
180
  // Prevent default behavior
197
181
  event.preventDefault()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "electron-findbar",
3
- "version": "3.3.2",
3
+ "version": "3.4.0",
4
4
  "description": "Chrome-like findbar for your Electron app.",
5
5
  "exports": {
6
6
  ".": {
@@ -22,8 +22,7 @@
22
22
  "build": "npm run clean && webpack",
23
23
  "build:dev": "npm run clean && NODE_ENV=development webpack",
24
24
  "dev": "webpack --mode development --watch",
25
- "sample": "electron test/sample.js",
26
- "publish": "npm run build && npm publish --access public"
25
+ "sample": "electron test/sample.js"
27
26
  },
28
27
  "repository": {
29
28
  "type": "git",