electron-snip 0.1.0 → 0.1.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.1
4
+
5
+ - 修:`exports` 补 `"./package.json"` 入口 —— 之前读包版本 / 元数据的工具会撞 `ERR_PACKAGE_PATH_NOT_EXPORTED`。
6
+ - 文档:安装章节加醒目提示 —— npm ≥ 11.6 不批准 `get-windows` / `koffi` 的安装脚本时,**窗口吸附**与**自动滚动**会静默失效(不是报错,是功能没了)。
7
+
3
8
  ## 0.1.0(首次发布)
4
9
 
5
10
  - 修复长图里的**固定侧边栏 / 悬浮按钮**:选区里的 fixed / sticky UI 在每一帧里逐像素相同,
package/README.md CHANGED
@@ -31,6 +31,24 @@ npm install electron-snip
31
31
 
32
32
  Requires Electron `>=43` (peer dependency). Also installable directly from GitHub.
33
33
 
34
+ > ⚠️ **npm ≥ 11.6 必须批准安装脚本,否则两个原生能力会静默失效**:
35
+ > `get-windows`(**窗口吸附**,macOS / Windows 都要它)装不上原生二进制时,
36
+ > 悬浮窗口高亮会直接消失(不报错);`koffi`(**自动滚动**)同理。
37
+ > 依赖包自己 package.json 里的 `allowScripts` **不生效**(npm 只读宿主根项目的),
38
+ > 所以要在**你自己的** package.json 里声明:
39
+ >
40
+ > ```json
41
+ > {
42
+ > "allowScripts": {
43
+ > "get-windows@10.0.0": true,
44
+ > "koffi@3.3.2": true
45
+ > }
46
+ > }
47
+ > ```
48
+ >
49
+ > 或者直接 `npm install-scripts approve get-windows koffi`(写进根 package.json)✓
50
+ > —— 装完记得 `npm rebuild get-windows koffi`。
51
+
34
52
  ## 快速开始 · Quick start
35
53
 
36
54
  ```ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "electron-snip",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Electron 跨屏截图 SDK:框选、遮罩、标注、贴图、复制 / 保存",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -30,6 +30,7 @@
30
30
  "default": "./dist/index.cjs"
31
31
  }
32
32
  },
33
+ "./package.json": "./package.json",
33
34
  "./preload": "./dist/preload.cjs",
34
35
  "./renderer/*": "./dist/renderer/*",
35
36
  "./annotations": {