@embedpdf/plugin-annotation 1.2.1 → 1.3.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/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +73 -13
- package/dist/index.js.map +1 -1
- package/dist/lib/tools/default-tools.d.ts +42 -0
- package/dist/lib/tools/types.d.ts +4 -0
- package/dist/preact/index.cjs +1 -1
- package/dist/preact/index.cjs.map +1 -1
- package/dist/preact/index.js +76 -40
- 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 +76 -40
- package/dist/react/index.js.map +1 -1
- package/dist/shared-preact/components/annotation-container.d.ts +4 -2
- package/dist/shared-preact/components/annotation-layer.d.ts +5 -2
- package/dist/shared-preact/components/annotations.d.ts +3 -1
- package/dist/shared-preact/components/text-markup/highlight.d.ts +3 -3
- package/dist/shared-preact/components/text-markup/squiggly.d.ts +3 -3
- package/dist/shared-preact/components/text-markup/strikeout.d.ts +3 -3
- package/dist/shared-preact/components/text-markup/underline.d.ts +3 -3
- package/dist/shared-preact/types.d.ts +17 -0
- package/dist/shared-react/components/annotation-container.d.ts +4 -2
- package/dist/shared-react/components/annotation-layer.d.ts +5 -2
- package/dist/shared-react/components/annotations.d.ts +3 -1
- package/dist/shared-react/components/text-markup/highlight.d.ts +3 -3
- package/dist/shared-react/components/text-markup/squiggly.d.ts +3 -3
- package/dist/shared-react/components/text-markup/strikeout.d.ts +3 -3
- package/dist/shared-react/components/text-markup/underline.d.ts +3 -3
- package/dist/shared-react/types.d.ts +17 -0
- package/package.json +12 -11
package/dist/index.js
CHANGED
|
@@ -2151,7 +2151,9 @@ const defaultTools = [
|
|
|
2151
2151
|
matchScore: (a) => a.type === PdfAnnotationSubtype.HIGHLIGHT ? 1 : 0,
|
|
2152
2152
|
interaction: {
|
|
2153
2153
|
exclusive: false,
|
|
2154
|
-
textSelection: true
|
|
2154
|
+
textSelection: true,
|
|
2155
|
+
isDraggable: false,
|
|
2156
|
+
isResizable: false
|
|
2155
2157
|
},
|
|
2156
2158
|
defaults: {
|
|
2157
2159
|
type: PdfAnnotationSubtype.HIGHLIGHT,
|
|
@@ -2166,7 +2168,9 @@ const defaultTools = [
|
|
|
2166
2168
|
matchScore: (a) => a.type === PdfAnnotationSubtype.UNDERLINE ? 1 : 0,
|
|
2167
2169
|
interaction: {
|
|
2168
2170
|
exclusive: false,
|
|
2169
|
-
textSelection: true
|
|
2171
|
+
textSelection: true,
|
|
2172
|
+
isDraggable: false,
|
|
2173
|
+
isResizable: false
|
|
2170
2174
|
},
|
|
2171
2175
|
defaults: {
|
|
2172
2176
|
type: PdfAnnotationSubtype.UNDERLINE,
|
|
@@ -2194,7 +2198,9 @@ const defaultTools = [
|
|
|
2194
2198
|
matchScore: (a) => a.type === PdfAnnotationSubtype.SQUIGGLY ? 1 : 0,
|
|
2195
2199
|
interaction: {
|
|
2196
2200
|
exclusive: false,
|
|
2197
|
-
textSelection: true
|
|
2201
|
+
textSelection: true,
|
|
2202
|
+
isDraggable: false,
|
|
2203
|
+
isResizable: false
|
|
2198
2204
|
},
|
|
2199
2205
|
defaults: {
|
|
2200
2206
|
type: PdfAnnotationSubtype.SQUIGGLY,
|
|
@@ -2209,7 +2215,10 @@ const defaultTools = [
|
|
|
2209
2215
|
matchScore: (a) => a.type === PdfAnnotationSubtype.INK && a.intent !== "InkHighlight" ? 5 : 0,
|
|
2210
2216
|
interaction: {
|
|
2211
2217
|
exclusive: false,
|
|
2212
|
-
cursor: "crosshair"
|
|
2218
|
+
cursor: "crosshair",
|
|
2219
|
+
isDraggable: true,
|
|
2220
|
+
isResizable: true,
|
|
2221
|
+
lockAspectRatio: false
|
|
2213
2222
|
},
|
|
2214
2223
|
defaults: {
|
|
2215
2224
|
type: PdfAnnotationSubtype.INK,
|
|
@@ -2224,7 +2233,10 @@ const defaultTools = [
|
|
|
2224
2233
|
matchScore: (a) => a.type === PdfAnnotationSubtype.INK && a.intent === "InkHighlight" ? 10 : 0,
|
|
2225
2234
|
interaction: {
|
|
2226
2235
|
exclusive: false,
|
|
2227
|
-
cursor: "crosshair"
|
|
2236
|
+
cursor: "crosshair",
|
|
2237
|
+
isDraggable: true,
|
|
2238
|
+
isResizable: true,
|
|
2239
|
+
lockAspectRatio: false
|
|
2228
2240
|
},
|
|
2229
2241
|
defaults: {
|
|
2230
2242
|
type: PdfAnnotationSubtype.INK,
|
|
@@ -2240,7 +2252,13 @@ const defaultTools = [
|
|
|
2240
2252
|
id: "circle",
|
|
2241
2253
|
name: "Circle",
|
|
2242
2254
|
matchScore: (a) => a.type === PdfAnnotationSubtype.CIRCLE ? 1 : 0,
|
|
2243
|
-
interaction: {
|
|
2255
|
+
interaction: {
|
|
2256
|
+
exclusive: false,
|
|
2257
|
+
cursor: "crosshair",
|
|
2258
|
+
isDraggable: true,
|
|
2259
|
+
isResizable: true,
|
|
2260
|
+
lockAspectRatio: false
|
|
2261
|
+
},
|
|
2244
2262
|
defaults: {
|
|
2245
2263
|
type: PdfAnnotationSubtype.CIRCLE,
|
|
2246
2264
|
color: "transparent",
|
|
@@ -2258,7 +2276,13 @@ const defaultTools = [
|
|
|
2258
2276
|
id: "square",
|
|
2259
2277
|
name: "Square",
|
|
2260
2278
|
matchScore: (a) => a.type === PdfAnnotationSubtype.SQUARE ? 1 : 0,
|
|
2261
|
-
interaction: {
|
|
2279
|
+
interaction: {
|
|
2280
|
+
exclusive: false,
|
|
2281
|
+
cursor: "crosshair",
|
|
2282
|
+
isDraggable: true,
|
|
2283
|
+
isResizable: true,
|
|
2284
|
+
lockAspectRatio: false
|
|
2285
|
+
},
|
|
2262
2286
|
defaults: {
|
|
2263
2287
|
type: PdfAnnotationSubtype.SQUARE,
|
|
2264
2288
|
color: "transparent",
|
|
@@ -2276,7 +2300,13 @@ const defaultTools = [
|
|
|
2276
2300
|
id: "line",
|
|
2277
2301
|
name: "Line",
|
|
2278
2302
|
matchScore: (a) => a.type === PdfAnnotationSubtype.LINE && a.intent !== "LineArrow" ? 5 : 0,
|
|
2279
|
-
interaction: {
|
|
2303
|
+
interaction: {
|
|
2304
|
+
exclusive: false,
|
|
2305
|
+
cursor: "crosshair",
|
|
2306
|
+
isDraggable: true,
|
|
2307
|
+
isResizable: false,
|
|
2308
|
+
lockAspectRatio: false
|
|
2309
|
+
},
|
|
2280
2310
|
defaults: {
|
|
2281
2311
|
type: PdfAnnotationSubtype.LINE,
|
|
2282
2312
|
color: "transparent",
|
|
@@ -2294,7 +2324,13 @@ const defaultTools = [
|
|
|
2294
2324
|
id: "lineArrow",
|
|
2295
2325
|
name: "Arrow",
|
|
2296
2326
|
matchScore: (a) => a.type === PdfAnnotationSubtype.LINE && a.intent === "LineArrow" ? 10 : 0,
|
|
2297
|
-
interaction: {
|
|
2327
|
+
interaction: {
|
|
2328
|
+
exclusive: false,
|
|
2329
|
+
cursor: "crosshair",
|
|
2330
|
+
isDraggable: true,
|
|
2331
|
+
isResizable: false,
|
|
2332
|
+
lockAspectRatio: false
|
|
2333
|
+
},
|
|
2298
2334
|
defaults: {
|
|
2299
2335
|
type: PdfAnnotationSubtype.LINE,
|
|
2300
2336
|
intent: "LineArrow",
|
|
@@ -2317,7 +2353,13 @@ const defaultTools = [
|
|
|
2317
2353
|
id: "polyline",
|
|
2318
2354
|
name: "Polyline",
|
|
2319
2355
|
matchScore: (a) => a.type === PdfAnnotationSubtype.POLYLINE ? 1 : 0,
|
|
2320
|
-
interaction: {
|
|
2356
|
+
interaction: {
|
|
2357
|
+
exclusive: false,
|
|
2358
|
+
cursor: "crosshair",
|
|
2359
|
+
isDraggable: true,
|
|
2360
|
+
isResizable: false,
|
|
2361
|
+
lockAspectRatio: false
|
|
2362
|
+
},
|
|
2321
2363
|
defaults: {
|
|
2322
2364
|
type: PdfAnnotationSubtype.POLYLINE,
|
|
2323
2365
|
color: "transparent",
|
|
@@ -2330,7 +2372,13 @@ const defaultTools = [
|
|
|
2330
2372
|
id: "polygon",
|
|
2331
2373
|
name: "Polygon",
|
|
2332
2374
|
matchScore: (a) => a.type === PdfAnnotationSubtype.POLYGON ? 1 : 0,
|
|
2333
|
-
interaction: {
|
|
2375
|
+
interaction: {
|
|
2376
|
+
exclusive: false,
|
|
2377
|
+
cursor: "crosshair",
|
|
2378
|
+
isDraggable: true,
|
|
2379
|
+
isResizable: false,
|
|
2380
|
+
lockAspectRatio: false
|
|
2381
|
+
},
|
|
2334
2382
|
defaults: {
|
|
2335
2383
|
type: PdfAnnotationSubtype.POLYGON,
|
|
2336
2384
|
color: "transparent",
|
|
@@ -2344,7 +2392,13 @@ const defaultTools = [
|
|
|
2344
2392
|
id: "freeText",
|
|
2345
2393
|
name: "Free Text",
|
|
2346
2394
|
matchScore: (a) => a.type === PdfAnnotationSubtype.FREETEXT ? 1 : 0,
|
|
2347
|
-
interaction: {
|
|
2395
|
+
interaction: {
|
|
2396
|
+
exclusive: false,
|
|
2397
|
+
cursor: "crosshair",
|
|
2398
|
+
isDraggable: true,
|
|
2399
|
+
isResizable: true,
|
|
2400
|
+
lockAspectRatio: false
|
|
2401
|
+
},
|
|
2348
2402
|
defaults: {
|
|
2349
2403
|
type: PdfAnnotationSubtype.FREETEXT,
|
|
2350
2404
|
contents: "Insert text",
|
|
@@ -2366,7 +2420,13 @@ const defaultTools = [
|
|
|
2366
2420
|
id: "stamp",
|
|
2367
2421
|
name: "Image",
|
|
2368
2422
|
matchScore: (a) => a.type === PdfAnnotationSubtype.STAMP ? 1 : 0,
|
|
2369
|
-
interaction: {
|
|
2423
|
+
interaction: {
|
|
2424
|
+
exclusive: false,
|
|
2425
|
+
cursor: "copy",
|
|
2426
|
+
isDraggable: true,
|
|
2427
|
+
isResizable: true,
|
|
2428
|
+
lockAspectRatio: true
|
|
2429
|
+
},
|
|
2370
2430
|
defaults: {
|
|
2371
2431
|
type: PdfAnnotationSubtype.STAMP
|
|
2372
2432
|
// No imageSrc by default, which tells the UI to open a file picker
|