@embedpdf/plugin-annotation 2.13.0 → 2.14.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.
Files changed (53) hide show
  1. package/dist/index.cjs +1 -1
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.js +522 -7
  4. package/dist/index.js.map +1 -1
  5. package/dist/lib/annotation-plugin.d.ts +25 -0
  6. package/dist/lib/handlers/callout-free-text.handler.d.ts +3 -0
  7. package/dist/lib/handlers/index.d.ts +1 -0
  8. package/dist/lib/handlers/types.d.ts +7 -1
  9. package/dist/lib/helpers.d.ts +8 -0
  10. package/dist/lib/patching/patch-utils.d.ts +38 -1
  11. package/dist/lib/patching/patches/callout-freetext.patch.d.ts +3 -0
  12. package/dist/lib/patching/patches/index.d.ts +1 -0
  13. package/dist/lib/tools/default-tools.d.ts +35 -0
  14. package/dist/lib/types.d.ts +21 -2
  15. package/dist/preact/index.cjs +1 -1
  16. package/dist/preact/index.cjs.map +1 -1
  17. package/dist/preact/index.js +422 -32
  18. package/dist/preact/index.js.map +1 -1
  19. package/dist/react/index.cjs +1 -1
  20. package/dist/react/index.cjs.map +1 -1
  21. package/dist/react/index.js +422 -32
  22. package/dist/react/index.js.map +1 -1
  23. package/dist/shared/components/annotation-container.d.ts +13 -1
  24. package/dist/shared/components/annotations/callout-free-text-preview.d.ts +15 -0
  25. package/dist/shared/components/annotations/callout-free-text.d.ts +15 -0
  26. package/dist/shared/components/types.d.ts +12 -0
  27. package/dist/shared-preact/components/annotation-container.d.ts +13 -1
  28. package/dist/shared-preact/components/annotations/callout-free-text-preview.d.ts +15 -0
  29. package/dist/shared-preact/components/annotations/callout-free-text.d.ts +15 -0
  30. package/dist/shared-preact/components/types.d.ts +12 -0
  31. package/dist/shared-react/components/annotation-container.d.ts +13 -1
  32. package/dist/shared-react/components/annotations/callout-free-text-preview.d.ts +15 -0
  33. package/dist/shared-react/components/annotations/callout-free-text.d.ts +15 -0
  34. package/dist/shared-react/components/types.d.ts +12 -0
  35. package/dist/svelte/components/annotations/CalloutFreeText.svelte.d.ts +15 -0
  36. package/dist/svelte/components/annotations/CalloutFreeTextPreview.svelte.d.ts +10 -0
  37. package/dist/svelte/components/renderers/CalloutFreeTextRenderer.svelte.d.ts +5 -0
  38. package/dist/svelte/components/types.d.ts +12 -0
  39. package/dist/svelte/index.cjs +1 -1
  40. package/dist/svelte/index.cjs.map +1 -1
  41. package/dist/svelte/index.js +528 -106
  42. package/dist/svelte/index.js.map +1 -1
  43. package/dist/svelte/types.d.ts +12 -0
  44. package/dist/vue/components/annotation-container.vue.d.ts +12 -0
  45. package/dist/vue/components/annotations/callout-free-text-preview.vue.d.ts +10 -0
  46. package/dist/vue/components/annotations/callout-free-text.vue.d.ts +25 -0
  47. package/dist/vue/components/renderers/callout-free-text-renderer.vue.d.ts +6 -0
  48. package/dist/vue/index.cjs +1 -1
  49. package/dist/vue/index.cjs.map +1 -1
  50. package/dist/vue/index.js +601 -211
  51. package/dist/vue/index.js.map +1 -1
  52. package/dist/vue/types.d.ts +12 -0
  53. package/package.json +12 -12
@@ -5,6 +5,18 @@ export interface AnnotationSelectionContext {
5
5
  type: 'annotation';
6
6
  annotation: TrackedAnnotation;
7
7
  pageIndex: number;
8
+ /**
9
+ * Derived: PDF `locked` flag is set OR the annotation is non-interactive.
10
+ * Consumers should disable move/resize/rotate/delete/property-change menu items
11
+ * when this is true.
12
+ */
13
+ structurallyLocked: boolean;
14
+ /**
15
+ * Derived: PDF `lockedContents` flag is set OR the annotation is non-interactive.
16
+ * Consumers should disable content-editing menu items (e.g. FreeText text edit)
17
+ * when this is true.
18
+ */
19
+ contentLocked: boolean;
8
20
  }
9
21
  export interface GroupSelectionContext {
10
22
  type: 'group';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@embedpdf/plugin-annotation",
3
- "version": "2.13.0",
3
+ "version": "2.14.1",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "main": "./dist/index.cjs",
@@ -35,18 +35,18 @@
35
35
  }
36
36
  },
37
37
  "dependencies": {
38
- "@embedpdf/models": "2.13.0",
39
- "@embedpdf/utils": "2.13.0"
38
+ "@embedpdf/models": "2.14.1",
39
+ "@embedpdf/utils": "2.14.1"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@types/react": "^18.2.0",
43
43
  "@types/react-dom": "^18.2.0",
44
44
  "typescript": "^5.0.0",
45
45
  "@embedpdf/build": "1.1.0",
46
- "@embedpdf/plugin-interaction-manager": "2.13.0",
47
- "@embedpdf/plugin-selection": "2.13.0",
48
- "@embedpdf/plugin-scroll": "2.13.0",
49
- "@embedpdf/plugin-history": "2.13.0"
46
+ "@embedpdf/plugin-selection": "2.14.1",
47
+ "@embedpdf/plugin-interaction-manager": "2.14.1",
48
+ "@embedpdf/plugin-history": "2.14.1",
49
+ "@embedpdf/plugin-scroll": "2.14.1"
50
50
  },
51
51
  "peerDependencies": {
52
52
  "react": ">=16.8.0",
@@ -54,11 +54,11 @@
54
54
  "preact": "^10.26.4",
55
55
  "vue": ">=3.2.0",
56
56
  "svelte": ">=5 <6",
57
- "@embedpdf/core": "2.13.0",
58
- "@embedpdf/plugin-selection": "2.13.0",
59
- "@embedpdf/plugin-scroll": "2.13.0",
60
- "@embedpdf/plugin-interaction-manager": "2.13.0",
61
- "@embedpdf/plugin-history": "2.13.0"
57
+ "@embedpdf/plugin-interaction-manager": "2.14.1",
58
+ "@embedpdf/core": "2.14.1",
59
+ "@embedpdf/plugin-history": "2.14.1",
60
+ "@embedpdf/plugin-selection": "2.14.1",
61
+ "@embedpdf/plugin-scroll": "2.14.1"
62
62
  },
63
63
  "files": [
64
64
  "dist",