watermark-js-plus 0.0.2 → 0.0.3

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 (45) hide show
  1. package/README.md +88 -1
  2. package/package.json +22 -10
  3. package/.editorconfig +0 -16
  4. package/.eslintignore +0 -7
  5. package/.eslintrc.cjs +0 -46
  6. package/.github/workflows/deploy.yml +0 -29
  7. package/.github/workflows/npm-publish.yml +0 -32
  8. package/.husky/commit-msg +0 -4
  9. package/.husky/pre-commit +0 -4
  10. package/.prettierrc +0 -10
  11. package/CHANGELOG.md +0 -18
  12. package/babel.config.cjs +0 -23
  13. package/changelog-option.cjs +0 -87
  14. package/commitlint.config.cjs +0 -26
  15. package/docs/.vitepress/config.ts +0 -103
  16. package/docs/.vitepress/locales/zh-CN.ts +0 -51
  17. package/docs/.vitepress/theme/index.ts +0 -12
  18. package/docs/config/blind-decode.md +0 -33
  19. package/docs/config/blind.md +0 -19
  20. package/docs/config/index.md +0 -178
  21. package/docs/guide/blind-watermark.md +0 -267
  22. package/docs/guide/getting-started.md +0 -73
  23. package/docs/guide/watermark.md +0 -213
  24. package/docs/guide/what-is-this.md +0 -19
  25. package/docs/index.md +0 -33
  26. package/docs/public/favicons/apple-touch-icon.png +0 -0
  27. package/docs/public/favicons/favicon-64x64.png +0 -0
  28. package/docs/public/hero-image.png +0 -0
  29. package/docs/public/logo.png +0 -0
  30. package/docs/zh/config/blind-decode.md +0 -33
  31. package/docs/zh/config/blind.md +0 -19
  32. package/docs/zh/config/index.md +0 -178
  33. package/docs/zh/guide/blink-watermark.md +0 -288
  34. package/docs/zh/guide/getting-started.md +0 -48
  35. package/docs/zh/guide/watermark.md +0 -213
  36. package/docs/zh/guide/what-is-this.md +0 -19
  37. package/docs/zh/index.md +0 -33
  38. package/rollup.config.mjs +0 -40
  39. package/src/blind.ts +0 -43
  40. package/src/index.ts +0 -7
  41. package/src/types/index.ts +0 -69
  42. package/src/utils/index.ts +0 -63
  43. package/src/watermark.ts +0 -300
  44. package/tools/terser.js +0 -19
  45. package/tsconfig.json +0 -15
