@inkbar/core 0.9.0 → 0.10.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/README.md +110 -1
- package/dist/dom.d.mts +455 -5
- package/dist/dom.d.mts.map +1 -1
- package/dist/dom.mjs +3882 -1659
- package/dist/dom.mjs.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +2 -2
- package/dist/{sign-FuwcsNkA.d.mts → sign-BTbtPHbM.d.mts} +50 -6
- package/dist/sign-BTbtPHbM.d.mts.map +1 -0
- package/dist/{sign-DIhqyOV6.mjs → sign-DZVDJhqT.mjs} +57 -5
- package/dist/sign-DZVDJhqT.mjs.map +1 -0
- package/package.json +3 -3
- package/dist/sign-DIhqyOV6.mjs.map +0 -1
- package/dist/sign-FuwcsNkA.d.mts.map +0 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as StoreOptions, $n as rectFromPoints, $t as NoteIconSchema, A as DocumentSource, An as WidgetAppearance, At as ExportedAnnotation, B as InkErrorCode, Bn as Matrix, Bt as GLOSS_VERSION, C as createToolStyle, Cn as FormAction, Ct as AnnotationDocumentSchema, D as InkStatus, Dn as FormSetResult, Dt as AnnotationSchema, E as InkDocument, En as FormFieldType, Et as AnnotationPatch, F as TextContent, Fn as readonly, Ft as FreeTextStyle, G as importAnnotations, Gn as approxEqual, Gt as LineEnding, H as ImportOptions, Hn as Quad, Ht as InkAnnotation, I as TextItem, In as writable, It as FreeTextStyleSchema, J as createHistory, Jn as pointsFromFlat, Jt as LoupeAnnotation, K as History, Kn as invertMatrix, Kt as LineEndingSchema, L as FormController, Ln as PageInfo, Lt as GLOSS_FORMAT, M as SearchOptions, Mn as Readable, Mt as ForeignAnnotation, N as SearchResults, Nn as Writable, Nt as FreeTextAnnotation, O as OpenOptions, On as FormWidget, Ot as AnnotationType, Pn as derived, Pt as FreeTextSchema, Q as StoreMode, Qn as rectContainsPoint, Qt as NoteAnnotation, R as FormScripting, Rn as PageRotation, Rt as GLOSS_MEDIA_TYPE, S as ToolStyleDeps, Sn as FieldsMode, St as AnnotationDocument, T as DocumentStatus, Tn as FormField, Tt as AnnotationOfType, U as ImportResult, Un as Rect, Ut as InkSchema, V as isInkError, Vn as Point, Vt as IMAGE_DATA_URL, W as exportAnnotations, Wn as applyMatrix, Wt as LineAnnotation, X as AnnotationEdit, Xn as quadsFromFlat, Xt as MaskAnnotation, Y as AnnotationChange, Yn as quadFromRect, Yt as LoupeSchema, Z as AnnotationStore, Zn as quadsFromRect, Zt as MaskSchema, _ as ScopedToolStyle, _n as FieldFlags, _t as AnnotationDefaults, a as SignatureOptions, an as PolylineSchema, ar as unionRects, at as RecordStoreOptions, b as StyleProps, bn as FieldValues, bt as staticDefaults, c as createImageTemplate, cn as RedactAnnotation, ct as EmbeddedSummary, d as createMemorySignatureStore, dn as ShapeSchema, dt as importEmbeddedPage, en as NoteSchema, er as rectFromQuad, et as createAnnotationStore, f as createSignatureLibrary, fn as SquareSchema, ft as importedId, g as STYLE_GROUPS, gn as TextMarkupSchema, gt as FringeSchema, h as CurrentStyle, hn as TextMarkupAnnotation, ht as Fringe, i as SignatureLibrary, in as PolygonSchema, ir as translateRect, it as RecordStore, j as SearchHit, jn as WidgetOverride, jt as ExportedAnnotationSchema, k as openDocument, kn as WidgetAction, kt as CircleSchema, l as createInkTemplate, ln as RedactSchema, lt as EmbeddedTarget, m as placeSignature, mn as StampSchema, mt as summarise, n as DEFAULT_SIGNATURE_WIDTH, nn as PolyAnnotation, nr as rectsIntersect, nt as RecordBase, o as SignatureStore, on as QuadSchema, ot as createRecordStore, p as normaliseInk, pn as StampAnnotation, pt as pdfColorToHex, q as PluginHistory, qn as multiplyMatrix, qt as LineSchema, r as SIGNATURE_INK_WIDTH, rn as PolySchema, rr as translateQuad, rt as RecordChange, s as SignatureTemplate, sn as RectSchema, st as EmbeddedFieldPatch, t as signField, tn as PointSchema, tr as rectFromQuads, tt as deriveRect, u as createLocalSignatureStore, un as ShapeAnnotation, ut as SUPPORTED_SUBTYPES, v as StyleGroup, vn as FieldOption, vt as cssVariableDefaults, w as DocumentInfo, wn as FormEvent, wt as AnnotationInput, x as ToolStyle, xn as FieldsChange, xt as Annotation, y as StyleKey, yn as FieldValue, yt as normalizeColor, z as InkError, zn as PdfAssets, zt as GLOSS_SCHEMA_ID } from "./sign-BTbtPHbM.mjs";
|
|
2
2
|
import { INTENTS, LINE_ENDINGS, NOTE_ICONS, PDF_NAME } from "gloss-format";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
//#region src/model/events.d.ts
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as deriveRect, $t as pdfNameSet, A as fromAnnotation, At as PolylineSchema, C as isThreadRoot, Cn as isInkError, Ct as LoupeSchema, D as withoutReplies, Dt as PointSchema, E as threadRoot, Et as NoteSchema, F as toFields, Ft as SquareSchema, Gt as normalizeColor, I as typesInGroup, It as StampSchema, Jt as INTENTS, Kt as staticDefaults, Lt as TextMarkupSchema, M as styleGroupOfType, Mt as RectSchema, N as styleGroupsOf, Nt as RedactSchema, O as STYLE_GROUPS, Ot as PolySchema, P as supportedProps, Pt as ShapeSchema, Q as createAnnotationStore, Qt as isKnown, Rt as FringeSchema, S as isReply, Sn as InkError, St as LineSchema, T as threadOf, Tt as NoteIconSchema, Ut as parsePdfDate, Wt as cssVariableDefaults, X as openDocument, Xt as NOTE_ICONS, Yt as LINE_ENDINGS, Zt as PDF_NAME, _n as rectsIntersect, _t as GLOSS_SCHEMA_ID, a as createInkTemplate, an as applyMatrix, at as importEmbeddedPage, bn as unionRects, bt as InkSchema, c as createSignatureLibrary, cn as multiplyMatrix, ct as summarise, d as RECOGNISE_THRESHOLD, dn as quadsFromFlat, dt as CircleSchema, en as mergeLineRects, et as exportAnnotations, f as recogniseStroke, fn as quadsFromRect, ft as ExportedAnnotationSchema, gn as rectFromQuads, gt as GLOSS_MEDIA_TYPE, hn as rectFromQuad, ht as GLOSS_FORMAT, i as createImageTemplate, in as writable, it as SUPPORTED_SUBTYPES, j as styleGroupOf, jt as QuadSchema, k as createToolStyle, kt as PolygonSchema, l as normaliseInk, ln as pointsFromFlat, lt as AnnotationDocumentSchema, mn as rectFromPoints, mt as FreeTextStyleSchema, n as DEFAULT_SIGNATURE_WIDTH, nn as derived, nt as createHistory, o as createLocalSignatureStore, on as approxEqual, ot as importedId, pn as rectContainsPoint, pt as FreeTextSchema, r as SIGNATURE_INK_WIDTH, rn as readonly, rt as isProduction, s as createMemorySignatureStore, sn as invertMatrix, st as pdfColorToHex, t as signField, tn as createRecordStore, tt as importAnnotations, u as placeSignature, un as quadFromRect, ut as AnnotationSchema, vn as translateQuad, vt as GLOSS_VERSION, w as repliesTo, wt as MaskSchema, x as isAbandonedNote, xn as Emitter, xt as LineEndingSchema, yn as translateRect, yt as IMAGE_DATA_URL } from "./sign-
|
|
1
|
+
import { $ as deriveRect, $t as pdfNameSet, A as fromAnnotation, At as PolylineSchema, C as isThreadRoot, Cn as isInkError, Ct as LoupeSchema, D as withoutReplies, Dt as PointSchema, E as threadRoot, Et as NoteSchema, F as toFields, Ft as SquareSchema, Gt as normalizeColor, I as typesInGroup, It as StampSchema, Jt as INTENTS, Kt as staticDefaults, Lt as TextMarkupSchema, M as styleGroupOfType, Mt as RectSchema, N as styleGroupsOf, Nt as RedactSchema, O as STYLE_GROUPS, Ot as PolySchema, P as supportedProps, Pt as ShapeSchema, Q as createAnnotationStore, Qt as isKnown, Rt as FringeSchema, S as isReply, Sn as InkError, St as LineSchema, T as threadOf, Tt as NoteIconSchema, Ut as parsePdfDate, Wt as cssVariableDefaults, X as openDocument, Xt as NOTE_ICONS, Yt as LINE_ENDINGS, Zt as PDF_NAME, _n as rectsIntersect, _t as GLOSS_SCHEMA_ID, a as createInkTemplate, an as applyMatrix, at as importEmbeddedPage, bn as unionRects, bt as InkSchema, c as createSignatureLibrary, cn as multiplyMatrix, ct as summarise, d as RECOGNISE_THRESHOLD, dn as quadsFromFlat, dt as CircleSchema, en as mergeLineRects, et as exportAnnotations, f as recogniseStroke, fn as quadsFromRect, ft as ExportedAnnotationSchema, gn as rectFromQuads, gt as GLOSS_MEDIA_TYPE, hn as rectFromQuad, ht as GLOSS_FORMAT, i as createImageTemplate, in as writable, it as SUPPORTED_SUBTYPES, j as styleGroupOf, jt as QuadSchema, k as createToolStyle, kt as PolygonSchema, l as normaliseInk, ln as pointsFromFlat, lt as AnnotationDocumentSchema, mn as rectFromPoints, mt as FreeTextStyleSchema, n as DEFAULT_SIGNATURE_WIDTH, nn as derived, nt as createHistory, o as createLocalSignatureStore, on as approxEqual, ot as importedId, pn as rectContainsPoint, pt as FreeTextSchema, r as SIGNATURE_INK_WIDTH, rn as readonly, rt as isProduction, s as createMemorySignatureStore, sn as invertMatrix, st as pdfColorToHex, t as signField, tn as createRecordStore, tt as importAnnotations, u as placeSignature, un as quadFromRect, ut as AnnotationSchema, vn as translateQuad, vt as GLOSS_VERSION, w as repliesTo, wt as MaskSchema, x as isAbandonedNote, xn as Emitter, xt as LineEndingSchema, yn as translateRect, yt as IMAGE_DATA_URL } from "./sign-DZVDJhqT.mjs";
|
|
2
2
|
//#region src/model/annotations/snapshot-history.ts
|
|
3
3
|
const noop = () => {};
|
|
4
4
|
function createSnapshotHistory(opts) {
|
|
@@ -285,7 +285,7 @@ function presentKeys(o) {
|
|
|
285
285
|
//#endregion
|
|
286
286
|
//#region src/index.ts
|
|
287
287
|
/** The @inkbar/core version, from its package.json. */
|
|
288
|
-
const version = "0.
|
|
288
|
+
const version = "0.10.0";
|
|
289
289
|
//#endregion
|
|
290
290
|
export { AnnotationDocumentSchema, AnnotationSchema, CircleSchema, DEFAULT_SIGNATURE_WIDTH, Emitter, ExportedAnnotationSchema, FreeTextSchema, FreeTextStyleSchema, FringeSchema, GLOSS_FORMAT, GLOSS_MEDIA_TYPE, GLOSS_SCHEMA_ID, GLOSS_VERSION, IMAGE_DATA_URL, INTENTS, InkError, InkSchema, LINE_ENDINGS, LineEndingSchema, LineSchema, LoupeSchema, MaskSchema, NOTE_ICONS, NoteIconSchema, NoteSchema, PDF_NAME, PointSchema, PolySchema, PolygonSchema, PolylineSchema, QuadSchema, RECOGNISE_THRESHOLD, RectSchema, RedactSchema, SIGNATURE_INK_WIDTH, STYLE_GROUPS, SUPPORTED_SUBTYPES, ShapeSchema, SquareSchema, StampSchema, TextMarkupSchema, applyMatrix, approxEqual, createAnnotationStore, createHistory, createImageTemplate, createInkTemplate, createLocalSignatureStore, createMemorySignatureStore, createRecordStore, createSignatureLibrary, createSnapshotHistory, createToolStyle, cssVariableDefaults, deriveRect, derived, exportAnnotations, fromAnnotation, importAnnotations, importEmbeddedPage, importedId, invertMatrix, isAbandonedNote, isInkError, isKnown, isReply, isThreadRoot, mergeLineRects, multiplyMatrix, normaliseInk, normalizeColor, openDocument, parsePdfDate, pdfColorToHex, pdfNameSet, placeSignature, pointsFromFlat, quadFromRect, quadsFromFlat, quadsFromRect, readonly, recogniseStroke, rectContainsPoint, rectFromPoints, rectFromQuad, rectFromQuads, rectsIntersect, repliesTo, signField, staticDefaults, styleGroupOf, styleGroupOfType, styleGroupsOf, summarise, supportedProps, threadOf, threadRoot, toFields, translateQuad, translateRect, typesInGroup, unionRects, version, withoutReplies, writable };
|
|
291
291
|
|
|
@@ -501,6 +501,7 @@ declare const TextMarkupSchema: z.ZodObject<{
|
|
|
501
501
|
pdf: "pdf";
|
|
502
502
|
}>;
|
|
503
503
|
locked: z.ZodOptional<z.ZodBoolean>;
|
|
504
|
+
hasAppearance: z.ZodOptional<z.ZodBoolean>;
|
|
504
505
|
id: z.ZodString;
|
|
505
506
|
page: z.ZodNumber;
|
|
506
507
|
author: z.ZodOptional<z.ZodString>;
|
|
@@ -528,6 +529,7 @@ declare const NoteSchema: z.ZodObject<{
|
|
|
528
529
|
pdf: "pdf";
|
|
529
530
|
}>;
|
|
530
531
|
locked: z.ZodOptional<z.ZodBoolean>;
|
|
532
|
+
hasAppearance: z.ZodOptional<z.ZodBoolean>;
|
|
531
533
|
icon: z.ZodDefault<z.ZodType<"Comment" | "Note" | "Help" | "Insert" | "Key" | "NewParagraph" | "Paragraph" | (string & {}), "Comment" | "Note" | "Help" | "Insert" | "Key" | "NewParagraph" | "Paragraph" | (string & {}), z.core.$ZodTypeInternals<"Comment" | "Note" | "Help" | "Insert" | "Key" | "NewParagraph" | "Paragraph" | (string & {}), "Comment" | "Note" | "Help" | "Insert" | "Key" | "NewParagraph" | "Paragraph" | (string & {})>>>;
|
|
532
534
|
id: z.ZodString;
|
|
533
535
|
page: z.ZodNumber;
|
|
@@ -610,6 +612,7 @@ declare const FreeTextSchema: z.ZodObject<{
|
|
|
610
612
|
pdf: "pdf";
|
|
611
613
|
}>;
|
|
612
614
|
locked: z.ZodOptional<z.ZodBoolean>;
|
|
615
|
+
hasAppearance: z.ZodOptional<z.ZodBoolean>;
|
|
613
616
|
contents: z.ZodString;
|
|
614
617
|
width: z.ZodDefault<z.ZodNumber>;
|
|
615
618
|
dashes: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
@@ -640,6 +643,7 @@ declare const SquareSchema: z.ZodObject<{
|
|
|
640
643
|
pdf: "pdf";
|
|
641
644
|
}>;
|
|
642
645
|
locked: z.ZodOptional<z.ZodBoolean>;
|
|
646
|
+
hasAppearance: z.ZodOptional<z.ZodBoolean>;
|
|
643
647
|
width: z.ZodDefault<z.ZodNumber>;
|
|
644
648
|
dashes: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
645
649
|
interiorColor: z.ZodOptional<z.ZodString>;
|
|
@@ -671,6 +675,7 @@ declare const CircleSchema: z.ZodObject<{
|
|
|
671
675
|
pdf: "pdf";
|
|
672
676
|
}>;
|
|
673
677
|
locked: z.ZodOptional<z.ZodBoolean>;
|
|
678
|
+
hasAppearance: z.ZodOptional<z.ZodBoolean>;
|
|
674
679
|
width: z.ZodDefault<z.ZodNumber>;
|
|
675
680
|
dashes: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
676
681
|
interiorColor: z.ZodOptional<z.ZodString>;
|
|
@@ -700,6 +705,7 @@ declare const ShapeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
700
705
|
pdf: "pdf";
|
|
701
706
|
}>;
|
|
702
707
|
locked: z.ZodOptional<z.ZodBoolean>;
|
|
708
|
+
hasAppearance: z.ZodOptional<z.ZodBoolean>;
|
|
703
709
|
width: z.ZodDefault<z.ZodNumber>;
|
|
704
710
|
dashes: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
705
711
|
interiorColor: z.ZodOptional<z.ZodString>;
|
|
@@ -730,6 +736,7 @@ declare const ShapeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
730
736
|
pdf: "pdf";
|
|
731
737
|
}>;
|
|
732
738
|
locked: z.ZodOptional<z.ZodBoolean>;
|
|
739
|
+
hasAppearance: z.ZodOptional<z.ZodBoolean>;
|
|
733
740
|
width: z.ZodDefault<z.ZodNumber>;
|
|
734
741
|
dashes: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
735
742
|
interiorColor: z.ZodOptional<z.ZodString>;
|
|
@@ -767,6 +774,7 @@ declare const LineSchema: z.ZodObject<{
|
|
|
767
774
|
pdf: "pdf";
|
|
768
775
|
}>;
|
|
769
776
|
locked: z.ZodOptional<z.ZodBoolean>;
|
|
777
|
+
hasAppearance: z.ZodOptional<z.ZodBoolean>;
|
|
770
778
|
width: z.ZodDefault<z.ZodNumber>;
|
|
771
779
|
dashes: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
772
780
|
head: z.ZodOptional<z.ZodType<"None" | "Square" | "Circle" | "Diamond" | "OpenArrow" | "ClosedArrow" | "Butt" | "ROpenArrow" | "RClosedArrow" | "Slash" | (string & {}), "None" | "Square" | "Circle" | "Diamond" | "OpenArrow" | "ClosedArrow" | "Butt" | "ROpenArrow" | "RClosedArrow" | "Slash" | (string & {}), z.core.$ZodTypeInternals<"None" | "Square" | "Circle" | "Diamond" | "OpenArrow" | "ClosedArrow" | "Butt" | "ROpenArrow" | "RClosedArrow" | "Slash" | (string & {}), "None" | "Square" | "Circle" | "Diamond" | "OpenArrow" | "ClosedArrow" | "Butt" | "ROpenArrow" | "RClosedArrow" | "Slash" | (string & {})>>>;
|
|
@@ -801,6 +809,7 @@ declare const PolylineSchema: z.ZodObject<{
|
|
|
801
809
|
pdf: "pdf";
|
|
802
810
|
}>;
|
|
803
811
|
locked: z.ZodOptional<z.ZodBoolean>;
|
|
812
|
+
hasAppearance: z.ZodOptional<z.ZodBoolean>;
|
|
804
813
|
width: z.ZodDefault<z.ZodNumber>;
|
|
805
814
|
dashes: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
806
815
|
interiorColor: z.ZodOptional<z.ZodString>;
|
|
@@ -838,6 +847,7 @@ declare const PolygonSchema: z.ZodObject<{
|
|
|
838
847
|
pdf: "pdf";
|
|
839
848
|
}>;
|
|
840
849
|
locked: z.ZodOptional<z.ZodBoolean>;
|
|
850
|
+
hasAppearance: z.ZodOptional<z.ZodBoolean>;
|
|
841
851
|
width: z.ZodDefault<z.ZodNumber>;
|
|
842
852
|
dashes: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
843
853
|
interiorColor: z.ZodOptional<z.ZodString>;
|
|
@@ -871,6 +881,7 @@ declare const PolySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
871
881
|
pdf: "pdf";
|
|
872
882
|
}>;
|
|
873
883
|
locked: z.ZodOptional<z.ZodBoolean>;
|
|
884
|
+
hasAppearance: z.ZodOptional<z.ZodBoolean>;
|
|
874
885
|
width: z.ZodDefault<z.ZodNumber>;
|
|
875
886
|
dashes: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
876
887
|
interiorColor: z.ZodOptional<z.ZodString>;
|
|
@@ -907,6 +918,7 @@ declare const PolySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
907
918
|
pdf: "pdf";
|
|
908
919
|
}>;
|
|
909
920
|
locked: z.ZodOptional<z.ZodBoolean>;
|
|
921
|
+
hasAppearance: z.ZodOptional<z.ZodBoolean>;
|
|
910
922
|
width: z.ZodDefault<z.ZodNumber>;
|
|
911
923
|
dashes: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
912
924
|
interiorColor: z.ZodOptional<z.ZodString>;
|
|
@@ -941,6 +953,7 @@ declare const InkSchema: z.ZodObject<{
|
|
|
941
953
|
pdf: "pdf";
|
|
942
954
|
}>;
|
|
943
955
|
locked: z.ZodOptional<z.ZodBoolean>;
|
|
956
|
+
hasAppearance: z.ZodOptional<z.ZodBoolean>;
|
|
944
957
|
width: z.ZodDefault<z.ZodNumber>;
|
|
945
958
|
dashes: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
946
959
|
id: z.ZodString;
|
|
@@ -973,6 +986,7 @@ declare const StampSchema: z.ZodObject<{
|
|
|
973
986
|
pdf: "pdf";
|
|
974
987
|
}>;
|
|
975
988
|
locked: z.ZodOptional<z.ZodBoolean>;
|
|
989
|
+
hasAppearance: z.ZodOptional<z.ZodBoolean>;
|
|
976
990
|
imagedata: z.ZodString;
|
|
977
991
|
rotation: z.ZodOptional<z.ZodLiteral<0 | 90 | 180 | 270>>;
|
|
978
992
|
id: z.ZodString;
|
|
@@ -1006,6 +1020,7 @@ declare const LoupeSchema: z.ZodObject<{
|
|
|
1006
1020
|
pdf: "pdf";
|
|
1007
1021
|
}>;
|
|
1008
1022
|
locked: z.ZodOptional<z.ZodBoolean>;
|
|
1023
|
+
hasAppearance: z.ZodOptional<z.ZodBoolean>;
|
|
1009
1024
|
magnification: z.ZodDefault<z.ZodNumber>;
|
|
1010
1025
|
width: z.ZodDefault<z.ZodNumber>;
|
|
1011
1026
|
id: z.ZodString;
|
|
@@ -1040,6 +1055,7 @@ declare const MaskSchema: z.ZodObject<{
|
|
|
1040
1055
|
pdf: "pdf";
|
|
1041
1056
|
}>;
|
|
1042
1057
|
locked: z.ZodOptional<z.ZodBoolean>;
|
|
1058
|
+
hasAppearance: z.ZodOptional<z.ZodBoolean>;
|
|
1043
1059
|
shape: z.ZodEnum<{
|
|
1044
1060
|
rect: "rect";
|
|
1045
1061
|
ellipse: "ellipse";
|
|
@@ -1090,6 +1106,7 @@ declare const RedactSchema: z.ZodObject<{
|
|
|
1090
1106
|
pdf: "pdf";
|
|
1091
1107
|
}>;
|
|
1092
1108
|
locked: z.ZodOptional<z.ZodBoolean>;
|
|
1109
|
+
hasAppearance: z.ZodOptional<z.ZodBoolean>;
|
|
1093
1110
|
overlayText: z.ZodOptional<z.ZodString>;
|
|
1094
1111
|
id: z.ZodString;
|
|
1095
1112
|
page: z.ZodNumber;
|
|
@@ -1141,6 +1158,7 @@ declare const AnnotationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1141
1158
|
pdf: "pdf";
|
|
1142
1159
|
}>;
|
|
1143
1160
|
locked: z.ZodOptional<z.ZodBoolean>;
|
|
1161
|
+
hasAppearance: z.ZodOptional<z.ZodBoolean>;
|
|
1144
1162
|
id: z.ZodString;
|
|
1145
1163
|
page: z.ZodNumber;
|
|
1146
1164
|
author: z.ZodOptional<z.ZodString>;
|
|
@@ -1165,6 +1183,7 @@ declare const AnnotationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1165
1183
|
pdf: "pdf";
|
|
1166
1184
|
}>;
|
|
1167
1185
|
locked: z.ZodOptional<z.ZodBoolean>;
|
|
1186
|
+
hasAppearance: z.ZodOptional<z.ZodBoolean>;
|
|
1168
1187
|
icon: z.ZodDefault<z.ZodType<"Comment" | "Note" | "Help" | "Insert" | "Key" | "NewParagraph" | "Paragraph" | (string & {}), "Comment" | "Note" | "Help" | "Insert" | "Key" | "NewParagraph" | "Paragraph" | (string & {}), z.core.$ZodTypeInternals<"Comment" | "Note" | "Help" | "Insert" | "Key" | "NewParagraph" | "Paragraph" | (string & {}), "Comment" | "Note" | "Help" | "Insert" | "Key" | "NewParagraph" | "Paragraph" | (string & {})>>>;
|
|
1169
1188
|
id: z.ZodString;
|
|
1170
1189
|
page: z.ZodNumber;
|
|
@@ -1220,6 +1239,7 @@ declare const AnnotationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1220
1239
|
pdf: "pdf";
|
|
1221
1240
|
}>;
|
|
1222
1241
|
locked: z.ZodOptional<z.ZodBoolean>;
|
|
1242
|
+
hasAppearance: z.ZodOptional<z.ZodBoolean>;
|
|
1223
1243
|
contents: z.ZodString;
|
|
1224
1244
|
width: z.ZodDefault<z.ZodNumber>;
|
|
1225
1245
|
dashes: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
@@ -1249,6 +1269,7 @@ declare const AnnotationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1249
1269
|
pdf: "pdf";
|
|
1250
1270
|
}>;
|
|
1251
1271
|
locked: z.ZodOptional<z.ZodBoolean>;
|
|
1272
|
+
hasAppearance: z.ZodOptional<z.ZodBoolean>;
|
|
1252
1273
|
width: z.ZodDefault<z.ZodNumber>;
|
|
1253
1274
|
dashes: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
1254
1275
|
interiorColor: z.ZodOptional<z.ZodString>;
|
|
@@ -1279,6 +1300,7 @@ declare const AnnotationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1279
1300
|
pdf: "pdf";
|
|
1280
1301
|
}>;
|
|
1281
1302
|
locked: z.ZodOptional<z.ZodBoolean>;
|
|
1303
|
+
hasAppearance: z.ZodOptional<z.ZodBoolean>;
|
|
1282
1304
|
width: z.ZodDefault<z.ZodNumber>;
|
|
1283
1305
|
dashes: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
1284
1306
|
interiorColor: z.ZodOptional<z.ZodString>;
|
|
@@ -1315,6 +1337,7 @@ declare const AnnotationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1315
1337
|
pdf: "pdf";
|
|
1316
1338
|
}>;
|
|
1317
1339
|
locked: z.ZodOptional<z.ZodBoolean>;
|
|
1340
|
+
hasAppearance: z.ZodOptional<z.ZodBoolean>;
|
|
1318
1341
|
width: z.ZodDefault<z.ZodNumber>;
|
|
1319
1342
|
dashes: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
1320
1343
|
head: z.ZodOptional<z.ZodType<"None" | "Square" | "Circle" | "Diamond" | "OpenArrow" | "ClosedArrow" | "Butt" | "ROpenArrow" | "RClosedArrow" | "Slash" | (string & {}), "None" | "Square" | "Circle" | "Diamond" | "OpenArrow" | "ClosedArrow" | "Butt" | "ROpenArrow" | "RClosedArrow" | "Slash" | (string & {}), z.core.$ZodTypeInternals<"None" | "Square" | "Circle" | "Diamond" | "OpenArrow" | "ClosedArrow" | "Butt" | "ROpenArrow" | "RClosedArrow" | "Slash" | (string & {}), "None" | "Square" | "Circle" | "Diamond" | "OpenArrow" | "ClosedArrow" | "Butt" | "ROpenArrow" | "RClosedArrow" | "Slash" | (string & {})>>>;
|
|
@@ -1348,6 +1371,7 @@ declare const AnnotationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1348
1371
|
pdf: "pdf";
|
|
1349
1372
|
}>;
|
|
1350
1373
|
locked: z.ZodOptional<z.ZodBoolean>;
|
|
1374
|
+
hasAppearance: z.ZodOptional<z.ZodBoolean>;
|
|
1351
1375
|
width: z.ZodDefault<z.ZodNumber>;
|
|
1352
1376
|
dashes: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
1353
1377
|
interiorColor: z.ZodOptional<z.ZodString>;
|
|
@@ -1384,6 +1408,7 @@ declare const AnnotationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1384
1408
|
pdf: "pdf";
|
|
1385
1409
|
}>;
|
|
1386
1410
|
locked: z.ZodOptional<z.ZodBoolean>;
|
|
1411
|
+
hasAppearance: z.ZodOptional<z.ZodBoolean>;
|
|
1387
1412
|
width: z.ZodDefault<z.ZodNumber>;
|
|
1388
1413
|
dashes: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
1389
1414
|
interiorColor: z.ZodOptional<z.ZodString>;
|
|
@@ -1417,6 +1442,7 @@ declare const AnnotationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1417
1442
|
pdf: "pdf";
|
|
1418
1443
|
}>;
|
|
1419
1444
|
locked: z.ZodOptional<z.ZodBoolean>;
|
|
1445
|
+
hasAppearance: z.ZodOptional<z.ZodBoolean>;
|
|
1420
1446
|
width: z.ZodDefault<z.ZodNumber>;
|
|
1421
1447
|
dashes: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
1422
1448
|
id: z.ZodString;
|
|
@@ -1444,6 +1470,7 @@ declare const AnnotationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1444
1470
|
pdf: "pdf";
|
|
1445
1471
|
}>;
|
|
1446
1472
|
locked: z.ZodOptional<z.ZodBoolean>;
|
|
1473
|
+
hasAppearance: z.ZodOptional<z.ZodBoolean>;
|
|
1447
1474
|
imagedata: z.ZodString;
|
|
1448
1475
|
rotation: z.ZodOptional<z.ZodLiteral<0 | 90 | 180 | 270>>;
|
|
1449
1476
|
id: z.ZodString;
|
|
@@ -1471,6 +1498,7 @@ declare const AnnotationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1471
1498
|
pdf: "pdf";
|
|
1472
1499
|
}>;
|
|
1473
1500
|
locked: z.ZodOptional<z.ZodBoolean>;
|
|
1501
|
+
hasAppearance: z.ZodOptional<z.ZodBoolean>;
|
|
1474
1502
|
magnification: z.ZodDefault<z.ZodNumber>;
|
|
1475
1503
|
width: z.ZodDefault<z.ZodNumber>;
|
|
1476
1504
|
id: z.ZodString;
|
|
@@ -1498,6 +1526,7 @@ declare const AnnotationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1498
1526
|
pdf: "pdf";
|
|
1499
1527
|
}>;
|
|
1500
1528
|
locked: z.ZodOptional<z.ZodBoolean>;
|
|
1529
|
+
hasAppearance: z.ZodOptional<z.ZodBoolean>;
|
|
1501
1530
|
shape: z.ZodEnum<{
|
|
1502
1531
|
rect: "rect";
|
|
1503
1532
|
ellipse: "ellipse";
|
|
@@ -1547,6 +1576,7 @@ declare const AnnotationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1547
1576
|
pdf: "pdf";
|
|
1548
1577
|
}>;
|
|
1549
1578
|
locked: z.ZodOptional<z.ZodBoolean>;
|
|
1579
|
+
hasAppearance: z.ZodOptional<z.ZodBoolean>;
|
|
1550
1580
|
overlayText: z.ZodOptional<z.ZodString>;
|
|
1551
1581
|
id: z.ZodString;
|
|
1552
1582
|
page: z.ZodNumber;
|
|
@@ -1886,10 +1916,6 @@ declare const ExportedAnnotationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1886
1916
|
intent: z.ZodOptional<z.ZodType<"FreeText" | "FreeTextCallout" | "FreeTextTypeWriter" | "LineArrow" | "LineDimension" | "PolygonCloud" | "PolygonDimension" | "PolyLineDimension" | (string & {}), "FreeText" | "FreeTextCallout" | "FreeTextTypeWriter" | "LineArrow" | "LineDimension" | "PolygonCloud" | "PolygonDimension" | "PolyLineDimension" | (string & {}), z.core.$ZodTypeInternals<"FreeText" | "FreeTextCallout" | "FreeTextTypeWriter" | "LineArrow" | "LineDimension" | "PolygonCloud" | "PolygonDimension" | "PolyLineDimension" | (string & {}), "FreeText" | "FreeTextCallout" | "FreeTextTypeWriter" | "LineArrow" | "LineDimension" | "PolygonCloud" | "PolygonDimension" | "PolyLineDimension" | (string & {})>>>;
|
|
1887
1917
|
magnification: z.ZodDefault<z.ZodNumber>;
|
|
1888
1918
|
}, z.core.$strip>, z.ZodObject<{
|
|
1889
|
-
shape: z.ZodEnum<{
|
|
1890
|
-
rect: "rect";
|
|
1891
|
-
ellipse: "ellipse";
|
|
1892
|
-
}>;
|
|
1893
1919
|
type: z.ZodLiteral<"mask">;
|
|
1894
1920
|
custom: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1895
1921
|
rect: z.ZodObject<{
|
|
@@ -1909,6 +1935,10 @@ declare const ExportedAnnotationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1909
1935
|
inReplyTo: z.ZodOptional<z.ZodString>;
|
|
1910
1936
|
subject: z.ZodOptional<z.ZodString>;
|
|
1911
1937
|
intent: z.ZodOptional<z.ZodType<"FreeText" | "FreeTextCallout" | "FreeTextTypeWriter" | "LineArrow" | "LineDimension" | "PolygonCloud" | "PolygonDimension" | "PolyLineDimension" | (string & {}), "FreeText" | "FreeTextCallout" | "FreeTextTypeWriter" | "LineArrow" | "LineDimension" | "PolygonCloud" | "PolygonDimension" | "PolyLineDimension" | (string & {}), z.core.$ZodTypeInternals<"FreeText" | "FreeTextCallout" | "FreeTextTypeWriter" | "LineArrow" | "LineDimension" | "PolygonCloud" | "PolygonDimension" | "PolyLineDimension" | (string & {}), "FreeText" | "FreeTextCallout" | "FreeTextTypeWriter" | "LineArrow" | "LineDimension" | "PolygonCloud" | "PolygonDimension" | "PolyLineDimension" | (string & {})>>>;
|
|
1938
|
+
shape: z.ZodEnum<{
|
|
1939
|
+
rect: "rect";
|
|
1940
|
+
ellipse: "ellipse";
|
|
1941
|
+
}>;
|
|
1912
1942
|
dim: z.ZodDefault<z.ZodNumber>;
|
|
1913
1943
|
}, z.core.$strip>, z.ZodObject<{
|
|
1914
1944
|
quads: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -2622,6 +2652,10 @@ interface TextContent {
|
|
|
2622
2652
|
items: TextItem[];
|
|
2623
2653
|
}
|
|
2624
2654
|
//#endregion
|
|
2655
|
+
//#region src/model/search-text.d.ts
|
|
2656
|
+
/** Whether `query` folds to nothing but whitespace, which a search treats as no query at all. */
|
|
2657
|
+
declare function isBlankQuery(query: string): boolean;
|
|
2658
|
+
//#endregion
|
|
2625
2659
|
//#region src/model/search.d.ts
|
|
2626
2660
|
interface SearchOptions {
|
|
2627
2661
|
/** Defaults to false. Ignored for a `RegExp`, whose own `i` flag rules. */
|
|
@@ -2751,6 +2785,16 @@ interface InkDocument {
|
|
|
2751
2785
|
* present, sets the values it names and leaves the rest; that is not an undo step.
|
|
2752
2786
|
*/
|
|
2753
2787
|
importAnnotations(data: AnnotationDocument | string, opts?: ImportOptions): ImportResult;
|
|
2788
|
+
/**
|
|
2789
|
+
* The name to save the file under: the opened File's name, else the URL's last path segment,
|
|
2790
|
+
* else `document.pdf`.
|
|
2791
|
+
*/
|
|
2792
|
+
readonly fileName: string;
|
|
2793
|
+
/**
|
|
2794
|
+
* The PDF as a file, for download and print: today the bytes it was opened from, without
|
|
2795
|
+
* this session's annotations. Waits for `ready`; rejects as `ready` does.
|
|
2796
|
+
*/
|
|
2797
|
+
getData(): Promise<Uint8Array>;
|
|
2754
2798
|
/** Writes the document with its annotations. Needs @inkbar/engine; rejects with EngineUnavailable otherwise. */
|
|
2755
2799
|
save(): Promise<Uint8Array>;
|
|
2756
2800
|
destroy(): void;
|
|
@@ -2955,5 +2999,5 @@ declare function createSignatureLibrary(store: SignatureStore): SignatureLibrary
|
|
|
2955
2999
|
*/
|
|
2956
3000
|
declare function signField(doc: InkDocument, field: string, widget: string, t: SignatureTemplate): string;
|
|
2957
3001
|
//#endregion
|
|
2958
|
-
export {
|
|
2959
|
-
//# sourceMappingURL=sign-
|
|
3002
|
+
export { StoreOptions as $, rectFromPoints as $n, NoteIconSchema as $t, DocumentSource as A, WidgetAppearance as An, ExportedAnnotation as At, InkErrorCode as B, Matrix as Bn, GLOSS_VERSION$1 as Bt, createToolStyle as C, FormAction as Cn, AnnotationDocumentSchema as Ct, InkStatus as D, FormSetResult as Dn, AnnotationSchema as Dt, InkDocument as E, FormFieldType as En, AnnotationPatch as Et, TextContent as F, readonly as Fn, FreeTextStyle$1 as Ft, importAnnotations as G, approxEqual as Gn, LineEnding$1 as Gt, ImportOptions as H, Quad as Hn, InkAnnotation as Ht, TextItem as I, writable as In, FreeTextStyleSchema as It, createHistory as J, pointsFromFlat as Jn, LoupeAnnotation as Jt, History as K, invertMatrix as Kn, LineEndingSchema as Kt, FormController as L, PageInfo as Ln, GLOSS_FORMAT$1 as Lt, SearchOptions as M, Readable as Mn, ForeignAnnotation as Mt, SearchResults as N, Writable as Nn, FreeTextAnnotation as Nt, OpenOptions as O, FormWidget as On, AnnotationType as Ot, isBlankQuery as P, derived as Pn, FreeTextSchema as Pt, StoreMode as Q, rectContainsPoint as Qn, NoteAnnotation as Qt, FormScripting as R, PageRotation as Rn, GLOSS_MEDIA_TYPE as Rt, ToolStyleDeps as S, FieldsMode as Sn, AnnotationDocument as St, DocumentStatus as T, FormField as Tn, AnnotationOfType as Tt, ImportResult as U, Rect$1 as Un, InkSchema as Ut, isInkError as V, Point$1 as Vn, IMAGE_DATA_URL as Vt, exportAnnotations as W, applyMatrix as Wn, LineAnnotation as Wt, AnnotationEdit as X, quadsFromFlat as Xn, MaskAnnotation as Xt, AnnotationChange as Y, quadFromRect as Yn, LoupeSchema as Yt, AnnotationStore as Z, quadsFromRect as Zn, MaskSchema as Zt, ScopedToolStyle as _, FieldFlags as _n, AnnotationDefaults as _t, SignatureOptions as a, PolylineSchema as an, unionRects as ar, RecordStoreOptions as at, StyleProps as b, FieldValues as bn, staticDefaults as bt, createImageTemplate as c, RedactAnnotation as cn, EmbeddedSummary as ct, createMemorySignatureStore as d, ShapeSchema as dn, importEmbeddedPage as dt, NoteSchema as en, rectFromQuad as er, createAnnotationStore as et, createSignatureLibrary as f, SquareSchema as fn, importedId as ft, STYLE_GROUPS as g, TextMarkupSchema as gn, FringeSchema as gt, CurrentStyle as h, TextMarkupAnnotation as hn, Fringe$1 as ht, SignatureLibrary as i, PolygonSchema as in, translateRect as ir, RecordStore as it, SearchHit as j, WidgetOverride as jn, ExportedAnnotationSchema as jt, openDocument as k, WidgetAction as kn, CircleSchema as kt, createInkTemplate as l, RedactSchema as ln, EmbeddedTarget as lt, placeSignature as m, StampSchema as mn, summarise as mt, DEFAULT_SIGNATURE_WIDTH as n, PolyAnnotation as nn, rectsIntersect as nr, RecordBase as nt, SignatureStore as o, QuadSchema as on, createRecordStore as ot, normaliseInk as p, StampAnnotation as pn, pdfColorToHex as pt, PluginHistory as q, multiplyMatrix as qn, LineSchema as qt, SIGNATURE_INK_WIDTH as r, PolySchema as rn, translateQuad as rr, RecordChange as rt, SignatureTemplate as s, RectSchema as sn, EmbeddedFieldPatch as st, signField as t, PointSchema as tn, rectFromQuads as tr, deriveRect as tt, createLocalSignatureStore as u, ShapeAnnotation as un, SUPPORTED_SUBTYPES as ut, StyleGroup as v, FieldOption as vn, cssVariableDefaults as vt, DocumentInfo as w, FormEvent as wn, AnnotationInput as wt, ToolStyle as x, FieldsChange as xn, Annotation$1 as xt, StyleKey as y, FieldValue as yn, normalizeColor as yt, InkError as z, PdfAssets as zn, GLOSS_SCHEMA_ID as zt };
|
|
3003
|
+
//# sourceMappingURL=sign-BTbtPHbM.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sign-BTbtPHbM.d.mts","names":["Point","Rect","Rect","Rect","Annotation","FreeTextStyle","LineEnding","GlossAnnotation","Fringe","Point","Fringe","Annotation","Annotation","Rect","Rect","Rect","LineEnding","Point"],"sources":["../src/model/geometry.ts","../src/pdfjs/types.ts","../src/model/pages.ts","../src/model/readable.ts","../src/model/form/types.ts","../src/model/annotations/types.ts","../src/model/annotations/defaults.ts","../src/model/annotations/callout.ts","../src/model/annotations/embedded.ts","../src/model/records.ts","../src/model/annotations/store.ts","../src/model/annotations/history.ts","../src/model/form/gloss.ts","../src/model/annotations/json.ts","../src/model/errors.ts","../src/model/form/controller.ts","../src/model/text.ts","../src/model/search-text.ts","../src/model/search.ts","../src/model/source.ts","../src/model/document.ts","../src/model/annotations/tool-style.ts","../src/model/signatures.ts","../src/model/form/sign.ts"],"mappings":";;;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f;;;cAIW;;cAGA;;iBAkDG,2BACd,UAAS,sBACR;;;;;;;;iBAsBa,0BAA0B,cAAc;;;;;;;iBA8FxC,aAAa,SAASA;EAAc,SAASA;EAAW;;;;;;iBAsBxD,kBACd,SAASA,aACT,wBACC;;iBAoBa,oBACd,mBACA,iBACC;;;;;;;;iBAea,eACd,GAAG,mBACH,cACA,QAAQA,SACR,gBACA,gCACC;;;;;UA0Cc;WACN,OAAO;;WAEP,WAAW,kBAAkB;EACtC,IAAI,aAAa;;EAEjB,WAAW;;EAEX,KAAK,GAAG,oBAAoB;;;;;EAK5B,OAAO,aAAa;;WAEX,aAAa;EACtB;;iBAGc,uBAAuB,OAAO,iBAAiB;;;;;;;;;;;;;;;;iBC1T/C,UACd,KAAK,aACL,eACA,gBACA,GAAG"}
|
|
@@ -2855,7 +2855,13 @@ const Base = {
|
|
|
2855
2855
|
/** Created in this session, or imported from the file. Viewer state, never exported. */
|
|
2856
2856
|
source: z.enum(["session", "pdf"]),
|
|
2857
2857
|
/** Embedded annotations are locked until the engine can rewrite the file. Viewer state, never exported. */
|
|
2858
|
-
locked: z.boolean().optional()
|
|
2858
|
+
locked: z.boolean().optional(),
|
|
2859
|
+
/**
|
|
2860
|
+
* Embedded annotations only: whether the file carries its own appearance stream for it. PDF.js
|
|
2861
|
+
* paints the page with it; without one, it paints a stand-in for most types but nothing for a
|
|
2862
|
+
* note. Viewer state, never exported.
|
|
2863
|
+
*/
|
|
2864
|
+
hasAppearance: z.boolean().optional()
|
|
2859
2865
|
};
|
|
2860
2866
|
const Quads = z.array(QuadSchema).min(1);
|
|
2861
2867
|
const TextMarkupSchema = z.object({
|
|
@@ -3020,7 +3026,8 @@ const AnnotationSchema = z.discriminatedUnion("type", [
|
|
|
3020
3026
|
/** The viewer's own state on an annotation, left out of exports. */
|
|
3021
3027
|
const VIEWER_STATE = {
|
|
3022
3028
|
source: true,
|
|
3023
|
-
locked: true
|
|
3029
|
+
locked: true,
|
|
3030
|
+
hasAppearance: true
|
|
3024
3031
|
};
|
|
3025
3032
|
/** One exported annotation: the stored annotation without its viewer state. */
|
|
3026
3033
|
const ExportedAnnotationSchema = z.discriminatedUnion("type", [
|
|
@@ -3173,7 +3180,8 @@ function convert(page, d, importedAt) {
|
|
|
3173
3180
|
createdAt: created,
|
|
3174
3181
|
modifiedAt: parsePdfDate(d.modificationDate, created),
|
|
3175
3182
|
source: "pdf",
|
|
3176
|
-
locked: true
|
|
3183
|
+
locked: true,
|
|
3184
|
+
hasAppearance: d.hasAppearance === true
|
|
3177
3185
|
});
|
|
3178
3186
|
const fillOf = (c) => c && c.length >= 3 ? { interiorColor: pdfColorToHex(c, "#FFFFFF") } : {};
|
|
3179
3187
|
let candidate;
|
|
@@ -4064,6 +4072,7 @@ function guardEmbedded(current, proposed) {
|
|
|
4064
4072
|
source: "pdf"
|
|
4065
4073
|
};
|
|
4066
4074
|
keepKey(candidate, current, "locked");
|
|
4075
|
+
keepKey(candidate, current, "hasAppearance");
|
|
4067
4076
|
if (current.locked) for (const key of LOCKED_KEYS) keepKey(candidate, current, key);
|
|
4068
4077
|
const parsed = AnnotationSchema.safeParse(candidate);
|
|
4069
4078
|
return parsed.success ? parsed.data : current;
|
|
@@ -4302,7 +4311,10 @@ function createAnnotationStore(opts) {
|
|
|
4302
4311
|
source: before.source,
|
|
4303
4312
|
modifiedAt: now()
|
|
4304
4313
|
};
|
|
4305
|
-
if (before.source === "pdf")
|
|
4314
|
+
if (before.source === "pdf") {
|
|
4315
|
+
keepKey(candidate, before, "locked");
|
|
4316
|
+
keepKey(candidate, before, "hasAppearance");
|
|
4317
|
+
}
|
|
4306
4318
|
const after = AnnotationSchema.parse(candidate);
|
|
4307
4319
|
const swap = (items) => items.map((a) => a.id === id ? after : a);
|
|
4308
4320
|
const next = swap(basis());
|
|
@@ -5563,6 +5575,38 @@ function resolveSource(src, fetchImpl = globalThis.fetch) {
|
|
|
5563
5575
|
bytes: async () => new Uint8Array(await blob.arrayBuffer())
|
|
5564
5576
|
};
|
|
5565
5577
|
}
|
|
5578
|
+
const DEFAULT_FILE_NAME = "document.pdf";
|
|
5579
|
+
/** `name` ending in `.pdf` (any case), else with it added. */
|
|
5580
|
+
const asPdf = (name) => /\.pdf$/i.test(name) ? name : `${name}.pdf`;
|
|
5581
|
+
/** A URL's last path segment, decoded, without its query or hash; null when it has none. */
|
|
5582
|
+
function urlFileName(url) {
|
|
5583
|
+
let path;
|
|
5584
|
+
try {
|
|
5585
|
+
path = new URL(url, "http://localhost").pathname;
|
|
5586
|
+
} catch {
|
|
5587
|
+
return null;
|
|
5588
|
+
}
|
|
5589
|
+
const last = path.split("/").pop() ?? "";
|
|
5590
|
+
if (last === "") return null;
|
|
5591
|
+
try {
|
|
5592
|
+
return decodeURIComponent(last);
|
|
5593
|
+
} catch {
|
|
5594
|
+
return last;
|
|
5595
|
+
}
|
|
5596
|
+
}
|
|
5597
|
+
/**
|
|
5598
|
+
* The name to save `src` under: a File's name, else a URL's last path segment, with `.pdf`
|
|
5599
|
+
* added when it has none; `document.pdf` when neither gives one.
|
|
5600
|
+
*/
|
|
5601
|
+
function sourceFileName(src) {
|
|
5602
|
+
let name = null;
|
|
5603
|
+
if (typeof src === "string") name = urlFileName(src);
|
|
5604
|
+
else if (src instanceof ArrayBuffer || src instanceof Uint8Array) name = null;
|
|
5605
|
+
else if ("url" in src) name = urlFileName(src.url);
|
|
5606
|
+
else if ("data" in src) name = null;
|
|
5607
|
+
else if (typeof src.name === "string") name = src.name;
|
|
5608
|
+
return name ? asPdf(name) : DEFAULT_FILE_NAME;
|
|
5609
|
+
}
|
|
5566
5610
|
/**
|
|
5567
5611
|
* A view over the host's bytes. `bytes()` hands PDF.js a copy each time: PDF.js transfers the
|
|
5568
5612
|
* buffer it is given to its worker, which would empty the host's array and break a reopen
|
|
@@ -6023,6 +6067,14 @@ async function openDocument(source, options) {
|
|
|
6023
6067
|
}
|
|
6024
6068
|
const doc = {
|
|
6025
6069
|
key: resolved.key,
|
|
6070
|
+
fileName: sourceFileName(source),
|
|
6071
|
+
async getData() {
|
|
6072
|
+
if (destroyed) throw destroyedError();
|
|
6073
|
+
await ready;
|
|
6074
|
+
if (destroyed) throw destroyedError();
|
|
6075
|
+
if (!handles) throw statusError(status.get());
|
|
6076
|
+
return handles.proxy.getData();
|
|
6077
|
+
},
|
|
6026
6078
|
status: readonly(status),
|
|
6027
6079
|
ready,
|
|
6028
6080
|
pages,
|
|
@@ -7934,4 +7986,4 @@ function signField(doc, field, widget, t) {
|
|
|
7934
7986
|
//#endregion
|
|
7935
7987
|
export { deriveRect as $, pdfNameSet as $t, fromAnnotation as A, PolylineSchema as At, isBubble as B, freeTextBox as Bt, isThreadRoot as C, isInkError as Cn, LoupeSchema as Ct, withoutReplies as D, PointSchema as Dt, threadRoot as E, NoteSchema as Et, toFields as F, SquareSchema as Ft, resizedBox as G, normalizeColor as Gt, keepsAspect as H, withCalloutBounds as Ht, typesInGroup as I, StampSchema as It, translated as J, INTENTS as Jt, resizedRect as K, staticDefaults as Kt, hasCallout as L, TextMarkupSchema as Lt, styleGroupOfType as M, RectSchema as Mt, styleGroupsOf as N, RedactSchema as Nt, STYLE_GROUPS as O, PolySchema as Ot, supportedProps as P, ShapeSchema as Pt, createAnnotationStore as Q, isKnown as Qt, hasCornerHandles as R, FringeSchema as Rt, isReply as S, InkError as Sn, LineSchema as St, threadOf as T, NoteIconSchema as Tt, movedEndpoint as U, parsePdfDate as Ut, isTextMarkup as V, isStandardCallout as Vt, movedTip as W, cssVariableDefaults as Wt, openDocument as X, NOTE_ICONS as Xt, withBox as Y, LINE_ENDINGS as Yt, isBlankQuery as Z, PDF_NAME$1 as Zt, constrain as _, rectsIntersect as _n, GLOSS_SCHEMA_ID as _t, createInkTemplate as a, applyMatrix as an, importEmbeddedPage as at, shapeInput as b, unionRects as bn, InkSchema as bt, createSignatureLibrary as c, multiplyMatrix as cn, summarise as ct, RECOGNISE_THRESHOLD as d, quadsFromFlat as dn, CircleSchema as dt, mergeLineRects as en, exportAnnotations as et, recogniseStroke as f, quadsFromRect as fn, ExportedAnnotationSchema as ft, SHAPE_KINDS as g, rectFromQuads as gn, GLOSS_MEDIA_TYPE as gt, DEFAULT_SHAPE_SIZE as h, rectFromQuad as hn, GLOSS_FORMAT$1 as ht, createImageTemplate as i, writable as in, SUPPORTED_SUBTYPES as it, styleGroupOf as j, QuadSchema as jt, createToolStyle as k, PolygonSchema as kt, normaliseInk as l, pointsFromFlat as ln, AnnotationDocumentSchema as lt, DEFAULT_SHAPE_OPTIONS as m, rectFromPoints as mn, FreeTextStyleSchema as mt, DEFAULT_SIGNATURE_WIDTH as n, derived as nn, createHistory as nt, createLocalSignatureStore as o, approxEqual as on, importedId as ot, DEFAULT_CORNER_RADIUS as p, rectContainsPoint as pn, FreeTextSchema as pt, scaled as q, sameValue$1 as qt, SIGNATURE_INK_WIDTH as r, readonly as rn, isProduction as rt, createMemorySignatureStore as s, invertMatrix as sn, pdfColorToHex as st, signField as t, createRecordStore as tn, importAnnotations as tt, placeSignature as u, quadFromRect as un, AnnotationSchema as ut, defaultEnds as v, translateQuad as vn, GLOSS_VERSION$1 as vt, repliesTo as w, MaskSchema as wt, isAbandonedNote as x, Emitter as xn, LineEndingSchema as xt, isPointerOnlyKind as y, translateRect as yn, IMAGE_DATA_URL as yt, hasRectGeometry as z, calloutStroke as zt };
|
|
7936
7988
|
|
|
7937
|
-
//# sourceMappingURL=sign-
|
|
7989
|
+
//# sourceMappingURL=sign-DZVDJhqT.mjs.map
|