-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathCPDFOptions.ts
More file actions
864 lines (669 loc) · 18.8 KB
/
Copy pathCPDFOptions.ts
File metadata and controls
864 lines (669 loc) · 18.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
/**
* Copyright © 2014-2026 PDF Technologies, Inc. All Rights Reserved.
*
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE ComPDFKit LICENSE AGREEMENT.
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
* This notice may not be removed from this file.
*/
import { CPDFAnnotation } from "../annotation/CPDFAnnotation";
import { CPDFTextStamp } from "../annotation/CPDFTextStamp";
import { CPDFWidget } from "../annotation/form/CPDFWidget";
import { CPDFEditArea } from "../edit/CPDFEditArea";
export const CPDFViewMode = {
/**
* Viewer mode, allows viewing PDF only, cannot edit annotations, forms, etc.
*/
VIEWER: 'viewer',
/**
* Annotations mode, allows annotation editing
*/
ANNOTATIONS: 'annotations',
/**
* Content editor mode, allows editing text, images of PDF document
*/
CONTENT_EDITOR: 'contentEditor',
/**
* Forms mode, allows adding text fields, signature fields, list boxes, etc.
*/
FORMS: 'forms',
/**
* Signatures mode, allows adding signature fields for electronic signing, digital signing, verifying digital signatures
*/
SIGNATURES: 'signatures'
} as const
export type CPDFViewMode = ValueOf<typeof CPDFViewMode>;
/**
* Toolbar actions supported in the displayed PDF view
*/
export const CPDFToolbarAction = {
/**
* Back button.
*
* Exits the current PDF view when clicked.
* - On Android: always displayed at the far left of the toolbar.
* - On iOS: displayed based on the configured toolbar position.
*/
BACK: 'back',
/**
* Thumbnail list.
*
* Displays page thumbnails of the current document.
*/
THUMBNAIL: 'thumbnail',
/**
* Text search.
*
* Provides keyword search functionality within the PDF document.
*/
SEARCH: 'search',
/**
* BOTA panel.
*
* Displays related document navigation content:
* - b: Bookmarks
* - o: Outline
* - t: Thumbnails
* - a: Annotations
*/
BOTA: 'bota',
/**
* Menu button.
*
* Opens the main toolbar menu.
*/
MENU: 'menu',
/**
* View settings.
*
* Controls display-related options such as zoom mode,
* page layout, and reading preferences.
*/
VIEW_SETTINGS: 'viewSettings',
/**
* Document editor.
*
* Opens document editing features such as content editing
* or annotation editing.
*/
DOCUMENT_EDITOR: 'documentEditor',
/**
* Security settings.
*
* Opens security-related options such as password protection
* and permission settings.
*/
SECURITY: 'security',
/**
* Watermark management.
*
* Used to add, edit, or remove watermarks in the document.
*/
WATERMARK: 'watermark',
/**
* Document information.
*
* Displays metadata and basic information of the PDF document.
*/
DOCUMENT_INFO: 'documentInfo',
/**
* Save document.
*
* Saves changes made to the current document.
*/
SAVE: 'save',
/**
* Share document.
*
* Opens the system share dialog to export or share the document.
*/
SHARE: 'share',
/**
* Open document.
*
* Opens another PDF document.
*/
OPEN_DOCUMENT: 'openDocument',
/**
* Flatten annotations.
*
* Merges annotations into the document content so they
* can no longer be edited.
*/
FLATTENED: 'flattened',
/**
* Snip tool.
*
* Allows capturing a selected area of the document.
*/
SNIP: 'snip',
/**
* Custom toolbar action.
*
* Represents a user-defined toolbar action.
*/
CUSTOM: 'custom',
} as const;
export type CPDFToolbarAction = ValueOf<typeof CPDFToolbarAction>;
/**
* annotations type.
* Please note that {@link PENCIL} is only available on ios platform.
*/
export const CPDFAnnotationType = {
UNKNOWN: 'unknown',
NOTE: 'note',
HIGHLIGHT: 'highlight',
UNDERLINE: 'underline',
SQUIGGLY: 'squiggly',
STRIKEOUT: 'strikeout',
INK: 'ink',
INK_ERASER: 'ink_eraser',
/**
* only ios platform.
*/
PENCIL: "pencil",
CIRCLE: 'circle',
SQUARE: 'square',
ARROW: 'arrow',
LINE: 'line',
FREETEXT: 'freetext',
SIGNATURE: 'signature',
STAMP: 'stamp',
PICTURES: 'pictures',
LINK: 'link',
SOUND: 'sound'
} as const
export type CPDFAnnotationType = ValueOf<typeof CPDFAnnotationType>;
/**
* {@link CPDFViewMode.ANNOTATIONS}, {@link CPDFViewMode.CONTENT_EDITOR},{@link CPDFViewMode.FORMS} function tools.
* {@link CPDFConfigTool.SETTING} is not available in form functionality.
*
*/
export const CPDFConfigTool = {
/**
* Set button, corresponding to open the selected annotation, text or picture property panel.
*/
SETTING: 'setting',
/**
* Undo annotation, content editing, form operations
*/
UNDO: 'undo',
/**
* Redo an undone action
*/
REDO: 'redo'
} as const
export type CPDFConfigTool = ValueOf<typeof CPDFConfigTool>;
/**
* Shape annotation border style, default {@link CPDFBorderStyle.SOLID}.
* shape:
* * {@link CPDFAnnotationType.SQUARE}
* * {@link CPDFAnnotationType.CIRCLE}
* * {@link CPDFAnnotationType.ARROW}
* * {@link CPDFAnnotationType.LINE}
*/
export const CPDFBorderStyle = {
SOLID: 'solid',
DASHED: 'dashed'
} as const
export type CPDFBorderStyle = ValueOf<typeof CPDFBorderStyle>;
/**
* Arrow annotation, start and tail shapes
*/
export const CPDFLineType = {
NONE: 'none',
UNKNOWN: 'unknown',
OPEN_ARROW: 'openArrow',
CLOSE_ARROW: 'closedArrow',
SQUARE: 'square',
CIRCLE: 'circle',
DIAMOND: 'diamond'
}
export type CPDFLineType = ValueOf<typeof CPDFLineType>;
/**
* text alignment
*/
export const CPDFAlignment = {
LEFT: 'left',
CENTER: 'center',
RIGHT: 'right'
} as const
export type CPDFAlignment = ValueOf<typeof CPDFAlignment>;
export const CPDFContentEditorType = {
EDITOR_TEXT: 'editorText',
EDITOR_IMAGE: 'editorImage'
}
export type CPDFContentEditorType = ValueOf<typeof CPDFContentEditorType>;
/**
* form types
*/
export const CPDFWidgetType = {
TEXT_FIELD: 'textField',
CHECKBOX: 'checkBox',
RADIO_BUTTON: 'radioButton',
LISTBOX: 'listBox',
COMBOBOX: 'comboBox',
SIGNATURES_FIELDS: 'signaturesFields',
PUSH_BUTTON: 'pushButton',
UNKNOWN: 'unknown'
} as const
export type CPDFWidgetType = ValueOf<typeof CPDFWidgetType>;
export const CPDFCheckStyle = {
CHECK: 'check',
CIRCLE: 'circle',
CROSS: 'cross',
DIAMOND: 'diamond',
SQUARE: 'square',
STAR: 'star'
}
export type CPDFCheckStyle = ValueOf<typeof CPDFCheckStyle>;
export const CPDFDisplayMode = {
SINGLE_PAGE: 'singlePage',
DOUBLE_PAGE: 'doublePage',
COVER_PAGE: 'coverPage'
}
export type CPDFDisplayMode = ValueOf<typeof CPDFDisplayMode>;
export const CPDFThemes = {
/**
* Bright mode, readerview background is white
*/
LIGHT: 'light',
/**
* dark mode, readerview background is black
*/
DARK: 'dark',
/**
* brown paper color
*/
SEPIA: 'sepia',
/**
* Light green, eye protection mode
*/
RESEDA: 'reseda'
}
export type CPDFThemes = ValueOf<typeof CPDFThemes>;
/**
* Set UI theme modes, including light, dark, and follow system modes
* Default: Follow system
*/
export const CPDFThemeMode = {
/**
* Light mode, with a primarily white UI
*/
LIGHT: 'light',
/**
* Dark night mode, with a primarily black UI
*/
DARK: 'dark',
/**
* Follow the current system setting
*/
SYSTEM: 'system'
}
export type CPDFThemeMode = ValueOf<typeof CPDFThemeMode>;
/**
* Represents the permissions available for the currently opened document.
*/
export const CPDFDocumentPermissions = {
/**
* No restrictions. The document does not have an open password or owner permission password.
*/
NONE: 'none',
/**
* User permissions. The document can only be viewed and has an owner password set.
*/
USER: 'user',
/**
* Owner permissions. The current viewer is identified as the owner of the document.
*/
OWNER: 'owner',
};
export type CPDFDocumentPermissions = ValueOf<typeof CPDFDocumentPermissions>;
/**
* Specifies the encryption algorithms supported for a PDF document.
*/
export const CPDFDocumentEncryptAlgo = {
/**
* RC4 encryption algorithm.
*/
RC4: 'rc4',
/**
* AES 128-bit encryption algorithm.
*/
AES128: 'aes128',
/**
* AES 256-bit encryption algorithm.
*/
AES256: 'aes256',
/**
* Indicates that no encryption algorithm is applied.
*/
NO_ENCRYPT_ALGO: 'noEncryptAlgo',
};
export type CPDFDocumentEncryptAlgo = ValueOf<typeof CPDFDocumentEncryptAlgo>;
export const CPDFBorderEffectType = {
SOLID : 'solid',
CLOUDY : 'cloudy',
}
export type CPDFBorderEffectType = ValueOf<typeof CPDFBorderEffectType>;
export const CPDFActionType = {
UNKNOWN: 'unknown',
GOTO: 'goTo',
GOTOR: 'goToR',
GOTOE: 'goToE',
LAUNCH: 'launch',
THREAD: 'thread',
URI: 'uri',
SOUND: 'sound',
MOVIE: 'movie',
HIDE: 'hide',
NAMED: 'named',
SUBMIT_FORM: 'submitForm',
RESET_FORM: 'resetForm',
IMPORT_DATA: 'importData',
JAVASCRIPT: 'javaScript',
SET_OCG_STATE: 'setOCGState',
RENDITION: 'rendition',
TRANS: 'trans',
GOTO_3D_VIEW: 'goTo3DView',
UOP: 'uop',
ERROR: 'error',
} as const;
export type CPDFActionType = ValueOf<typeof CPDFActionType>;
/**
* Used to configure the default signing method when signing in the form field of CPDFReaderView,
* including: digital signature, electronic signature, and manual selection
*/
export const CPDFSignatureType = {
/**
* Manually select the signature method.
* Configure this method. When you click the signature form field,
* a pop-up window will pop up to select the signature method.
*/
MANUAL : 'manual',
/**
* Enter the digital signature process
*/
DIGITAL : 'digital',
/**
* Enter the electronic signature process
*/
ELECTRONIC : 'electronic',
} as const;
export type CPDFSignatureType = ValueOf<typeof CPDFSignatureType>;
export const CPDFUiVisibilityMode = {
/**
* Always show UI
*/
ALWAYS: 'always',
/**
* Auto hide UI, tap to show
*/
AUTOMATIC: 'automatic',
/**
* Always hide UI, use gestures to show
*/
NEVER: 'never'
} as const;
export type CPDFUiVisibilityMode = ValueOf<typeof CPDFUiVisibilityMode>;
export const CPDFBotaTabs = {
BOOKMARKS: 'bookmark',
OUTLINE: 'outline',
ANNOTATIONS: 'annotations'
} as const;
export type CPDFBotaTabs = ValueOf<typeof CPDFBotaTabs>;
export const CPDFPageCompression = {
JPEG: 'jpeg',
PNG: 'png',
} as const;
export type CPDFPageCompression = ValueOf<typeof CPDFPageCompression>;
export interface CPDFAnnotationRenderOptions {
scale?: number;
targetWidth?: number;
targetHeight?: number;
compression?: CPDFPageCompression;
quality?: number;
}
export const CPDFEditType = {
NONE: 0,
TEXT: 1,
IMAGE: 2,
PATH: 4
} as const;
export type CPDFEditType = ValueOf<typeof CPDFEditType>;
export const CPDFStandardStamp = {
NOTAPPROVED: 'NotApproved',
APPROVED: 'Approved',
COMPLETED: 'Completed',
FINAL_: 'Final',
DRAFT: 'Draft',
CONFIDENTIAL: 'Confidential',
NOTFORPUBLICRELEASE: 'NotForPublicRelease',
FORPUBLICRELEASE: 'ForPublicRelease',
FORCOMMENT: 'ForComment',
VOID_: 'Void',
PRELIMINARYRESULTS: 'PreliminaryResults',
INFORMATIONONLY: 'InformationOnly',
ACCEPTED: 'Accepted',
REJECTED: 'Rejected',
WITNESS: 'Witness',
INITIALHERE: 'InitialHere',
SIGNHERE: 'SignHere',
REVISED: 'Revised',
PRIVATEACCEPTED: 'PrivateMark#1',
PRIVATEREJECTED: 'PrivateMark#2',
PRIVATERADIOMARK: 'PrivateMark#3',
UNKNOWN: 'Unknown',
} as const;
export type CPDFStandardStamp = ValueOf<typeof CPDFStandardStamp>;
export const CPDFStampType = {
UNKNOWN: 'unknown',
STANDARD: 'standard',
TEXT: 'text',
IMAGE: 'image',
} as const;
export type CPDFStampType = ValueOf<typeof CPDFStampType>;
export const CPDFEvent = {
/**
* Fired when an annotation is created.
* Data type: CPDFAnnotation and its subclasses.
*/
ANNOTATIONS_CREATED: 'annotationsCreated',
/**
* Fired when a pencil drawing is saved.
* Data type: { type: 'pencil'; pageIndex: number }.
*/
PENCIL_DRAWING_COMPLETED: 'pencilDrawingCompleted',
/**
* Fired when a pencil drawing is discarded.
* Data type: { type: 'pencil'; pageIndex: number }.
*/
PENCIL_DRAWING_DISCARDED: 'pencilDrawingDiscarded',
/**
* Fired when an annotation is selected.
* Data type: CPDFAnnotation and its subclasses.
*/
ANNOTATIONS_SELECTED: 'annotationsSelected',
/**
* Fired when an annotation is deselected.
* Data type: CPDFAnnotation and its subclasses.
* Data may be null.
*/
ANNOTATIONS_DESELECTED: 'annotationsDeselected',
/**
* Fired when a form field is created.
* Data type: CPDFWidget and its subclasses.
*/
FORM_FIELDS_CREATED: 'formFieldsCreated',
/**
* Fired when a form field is selected.
* Data type: CPDFWidget and its subclasses.
*/
FORM_FIELDS_SELECTED: 'formFieldsSelected',
/**
* Fired when a form field is deselected.
* Data type: CPDFWidget and its subclasses.
* Data may be null.
*/
FORM_FIELDS_DESELECTED: 'formFieldsDeselected',
/**
* Fired when a content editor element is selected.
* Data type: CPDFEditArea and its subclasses.
* image: CPDFEditImageArea
* text: CPDFEditTextArea
*/
EDITOR_SELECTION_SELECTED: 'editorSelectionSelected',
/**
* Fired when a content editor element is deselected.
* No data returned.
*/
EDITOR_SELECTION_DESELECTED: 'editorSelectionDeselected',
} as const;
export type CPDFEvent = ValueOf<typeof CPDFEvent>;
/**
* Event data type mapping for type-safe event listeners
*/
export interface CPDFEventDataMap {
/**
* Fired when an annotation is created.
* Returns the created annotation instance.
*/
[CPDFEvent.ANNOTATIONS_CREATED]: CPDFAnnotation;
/**
* Fired when a pencil drawing is saved.
* Returns the drawing type and zero-based page index.
*/
[CPDFEvent.PENCIL_DRAWING_COMPLETED]: {
type: 'pencil';
pageIndex: number;
};
/**
* Fired when a pencil drawing is discarded.
* Returns the drawing type and zero-based page index.
*/
[CPDFEvent.PENCIL_DRAWING_DISCARDED]: {
type: 'pencil';
pageIndex: number;
};
/**
* Fired when an annotation is selected.
* Returns the selected annotation instance.
*/
[CPDFEvent.ANNOTATIONS_SELECTED]: CPDFAnnotation;
/**
* Fired when an annotation is deselected.
* Returns the deselected annotation instance or null.
*/
[CPDFEvent.ANNOTATIONS_DESELECTED]: CPDFAnnotation | null;
/**
* Fired when a form field is created.
* Returns the created form widget instance.
*/
[CPDFEvent.FORM_FIELDS_CREATED]: CPDFWidget;
/**
* Fired when a form field is selected.
* Returns the selected form widget instance.
*/
[CPDFEvent.FORM_FIELDS_SELECTED]: CPDFWidget;
/**
* Fired when a form field is deselected.
* Returns the deselected form widget instance or null.
*/
[CPDFEvent.FORM_FIELDS_DESELECTED]: CPDFWidget | null;
/**
* Fired when a content editor element is selected.
* Returns the selected edit area instance (image or text).
*/
[CPDFEvent.EDITOR_SELECTION_SELECTED]: CPDFEditArea;
/**
* Fired when a content editor element is deselected.
* Returns the deselected edit area instance or null.
*/
[CPDFEvent.EDITOR_SELECTION_DESELECTED]: CPDFEditArea | null;
}
export interface CPDFSearchBackButtonTappedEvent {
customEventType: 'SearchBackButtonTapped';
identifier: 'search_back_button';
viewType: 'search' | 'searchReplace';
source: 'searchToolbar';
}
export interface CPDFAnnotationStyleDialogDismissedEvent {
type:
| 'note'
| 'strikeout'
| 'underline'
| 'highlight'
| 'squiggly'
| 'ink'
| 'square'
| 'circle'
| 'line'
| 'arrow'
| 'freetext'
| 'stamp'
| 'pictures';
}
export interface CPDFFormStyleDialogDismissedEvent {
type:
| 'textField'
| 'checkBox'
| 'radioButton'
| 'listBox'
| 'comboBox'
| 'pushButton';
}
export interface CPDFContentEditorStyleDialogDismissedEvent {
type: 'editorText' | 'editorImage';
}
export type CPDFPrepareNextStampOptions =
| { imagePath: string; standardStamp?: never; textStamp?: never }
| { imagePath?: never; standardStamp: CPDFStandardStamp; textStamp?: never }
| { imagePath?: never; standardStamp?: never; textStamp: CPDFTextStamp };
export type AnyCase<T extends string> =
string extends T ? string :
T extends `${infer F1}${infer F2}${infer R}` ? (
`${Uppercase<F1> | Lowercase<F1>}${Uppercase<F2> | Lowercase<F2>}${AnyCase<R>}`
) :
T extends `${infer F}${infer R}` ? `${Uppercase<F> | Lowercase<F>}${AnyCase<R>}` :
"";
export type ValueOf<T> = T[keyof T];
/** @hidden */
type BuildPowersOf2LengthArrays<N extends number, R extends never[][]> =
R[0][N] extends never ? R : BuildPowersOf2LengthArrays<N, [[...R[0], ...R[0]], ...R]>;
/** @hidden */
type ConcatLargestUntilDone<N extends number, R extends never[][], B extends never[]> =
B["length"] extends N ? B : [...R[0], ...B][N] extends never
? ConcatLargestUntilDone<N, R extends [R[0], ...infer U] ? U extends never[][] ? U : never : never, B>
: ConcatLargestUntilDone<N, R extends [R[0], ...infer U] ? U extends never[][] ? U : never : never, [...R[0], ...B]>;
/** @hidden */
type Replace<R extends any[], T> = { [K in keyof R]: T }
/** @hidden */
type TupleOf<T, N extends number> = number extends N ? T[] : {
[K in N]:
BuildPowersOf2LengthArrays<K, [[never]]> extends infer U ? U extends never[][]
? Replace<ConcatLargestUntilDone<K, U, []>, T> : never : never;
}[N]
/** @hidden */
type RangeOf<N extends number> = Partial<TupleOf<unknown, N>>["length"];
/** @hidden */
type RangeOf2<From extends number, To extends number> = Exclude<RangeOf<To>, RangeOf<From>> | From;
/** @hidden */
export type ColorAlpha = RangeOf2<0,255>
/** @hidden */
export type BorderWidth = RangeOf2<1, 10>
/** @hidden */
export type DashGap = RangeOf2<0.0, 10.0>
/**
* @hidden
* Represents hexadecimal color values.
* Format: "#RRGGBB" or "#AARRGGBB"
* @example "#FF0000" // Red
* @example "#80FF0000" // Semi-transparent red
*/
export type HexColor = `#${string}`;
/**
* @hidden
* Represents font size values.
* Valid range: 0-100 points
*/
export type FontSize = RangeOf2<0,100>