@xpadev-net/niconicomments 0.2.71 → 0.2.72
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle.d.ts +164 -119
- package/dist/bundle.js +240 -176
- package/package.json +16 -22
package/dist/bundle.d.ts
CHANGED
|
@@ -323,16 +323,16 @@ interface CommentEventMap {
|
|
|
323
323
|
/**
|
|
324
324
|
* Pipe action context type.
|
|
325
325
|
*/
|
|
326
|
-
|
|
326
|
+
interface PipeActionContext {
|
|
327
327
|
type: string;
|
|
328
328
|
expects: string | null;
|
|
329
329
|
message: ErrorMessage | undefined;
|
|
330
330
|
requirement: unknown;
|
|
331
|
-
}
|
|
331
|
+
}
|
|
332
332
|
/**
|
|
333
333
|
* Valid action result type.
|
|
334
334
|
*/
|
|
335
|
-
|
|
335
|
+
interface ValidActionResult<TOutput> {
|
|
336
336
|
/**
|
|
337
337
|
* The pipe output.
|
|
338
338
|
*/
|
|
@@ -341,11 +341,11 @@ type ValidActionResult<TOutput> = {
|
|
|
341
341
|
* The pipe issues.
|
|
342
342
|
*/
|
|
343
343
|
issues?: undefined;
|
|
344
|
-
}
|
|
344
|
+
}
|
|
345
345
|
/**
|
|
346
346
|
* Invalid action result type.
|
|
347
347
|
*/
|
|
348
|
-
|
|
348
|
+
interface InvalidActionResult {
|
|
349
349
|
/**
|
|
350
350
|
* The pipe output.
|
|
351
351
|
*/
|
|
@@ -354,7 +354,7 @@ type InvalidActionResult = {
|
|
|
354
354
|
* The pipe issues.
|
|
355
355
|
*/
|
|
356
356
|
issues: PipeActionIssues;
|
|
357
|
-
}
|
|
357
|
+
}
|
|
358
358
|
/**
|
|
359
359
|
* Pipe action result type.
|
|
360
360
|
*/
|
|
@@ -362,7 +362,11 @@ type PipeActionResult<TOutput> = ValidActionResult<TOutput> | InvalidActionResul
|
|
|
362
362
|
/**
|
|
363
363
|
* Base validation type.
|
|
364
364
|
*/
|
|
365
|
-
|
|
365
|
+
interface BaseValidation<TInput = any> {
|
|
366
|
+
/**
|
|
367
|
+
* The validation type.
|
|
368
|
+
*/
|
|
369
|
+
type: string;
|
|
366
370
|
/**
|
|
367
371
|
* The expected property.
|
|
368
372
|
*/
|
|
@@ -375,6 +379,10 @@ type BaseValidation<TInput = any> = {
|
|
|
375
379
|
* Whether it's async.
|
|
376
380
|
*/
|
|
377
381
|
async: false;
|
|
382
|
+
/**
|
|
383
|
+
* The validation requirement.
|
|
384
|
+
*/
|
|
385
|
+
requirement: unknown;
|
|
378
386
|
/**
|
|
379
387
|
* Parses unknown input based on its requirement.
|
|
380
388
|
*
|
|
@@ -385,11 +393,15 @@ type BaseValidation<TInput = any> = {
|
|
|
385
393
|
* @internal
|
|
386
394
|
*/
|
|
387
395
|
_parse(input: TInput): PipeActionResult<TInput>;
|
|
388
|
-
}
|
|
396
|
+
}
|
|
389
397
|
/**
|
|
390
398
|
* Base validation async type.
|
|
391
399
|
*/
|
|
392
|
-
|
|
400
|
+
interface BaseValidationAsync<TInput = any> {
|
|
401
|
+
/**
|
|
402
|
+
* The validation type.
|
|
403
|
+
*/
|
|
404
|
+
type: string;
|
|
393
405
|
/**
|
|
394
406
|
* The expected property.
|
|
395
407
|
*/
|
|
@@ -402,6 +414,10 @@ type BaseValidationAsync<TInput = any> = {
|
|
|
402
414
|
* Whether it's async.
|
|
403
415
|
*/
|
|
404
416
|
async: true;
|
|
417
|
+
/**
|
|
418
|
+
* The validation requirement.
|
|
419
|
+
*/
|
|
420
|
+
requirement: unknown;
|
|
405
421
|
/**
|
|
406
422
|
* Parses unknown input based on its requirement.
|
|
407
423
|
*
|
|
@@ -412,11 +428,15 @@ type BaseValidationAsync<TInput = any> = {
|
|
|
412
428
|
* @internal
|
|
413
429
|
*/
|
|
414
430
|
_parse(input: TInput): Promise<PipeActionResult<TInput>>;
|
|
415
|
-
}
|
|
431
|
+
}
|
|
416
432
|
/**
|
|
417
433
|
* Base transformation type.
|
|
418
434
|
*/
|
|
419
|
-
|
|
435
|
+
interface BaseTransformation<TInput = any> {
|
|
436
|
+
/**
|
|
437
|
+
* The transformation type.
|
|
438
|
+
*/
|
|
439
|
+
type: string;
|
|
420
440
|
/**
|
|
421
441
|
* Whether it's async.
|
|
422
442
|
*/
|
|
@@ -431,11 +451,15 @@ type BaseTransformation<TInput = any> = {
|
|
|
431
451
|
* @internal
|
|
432
452
|
*/
|
|
433
453
|
_parse(input: TInput): PipeActionResult<TInput>;
|
|
434
|
-
}
|
|
454
|
+
}
|
|
435
455
|
/**
|
|
436
456
|
* Base transformation async type.
|
|
437
457
|
*/
|
|
438
|
-
|
|
458
|
+
interface BaseTransformationAsync<TInput = any> {
|
|
459
|
+
/**
|
|
460
|
+
* The transformation type.
|
|
461
|
+
*/
|
|
462
|
+
type: string;
|
|
439
463
|
/**
|
|
440
464
|
* Whether it's async.
|
|
441
465
|
*/
|
|
@@ -450,7 +474,7 @@ type BaseTransformationAsync<TInput = any> = {
|
|
|
450
474
|
* @internal
|
|
451
475
|
*/
|
|
452
476
|
_parse(input: TInput): Promise<PipeActionResult<TInput>>;
|
|
453
|
-
}
|
|
477
|
+
}
|
|
454
478
|
/**
|
|
455
479
|
* Pipe type.
|
|
456
480
|
*/
|
|
@@ -467,13 +491,13 @@ type IssueReason = 'any' | 'array' | 'bigint' | 'blob' | 'boolean' | 'date' | 'i
|
|
|
467
491
|
/**
|
|
468
492
|
* Unknown path item type.
|
|
469
493
|
*/
|
|
470
|
-
|
|
494
|
+
interface UnknownPathItem {
|
|
471
495
|
type: 'unknown';
|
|
472
496
|
origin: 'key' | 'value';
|
|
473
497
|
input: unknown;
|
|
474
498
|
key: unknown;
|
|
475
499
|
value: unknown;
|
|
476
|
-
}
|
|
500
|
+
}
|
|
477
501
|
/**
|
|
478
502
|
* Path item type.
|
|
479
503
|
*/
|
|
@@ -485,7 +509,7 @@ type IssuePath = [PathItem, ...PathItem[]];
|
|
|
485
509
|
/**
|
|
486
510
|
* Schema issue type.
|
|
487
511
|
*/
|
|
488
|
-
|
|
512
|
+
interface SchemaIssue extends Omit<SchemaConfig, 'message'> {
|
|
489
513
|
/**
|
|
490
514
|
* The issue reason.
|
|
491
515
|
*/
|
|
@@ -522,7 +546,7 @@ type SchemaIssue = Omit<SchemaConfig, 'message'> & {
|
|
|
522
546
|
* The sub issues.
|
|
523
547
|
*/
|
|
524
548
|
issues?: SchemaIssues;
|
|
525
|
-
}
|
|
549
|
+
}
|
|
526
550
|
/**
|
|
527
551
|
* Schema issues type.
|
|
528
552
|
*/
|
|
@@ -530,14 +554,14 @@ type SchemaIssues = [SchemaIssue, ...SchemaIssue[]];
|
|
|
530
554
|
/**
|
|
531
555
|
* Pipe action issue type.
|
|
532
556
|
*/
|
|
533
|
-
|
|
557
|
+
interface PipeActionIssue {
|
|
534
558
|
context: PipeActionContext;
|
|
535
559
|
reference: Function;
|
|
536
560
|
input: unknown;
|
|
537
561
|
label: string;
|
|
538
562
|
received?: string;
|
|
539
563
|
path?: IssuePath;
|
|
540
|
-
}
|
|
564
|
+
}
|
|
541
565
|
/**
|
|
542
566
|
* Pipe action issues type.
|
|
543
567
|
*/
|
|
@@ -550,7 +574,7 @@ type ErrorMessage = string | ((issue: SchemaIssue) => string);
|
|
|
550
574
|
/**
|
|
551
575
|
* The schema config type.
|
|
552
576
|
*/
|
|
553
|
-
|
|
577
|
+
interface SchemaConfig {
|
|
554
578
|
/**
|
|
555
579
|
* The selected language.
|
|
556
580
|
*/
|
|
@@ -571,32 +595,12 @@ type SchemaConfig = {
|
|
|
571
595
|
* Whether the pipe was skipped.
|
|
572
596
|
*/
|
|
573
597
|
skipPipe?: boolean;
|
|
574
|
-
}
|
|
575
|
-
/**
|
|
576
|
-
* Maybe readonly type.
|
|
577
|
-
*/
|
|
578
|
-
type MaybeReadonly<T> = Readonly<T> | T;
|
|
579
|
-
/**
|
|
580
|
-
* Resolve type.
|
|
581
|
-
*
|
|
582
|
-
* Hint: This type has no effect and is only used so that TypeScript displays
|
|
583
|
-
* the final type in the preview instead of the utility types used.
|
|
584
|
-
*/
|
|
585
|
-
type Resolve<T> = T;
|
|
586
|
-
/**
|
|
587
|
-
* Resolve object type.
|
|
588
|
-
*
|
|
589
|
-
* Hint: This type has no effect and is only used so that TypeScript displays
|
|
590
|
-
* the final type in the preview instead of the utility types used.
|
|
591
|
-
*/
|
|
592
|
-
type ResolveObject<T> = Resolve<{
|
|
593
|
-
[k in keyof T]: T[k];
|
|
594
|
-
}>;
|
|
598
|
+
}
|
|
595
599
|
|
|
596
600
|
/**
|
|
597
601
|
* Typed schema result type.
|
|
598
602
|
*/
|
|
599
|
-
|
|
603
|
+
interface TypedSchemaResult<TOutput> {
|
|
600
604
|
/**
|
|
601
605
|
* Whether is's typed.
|
|
602
606
|
*/
|
|
@@ -609,11 +613,11 @@ type TypedSchemaResult<TOutput> = {
|
|
|
609
613
|
* The parse issues.
|
|
610
614
|
*/
|
|
611
615
|
issues?: SchemaIssues;
|
|
612
|
-
}
|
|
616
|
+
}
|
|
613
617
|
/**
|
|
614
618
|
* Untyped schema result type.
|
|
615
619
|
*/
|
|
616
|
-
|
|
620
|
+
interface UntypedSchemaResult {
|
|
617
621
|
/**
|
|
618
622
|
* Whether is's typed.
|
|
619
623
|
*/
|
|
@@ -626,7 +630,7 @@ type UntypedSchemaResult = {
|
|
|
626
630
|
* The parse issues.
|
|
627
631
|
*/
|
|
628
632
|
issues: SchemaIssues;
|
|
629
|
-
}
|
|
633
|
+
}
|
|
630
634
|
/**
|
|
631
635
|
* Schema result type.
|
|
632
636
|
*/
|
|
@@ -634,7 +638,11 @@ type SchemaResult<TOutput> = TypedSchemaResult<TOutput> | UntypedSchemaResult;
|
|
|
634
638
|
/**
|
|
635
639
|
* Base schema type.
|
|
636
640
|
*/
|
|
637
|
-
|
|
641
|
+
interface BaseSchema<TInput = any, TOutput = TInput> {
|
|
642
|
+
/**
|
|
643
|
+
* The schema type.
|
|
644
|
+
*/
|
|
645
|
+
type: string;
|
|
638
646
|
/**
|
|
639
647
|
* The expected property.
|
|
640
648
|
*/
|
|
@@ -663,11 +671,15 @@ type BaseSchema<TInput = any, TOutput = TInput> = {
|
|
|
663
671
|
input: TInput;
|
|
664
672
|
output: TOutput;
|
|
665
673
|
};
|
|
666
|
-
}
|
|
674
|
+
}
|
|
667
675
|
/**
|
|
668
676
|
* Base schema async type.
|
|
669
677
|
*/
|
|
670
|
-
|
|
678
|
+
interface BaseSchemaAsync<TInput = any, TOutput = TInput> {
|
|
679
|
+
/**
|
|
680
|
+
* The schema type.
|
|
681
|
+
*/
|
|
682
|
+
type: string;
|
|
671
683
|
/**
|
|
672
684
|
* The expected property.
|
|
673
685
|
*/
|
|
@@ -696,7 +708,7 @@ type BaseSchemaAsync<TInput = any, TOutput = TInput> = {
|
|
|
696
708
|
input: TInput;
|
|
697
709
|
output: TOutput;
|
|
698
710
|
};
|
|
699
|
-
}
|
|
711
|
+
}
|
|
700
712
|
/**
|
|
701
713
|
* Input inference type.
|
|
702
714
|
*/
|
|
@@ -706,10 +718,39 @@ type Input<TSchema extends BaseSchema | BaseSchemaAsync> = NonNullable<TSchema['
|
|
|
706
718
|
*/
|
|
707
719
|
type Output<TSchema extends BaseSchema | BaseSchemaAsync> = NonNullable<TSchema['_types']>['output'];
|
|
708
720
|
|
|
721
|
+
/**
|
|
722
|
+
* Default type.
|
|
723
|
+
*/
|
|
724
|
+
type Default<TSchema extends BaseSchema> = Input<TSchema> | (() => Input<TSchema> | undefined) | undefined;
|
|
725
|
+
/**
|
|
726
|
+
* Default async type.
|
|
727
|
+
*/
|
|
728
|
+
type DefaultAsync<TSchema extends BaseSchema | BaseSchemaAsync> = Input<TSchema> | (() => Input<TSchema> | Promise<Input<TSchema> | undefined> | undefined) | undefined;
|
|
729
|
+
/**
|
|
730
|
+
* Maybe readonly type.
|
|
731
|
+
*/
|
|
732
|
+
type MaybeReadonly<T> = T | Readonly<T>;
|
|
733
|
+
/**
|
|
734
|
+
* Resolve type.
|
|
735
|
+
*
|
|
736
|
+
* Hint: This type has no effect and is only used so that TypeScript displays
|
|
737
|
+
* the final type in the preview instead of the utility types used.
|
|
738
|
+
*/
|
|
739
|
+
type Resolve<T> = T;
|
|
740
|
+
/**
|
|
741
|
+
* Resolve object type.
|
|
742
|
+
*
|
|
743
|
+
* Hint: This type has no effect and is only used so that TypeScript displays
|
|
744
|
+
* the final type in the preview instead of the utility types used.
|
|
745
|
+
*/
|
|
746
|
+
type ResolveObject<T> = Resolve<{
|
|
747
|
+
[k in keyof T]: T[k];
|
|
748
|
+
}>;
|
|
749
|
+
|
|
709
750
|
/**
|
|
710
751
|
* Array schema type.
|
|
711
752
|
*/
|
|
712
|
-
|
|
753
|
+
interface ArraySchema<TItem extends BaseSchema, TOutput = Output<TItem>[]> extends BaseSchema<Input<TItem>[], TOutput> {
|
|
713
754
|
/**
|
|
714
755
|
* The schema type.
|
|
715
756
|
*/
|
|
@@ -726,23 +767,23 @@ type ArraySchema<TItem extends BaseSchema, TOutput = Output<TItem>[]> = BaseSche
|
|
|
726
767
|
* The validation and transformation pipeline.
|
|
727
768
|
*/
|
|
728
769
|
pipe: Pipe<Output<TItem>[]> | undefined;
|
|
729
|
-
}
|
|
770
|
+
}
|
|
730
771
|
|
|
731
772
|
/**
|
|
732
773
|
* Array path item type.
|
|
733
774
|
*/
|
|
734
|
-
|
|
775
|
+
interface ArrayPathItem {
|
|
735
776
|
type: 'array';
|
|
736
777
|
origin: 'value';
|
|
737
778
|
input: unknown[];
|
|
738
779
|
key: number;
|
|
739
780
|
value: unknown;
|
|
740
|
-
}
|
|
781
|
+
}
|
|
741
782
|
|
|
742
783
|
/**
|
|
743
784
|
* Boolean schema type.
|
|
744
785
|
*/
|
|
745
|
-
|
|
786
|
+
interface BooleanSchema<TOutput = boolean> extends BaseSchema<boolean, TOutput> {
|
|
746
787
|
/**
|
|
747
788
|
* The schema type.
|
|
748
789
|
*/
|
|
@@ -755,19 +796,19 @@ type BooleanSchema<TOutput = boolean> = BaseSchema<boolean, TOutput> & {
|
|
|
755
796
|
* The validation and transformation pipeline.
|
|
756
797
|
*/
|
|
757
798
|
pipe: Pipe<boolean> | undefined;
|
|
758
|
-
}
|
|
799
|
+
}
|
|
759
800
|
|
|
760
801
|
/**
|
|
761
802
|
* Enum type.
|
|
762
803
|
*/
|
|
763
|
-
|
|
804
|
+
interface Enum {
|
|
764
805
|
[key: string]: string | number;
|
|
765
806
|
[key: number]: string;
|
|
766
|
-
}
|
|
807
|
+
}
|
|
767
808
|
/**
|
|
768
809
|
* Native enum schema type.
|
|
769
810
|
*/
|
|
770
|
-
|
|
811
|
+
interface EnumSchema<TEnum extends Enum, TOutput = TEnum[keyof TEnum]> extends BaseSchema<TEnum[keyof TEnum], TOutput> {
|
|
771
812
|
/**
|
|
772
813
|
* The schema type.
|
|
773
814
|
*/
|
|
@@ -780,12 +821,12 @@ type EnumSchema<TEnum extends Enum, TOutput = TEnum[keyof TEnum]> = BaseSchema<T
|
|
|
780
821
|
* The error message.
|
|
781
822
|
*/
|
|
782
823
|
message: ErrorMessage | undefined;
|
|
783
|
-
}
|
|
824
|
+
}
|
|
784
825
|
|
|
785
826
|
/**
|
|
786
827
|
* Native enum schema async type.
|
|
787
828
|
*/
|
|
788
|
-
|
|
829
|
+
interface EnumSchemaAsync<TEnum extends Enum, TOutput = TEnum[keyof TEnum]> extends BaseSchemaAsync<TEnum[keyof TEnum], TOutput> {
|
|
789
830
|
/**
|
|
790
831
|
* The schema type.
|
|
791
832
|
*/
|
|
@@ -798,7 +839,7 @@ type EnumSchemaAsync<TEnum extends Enum, TOutput = TEnum[keyof TEnum]> = BaseSch
|
|
|
798
839
|
* The error message.
|
|
799
840
|
*/
|
|
800
841
|
message: ErrorMessage | undefined;
|
|
801
|
-
}
|
|
842
|
+
}
|
|
802
843
|
|
|
803
844
|
/**
|
|
804
845
|
* Intersect options async type.
|
|
@@ -839,7 +880,7 @@ type IntersectOptions = MaybeReadonly<[
|
|
|
839
880
|
/**
|
|
840
881
|
* Intersect schema type.
|
|
841
882
|
*/
|
|
842
|
-
|
|
883
|
+
interface IntersectSchema<TOptions extends IntersectOptions, TOutput = IntersectOutput<TOptions>> extends BaseSchema<IntersectInput<TOptions>, TOutput> {
|
|
843
884
|
/**
|
|
844
885
|
* The schema type.
|
|
845
886
|
*/
|
|
@@ -856,7 +897,7 @@ type IntersectSchema<TOptions extends IntersectOptions, TOutput = IntersectOutpu
|
|
|
856
897
|
* The validation and transformation pipeline.
|
|
857
898
|
*/
|
|
858
899
|
pipe: Pipe<IntersectOutput<TOptions>> | undefined;
|
|
859
|
-
}
|
|
900
|
+
}
|
|
860
901
|
|
|
861
902
|
/**
|
|
862
903
|
* Literal type.
|
|
@@ -866,7 +907,7 @@ type Literal = number | string | boolean | symbol | bigint;
|
|
|
866
907
|
/**
|
|
867
908
|
* Literal schema type.
|
|
868
909
|
*/
|
|
869
|
-
|
|
910
|
+
interface LiteralSchema<TLiteral extends Literal, TOutput = TLiteral> extends BaseSchema<TLiteral, TOutput> {
|
|
870
911
|
/**
|
|
871
912
|
* The schema type.
|
|
872
913
|
*/
|
|
@@ -879,23 +920,23 @@ type LiteralSchema<TLiteral extends Literal, TOutput = TLiteral> = BaseSchema<TL
|
|
|
879
920
|
* The error message.
|
|
880
921
|
*/
|
|
881
922
|
message: ErrorMessage | undefined;
|
|
882
|
-
}
|
|
923
|
+
}
|
|
883
924
|
|
|
884
925
|
/**
|
|
885
926
|
* Map path item type.
|
|
886
927
|
*/
|
|
887
|
-
|
|
928
|
+
interface MapPathItem {
|
|
888
929
|
type: 'map';
|
|
889
930
|
origin: 'key' | 'value';
|
|
890
931
|
input: Map<unknown, unknown>;
|
|
891
932
|
key: unknown;
|
|
892
933
|
value: unknown;
|
|
893
|
-
}
|
|
934
|
+
}
|
|
894
935
|
|
|
895
936
|
/**
|
|
896
937
|
* Never schema type.
|
|
897
938
|
*/
|
|
898
|
-
|
|
939
|
+
interface NeverSchema extends BaseSchema<never> {
|
|
899
940
|
/**
|
|
900
941
|
* The schema type.
|
|
901
942
|
*/
|
|
@@ -904,12 +945,12 @@ type NeverSchema = BaseSchema<never> & {
|
|
|
904
945
|
* The error message.
|
|
905
946
|
*/
|
|
906
947
|
message: ErrorMessage | undefined;
|
|
907
|
-
}
|
|
948
|
+
}
|
|
908
949
|
|
|
909
950
|
/**
|
|
910
951
|
* Never schema async type.
|
|
911
952
|
*/
|
|
912
|
-
|
|
953
|
+
interface NeverSchemaAsync extends BaseSchemaAsync<never> {
|
|
913
954
|
/**
|
|
914
955
|
* The schema type.
|
|
915
956
|
*/
|
|
@@ -918,12 +959,12 @@ type NeverSchemaAsync = BaseSchemaAsync<never> & {
|
|
|
918
959
|
* The error message.
|
|
919
960
|
*/
|
|
920
961
|
message: ErrorMessage | undefined;
|
|
921
|
-
}
|
|
962
|
+
}
|
|
922
963
|
|
|
923
964
|
/**
|
|
924
965
|
* Nullable schema type.
|
|
925
966
|
*/
|
|
926
|
-
|
|
967
|
+
interface NullableSchema<TWrapped extends BaseSchema, TDefault extends Default<TWrapped> = undefined, TOutput = TDefault extends Input<TWrapped> | (() => Input<TWrapped>) ? Output<TWrapped> : Output<TWrapped> | null> extends BaseSchema<Input<TWrapped> | null, TOutput> {
|
|
927
968
|
/**
|
|
928
969
|
* The schema type.
|
|
929
970
|
*/
|
|
@@ -936,12 +977,12 @@ type NullableSchema<TWrapped extends BaseSchema, TDefault extends Input<TWrapped
|
|
|
936
977
|
* The default value.
|
|
937
978
|
*/
|
|
938
979
|
default: TDefault;
|
|
939
|
-
}
|
|
980
|
+
}
|
|
940
981
|
|
|
941
982
|
/**
|
|
942
983
|
* Number schema type.
|
|
943
984
|
*/
|
|
944
|
-
|
|
985
|
+
interface NumberSchema<TOutput = number> extends BaseSchema<number, TOutput> {
|
|
945
986
|
/**
|
|
946
987
|
* The schema type.
|
|
947
988
|
*/
|
|
@@ -954,12 +995,12 @@ type NumberSchema<TOutput = number> = BaseSchema<number, TOutput> & {
|
|
|
954
995
|
* The validation and transformation pipeline.
|
|
955
996
|
*/
|
|
956
997
|
pipe: Pipe<number> | undefined;
|
|
957
|
-
}
|
|
998
|
+
}
|
|
958
999
|
|
|
959
1000
|
/**
|
|
960
1001
|
* Optional schema type.
|
|
961
1002
|
*/
|
|
962
|
-
|
|
1003
|
+
interface OptionalSchema<TWrapped extends BaseSchema, TDefault extends Default<TWrapped> = undefined, TOutput = TDefault extends Input<TWrapped> | (() => Input<TWrapped>) ? Output<TWrapped> : Output<TWrapped> | undefined> extends BaseSchema<Input<TWrapped> | undefined, TOutput> {
|
|
963
1004
|
/**
|
|
964
1005
|
* The schema type.
|
|
965
1006
|
*/
|
|
@@ -972,12 +1013,12 @@ type OptionalSchema<TWrapped extends BaseSchema, TDefault extends Input<TWrapped
|
|
|
972
1013
|
* Returns the default value.
|
|
973
1014
|
*/
|
|
974
1015
|
default: TDefault;
|
|
975
|
-
}
|
|
1016
|
+
}
|
|
976
1017
|
|
|
977
1018
|
/**
|
|
978
1019
|
* Optional schema async type.
|
|
979
1020
|
*/
|
|
980
|
-
|
|
1021
|
+
interface OptionalSchemaAsync<TWrapped extends BaseSchema | BaseSchemaAsync, TDefault extends DefaultAsync<TWrapped> = undefined, TOutput = TDefault extends Input<TWrapped> | (() => Input<TWrapped> | Promise<Input<TWrapped>>) ? Output<TWrapped> : Output<TWrapped> | undefined> extends BaseSchemaAsync<Input<TWrapped> | undefined, TOutput> {
|
|
981
1022
|
/**
|
|
982
1023
|
* The schema type.
|
|
983
1024
|
*/
|
|
@@ -990,23 +1031,25 @@ type OptionalSchemaAsync<TWrapped extends BaseSchema | BaseSchemaAsync, TDefault
|
|
|
990
1031
|
* Returns the default value.
|
|
991
1032
|
*/
|
|
992
1033
|
default: TDefault;
|
|
993
|
-
}
|
|
1034
|
+
}
|
|
994
1035
|
|
|
995
1036
|
/**
|
|
996
1037
|
* Object entries async type.
|
|
997
1038
|
*/
|
|
998
|
-
|
|
1039
|
+
interface ObjectEntriesAsync {
|
|
1040
|
+
[key: string]: BaseSchema | BaseSchemaAsync;
|
|
1041
|
+
}
|
|
999
1042
|
|
|
1000
1043
|
/**
|
|
1001
1044
|
* Object path item type.
|
|
1002
1045
|
*/
|
|
1003
|
-
|
|
1046
|
+
interface ObjectPathItem {
|
|
1004
1047
|
type: 'object';
|
|
1005
1048
|
origin: 'value';
|
|
1006
1049
|
input: Record<string, unknown>;
|
|
1007
1050
|
key: string;
|
|
1008
1051
|
value: unknown;
|
|
1009
|
-
}
|
|
1052
|
+
}
|
|
1010
1053
|
/**
|
|
1011
1054
|
* Required object keys type.
|
|
1012
1055
|
*/
|
|
@@ -1047,11 +1090,13 @@ type ObjectOutput<TEntries extends ObjectEntries | ObjectEntriesAsync, TRest ext
|
|
|
1047
1090
|
/**
|
|
1048
1091
|
* Object entries type.
|
|
1049
1092
|
*/
|
|
1050
|
-
|
|
1093
|
+
interface ObjectEntries {
|
|
1094
|
+
[key: string]: BaseSchema;
|
|
1095
|
+
}
|
|
1051
1096
|
/**
|
|
1052
1097
|
* Object schema type.
|
|
1053
1098
|
*/
|
|
1054
|
-
|
|
1099
|
+
interface ObjectSchema<TEntries extends ObjectEntries, TRest extends BaseSchema | undefined = undefined, TOutput = ObjectOutput<TEntries, TRest>> extends BaseSchema<ObjectInput<TEntries, TRest>, TOutput> {
|
|
1055
1100
|
/**
|
|
1056
1101
|
* The schema type.
|
|
1057
1102
|
*/
|
|
@@ -1072,7 +1117,7 @@ type ObjectSchema<TEntries extends ObjectEntries, TRest extends BaseSchema | und
|
|
|
1072
1117
|
* The validation and transformation pipeline.
|
|
1073
1118
|
*/
|
|
1074
1119
|
pipe: Pipe<ObjectOutput<TEntries, TRest>> | undefined;
|
|
1075
|
-
}
|
|
1120
|
+
}
|
|
1076
1121
|
|
|
1077
1122
|
/**
|
|
1078
1123
|
* Picklist options type.
|
|
@@ -1082,7 +1127,7 @@ type PicklistOptions = MaybeReadonly<(string | number | bigint)[]>;
|
|
|
1082
1127
|
/**
|
|
1083
1128
|
* Picklist schema type.
|
|
1084
1129
|
*/
|
|
1085
|
-
|
|
1130
|
+
interface PicklistSchema<TOptions extends PicklistOptions, TOutput = TOptions[number]> extends BaseSchema<TOptions[number], TOutput> {
|
|
1086
1131
|
/**
|
|
1087
1132
|
* The schema type.
|
|
1088
1133
|
*/
|
|
@@ -1095,12 +1140,12 @@ type PicklistSchema<TOptions extends PicklistOptions, TOutput = TOptions[number]
|
|
|
1095
1140
|
* The error message.
|
|
1096
1141
|
*/
|
|
1097
1142
|
message: ErrorMessage | undefined;
|
|
1098
|
-
}
|
|
1143
|
+
}
|
|
1099
1144
|
|
|
1100
1145
|
/**
|
|
1101
1146
|
* Picklist schema async type.
|
|
1102
1147
|
*/
|
|
1103
|
-
|
|
1148
|
+
interface PicklistSchemaAsync<TOptions extends PicklistOptions, TOutput = TOptions[number]> extends BaseSchemaAsync<TOptions[number], TOutput> {
|
|
1104
1149
|
/**
|
|
1105
1150
|
* The schema type.
|
|
1106
1151
|
*/
|
|
@@ -1113,12 +1158,12 @@ type PicklistSchemaAsync<TOptions extends PicklistOptions, TOutput = TOptions[nu
|
|
|
1113
1158
|
* The error message.
|
|
1114
1159
|
*/
|
|
1115
1160
|
message: ErrorMessage | undefined;
|
|
1116
|
-
}
|
|
1161
|
+
}
|
|
1117
1162
|
|
|
1118
1163
|
/**
|
|
1119
1164
|
* Special schema type.
|
|
1120
1165
|
*/
|
|
1121
|
-
|
|
1166
|
+
interface SpecialSchema<TInput, TOutput = TInput> extends BaseSchema<TInput, TOutput> {
|
|
1122
1167
|
/**
|
|
1123
1168
|
* The schema type.
|
|
1124
1169
|
*/
|
|
@@ -1135,12 +1180,12 @@ type SpecialSchema<TInput, TOutput = TInput> = BaseSchema<TInput, TOutput> & {
|
|
|
1135
1180
|
* The validation and transformation pipeline.
|
|
1136
1181
|
*/
|
|
1137
1182
|
pipe: Pipe<TInput> | undefined;
|
|
1138
|
-
}
|
|
1183
|
+
}
|
|
1139
1184
|
|
|
1140
1185
|
/**
|
|
1141
1186
|
* Special schema async type.
|
|
1142
1187
|
*/
|
|
1143
|
-
|
|
1188
|
+
interface SpecialSchemaAsync<TInput, TOutput = TInput> extends BaseSchemaAsync<TInput, TOutput> {
|
|
1144
1189
|
/**
|
|
1145
1190
|
* The schema type.
|
|
1146
1191
|
*/
|
|
@@ -1157,12 +1202,12 @@ type SpecialSchemaAsync<TInput, TOutput = TInput> = BaseSchemaAsync<TInput, TOut
|
|
|
1157
1202
|
* The validation and transformation pipeline.
|
|
1158
1203
|
*/
|
|
1159
1204
|
pipe: PipeAsync<TInput> | undefined;
|
|
1160
|
-
}
|
|
1205
|
+
}
|
|
1161
1206
|
|
|
1162
1207
|
/**
|
|
1163
1208
|
* String schema type.
|
|
1164
1209
|
*/
|
|
1165
|
-
|
|
1210
|
+
interface StringSchema<TOutput = string> extends BaseSchema<string, TOutput> {
|
|
1166
1211
|
/**
|
|
1167
1212
|
* The schema type.
|
|
1168
1213
|
*/
|
|
@@ -1175,12 +1220,12 @@ type StringSchema<TOutput = string> = BaseSchema<string, TOutput> & {
|
|
|
1175
1220
|
* The validation and transformation pipeline.
|
|
1176
1221
|
*/
|
|
1177
1222
|
pipe: Pipe<string> | undefined;
|
|
1178
|
-
}
|
|
1223
|
+
}
|
|
1179
1224
|
|
|
1180
1225
|
/**
|
|
1181
1226
|
* String schema async type.
|
|
1182
1227
|
*/
|
|
1183
|
-
|
|
1228
|
+
interface StringSchemaAsync<TOutput = string> extends BaseSchemaAsync<string, TOutput> {
|
|
1184
1229
|
/**
|
|
1185
1230
|
* The schema type.
|
|
1186
1231
|
*/
|
|
@@ -1193,7 +1238,7 @@ type StringSchemaAsync<TOutput = string> = BaseSchemaAsync<string, TOutput> & {
|
|
|
1193
1238
|
* The validation and transformation pipeline.
|
|
1194
1239
|
*/
|
|
1195
1240
|
pipe: PipeAsync<string> | undefined;
|
|
1196
|
-
}
|
|
1241
|
+
}
|
|
1197
1242
|
|
|
1198
1243
|
/**
|
|
1199
1244
|
* Union options type.
|
|
@@ -1202,7 +1247,7 @@ type UnionOptions = MaybeReadonly<BaseSchema[]>;
|
|
|
1202
1247
|
/**
|
|
1203
1248
|
* Union schema type.
|
|
1204
1249
|
*/
|
|
1205
|
-
|
|
1250
|
+
interface UnionSchema<TOptions extends UnionOptions, TOutput = Output<TOptions[number]>> extends BaseSchema<Input<TOptions[number]>, TOutput> {
|
|
1206
1251
|
/**
|
|
1207
1252
|
* The schema type.
|
|
1208
1253
|
*/
|
|
@@ -1219,7 +1264,7 @@ type UnionSchema<TOptions extends UnionOptions, TOutput = Output<TOptions[number
|
|
|
1219
1264
|
* The validation and transformation pipeline.
|
|
1220
1265
|
*/
|
|
1221
1266
|
pipe: Pipe<Output<TOptions[number]>> | undefined;
|
|
1222
|
-
}
|
|
1267
|
+
}
|
|
1223
1268
|
|
|
1224
1269
|
/**
|
|
1225
1270
|
* Union options async type.
|
|
@@ -1228,7 +1273,7 @@ type UnionOptionsAsync = MaybeReadonly<(BaseSchema | BaseSchemaAsync)[]>;
|
|
|
1228
1273
|
/**
|
|
1229
1274
|
* Union schema async type.
|
|
1230
1275
|
*/
|
|
1231
|
-
|
|
1276
|
+
interface UnionSchemaAsync<TOptions extends UnionOptionsAsync, TOutput = Output<TOptions[number]>> extends BaseSchemaAsync<Input<TOptions[number]>, TOutput> {
|
|
1232
1277
|
/**
|
|
1233
1278
|
* The schema type.
|
|
1234
1279
|
*/
|
|
@@ -1245,7 +1290,7 @@ type UnionSchemaAsync<TOptions extends UnionOptionsAsync, TOutput = Output<TOpti
|
|
|
1245
1290
|
* The validation and transformation pipeline.
|
|
1246
1291
|
*/
|
|
1247
1292
|
pipe: PipeAsync<Input<TOptions[number]>> | undefined;
|
|
1248
|
-
}
|
|
1293
|
+
}
|
|
1249
1294
|
|
|
1250
1295
|
/**
|
|
1251
1296
|
* Record key async type.
|
|
@@ -1255,13 +1300,13 @@ type RecordKeyAsync = EnumSchema<any, string | number | symbol> | EnumSchemaAsyn
|
|
|
1255
1300
|
/**
|
|
1256
1301
|
* Record path item type.
|
|
1257
1302
|
*/
|
|
1258
|
-
|
|
1303
|
+
interface RecordPathItem {
|
|
1259
1304
|
type: 'record';
|
|
1260
1305
|
origin: 'key' | 'value';
|
|
1261
1306
|
input: Record<string | number | symbol, unknown>;
|
|
1262
1307
|
key: string | number | symbol;
|
|
1263
1308
|
value: unknown;
|
|
1264
|
-
}
|
|
1309
|
+
}
|
|
1265
1310
|
/**
|
|
1266
1311
|
* Partial key schema type.
|
|
1267
1312
|
*/
|
|
@@ -1282,7 +1327,7 @@ type RecordKey = EnumSchema<any, string | number | symbol> | PicklistSchema<any,
|
|
|
1282
1327
|
/**
|
|
1283
1328
|
* Record schema type.
|
|
1284
1329
|
*/
|
|
1285
|
-
|
|
1330
|
+
interface RecordSchema<TKey extends RecordKey, TValue extends BaseSchema, TOutput = RecordOutput<TKey, TValue>> extends BaseSchema<RecordInput<TKey, TValue>, TOutput> {
|
|
1286
1331
|
/**
|
|
1287
1332
|
* The schema type.
|
|
1288
1333
|
*/
|
|
@@ -1303,34 +1348,34 @@ type RecordSchema<TKey extends RecordKey, TValue extends BaseSchema, TOutput = R
|
|
|
1303
1348
|
* The validation and transformation pipeline.
|
|
1304
1349
|
*/
|
|
1305
1350
|
pipe: Pipe<RecordOutput<TKey, TValue>> | undefined;
|
|
1306
|
-
}
|
|
1351
|
+
}
|
|
1307
1352
|
|
|
1308
1353
|
/**
|
|
1309
1354
|
* Set path item type.
|
|
1310
1355
|
*/
|
|
1311
|
-
|
|
1356
|
+
interface SetPathItem {
|
|
1312
1357
|
type: 'set';
|
|
1313
1358
|
origin: 'value';
|
|
1314
1359
|
input: Set<unknown>;
|
|
1315
1360
|
key: number;
|
|
1316
1361
|
value: unknown;
|
|
1317
|
-
}
|
|
1362
|
+
}
|
|
1318
1363
|
|
|
1319
1364
|
/**
|
|
1320
1365
|
* Tuple path item type.
|
|
1321
1366
|
*/
|
|
1322
|
-
|
|
1367
|
+
interface TuplePathItem {
|
|
1323
1368
|
type: 'tuple';
|
|
1324
1369
|
origin: 'value';
|
|
1325
1370
|
input: [unknown, ...unknown[]];
|
|
1326
1371
|
key: number;
|
|
1327
1372
|
value: unknown;
|
|
1328
|
-
}
|
|
1373
|
+
}
|
|
1329
1374
|
|
|
1330
1375
|
/**
|
|
1331
1376
|
* Unknown schema type.
|
|
1332
1377
|
*/
|
|
1333
|
-
|
|
1378
|
+
interface UnknownSchema<TOutput = unknown> extends BaseSchema<unknown, TOutput> {
|
|
1334
1379
|
/**
|
|
1335
1380
|
* The schema type.
|
|
1336
1381
|
*/
|
|
@@ -1339,7 +1384,7 @@ type UnknownSchema<TOutput = unknown> = BaseSchema<unknown, TOutput> & {
|
|
|
1339
1384
|
* The validation and transformation pipeline.
|
|
1340
1385
|
*/
|
|
1341
1386
|
pipe: Pipe<unknown> | undefined;
|
|
1342
|
-
}
|
|
1387
|
+
}
|
|
1343
1388
|
|
|
1344
1389
|
type Platform = "win7" | "win8_1" | "win" | "mac10_9" | "mac10_11" | "mac" | "other";
|
|
1345
1390
|
declare const ZHTML5Fonts: UnionSchema<(LiteralSchema<"defont", "defont"> | LiteralSchema<"mincho", "mincho"> | LiteralSchema<"gothic", "gothic">)[], "defont" | "mincho" | "gothic">;
|
|
@@ -3081,13 +3126,13 @@ declare namespace typeGuard_d {
|
|
|
3081
3126
|
export { typeGuard as default };
|
|
3082
3127
|
}
|
|
3083
3128
|
|
|
3084
|
-
declare const arrayPush: (
|
|
3129
|
+
declare const arrayPush: (_array: {
|
|
3085
3130
|
[key: number]: IComment[];
|
|
3086
3131
|
}, key: string | number, push: IComment) => void;
|
|
3087
3132
|
declare const arrayEqual: (a: unknown[], b: unknown[]) => boolean;
|
|
3088
3133
|
|
|
3089
|
-
declare const hex2rgb: (
|
|
3090
|
-
declare const hex2rgba: (
|
|
3134
|
+
declare const hex2rgb: (_hex: string) => number[];
|
|
3135
|
+
declare const hex2rgba: (_hex: string) => number[];
|
|
3091
3136
|
declare const getStrokeColor: (comment: FormattedCommentWithSize) => string;
|
|
3092
3137
|
|
|
3093
3138
|
declare const isLineBreakResize: (comment: MeasureTextInput) => boolean;
|
|
@@ -3100,7 +3145,7 @@ declare const processFixedComment: (comment: IComment, collision: CollisionItem,
|
|
|
3100
3145
|
declare const processMovableComment: (comment: IComment, collision: Collision, timeline: Timeline, lazy?: boolean) => void;
|
|
3101
3146
|
declare const getFixedPosY: (comment: IComment, collision: CollisionItem) => number;
|
|
3102
3147
|
declare const getMovablePosY: (comment: IComment, collision: Collision, beforeVpos: number) => number;
|
|
3103
|
-
declare const getPosY: (
|
|
3148
|
+
declare const getPosY: (_currentPos: number, targetComment: IComment, collision: IComment[] | undefined, _isChanged?: boolean) => {
|
|
3104
3149
|
currentPos: number;
|
|
3105
3150
|
isChanged: boolean;
|
|
3106
3151
|
isBreak: boolean;
|
|
@@ -3140,8 +3185,8 @@ declare const measure: (comment: MeasureInput, renderer: IRenderer) => {
|
|
|
3140
3185
|
lineWidth: number[];
|
|
3141
3186
|
itemWidth: number[][];
|
|
3142
3187
|
};
|
|
3143
|
-
declare const addHTML5PartToResult: (lineContent: CommentContentItem[], part: string,
|
|
3144
|
-
declare const getFontSizeAndScale: (
|
|
3188
|
+
declare const addHTML5PartToResult: (lineContent: CommentContentItem[], part: string, _font?: CommentHTML5Font) => void;
|
|
3189
|
+
declare const getFontSizeAndScale: (_charSize: number) => {
|
|
3145
3190
|
scale: number;
|
|
3146
3191
|
fontSize: number;
|
|
3147
3192
|
};
|
|
@@ -3559,7 +3604,7 @@ declare class NiconiComments {
|
|
|
3559
3604
|
class: typeof FlashComment;
|
|
3560
3605
|
};
|
|
3561
3606
|
static internal: typeof internal;
|
|
3562
|
-
constructor(
|
|
3607
|
+
constructor(_renderer: IRenderer | HTMLCanvasElement, data: InputFormat, initOptions?: Options);
|
|
3563
3608
|
private preRendering;
|
|
3564
3609
|
private getCommentPos;
|
|
3565
3610
|
private sortTimelineComment;
|