@ankhorage/zora 3.0.2 → 3.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/README.md +1 -1
- package/dist/components/card/meta.d.ts +1 -1
- package/dist/components/text/Text.d.ts.map +1 -1
- package/dist/components/text/Text.js +2 -2
- package/dist/components/text/Text.js.map +1 -1
- package/dist/components/text/types.d.ts +2 -1
- package/dist/components/text/types.d.ts.map +1 -1
- package/dist/components/text/types.js.map +1 -1
- package/dist/foundation/meta.d.ts +4 -4
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/layout/screen/meta.d.ts +1 -1
- package/dist/layout/screen-section/meta.d.ts +1 -1
- package/dist/metadata/allowedChildren.d.ts +3 -3
- package/dist/metadata/allowedChildren.d.ts.map +1 -1
- package/dist/metadata/allowedChildren.js +1 -0
- package/dist/metadata/allowedChildren.js.map +1 -1
- package/dist/metadata/bindableComponentMeta.d.ts +485 -0
- package/dist/metadata/bindableComponentMeta.d.ts.map +1 -1
- package/dist/metadata/bindableComponentMeta.js +102 -0
- package/dist/metadata/bindableComponentMeta.js.map +1 -1
- package/dist/metadata/componentMeta.d.ts.map +1 -1
- package/dist/metadata/componentMeta.js +2 -0
- package/dist/metadata/componentMeta.js.map +1 -1
- package/dist/patterns/message-bubble/meta.d.ts +1 -1
- package/dist/patterns/notice/meta.d.ts +1 -1
- package/dist/patterns/panel/meta.d.ts +1 -1
- package/dist/patterns/post-card/meta.d.ts +1 -1
- package/dist/patterns/reader/ReaderSurface.d.ts +11 -0
- package/dist/patterns/reader/ReaderSurface.d.ts.map +1 -0
- package/dist/patterns/reader/ReaderSurface.js +95 -0
- package/dist/patterns/reader/ReaderSurface.js.map +1 -0
- package/dist/patterns/reader/index.d.ts +4 -0
- package/dist/patterns/reader/index.d.ts.map +1 -0
- package/dist/patterns/reader/index.js +3 -0
- package/dist/patterns/reader/index.js.map +1 -0
- package/dist/patterns/reader/meta.d.ts +328 -0
- package/dist/patterns/reader/meta.d.ts.map +1 -0
- package/dist/patterns/reader/meta.js +293 -0
- package/dist/patterns/reader/meta.js.map +1 -0
- package/dist/patterns/reader/resolveReaderProgress.d.ts +6 -0
- package/dist/patterns/reader/resolveReaderProgress.d.ts.map +1 -0
- package/dist/patterns/reader/resolveReaderProgress.js +17 -0
- package/dist/patterns/reader/resolveReaderProgress.js.map +1 -0
- package/dist/patterns/reader/types.d.ts +69 -0
- package/dist/patterns/reader/types.d.ts.map +1 -0
- package/dist/patterns/reader/types.js +2 -0
- package/dist/patterns/reader/types.js.map +1 -0
- package/dist/patterns/scanner/meta.d.ts +2 -2
- package/dist/registry.d.ts.map +1 -1
- package/dist/registry.js +2 -0
- package/dist/registry.js.map +1 -1
- package/package.json +4 -4
- package/src/components/text/Text.tsx +2 -0
- package/src/components/text/types.ts +7 -1
- package/src/expo57Migration.test.ts +18 -14
- package/src/index.ts +14 -0
- package/src/interactionPolicy.test.ts +30 -0
- package/src/metadata/allowedChildren.ts +1 -0
- package/src/metadata/bindableComponentMeta.test.ts +30 -0
- package/src/metadata/bindableComponentMeta.ts +102 -0
- package/src/metadata/componentMeta.test.ts +36 -0
- package/src/metadata/componentMeta.ts +2 -0
- package/src/patterns/reader/ReaderSurface.test.ts +46 -0
- package/src/patterns/reader/ReaderSurface.tsx +348 -0
- package/src/patterns/reader/index.ts +15 -0
- package/src/patterns/reader/meta.ts +296 -0
- package/src/patterns/reader/resolveReaderProgress.test.ts +31 -0
- package/src/patterns/reader/resolveReaderProgress.ts +29 -0
- package/src/patterns/reader/types.ts +80 -0
- package/src/registry.ts +2 -0
- package/src/showcaseCoverage.test.ts +1 -0
|
@@ -563,6 +563,491 @@ export declare const ZORA_BINDABLE_COMPONENT_META: {
|
|
|
563
563
|
};
|
|
564
564
|
};
|
|
565
565
|
};
|
|
566
|
+
readonly ReaderSurface: {
|
|
567
|
+
readonly bindings: {
|
|
568
|
+
readonly props: {
|
|
569
|
+
readonly location: {
|
|
570
|
+
readonly label: "Location";
|
|
571
|
+
readonly description: "Opaque adapter locator to restore.";
|
|
572
|
+
readonly value: {
|
|
573
|
+
readonly type: "string";
|
|
574
|
+
};
|
|
575
|
+
readonly acceptsFallback: true;
|
|
576
|
+
readonly acceptsTransforms: true;
|
|
577
|
+
};
|
|
578
|
+
readonly page: {
|
|
579
|
+
readonly label: "Page";
|
|
580
|
+
readonly description: "One-based visible page.";
|
|
581
|
+
readonly value: {
|
|
582
|
+
readonly type: "number";
|
|
583
|
+
};
|
|
584
|
+
readonly acceptsFallback: true;
|
|
585
|
+
readonly acceptsTransforms: true;
|
|
586
|
+
};
|
|
587
|
+
readonly pageCount: {
|
|
588
|
+
readonly label: "Page count";
|
|
589
|
+
readonly description: "Current number of logical pages.";
|
|
590
|
+
readonly value: {
|
|
591
|
+
readonly type: "number";
|
|
592
|
+
};
|
|
593
|
+
readonly acceptsFallback: true;
|
|
594
|
+
readonly acceptsTransforms: true;
|
|
595
|
+
};
|
|
596
|
+
readonly progress: {
|
|
597
|
+
readonly label: "Progress";
|
|
598
|
+
readonly description: "Reading progression clamped from zero to one.";
|
|
599
|
+
readonly value: {
|
|
600
|
+
readonly type: "number";
|
|
601
|
+
};
|
|
602
|
+
readonly acceptsFallback: true;
|
|
603
|
+
readonly acceptsTransforms: true;
|
|
604
|
+
};
|
|
605
|
+
readonly status: {
|
|
606
|
+
readonly label: "Status";
|
|
607
|
+
readonly description: "Current reader loading status.";
|
|
608
|
+
readonly value: {
|
|
609
|
+
readonly type: "string";
|
|
610
|
+
};
|
|
611
|
+
readonly acceptsFallback: true;
|
|
612
|
+
readonly acceptsTransforms: true;
|
|
613
|
+
};
|
|
614
|
+
};
|
|
615
|
+
readonly events: {
|
|
616
|
+
readonly previousPage: {
|
|
617
|
+
readonly label: "Previous page";
|
|
618
|
+
readonly description: "Requests navigation to the previous page.";
|
|
619
|
+
readonly payload: {
|
|
620
|
+
readonly eventType: "reader.previousPage";
|
|
621
|
+
readonly fields: readonly [];
|
|
622
|
+
};
|
|
623
|
+
};
|
|
624
|
+
readonly nextPage: {
|
|
625
|
+
readonly label: "Next page";
|
|
626
|
+
readonly description: "Requests navigation to the next page.";
|
|
627
|
+
readonly payload: {
|
|
628
|
+
readonly eventType: "reader.nextPage";
|
|
629
|
+
readonly fields: readonly [];
|
|
630
|
+
};
|
|
631
|
+
};
|
|
632
|
+
readonly locationChange: {
|
|
633
|
+
readonly label: "Location change";
|
|
634
|
+
readonly description: "Runs after the adapter displays a destination.";
|
|
635
|
+
readonly payload: {
|
|
636
|
+
readonly eventType: "reader.locationChange";
|
|
637
|
+
readonly fields: readonly [{
|
|
638
|
+
readonly path: "format";
|
|
639
|
+
readonly type: "string";
|
|
640
|
+
readonly label: "Format";
|
|
641
|
+
}, {
|
|
642
|
+
readonly path: "locator";
|
|
643
|
+
readonly type: "string";
|
|
644
|
+
readonly label: "Opaque locator";
|
|
645
|
+
}, {
|
|
646
|
+
readonly path: "page";
|
|
647
|
+
readonly type: "number";
|
|
648
|
+
readonly label: "Page";
|
|
649
|
+
}, {
|
|
650
|
+
readonly path: "pageCount";
|
|
651
|
+
readonly type: "number";
|
|
652
|
+
readonly label: "Page count";
|
|
653
|
+
}, {
|
|
654
|
+
readonly path: "progression";
|
|
655
|
+
readonly type: "number";
|
|
656
|
+
readonly label: "Progression";
|
|
657
|
+
}, {
|
|
658
|
+
readonly path: "chapterId";
|
|
659
|
+
readonly type: "string";
|
|
660
|
+
readonly label: "Chapter ID";
|
|
661
|
+
}, {
|
|
662
|
+
readonly path: "chapterTitle";
|
|
663
|
+
readonly type: "string";
|
|
664
|
+
readonly label: "Chapter title";
|
|
665
|
+
}, {
|
|
666
|
+
readonly path: "trigger";
|
|
667
|
+
readonly type: "string";
|
|
668
|
+
readonly label: "Navigation trigger";
|
|
669
|
+
}];
|
|
670
|
+
};
|
|
671
|
+
};
|
|
672
|
+
readonly openContents: {
|
|
673
|
+
readonly label: "Open contents";
|
|
674
|
+
readonly payload: {
|
|
675
|
+
readonly eventType: "reader.openContents";
|
|
676
|
+
readonly fields: readonly [];
|
|
677
|
+
};
|
|
678
|
+
};
|
|
679
|
+
readonly openAppearance: {
|
|
680
|
+
readonly label: "Open appearance";
|
|
681
|
+
readonly payload: {
|
|
682
|
+
readonly eventType: "reader.openAppearance";
|
|
683
|
+
readonly fields: readonly [];
|
|
684
|
+
};
|
|
685
|
+
};
|
|
686
|
+
readonly toggleHighlight: {
|
|
687
|
+
readonly label: "Toggle highlight";
|
|
688
|
+
readonly payload: {
|
|
689
|
+
readonly eventType: "reader.toggleHighlight";
|
|
690
|
+
readonly fields: readonly [];
|
|
691
|
+
};
|
|
692
|
+
};
|
|
693
|
+
readonly openExternalLink: {
|
|
694
|
+
readonly label: "Open external link";
|
|
695
|
+
readonly payload: {
|
|
696
|
+
readonly eventType: "reader.openExternalLink";
|
|
697
|
+
readonly fields: readonly [{
|
|
698
|
+
readonly path: "url";
|
|
699
|
+
readonly type: "string";
|
|
700
|
+
readonly label: "URL";
|
|
701
|
+
}];
|
|
702
|
+
};
|
|
703
|
+
};
|
|
704
|
+
readonly readerError: {
|
|
705
|
+
readonly label: "Reader error";
|
|
706
|
+
readonly payload: {
|
|
707
|
+
readonly eventType: "reader.error";
|
|
708
|
+
readonly fields: readonly [{
|
|
709
|
+
readonly path: "code";
|
|
710
|
+
readonly type: "string";
|
|
711
|
+
readonly label: "Error code";
|
|
712
|
+
}, {
|
|
713
|
+
readonly path: "format";
|
|
714
|
+
readonly type: "string";
|
|
715
|
+
readonly label: "Format";
|
|
716
|
+
}, {
|
|
717
|
+
readonly path: "message";
|
|
718
|
+
readonly type: "string";
|
|
719
|
+
readonly label: "Message";
|
|
720
|
+
}];
|
|
721
|
+
};
|
|
722
|
+
};
|
|
723
|
+
};
|
|
724
|
+
};
|
|
725
|
+
readonly name: "ReaderSurface";
|
|
726
|
+
readonly category: "pattern";
|
|
727
|
+
readonly description: "Adapter-neutral EPUB and PDF reader shell with controlled chrome, progress, and navigation events.";
|
|
728
|
+
readonly directManifestNode: true;
|
|
729
|
+
readonly requirements: {
|
|
730
|
+
readonly capabilities: readonly [{
|
|
731
|
+
readonly capability: "ebookReader";
|
|
732
|
+
}];
|
|
733
|
+
};
|
|
734
|
+
readonly allowedChildren: readonly [];
|
|
735
|
+
readonly blueprint: {
|
|
736
|
+
readonly label: "Reader";
|
|
737
|
+
readonly defaultProps: {
|
|
738
|
+
readonly format: "epub";
|
|
739
|
+
readonly status: "idle";
|
|
740
|
+
readonly showChrome: true;
|
|
741
|
+
readonly readerColorScheme: "system";
|
|
742
|
+
readonly fontScale: 1;
|
|
743
|
+
readonly lineHeight: "normal";
|
|
744
|
+
};
|
|
745
|
+
};
|
|
746
|
+
readonly events: {
|
|
747
|
+
readonly previousPage: {
|
|
748
|
+
readonly label: "Previous page";
|
|
749
|
+
readonly eventType: "reader.previousPage";
|
|
750
|
+
readonly description: "Requests navigation to the previous page.";
|
|
751
|
+
readonly payloadFields: readonly [];
|
|
752
|
+
};
|
|
753
|
+
readonly nextPage: {
|
|
754
|
+
readonly label: "Next page";
|
|
755
|
+
readonly eventType: "reader.nextPage";
|
|
756
|
+
readonly description: "Requests navigation to the next page.";
|
|
757
|
+
readonly payloadFields: readonly [];
|
|
758
|
+
};
|
|
759
|
+
readonly locationChange: {
|
|
760
|
+
readonly label: "Location change";
|
|
761
|
+
readonly eventType: "reader.locationChange";
|
|
762
|
+
readonly description: "Emitted by the adapter after the destination has been displayed.";
|
|
763
|
+
readonly payloadFields: readonly [{
|
|
764
|
+
readonly path: "format";
|
|
765
|
+
readonly type: "string";
|
|
766
|
+
readonly label: "Format";
|
|
767
|
+
}, {
|
|
768
|
+
readonly path: "locator";
|
|
769
|
+
readonly type: "string";
|
|
770
|
+
readonly label: "Opaque locator";
|
|
771
|
+
}, {
|
|
772
|
+
readonly path: "page";
|
|
773
|
+
readonly type: "number";
|
|
774
|
+
readonly label: "Page";
|
|
775
|
+
}, {
|
|
776
|
+
readonly path: "pageCount";
|
|
777
|
+
readonly type: "number";
|
|
778
|
+
readonly label: "Page count";
|
|
779
|
+
}, {
|
|
780
|
+
readonly path: "progression";
|
|
781
|
+
readonly type: "number";
|
|
782
|
+
readonly label: "Progression";
|
|
783
|
+
}, {
|
|
784
|
+
readonly path: "chapterId";
|
|
785
|
+
readonly type: "string";
|
|
786
|
+
readonly label: "Chapter ID";
|
|
787
|
+
}, {
|
|
788
|
+
readonly path: "chapterTitle";
|
|
789
|
+
readonly type: "string";
|
|
790
|
+
readonly label: "Chapter title";
|
|
791
|
+
}, {
|
|
792
|
+
readonly path: "trigger";
|
|
793
|
+
readonly type: "string";
|
|
794
|
+
readonly label: "Navigation trigger";
|
|
795
|
+
}];
|
|
796
|
+
};
|
|
797
|
+
readonly openContents: {
|
|
798
|
+
readonly label: "Open contents";
|
|
799
|
+
readonly eventType: "reader.openContents";
|
|
800
|
+
readonly description: "Requests the app-owned table of contents.";
|
|
801
|
+
readonly payloadFields: readonly [];
|
|
802
|
+
};
|
|
803
|
+
readonly openAppearance: {
|
|
804
|
+
readonly label: "Open appearance";
|
|
805
|
+
readonly eventType: "reader.openAppearance";
|
|
806
|
+
readonly description: "Requests the app-owned reader appearance controls.";
|
|
807
|
+
readonly payloadFields: readonly [];
|
|
808
|
+
};
|
|
809
|
+
readonly toggleHighlight: {
|
|
810
|
+
readonly label: "Toggle highlight";
|
|
811
|
+
readonly eventType: "reader.toggleHighlight";
|
|
812
|
+
readonly description: "Requests the app-owned highlight action.";
|
|
813
|
+
readonly payloadFields: readonly [];
|
|
814
|
+
};
|
|
815
|
+
readonly openExternalLink: {
|
|
816
|
+
readonly label: "Open external link";
|
|
817
|
+
readonly eventType: "reader.openExternalLink";
|
|
818
|
+
readonly description: "Emitted when publication content requests an external URL.";
|
|
819
|
+
readonly payloadFields: readonly [{
|
|
820
|
+
readonly path: "url";
|
|
821
|
+
readonly type: "string";
|
|
822
|
+
readonly label: "URL";
|
|
823
|
+
}];
|
|
824
|
+
};
|
|
825
|
+
readonly readerError: {
|
|
826
|
+
readonly label: "Reader error";
|
|
827
|
+
readonly eventType: "reader.error";
|
|
828
|
+
readonly description: "Emitted when the adapter rejects or cannot load a document.";
|
|
829
|
+
readonly payloadFields: readonly [{
|
|
830
|
+
readonly path: "code";
|
|
831
|
+
readonly type: "string";
|
|
832
|
+
readonly label: "Error code";
|
|
833
|
+
}, {
|
|
834
|
+
readonly path: "format";
|
|
835
|
+
readonly type: "string";
|
|
836
|
+
readonly label: "Format";
|
|
837
|
+
}, {
|
|
838
|
+
readonly path: "message";
|
|
839
|
+
readonly type: "string";
|
|
840
|
+
readonly label: "Message";
|
|
841
|
+
}];
|
|
842
|
+
};
|
|
843
|
+
};
|
|
844
|
+
readonly slots: {
|
|
845
|
+
readonly viewport: {
|
|
846
|
+
readonly label: "Reader viewport adapter";
|
|
847
|
+
readonly allowedChildren: readonly [];
|
|
848
|
+
};
|
|
849
|
+
readonly headerActions: {
|
|
850
|
+
readonly label: "Header actions";
|
|
851
|
+
readonly allowedChildren: readonly ["Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Button", "ButtonGroup", "ThemeModeToggle", "Input", "Textarea", "FormField", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ReaderSurface"];
|
|
852
|
+
};
|
|
853
|
+
readonly footerActions: {
|
|
854
|
+
readonly label: "Footer actions";
|
|
855
|
+
readonly allowedChildren: readonly ["Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Button", "ButtonGroup", "ThemeModeToggle", "Input", "Textarea", "FormField", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ReaderSurface"];
|
|
856
|
+
};
|
|
857
|
+
};
|
|
858
|
+
readonly props: {
|
|
859
|
+
readonly source: {
|
|
860
|
+
readonly type: "media";
|
|
861
|
+
readonly category: "Document";
|
|
862
|
+
readonly label: "Source";
|
|
863
|
+
readonly mediaKinds: readonly ["file"];
|
|
864
|
+
};
|
|
865
|
+
readonly format: {
|
|
866
|
+
readonly type: "enum";
|
|
867
|
+
readonly category: "Document";
|
|
868
|
+
readonly label: "Format";
|
|
869
|
+
readonly enum: readonly ["epub", "pdf"];
|
|
870
|
+
readonly default: "epub";
|
|
871
|
+
};
|
|
872
|
+
readonly location: {
|
|
873
|
+
readonly type: "string";
|
|
874
|
+
readonly category: "State";
|
|
875
|
+
readonly label: "Location";
|
|
876
|
+
};
|
|
877
|
+
readonly status: {
|
|
878
|
+
readonly type: "enum";
|
|
879
|
+
readonly category: "State";
|
|
880
|
+
readonly label: "Status";
|
|
881
|
+
readonly enum: readonly ["idle", "loading", "ready", "error"];
|
|
882
|
+
readonly default: "idle";
|
|
883
|
+
};
|
|
884
|
+
readonly page: {
|
|
885
|
+
readonly type: "number";
|
|
886
|
+
readonly category: "State";
|
|
887
|
+
readonly label: "Page";
|
|
888
|
+
};
|
|
889
|
+
readonly pageCount: {
|
|
890
|
+
readonly type: "number";
|
|
891
|
+
readonly category: "State";
|
|
892
|
+
readonly label: "Page count";
|
|
893
|
+
};
|
|
894
|
+
readonly progress: {
|
|
895
|
+
readonly type: "number";
|
|
896
|
+
readonly category: "State";
|
|
897
|
+
readonly label: "Progress";
|
|
898
|
+
};
|
|
899
|
+
readonly canGoPrevious: {
|
|
900
|
+
readonly type: "boolean";
|
|
901
|
+
readonly category: "State";
|
|
902
|
+
readonly label: "Can go previous";
|
|
903
|
+
};
|
|
904
|
+
readonly canGoNext: {
|
|
905
|
+
readonly type: "boolean";
|
|
906
|
+
readonly category: "State";
|
|
907
|
+
readonly label: "Can go next";
|
|
908
|
+
};
|
|
909
|
+
readonly title: {
|
|
910
|
+
readonly type: "string";
|
|
911
|
+
readonly category: "Content";
|
|
912
|
+
readonly label: "Title";
|
|
913
|
+
};
|
|
914
|
+
readonly subtitle: {
|
|
915
|
+
readonly type: "string";
|
|
916
|
+
readonly category: "Content";
|
|
917
|
+
readonly label: "Subtitle";
|
|
918
|
+
};
|
|
919
|
+
readonly chapterLabel: {
|
|
920
|
+
readonly type: "string";
|
|
921
|
+
readonly category: "Content";
|
|
922
|
+
readonly label: "Chapter label";
|
|
923
|
+
};
|
|
924
|
+
readonly pageLabel: {
|
|
925
|
+
readonly type: "string";
|
|
926
|
+
readonly category: "Content";
|
|
927
|
+
readonly label: "Page label";
|
|
928
|
+
};
|
|
929
|
+
readonly previousPageLabel: {
|
|
930
|
+
readonly type: "string";
|
|
931
|
+
readonly category: "Content";
|
|
932
|
+
readonly label: "Previous page label";
|
|
933
|
+
readonly default: "Previous page";
|
|
934
|
+
};
|
|
935
|
+
readonly nextPageLabel: {
|
|
936
|
+
readonly type: "string";
|
|
937
|
+
readonly category: "Content";
|
|
938
|
+
readonly label: "Next page label";
|
|
939
|
+
readonly default: "Next page";
|
|
940
|
+
};
|
|
941
|
+
readonly contentsLabel: {
|
|
942
|
+
readonly type: "string";
|
|
943
|
+
readonly category: "Content";
|
|
944
|
+
readonly label: "Contents label";
|
|
945
|
+
readonly default: "Table of contents";
|
|
946
|
+
};
|
|
947
|
+
readonly appearanceLabel: {
|
|
948
|
+
readonly type: "string";
|
|
949
|
+
readonly category: "Content";
|
|
950
|
+
readonly label: "Appearance label";
|
|
951
|
+
readonly default: "Reading appearance";
|
|
952
|
+
};
|
|
953
|
+
readonly highlightLabel: {
|
|
954
|
+
readonly type: "string";
|
|
955
|
+
readonly category: "Content";
|
|
956
|
+
readonly label: "Highlight label";
|
|
957
|
+
readonly default: "Toggle highlight";
|
|
958
|
+
};
|
|
959
|
+
readonly loadingLabel: {
|
|
960
|
+
readonly type: "string";
|
|
961
|
+
readonly category: "Content";
|
|
962
|
+
readonly label: "Loading label";
|
|
963
|
+
readonly default: "Loading document…";
|
|
964
|
+
};
|
|
965
|
+
readonly errorTitle: {
|
|
966
|
+
readonly type: "string";
|
|
967
|
+
readonly category: "Content";
|
|
968
|
+
readonly label: "Error title";
|
|
969
|
+
readonly default: "Unable to open this document.";
|
|
970
|
+
};
|
|
971
|
+
readonly unavailableTitle: {
|
|
972
|
+
readonly type: "string";
|
|
973
|
+
readonly category: "Content";
|
|
974
|
+
readonly label: "Unavailable title";
|
|
975
|
+
readonly default: "Reader preview unavailable.";
|
|
976
|
+
};
|
|
977
|
+
readonly showChrome: {
|
|
978
|
+
readonly type: "boolean";
|
|
979
|
+
readonly category: "Chrome";
|
|
980
|
+
readonly label: "Show chrome";
|
|
981
|
+
readonly default: true;
|
|
982
|
+
};
|
|
983
|
+
readonly readerColorScheme: {
|
|
984
|
+
readonly type: "enum";
|
|
985
|
+
readonly category: "Appearance";
|
|
986
|
+
readonly label: "Color scheme";
|
|
987
|
+
readonly enum: readonly ["system", "light", "dark", "sepia"];
|
|
988
|
+
readonly default: "system";
|
|
989
|
+
};
|
|
990
|
+
readonly fontScale: {
|
|
991
|
+
readonly type: "number";
|
|
992
|
+
readonly category: "Appearance";
|
|
993
|
+
readonly label: "Font scale";
|
|
994
|
+
readonly default: 1;
|
|
995
|
+
};
|
|
996
|
+
readonly lineHeight: {
|
|
997
|
+
readonly type: "enum";
|
|
998
|
+
readonly category: "Appearance";
|
|
999
|
+
readonly label: "Line height";
|
|
1000
|
+
readonly enum: readonly ["compact", "normal", "relaxed"];
|
|
1001
|
+
readonly default: "normal";
|
|
1002
|
+
};
|
|
1003
|
+
readonly highlighted: {
|
|
1004
|
+
readonly type: "boolean";
|
|
1005
|
+
readonly category: "State";
|
|
1006
|
+
readonly label: "Highlighted";
|
|
1007
|
+
readonly default: false;
|
|
1008
|
+
};
|
|
1009
|
+
readonly onPreviousPage: {
|
|
1010
|
+
readonly type: "action";
|
|
1011
|
+
readonly category: "Events";
|
|
1012
|
+
readonly label: "Previous page action";
|
|
1013
|
+
};
|
|
1014
|
+
readonly onNextPage: {
|
|
1015
|
+
readonly type: "action";
|
|
1016
|
+
readonly category: "Events";
|
|
1017
|
+
readonly label: "Next page action";
|
|
1018
|
+
};
|
|
1019
|
+
readonly onLocationChange: {
|
|
1020
|
+
readonly type: "action";
|
|
1021
|
+
readonly category: "Events";
|
|
1022
|
+
readonly label: "Location change action";
|
|
1023
|
+
};
|
|
1024
|
+
readonly onOpenContents: {
|
|
1025
|
+
readonly type: "action";
|
|
1026
|
+
readonly category: "Events";
|
|
1027
|
+
readonly label: "Open contents action";
|
|
1028
|
+
};
|
|
1029
|
+
readonly onOpenAppearance: {
|
|
1030
|
+
readonly type: "action";
|
|
1031
|
+
readonly category: "Events";
|
|
1032
|
+
readonly label: "Open appearance action";
|
|
1033
|
+
};
|
|
1034
|
+
readonly onToggleHighlight: {
|
|
1035
|
+
readonly type: "action";
|
|
1036
|
+
readonly category: "Events";
|
|
1037
|
+
readonly label: "Toggle highlight action";
|
|
1038
|
+
};
|
|
1039
|
+
readonly onOpenExternalLink: {
|
|
1040
|
+
readonly type: "action";
|
|
1041
|
+
readonly category: "Events";
|
|
1042
|
+
readonly label: "Open external link action";
|
|
1043
|
+
};
|
|
1044
|
+
readonly onReaderError: {
|
|
1045
|
+
readonly type: "action";
|
|
1046
|
+
readonly category: "Events";
|
|
1047
|
+
readonly label: "Reader error action";
|
|
1048
|
+
};
|
|
1049
|
+
};
|
|
1050
|
+
};
|
|
566
1051
|
};
|
|
567
1052
|
export type ZoraBindableComponentType = keyof typeof ZORA_BINDABLE_COMPONENT_META;
|
|
568
1053
|
//# sourceMappingURL=bindableComponentMeta.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bindableComponentMeta.d.ts","sourceRoot":"","sources":["../../src/metadata/bindableComponentMeta.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bindableComponentMeta.d.ts","sourceRoot":"","sources":["../../src/metadata/bindableComponentMeta.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAijBG,CAAC;AAE7C,MAAM,MAAM,yBAAyB,GAAG,MAAM,OAAO,4BAA4B,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { imageMeta } from '../components/image/meta';
|
|
2
|
+
import { readerSurfaceMeta } from '../patterns/reader/meta';
|
|
2
3
|
export const ZORA_BINDABLE_COMPONENT_META = {
|
|
3
4
|
Text: {
|
|
4
5
|
name: 'Text',
|
|
@@ -459,5 +460,106 @@ export const ZORA_BINDABLE_COMPONENT_META = {
|
|
|
459
460
|
},
|
|
460
461
|
},
|
|
461
462
|
},
|
|
463
|
+
ReaderSurface: {
|
|
464
|
+
...readerSurfaceMeta,
|
|
465
|
+
bindings: {
|
|
466
|
+
props: {
|
|
467
|
+
location: {
|
|
468
|
+
label: 'Location',
|
|
469
|
+
description: 'Opaque adapter locator to restore.',
|
|
470
|
+
value: { type: 'string' },
|
|
471
|
+
acceptsFallback: true,
|
|
472
|
+
acceptsTransforms: true,
|
|
473
|
+
},
|
|
474
|
+
page: {
|
|
475
|
+
label: 'Page',
|
|
476
|
+
description: 'One-based visible page.',
|
|
477
|
+
value: { type: 'number' },
|
|
478
|
+
acceptsFallback: true,
|
|
479
|
+
acceptsTransforms: true,
|
|
480
|
+
},
|
|
481
|
+
pageCount: {
|
|
482
|
+
label: 'Page count',
|
|
483
|
+
description: 'Current number of logical pages.',
|
|
484
|
+
value: { type: 'number' },
|
|
485
|
+
acceptsFallback: true,
|
|
486
|
+
acceptsTransforms: true,
|
|
487
|
+
},
|
|
488
|
+
progress: {
|
|
489
|
+
label: 'Progress',
|
|
490
|
+
description: 'Reading progression clamped from zero to one.',
|
|
491
|
+
value: { type: 'number' },
|
|
492
|
+
acceptsFallback: true,
|
|
493
|
+
acceptsTransforms: true,
|
|
494
|
+
},
|
|
495
|
+
status: {
|
|
496
|
+
label: 'Status',
|
|
497
|
+
description: 'Current reader loading status.',
|
|
498
|
+
value: { type: 'string' },
|
|
499
|
+
acceptsFallback: true,
|
|
500
|
+
acceptsTransforms: true,
|
|
501
|
+
},
|
|
502
|
+
},
|
|
503
|
+
events: {
|
|
504
|
+
previousPage: {
|
|
505
|
+
label: 'Previous page',
|
|
506
|
+
description: 'Requests navigation to the previous page.',
|
|
507
|
+
payload: { eventType: 'reader.previousPage', fields: [] },
|
|
508
|
+
},
|
|
509
|
+
nextPage: {
|
|
510
|
+
label: 'Next page',
|
|
511
|
+
description: 'Requests navigation to the next page.',
|
|
512
|
+
payload: { eventType: 'reader.nextPage', fields: [] },
|
|
513
|
+
},
|
|
514
|
+
locationChange: {
|
|
515
|
+
label: 'Location change',
|
|
516
|
+
description: 'Runs after the adapter displays a destination.',
|
|
517
|
+
payload: {
|
|
518
|
+
eventType: 'reader.locationChange',
|
|
519
|
+
fields: [
|
|
520
|
+
{ path: 'format', type: 'string', label: 'Format' },
|
|
521
|
+
{ path: 'locator', type: 'string', label: 'Opaque locator' },
|
|
522
|
+
{ path: 'page', type: 'number', label: 'Page' },
|
|
523
|
+
{ path: 'pageCount', type: 'number', label: 'Page count' },
|
|
524
|
+
{ path: 'progression', type: 'number', label: 'Progression' },
|
|
525
|
+
{ path: 'chapterId', type: 'string', label: 'Chapter ID' },
|
|
526
|
+
{ path: 'chapterTitle', type: 'string', label: 'Chapter title' },
|
|
527
|
+
{ path: 'trigger', type: 'string', label: 'Navigation trigger' },
|
|
528
|
+
],
|
|
529
|
+
},
|
|
530
|
+
},
|
|
531
|
+
openContents: {
|
|
532
|
+
label: 'Open contents',
|
|
533
|
+
payload: { eventType: 'reader.openContents', fields: [] },
|
|
534
|
+
},
|
|
535
|
+
openAppearance: {
|
|
536
|
+
label: 'Open appearance',
|
|
537
|
+
payload: { eventType: 'reader.openAppearance', fields: [] },
|
|
538
|
+
},
|
|
539
|
+
toggleHighlight: {
|
|
540
|
+
label: 'Toggle highlight',
|
|
541
|
+
payload: { eventType: 'reader.toggleHighlight', fields: [] },
|
|
542
|
+
},
|
|
543
|
+
openExternalLink: {
|
|
544
|
+
label: 'Open external link',
|
|
545
|
+
payload: {
|
|
546
|
+
eventType: 'reader.openExternalLink',
|
|
547
|
+
fields: [{ path: 'url', type: 'string', label: 'URL' }],
|
|
548
|
+
},
|
|
549
|
+
},
|
|
550
|
+
readerError: {
|
|
551
|
+
label: 'Reader error',
|
|
552
|
+
payload: {
|
|
553
|
+
eventType: 'reader.error',
|
|
554
|
+
fields: [
|
|
555
|
+
{ path: 'code', type: 'string', label: 'Error code' },
|
|
556
|
+
{ path: 'format', type: 'string', label: 'Format' },
|
|
557
|
+
{ path: 'message', type: 'string', label: 'Message' },
|
|
558
|
+
],
|
|
559
|
+
},
|
|
560
|
+
},
|
|
561
|
+
},
|
|
562
|
+
},
|
|
563
|
+
},
|
|
462
564
|
};
|
|
463
565
|
//# sourceMappingURL=bindableComponentMeta.js.map
|