Skip to content

Commit

Permalink
Update docs & metadata to prepare for late release
Browse files Browse the repository at this point in the history
  • Loading branch information
shivaprsd committed Jul 7, 2024
1 parent 9e49e7d commit ca641f4
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 12 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# v2.4 (2024-07-07)

- Update: target PDF.js v4.1: support Stamps and Highlights
- Feature: enable non-viewer integration and general usage
- Refactor: separate the theme engine, components into modules
- Refactor: make awaiting PDF.js eventBus reusable
- Improvement: wrap setters to proactively calculate styles
- Improvement: drop storing canvas, minimize checking background
- Fix: map colors to gradient if no accents were provided


# v2.3 (2023-02-08)

### Release version 2.3
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2020-2023 Shiva Prasad
Copyright (c) 2020-2024 Shiva Prasad

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
17 changes: 12 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,28 @@ Hence it runs only in modern browsers that supports `import` and `export`.
For your own deployment of the PDF.js viewer:

1. [Download][3] the latest version (or clone this repo)
2. Copy the files in the `addon/` directory to some directory on your server\
2. Copy the `addon/` and `lib/` directories to some directory on your server\
(e.g. `/pdfjs-dist/addons/doq/`)
3. Include `doq.js` as a module in the `viewer.html` of your deployment:
3. Include `addon/doq.js` as a module in the `viewer.html` of your deployment:

```js
<script type="module" src="/path/to/doq.js"></script>
<script type="module" src="/path/to/addon/doq.js"></script>
```
4. The global add-on object can be accessed later as `window.DOQ`.

*doq* targets the default generic viewer of PDF.js. It should also work in
Alternatively, to simply import as an ES6 module:
`import doq from "path/to/lib/doq.js"`.

Please check the exported functions of `lib/api.js` for the API for both the
global add-on object and the module import.

The add-on targets the default generic viewer of PDF.js. It should also work in
custom viewers built on top of that. Feel free to open an issue if it breaks in
your viewer.

### Defining colors

Color schemes are defined in `addon/colors.json`, which you can extend. Only
Color schemes are defined in `lib/colors.json`, which you can extend. Only
6-digit RGB hex codes are currently supported.

Each color scheme can have up to *three* tones. `background` and `foreground`
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@
"license": "MIT",
"author": "Shiva Prasad <shivapv@pm.me>",
"contributors": [],
"dependencies": [],
"dependencies": {},
"repository": {
"type": "git",
"url": "https://github.com/shivaprsd/doq.git"
},
"type": "add-on",
"type": "module",
"target": "@mozilla/pdf.js",
"main": "addon/doq.js",
"version": "2.3",
"main": "lib/doq.js",
"version": "2.4",
"pdfjs_version": {
"minimum": "2.7.570",
"target": "3.2.146"
"minimum": "2.10.377",
"target": "4.1.392"
}
}

0 comments on commit ca641f4

Please sign in to comment.