package/README.md CHANGED
@@ -1 +1,88 @@
1
- # watermark-js-plus
1
+ <p align="center">
2
+ <a href="https://zhensherlock.github.io/watermark-js-plus/" target="_blank" rel="noopener noreferrer">
3
+ <img width="300" src="https://zhensherlock.github.io/watermark-js-plus/hero-image.png" alt="watermark logo">
4
+ </a>
5
+ </p>
6
+ <p align="center">
7
+ <a href="https://npmjs.com/package/pinia"><img src="https://badgen.net/npm/v/pinia" alt="npm package"></a>
8
+ <a href="https://github.com/vuejs/pinia/actions/workflows/test.yml?query=branch%3Av2"><img src="https://github.com/vuejs/pinia/workflows/test/badge.svg?branch=v2" alt="build status"></a>
9
+ <a href="https://codecov.io/github/vuejs/pinia"><img src="https://badgen.net/codecov/c/github/vuejs/pinia/v2" alt="code coverage"></a>
10
+ </p>
11
+
12
+ # Watermark
13
+
14
+ > This is a *canvas-based* watermark for browser.
15
+
16
+ - 🛠️ Rich Features
17
+ - 🔑 Fully Typed APIs
18
+ - 📦️ Extremely light
19
+
20
+ Watermark works with both Vue 2 , Vue 3 And React.
21
+
22
+ # Translations
23
+
24
+ * [中文文档](README_zh.md)
25
+
26
+ ## Installing
27
+
28
+ ```bash
29
+ # or pnpm or yarn
30
+ npm install watermark-js-plus
31
+ ```
32
+
33
+ ## Usage
34
+
35
+ ### Watermark
36
+
37
+ ```ts
38
+ import { Watermark } from 'watermark-js-plus'
39
+
40
+ const watermark = new Watermark({
41
+ content: 'hello my watermark',
42
+ width: 200,
43
+ height: 200,
44
+ onSuccess: () => {
45
+ // success callback
46
+ }
47
+ })
48
+
49
+ watermark.create()
50
+ ```
51
+
52
+ ### Blind Watermark
53
+
54
+ ```ts
55
+ import { BlindWatermark } from 'watermark-js-plus'
56
+
57
+ const watermark = new BlindWatermark({
58
+ content: 'hello my watermark',
59
+ width: 200,
60
+ height: 200,
61
+ onSuccess: () => {
62
+ // success callback
63
+ }
64
+ })
65
+
66
+ watermark.create()
67
+ ```
68
+
69
+ ### Decode Blind Watermark
70
+
71
+ ```js
72
+ import { BlindWatermark } from 'watermark-js-plus'
73
+
74
+ BlindWatermark.decode({
75
+ url: uploadFile.url, // image url
76
+ onSuccess: (imageBase64) => {
77
+ // success callback
78
+ }
79
+ })
80
+ ```
81
+
82
+ ## Documentation
83
+
84
+ To learn more, check [its documentation](https://zhensherlock.github.io/watermark-js-plus).
85
+
86
+ ## License
87
+
88
+ [MIT](LICENSE).
package/package.json CHANGED
@@ -1,16 +1,15 @@
1
1
  {
2
2
  "name": "watermark-js-plus",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "description": "watermark for the browser",
5
- "main": "lib/watermark.js",
6
5
  "type": "module",
7
6
  "scripts": {
8
7
  "test": "echo \"Error: no test specified\" && exit 1",
9
8
  "prepare": "husky install",
10
9
  "lint": "npx eslint \"src/*.{ts,js}\"",
11
10
  "dev": "concurrently \"npm run src:dev\" \"npm run docs:dev\"",
12
- "src:dev": "rollup -c --watch",
13
- "build": "rollup -c --environment NODE_ENV:production && rollup -c",
11
+ "src:dev": "rollup -c --watch --bundleConfigAsCjs",
12
+ "build": "rollup -c --bundleConfigAsCjs --environment NODE_ENV:production",
14
13
  "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0 -n changelog-option.cjs",
15
14
  "docs:dev": "vitepress dev docs",
16
15
  "docs:build": "vitepress build docs",
@@ -37,6 +36,19 @@
37
36
  "防删除水印",
38
37
  "解密水印"
39
38
  ],
39
+ "exports": {
40
+ ".": {
41
+ "types": "./dist/index.js",
42
+ "require": "./dist/index.js",
43
+ "import": "./dist/index.js"
44
+ }
45
+ },
46
+ "main": "dist/index.js",
47
+ "module": "dist/index.js",
48
+ "types": "dist/index.js",
49
+ "files": [
50
+ "dist"
51
+ ],
40
52
  "devDependencies": {
41
53
  "@babel/core": "^7.20.5",
42
54
  "@babel/eslint-parser": "^7.19.1",
@@ -46,14 +58,14 @@
46
58
  "@commitlint/config-conventional": "^17.3.0",
47
59
  "@element-plus/icons-vue": "^2.0.10",
48
60
  "@rollup/plugin-babel": "^6.0.3",
49
- "@rollup/plugin-commonjs": "^23.0.3",
61
+ "@rollup/plugin-commonjs": "^23.0.4",
50
62
  "@rollup/plugin-eslint": "^9.0.1",
51
63
  "@rollup/plugin-node-resolve": "^15.0.1",
52
64
  "@rollup/plugin-replace": "^5.0.1",
53
- "@rollup/plugin-terser": "^0.1.0",
65
+ "@rollup/plugin-terser": "^0.2.0",
54
66
  "@rollup/plugin-typescript": "^10.0.1",
55
67
  "@types/markdown-it": "^12.2.3",
56
- "@typescript-eslint/parser": "^5.45.0",
68
+ "@typescript-eslint/parser": "^5.45.1",
57
69
  "@vue/theme": "^1.3.0",
58
70
  "concurrently": "^7.6.0",
59
71
  "conventional-changelog-angular": "^5.0.13",
@@ -67,12 +79,12 @@
67
79
  "husky": "^8.0.2",
68
80
  "lint-staged": "^13.1.0",
69
81
  "markdown-it": "^13.0.1",
70
- "rollup": "^3.5.1",
82
+ "rollup": "^3.7.0",
71
83
  "rollup-plugin-filesize": "^9.1.2",
72
84
  "rollup-plugin-your-function": "^0.4.3",
73
85
  "terser": "^5.16.1",
74
- "typescript": "^4.9.3",
86
+ "typescript": "^4.9.4",
75
87
  "unplugin-element-plus": "^0.4.1",
76
- "vitepress": "^1.0.0-alpha.29"
88
+ "vitepress": "^1.0.0-alpha.30"
77
89
  }
78
90
  }
package/.editorconfig DELETED
@@ -1,16 +0,0 @@
1
- # http://editorconfig.org
2
- root = true
3
-
4
- [*]
5
- indent_style = space
6
- indent_size = 2
7
- end_of_line = lf
8
- charset = utf-8
9
- trim_trailing_whitespace = true
10
- insert_final_newline = true
11
-
12
- [*.md]
13
- trim_trailing_whitespace = false
14
-
15
- [Makefile]
16
- indent_style = tab
package/.eslintignore DELETED
@@ -1,7 +0,0 @@
1
- */build/*.js
2
- */public
3
- dist
4
- .husky/
5
- lib
6
- */node_modules
7
- package-lock.json
package/.eslintrc.cjs DELETED
@@ -1,46 +0,0 @@
1
- module.exports = {
2
- parser: '@typescript-eslint/parser', // 解析器,默认使用Espree
3
- env: { // 指定脚本的运行环境。每种环境都有一组特定的预定义全局变量。
4
- browser: true, // 运行在浏览器
5
- es2021: true, // 支持es2021
6
- es6: true,
7
- },
8
- extends: [ // 使用的外部代码格式化配置文件
9
- 'semistandard',
10
- 'plugin:import/recommended'
11
- ],
12
- plugins: [
13
- 'import'
14
- ],
15
- parserOptions: {
16
- ecmaVersion: 12, // ecmaVersion 用来指定支持的 ECMAScript 版本 。默认为 5,即仅支持es5
17
- sourceType: 'module',
18
- },
19
- globals: { // 脚本在执行期间访问的额外的全局变量
20
- describe: true,
21
- it: true,
22
- after: true,
23
- before: true,
24
- afterEach: true,
25
- beforeEach: true,
26
- __BUILD__: true,
27
- __DEV__: true,
28
- __SIT__: true,
29
- __UAT__: true,
30
- __PROD__: true
31
- },
32
- rules: {
33
- // 启用的规则及其各自的错误级别。0(off) 1(warning) 2(error)
34
- 'no-console': 0,
35
- semi: [1, 'never'],
36
- quotes: [1, 'single'],
37
- 'no-unused-vars': 0,
38
- },
39
- settings: {
40
- 'import/resolver': {
41
- node: {
42
- extensions: ['.js', '.jsx', '.ts', '.tsx']
43
- }
44
- }
45
- },
46
- };
@@ -1,29 +0,0 @@
1
- name: deploy
2
-
3
- on:
4
- push:
5
- branches:
6
- - main
7
-
8
- jobs:
9
- deploy:
10
- runs-on: ubuntu-latest
11
- steps:
12
- - uses: actions/checkout@v3
13
- with:
14
- fetch-depth: 0
15
- - uses: actions/setup-node@v3
16
- with:
17
- node-version: 16
18
- cache: npm
19
- - run: npm ci
20
-
21
- - name: Build
22
- run: yarn docs:build
23
-
24
- - name: Deploy
25
- uses: peaceiris/actions-gh-pages@v3
26
- with:
27
- github_token: ${{ secrets.GITHUB_TOKEN }}
28
- publish_dir: docs/.vitepress/dist
29
- # cname: example.com # if wanna deploy to custom domain
@@ -1,32 +0,0 @@
1
- # This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2
- # For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
3
-
4
- name: npm-publish
5
-
6
- on:
7
- release:
8
- types: [created]
9
-
10
- jobs:
11
- build:
12
- runs-on: ubuntu-latest
13
- steps:
14
- - uses: actions/checkout@v3
15
- - uses: actions/setup-node@v3
16
- with:
17
- node-version: 16
18
- - run: npm ci
19
-
20
- publish-npm:
21
- needs: build
22
- runs-on: ubuntu-latest
23
- steps:
24
- - uses: actions/checkout@v3
25
- - uses: actions/setup-node@v3
26
- with:
27
- node-version: 16
28
- registry-url: https://registry.npmjs.org/
29
- - run: npm ci
30
- - run: npm publish
31
- env:
32
- NODE_AUTH_TOKEN: ${{secrets.npm_token}}
package/.husky/commit-msg DELETED
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env sh
2
- . "$(dirname -- "$0")/_/husky.sh"
3
-
4
- npx --no-install commitlint --edit ""
package/.husky/pre-commit DELETED
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env sh
2
- . "$(dirname -- "$0")/_/husky.sh"
3
-
4
- npm run lint-changelog
package/.prettierrc DELETED
@@ -1,10 +0,0 @@
1
- {
2
- "tabWidth": 2,
3
- "useTabs": false,
4
- "semi": false,
5
- "singleQuote": true,
6
- "TrailingComma": "all",
7
- "bracketSpacing": true,
8
- "jsxBracketSameLine": false,
9
- "arrowParens": "avoid"
10
- }
package/CHANGELOG.md DELETED
@@ -1,18 +0,0 @@
1
- ## [0.0.2](https://github.com/zhensherlock/watermark-js-plus/compare/v0.0.1...v0.0.2) (2022-12-07)
2
-
3
-
4
- ### ✨ Features | 新功能
5
-
6
- * optimize parent element logic ([836a1ee](https://github.com/zhensherlock/watermark-js-plus/commit/836a1eed2319c42444bdb6362dbf8114ab9bcf0e))
7
-
8
-
9
-
10
- ## [0.0.1](https://github.com/zhensherlock/watermark-js-plus/compare/fb530a78a35020947fec230142a131b56b3588b4...v0.0.1) (2022-12-05)
11
-
12
-
13
- ### ✨ Features | 新功能
14
-
15
- * add initial version ([fb530a7](https://github.com/zhensherlock/watermark-js-plus/commit/fb530a78a35020947fec230142a131b56b3588b4))
16
-
17
-
18
-
package/babel.config.cjs DELETED
@@ -1,23 +0,0 @@
1
- const presets = [
2
- [
3
- '@babel/preset-env',
4
- {
5
- useBuiltIns: 'usage',
6
- corejs: { version: 3 },
7
- targets: [
8
- '> 1%',
9
- 'Firefox ESR',
10
- 'last 4 versions',
11
- 'maintained node versions',
12
- 'not dead',
13
- 'safari >= 7'
14
- ],
15
- },
16
- ],
17
- ]
18
-
19
- const plugins = [
20
- '@babel/plugin-transform-runtime'
21
- ]
22
-
23
- module.exports = { presets, plugins }
@@ -1,87 +0,0 @@
1
- const compareFunc = require('compare-func')
2
-
3
- module.exports = {
4
- writerOpts: {
5
- transform: (commit, context) => {
6
- let discard = true
7
- const issues = []
8
-
9
- commit.notes.forEach(note => {
10
- note.title = 'BREAKING CHANGES'
11
- discard = false
12
- })
13
- if (commit.type === 'feat') {
14
- commit.type = '✨ Features | 新功能'
15
- } else if (commit.type === 'fix') {
16
- commit.type = '🐛 Bug Fixes | Bug 修复'
17
- } else if (commit.type === 'perf') {
18
- commit.type = '⚡ Performance Improvements | 性能优化'
19
- } else if (commit.type === 'revert' || commit.revert) {
20
- commit.type = '⏪ Reverts | 回退'
21
- } else if (discard) {
22
- return
23
- } else if (commit.type === 'refactor') {
24
- commit.type = '♻ Code Refactoring | 代码重构'
25
- } else if (commit.type === 'test') {
26
- commit.type = '✅ Tests | 测试'
27
- } else if (commit.type === 'build') {
28
- commit.type = '👷‍ Build System | 构建'
29
- } else if (commit.type === 'ci') {
30
- commit.type = '🔧 Continuous Integration | CI 配置'
31
- } else if (commit.type === 'chore') {
32
- commit.type = '🎫 Chores | 其他更新'
33
- } else if (commit.type === 'style') {
34
- commit.type = '💄 Styles | 风格'
35
- } else if (commit.type === 'docs') {
36
- commit.type = '📝 Documentation | 文档'
37
- }
38
-
39
- if (commit.scope === '*') {
40
- commit.scope = ''
41
- }
42
-
43
- if (typeof commit.hash === 'string') {
44
- commit.shortHash = commit.hash.substring(0, 7)
45
- }
46
-
47
- if (typeof commit.subject === 'string') {
48
- let url = context.repository
49
- ? `${context.host}/${context.owner}/${context.repository}`
50
- : context.repoUrl
51
-
52
- if (url) {
53
- url = `${url}/issues/`
54
- // Issue URLs.
55
- commit.subject = commit.subject.replace(/#([0-9]+)/g, (_, issue) => {
56
- issues.push(issue)
57
- return `[#${issue}](${url}${issue})`
58
- })
59
- }
60
-
61
- if (context.host) {
62
- // User URLs.
63
- commit.subject = commit.subject.replace(/\B@([a-z0-9](?:-?[a-z0-9/]){0,38})/g, (_, username) => {
64
- if (username.includes('/')) {
65
- return `@${username}`
66
- }
67
- return `[@${username}](${context.host}/${username})`
68
- })
69
- }
70
- }
71
-
72
- // remove references that already appear in the subject
73
- commit.references = commit.references.filter(reference => {
74
- if (issues.indexOf(reference.issue) === -1) {
75
- return true
76
- }
77
- return false
78
- })
79
- return commit
80
- },
81
- groupBy: 'type',
82
- commitGroupsSort: 'title',
83
- commitsSort: ['scope', 'subject'],
84
- noteGroupsSort: 'title',
85
- notesSort: compareFunc
86
- }
87
- }
@@ -1,26 +0,0 @@
1
- module.exports = {
2
- extends: ['@commitlint/config-conventional'],
3
- rules: {
4
- // type 类型定义,表示 git 提交的 type 必须在以下类型范围内
5
- 'type-enum': [
6
- 2,
7
- 'always',
8
- [
9
- 'feat', // 新功能
10
- 'fix', // 修复
11
- 'docs', // 文档变更
12
- 'style', // 代码格式
13
- 'refactor', // 重构
14
- 'pref', // 性能优化
15
- 'test', // 增加测试
16
- 'build', // 构建
17
- 'ci', // CI配置
18
- 'chore', // 构建过程或辅助工具的变动
19
- 'revert', // 回退
20
- 'build' // 打包
21
- ]
22
- ],
23
- // subject 大小写不做校验
24
- 'subject-case': [0]
25
- }
26
- };
@@ -1,103 +0,0 @@
1
- import { version } from '../../package.json'
2
- import zh_CN from './locales/zh-CN'
3
-
4
- export default {
5
- title: 'watermark-js-plus',
6
- description: 'A watermark plugin',
7
- base: '/watermark-js-plus',
8
- head: [
9
- ['link', { rel: 'shortcut icon', href: '/watermark-js-plus/favicons/favicon-64x64.png' }],
10
- ['link', { rel: 'apple-touch-icon', sizes: '180x180', href: '/watermark-js-plus/favicons/apple-touch-icon.png' }],
11
- // ['link', { rel: 'icon', type: 'image/png', sizes: '32x32', href: '/favicons/favicon-32x32.png' }],
12
- // ['link', { rel: 'icon', type: 'image/png', sizes: '16x16', href: '/favicons/favicon-16x16.png' }],
13
- // ['link', { rel: "manifest", href: "/assets/favicons/site.webmanifest"}],
14
- // ['link', { rel: "mask-icon", href: "/assets/favicons/safari-pinned-tab.svg", color: "#3a0839"}],
15
- // ['meta', { name: "msapplication-TileColor", content: "#3a0839"}],
16
- // ['meta', { name: "msapplication-config", content: "/assets/favicons/browserconfig.xml"}],
17
- // ['meta', { name: "theme-color", content: "#ffffff"}],
18
- ],
19
- themeConfig: {
20
- logo: '/logo.png',
21
- nav: [
22
- { text: 'Guide', link: '/guide/what-is-this', activeMatch: '/guide/' },
23
- { text: 'Configs', link: '/config/', activeMatch: '/config/' },
24
- {
25
- text: version,
26
- items: [
27
- {
28
- text: 'Changelog',
29
- link: 'https://github.com/zhensherlock/watermark-js-plus/blob/main/CHANGELOG.md'
30
- },
31
- // {
32
- // text: 'Contributing',
33
- // link: 'https://github.com/zhensherlock/watermark-js-plus/blob/main/.github/contributing.md'
34
- // }
35
- ]
36
- }
37
- ],
38
- socialLinks: [
39
- { icon: 'github', link: 'https://github.com/zhensherlock/watermark-js-plus' },
40
- ],
41
- sidebar: {
42
- '/guide': [
43
- {
44
- text: 'Guide',
45
- // collapsible: true,
46
- items: [
47
- { text: 'Introduce', link: '/guide/what-is-this' },
48
- { text: 'Getting Started', link: '/guide/getting-started' },
49
- { text: 'Watermark', link: '/guide/watermark' },
50
- { text: 'Blind Watermark', link: '/guide/blind-watermark' },
51
- ]
52
- }
53
- ],
54
- '/config': [
55
- {
56
- text: 'Config',
57
- // collapsible: true,
58
- items: [
59
- { text: 'Basic Config', link: '/config/' },
60
- { text: 'Blind Watermark Config', link: '/config/blind' },
61
- { text: 'Blind Watermark Decode', link: '/config/blind-decode' },
62
- ]
63
- }
64
- ]
65
- },
66
- algolia: {
67
- appId: 'V6CF28P0PS',
68
- apiKey: '692752b7b3c6f794997d8ae22aed79fa',
69
- indexName: 'dev_docs'
70
- },
71
- footer: {
72
- message: 'Released under the MIT License.',
73
- copyright: 'Copyright © 2021-present Michael Sun'
74
- },
75
- locales: {
76
- '/zh/': zh_CN
77
- },
78
- localeLinks: {
79
- // text: 'English',
80
- items: [
81
- { text: 'English', link: '/' },
82
- { text: '简体中文', link: '/zh/' },
83
- ]
84
- },
85
- },
86
- markdown: {
87
- lineNumbers: true
88
- },
89
- locales: {
90
- '/': {
91
- lang: 'en-US',
92
- title: 'watermark-js-plus',
93
- description: 'A watermark plugin',
94
- },
95
- '/zh/': {
96
- lang: 'zh-CN',
97
- description: '一个水印插件',
98
- outlineTitle: '本页目录',
99
- lastUpdatedText: '上次更新',
100
- base: '/zh/',
101
- }
102
- }
103
- }
@@ -1,51 +0,0 @@
1
- import { version } from '../../../package.json'
2
-
3
- export default {
4
- outlineTitle: '本页目录',
5
- lastUpdatedText: '上次更新',
6
- nav: [
7
- { text: '指南', link: '/zh/guide/what-is-this', activeMatch: '/guide/' },
8
- { text: '配置项', link: '/zh/config/', activeMatch: '/config/' },
9
- {
10
- text: version,
11
- items: [
12
- {
13
- text: '更新日志',
14
- link: 'https://github.com/zhensherlock/watermark-js-plus/blob/main/CHANGELOG.md'
15
- },
16
- // {
17
- // text: '贡献',
18
- // link: 'https://github.com/vuejs/vitepress/blob/main/.github/contributing.md'
19
- // }
20
- ]
21
- }
22
- ],
23
- sidebar: {
24
- '/zh/guide': [
25
- {
26
- text: '向导',
27
- // collapsible: true,
28
- items: [
29
- { text: '介绍', link: '/zh/guide/what-is-this' },
30
- { text: '开始使用', link: '/zh/guide/getting-started' },
31
- { text: '水印', link: '/zh/guide/watermark' },
32
- { text: '暗水印', link: '/zh/guide/blink-watermark' },
33
- ]
34
- }
35
- ],
36
- '/zh/config': [
37
- {
38
- text: '配置',
39
- // collapsible: true,
40
- items: [
41
- { text: '基础配置项', link: '/zh/config/' },
42
- { text: '暗水印配置项', link: '/zh/config/blind' },
43
- { text: '暗水印解码配置项', link: '/zh/config/blind-decode' },
44
- ]
45
- }
46
- ]
47
- },
48
- footer: {
49
- message: '本中文文档内容版权为 Michael Sun 所有,保留所有权利。'
50
- },
51
- }
@@ -1,12 +0,0 @@
1
- import DefaultTheme from 'vitepress/theme'
2
- import 'element-plus/dist/index.css'
3
- export default {
4
- ...DefaultTheme,
5
- enhanceApp: async ({ app, router, siteData, isServer }: any) => {
6
- // app is the Vue 3 app instance from `createApp()`. router is VitePress'
7
- // custom router. `siteData`` is a `ref`` of current site-level metadata.
8
- import('element-plus').then((module) => {
9
- app.use(module)
10
- })
11
- }
12
- }
@@ -1,33 +0,0 @@
1
- ---
2
- layout: doc
3
- ---
4
- # Blind Watermark Decode
5
-
6
- ## url
7
-
8
- - **Type:** `string`
9
- - **Default:** `''`
10
-
11
- Decoding picture path.
12
-
13
- ## mode
14
-
15
- - **Type:** `string`
16
- - **Default:** `'canvas'`
17
- - **available values**: `'canvas'`
18
-
19
- Mode of decoding.
20
-
21
- ## fillColor
22
-
23
- - **Type:** `string`
24
- - **Default:** `'#000'`
25
-
26
- fill color.
27
-
28
- ## compositeOperation
29
-
30
- - **Type:** `string`
31
- - **Default:** `'color-burn'`
32
-
33
- composite operation.