@tobyt/expo-pdf-markup 2.0.0-next.20261121205329 → 2.1.0
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/CHANGELOG.md +15 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @tobyt/expo-pdf-markup
|
|
2
2
|
|
|
3
|
+
## 2.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 9ea74e1: Smaller, more portable ink in annotation sets, on iOS, Android and web.
|
|
8
|
+
|
|
9
|
+
- **Reading:** every platform now reads ink points in object form (`{"x": …, "y": …}`), array form (`[x, y]`) or a mix of both within one ink stroke. A malformed ink point, or an ink stroke that isn't an array, is skipped and the rest of the annotation set still loads (previously iOS and Android could reject the whole set, and web could draw `NaN`).
|
|
10
|
+
- **Writing:** ink coordinates are now rounded to the nearest 0.1 pt (at most one decimal digit, whole numbers without `.0`) and consecutive duplicate ink points within an ink stroke are dropped; a stroke that collapses to a single point is kept as two identical points so it still draws as a dot. This clean-up happens only when an annotation set is written, identically on every platform: ink points keep full precision while drawing and moving, and bounds and all other fields are written exactly as before. Ink points are still written in object form by default, but the coordinate values written will differ slightly from earlier releases. Loading an annotation set writes nothing and doesn't fire `onAnnotationsChanged`.
|
|
11
|
+
- **New `inkPointFormat` prop:** `'object'` (the default) or `'array'`, which makes ink-heavy annotation sets noticeably smaller; `version` stays at 1. Changing the prop doesn't write anything or fire `onAnnotationsChanged`; it applies from the next edit, when any annotation set loaded in either form is written in the chosen form. Only choose `'array'` once every version of your app that might read the annotation set includes this release or a later one, because earlier releases can't read array form.
|
|
12
|
+
- **New exports:** a platform-neutral `parseAnnotations(json)` helper, which reads either form and always returns ink points in object form (throwing on JSON that can't be parsed or has no `annotations` array), and the `AnnotationPointArray` and `InkPointFormat` types. `AnnotationPoint` and `InkAnnotation` are unchanged.
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- bcb86ff: Tested with Expo SDK 58 and React Native 0.88.
|
|
17
|
+
|
|
3
18
|
## 2.0.0
|
|
4
19
|
|
|
5
20
|
### Major Changes
|