@agilehub/vue-pdf-flipbook 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/README.md CHANGED
@@ -5,15 +5,15 @@
5
5
  ## 安装与使用
6
6
 
7
7
  ```bash
8
- npm install vue-pdf-flipbook-next
8
+ npm install @agilehub/vue-pdf-flipbook
9
9
  ```
10
10
 
11
11
  ```vue
12
12
  <script setup lang="ts">
13
13
  import { ref } from 'vue'
14
- import { VuePdfFlipbook } from 'vue-pdf-flipbook-next'
15
- import type { PdfFlipbookExpose, PdfFlipbookState } from 'vue-pdf-flipbook-next'
16
- import 'vue-pdf-flipbook-next/style.css'
14
+ import { VuePdfFlipbook } from '@agilehub/vue-pdf-flipbook'
15
+ import type { PdfFlipbookExpose, PdfFlipbookState } from '@agilehub/vue-pdf-flipbook'
16
+ import '@agilehub/vue-pdf-flipbook/style.css'
17
17
 
18
18
  const reader = ref<PdfFlipbookExpose>()
19
19
  const state = ref<PdfFlipbookState>()
@@ -36,6 +36,8 @@ const state = ref<PdfFlipbookState>()
36
36
 
37
37
  也支持 `app.use(PdfFlipbook)` 全局注册,`PdfFlipbook` 为默认导出。
38
38
 
39
+ 发布包名为 `@agilehub/vue-pdf-flipbook`,安装和导入必须使用相同名称;`vue-pdf-flipbook` 是另一个 npm 包名。
40
+
39
41
  ## Props
40
42
 
41
43
  | 属性 | 类型 | 默认值 | 说明 |
@@ -186,10 +188,13 @@ npm run typecheck
186
188
  npm test
187
189
  npm run build
188
190
  npm run pack:check
191
+ npm run test:package
189
192
  ```
190
193
 
191
194
  `npm test` 使用 Node.js 原生测试运行器,需要 Node.js 22.15+,覆盖页面窗口、网络分段以及异步跳页的等待、替换、失败和取消场景。
192
195
 
196
+ `npm pack` 和 `npm publish` 会通过 `prepack` 自动重新构建,避免发布旧产物。`npm run test:package` 解包实际 tarball,验证发布入口文件、组件和类型导入以及样式入口。
197
+
193
198
  ## License
194
199
 
195
200
  MIT
@@ -197,4 +202,3 @@ MIT
197
202
 
198
203
 
199
204
 
200
-
package/dist/index.d.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  import type { Plugin } from 'vue';
2
2
  import VuePdfFlipbook from './VuePdfFlipbook.vue';
3
- import './style.css';
4
3
  export type { PdfFlipbookExpose, PdfFlipbookProps, PdfFlipbookState, PdfThumbnailSlotProps, ReaderMode } from './types';
5
4
  export { VuePdfFlipbook };
6
5
  export { default as PdfCanvasPage } from './components/PdfCanvasPage.vue';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agilehub/vue-pdf-flipbook",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "A minimal Vue 3 PDF flipbook with page-flip animation and public APIs for external controls.",
5
5
  "type": "module",
6
6
  "files": [
@@ -11,7 +11,7 @@
11
11
  "author": {
12
12
  "name": "agilehub"
13
13
  },
14
- "publishConfig": {
14
+ "publishConfig": {
15
15
  "access": "public"
16
16
  },
17
17
  "main": "./dist/vue-pdf-flipbook.js",
@@ -35,8 +35,9 @@
35
35
  "build:types": "vue-tsc -p tsconfig.build.json",
36
36
  "build": "npm run typecheck && vite build && npm run build:types",
37
37
  "preview": "vite preview",
38
- "prepublishOnly": "npm run build",
39
- "pack:check": "npm pack --dry-run --cache .npm-cache"
38
+ "prepack": "npm run build",
39
+ "pack:check": "npm pack --dry-run --cache .npm-cache",
40
+ "test:package": "npm run build && node tests/package-imports.mjs"
40
41
  },
41
42
  "keywords": [
42
43
  "vue",