@embedpdf/plugin-annotation 1.5.0 → 2.0.0-next.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/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1760 -1444
- package/dist/index.js.map +1 -1
- package/dist/lib/actions.d.ts +58 -19
- package/dist/lib/annotation-plugin.d.ts +14 -5
- package/dist/lib/index.d.ts +1 -1
- package/dist/lib/reducer.d.ts +2 -1
- package/dist/lib/selectors.d.ts +10 -8
- package/dist/lib/types.d.ts +53 -10
- package/dist/preact/index.cjs +1 -1
- package/dist/preact/index.cjs.map +1 -1
- package/dist/preact/index.js +96 -48
- package/dist/preact/index.js.map +1 -1
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.js +96 -48
- package/dist/react/index.js.map +1 -1
- package/dist/shared/components/annotation-container.d.ts +4 -3
- package/dist/shared/components/annotation-layer.d.ts +7 -7
- package/dist/shared/components/annotation-paint-layer.d.ts +2 -1
- package/dist/shared/components/annotations/stamp.d.ts +2 -1
- package/dist/shared/components/annotations.d.ts +3 -2
- package/dist/shared/components/render-annotation.d.ts +2 -1
- package/dist/shared/components/text-markup.d.ts +2 -1
- package/dist/shared/components/types.d.ts +7 -7
- package/dist/shared/hooks/use-annotation.d.ts +8 -4
- package/dist/shared/index.d.ts +1 -0
- package/dist/shared-preact/components/annotation-container.d.ts +4 -3
- package/dist/shared-preact/components/annotation-layer.d.ts +7 -7
- package/dist/shared-preact/components/annotation-paint-layer.d.ts +2 -1
- package/dist/shared-preact/components/annotations/stamp.d.ts +2 -1
- package/dist/shared-preact/components/annotations.d.ts +3 -2
- package/dist/shared-preact/components/render-annotation.d.ts +2 -1
- package/dist/shared-preact/components/text-markup.d.ts +2 -1
- package/dist/shared-preact/components/types.d.ts +7 -7
- package/dist/shared-preact/hooks/use-annotation.d.ts +8 -4
- package/dist/shared-preact/index.d.ts +1 -0
- package/dist/shared-react/components/annotation-container.d.ts +4 -3
- package/dist/shared-react/components/annotation-layer.d.ts +7 -7
- package/dist/shared-react/components/annotation-paint-layer.d.ts +2 -1
- package/dist/shared-react/components/annotations/stamp.d.ts +2 -1
- package/dist/shared-react/components/annotations.d.ts +3 -2
- package/dist/shared-react/components/render-annotation.d.ts +2 -1
- package/dist/shared-react/components/text-markup.d.ts +2 -1
- package/dist/shared-react/components/types.d.ts +7 -7
- package/dist/shared-react/hooks/use-annotation.d.ts +8 -4
- package/dist/shared-react/index.d.ts +1 -0
- package/dist/svelte/components/AnnotationContainer.svelte.d.ts +26 -0
- package/dist/svelte/components/AnnotationLayer.svelte.d.ts +27 -0
- package/dist/svelte/components/AnnotationPaintLayer.svelte.d.ts +8 -0
- package/dist/svelte/components/Annotations.svelte.d.ts +22 -0
- package/dist/svelte/components/PreviewRenderer.svelte.d.ts +8 -0
- package/dist/svelte/components/RenderAnnotation.svelte.d.ts +13 -0
- package/dist/svelte/components/TextMarkup.svelte.d.ts +8 -0
- package/dist/svelte/components/annotations/Circle.svelte.d.ts +26 -0
- package/dist/svelte/components/annotations/FreeText.svelte.d.ts +15 -0
- package/dist/svelte/components/annotations/Ink.svelte.d.ts +14 -0
- package/dist/svelte/components/annotations/Line.svelte.d.ts +18 -0
- package/dist/svelte/components/annotations/Polygon.svelte.d.ts +19 -0
- package/dist/svelte/components/annotations/Polyline.svelte.d.ts +17 -0
- package/dist/svelte/components/annotations/Square.svelte.d.ts +16 -0
- package/dist/svelte/components/annotations/Stamp.svelte.d.ts +13 -0
- package/dist/svelte/components/annotations/index.d.ts +8 -0
- package/dist/svelte/components/index.d.ts +9 -0
- package/dist/svelte/components/text-markup/Highlight.svelte.d.ts +13 -0
- package/dist/svelte/components/text-markup/Squiggly.svelte.d.ts +13 -0
- package/dist/svelte/components/text-markup/Strikeout.svelte.d.ts +13 -0
- package/dist/svelte/components/text-markup/Underline.svelte.d.ts +13 -0
- package/dist/svelte/components/text-markup/index.d.ts +4 -0
- package/dist/svelte/components/types.d.ts +32 -0
- package/dist/svelte/hooks/index.d.ts +1 -0
- package/dist/svelte/hooks/use-annotation.svelte.d.ts +21 -0
- package/dist/svelte/index.cjs +2 -0
- package/dist/svelte/index.cjs.map +1 -0
- package/dist/svelte/index.d.ts +4 -0
- package/dist/svelte/index.js +3083 -0
- package/dist/svelte/index.js.map +1 -0
- package/dist/svelte/types.d.ts +54 -0
- package/dist/vue/components/annotation-container.vue.d.ts +10 -5
- package/dist/vue/components/annotation-layer.vue.d.ts +13 -7
- package/dist/vue/components/annotation-paint-layer.vue.d.ts +3 -1
- package/dist/vue/components/annotations/circle.vue.d.ts +2 -1
- package/dist/vue/components/annotations/free-text.vue.d.ts +2 -1
- package/dist/vue/components/annotations/ink.vue.d.ts +2 -1
- package/dist/vue/components/annotations/line.vue.d.ts +2 -1
- package/dist/vue/components/annotations/polygon.vue.d.ts +2 -1
- package/dist/vue/components/annotations/polyline.vue.d.ts +2 -1
- package/dist/vue/components/annotations/square.vue.d.ts +2 -1
- package/dist/vue/components/annotations/stamp.vue.d.ts +3 -1
- package/dist/vue/components/annotations.vue.d.ts +7 -3
- package/dist/vue/components/preview-renderer.vue.d.ts +2 -1
- package/dist/vue/components/render-annotation.vue.d.ts +3 -1
- package/dist/vue/components/text-markup/highlight.vue.d.ts +2 -1
- package/dist/vue/components/text-markup/squiggly.vue.d.ts +2 -1
- package/dist/vue/components/text-markup/strikeout.vue.d.ts +2 -1
- package/dist/vue/components/text-markup/underline.vue.d.ts +2 -1
- package/dist/vue/components/text-markup.vue.d.ts +3 -1
- package/dist/vue/hooks/use-annotation.d.ts +21 -2682
- package/dist/vue/index.cjs +1 -1
- package/dist/vue/index.cjs.map +1 -1
- package/dist/vue/index.d.ts +1 -0
- package/dist/vue/index.js +354 -250
- package/dist/vue/index.js.map +1 -1
- package/dist/vue/types.d.ts +23 -0
- package/package.json +19 -11
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { SelectionMenuPropsBase, SelectionMenuRenderFn } from '@embedpdf/utils/vue';
|
|
2
|
+
import { TrackedAnnotation } from '../lib/index.ts';
|
|
3
|
+
export interface AnnotationSelectionContext {
|
|
4
|
+
type: 'annotation';
|
|
5
|
+
annotation: TrackedAnnotation;
|
|
6
|
+
pageIndex: number;
|
|
7
|
+
}
|
|
8
|
+
export type AnnotationSelectionMenuProps = SelectionMenuPropsBase<AnnotationSelectionContext>;
|
|
9
|
+
export type AnnotationSelectionMenuRenderFn = SelectionMenuRenderFn<AnnotationSelectionContext>;
|
|
10
|
+
/** UI customization for resize handles (Vue) */
|
|
11
|
+
export interface ResizeHandleUI {
|
|
12
|
+
/** Handle size in CSS px (default: 12) */
|
|
13
|
+
size?: number;
|
|
14
|
+
/** Default background color for the handle (used by default renderer) */
|
|
15
|
+
color?: string;
|
|
16
|
+
}
|
|
17
|
+
/** UI customization for vertex handles (Vue) */
|
|
18
|
+
export interface VertexHandleUI {
|
|
19
|
+
/** Handle size in CSS px (default: 12) */
|
|
20
|
+
size?: number;
|
|
21
|
+
/** Default background color for the handle (used by default renderer) */
|
|
22
|
+
color?: string;
|
|
23
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@embedpdf/plugin-annotation",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-next.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -26,29 +26,36 @@
|
|
|
26
26
|
"types": "./dist/vue/index.d.ts",
|
|
27
27
|
"import": "./dist/vue/index.js",
|
|
28
28
|
"require": "./dist/vue/index.cjs"
|
|
29
|
+
},
|
|
30
|
+
"./svelte": {
|
|
31
|
+
"types": "./dist/svelte/index.d.ts",
|
|
32
|
+
"svelte": "./dist/svelte/index.js",
|
|
33
|
+
"import": "./dist/svelte/index.js",
|
|
34
|
+
"require": "./dist/svelte/index.cjs"
|
|
29
35
|
}
|
|
30
36
|
},
|
|
31
37
|
"dependencies": {
|
|
32
|
-
"@embedpdf/models": "
|
|
33
|
-
"@embedpdf/utils": "
|
|
38
|
+
"@embedpdf/models": "2.0.0-next.0",
|
|
39
|
+
"@embedpdf/utils": "2.0.0-next.0"
|
|
34
40
|
},
|
|
35
41
|
"devDependencies": {
|
|
36
42
|
"@types/react": "^18.2.0",
|
|
37
43
|
"typescript": "^5.0.0",
|
|
38
44
|
"@embedpdf/build": "1.1.0",
|
|
39
|
-
"@embedpdf/plugin-
|
|
40
|
-
"@embedpdf/plugin-
|
|
41
|
-
"@embedpdf/plugin-history": "
|
|
45
|
+
"@embedpdf/plugin-selection": "2.0.0-next.0",
|
|
46
|
+
"@embedpdf/plugin-interaction-manager": "2.0.0-next.0",
|
|
47
|
+
"@embedpdf/plugin-history": "2.0.0-next.0"
|
|
42
48
|
},
|
|
43
49
|
"peerDependencies": {
|
|
44
50
|
"react": ">=16.8.0",
|
|
45
51
|
"react-dom": ">=16.8.0",
|
|
46
52
|
"preact": "^10.26.4",
|
|
47
53
|
"vue": ">=3.2.0",
|
|
48
|
-
"
|
|
49
|
-
"@embedpdf/plugin-interaction-manager": "
|
|
50
|
-
"@embedpdf/plugin-selection": "
|
|
51
|
-
"@embedpdf/
|
|
54
|
+
"svelte": ">=5 <6",
|
|
55
|
+
"@embedpdf/plugin-interaction-manager": "2.0.0-next.0",
|
|
56
|
+
"@embedpdf/plugin-selection": "2.0.0-next.0",
|
|
57
|
+
"@embedpdf/core": "2.0.0-next.0",
|
|
58
|
+
"@embedpdf/plugin-history": "2.0.0-next.0"
|
|
52
59
|
},
|
|
53
60
|
"files": [
|
|
54
61
|
"dist",
|
|
@@ -71,7 +78,8 @@
|
|
|
71
78
|
"build:react": "vite build --mode react",
|
|
72
79
|
"build:preact": "vite build --mode preact",
|
|
73
80
|
"build:vue": "vite build --mode vue",
|
|
74
|
-
"build": "
|
|
81
|
+
"build:svelte": "vite build --mode svelte",
|
|
82
|
+
"build": "pnpm run clean && concurrently -c auto -n base,react,preact,vue,svelte \"vite build --mode base\" \"vite build --mode react\" \"vite build --mode preact\" \"vite build --mode vue\" \"vite build --mode svelte\"",
|
|
75
83
|
"clean": "rimraf dist",
|
|
76
84
|
"lint": "eslint src --color",
|
|
77
85
|
"lint:fix": "eslint src --color --fix"
|