@inkbar/react 0.8.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 +72 -5
- package/dist/index.d.mts +325 -10
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +969 -52
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef, ReactNode, Ref } from "react";
|
|
2
|
-
import { Annotation, AnnotationChange, AnnotationDefaults, AnnotationDocument, AnnotationInput, AnnotationPatch, CurrentStyle, DocumentSource, FieldValues, FieldsChange, FormAction, FormField, FormSetResult, ImportOptions, InkDocument, InkError, InkStatus, PageInfo, PdfAssets, PluginHistory, Readable, SignatureLibrary, SignatureStore, SignatureTemplate, StyleGroup, StyleKey, StyleProps, Writable } from "@inkbar/core";
|
|
3
|
-
import { AnnotationDecoration, AnnotationSlotProps, AnnotationSlotProps as AnnotationSlotProps$1, AnnotationState, ColorProperty, DecorateAnnotation, DecorateAnnotation as DecorateAnnotation$1, InkPlugin, InkPlugin as InkPlugin$1, LayoutMode, PageMount, PluginHost, SearchController, SearchState, ThreadPopoverSlotProps, ThreadPopoverSlotProps as ThreadPopoverSlotProps$1, Tool, ToolController, ToolId, ToolOptions, ToolStyle, ViewRotation, ViewerSearch, Viewport, ZoomValue } from "@inkbar/core/dom";
|
|
2
|
+
import { Annotation, AnnotationChange, AnnotationDefaults, AnnotationDocument, AnnotationInput, AnnotationPatch, CurrentStyle, DocumentSource, FieldValues, FieldsChange, FormAction, FormField, FormSetResult, ImportOptions, InkDocument, InkError, InkStatus, PageInfo, PdfAssets, PluginHistory, Readable, RecordBase, SignatureLibrary, SignatureStore, SignatureTemplate, StyleGroup, StyleKey, StyleProps, Writable } from "@inkbar/core";
|
|
3
|
+
import { AnnotationDecoration, AnnotationSlotProps, AnnotationSlotProps as AnnotationSlotProps$1, AnnotationState, CardSpec, CardSpec as CardSpec$1, ColorProperty, DecorateAnnotation, DecorateAnnotation as DecorateAnnotation$1, HostRecords, HostRecords as HostRecords$1, InkPlugin, InkPlugin as InkPlugin$1, LayoutMode, PageMount, PluginHost, RecordListSource, SearchController, SearchState, SidebarLayout, SidebarLayout as SidebarLayout$1, SidebarOpen, SidebarOpen as SidebarOpen$1, SidebarSide, SidebarSide as SidebarSide$1, ThreadPopoverSlotProps, ThreadPopoverSlotProps as ThreadPopoverSlotProps$1, Tool, ToolController, ToolId, ToolOptions, ToolStyle, ViewRotation, ViewerSearch, Viewport, ZoomValue } from "@inkbar/core/dom";
|
|
4
4
|
import { Select, Toolbar } from "radix-ui";
|
|
5
5
|
import { IconNode } from "@inkbar/icons";
|
|
6
6
|
//#region src/context.d.ts
|
|
@@ -51,6 +51,13 @@ interface InkContext {
|
|
|
51
51
|
setTool: (id: ToolId) => void;
|
|
52
52
|
/** Host tools from InkRoot's `tools` prop; InkViewport registers them. */
|
|
53
53
|
hostTools: Tool[] | undefined;
|
|
54
|
+
/**
|
|
55
|
+
* The ids of the tools the current viewer was built with, set by InkViewport through
|
|
56
|
+
* `setOpenedToolIds`; `null` while there is none. A tool added to `tools` later is
|
|
57
|
+
* registered from the next build.
|
|
58
|
+
*/
|
|
59
|
+
openedToolIds: readonly ToolId[] | null;
|
|
60
|
+
setOpenedToolIds: (ids: readonly ToolId[] | null) => void;
|
|
54
61
|
/**
|
|
55
62
|
* Calls InkRoot's current `decorateAnnotation` prop. The function itself stays the same
|
|
56
63
|
* across renders, so a new prop does not re-render the context's consumers.
|
|
@@ -156,6 +163,7 @@ export declare function useAnnotations(): {
|
|
|
156
163
|
id: string;
|
|
157
164
|
page: number;
|
|
158
165
|
locked?: boolean | undefined;
|
|
166
|
+
hasAppearance?: boolean | undefined;
|
|
159
167
|
author?: string | undefined;
|
|
160
168
|
contents?: string | undefined;
|
|
161
169
|
inReplyTo?: string | undefined;
|
|
@@ -179,6 +187,7 @@ export declare function useAnnotations(): {
|
|
|
179
187
|
page: number;
|
|
180
188
|
type: "text";
|
|
181
189
|
locked?: boolean | undefined;
|
|
190
|
+
hasAppearance?: boolean | undefined;
|
|
182
191
|
author?: string | undefined;
|
|
183
192
|
contents?: string | undefined;
|
|
184
193
|
inReplyTo?: string | undefined;
|
|
@@ -227,6 +236,7 @@ export declare function useAnnotations(): {
|
|
|
227
236
|
fontSize?: undefined;
|
|
228
237
|
align?: undefined;
|
|
229
238
|
locked?: boolean | undefined;
|
|
239
|
+
hasAppearance?: boolean | undefined;
|
|
230
240
|
dashes?: number[] | undefined;
|
|
231
241
|
cornerRadius?: number | undefined;
|
|
232
242
|
head?: (string & {}) | "None" | "Square" | "Circle" | "Diamond" | "OpenArrow" | "ClosedArrow" | "Butt" | "ROpenArrow" | "RClosedArrow" | "Slash" | undefined;
|
|
@@ -252,6 +262,7 @@ export declare function useAnnotations(): {
|
|
|
252
262
|
page: number;
|
|
253
263
|
type: "square";
|
|
254
264
|
locked?: boolean | undefined;
|
|
265
|
+
hasAppearance?: boolean | undefined;
|
|
255
266
|
dashes?: number[] | undefined;
|
|
256
267
|
interiorColor?: string | undefined;
|
|
257
268
|
cornerRadius?: number | undefined;
|
|
@@ -279,6 +290,7 @@ export declare function useAnnotations(): {
|
|
|
279
290
|
type: "circle";
|
|
280
291
|
cornerRadius?: undefined;
|
|
281
292
|
locked?: boolean | undefined;
|
|
293
|
+
hasAppearance?: boolean | undefined;
|
|
282
294
|
dashes?: number[] | undefined;
|
|
283
295
|
interiorColor?: string | undefined;
|
|
284
296
|
author?: string | undefined;
|
|
@@ -312,6 +324,7 @@ export declare function useAnnotations(): {
|
|
|
312
324
|
page: number;
|
|
313
325
|
type: "line";
|
|
314
326
|
locked?: boolean | undefined;
|
|
327
|
+
hasAppearance?: boolean | undefined;
|
|
315
328
|
dashes?: number[] | undefined;
|
|
316
329
|
head?: (string & {}) | "None" | "Square" | "Circle" | "Diamond" | "OpenArrow" | "ClosedArrow" | "Butt" | "ROpenArrow" | "RClosedArrow" | "Slash" | undefined;
|
|
317
330
|
tail?: (string & {}) | "None" | "Square" | "Circle" | "Diamond" | "OpenArrow" | "ClosedArrow" | "Butt" | "ROpenArrow" | "RClosedArrow" | "Slash" | undefined;
|
|
@@ -342,6 +355,7 @@ export declare function useAnnotations(): {
|
|
|
342
355
|
page: number;
|
|
343
356
|
type: "polyline";
|
|
344
357
|
locked?: boolean | undefined;
|
|
358
|
+
hasAppearance?: boolean | undefined;
|
|
345
359
|
dashes?: number[] | undefined;
|
|
346
360
|
interiorColor?: string | undefined;
|
|
347
361
|
head?: (string & {}) | "None" | "Square" | "Circle" | "Diamond" | "OpenArrow" | "ClosedArrow" | "Butt" | "ROpenArrow" | "RClosedArrow" | "Slash" | undefined;
|
|
@@ -375,6 +389,7 @@ export declare function useAnnotations(): {
|
|
|
375
389
|
head?: undefined;
|
|
376
390
|
tail?: undefined;
|
|
377
391
|
locked?: boolean | undefined;
|
|
392
|
+
hasAppearance?: boolean | undefined;
|
|
378
393
|
dashes?: number[] | undefined;
|
|
379
394
|
interiorColor?: string | undefined;
|
|
380
395
|
author?: string | undefined;
|
|
@@ -405,6 +420,7 @@ export declare function useAnnotations(): {
|
|
|
405
420
|
type: "ink";
|
|
406
421
|
pressure?: number[][] | undefined;
|
|
407
422
|
locked?: boolean | undefined;
|
|
423
|
+
hasAppearance?: boolean | undefined;
|
|
408
424
|
dashes?: number[] | undefined;
|
|
409
425
|
author?: string | undefined;
|
|
410
426
|
contents?: string | undefined;
|
|
@@ -429,6 +445,7 @@ export declare function useAnnotations(): {
|
|
|
429
445
|
page: number;
|
|
430
446
|
type: "stamp";
|
|
431
447
|
locked?: boolean | undefined;
|
|
448
|
+
hasAppearance?: boolean | undefined;
|
|
432
449
|
rotation?: 0 | 90 | 180 | 270 | undefined;
|
|
433
450
|
author?: string | undefined;
|
|
434
451
|
contents?: string | undefined;
|
|
@@ -454,6 +471,7 @@ export declare function useAnnotations(): {
|
|
|
454
471
|
page: number;
|
|
455
472
|
type: "loupe";
|
|
456
473
|
locked?: boolean | undefined;
|
|
474
|
+
hasAppearance?: boolean | undefined;
|
|
457
475
|
author?: string | undefined;
|
|
458
476
|
contents?: string | undefined;
|
|
459
477
|
inReplyTo?: string | undefined;
|
|
@@ -478,6 +496,7 @@ export declare function useAnnotations(): {
|
|
|
478
496
|
page: number;
|
|
479
497
|
type: "mask";
|
|
480
498
|
locked?: boolean | undefined;
|
|
499
|
+
hasAppearance?: boolean | undefined;
|
|
481
500
|
author?: string | undefined;
|
|
482
501
|
contents?: string | undefined;
|
|
483
502
|
inReplyTo?: string | undefined;
|
|
@@ -519,6 +538,7 @@ export declare function useAnnotations(): {
|
|
|
519
538
|
};
|
|
520
539
|
}[] | undefined;
|
|
521
540
|
locked?: boolean | undefined;
|
|
541
|
+
hasAppearance?: boolean | undefined;
|
|
522
542
|
overlayText?: string | undefined;
|
|
523
543
|
author?: string | undefined;
|
|
524
544
|
contents?: string | undefined;
|
|
@@ -561,6 +581,7 @@ export declare function useAnnotations(): {
|
|
|
561
581
|
id: string;
|
|
562
582
|
page: number;
|
|
563
583
|
locked?: boolean | undefined;
|
|
584
|
+
hasAppearance?: boolean | undefined;
|
|
564
585
|
author?: string | undefined;
|
|
565
586
|
contents?: string | undefined;
|
|
566
587
|
inReplyTo?: string | undefined;
|
|
@@ -584,6 +605,7 @@ export declare function useAnnotations(): {
|
|
|
584
605
|
page: number;
|
|
585
606
|
type: "text";
|
|
586
607
|
locked?: boolean | undefined;
|
|
608
|
+
hasAppearance?: boolean | undefined;
|
|
587
609
|
author?: string | undefined;
|
|
588
610
|
contents?: string | undefined;
|
|
589
611
|
inReplyTo?: string | undefined;
|
|
@@ -632,6 +654,7 @@ export declare function useAnnotations(): {
|
|
|
632
654
|
fontSize?: undefined;
|
|
633
655
|
align?: undefined;
|
|
634
656
|
locked?: boolean | undefined;
|
|
657
|
+
hasAppearance?: boolean | undefined;
|
|
635
658
|
dashes?: number[] | undefined;
|
|
636
659
|
cornerRadius?: number | undefined;
|
|
637
660
|
head?: (string & {}) | "None" | "Square" | "Circle" | "Diamond" | "OpenArrow" | "ClosedArrow" | "Butt" | "ROpenArrow" | "RClosedArrow" | "Slash" | undefined;
|
|
@@ -657,6 +680,7 @@ export declare function useAnnotations(): {
|
|
|
657
680
|
page: number;
|
|
658
681
|
type: "square";
|
|
659
682
|
locked?: boolean | undefined;
|
|
683
|
+
hasAppearance?: boolean | undefined;
|
|
660
684
|
dashes?: number[] | undefined;
|
|
661
685
|
interiorColor?: string | undefined;
|
|
662
686
|
cornerRadius?: number | undefined;
|
|
@@ -684,6 +708,7 @@ export declare function useAnnotations(): {
|
|
|
684
708
|
type: "circle";
|
|
685
709
|
cornerRadius?: undefined;
|
|
686
710
|
locked?: boolean | undefined;
|
|
711
|
+
hasAppearance?: boolean | undefined;
|
|
687
712
|
dashes?: number[] | undefined;
|
|
688
713
|
interiorColor?: string | undefined;
|
|
689
714
|
author?: string | undefined;
|
|
@@ -717,6 +742,7 @@ export declare function useAnnotations(): {
|
|
|
717
742
|
page: number;
|
|
718
743
|
type: "line";
|
|
719
744
|
locked?: boolean | undefined;
|
|
745
|
+
hasAppearance?: boolean | undefined;
|
|
720
746
|
dashes?: number[] | undefined;
|
|
721
747
|
head?: (string & {}) | "None" | "Square" | "Circle" | "Diamond" | "OpenArrow" | "ClosedArrow" | "Butt" | "ROpenArrow" | "RClosedArrow" | "Slash" | undefined;
|
|
722
748
|
tail?: (string & {}) | "None" | "Square" | "Circle" | "Diamond" | "OpenArrow" | "ClosedArrow" | "Butt" | "ROpenArrow" | "RClosedArrow" | "Slash" | undefined;
|
|
@@ -747,6 +773,7 @@ export declare function useAnnotations(): {
|
|
|
747
773
|
page: number;
|
|
748
774
|
type: "polyline";
|
|
749
775
|
locked?: boolean | undefined;
|
|
776
|
+
hasAppearance?: boolean | undefined;
|
|
750
777
|
dashes?: number[] | undefined;
|
|
751
778
|
interiorColor?: string | undefined;
|
|
752
779
|
head?: (string & {}) | "None" | "Square" | "Circle" | "Diamond" | "OpenArrow" | "ClosedArrow" | "Butt" | "ROpenArrow" | "RClosedArrow" | "Slash" | undefined;
|
|
@@ -780,6 +807,7 @@ export declare function useAnnotations(): {
|
|
|
780
807
|
head?: undefined;
|
|
781
808
|
tail?: undefined;
|
|
782
809
|
locked?: boolean | undefined;
|
|
810
|
+
hasAppearance?: boolean | undefined;
|
|
783
811
|
dashes?: number[] | undefined;
|
|
784
812
|
interiorColor?: string | undefined;
|
|
785
813
|
author?: string | undefined;
|
|
@@ -810,6 +838,7 @@ export declare function useAnnotations(): {
|
|
|
810
838
|
type: "ink";
|
|
811
839
|
pressure?: number[][] | undefined;
|
|
812
840
|
locked?: boolean | undefined;
|
|
841
|
+
hasAppearance?: boolean | undefined;
|
|
813
842
|
dashes?: number[] | undefined;
|
|
814
843
|
author?: string | undefined;
|
|
815
844
|
contents?: string | undefined;
|
|
@@ -834,6 +863,7 @@ export declare function useAnnotations(): {
|
|
|
834
863
|
page: number;
|
|
835
864
|
type: "stamp";
|
|
836
865
|
locked?: boolean | undefined;
|
|
866
|
+
hasAppearance?: boolean | undefined;
|
|
837
867
|
rotation?: 0 | 90 | 180 | 270 | undefined;
|
|
838
868
|
author?: string | undefined;
|
|
839
869
|
contents?: string | undefined;
|
|
@@ -859,6 +889,7 @@ export declare function useAnnotations(): {
|
|
|
859
889
|
page: number;
|
|
860
890
|
type: "loupe";
|
|
861
891
|
locked?: boolean | undefined;
|
|
892
|
+
hasAppearance?: boolean | undefined;
|
|
862
893
|
author?: string | undefined;
|
|
863
894
|
contents?: string | undefined;
|
|
864
895
|
inReplyTo?: string | undefined;
|
|
@@ -883,6 +914,7 @@ export declare function useAnnotations(): {
|
|
|
883
914
|
page: number;
|
|
884
915
|
type: "mask";
|
|
885
916
|
locked?: boolean | undefined;
|
|
917
|
+
hasAppearance?: boolean | undefined;
|
|
886
918
|
author?: string | undefined;
|
|
887
919
|
contents?: string | undefined;
|
|
888
920
|
inReplyTo?: string | undefined;
|
|
@@ -924,6 +956,7 @@ export declare function useAnnotations(): {
|
|
|
924
956
|
};
|
|
925
957
|
}[] | undefined;
|
|
926
958
|
locked?: boolean | undefined;
|
|
959
|
+
hasAppearance?: boolean | undefined;
|
|
927
960
|
overlayText?: string | undefined;
|
|
928
961
|
author?: string | undefined;
|
|
929
962
|
contents?: string | undefined;
|
|
@@ -968,6 +1001,7 @@ export declare function useAnnotations(): {
|
|
|
968
1001
|
id: string;
|
|
969
1002
|
page: number;
|
|
970
1003
|
locked?: boolean | undefined;
|
|
1004
|
+
hasAppearance?: boolean | undefined;
|
|
971
1005
|
author?: string | undefined;
|
|
972
1006
|
contents?: string | undefined;
|
|
973
1007
|
inReplyTo?: string | undefined;
|
|
@@ -991,6 +1025,7 @@ export declare function useAnnotations(): {
|
|
|
991
1025
|
page: number;
|
|
992
1026
|
type: "text";
|
|
993
1027
|
locked?: boolean | undefined;
|
|
1028
|
+
hasAppearance?: boolean | undefined;
|
|
994
1029
|
author?: string | undefined;
|
|
995
1030
|
contents?: string | undefined;
|
|
996
1031
|
inReplyTo?: string | undefined;
|
|
@@ -1039,6 +1074,7 @@ export declare function useAnnotations(): {
|
|
|
1039
1074
|
fontSize?: undefined;
|
|
1040
1075
|
align?: undefined;
|
|
1041
1076
|
locked?: boolean | undefined;
|
|
1077
|
+
hasAppearance?: boolean | undefined;
|
|
1042
1078
|
dashes?: number[] | undefined;
|
|
1043
1079
|
cornerRadius?: number | undefined;
|
|
1044
1080
|
head?: (string & {}) | "None" | "Square" | "Circle" | "Diamond" | "OpenArrow" | "ClosedArrow" | "Butt" | "ROpenArrow" | "RClosedArrow" | "Slash" | undefined;
|
|
@@ -1064,6 +1100,7 @@ export declare function useAnnotations(): {
|
|
|
1064
1100
|
page: number;
|
|
1065
1101
|
type: "square";
|
|
1066
1102
|
locked?: boolean | undefined;
|
|
1103
|
+
hasAppearance?: boolean | undefined;
|
|
1067
1104
|
dashes?: number[] | undefined;
|
|
1068
1105
|
interiorColor?: string | undefined;
|
|
1069
1106
|
cornerRadius?: number | undefined;
|
|
@@ -1091,6 +1128,7 @@ export declare function useAnnotations(): {
|
|
|
1091
1128
|
type: "circle";
|
|
1092
1129
|
cornerRadius?: undefined;
|
|
1093
1130
|
locked?: boolean | undefined;
|
|
1131
|
+
hasAppearance?: boolean | undefined;
|
|
1094
1132
|
dashes?: number[] | undefined;
|
|
1095
1133
|
interiorColor?: string | undefined;
|
|
1096
1134
|
author?: string | undefined;
|
|
@@ -1124,6 +1162,7 @@ export declare function useAnnotations(): {
|
|
|
1124
1162
|
page: number;
|
|
1125
1163
|
type: "line";
|
|
1126
1164
|
locked?: boolean | undefined;
|
|
1165
|
+
hasAppearance?: boolean | undefined;
|
|
1127
1166
|
dashes?: number[] | undefined;
|
|
1128
1167
|
head?: (string & {}) | "None" | "Square" | "Circle" | "Diamond" | "OpenArrow" | "ClosedArrow" | "Butt" | "ROpenArrow" | "RClosedArrow" | "Slash" | undefined;
|
|
1129
1168
|
tail?: (string & {}) | "None" | "Square" | "Circle" | "Diamond" | "OpenArrow" | "ClosedArrow" | "Butt" | "ROpenArrow" | "RClosedArrow" | "Slash" | undefined;
|
|
@@ -1154,6 +1193,7 @@ export declare function useAnnotations(): {
|
|
|
1154
1193
|
page: number;
|
|
1155
1194
|
type: "polyline";
|
|
1156
1195
|
locked?: boolean | undefined;
|
|
1196
|
+
hasAppearance?: boolean | undefined;
|
|
1157
1197
|
dashes?: number[] | undefined;
|
|
1158
1198
|
interiorColor?: string | undefined;
|
|
1159
1199
|
head?: (string & {}) | "None" | "Square" | "Circle" | "Diamond" | "OpenArrow" | "ClosedArrow" | "Butt" | "ROpenArrow" | "RClosedArrow" | "Slash" | undefined;
|
|
@@ -1187,6 +1227,7 @@ export declare function useAnnotations(): {
|
|
|
1187
1227
|
head?: undefined;
|
|
1188
1228
|
tail?: undefined;
|
|
1189
1229
|
locked?: boolean | undefined;
|
|
1230
|
+
hasAppearance?: boolean | undefined;
|
|
1190
1231
|
dashes?: number[] | undefined;
|
|
1191
1232
|
interiorColor?: string | undefined;
|
|
1192
1233
|
author?: string | undefined;
|
|
@@ -1217,6 +1258,7 @@ export declare function useAnnotations(): {
|
|
|
1217
1258
|
type: "ink";
|
|
1218
1259
|
pressure?: number[][] | undefined;
|
|
1219
1260
|
locked?: boolean | undefined;
|
|
1261
|
+
hasAppearance?: boolean | undefined;
|
|
1220
1262
|
dashes?: number[] | undefined;
|
|
1221
1263
|
author?: string | undefined;
|
|
1222
1264
|
contents?: string | undefined;
|
|
@@ -1241,6 +1283,7 @@ export declare function useAnnotations(): {
|
|
|
1241
1283
|
page: number;
|
|
1242
1284
|
type: "stamp";
|
|
1243
1285
|
locked?: boolean | undefined;
|
|
1286
|
+
hasAppearance?: boolean | undefined;
|
|
1244
1287
|
rotation?: 0 | 90 | 180 | 270 | undefined;
|
|
1245
1288
|
author?: string | undefined;
|
|
1246
1289
|
contents?: string | undefined;
|
|
@@ -1266,6 +1309,7 @@ export declare function useAnnotations(): {
|
|
|
1266
1309
|
page: number;
|
|
1267
1310
|
type: "loupe";
|
|
1268
1311
|
locked?: boolean | undefined;
|
|
1312
|
+
hasAppearance?: boolean | undefined;
|
|
1269
1313
|
author?: string | undefined;
|
|
1270
1314
|
contents?: string | undefined;
|
|
1271
1315
|
inReplyTo?: string | undefined;
|
|
@@ -1290,6 +1334,7 @@ export declare function useAnnotations(): {
|
|
|
1290
1334
|
page: number;
|
|
1291
1335
|
type: "mask";
|
|
1292
1336
|
locked?: boolean | undefined;
|
|
1337
|
+
hasAppearance?: boolean | undefined;
|
|
1293
1338
|
author?: string | undefined;
|
|
1294
1339
|
contents?: string | undefined;
|
|
1295
1340
|
inReplyTo?: string | undefined;
|
|
@@ -1331,6 +1376,7 @@ export declare function useAnnotations(): {
|
|
|
1331
1376
|
};
|
|
1332
1377
|
}[] | undefined;
|
|
1333
1378
|
locked?: boolean | undefined;
|
|
1379
|
+
hasAppearance?: boolean | undefined;
|
|
1334
1380
|
overlayText?: string | undefined;
|
|
1335
1381
|
author?: string | undefined;
|
|
1336
1382
|
contents?: string | undefined;
|
|
@@ -1374,6 +1420,7 @@ export declare function useAnnotations(): {
|
|
|
1374
1420
|
id: string;
|
|
1375
1421
|
page: number;
|
|
1376
1422
|
locked?: boolean | undefined;
|
|
1423
|
+
hasAppearance?: boolean | undefined;
|
|
1377
1424
|
author?: string | undefined;
|
|
1378
1425
|
contents?: string | undefined;
|
|
1379
1426
|
inReplyTo?: string | undefined;
|
|
@@ -1397,6 +1444,7 @@ export declare function useAnnotations(): {
|
|
|
1397
1444
|
page: number;
|
|
1398
1445
|
type: "text";
|
|
1399
1446
|
locked?: boolean | undefined;
|
|
1447
|
+
hasAppearance?: boolean | undefined;
|
|
1400
1448
|
author?: string | undefined;
|
|
1401
1449
|
contents?: string | undefined;
|
|
1402
1450
|
inReplyTo?: string | undefined;
|
|
@@ -1445,6 +1493,7 @@ export declare function useAnnotations(): {
|
|
|
1445
1493
|
fontSize?: undefined;
|
|
1446
1494
|
align?: undefined;
|
|
1447
1495
|
locked?: boolean | undefined;
|
|
1496
|
+
hasAppearance?: boolean | undefined;
|
|
1448
1497
|
dashes?: number[] | undefined;
|
|
1449
1498
|
cornerRadius?: number | undefined;
|
|
1450
1499
|
head?: (string & {}) | "None" | "Square" | "Circle" | "Diamond" | "OpenArrow" | "ClosedArrow" | "Butt" | "ROpenArrow" | "RClosedArrow" | "Slash" | undefined;
|
|
@@ -1470,6 +1519,7 @@ export declare function useAnnotations(): {
|
|
|
1470
1519
|
page: number;
|
|
1471
1520
|
type: "square";
|
|
1472
1521
|
locked?: boolean | undefined;
|
|
1522
|
+
hasAppearance?: boolean | undefined;
|
|
1473
1523
|
dashes?: number[] | undefined;
|
|
1474
1524
|
interiorColor?: string | undefined;
|
|
1475
1525
|
cornerRadius?: number | undefined;
|
|
@@ -1497,6 +1547,7 @@ export declare function useAnnotations(): {
|
|
|
1497
1547
|
type: "circle";
|
|
1498
1548
|
cornerRadius?: undefined;
|
|
1499
1549
|
locked?: boolean | undefined;
|
|
1550
|
+
hasAppearance?: boolean | undefined;
|
|
1500
1551
|
dashes?: number[] | undefined;
|
|
1501
1552
|
interiorColor?: string | undefined;
|
|
1502
1553
|
author?: string | undefined;
|
|
@@ -1530,6 +1581,7 @@ export declare function useAnnotations(): {
|
|
|
1530
1581
|
page: number;
|
|
1531
1582
|
type: "line";
|
|
1532
1583
|
locked?: boolean | undefined;
|
|
1584
|
+
hasAppearance?: boolean | undefined;
|
|
1533
1585
|
dashes?: number[] | undefined;
|
|
1534
1586
|
head?: (string & {}) | "None" | "Square" | "Circle" | "Diamond" | "OpenArrow" | "ClosedArrow" | "Butt" | "ROpenArrow" | "RClosedArrow" | "Slash" | undefined;
|
|
1535
1587
|
tail?: (string & {}) | "None" | "Square" | "Circle" | "Diamond" | "OpenArrow" | "ClosedArrow" | "Butt" | "ROpenArrow" | "RClosedArrow" | "Slash" | undefined;
|
|
@@ -1560,6 +1612,7 @@ export declare function useAnnotations(): {
|
|
|
1560
1612
|
page: number;
|
|
1561
1613
|
type: "polyline";
|
|
1562
1614
|
locked?: boolean | undefined;
|
|
1615
|
+
hasAppearance?: boolean | undefined;
|
|
1563
1616
|
dashes?: number[] | undefined;
|
|
1564
1617
|
interiorColor?: string | undefined;
|
|
1565
1618
|
head?: (string & {}) | "None" | "Square" | "Circle" | "Diamond" | "OpenArrow" | "ClosedArrow" | "Butt" | "ROpenArrow" | "RClosedArrow" | "Slash" | undefined;
|
|
@@ -1593,6 +1646,7 @@ export declare function useAnnotations(): {
|
|
|
1593
1646
|
head?: undefined;
|
|
1594
1647
|
tail?: undefined;
|
|
1595
1648
|
locked?: boolean | undefined;
|
|
1649
|
+
hasAppearance?: boolean | undefined;
|
|
1596
1650
|
dashes?: number[] | undefined;
|
|
1597
1651
|
interiorColor?: string | undefined;
|
|
1598
1652
|
author?: string | undefined;
|
|
@@ -1623,6 +1677,7 @@ export declare function useAnnotations(): {
|
|
|
1623
1677
|
type: "ink";
|
|
1624
1678
|
pressure?: number[][] | undefined;
|
|
1625
1679
|
locked?: boolean | undefined;
|
|
1680
|
+
hasAppearance?: boolean | undefined;
|
|
1626
1681
|
dashes?: number[] | undefined;
|
|
1627
1682
|
author?: string | undefined;
|
|
1628
1683
|
contents?: string | undefined;
|
|
@@ -1647,6 +1702,7 @@ export declare function useAnnotations(): {
|
|
|
1647
1702
|
page: number;
|
|
1648
1703
|
type: "stamp";
|
|
1649
1704
|
locked?: boolean | undefined;
|
|
1705
|
+
hasAppearance?: boolean | undefined;
|
|
1650
1706
|
rotation?: 0 | 90 | 180 | 270 | undefined;
|
|
1651
1707
|
author?: string | undefined;
|
|
1652
1708
|
contents?: string | undefined;
|
|
@@ -1672,6 +1728,7 @@ export declare function useAnnotations(): {
|
|
|
1672
1728
|
page: number;
|
|
1673
1729
|
type: "loupe";
|
|
1674
1730
|
locked?: boolean | undefined;
|
|
1731
|
+
hasAppearance?: boolean | undefined;
|
|
1675
1732
|
author?: string | undefined;
|
|
1676
1733
|
contents?: string | undefined;
|
|
1677
1734
|
inReplyTo?: string | undefined;
|
|
@@ -1696,6 +1753,7 @@ export declare function useAnnotations(): {
|
|
|
1696
1753
|
page: number;
|
|
1697
1754
|
type: "mask";
|
|
1698
1755
|
locked?: boolean | undefined;
|
|
1756
|
+
hasAppearance?: boolean | undefined;
|
|
1699
1757
|
author?: string | undefined;
|
|
1700
1758
|
contents?: string | undefined;
|
|
1701
1759
|
inReplyTo?: string | undefined;
|
|
@@ -1737,6 +1795,7 @@ export declare function useAnnotations(): {
|
|
|
1737
1795
|
};
|
|
1738
1796
|
}[] | undefined;
|
|
1739
1797
|
locked?: boolean | undefined;
|
|
1798
|
+
hasAppearance?: boolean | undefined;
|
|
1740
1799
|
overlayText?: string | undefined;
|
|
1741
1800
|
author?: string | undefined;
|
|
1742
1801
|
contents?: string | undefined;
|
|
@@ -1779,6 +1838,7 @@ export declare function useAnnotations(): {
|
|
|
1779
1838
|
id: string;
|
|
1780
1839
|
page: number;
|
|
1781
1840
|
locked?: boolean | undefined;
|
|
1841
|
+
hasAppearance?: boolean | undefined;
|
|
1782
1842
|
author?: string | undefined;
|
|
1783
1843
|
contents?: string | undefined;
|
|
1784
1844
|
inReplyTo?: string | undefined;
|
|
@@ -1802,6 +1862,7 @@ export declare function useAnnotations(): {
|
|
|
1802
1862
|
page: number;
|
|
1803
1863
|
type: "text";
|
|
1804
1864
|
locked?: boolean | undefined;
|
|
1865
|
+
hasAppearance?: boolean | undefined;
|
|
1805
1866
|
author?: string | undefined;
|
|
1806
1867
|
contents?: string | undefined;
|
|
1807
1868
|
inReplyTo?: string | undefined;
|
|
@@ -1850,6 +1911,7 @@ export declare function useAnnotations(): {
|
|
|
1850
1911
|
fontSize?: undefined;
|
|
1851
1912
|
align?: undefined;
|
|
1852
1913
|
locked?: boolean | undefined;
|
|
1914
|
+
hasAppearance?: boolean | undefined;
|
|
1853
1915
|
dashes?: number[] | undefined;
|
|
1854
1916
|
cornerRadius?: number | undefined;
|
|
1855
1917
|
head?: (string & {}) | "None" | "Square" | "Circle" | "Diamond" | "OpenArrow" | "ClosedArrow" | "Butt" | "ROpenArrow" | "RClosedArrow" | "Slash" | undefined;
|
|
@@ -1875,6 +1937,7 @@ export declare function useAnnotations(): {
|
|
|
1875
1937
|
page: number;
|
|
1876
1938
|
type: "square";
|
|
1877
1939
|
locked?: boolean | undefined;
|
|
1940
|
+
hasAppearance?: boolean | undefined;
|
|
1878
1941
|
dashes?: number[] | undefined;
|
|
1879
1942
|
interiorColor?: string | undefined;
|
|
1880
1943
|
cornerRadius?: number | undefined;
|
|
@@ -1902,6 +1965,7 @@ export declare function useAnnotations(): {
|
|
|
1902
1965
|
type: "circle";
|
|
1903
1966
|
cornerRadius?: undefined;
|
|
1904
1967
|
locked?: boolean | undefined;
|
|
1968
|
+
hasAppearance?: boolean | undefined;
|
|
1905
1969
|
dashes?: number[] | undefined;
|
|
1906
1970
|
interiorColor?: string | undefined;
|
|
1907
1971
|
author?: string | undefined;
|
|
@@ -1935,6 +1999,7 @@ export declare function useAnnotations(): {
|
|
|
1935
1999
|
page: number;
|
|
1936
2000
|
type: "line";
|
|
1937
2001
|
locked?: boolean | undefined;
|
|
2002
|
+
hasAppearance?: boolean | undefined;
|
|
1938
2003
|
dashes?: number[] | undefined;
|
|
1939
2004
|
head?: (string & {}) | "None" | "Square" | "Circle" | "Diamond" | "OpenArrow" | "ClosedArrow" | "Butt" | "ROpenArrow" | "RClosedArrow" | "Slash" | undefined;
|
|
1940
2005
|
tail?: (string & {}) | "None" | "Square" | "Circle" | "Diamond" | "OpenArrow" | "ClosedArrow" | "Butt" | "ROpenArrow" | "RClosedArrow" | "Slash" | undefined;
|
|
@@ -1965,6 +2030,7 @@ export declare function useAnnotations(): {
|
|
|
1965
2030
|
page: number;
|
|
1966
2031
|
type: "polyline";
|
|
1967
2032
|
locked?: boolean | undefined;
|
|
2033
|
+
hasAppearance?: boolean | undefined;
|
|
1968
2034
|
dashes?: number[] | undefined;
|
|
1969
2035
|
interiorColor?: string | undefined;
|
|
1970
2036
|
head?: (string & {}) | "None" | "Square" | "Circle" | "Diamond" | "OpenArrow" | "ClosedArrow" | "Butt" | "ROpenArrow" | "RClosedArrow" | "Slash" | undefined;
|
|
@@ -1998,6 +2064,7 @@ export declare function useAnnotations(): {
|
|
|
1998
2064
|
head?: undefined;
|
|
1999
2065
|
tail?: undefined;
|
|
2000
2066
|
locked?: boolean | undefined;
|
|
2067
|
+
hasAppearance?: boolean | undefined;
|
|
2001
2068
|
dashes?: number[] | undefined;
|
|
2002
2069
|
interiorColor?: string | undefined;
|
|
2003
2070
|
author?: string | undefined;
|
|
@@ -2028,6 +2095,7 @@ export declare function useAnnotations(): {
|
|
|
2028
2095
|
type: "ink";
|
|
2029
2096
|
pressure?: number[][] | undefined;
|
|
2030
2097
|
locked?: boolean | undefined;
|
|
2098
|
+
hasAppearance?: boolean | undefined;
|
|
2031
2099
|
dashes?: number[] | undefined;
|
|
2032
2100
|
author?: string | undefined;
|
|
2033
2101
|
contents?: string | undefined;
|
|
@@ -2052,6 +2120,7 @@ export declare function useAnnotations(): {
|
|
|
2052
2120
|
page: number;
|
|
2053
2121
|
type: "stamp";
|
|
2054
2122
|
locked?: boolean | undefined;
|
|
2123
|
+
hasAppearance?: boolean | undefined;
|
|
2055
2124
|
rotation?: 0 | 90 | 180 | 270 | undefined;
|
|
2056
2125
|
author?: string | undefined;
|
|
2057
2126
|
contents?: string | undefined;
|
|
@@ -2077,6 +2146,7 @@ export declare function useAnnotations(): {
|
|
|
2077
2146
|
page: number;
|
|
2078
2147
|
type: "loupe";
|
|
2079
2148
|
locked?: boolean | undefined;
|
|
2149
|
+
hasAppearance?: boolean | undefined;
|
|
2080
2150
|
author?: string | undefined;
|
|
2081
2151
|
contents?: string | undefined;
|
|
2082
2152
|
inReplyTo?: string | undefined;
|
|
@@ -2101,6 +2171,7 @@ export declare function useAnnotations(): {
|
|
|
2101
2171
|
page: number;
|
|
2102
2172
|
type: "mask";
|
|
2103
2173
|
locked?: boolean | undefined;
|
|
2174
|
+
hasAppearance?: boolean | undefined;
|
|
2104
2175
|
author?: string | undefined;
|
|
2105
2176
|
contents?: string | undefined;
|
|
2106
2177
|
inReplyTo?: string | undefined;
|
|
@@ -2142,6 +2213,7 @@ export declare function useAnnotations(): {
|
|
|
2142
2213
|
};
|
|
2143
2214
|
}[] | undefined;
|
|
2144
2215
|
locked?: boolean | undefined;
|
|
2216
|
+
hasAppearance?: boolean | undefined;
|
|
2145
2217
|
overlayText?: string | undefined;
|
|
2146
2218
|
author?: string | undefined;
|
|
2147
2219
|
contents?: string | undefined;
|
|
@@ -2185,6 +2257,7 @@ export declare function useAnnotations(): {
|
|
|
2185
2257
|
id: string;
|
|
2186
2258
|
page: number;
|
|
2187
2259
|
locked?: boolean | undefined;
|
|
2260
|
+
hasAppearance?: boolean | undefined;
|
|
2188
2261
|
author?: string | undefined;
|
|
2189
2262
|
contents?: string | undefined;
|
|
2190
2263
|
inReplyTo?: string | undefined;
|
|
@@ -2208,6 +2281,7 @@ export declare function useAnnotations(): {
|
|
|
2208
2281
|
page: number;
|
|
2209
2282
|
type: "text";
|
|
2210
2283
|
locked?: boolean | undefined;
|
|
2284
|
+
hasAppearance?: boolean | undefined;
|
|
2211
2285
|
author?: string | undefined;
|
|
2212
2286
|
contents?: string | undefined;
|
|
2213
2287
|
inReplyTo?: string | undefined;
|
|
@@ -2256,6 +2330,7 @@ export declare function useAnnotations(): {
|
|
|
2256
2330
|
fontSize?: undefined;
|
|
2257
2331
|
align?: undefined;
|
|
2258
2332
|
locked?: boolean | undefined;
|
|
2333
|
+
hasAppearance?: boolean | undefined;
|
|
2259
2334
|
dashes?: number[] | undefined;
|
|
2260
2335
|
cornerRadius?: number | undefined;
|
|
2261
2336
|
head?: (string & {}) | "None" | "Square" | "Circle" | "Diamond" | "OpenArrow" | "ClosedArrow" | "Butt" | "ROpenArrow" | "RClosedArrow" | "Slash" | undefined;
|
|
@@ -2281,6 +2356,7 @@ export declare function useAnnotations(): {
|
|
|
2281
2356
|
page: number;
|
|
2282
2357
|
type: "square";
|
|
2283
2358
|
locked?: boolean | undefined;
|
|
2359
|
+
hasAppearance?: boolean | undefined;
|
|
2284
2360
|
dashes?: number[] | undefined;
|
|
2285
2361
|
interiorColor?: string | undefined;
|
|
2286
2362
|
cornerRadius?: number | undefined;
|
|
@@ -2308,6 +2384,7 @@ export declare function useAnnotations(): {
|
|
|
2308
2384
|
type: "circle";
|
|
2309
2385
|
cornerRadius?: undefined;
|
|
2310
2386
|
locked?: boolean | undefined;
|
|
2387
|
+
hasAppearance?: boolean | undefined;
|
|
2311
2388
|
dashes?: number[] | undefined;
|
|
2312
2389
|
interiorColor?: string | undefined;
|
|
2313
2390
|
author?: string | undefined;
|
|
@@ -2341,6 +2418,7 @@ export declare function useAnnotations(): {
|
|
|
2341
2418
|
page: number;
|
|
2342
2419
|
type: "line";
|
|
2343
2420
|
locked?: boolean | undefined;
|
|
2421
|
+
hasAppearance?: boolean | undefined;
|
|
2344
2422
|
dashes?: number[] | undefined;
|
|
2345
2423
|
head?: (string & {}) | "None" | "Square" | "Circle" | "Diamond" | "OpenArrow" | "ClosedArrow" | "Butt" | "ROpenArrow" | "RClosedArrow" | "Slash" | undefined;
|
|
2346
2424
|
tail?: (string & {}) | "None" | "Square" | "Circle" | "Diamond" | "OpenArrow" | "ClosedArrow" | "Butt" | "ROpenArrow" | "RClosedArrow" | "Slash" | undefined;
|
|
@@ -2371,6 +2449,7 @@ export declare function useAnnotations(): {
|
|
|
2371
2449
|
page: number;
|
|
2372
2450
|
type: "polyline";
|
|
2373
2451
|
locked?: boolean | undefined;
|
|
2452
|
+
hasAppearance?: boolean | undefined;
|
|
2374
2453
|
dashes?: number[] | undefined;
|
|
2375
2454
|
interiorColor?: string | undefined;
|
|
2376
2455
|
head?: (string & {}) | "None" | "Square" | "Circle" | "Diamond" | "OpenArrow" | "ClosedArrow" | "Butt" | "ROpenArrow" | "RClosedArrow" | "Slash" | undefined;
|
|
@@ -2404,6 +2483,7 @@ export declare function useAnnotations(): {
|
|
|
2404
2483
|
head?: undefined;
|
|
2405
2484
|
tail?: undefined;
|
|
2406
2485
|
locked?: boolean | undefined;
|
|
2486
|
+
hasAppearance?: boolean | undefined;
|
|
2407
2487
|
dashes?: number[] | undefined;
|
|
2408
2488
|
interiorColor?: string | undefined;
|
|
2409
2489
|
author?: string | undefined;
|
|
@@ -2434,6 +2514,7 @@ export declare function useAnnotations(): {
|
|
|
2434
2514
|
type: "ink";
|
|
2435
2515
|
pressure?: number[][] | undefined;
|
|
2436
2516
|
locked?: boolean | undefined;
|
|
2517
|
+
hasAppearance?: boolean | undefined;
|
|
2437
2518
|
dashes?: number[] | undefined;
|
|
2438
2519
|
author?: string | undefined;
|
|
2439
2520
|
contents?: string | undefined;
|
|
@@ -2458,6 +2539,7 @@ export declare function useAnnotations(): {
|
|
|
2458
2539
|
page: number;
|
|
2459
2540
|
type: "stamp";
|
|
2460
2541
|
locked?: boolean | undefined;
|
|
2542
|
+
hasAppearance?: boolean | undefined;
|
|
2461
2543
|
rotation?: 0 | 90 | 180 | 270 | undefined;
|
|
2462
2544
|
author?: string | undefined;
|
|
2463
2545
|
contents?: string | undefined;
|
|
@@ -2483,6 +2565,7 @@ export declare function useAnnotations(): {
|
|
|
2483
2565
|
page: number;
|
|
2484
2566
|
type: "loupe";
|
|
2485
2567
|
locked?: boolean | undefined;
|
|
2568
|
+
hasAppearance?: boolean | undefined;
|
|
2486
2569
|
author?: string | undefined;
|
|
2487
2570
|
contents?: string | undefined;
|
|
2488
2571
|
inReplyTo?: string | undefined;
|
|
@@ -2507,6 +2590,7 @@ export declare function useAnnotations(): {
|
|
|
2507
2590
|
page: number;
|
|
2508
2591
|
type: "mask";
|
|
2509
2592
|
locked?: boolean | undefined;
|
|
2593
|
+
hasAppearance?: boolean | undefined;
|
|
2510
2594
|
author?: string | undefined;
|
|
2511
2595
|
contents?: string | undefined;
|
|
2512
2596
|
inReplyTo?: string | undefined;
|
|
@@ -2548,6 +2632,7 @@ export declare function useAnnotations(): {
|
|
|
2548
2632
|
};
|
|
2549
2633
|
}[] | undefined;
|
|
2550
2634
|
locked?: boolean | undefined;
|
|
2635
|
+
hasAppearance?: boolean | undefined;
|
|
2551
2636
|
overlayText?: string | undefined;
|
|
2552
2637
|
author?: string | undefined;
|
|
2553
2638
|
contents?: string | undefined;
|
|
@@ -2693,6 +2778,30 @@ interface FormHandle {
|
|
|
2693
2778
|
/** The open document's form: its fields, their values, and `set` and `reset`. */
|
|
2694
2779
|
export declare function useForm(): FormHandle;
|
|
2695
2780
|
//#endregion
|
|
2781
|
+
//#region src/hooks/useRecords.d.ts
|
|
2782
|
+
/**
|
|
2783
|
+
* The records a plugin keeps under `key` (`<plugin>.<name>`), for host components: the live list
|
|
2784
|
+
* for the open document, and the handle to read and write them, each write one undo step.
|
|
2785
|
+
* Plugins are set up once InkRoot has mounted, so until then (and on the server) `handle` is
|
|
2786
|
+
* null and `records` is empty. `T` is the plugin's record type.
|
|
2787
|
+
*/
|
|
2788
|
+
export declare function useRecords<T extends RecordBase>(key: string): {
|
|
2789
|
+
records: readonly T[];
|
|
2790
|
+
handle: HostRecords$1<T> | null;
|
|
2791
|
+
};
|
|
2792
|
+
//#endregion
|
|
2793
|
+
//#region src/hooks/useRecordSelection.d.ts
|
|
2794
|
+
/**
|
|
2795
|
+
* The selected record under `key` (`<plugin>.<name>`): the one selection the marks and every
|
|
2796
|
+
* record list over those records share. `select` takes an id, or null to clear; an id that has
|
|
2797
|
+
* no mark changes nothing. Until InkRoot has mounted (and on the server) nothing is selected
|
|
2798
|
+
* and `select` does nothing.
|
|
2799
|
+
*/
|
|
2800
|
+
export declare function useRecordSelection(key: string): {
|
|
2801
|
+
selected: string | null;
|
|
2802
|
+
select: (id: string | null) => void;
|
|
2803
|
+
};
|
|
2804
|
+
//#endregion
|
|
2696
2805
|
//#region src/components/InkRoot.d.ts
|
|
2697
2806
|
interface InkRootHandle {
|
|
2698
2807
|
readonly document: InkDocument | null;
|
|
@@ -2733,8 +2842,13 @@ interface InkRootProps extends Omit<ComponentPropsWithoutRef<'div'>, 'children'
|
|
|
2733
2842
|
tool?: ToolId | undefined;
|
|
2734
2843
|
onToolChange?: ((tool: ToolId) => void) | undefined;
|
|
2735
2844
|
/**
|
|
2736
|
-
*
|
|
2737
|
-
*
|
|
2845
|
+
* The creation tools, such as `allTools()` or a pick of the tool factories. `select-text`
|
|
2846
|
+
* and `select` are always present; a tool with either id replaces it. They are read when a
|
|
2847
|
+
* document opens: a tool added later is usable from the next open, one removed stops at
|
|
2848
|
+
* once. When the active tool goes, the viewer switches to `select-text` and calls
|
|
2849
|
+
* `onToolChange`. A controlled `tool` naming a missing tool is reported back as
|
|
2850
|
+
* `select-text` and is not applied again when the tool appears later. Each mounted control
|
|
2851
|
+
* for a missing tool logs its own `UnknownTool`.
|
|
2738
2852
|
*/
|
|
2739
2853
|
tools?: Tool[] | undefined;
|
|
2740
2854
|
/**
|
|
@@ -2876,6 +2990,16 @@ interface InkCommandProps extends Omit<ComponentPropsWithoutRef<'button'>, 'id'
|
|
|
2876
2990
|
}
|
|
2877
2991
|
export declare function InkCommand({ id, asChild, children, disabled, onClick, ...rest }: InkCommandProps): import("react").JSX.Element;
|
|
2878
2992
|
//#endregion
|
|
2993
|
+
//#region src/components/InkToolbarButton.d.ts
|
|
2994
|
+
interface InkToolbarButtonProps extends ComponentPropsWithoutRef<'button'> {
|
|
2995
|
+
asChild?: boolean;
|
|
2996
|
+
}
|
|
2997
|
+
/**
|
|
2998
|
+
* Your own button in an `InkToolbar`. It joins the toolbar's arrow-key focus and takes the
|
|
2999
|
+
* theme's toolbar button styles; what it shows and does is up to you.
|
|
3000
|
+
*/
|
|
3001
|
+
export declare function InkToolbarButton({ asChild, type, className, ...rest }: InkToolbarButtonProps): import("react").JSX.Element;
|
|
3002
|
+
//#endregion
|
|
2879
3003
|
//#region src/components/InkToolbarSeparator.d.ts
|
|
2880
3004
|
type InkToolbarSeparatorProps = ComponentPropsWithoutRef<'div'>;
|
|
2881
3005
|
/**
|
|
@@ -2893,6 +3017,30 @@ interface InkHistoryButtonProps extends ComponentPropsWithoutRef<'button'> {
|
|
|
2893
3017
|
//#region src/components/InkUndo.d.ts
|
|
2894
3018
|
export declare function InkUndo({ asChild, className, children, disabled, onClick, ...rest }: InkHistoryButtonProps): import("react").JSX.Element;
|
|
2895
3019
|
//#endregion
|
|
3020
|
+
//#region src/components/InkDownloadButton.d.ts
|
|
3021
|
+
interface InkDownloadButtonProps extends ComponentPropsWithoutRef<'button'> {
|
|
3022
|
+
asChild?: boolean;
|
|
3023
|
+
/** The name to save under. Default: the document's `fileName`. */
|
|
3024
|
+
filename?: string | undefined;
|
|
3025
|
+
}
|
|
3026
|
+
/**
|
|
3027
|
+
* Saves the open document's file through the browser's download, under its `fileName` or
|
|
3028
|
+
* `filename`. Disabled until the document is ready. Today that is the file as it was opened,
|
|
3029
|
+
* without this session's annotations.
|
|
3030
|
+
*/
|
|
3031
|
+
export declare function InkDownloadButton({ asChild, filename, className, children, disabled, onClick, ...rest }: InkDownloadButtonProps): import("react").JSX.Element;
|
|
3032
|
+
//#endregion
|
|
3033
|
+
//#region src/components/InkPrintButton.d.ts
|
|
3034
|
+
interface InkPrintButtonProps extends ComponentPropsWithoutRef<'button'> {
|
|
3035
|
+
asChild?: boolean;
|
|
3036
|
+
}
|
|
3037
|
+
/**
|
|
3038
|
+
* Prints the open document's file with the browser's own PDF viewer (on iOS, in a new tab).
|
|
3039
|
+
* Disabled until the document is ready. Today that is the file as it was opened, without this
|
|
3040
|
+
* session's annotations.
|
|
3041
|
+
*/
|
|
3042
|
+
export declare function InkPrintButton({ asChild, className, children, disabled, onClick, ...rest }: InkPrintButtonProps): import("react").JSX.Element;
|
|
3043
|
+
//#endregion
|
|
2896
3044
|
//#region src/components/InkRedo.d.ts
|
|
2897
3045
|
export declare function InkRedo({ asChild, className, children, disabled, onClick, ...rest }: InkHistoryButtonProps): import("react").JSX.Element;
|
|
2898
3046
|
//#endregion
|
|
@@ -2985,7 +3133,8 @@ interface InkShapeMenuProps extends Omit<ComponentPropsWithoutRef<'div'>, 'child
|
|
|
2985
3133
|
/** Replaces the main button's icon. */
|
|
2986
3134
|
children?: ReactNode;
|
|
2987
3135
|
}
|
|
2988
|
-
|
|
3136
|
+
/** Renders nothing while no `shape` tool is registered. */
|
|
3137
|
+
export declare function InkShapeMenu(props: InkShapeMenuProps): import("react").JSX.Element | null;
|
|
2989
3138
|
//#endregion
|
|
2990
3139
|
//#region src/components/InkSignatureMenu.d.ts
|
|
2991
3140
|
interface InkSignatureMenuProps extends Omit<ComponentPropsWithoutRef<'div'>, 'children'> {
|
|
@@ -2994,7 +3143,8 @@ interface InkSignatureMenuProps extends Omit<ComponentPropsWithoutRef<'div'>, 'c
|
|
|
2994
3143
|
/** The fonts the dialog's Type tab offers. Default: InkRoot's `signatureFonts`. */
|
|
2995
3144
|
fonts?: readonly string[] | undefined;
|
|
2996
3145
|
}
|
|
2997
|
-
|
|
3146
|
+
/** Renders nothing while no `signature` tool is registered. */
|
|
3147
|
+
export declare function InkSignatureMenu(props: InkSignatureMenuProps): import("react").JSX.Element | null;
|
|
2998
3148
|
//#endregion
|
|
2999
3149
|
//#region src/components/InkSignatureDialog.d.ts
|
|
3000
3150
|
interface InkSignatureDialogProps {
|
|
@@ -3003,8 +3153,9 @@ interface InkSignatureDialogProps {
|
|
|
3003
3153
|
/** The fonts the Type tab offers. Default: InkRoot's `signatureFonts`. */
|
|
3004
3154
|
fonts?: readonly string[] | undefined;
|
|
3005
3155
|
/**
|
|
3006
|
-
* Whether saving selects the new signature for the `signature` tool
|
|
3007
|
-
* leaves the tool alone, for a dialog that signs a field with it through
|
|
3156
|
+
* Whether saving selects the new signature for the `signature` tool, when one is registered.
|
|
3157
|
+
* Default true. False leaves the tool alone, for a dialog that signs a field with it through
|
|
3158
|
+
* `onSave`.
|
|
3008
3159
|
*/
|
|
3009
3160
|
select?: boolean | undefined;
|
|
3010
3161
|
/** Called with the new template once it is saved (and selected, with `select`). */
|
|
@@ -3020,7 +3171,8 @@ interface InkHighlightMenuProps extends Omit<ComponentPropsWithoutRef<'div'>, 'c
|
|
|
3020
3171
|
/** Replaces the main button's icon. */
|
|
3021
3172
|
children?: ReactNode;
|
|
3022
3173
|
}
|
|
3023
|
-
|
|
3174
|
+
/** Renders nothing while no `highlight` tool is registered. */
|
|
3175
|
+
export declare function InkHighlightMenu(props: InkHighlightMenuProps): import("react").JSX.Element | null;
|
|
3024
3176
|
//#endregion
|
|
3025
3177
|
//#region src/components/InkTextStyleMenu.d.ts
|
|
3026
3178
|
interface InkTextStyleMenuProps extends Omit<ComponentPropsWithoutRef<'button'>, 'children'> {
|
|
@@ -3040,5 +3192,168 @@ interface InkThreadPopoverProps {
|
|
|
3040
3192
|
}
|
|
3041
3193
|
export declare function InkThreadPopover({ children }: InkThreadPopoverProps): import("react").JSX.Element;
|
|
3042
3194
|
//#endregion
|
|
3043
|
-
|
|
3195
|
+
//#region src/components/InkSidebar.d.ts
|
|
3196
|
+
interface InkSidebarProps extends Omit<ComponentPropsWithoutRef<'div'>, 'children'> {
|
|
3197
|
+
/** Which edge the rail and border sit on. Default `'left'`. */
|
|
3198
|
+
side?: SidebarSide$1 | undefined;
|
|
3199
|
+
/** `'rail'` (default), `'tabs'` or `'stack'`. */
|
|
3200
|
+
layout?: SidebarLayout$1 | undefined;
|
|
3201
|
+
/** Default true. False hides the whole sidebar and keeps its open panel, content and scroll for when it shows again. */
|
|
3202
|
+
visible?: boolean | undefined;
|
|
3203
|
+
/**
|
|
3204
|
+
* Controlled: the open panel's id (or null) for rail and tabs, the expanded ids for stack.
|
|
3205
|
+
* Leave it out for an uncontrolled sidebar.
|
|
3206
|
+
*/
|
|
3207
|
+
open?: SidebarOpen$1 | undefined;
|
|
3208
|
+
/** Uncontrolled: what starts open. Left out, the first panel does. */
|
|
3209
|
+
defaultOpen?: SidebarOpen$1 | undefined;
|
|
3210
|
+
/** Called with the new value when a trigger is activated or the open panel goes. */
|
|
3211
|
+
onOpenChange?: ((open: SidebarOpen$1) => void) | undefined;
|
|
3212
|
+
/** The `InkPanel`s. */
|
|
3213
|
+
children?: ReactNode;
|
|
3214
|
+
}
|
|
3215
|
+
/**
|
|
3216
|
+
* A sidebar of `InkPanel`s: `createSidebar`'s markup on core's sidebar controller, which holds
|
|
3217
|
+
* the open state, the ARIA, the keys and the clicks. Rail and tabs render their triggers here;
|
|
3218
|
+
* in a stack each panel renders its own header. Panels take their place in DOM order, so a
|
|
3219
|
+
* panel rendered later slots in where it stands. A closed panel stays mounted and hidden, and
|
|
3220
|
+
* the panels' content stays in place across layouts, so its state survives switching.
|
|
3221
|
+
*
|
|
3222
|
+
* `open` with `onOpenChange` controls it; `defaultOpen` starts it uncontrolled; with neither,
|
|
3223
|
+
* the first panel starts open. It needs no document, so it works outside `InkRoot`. The server
|
|
3224
|
+
* renders the root, the panels (the open one shown) and the stack headers; rail and tab
|
|
3225
|
+
* buttons follow once mounted.
|
|
3226
|
+
*/
|
|
3227
|
+
export declare function InkSidebar({ side, layout, visible, open, defaultOpen, onOpenChange, className, children, ...rest }: InkSidebarProps): import("react").JSX.Element;
|
|
3228
|
+
//#endregion
|
|
3229
|
+
//#region src/components/InkPanel.d.ts
|
|
3230
|
+
interface InkPanelProps {
|
|
3231
|
+
/** Names the panel in the sidebar's `open`. */
|
|
3232
|
+
id: string;
|
|
3233
|
+
/** Names its trigger. */
|
|
3234
|
+
label: string;
|
|
3235
|
+
/** An `@inkbar/icons` node, shown on the rail. */
|
|
3236
|
+
icon?: IconNode | undefined;
|
|
3237
|
+
/** A count or short text beside it, hidden when empty or 0. */
|
|
3238
|
+
badge?: string | number | undefined;
|
|
3239
|
+
children?: ReactNode;
|
|
3240
|
+
}
|
|
3241
|
+
/**
|
|
3242
|
+
* One panel of an `InkSidebar`, holding `children` as its content. Closed, the panel stays
|
|
3243
|
+
* mounted and hidden. In a stack it renders its own header above its content.
|
|
3244
|
+
*/
|
|
3245
|
+
export declare function InkPanel({ id, label, icon, badge, children }: InkPanelProps): import("react").JSX.Element;
|
|
3246
|
+
//#endregion
|
|
3247
|
+
//#region src/components/InkThumbnail.d.ts
|
|
3248
|
+
interface InkThumbnailProps extends Omit<ComponentPropsWithoutRef<'div'>, 'children'> {
|
|
3249
|
+
/** 0-based. */
|
|
3250
|
+
page: number;
|
|
3251
|
+
/** Width in CSS pixels; the height follows the page. Default 120 unless `height` is given. */
|
|
3252
|
+
width?: number | undefined;
|
|
3253
|
+
/** Height in CSS pixels; the width follows the page. */
|
|
3254
|
+
height?: number | undefined;
|
|
3255
|
+
/** Draw the page's annotations. Default true. */
|
|
3256
|
+
annotations?: boolean | undefined;
|
|
3257
|
+
/** Draw plugin marks. Default true. */
|
|
3258
|
+
marks?: boolean | undefined;
|
|
3259
|
+
/** The accessible name. Default "Page N". */
|
|
3260
|
+
label?: string | undefined;
|
|
3261
|
+
}
|
|
3262
|
+
/**
|
|
3263
|
+
* One page as a static image, with its live annotations and plugin marks: core's thumbnail
|
|
3264
|
+
* painter on this element, which sizes it, names it ("Page N" unless `label` says otherwise)
|
|
3265
|
+
* and draws it once it nears the visible area. It is not focusable and does nothing on click:
|
|
3266
|
+
* wrap it in the control you need. Inside `InkRoot`; it renders empty on the server.
|
|
3267
|
+
*/
|
|
3268
|
+
export declare function InkThumbnail({ page, width, height, annotations, marks, label, className, ...rest }: InkThumbnailProps): import("react").JSX.Element;
|
|
3269
|
+
//#endregion
|
|
3270
|
+
//#region src/components/InkThumbnails.d.ts
|
|
3271
|
+
interface InkThumbnailsProps extends Omit<ComponentPropsWithoutRef<'div'>, 'children'> {
|
|
3272
|
+
/** 0-based pages to list, in order. Default: every page. */
|
|
3273
|
+
pages?: readonly number[] | undefined;
|
|
3274
|
+
/** Thumbnail width in CSS pixels. Default: the list's width less a 16px gutter each side. */
|
|
3275
|
+
width?: number | undefined;
|
|
3276
|
+
/** Draw each page's annotations. Default true. */
|
|
3277
|
+
annotations?: boolean | undefined;
|
|
3278
|
+
/** Draw plugin marks. Default true. */
|
|
3279
|
+
marks?: boolean | undefined;
|
|
3280
|
+
/**
|
|
3281
|
+
* Renders inside each item, after its page number. The item's height is fixed from the
|
|
3282
|
+
* page's, so keep what you add out of the flow (position it absolutely) or small.
|
|
3283
|
+
*/
|
|
3284
|
+
renderItem?: ((item: {
|
|
3285
|
+
page: number;
|
|
3286
|
+
current: boolean;
|
|
3287
|
+
}) => ReactNode) | undefined;
|
|
3288
|
+
}
|
|
3289
|
+
/**
|
|
3290
|
+
* The pages as a list of thumbnails: `createThumbnails`' markup on core's thumbnails
|
|
3291
|
+
* controller, which holds the current page, the keys, the clicks, the Tab stop and the window.
|
|
3292
|
+
* Only the items near the visible part are mounted, each placed at its offset over a spacer of
|
|
3293
|
+
* the full height, and each holds an `InkThumbnail`. An item is a button that scrolls the
|
|
3294
|
+
* viewport to its page; the current page's has `aria-current="page"`. Inside `InkRoot`; it
|
|
3295
|
+
* renders empty on the server.
|
|
3296
|
+
*/
|
|
3297
|
+
export declare function InkThumbnails({ pages, width, annotations, marks, renderItem, className, ...rest }: InkThumbnailsProps): import("react").JSX.Element;
|
|
3298
|
+
//#endregion
|
|
3299
|
+
//#region src/components/InkRecordList.d.ts
|
|
3300
|
+
interface InkRecordListProps<T extends RecordBase & {
|
|
3301
|
+
page: number;
|
|
3302
|
+
} = RecordBase & {
|
|
3303
|
+
page: number;
|
|
3304
|
+
}> extends Omit<ComponentPropsWithoutRef<'div'>, 'children'> {
|
|
3305
|
+
/** The records to list, as `<plugin>.<name>`. */
|
|
3306
|
+
records?: string | undefined;
|
|
3307
|
+
/**
|
|
3308
|
+
* A host's own source, listed in place of `records` with the same controller and cards.
|
|
3309
|
+
* `card`, `where` and `sort` do not apply to it.
|
|
3310
|
+
*/
|
|
3311
|
+
source?: RecordListSource | undefined;
|
|
3312
|
+
/** The card each record shows. Default: its mark's card. */
|
|
3313
|
+
card?: ((record: T) => CardSpec$1) | undefined;
|
|
3314
|
+
/** Which records to list. Default: those that have a mark. */
|
|
3315
|
+
where?: ((record: T) => boolean) | undefined;
|
|
3316
|
+
/** The order. Default: reading order by the marks' rects. */
|
|
3317
|
+
sort?: ((a: T, b: T) => number) | undefined;
|
|
3318
|
+
/** Called with the number listed whenever it changes. */
|
|
3319
|
+
onCountChange?: ((count: number) => void) | undefined;
|
|
3320
|
+
/** Replaces "Nothing here yet."; null shows nothing. */
|
|
3321
|
+
empty?: ReactNode;
|
|
3322
|
+
}
|
|
3323
|
+
/**
|
|
3324
|
+
* The records a plugin keeps under `records` (`<plugin>.<name>`) as a list of cards, the same
|
|
3325
|
+
* cards their marks open, with the same actions: `createRecordList` on core's record list
|
|
3326
|
+
* controller. The list, the marks and `useRecordSelection` share one selection. `card`, `where`
|
|
3327
|
+
* and `sort` replace the marks' card, filter and reading order; a new function rebuilds the
|
|
3328
|
+
* list, so keep them stable (`useCallback`, or defined outside the component).
|
|
3329
|
+
* `onCountChange` gets the number listed whenever it changes; `empty` replaces "Nothing here
|
|
3330
|
+
* yet.". It fills its parent's height. Inside `InkRoot`; it renders empty on the server.
|
|
3331
|
+
*
|
|
3332
|
+
* In place of `records`, `source` takes a host's own `RecordListSource` and lists it with the
|
|
3333
|
+
* same controller and cards. Give one of the two: with both, `source` wins and a development
|
|
3334
|
+
* build warns.
|
|
3335
|
+
*/
|
|
3336
|
+
export declare function InkRecordList<T extends RecordBase & {
|
|
3337
|
+
page: number;
|
|
3338
|
+
} = RecordBase & {
|
|
3339
|
+
page: number;
|
|
3340
|
+
}>({ records, source, card, where, sort, onCountChange, empty, ...rest }: InkRecordListProps<T>): import("react").JSX.Element;
|
|
3341
|
+
//#endregion
|
|
3342
|
+
//#region src/components/InkSearchResults.d.ts
|
|
3343
|
+
interface InkSearchResultsProps extends Omit<ComponentPropsWithoutRef<'div'>, 'children'> {
|
|
3344
|
+
/** Show the query field. Default true; turn it off when a find bar is on the page. */
|
|
3345
|
+
field?: boolean | undefined;
|
|
3346
|
+
}
|
|
3347
|
+
/**
|
|
3348
|
+
* The search hits as a list of cards, for a sidebar panel: `createSearchResults` on core's
|
|
3349
|
+
* record list controller over the root's search. One card per hit, with its page and the text
|
|
3350
|
+
* around it. Choosing a card makes its hit current, as the find bar's next and previous do, and
|
|
3351
|
+
* the current hit is the selected card. Above the cards, a query field (`field={false}`
|
|
3352
|
+
* leaves it out when a find bar is on the page); under them, the find bar's match count.
|
|
3353
|
+
* Field and find bar share the search state, so they never disagree. It fills its parent's
|
|
3354
|
+
* height. Inside `InkRoot`; it renders empty on the server.
|
|
3355
|
+
*/
|
|
3356
|
+
export declare function InkSearchResults({ field, className, ...rest }: InkSearchResultsProps): import("react").JSX.Element;
|
|
3357
|
+
//#endregion
|
|
3358
|
+
export type { AnnotationDecoration, AnnotationSlotProps, AnnotationState, CardSpec, CommandHandle, DecorateAnnotation, FormHandle, HostRecords, InkAnnotationProps, InkColorMenuProps, InkCommandProps, InkContext, InkDownloadButtonProps, InkFindBarProps, InkHighlightMenuProps, InkHistory, InkHistoryButtonProps, InkIconProps, InkLineStyleMenuProps, InkPageButtonProps, InkPageInputProps, InkPageProps, InkPanelProps, InkPlugin, InkPrintButtonProps, InkRecordListProps, InkRootHandle, InkRootProps, InkSearchButtonProps, InkSearchResultsProps, InkShapeMenuProps, InkSidebarProps, InkSignatureDialogProps, InkSignatureMenuProps, InkStatus, InkTextStyleMenuProps, InkThreadPopoverProps, InkThumbnailProps, InkThumbnailsProps, InkToolButtonProps, InkToolbarButtonProps, InkToolbarProps, InkToolbarSeparatorProps, InkViewportProps, InkZoomButtonProps, InkZoomSelectProps, ScopedToolStyleHandle, SidebarLayout, SidebarOpen, SidebarSide, ThreadPopoverSlotProps, ToolStyleHandle };
|
|
3044
3359
|
//# sourceMappingURL=index.d.mts.map
|