@embedpdf/plugin-annotation 2.15.0 → 3.0.0-next.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.
- package/LICENSE +192 -21
- package/dist/capability-fghl0JmE.js +2680 -0
- package/dist/capability-fghl0JmE.js.map +1 -0
- package/dist/capability-hb2AU0f6.cjs +2739 -0
- package/dist/capability-hb2AU0f6.cjs.map +1 -0
- package/dist/index.cjs +593 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +65 -0
- package/dist/index.d.ts +65 -1
- package/dist/index.js +562 -6998
- package/dist/index.js.map +1 -1
- package/dist/internal.cjs +5 -0
- package/dist/internal.d.cts +13 -0
- package/dist/internal.d.ts +13 -0
- package/dist/internal.js +2 -0
- package/dist/types-BhWgqgbX.d.cts +879 -0
- package/dist/types-Da6JRmhw.d.ts +879 -0
- package/package.json +26 -66
- package/dist/lib/actions.d.ts +0 -192
- package/dist/lib/annotation-plugin.d.ts +0 -310
- package/dist/lib/geometry/cloudy-border.d.ts +0 -90
- package/dist/lib/geometry/index.d.ts +0 -2
- package/dist/lib/geometry/rotation.d.ts +0 -32
- package/dist/lib/handlers/callout-free-text.handler.d.ts +0 -3
- package/dist/lib/handlers/circle.handler.d.ts +0 -3
- package/dist/lib/handlers/click-detector.d.ts +0 -27
- package/dist/lib/handlers/free-text.handler.d.ts +0 -3
- package/dist/lib/handlers/index.d.ts +0 -14
- package/dist/lib/handlers/ink.handler.d.ts +0 -3
- package/dist/lib/handlers/insert-text.handler.d.ts +0 -8
- package/dist/lib/handlers/line.handler.d.ts +0 -3
- package/dist/lib/handlers/link.handler.d.ts +0 -3
- package/dist/lib/handlers/polygon.handler.d.ts +0 -3
- package/dist/lib/handlers/polyline.handler.d.ts +0 -3
- package/dist/lib/handlers/replace-text.handler.d.ts +0 -9
- package/dist/lib/handlers/selection-utils.d.ts +0 -7
- package/dist/lib/handlers/square.handler.d.ts +0 -3
- package/dist/lib/handlers/stamp.handler.d.ts +0 -3
- package/dist/lib/handlers/text-markup.handler.d.ts +0 -7
- package/dist/lib/handlers/text.handler.d.ts +0 -3
- package/dist/lib/handlers/types.d.ts +0 -176
- package/dist/lib/helpers.d.ts +0 -46
- package/dist/lib/index.d.ts +0 -21
- package/dist/lib/manifest.d.ts +0 -4
- package/dist/lib/patching/base-patch.d.ts +0 -87
- package/dist/lib/patching/index.d.ts +0 -6
- package/dist/lib/patching/insert-upright.d.ts +0 -20
- package/dist/lib/patching/line-ending-handlers.d.ts +0 -20
- package/dist/lib/patching/line-endings.d.ts +0 -13
- package/dist/lib/patching/patch-registry.d.ts +0 -40
- package/dist/lib/patching/patch-utils.d.ts +0 -97
- package/dist/lib/patching/patches/callout-freetext.patch.d.ts +0 -3
- package/dist/lib/patching/patches/circle.patch.d.ts +0 -3
- package/dist/lib/patching/patches/freetext.patch.d.ts +0 -3
- package/dist/lib/patching/patches/index.d.ts +0 -9
- package/dist/lib/patching/patches/ink.patch.d.ts +0 -3
- package/dist/lib/patching/patches/line.patch.d.ts +0 -3
- package/dist/lib/patching/patches/polygon.patch.d.ts +0 -3
- package/dist/lib/patching/patches/polyline.patch.d.ts +0 -3
- package/dist/lib/patching/patches/square.patch.d.ts +0 -3
- package/dist/lib/patching/patches/stamp.patch.d.ts +0 -3
- package/dist/lib/reducer.d.ts +0 -6
- package/dist/lib/selectors.d.ts +0 -139
- package/dist/lib/tools/default-tools.d.ts +0 -521
- package/dist/lib/tools/tools-utils.d.ts +0 -453
- package/dist/lib/tools/types.d.ts +0 -209
- package/dist/lib/types.d.ts +0 -671
- package/dist/lib/utils/index.d.ts +0 -1
- package/dist/lib/utils/use-state.d.ts +0 -12
- package/dist/preact/adapter.d.ts +0 -14
- package/dist/preact/core.d.ts +0 -1
- package/dist/preact/index.cjs +0 -2
- package/dist/preact/index.cjs.map +0 -1
- package/dist/preact/index.d.ts +0 -1
- package/dist/preact/index.js +0 -4013
- package/dist/preact/index.js.map +0 -1
- package/dist/preact/interaction-manager.d.ts +0 -1
- package/dist/preact/selection.d.ts +0 -1
- package/dist/preact/utils.d.ts +0 -1
- package/dist/react/adapter.d.ts +0 -6
- package/dist/react/core.d.ts +0 -1
- package/dist/react/index.cjs +0 -2
- package/dist/react/index.cjs.map +0 -1
- package/dist/react/index.d.ts +0 -1
- package/dist/react/index.js +0 -4014
- package/dist/react/index.js.map +0 -1
- package/dist/react/interaction-manager.d.ts +0 -1
- package/dist/react/selection.d.ts +0 -1
- package/dist/react/utils.d.ts +0 -1
- package/dist/shared/annotation-bounds.d.ts +0 -14
- package/dist/shared/components/annotation-container.d.ts +0 -71
- package/dist/shared/components/annotation-layer.d.ts +0 -33
- package/dist/shared/components/annotation-navigation-handler.d.ts +0 -1
- package/dist/shared/components/annotation-paint-layer.d.ts +0 -7
- package/dist/shared/components/annotations/callout-free-text-preview.d.ts +0 -15
- package/dist/shared/components/annotations/callout-free-text.d.ts +0 -15
- package/dist/shared/components/annotations/caret.d.ts +0 -24
- package/dist/shared/components/annotations/circle.d.ts +0 -35
- package/dist/shared/components/annotations/free-text.d.ts +0 -17
- package/dist/shared/components/annotations/ink.d.ts +0 -27
- package/dist/shared/components/annotations/line.d.ts +0 -35
- package/dist/shared/components/annotations/link-locked.d.ts +0 -3
- package/dist/shared/components/annotations/link.d.ts +0 -28
- package/dist/shared/components/annotations/polygon.d.ts +0 -23
- package/dist/shared/components/annotations/polyline.d.ts +0 -23
- package/dist/shared/components/annotations/square.d.ts +0 -35
- package/dist/shared/components/annotations/stamp.d.ts +0 -13
- package/dist/shared/components/annotations/text.d.ts +0 -14
- package/dist/shared/components/annotations.d.ts +0 -22
- package/dist/shared/components/appearance-image.d.ts +0 -12
- package/dist/shared/components/built-in-renderers.d.ts +0 -2
- package/dist/shared/components/group-selection-box.d.ts +0 -40
- package/dist/shared/components/index.d.ts +0 -2
- package/dist/shared/components/preview-renderer.d.ts +0 -8
- package/dist/shared/components/render-annotation.d.ts +0 -13
- package/dist/shared/components/text-markup/highlight.d.ts +0 -16
- package/dist/shared/components/text-markup/squiggly.d.ts +0 -16
- package/dist/shared/components/text-markup/strikeout.d.ts +0 -16
- package/dist/shared/components/text-markup/underline.d.ts +0 -16
- package/dist/shared/components/text-markup.d.ts +0 -7
- package/dist/shared/components/types.d.ts +0 -253
- package/dist/shared/context/index.d.ts +0 -1
- package/dist/shared/context/renderer-registry.d.ts +0 -21
- package/dist/shared/hooks/index.d.ts +0 -2
- package/dist/shared/hooks/use-annotation.d.ts +0 -19
- package/dist/shared/hooks/use-ios-zoom-prevention.d.ts +0 -16
- package/dist/shared/index.d.ts +0 -6
- package/dist/shared/types.d.ts +0 -10
- package/dist/shared-preact/annotation-bounds.d.ts +0 -14
- package/dist/shared-preact/components/annotation-container.d.ts +0 -71
- package/dist/shared-preact/components/annotation-layer.d.ts +0 -33
- package/dist/shared-preact/components/annotation-navigation-handler.d.ts +0 -1
- package/dist/shared-preact/components/annotation-paint-layer.d.ts +0 -7
- package/dist/shared-preact/components/annotations/callout-free-text-preview.d.ts +0 -15
- package/dist/shared-preact/components/annotations/callout-free-text.d.ts +0 -15
- package/dist/shared-preact/components/annotations/caret.d.ts +0 -24
- package/dist/shared-preact/components/annotations/circle.d.ts +0 -35
- package/dist/shared-preact/components/annotations/free-text.d.ts +0 -17
- package/dist/shared-preact/components/annotations/ink.d.ts +0 -27
- package/dist/shared-preact/components/annotations/line.d.ts +0 -35
- package/dist/shared-preact/components/annotations/link-locked.d.ts +0 -3
- package/dist/shared-preact/components/annotations/link.d.ts +0 -28
- package/dist/shared-preact/components/annotations/polygon.d.ts +0 -23
- package/dist/shared-preact/components/annotations/polyline.d.ts +0 -23
- package/dist/shared-preact/components/annotations/square.d.ts +0 -35
- package/dist/shared-preact/components/annotations/stamp.d.ts +0 -13
- package/dist/shared-preact/components/annotations/text.d.ts +0 -14
- package/dist/shared-preact/components/annotations.d.ts +0 -22
- package/dist/shared-preact/components/appearance-image.d.ts +0 -12
- package/dist/shared-preact/components/built-in-renderers.d.ts +0 -2
- package/dist/shared-preact/components/group-selection-box.d.ts +0 -40
- package/dist/shared-preact/components/index.d.ts +0 -2
- package/dist/shared-preact/components/preview-renderer.d.ts +0 -8
- package/dist/shared-preact/components/render-annotation.d.ts +0 -13
- package/dist/shared-preact/components/text-markup/highlight.d.ts +0 -16
- package/dist/shared-preact/components/text-markup/squiggly.d.ts +0 -16
- package/dist/shared-preact/components/text-markup/strikeout.d.ts +0 -16
- package/dist/shared-preact/components/text-markup/underline.d.ts +0 -16
- package/dist/shared-preact/components/text-markup.d.ts +0 -7
- package/dist/shared-preact/components/types.d.ts +0 -253
- package/dist/shared-preact/context/index.d.ts +0 -1
- package/dist/shared-preact/context/renderer-registry.d.ts +0 -21
- package/dist/shared-preact/hooks/index.d.ts +0 -2
- package/dist/shared-preact/hooks/use-annotation.d.ts +0 -19
- package/dist/shared-preact/hooks/use-ios-zoom-prevention.d.ts +0 -15
- package/dist/shared-preact/index.d.ts +0 -6
- package/dist/shared-preact/types.d.ts +0 -10
- package/dist/shared-react/annotation-bounds.d.ts +0 -14
- package/dist/shared-react/components/annotation-container.d.ts +0 -71
- package/dist/shared-react/components/annotation-layer.d.ts +0 -33
- package/dist/shared-react/components/annotation-navigation-handler.d.ts +0 -1
- package/dist/shared-react/components/annotation-paint-layer.d.ts +0 -7
- package/dist/shared-react/components/annotations/callout-free-text-preview.d.ts +0 -15
- package/dist/shared-react/components/annotations/callout-free-text.d.ts +0 -15
- package/dist/shared-react/components/annotations/caret.d.ts +0 -24
- package/dist/shared-react/components/annotations/circle.d.ts +0 -35
- package/dist/shared-react/components/annotations/free-text.d.ts +0 -17
- package/dist/shared-react/components/annotations/ink.d.ts +0 -27
- package/dist/shared-react/components/annotations/line.d.ts +0 -35
- package/dist/shared-react/components/annotations/link-locked.d.ts +0 -3
- package/dist/shared-react/components/annotations/link.d.ts +0 -28
- package/dist/shared-react/components/annotations/polygon.d.ts +0 -23
- package/dist/shared-react/components/annotations/polyline.d.ts +0 -23
- package/dist/shared-react/components/annotations/square.d.ts +0 -35
- package/dist/shared-react/components/annotations/stamp.d.ts +0 -13
- package/dist/shared-react/components/annotations/text.d.ts +0 -14
- package/dist/shared-react/components/annotations.d.ts +0 -22
- package/dist/shared-react/components/appearance-image.d.ts +0 -12
- package/dist/shared-react/components/built-in-renderers.d.ts +0 -2
- package/dist/shared-react/components/group-selection-box.d.ts +0 -40
- package/dist/shared-react/components/index.d.ts +0 -2
- package/dist/shared-react/components/preview-renderer.d.ts +0 -8
- package/dist/shared-react/components/render-annotation.d.ts +0 -13
- package/dist/shared-react/components/text-markup/highlight.d.ts +0 -16
- package/dist/shared-react/components/text-markup/squiggly.d.ts +0 -16
- package/dist/shared-react/components/text-markup/strikeout.d.ts +0 -16
- package/dist/shared-react/components/text-markup/underline.d.ts +0 -16
- package/dist/shared-react/components/text-markup.d.ts +0 -7
- package/dist/shared-react/components/types.d.ts +0 -253
- package/dist/shared-react/context/index.d.ts +0 -1
- package/dist/shared-react/context/renderer-registry.d.ts +0 -21
- package/dist/shared-react/hooks/index.d.ts +0 -2
- package/dist/shared-react/hooks/use-annotation.d.ts +0 -19
- package/dist/shared-react/hooks/use-ios-zoom-prevention.d.ts +0 -16
- package/dist/shared-react/index.d.ts +0 -6
- package/dist/shared-react/types.d.ts +0 -10
- package/dist/shared-vue/annotation-bounds.d.ts +0 -14
- package/dist/svelte/components/AnnotationContainer.svelte.d.ts +0 -26
- package/dist/svelte/components/AnnotationLayer.svelte.d.ts +0 -40
- package/dist/svelte/components/AnnotationNavigationHandler.svelte.d.ts +0 -3
- package/dist/svelte/components/AnnotationPaintLayer.svelte.d.ts +0 -8
- package/dist/svelte/components/Annotations.svelte.d.ts +0 -28
- package/dist/svelte/components/AppearanceImage.svelte.d.ts +0 -8
- package/dist/svelte/components/GroupSelectionBox.svelte.d.ts +0 -40
- package/dist/svelte/components/PreviewRenderer.svelte.d.ts +0 -9
- package/dist/svelte/components/RenderAnnotation.svelte.d.ts +0 -14
- package/dist/svelte/components/RendererRegistryProvider.svelte.d.ts +0 -7
- package/dist/svelte/components/TextMarkup.svelte.d.ts +0 -8
- package/dist/svelte/components/annotations/CalloutFreeText.svelte.d.ts +0 -15
- package/dist/svelte/components/annotations/CalloutFreeTextPreview.svelte.d.ts +0 -10
- package/dist/svelte/components/annotations/Caret.svelte.d.ts +0 -13
- package/dist/svelte/components/annotations/Circle.svelte.d.ts +0 -19
- package/dist/svelte/components/annotations/CirclePreview.svelte.d.ts +0 -10
- package/dist/svelte/components/annotations/FreeText.svelte.d.ts +0 -16
- package/dist/svelte/components/annotations/FreeTextPreview.svelte.d.ts +0 -10
- package/dist/svelte/components/annotations/Ink.svelte.d.ts +0 -15
- package/dist/svelte/components/annotations/InkPreview.svelte.d.ts +0 -10
- package/dist/svelte/components/annotations/Line.svelte.d.ts +0 -19
- package/dist/svelte/components/annotations/LinePreview.svelte.d.ts +0 -10
- package/dist/svelte/components/annotations/Link.svelte.d.ts +0 -24
- package/dist/svelte/components/annotations/LinkLockedMode.svelte.d.ts +0 -5
- package/dist/svelte/components/annotations/LinkPreview.svelte.d.ts +0 -10
- package/dist/svelte/components/annotations/Polygon.svelte.d.ts +0 -21
- package/dist/svelte/components/annotations/PolygonPreview.svelte.d.ts +0 -10
- package/dist/svelte/components/annotations/Polyline.svelte.d.ts +0 -19
- package/dist/svelte/components/annotations/PolylinePreview.svelte.d.ts +0 -10
- package/dist/svelte/components/annotations/Square.svelte.d.ts +0 -19
- package/dist/svelte/components/annotations/SquarePreview.svelte.d.ts +0 -10
- package/dist/svelte/components/annotations/Stamp.svelte.d.ts +0 -13
- package/dist/svelte/components/annotations/StampPreview.svelte.d.ts +0 -10
- package/dist/svelte/components/annotations/Text.svelte.d.ts +0 -10
- package/dist/svelte/components/annotations/index.d.ts +0 -10
- package/dist/svelte/components/built-in-renderers.d.ts +0 -2
- package/dist/svelte/components/index.d.ts +0 -11
- package/dist/svelte/components/renderers/CalloutFreeTextRenderer.svelte.d.ts +0 -5
- package/dist/svelte/components/renderers/CaretRenderer.svelte.d.ts +0 -5
- package/dist/svelte/components/renderers/CircleRenderer.svelte.d.ts +0 -5
- package/dist/svelte/components/renderers/FreeTextRenderer.svelte.d.ts +0 -5
- package/dist/svelte/components/renderers/HighlightRenderer.svelte.d.ts +0 -5
- package/dist/svelte/components/renderers/InkRenderer.svelte.d.ts +0 -5
- package/dist/svelte/components/renderers/LineRenderer.svelte.d.ts +0 -5
- package/dist/svelte/components/renderers/LinkRenderer.svelte.d.ts +0 -5
- package/dist/svelte/components/renderers/PolygonRenderer.svelte.d.ts +0 -5
- package/dist/svelte/components/renderers/PolylineRenderer.svelte.d.ts +0 -5
- package/dist/svelte/components/renderers/SquareRenderer.svelte.d.ts +0 -5
- package/dist/svelte/components/renderers/SquigglyRenderer.svelte.d.ts +0 -5
- package/dist/svelte/components/renderers/StampRenderer.svelte.d.ts +0 -5
- package/dist/svelte/components/renderers/StrikeoutRenderer.svelte.d.ts +0 -5
- package/dist/svelte/components/renderers/TextRenderer.svelte.d.ts +0 -5
- package/dist/svelte/components/renderers/UnderlineRenderer.svelte.d.ts +0 -5
- package/dist/svelte/components/text-markup/Highlight.svelte.d.ts +0 -16
- package/dist/svelte/components/text-markup/Squiggly.svelte.d.ts +0 -16
- package/dist/svelte/components/text-markup/Strikeout.svelte.d.ts +0 -16
- package/dist/svelte/components/text-markup/Underline.svelte.d.ts +0 -16
- package/dist/svelte/components/text-markup/index.d.ts +0 -4
- package/dist/svelte/components/types.d.ts +0 -66
- package/dist/svelte/context/index.d.ts +0 -2
- package/dist/svelte/context/renderer-registry.svelte.d.ts +0 -20
- package/dist/svelte/context/types.d.ts +0 -129
- package/dist/svelte/hooks/index.d.ts +0 -2
- package/dist/svelte/hooks/use-annotation.svelte.d.ts +0 -21
- package/dist/svelte/hooks/use-ios-zoom-prevention.svelte.d.ts +0 -6
- package/dist/svelte/index.cjs +0 -2
- package/dist/svelte/index.cjs.map +0 -1
- package/dist/svelte/index.d.ts +0 -6
- package/dist/svelte/index.js +0 -5257
- package/dist/svelte/index.js.map +0 -1
- package/dist/svelte/types.d.ts +0 -126
- package/dist/vue/components/annotation-container.vue.d.ts +0 -134
- package/dist/vue/components/annotation-layer.vue.d.ts +0 -99
- package/dist/vue/components/annotation-navigation-handler.vue.d.ts +0 -3
- package/dist/vue/components/annotation-paint-layer.vue.d.ts +0 -8
- package/dist/vue/components/annotations/callout-free-text-preview.vue.d.ts +0 -10
- package/dist/vue/components/annotations/callout-free-text.vue.d.ts +0 -25
- package/dist/vue/components/annotations/caret.vue.d.ts +0 -24
- package/dist/vue/components/annotations/circle-preview.vue.d.ts +0 -10
- package/dist/vue/components/annotations/circle.vue.d.ts +0 -37
- package/dist/vue/components/annotations/free-text-preview.vue.d.ts +0 -10
- package/dist/vue/components/annotations/free-text.vue.d.ts +0 -25
- package/dist/vue/components/annotations/index.d.ts +0 -10
- package/dist/vue/components/annotations/ink-preview.vue.d.ts +0 -10
- package/dist/vue/components/annotations/ink.vue.d.ts +0 -27
- package/dist/vue/components/annotations/line-preview.vue.d.ts +0 -10
- package/dist/vue/components/annotations/line.vue.d.ts +0 -38
- package/dist/vue/components/annotations/link-locked.vue.d.ts +0 -5
- package/dist/vue/components/annotations/link-preview.vue.d.ts +0 -10
- package/dist/vue/components/annotations/link.vue.d.ts +0 -47
- package/dist/vue/components/annotations/polygon-preview.vue.d.ts +0 -10
- package/dist/vue/components/annotations/polygon.vue.d.ts +0 -43
- package/dist/vue/components/annotations/polyline-preview.vue.d.ts +0 -10
- package/dist/vue/components/annotations/polyline.vue.d.ts +0 -38
- package/dist/vue/components/annotations/square-preview.vue.d.ts +0 -10
- package/dist/vue/components/annotations/square.vue.d.ts +0 -37
- package/dist/vue/components/annotations/stamp-preview.vue.d.ts +0 -10
- package/dist/vue/components/annotations/stamp.vue.d.ts +0 -19
- package/dist/vue/components/annotations/text.vue.d.ts +0 -14
- package/dist/vue/components/annotations.vue.d.ts +0 -111
- package/dist/vue/components/appearance-image.vue.d.ts +0 -9
- package/dist/vue/components/built-in-renderers.d.ts +0 -2
- package/dist/vue/components/group-selection-box.vue.d.ts +0 -98
- package/dist/vue/components/index.d.ts +0 -11
- package/dist/vue/components/preview-renderer.vue.d.ts +0 -9
- package/dist/vue/components/render-annotation.vue.d.ts +0 -16
- package/dist/vue/components/renderer-registry-provider.vue.d.ts +0 -13
- package/dist/vue/components/renderers/callout-free-text-renderer.vue.d.ts +0 -6
- package/dist/vue/components/renderers/caret-renderer.vue.d.ts +0 -6
- package/dist/vue/components/renderers/circle-renderer.vue.d.ts +0 -6
- package/dist/vue/components/renderers/free-text-renderer.vue.d.ts +0 -6
- package/dist/vue/components/renderers/highlight-renderer.vue.d.ts +0 -6
- package/dist/vue/components/renderers/ink-renderer.vue.d.ts +0 -6
- package/dist/vue/components/renderers/line-renderer.vue.d.ts +0 -6
- package/dist/vue/components/renderers/link-renderer.vue.d.ts +0 -6
- package/dist/vue/components/renderers/polygon-renderer.vue.d.ts +0 -6
- package/dist/vue/components/renderers/polyline-renderer.vue.d.ts +0 -6
- package/dist/vue/components/renderers/square-renderer.vue.d.ts +0 -6
- package/dist/vue/components/renderers/squiggly-renderer.vue.d.ts +0 -6
- package/dist/vue/components/renderers/stamp-renderer.vue.d.ts +0 -6
- package/dist/vue/components/renderers/strikeout-renderer.vue.d.ts +0 -6
- package/dist/vue/components/renderers/text-renderer.vue.d.ts +0 -6
- package/dist/vue/components/renderers/underline-renderer.vue.d.ts +0 -6
- package/dist/vue/components/text-markup/highlight.vue.d.ts +0 -27
- package/dist/vue/components/text-markup/index.d.ts +0 -4
- package/dist/vue/components/text-markup/squiggly.vue.d.ts +0 -27
- package/dist/vue/components/text-markup/strikeout.vue.d.ts +0 -27
- package/dist/vue/components/text-markup/underline.vue.d.ts +0 -27
- package/dist/vue/components/text-markup.vue.d.ts +0 -8
- package/dist/vue/context/index.d.ts +0 -2
- package/dist/vue/context/renderer-registry.d.ts +0 -26
- package/dist/vue/context/types.d.ts +0 -129
- package/dist/vue/hooks/index.d.ts +0 -2
- package/dist/vue/hooks/use-annotation.d.ts +0 -50
- package/dist/vue/hooks/use-ios-zoom-prevention.d.ts +0 -7
- package/dist/vue/index.cjs +0 -2
- package/dist/vue/index.cjs.map +0 -1
- package/dist/vue/index.d.ts +0 -6
- package/dist/vue/index.js +0 -4984
- package/dist/vue/index.js.map +0 -1
- package/dist/vue/types.d.ts +0 -94
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { PdfAnnotationLineEnding } from '@embedpdf/models';
|
|
2
|
-
export interface SvgEnding {
|
|
3
|
-
d: string;
|
|
4
|
-
transform: string;
|
|
5
|
-
filled: boolean;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* Factory that returns SVG path data and transform attributes for a given line ending.
|
|
9
|
-
* It uses a central handler for each ending type to ensure consistency.
|
|
10
|
-
*/
|
|
11
|
-
export declare function createEnding(ending: PdfAnnotationLineEnding | undefined, strokeWidth: number, rad: number, // direction angle in radians of the line segment
|
|
12
|
-
px: number, // x-coordinate of the line's endpoint
|
|
13
|
-
py: number): SvgEnding | null;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { PdfAnnotationObject, PdfAnnotationSubtype } from '@embedpdf/models';
|
|
2
|
-
export interface TransformContext<T extends PdfAnnotationObject = PdfAnnotationObject> {
|
|
3
|
-
/** The type of transformation being applied */
|
|
4
|
-
type: 'move' | 'resize' | 'vertex-edit' | 'rotate' | 'property-update';
|
|
5
|
-
/** The changes being applied - can be any properties of the annotation */
|
|
6
|
-
changes: Partial<T>;
|
|
7
|
-
/** Optional metadata about the transformation */
|
|
8
|
-
metadata?: {
|
|
9
|
-
maintainAspectRatio?: boolean;
|
|
10
|
-
/** Rotation angle in degrees (for 'rotate' transform type) */
|
|
11
|
-
rotationAngle?: number;
|
|
12
|
-
/** Delta from the initial rotation angle in degrees */
|
|
13
|
-
rotationDelta?: number;
|
|
14
|
-
/** Center point for rotation (defaults to rect center) */
|
|
15
|
-
rotationCenter?: {
|
|
16
|
-
x: number;
|
|
17
|
-
y: number;
|
|
18
|
-
};
|
|
19
|
-
/** Whether the rotation input is currently snapped */
|
|
20
|
-
isSnapped?: boolean;
|
|
21
|
-
/** Snap target angle when isSnapped is true */
|
|
22
|
-
snappedAngle?: number;
|
|
23
|
-
[key: string]: any;
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
export type PatchFunction<T extends PdfAnnotationObject> = (original: T, context: TransformContext<T>) => Partial<T>;
|
|
27
|
-
/**
|
|
28
|
-
* Registry for annotation-specific patch functions.
|
|
29
|
-
* Each patch function knows how to transform its annotation type.
|
|
30
|
-
*/
|
|
31
|
-
export declare class PatchRegistry {
|
|
32
|
-
private patches;
|
|
33
|
-
register<T extends PdfAnnotationObject>(type: PdfAnnotationSubtype, patchFn: PatchFunction<T>): void;
|
|
34
|
-
/**
|
|
35
|
-
* Transform an annotation based on the context.
|
|
36
|
-
* Returns the transformed properties or just the changes if no patch function exists.
|
|
37
|
-
*/
|
|
38
|
-
transform<T extends PdfAnnotationObject>(annotation: T, context: TransformContext<T>): Partial<T>;
|
|
39
|
-
}
|
|
40
|
-
export declare const patchRegistry: PatchRegistry;
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import { Rect, Position, LineEndings, PdfAnnotationLineEnding, PdfRectDifferences, PdfFreeTextAnnoObject, getRectCenter, rotatePointAround, rotateVertices, calculateRotatedRectAABB, calculateRotatedRectAABBAroundPoint } from '@embedpdf/models';
|
|
2
|
-
export { rotatePointAround as rotatePointAroundCenter, rotateVertices, getRectCenter, calculateRotatedRectAABB, calculateRotatedRectAABBAroundPoint, };
|
|
3
|
-
/**
|
|
4
|
-
* Calculate the axis-aligned bounding box for rotated vertices.
|
|
5
|
-
* @param vertices - The rotated vertices
|
|
6
|
-
* @param padding - Optional padding to add around the bounding box
|
|
7
|
-
* @returns The axis-aligned bounding box
|
|
8
|
-
*/
|
|
9
|
-
export declare function calculateAABBFromVertices(vertices: Position[], padding?: number): Rect;
|
|
10
|
-
/**
|
|
11
|
-
* Computes the exact bounding box for a line or polyline, including its endings and stroke width.
|
|
12
|
-
* This function uses the central `LINE_ENDING_HANDLERS` to ensure calculations are
|
|
13
|
-
* perfectly in sync with the rendering logic.
|
|
14
|
-
*/
|
|
15
|
-
export declare function lineRectWithEndings(vertices: Position[], strokeWidth: number, endings: LineEndings | undefined): Rect;
|
|
16
|
-
/**
|
|
17
|
-
* Build rect patches for vertex editing.
|
|
18
|
-
* For rotated annotations, the tight rect is kept as unrotatedRect and the AABB is
|
|
19
|
-
* computed around the new content center so rotation UI follows the edited geometry.
|
|
20
|
-
*/
|
|
21
|
-
export declare function resolveVertexEditRects(original: {
|
|
22
|
-
rect: Rect;
|
|
23
|
-
unrotatedRect?: Rect;
|
|
24
|
-
rotation?: number;
|
|
25
|
-
}, tightRect: Rect): {
|
|
26
|
-
rect: Rect;
|
|
27
|
-
unrotatedRect?: Rect;
|
|
28
|
-
};
|
|
29
|
-
/**
|
|
30
|
-
* Resolve an annotation's effective rotation center in page coordinates.
|
|
31
|
-
*/
|
|
32
|
-
export declare function resolveAnnotationRotationCenter(original: {
|
|
33
|
-
rect: Rect;
|
|
34
|
-
unrotatedRect?: Rect;
|
|
35
|
-
rotation?: number;
|
|
36
|
-
}): Position;
|
|
37
|
-
/**
|
|
38
|
-
* Build rotate patches while preserving an annotation's effective rotation center.
|
|
39
|
-
* The incoming unrotated rect may already include a translation (group rotation/orbit).
|
|
40
|
-
*/
|
|
41
|
-
export declare function resolveRotateRects(original: {
|
|
42
|
-
rect: Rect;
|
|
43
|
-
unrotatedRect?: Rect;
|
|
44
|
-
rotation?: number;
|
|
45
|
-
}, nextUnrotatedRect: Rect, angleDegrees: number): {
|
|
46
|
-
rect: Rect;
|
|
47
|
-
unrotatedRect: Rect;
|
|
48
|
-
};
|
|
49
|
-
/**
|
|
50
|
-
* Compensate vertices for rotated vertex editing so the dragged point tracks the cursor
|
|
51
|
-
* while the rotation center follows edited geometry.
|
|
52
|
-
*
|
|
53
|
-
* Without this compensation, changing the tight bounds center during a rotated vertex edit
|
|
54
|
-
* applies an additional translation to all points, which appears as opposite-end drift.
|
|
55
|
-
*/
|
|
56
|
-
export declare function compensateRotatedVertexEdit(original: {
|
|
57
|
-
rect: Rect;
|
|
58
|
-
unrotatedRect?: Rect;
|
|
59
|
-
rotation?: number;
|
|
60
|
-
}, vertices: Position[], tightRect: Rect): Position[];
|
|
61
|
-
/**
|
|
62
|
-
* Derive the text box rect from the annotation's overall rect and RD inset.
|
|
63
|
-
*/
|
|
64
|
-
export declare function computeTextBoxFromRD(rect: Rect, rd: PdfRectDifferences | undefined): Rect;
|
|
65
|
-
/**
|
|
66
|
-
* Compute the RD inset from the overall rect to the text box.
|
|
67
|
-
*/
|
|
68
|
-
export declare function computeRDFromTextBox(overallRect: Rect, textBox: Rect): PdfRectDifferences;
|
|
69
|
-
/**
|
|
70
|
-
* Auto-compute the callout connection point on the text box edge.
|
|
71
|
-
* Uses the knee's position relative to the text box center, scaled by aspect ratio,
|
|
72
|
-
* to choose the nearest edge midpoint (top, right, bottom, left).
|
|
73
|
-
*/
|
|
74
|
-
export declare function computeCalloutConnectionPoint(knee: Position, textBox: Rect): Position;
|
|
75
|
-
/**
|
|
76
|
-
* Compute the overall bounding rect for a callout FreeText, encompassing
|
|
77
|
-
* the text box, callout line, and line ending geometry.
|
|
78
|
-
*
|
|
79
|
-
* The text box border grows inward (stroke outer edge = textBox boundary),
|
|
80
|
-
* so no outward padding is added for the text box. The callout line and
|
|
81
|
-
* arrow stroke extend outward and miter joins at the knee can protrude
|
|
82
|
-
* further, so they get strokeWidth padding (half for stroke + half for
|
|
83
|
-
* miter/join clearance).
|
|
84
|
-
*/
|
|
85
|
-
export declare function computeCalloutOverallRect(textBox: Rect, calloutLine: Position[], lineEnding: PdfAnnotationLineEnding | undefined, strokeWidth: number): Rect;
|
|
86
|
-
export declare const calloutVertexConfig: {
|
|
87
|
-
extractVertices: (a: PdfFreeTextAnnoObject) => Position[];
|
|
88
|
-
transformAnnotation: (a: PdfFreeTextAnnoObject, vertices: Position[]) => {
|
|
89
|
-
calloutLine?: undefined;
|
|
90
|
-
rect?: undefined;
|
|
91
|
-
rectangleDifferences?: undefined;
|
|
92
|
-
} | {
|
|
93
|
-
calloutLine: Position[];
|
|
94
|
-
rect: Rect;
|
|
95
|
-
rectangleDifferences: PdfRectDifferences;
|
|
96
|
-
};
|
|
97
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export * from './ink.patch';
|
|
2
|
-
export * from './line.patch';
|
|
3
|
-
export * from './polyline.patch';
|
|
4
|
-
export * from './polygon.patch';
|
|
5
|
-
export * from './circle.patch';
|
|
6
|
-
export * from './square.patch';
|
|
7
|
-
export * from './freetext.patch';
|
|
8
|
-
export * from './callout-freetext.patch';
|
|
9
|
-
export * from './stamp.patch';
|
package/dist/lib/reducer.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { Reducer } from '@embedpdf/core';
|
|
2
|
-
import { AnnotationAction } from './actions';
|
|
3
|
-
import { AnnotationPluginConfig, AnnotationState, AnnotationDocumentState } from './types';
|
|
4
|
-
export declare const initialDocumentState: (cfg?: AnnotationPluginConfig) => AnnotationDocumentState;
|
|
5
|
-
export declare const initialState: (cfg: AnnotationPluginConfig) => AnnotationState;
|
|
6
|
-
export declare const reducer: Reducer<AnnotationState, AnnotationAction>;
|
package/dist/lib/selectors.d.ts
DELETED
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
import { AnnotationState, AnnotationDocumentState, SidebarAnnotationEntry, TrackedAnnotation, GroupingAction } from './types';
|
|
2
|
-
import { PdfAnnotationSubtype, PdfAnnotationObject } from '@embedpdf/models';
|
|
3
|
-
import { ToolMap } from './tools/tools-utils';
|
|
4
|
-
/** All annotations _objects_ on a single page (order preserved). */
|
|
5
|
-
export declare const getAnnotationsByPageIndex: (s: AnnotationDocumentState, page: number) => TrackedAnnotation<PdfAnnotationObject>[];
|
|
6
|
-
/** Shortcut: every page → list of annotation objects. */
|
|
7
|
-
export declare const getAnnotations: (s: AnnotationDocumentState) => Record<number, TrackedAnnotation<PdfAnnotationObject>[]>;
|
|
8
|
-
/**
|
|
9
|
-
* The full `TrackedAnnotation` for the current selection.
|
|
10
|
-
* @deprecated Use getSelectedAnnotations() for multi-select support. Returns first selected or null.
|
|
11
|
-
*/
|
|
12
|
-
export declare const getSelectedAnnotation: (s: AnnotationDocumentState) => TrackedAnnotation | null;
|
|
13
|
-
/** Get all selected TrackedAnnotations */
|
|
14
|
-
export declare const getSelectedAnnotations: (s: AnnotationDocumentState) => TrackedAnnotation[];
|
|
15
|
-
/** Get the IDs of all selected annotations */
|
|
16
|
-
export declare const getSelectedAnnotationIds: (s: AnnotationDocumentState) => string[];
|
|
17
|
-
/** Get a tracked annotation by its ID */
|
|
18
|
-
export declare const getAnnotationByUid: (s: AnnotationDocumentState, uid: string) => TrackedAnnotation<PdfAnnotationObject>;
|
|
19
|
-
/**
|
|
20
|
-
* Get selected annotation on a specific page (single, for backward compatibility)
|
|
21
|
-
* @deprecated Use getSelectedAnnotationsByPageIndex() for multi-select support.
|
|
22
|
-
*/
|
|
23
|
-
export declare const getSelectedAnnotationByPageIndex: (s: AnnotationDocumentState, pageIndex: number) => TrackedAnnotation | null;
|
|
24
|
-
/** Get all selected annotations on a specific page */
|
|
25
|
-
export declare const getSelectedAnnotationsByPageIndex: (s: AnnotationDocumentState, pageIndex: number) => TrackedAnnotation[];
|
|
26
|
-
/** Check if a given annotation is in the current selection. */
|
|
27
|
-
export declare const isAnnotationSelected: (s: AnnotationDocumentState, id: string) => boolean;
|
|
28
|
-
/** Check if multiple annotations are selected */
|
|
29
|
-
export declare const hasMultipleSelected: (s: AnnotationDocumentState) => boolean;
|
|
30
|
-
/**
|
|
31
|
-
* Returns the current defaults for a specific tool by its ID.
|
|
32
|
-
* This is fully type-safe and infers the correct return type.
|
|
33
|
-
*
|
|
34
|
-
* @param state The annotation plugin's state.
|
|
35
|
-
* @param toolId The ID of the tool (e.g., 'highlight', 'pen').
|
|
36
|
-
* @returns The tool's current `defaults` object, or `undefined` if not found.
|
|
37
|
-
*/
|
|
38
|
-
export declare function getToolDefaultsById<K extends keyof ToolMap>(state: AnnotationState, toolId: K): ToolMap[K]['defaults'] | undefined;
|
|
39
|
-
/**
|
|
40
|
-
* Collect every sidebar-eligible annotation and attach its TEXT replies,
|
|
41
|
-
* grouped by page for efficient rendering.
|
|
42
|
-
*
|
|
43
|
-
* Annotations linked via IRT / RT=Group are collapsed: the group leader
|
|
44
|
-
* becomes the sidebar entry and its non-LINK group members are attached
|
|
45
|
-
* as `groupMembers`. This keeps the sidebar compact for tools like
|
|
46
|
-
* Replace Text (Caret + StrikeOut pair).
|
|
47
|
-
*
|
|
48
|
-
* Result shape:
|
|
49
|
-
* {
|
|
50
|
-
* 0: [{ page: 0, annotation: <TrackedAnnotation>, replies: [ … ], groupMembers: [ … ] }, ...],
|
|
51
|
-
* 1: [{ page: 1, annotation: <TrackedAnnotation>, replies: [ … ] }, ...],
|
|
52
|
-
* …
|
|
53
|
-
* }
|
|
54
|
-
*/
|
|
55
|
-
export declare const getSidebarAnnotationsWithRepliesGroupedByPage: (s: AnnotationDocumentState) => Record<number, SidebarAnnotationEntry[]>;
|
|
56
|
-
/**
|
|
57
|
-
* Collect every sidebar-eligible annotation and attach its TEXT replies.
|
|
58
|
-
*
|
|
59
|
-
* Result shape:
|
|
60
|
-
* [
|
|
61
|
-
* { page: 0, annotation: <TrackedAnnotation>, replies: [ … ] },
|
|
62
|
-
* { page: 1, annotation: <TrackedAnnotation>, replies: [ … ] },
|
|
63
|
-
* …
|
|
64
|
-
* ]
|
|
65
|
-
*/
|
|
66
|
-
export declare const getSidebarAnnotationsWithReplies: (s: AnnotationDocumentState) => SidebarAnnotationEntry[];
|
|
67
|
-
/**
|
|
68
|
-
* Get all IRT child annotation info for cascade delete.
|
|
69
|
-
* Returns array of { id, pageIndex } for each annotation that references parentId.
|
|
70
|
-
*/
|
|
71
|
-
export declare const getIRTChildIds: (s: AnnotationDocumentState, parentId: string) => {
|
|
72
|
-
id: string;
|
|
73
|
-
pageIndex: number;
|
|
74
|
-
}[];
|
|
75
|
-
/**
|
|
76
|
-
* Check if an annotation has any IRT children (links, replies, etc.)
|
|
77
|
-
*/
|
|
78
|
-
export declare const hasIRTChildren: (s: AnnotationDocumentState, parentId: string) => boolean;
|
|
79
|
-
/**
|
|
80
|
-
* Get IRT children filtered by annotation type (e.g., only LINK).
|
|
81
|
-
* @param s - The annotation document state
|
|
82
|
-
* @param parentId - The parent annotation ID
|
|
83
|
-
* @param types - Array of annotation subtypes to include
|
|
84
|
-
*/
|
|
85
|
-
export declare const getIRTChildrenByType: (s: AnnotationDocumentState, parentId: string, types: PdfAnnotationSubtype[]) => TrackedAnnotation[];
|
|
86
|
-
/**
|
|
87
|
-
* Get link annotations attached to a parent annotation via IRT relationship.
|
|
88
|
-
* @param s - The annotation document state
|
|
89
|
-
* @param parentId - The parent annotation ID
|
|
90
|
-
*/
|
|
91
|
-
export declare const getAttachedLinks: (s: AnnotationDocumentState, parentId: string) => TrackedAnnotation[];
|
|
92
|
-
/**
|
|
93
|
-
* Check if an annotation has attached link children.
|
|
94
|
-
* @param s - The annotation document state
|
|
95
|
-
* @param parentId - The parent annotation ID
|
|
96
|
-
*/
|
|
97
|
-
export declare const hasAttachedLinks: (s: AnnotationDocumentState, parentId: string) => boolean;
|
|
98
|
-
/**
|
|
99
|
-
* Get the leader ID of a group.
|
|
100
|
-
* If the annotation has inReplyToId with replyType = Group, return the inReplyToId.
|
|
101
|
-
* Otherwise, the annotation itself is the leader.
|
|
102
|
-
*
|
|
103
|
-
* @param s - The annotation document state
|
|
104
|
-
* @param annotationId - The annotation ID to find the group leader for
|
|
105
|
-
* @returns The leader annotation ID, or undefined if annotation not found
|
|
106
|
-
*/
|
|
107
|
-
export declare const getGroupLeaderId: (s: AnnotationDocumentState, annotationId: string) => string | undefined;
|
|
108
|
-
/**
|
|
109
|
-
* Get all annotations in the same group as the given annotation.
|
|
110
|
-
* Returns the leader plus all annotations with inReplyToId pointing to leader and replyType = Group.
|
|
111
|
-
* Note: LINK annotations are excluded - they use IRT/Group for attachment but are not "group members"
|
|
112
|
-
* in the user-facing sense.
|
|
113
|
-
*
|
|
114
|
-
* @param s - The annotation document state
|
|
115
|
-
* @param annotationId - Any annotation ID in the group
|
|
116
|
-
* @returns Array of TrackedAnnotations in the group (including the annotation itself)
|
|
117
|
-
*/
|
|
118
|
-
export declare const getGroupMembers: (s: AnnotationDocumentState, annotationId: string) => TrackedAnnotation<PdfAnnotationObject>[];
|
|
119
|
-
/**
|
|
120
|
-
* Check if an annotation is part of a group.
|
|
121
|
-
* An annotation is in a group if:
|
|
122
|
-
* - It has inReplyToId with replyType = Group (it's a group member), OR
|
|
123
|
-
* - It has at least one other annotation pointing to it with replyType = Group (it's a group leader)
|
|
124
|
-
*
|
|
125
|
-
* Note: LINK annotations are excluded - they use IRT/Group for attachment but are not "group members"
|
|
126
|
-
* in the user-facing sense. An annotation with only attached links is NOT considered "in a group".
|
|
127
|
-
*
|
|
128
|
-
* @param s - The annotation document state
|
|
129
|
-
* @param annotationId - The annotation ID to check
|
|
130
|
-
* @returns true if the annotation is part of a group
|
|
131
|
-
*/
|
|
132
|
-
export declare const isInGroup: (s: AnnotationDocumentState, annotationId: string) => boolean;
|
|
133
|
-
/**
|
|
134
|
-
* Determine what grouping action is available for the current selection.
|
|
135
|
-
*
|
|
136
|
-
* @param s - The annotation document state
|
|
137
|
-
* @returns The available grouping action
|
|
138
|
-
*/
|
|
139
|
-
export declare const getSelectionGroupingAction: (s: AnnotationDocumentState) => GroupingAction;
|