From 61b56511682d4c1a6e72b5a3a3d49f968b44101d Mon Sep 17 00:00:00 2001 From: TaTo30 Date: Sun, 12 May 2024 21:44:42 -0600 Subject: [PATCH] Update docs for 1.9.7 package version --- docs/guide/composables.md | 24 +++++++++++++++++++++++- docs/guide/introduction.md | 14 ++++---------- docs/guide/props.md | 6 ++++-- docs/package-lock.json | 12 ++++++------ docs/package.json | 4 ++-- 5 files changed, 39 insertions(+), 21 deletions(-) diff --git a/docs/guide/composables.md b/docs/guide/composables.md index d8ea01b..24bf3d3 100644 --- a/docs/guide/composables.md +++ b/docs/guide/composables.md @@ -1,3 +1,7 @@ +--- +outline: [2,3] +--- + # Composables ## usePDF @@ -18,11 +22,29 @@ const { pdf, pages, info } = usePDF('sample.pdf') ``` +### Reactivity + +`usePDF` is also reactive if you use a `ref` instead of a plain `src`, when the value of `ref` changes the returned values also chage. + +```vue + + + +``` + ### Parameters #### src -Type: `string | URL | TypedArray | DocumentInitParameters`
+Type: `string | URL | TypedArray | DocumentInitParameters | ref | ref | ref | ref`
Required: `True` This parameter is the same `src` of [pdf.js](https://github.com/mozilla/pdf.js/blob/38287d943532eee939ceffbe6861163f93805ca7/src/display/api.js#L145) diff --git a/docs/guide/introduction.md b/docs/guide/introduction.md index f1b12e4..a41e539 100644 --- a/docs/guide/introduction.md +++ b/docs/guide/introduction.md @@ -4,22 +4,16 @@ VuePDF is a **client-side** component for **Vue 3** that allows you to flexibly ## Installation - - - -```bash:no-line-numbers +::: code-group +```sh [npm] npm i @tato30/vue-pdf ``` - - - -```bash:no-line-numbers +```sh [npm] yarn add @tato30/vue-pdf ``` +::: - - ## Basic Usage diff --git a/docs/guide/props.md b/docs/guide/props.md index a758c5c..a0073ec 100644 --- a/docs/guide/props.md +++ b/docs/guide/props.md @@ -109,14 +109,16 @@ Enables text selection. ## highlight-text -Type: `string`
+Type: `string | string[]`
Required: `false`
Default: `null` -Highlight on the page the searched text. +Highlight on the page the searched text or the searched array of text. ```vue + + ``` ## highlight-options diff --git a/docs/package-lock.json b/docs/package-lock.json index 8079649..d3d0759 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -1,15 +1,15 @@ { "name": "vue-pdf-docs", - "version": "1.9.4", + "version": "1.9.5", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "vue-pdf-docs", - "version": "1.9.4", + "version": "1.9.5", "license": "MIT", "dependencies": { - "@tato30/vue-pdf": "^1.9.5" + "@tato30/vue-pdf": "^1.9.7" }, "devDependencies": { "vitepress": "^1.0.0-rc.34" @@ -873,9 +873,9 @@ ] }, "node_modules/@tato30/vue-pdf": { - "version": "1.9.5", - "resolved": "https://registry.npmjs.org/@tato30/vue-pdf/-/vue-pdf-1.9.5.tgz", - "integrity": "sha512-PFEl9BZ2vlI23Z6D3Yhx8QVY6OVQNCpbm7QxHMhk0iuFovlOQMD94ylMrNZn4yKG8JeQ1MIml2klDcQv4ID3Fg==", + "version": "1.9.7", + "resolved": "https://registry.npmjs.org/@tato30/vue-pdf/-/vue-pdf-1.9.7.tgz", + "integrity": "sha512-YgIr4jZD6KMa03/TLAAJdOnBH1oQy2rOV2rDY/BsS9HrufxOO07LVoKzk88MAlneNmcPjY2dtG8eD9Bzt0Tk0A==", "dependencies": { "pdfjs-dist": "3.11.174" }, diff --git a/docs/package.json b/docs/package.json index b0bf99f..2c9015f 100644 --- a/docs/package.json +++ b/docs/package.json @@ -1,6 +1,6 @@ { "name": "vue-pdf-docs", - "version": "1.9.5", + "version": "1.9.7", "description": "VuePDF Documentation", "main": "index.js", "repository": "https://github.com/TaTo30/VuePDF", @@ -14,6 +14,6 @@ "vitepress": "^1.0.0-rc.34" }, "dependencies": { - "@tato30/vue-pdf": "1.9.5" + "@tato30/vue-pdf": "^1.9.7" } }