@beforegolive/floating-ball 0.1.18 → 0.1.19

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,21 @@
1
+ # floating-ball-publish
2
+
3
+ 发布 @beforegolive/floating-ball 包的完整流程。
4
+
5
+ ## 流程
6
+ 1. 检查代码是否有未提交的变动(git status)
7
+ 2. 如有变动:
8
+ - 提交 commit
9
+ - 升级 patch 版本(npm version patch)
10
+ 3. 构建(npm run build)
11
+ 4. 发布到 npm(npm publish)
12
+ 5. 推送到远端(git push)
13
+
14
+ ## 使用
15
+ ```
16
+ /floating-ball-publish
17
+ ```
18
+
19
+ ## 注意事项
20
+ - 需要在 floating-ball 项目目录下执行
21
+ - npm 已配置 registry 和 authToken
package/package.json CHANGED
@@ -1,14 +1,15 @@
1
1
  {
2
2
  "name": "@beforegolive/floating-ball",
3
- "version": "0.1.18",
3
+ "version": "0.1.19",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",
8
8
  "exports": {
9
9
  ".": {
10
+ "types": "./dist/index.d.ts",
10
11
  "import": "./dist/index.js",
11
- "types": "./dist/index.d.ts"
12
+ "default": "./dist/index.js"
12
13
  }
13
14
  },
14
15
  "scripts": {
@@ -16,7 +17,7 @@
16
17
  "demo": "vite --open",
17
18
  "build": "vite build && cp dist/src/index.d.ts dist/index.d.ts",
18
19
  "preview": "vite preview",
19
- "publish": "npm run build && npm publish"
20
+ "publish": "npm publish"
20
21
  },
21
22
  "peerDependencies": {
22
23
  "react": ">=18.0.0",
@@ -298,7 +298,7 @@ const FloatingBall = ({
298
298
  <>
299
299
  <div
300
300
  ref={ballRef}
301
- className={ballStyle}
301
+ className={`${ballStyle} ${className}`.trim() || ballStyle}
302
302
  style={{
303
303
  left: position.x,
304
304
  top: position.y,