@ankhorage/zora 27.7.1 → 27.9.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/CHANGELOG.md +12 -0
- package/README.md +2 -2
- package/dist/capabilities/index.js +50 -1
- package/dist/capabilities/index.js.map +6 -5
- package/dist/constants/authoring.d.ts +4 -3
- package/dist/constants/authoring.d.ts.map +1 -1
- package/dist/constants/authoring.js +2 -0
- package/dist/constants/authoring.js.map +1 -1
- package/dist/features/accordion/accordionItemMeta.d.ts +1 -1
- package/dist/features/bottom-sheet/bottomSheetMeta.d.ts +1 -1
- package/dist/features/card/cardMeta.d.ts +1 -1
- package/dist/features/card/mediaCardMeta.d.ts +1 -1
- package/dist/features/card/postCardMeta.d.ts +1 -1
- package/dist/features/carousel/Carousel.d.ts +8 -0
- package/dist/features/carousel/Carousel.d.ts.map +1 -0
- package/dist/features/carousel/Carousel.js +203 -0
- package/dist/features/carousel/Carousel.js.map +1 -0
- package/dist/features/carousel/public.d.ts +3 -0
- package/dist/features/carousel/public.d.ts.map +1 -0
- package/dist/features/carousel/public.js +2 -0
- package/dist/features/carousel/public.js.map +1 -0
- package/dist/features/carousel/useCarouselPlayback.d.ts +15 -0
- package/dist/features/carousel/useCarouselPlayback.d.ts.map +1 -0
- package/dist/features/carousel/useCarouselPlayback.js +74 -0
- package/dist/features/carousel/useCarouselPlayback.js.map +1 -0
- package/dist/features/chat/messageBubbleMeta.d.ts +1 -1
- package/dist/features/dialog/dialogMeta.d.ts +2 -2
- package/dist/features/gradient/gradientMeta.d.ts +1 -1
- package/dist/features/keyboard-avoiding-view/keyboardAvoidingViewMeta.d.ts +1 -1
- package/dist/features/layout/adapters/inbound/Screen.d.ts.map +1 -1
- package/dist/features/layout/adapters/inbound/Screen.js +1 -1
- package/dist/features/layout/adapters/inbound/Screen.js.map +1 -1
- package/dist/features/layout/gridMeta.d.ts +1 -1
- package/dist/features/layout/screenMeta.d.ts +1 -1
- package/dist/features/layout/scrollViewMeta.d.ts +1 -1
- package/dist/features/layout/viewMeta.d.ts +1 -1
- package/dist/features/list/flatListMeta.d.ts +1 -1
- package/dist/features/list/sectionListMeta.d.ts +1 -1
- package/dist/features/master-detail/adapters/inbound/MasterDetail.d.ts +5 -0
- package/dist/features/master-detail/adapters/inbound/MasterDetail.d.ts.map +1 -0
- package/dist/features/master-detail/adapters/inbound/MasterDetail.js +39 -0
- package/dist/features/master-detail/adapters/inbound/MasterDetail.js.map +1 -0
- package/dist/features/master-detail/application/resolveMasterDetailPresentation.d.ts +6 -0
- package/dist/features/master-detail/application/resolveMasterDetailPresentation.d.ts.map +1 -0
- package/dist/features/master-detail/application/resolveMasterDetailPresentation.js +7 -0
- package/dist/features/master-detail/application/resolveMasterDetailPresentation.js.map +1 -0
- package/dist/features/master-detail/masterDetailMeta.d.ts +52 -0
- package/dist/features/master-detail/masterDetailMeta.d.ts.map +1 -0
- package/dist/features/master-detail/masterDetailMeta.js +47 -0
- package/dist/features/master-detail/masterDetailMeta.js.map +1 -0
- package/dist/features/master-detail/public.d.ts +3 -0
- package/dist/features/master-detail/public.d.ts.map +1 -0
- package/dist/features/master-detail/public.js +2 -0
- package/dist/features/master-detail/public.js.map +1 -0
- package/dist/features/reader/meta.d.ts +2 -2
- package/dist/features/registry/ZORA_BASE_COMPONENT_REGISTRY.d.ts.map +1 -1
- package/dist/features/registry/ZORA_BASE_COMPONENT_REGISTRY.js +2 -0
- package/dist/features/registry/ZORA_BASE_COMPONENT_REGISTRY.js.map +1 -1
- package/dist/features/registry/bindableComponentMeta.d.ts +2 -2
- package/dist/features/registry/componentMeta.d.ts.map +1 -1
- package/dist/features/registry/componentMeta.js +2 -0
- package/dist/features/registry/componentMeta.js.map +1 -1
- package/dist/features/scanner/meta.d.ts +2 -2
- package/dist/features/section/screenSectionMeta.d.ts +1 -1
- package/dist/features/surface/surfaceMeta.d.ts +1 -1
- package/dist/features/tabs/tabPanelMeta.d.ts +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/readerFree.d.ts +2 -0
- package/dist/readerFree.d.ts.map +1 -1
- package/dist/readerFree.js +1 -0
- package/dist/readerFree.js.map +1 -1
- package/dist/types/carousel.d.ts +52 -0
- package/dist/types/carousel.d.ts.map +1 -0
- package/dist/types/carousel.js +2 -0
- package/dist/types/carousel.js.map +1 -0
- package/dist/types/master-detail.d.ts +21 -0
- package/dist/types/master-detail.d.ts.map +1 -0
- package/dist/types/master-detail.js +2 -0
- package/dist/types/master-detail.js.map +1 -0
- package/package.json +1 -1
- package/src/constants/authoring.ts +2 -0
- package/src/features/carousel/Carousel.test.ts +66 -0
- package/src/features/carousel/Carousel.tsx +470 -0
- package/src/features/carousel/public.ts +2 -0
- package/src/features/carousel/useCarouselPlayback.ts +103 -0
- package/src/features/layout/adapters/inbound/Screen.tsx +3 -0
- package/src/features/master-detail/adapters/inbound/MasterDetail.runtime.test.tsx +121 -0
- package/src/features/master-detail/adapters/inbound/MasterDetail.tsx +75 -0
- package/src/features/master-detail/application/resolveMasterDetailPresentation.test.ts +18 -0
- package/src/features/master-detail/application/resolveMasterDetailPresentation.ts +15 -0
- package/src/features/master-detail/masterDetailMeta.ts +49 -0
- package/src/features/master-detail/public.ts +7 -0
- package/src/features/registry/ZORA_BASE_COMPONENT_REGISTRY.ts +2 -0
- package/src/features/registry/componentMeta.test.ts +16 -0
- package/src/features/registry/componentMeta.ts +2 -0
- package/src/features/registry/featureManifest.test.ts +2 -0
- package/src/index.ts +9 -0
- package/src/readerFree.ts +7 -0
- package/src/types/carousel.ts +60 -0
- package/src/types/master-detail.ts +25 -0
- package/web-dist/chunks/{Accordion-p2f0e4pn.js → Accordion-0bgzetnd.js} +6 -6
- package/web-dist/chunks/{Accordion-wvghkwxx.js → Accordion-0yn2b3ha.js} +9 -9
- package/web-dist/chunks/{Accordion-9d3rd7ne.js → Accordion-19zt3dyq.js} +1 -1
- package/web-dist/chunks/{Accordion-sxzts6bj.js → Accordion-1k7pyxdd.js} +2 -2
- package/web-dist/chunks/{Accordion-ew2cebyd.js → Accordion-1mjn0atk.js} +4 -4
- package/web-dist/chunks/{Accordion-ms1y70gq.js → Accordion-6qesggn9.js} +4 -4
- package/web-dist/chunks/{Accordion-e8dg1z2s.js → Accordion-6y42ws4p.js} +2 -2
- package/web-dist/chunks/{Accordion-jh94mg56.js → Accordion-70hh6g1f.js} +9 -9
- package/web-dist/chunks/{Accordion-wx0jp5cn.js → Accordion-7qb7741m.js} +7 -7
- package/web-dist/chunks/{Accordion-rwc34cn2.js → Accordion-818avkay.js} +5 -5
- package/web-dist/chunks/{Accordion-t2cvrn0r.js → Accordion-8ahdjt13.js} +8 -8
- package/web-dist/chunks/{Accordion-j6bs1yfn.js → Accordion-8vw4k0s6.js} +2 -2
- package/web-dist/chunks/{Accordion-m3xb7z7j.js → Accordion-8y13469y.js} +8 -8
- package/web-dist/chunks/{Accordion-4kmh6s2k.js → Accordion-91v243pz.js} +2 -2
- package/web-dist/chunks/{Accordion-8vcs6nz6.js → Accordion-9cpm8x92.js} +1 -1
- package/web-dist/chunks/{Accordion-vq8zrnwh.js → Accordion-9kkfz7s8.js} +4 -4
- package/web-dist/chunks/{Accordion-6jsea4e0.js → Accordion-ajgffs75.js} +8 -8
- package/web-dist/chunks/{Accordion-hf4nfkn0.js → Accordion-bednnpzh.js} +13 -13
- package/web-dist/chunks/{Accordion-c44m1q0m.js → Accordion-ctcxh9pk.js} +3 -3
- package/web-dist/chunks/{Accordion-fbehwpr1.js → Accordion-dnfrzbpb.js} +7 -7
- package/web-dist/chunks/{Accordion-f2n2zz1x.js → Accordion-ea0ag7wf.js} +6 -6
- package/web-dist/chunks/{Accordion-260pyaxy.js → Accordion-g45xga4b.js} +5 -5
- package/web-dist/chunks/{Accordion-yb4as6wc.js → Accordion-gjeaevge.js} +5 -5
- package/web-dist/chunks/{Accordion-7788ybcs.js → Accordion-grtf75xt.js} +4 -4
- package/web-dist/chunks/{Accordion-9hcbf56f.js → Accordion-h4928ex8.js} +2 -2
- package/web-dist/chunks/{Accordion-mrhkw8n6.js → Accordion-hqg1zbxk.js} +6 -4
- package/web-dist/chunks/{Accordion-gysa24fk.js → Accordion-j5wsx41j.js} +1 -1
- package/web-dist/chunks/{Accordion-yrzm02g2.js → Accordion-jmhn8mm5.js} +5 -5
- package/web-dist/chunks/{Accordion-252dr90x.js → Accordion-jsapannb.js} +4 -4
- package/web-dist/chunks/{Accordion-b4yr6yq3.js → Accordion-jsdjgfn2.js} +2 -2
- package/web-dist/chunks/{Accordion-8ac6dkcs.js → Accordion-k058095e.js} +1 -1
- package/web-dist/chunks/Accordion-kcx57mk5.js +39 -0
- package/web-dist/chunks/{Accordion-5z8pbn4z.js → Accordion-nbje2ywp.js} +3 -3
- package/web-dist/chunks/{Accordion-tpd1vvy9.js → Accordion-ng79nxzz.js} +1 -38
- package/web-dist/chunks/{Accordion-7mnan4q4.js → Accordion-qw6tzn3f.js} +6 -6
- package/web-dist/chunks/{Accordion-w0prbwy0.js → Accordion-qx45gtx9.js} +8 -8
- package/web-dist/chunks/{Accordion-rcs75kj4.js → Accordion-r6gwemh9.js} +3 -3
- package/web-dist/chunks/{Accordion-s9nbkzky.js → Accordion-rt4jfq2r.js} +2 -2
- package/web-dist/chunks/{Accordion-r86ce0wj.js → Accordion-t11cptjk.js} +4 -4
- package/web-dist/chunks/{Accordion-jx9tc6p1.js → Accordion-th8pkeqc.js} +4 -4
- package/web-dist/chunks/{Accordion-tnt1txfq.js → Accordion-tkxddb2c.js} +4 -4
- package/web-dist/chunks/{Accordion-5pbvgvqc.js → Accordion-tnq8bt8v.js} +2 -2
- package/web-dist/chunks/{Accordion-nnhznqgf.js → Accordion-ttjyk97v.js} +2 -2
- package/web-dist/chunks/{Accordion-r6zvzrkd.js → Accordion-v21vz0cg.js} +7 -4
- package/web-dist/chunks/{Accordion-0j4xzcwz.js → Accordion-vdqc8rxv.js} +3 -3
- package/web-dist/chunks/{Accordion-a8k3cvj0.js → Accordion-w1ag7sr4.js} +2 -2
- package/web-dist/chunks/{Accordion-vzgpdtr2.js → Accordion-wdby2v5r.js} +1 -1
- package/web-dist/chunks/{Accordion-zj4wnm3e.js → Accordion-wgc67k1g.js} +1 -1
- package/web-dist/chunks/{Accordion-p7mxkxhs.js → Accordion-x3em7tpd.js} +9 -9
- package/web-dist/chunks/{Accordion-mpebzjby.js → Accordion-xb2nj0q6.js} +4 -4
- package/web-dist/chunks/{Accordion-001ymezm.js → Accordion-y524ph0g.js} +1 -1
- package/web-dist/chunks/{Accordion-np16p9mh.js → Accordion-zexve9d3.js} +4 -4
- package/web-dist/chunks/{Accordion-4c7hqeg3.js → Accordion-zvpkhqb7.js} +2 -2
- package/web-dist/chunks/{Accordion-kcca65d8.js → Accordion-zxergnck.js} +5 -5
- package/web-dist/chunks/{Accordion-hh48jjhk.js → Accordion-zyah4pvq.js} +7 -7
- package/web-dist/chunks/{Accordion-8j7t77tf.js → Accordion-zymf1mp8.js} +5 -5
- package/web-dist/components/accordion/Accordion.js +12 -11
- package/web-dist/components/accordion-item/AccordionItem.js +12 -11
- package/web-dist/components/activity-indicator/ActivityIndicator.js +4 -3
- package/web-dist/components/app-bar/AppBar.js +18 -17
- package/web-dist/components/app-header/AppHeader.js +18 -17
- package/web-dist/components/app-shell/AppShell.js +6 -5
- package/web-dist/components/auth-screen/AuthScreen.js +23 -22
- package/web-dist/components/avatar/Avatar.js +12 -11
- package/web-dist/components/avatar-group/AvatarGroup.js +12 -11
- package/web-dist/components/badge/Badge.js +7 -6
- package/web-dist/components/barcode-scanner-view/BarcodeScannerView.js +21 -20
- package/web-dist/components/bottom-sheet/BottomSheet.js +8 -7
- package/web-dist/components/bottom-sheet-flat-list/BottomSheetFlatList.js +8 -7
- package/web-dist/components/bottom-sheet-scroll-view/BottomSheetScrollView.js +8 -7
- package/web-dist/components/bottom-sheet-section-list/BottomSheetSectionList.js +8 -7
- package/web-dist/components/bottom-sheet-view/BottomSheetView.js +8 -7
- package/web-dist/components/bottom-sheet-virtualized-list/BottomSheetVirtualizedList.js +8 -7
- package/web-dist/components/breadcrumbs/Breadcrumbs.js +15 -14
- package/web-dist/components/button/Button.js +13 -12
- package/web-dist/components/button-group/ButtonGroup.js +13 -12
- package/web-dist/components/calendar/Calendar.js +15 -14
- package/web-dist/components/camera-permission-view/CameraPermissionView.js +21 -20
- package/web-dist/components/card/Card.js +20 -19
- package/web-dist/components/card-back/CardBack.js +5 -4
- package/web-dist/components/card-hand/CardHand.js +5 -4
- package/web-dist/components/carousel/Carousel.d.ts +10 -0
- package/web-dist/components/carousel/Carousel.js +483 -0
- package/web-dist/components/carousel/Carousel.types-0.d.ts +55 -0
- package/web-dist/components/carousel/index.d.ts +2 -0
- package/web-dist/components/carousel/index.js +2 -0
- package/web-dist/components/chat-list-item/ChatListItem.js +16 -15
- package/web-dist/components/checkbox/Checkbox.js +12 -11
- package/web-dist/components/checkbox-group/CheckboxGroup.js +12 -11
- package/web-dist/components/chess-board/ChessBoard.js +5 -4
- package/web-dist/components/chip/Chip.js +13 -12
- package/web-dist/components/chip-group/ChipGroup.js +13 -12
- package/web-dist/components/collection-editor/CollectionEditor.js +20 -19
- package/web-dist/components/color-hue-scale/ColorHueScale.js +16 -15
- package/web-dist/components/color-picker/ColorPicker.js +16 -15
- package/web-dist/components/color-tone/ColorTone.js +16 -15
- package/web-dist/components/color-wheel/ColorWheel.js +16 -15
- package/web-dist/components/content-rail/ContentRail.js +14 -13
- package/web-dist/components/data-table/DataTable.js +26 -25
- package/web-dist/components/date-picker/DatePicker.js +19 -18
- package/web-dist/components/dialog/Dialog.js +11 -10
- package/web-dist/components/divider/Divider.js +6 -5
- package/web-dist/components/empty-state/EmptyState.js +21 -20
- package/web-dist/components/explorer/Explorer.js +13 -12
- package/web-dist/components/field/Field.js +12 -11
- package/web-dist/components/file-explorer/FileExplorer.js +13 -12
- package/web-dist/components/flat-list/FlatList.js +13 -12
- package/web-dist/components/forgot-password-form/ForgotPasswordForm.js +23 -22
- package/web-dist/components/form/Form.js +17 -16
- package/web-dist/components/form-actions/FormActions.js +17 -16
- package/web-dist/components/form-error/FormError.js +17 -16
- package/web-dist/components/game/Game.js +7 -6
- package/web-dist/components/game-entity/GameEntity.js +7 -6
- package/web-dist/components/game-field/GameField.js +7 -6
- package/web-dist/components/game-input-zone/GameInputZone.js +7 -6
- package/web-dist/components/game-measurement-probe/GameMeasurementProbe.js +7 -6
- package/web-dist/components/game-overlay/GameOverlay.js +7 -6
- package/web-dist/components/gradient/Gradient.js +7 -6
- package/web-dist/components/gradient-renderer-provider/GradientRendererProvider.js +7 -6
- package/web-dist/components/grid/Grid.js +6 -5
- package/web-dist/components/grid-line-overlay/GridLineOverlay.js +5 -4
- package/web-dist/components/grid-ruler/GridRuler.js +5 -4
- package/web-dist/components/heading/Heading.js +7 -6
- package/web-dist/components/hero/Hero.js +20 -19
- package/web-dist/components/icon/Icon.js +5 -4
- package/web-dist/components/icon-button/IconButton.js +13 -12
- package/web-dist/components/image/Image.js +10 -9
- package/web-dist/components/keyboard-avoiding-view/KeyboardAvoidingView.js +4 -3
- package/web-dist/components/list/List.js +13 -12
- package/web-dist/components/list-item/ListItem.js +13 -12
- package/web-dist/components/list-section/ListSection.js +13 -12
- package/web-dist/components/master-detail/MasterDetail.d.ts +7 -0
- package/web-dist/components/master-detail/MasterDetail.dependency-0.d.ts +27 -0
- package/web-dist/components/master-detail/MasterDetail.dependency-1.d.ts +3 -0
- package/web-dist/components/master-detail/MasterDetail.js +110 -0
- package/web-dist/components/master-detail/MasterDetail.types-0.d.ts +25 -0
- package/web-dist/components/master-detail/index.d.ts +2 -0
- package/web-dist/components/master-detail/index.js +2 -0
- package/web-dist/components/matrix-grid/MatrixGrid.js +5 -4
- package/web-dist/components/media-card/MediaCard.js +20 -19
- package/web-dist/components/media-explorer/MediaExplorer.js +13 -12
- package/web-dist/components/message-bubble/MessageBubble.js +16 -15
- package/web-dist/components/metric-card/MetricCard.js +20 -19
- package/web-dist/components/missing-element/MissingElement.js +11 -10
- package/web-dist/components/o-auth-provider-button/OAuthProviderButton.js +23 -22
- package/web-dist/components/o-auth-provider-list/OAuthProviderList.js +23 -22
- package/web-dist/components/opening-book/OpeningBook.js +5 -4
- package/web-dist/components/otp-form/OtpForm.js +23 -22
- package/web-dist/components/pagination/Pagination.js +14 -13
- package/web-dist/components/palette-item/PaletteItem.js +20 -19
- package/web-dist/components/playing-card/PlayingCard.js +5 -4
- package/web-dist/components/poker-training-table/PokerTrainingTable.js +5 -4
- package/web-dist/components/popover-menu/PopoverMenu.js +12 -11
- package/web-dist/components/post-card/PostCard.js +20 -19
- package/web-dist/components/product-card/ProductCard.js +20 -19
- package/web-dist/components/progress/Progress.js +10 -9
- package/web-dist/components/progress-ring/ProgressRing.js +10 -9
- package/web-dist/components/radio/Radio.js +14 -13
- package/web-dist/components/radio-group/RadioGroup.js +14 -13
- package/web-dist/components/rating/Rating.js +9 -8
- package/web-dist/components/reader/Reader.js +21 -20
- package/web-dist/components/scan-overlay/ScanOverlay.js +21 -20
- package/web-dist/components/screen/Screen.js +6 -5
- package/web-dist/components/screen-section/ScreenSection.js +10 -9
- package/web-dist/components/scroll-view/ScrollView.js +6 -5
- package/web-dist/components/search-input/SearchInput.js +15 -14
- package/web-dist/components/section-header/SectionHeader.js +10 -9
- package/web-dist/components/section-list/SectionList.js +13 -12
- package/web-dist/components/select/Select.js +16 -15
- package/web-dist/components/selectable-item/SelectableItem.js +4 -3
- package/web-dist/components/selection-provider/SelectionProvider.js +4 -3
- package/web-dist/components/sign-in-form/SignInForm.js +23 -22
- package/web-dist/components/sign-up-form/SignUpForm.js +23 -22
- package/web-dist/components/skeleton/Skeleton.js +23 -22
- package/web-dist/components/skeleton-card/SkeletonCard.js +23 -22
- package/web-dist/components/skeleton-list/SkeletonList.js +23 -22
- package/web-dist/components/skeleton-text/SkeletonText.js +23 -22
- package/web-dist/components/surface/Surface.js +7 -6
- package/web-dist/components/switch/Switch.js +7 -6
- package/web-dist/components/tab/Tab.js +7 -6
- package/web-dist/components/tab-list/TabList.js +7 -6
- package/web-dist/components/tab-panel/TabPanel.js +7 -6
- package/web-dist/components/tabletop-table/TabletopTable.js +5 -4
- package/web-dist/components/tabs/Tabs.js +7 -6
- package/web-dist/components/text/Text.js +7 -6
- package/web-dist/components/text-input/TextInput.js +15 -14
- package/web-dist/components/theme-mode-toggle/ThemeModeToggle.js +13 -12
- package/web-dist/components/time-picker/TimePicker.js +18 -17
- package/web-dist/components/timeline/Timeline.js +12 -11
- package/web-dist/components/toast/Toast.js +9 -8
- package/web-dist/components/toast-provider/ToastProvider.js +9 -8
- package/web-dist/components/toolbar/Toolbar.js +20 -19
- package/web-dist/components/tree-item/TreeItem.js +18 -17
- package/web-dist/components/uploader/Uploader.js +23 -22
- package/web-dist/components/view/View.js +6 -5
- package/web-dist/manifest.json +1787 -1617
- package/web-dist/runtime/ZoraProvider.js +12 -10
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import type { UiNode } from '@ankhorage/contracts';
|
|
2
|
+
import { expect, mock, test } from 'bun:test';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { renderToStaticMarkup } from 'react-dom/server';
|
|
5
|
+
|
|
6
|
+
const runtimeEnvironment: { breakpoint: 'base' | 'md' } = { breakpoint: 'md' };
|
|
7
|
+
|
|
8
|
+
await mock.module('@ankhorage/surface', () => ({
|
|
9
|
+
Divider: () => <hr />,
|
|
10
|
+
Grid: ({ children }: React.PropsWithChildren) => <div>{children}</div>,
|
|
11
|
+
ScrollView: ({
|
|
12
|
+
children,
|
|
13
|
+
flex,
|
|
14
|
+
minHeight,
|
|
15
|
+
testID,
|
|
16
|
+
}: React.PropsWithChildren<{
|
|
17
|
+
readonly flex?: number;
|
|
18
|
+
readonly minHeight?: number;
|
|
19
|
+
readonly testID?: string;
|
|
20
|
+
}>) => (
|
|
21
|
+
<div data-flex={flex} data-min-height={minHeight} data-scroll={testID}>
|
|
22
|
+
{children}
|
|
23
|
+
</div>
|
|
24
|
+
),
|
|
25
|
+
ThemeScope: ({ children }: React.PropsWithChildren) => children,
|
|
26
|
+
View: ({
|
|
27
|
+
children,
|
|
28
|
+
flex,
|
|
29
|
+
minHeight,
|
|
30
|
+
minWidth,
|
|
31
|
+
testID,
|
|
32
|
+
}: React.PropsWithChildren<{
|
|
33
|
+
readonly flex?: number;
|
|
34
|
+
readonly minHeight?: number;
|
|
35
|
+
readonly minWidth?: number;
|
|
36
|
+
readonly testID?: string;
|
|
37
|
+
}>) => (
|
|
38
|
+
<div data-flex={flex} data-min-height={minHeight} data-min-width={minWidth} data-view={testID}>
|
|
39
|
+
{children}
|
|
40
|
+
</div>
|
|
41
|
+
),
|
|
42
|
+
useBreakpoint: () => runtimeEnvironment.breakpoint,
|
|
43
|
+
}));
|
|
44
|
+
|
|
45
|
+
await mock.module('react-native', () => ({
|
|
46
|
+
StyleSheet: { create: <T,>(styles: T) => styles },
|
|
47
|
+
Text: ({ children }: React.PropsWithChildren) => <span>{children}</span>,
|
|
48
|
+
View: ({ children }: React.PropsWithChildren) => <div>{children}</div>,
|
|
49
|
+
}));
|
|
50
|
+
|
|
51
|
+
const [{ RuntimeRenderer }, { MasterDetail }, { Screen }] = await Promise.all([
|
|
52
|
+
import('@ankhorage/runtime'),
|
|
53
|
+
import('./MasterDetail'),
|
|
54
|
+
import('../../../layout/adapters/inbound/Screen'),
|
|
55
|
+
]);
|
|
56
|
+
|
|
57
|
+
const workspaceNode = {
|
|
58
|
+
id: 'screen',
|
|
59
|
+
type: 'Screen',
|
|
60
|
+
props: { scroll: false, testID: 'screen' },
|
|
61
|
+
children: [
|
|
62
|
+
{
|
|
63
|
+
id: 'workspace',
|
|
64
|
+
type: 'MasterDetail',
|
|
65
|
+
props: { activePane: 'master', masterWidth: 30, testID: 'workspace' },
|
|
66
|
+
children: [
|
|
67
|
+
{ id: 'master', type: 'Text', props: { children: 'Master content' } },
|
|
68
|
+
{ id: 'detail', type: 'Text', props: { children: 'Detail content' } },
|
|
69
|
+
],
|
|
70
|
+
},
|
|
71
|
+
],
|
|
72
|
+
} as const satisfies UiNode;
|
|
73
|
+
|
|
74
|
+
/*** Renders the serializable Runtime UiNode through the ZORA presentation boundary. */
|
|
75
|
+
function renderWorkspace(node: UiNode): string {
|
|
76
|
+
return renderToStaticMarkup(
|
|
77
|
+
<RuntimeRenderer
|
|
78
|
+
isRoot
|
|
79
|
+
node={node}
|
|
80
|
+
registry={{
|
|
81
|
+
MasterDetail,
|
|
82
|
+
Screen,
|
|
83
|
+
Text: ({ children }: React.PropsWithChildren) => <span>{children}</span>,
|
|
84
|
+
}}
|
|
85
|
+
/>,
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
test('renders both serializable MasterDetail children through RuntimeRenderer in a bounded 30/70 Screen', () => {
|
|
90
|
+
runtimeEnvironment.breakpoint = 'md';
|
|
91
|
+
const markup = renderWorkspace(workspaceNode);
|
|
92
|
+
|
|
93
|
+
expect(markup).toContain('Master content');
|
|
94
|
+
expect(markup).toContain('Detail content');
|
|
95
|
+
expect(markup).toContain('data-flex="30"');
|
|
96
|
+
expect(markup).toContain('data-flex="70"');
|
|
97
|
+
expect(markup).toContain('data-scroll="workspace-master"');
|
|
98
|
+
expect(markup).toContain('data-scroll="workspace-detail"');
|
|
99
|
+
expect(markup.match(/data-scroll=/gu)).toHaveLength(2);
|
|
100
|
+
expect(markup).toContain('data-min-height="0"');
|
|
101
|
+
expect(markup).toContain('data-view="screen"');
|
|
102
|
+
expect(markup).toContain('data-min-width="0"');
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
test('projects the same Runtime children through host-owned compact pane state', () => {
|
|
106
|
+
runtimeEnvironment.breakpoint = 'base';
|
|
107
|
+
const markup = renderWorkspace({
|
|
108
|
+
...workspaceNode,
|
|
109
|
+
children: [
|
|
110
|
+
{
|
|
111
|
+
...workspaceNode.children[0],
|
|
112
|
+
props: { ...workspaceNode.children[0].props, activePane: 'detail' },
|
|
113
|
+
},
|
|
114
|
+
],
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
expect(markup).not.toContain('Master content');
|
|
118
|
+
expect(markup).toContain('Detail content');
|
|
119
|
+
expect(markup).toContain('data-scroll="workspace-detail"');
|
|
120
|
+
expect(markup).not.toContain('data-scroll="workspace-master"');
|
|
121
|
+
});
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { useBreakpoint } from '@ankhorage/surface';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
import type { MasterDetailProps } from '../../../../types/master-detail';
|
|
5
|
+
import { ScrollView, View } from '../../../layout/public';
|
|
6
|
+
import { withZoraThemeScope } from '../../../theme/adapters/inbound/withZoraThemeScope';
|
|
7
|
+
import { resolveMasterDetailPresentation } from '../../application/resolveMasterDetailPresentation';
|
|
8
|
+
|
|
9
|
+
/** Renders responsive master and detail panes while leaving route transitions to the host. */
|
|
10
|
+
export const MasterDetail = withZoraThemeScope(MasterDetailInner);
|
|
11
|
+
|
|
12
|
+
/*** Projects the first two children into a desktop split or one compact route pane. */
|
|
13
|
+
function MasterDetailInner({
|
|
14
|
+
themeId: _themeId,
|
|
15
|
+
mode: _mode,
|
|
16
|
+
interactionPolicy: _interactionPolicy,
|
|
17
|
+
activePane = 'master',
|
|
18
|
+
desktopMode = 'split',
|
|
19
|
+
children,
|
|
20
|
+
masterWidth = 30,
|
|
21
|
+
testID,
|
|
22
|
+
}: MasterDetailProps) {
|
|
23
|
+
const presentation = resolveMasterDetailPresentation(useBreakpoint(), activePane, desktopMode);
|
|
24
|
+
const [master, detail] = React.Children.toArray(children);
|
|
25
|
+
const masterPane = <MasterPane master={master} testID={testID} />;
|
|
26
|
+
const detailPane = <DetailPane detail={detail} testID={testID} />;
|
|
27
|
+
|
|
28
|
+
if (presentation === 'master') return masterPane;
|
|
29
|
+
if (presentation === 'detail') return detailPane;
|
|
30
|
+
|
|
31
|
+
return (
|
|
32
|
+
<View direction="row" flex={1} minHeight={0} minWidth={0} testID={testID}>
|
|
33
|
+
<View flex={masterWidth} minHeight={0} minWidth={0}>
|
|
34
|
+
{masterPane}
|
|
35
|
+
</View>
|
|
36
|
+
<View flex={100 - masterWidth} minHeight={0} minWidth={0}>
|
|
37
|
+
{detailPane}
|
|
38
|
+
</View>
|
|
39
|
+
</View>
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/*** Provides the independently bounded master-list scroll region. */
|
|
44
|
+
function MasterPane({
|
|
45
|
+
master,
|
|
46
|
+
testID,
|
|
47
|
+
}: Pick<MasterDetailProps, 'testID'> & { master?: React.ReactNode }) {
|
|
48
|
+
return (
|
|
49
|
+
<ScrollView
|
|
50
|
+
flex={1}
|
|
51
|
+
minHeight={0}
|
|
52
|
+
minWidth={0}
|
|
53
|
+
testID={testID ? `${testID}-master` : undefined}
|
|
54
|
+
>
|
|
55
|
+
{master}
|
|
56
|
+
</ScrollView>
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/*** Provides the independently bounded detail scroll region. */
|
|
61
|
+
function DetailPane({
|
|
62
|
+
detail,
|
|
63
|
+
testID,
|
|
64
|
+
}: Pick<MasterDetailProps, 'testID'> & { detail?: React.ReactNode }) {
|
|
65
|
+
return (
|
|
66
|
+
<ScrollView
|
|
67
|
+
flex={1}
|
|
68
|
+
minHeight={0}
|
|
69
|
+
minWidth={0}
|
|
70
|
+
testID={testID ? `${testID}-detail` : undefined}
|
|
71
|
+
>
|
|
72
|
+
{detail}
|
|
73
|
+
</ScrollView>
|
|
74
|
+
);
|
|
75
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { expect, test } from 'bun:test';
|
|
2
|
+
|
|
3
|
+
import { resolveMasterDetailPresentation } from './resolveMasterDetailPresentation';
|
|
4
|
+
|
|
5
|
+
test('projects host-owned compact route state below the desktop breakpoint', () => {
|
|
6
|
+
expect(resolveMasterDetailPresentation('base', 'master', 'split')).toBe('master');
|
|
7
|
+
expect(resolveMasterDetailPresentation('sm', 'detail', 'split')).toBe('detail');
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
test('projects a 30/70 workspace at expanded breakpoints without changing compact route state', () => {
|
|
11
|
+
expect(resolveMasterDetailPresentation('md', 'detail', 'split')).toBe('split');
|
|
12
|
+
expect(resolveMasterDetailPresentation('lg', 'master', 'split')).toBe('split');
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
test('permits a full-width master mode only at expanded breakpoints', () => {
|
|
16
|
+
expect(resolveMasterDetailPresentation('md', 'detail', 'master')).toBe('master');
|
|
17
|
+
expect(resolveMasterDetailPresentation('base', 'detail', 'master')).toBe('detail');
|
|
18
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Breakpoint } from '@ankhorage/surface';
|
|
2
|
+
|
|
3
|
+
import type { MasterDetailActivePane, MasterDetailDesktopMode } from '../../../types/master-detail';
|
|
4
|
+
|
|
5
|
+
export type MasterDetailPresentation = 'detail' | 'master' | 'split';
|
|
6
|
+
|
|
7
|
+
/*** Resolves the visual pane projection without changing host-owned route state. */
|
|
8
|
+
export function resolveMasterDetailPresentation(
|
|
9
|
+
breakpoint: Breakpoint,
|
|
10
|
+
activePane: MasterDetailActivePane,
|
|
11
|
+
desktopMode: MasterDetailDesktopMode,
|
|
12
|
+
): MasterDetailPresentation {
|
|
13
|
+
if (breakpoint === 'base' || breakpoint === 'sm') return activePane;
|
|
14
|
+
return desktopMode === 'master' ? 'master' : 'split';
|
|
15
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { CONTAINER_ALLOWED_CHILDREN } from '../../constants/authoring';
|
|
2
|
+
import type { ZoraComponentMeta } from '../../types/authoring';
|
|
3
|
+
|
|
4
|
+
export const masterDetailMeta = {
|
|
5
|
+
name: 'MasterDetail',
|
|
6
|
+
category: 'layout',
|
|
7
|
+
directManifestNode: true,
|
|
8
|
+
allowedChildren: [...CONTAINER_ALLOWED_CHILDREN],
|
|
9
|
+
description:
|
|
10
|
+
'Responsive visual projection for host-owned list and detail routes. Its first child is the master list and its second child is the detail pane. Place it as a direct child of a non-scrolling Screen. On expanded widths it displays both in independently scrolling panes; on compact widths it displays the pane selected by activePane.',
|
|
11
|
+
blueprint: {
|
|
12
|
+
label: 'Master detail',
|
|
13
|
+
defaultProps: { activePane: 'master', desktopMode: 'split', masterWidth: 30 },
|
|
14
|
+
},
|
|
15
|
+
bindings: {
|
|
16
|
+
props: {
|
|
17
|
+
activePane: {
|
|
18
|
+
label: 'Active compact pane',
|
|
19
|
+
description: 'Bind this to host-owned list or detail route state; ZORA does not navigate.',
|
|
20
|
+
value: { type: 'string' },
|
|
21
|
+
acceptsFallback: true,
|
|
22
|
+
acceptsTransforms: true,
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
props: {
|
|
27
|
+
activePane: {
|
|
28
|
+
type: 'enum',
|
|
29
|
+
category: 'Navigation',
|
|
30
|
+
label: 'Active compact pane',
|
|
31
|
+
enum: ['master', 'detail'],
|
|
32
|
+
default: 'master',
|
|
33
|
+
},
|
|
34
|
+
desktopMode: {
|
|
35
|
+
type: 'enum',
|
|
36
|
+
category: 'Layout',
|
|
37
|
+
label: 'Desktop mode',
|
|
38
|
+
enum: ['split', 'master'],
|
|
39
|
+
default: 'split',
|
|
40
|
+
},
|
|
41
|
+
masterWidth: {
|
|
42
|
+
type: 'enum',
|
|
43
|
+
category: 'Layout',
|
|
44
|
+
label: 'Master width percent',
|
|
45
|
+
enum: [25, 30, 35, 40],
|
|
46
|
+
default: 30,
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
} as const satisfies ZoraComponentMeta;
|
|
@@ -57,6 +57,7 @@ import { Image } from '../image/public';
|
|
|
57
57
|
import { KeyboardAvoidingView } from '../keyboard-avoiding-view/public';
|
|
58
58
|
import { AppShell, Divider, Grid, Screen, ScrollView, View } from '../layout/public';
|
|
59
59
|
import { FlatList, List, ListItem, ListSection, SectionList } from '../list/public';
|
|
60
|
+
import { MasterDetail } from '../master-detail/public';
|
|
60
61
|
import { MatrixGrid } from '../matrix-grid/public';
|
|
61
62
|
import { MissingElement } from '../missing-element/public';
|
|
62
63
|
import { Pagination } from '../pagination/public';
|
|
@@ -207,6 +208,7 @@ const _ZORA_BASE_COMPONENT_REGISTRY = {
|
|
|
207
208
|
TileGrid,
|
|
208
209
|
TimeGrid,
|
|
209
210
|
MatrixGrid,
|
|
211
|
+
MasterDetail,
|
|
210
212
|
MediaExplorer,
|
|
211
213
|
Hero,
|
|
212
214
|
List,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { describe, expect, test } from 'bun:test';
|
|
2
2
|
|
|
3
|
+
import { CONTAINER_ALLOWED_CHILDREN } from '../../constants/authoring';
|
|
3
4
|
import { ZORA_COLORS } from '../theme/colorModel';
|
|
4
5
|
import type { BarcodeScannerViewProps, ZoraComponentEventPayloadKind } from '.';
|
|
5
6
|
import { ZORA_COMPONENT_META } from '.';
|
|
@@ -301,6 +302,7 @@ describe('ZORA_COMPONENT_META invariants', () => {
|
|
|
301
302
|
'GameOverlay',
|
|
302
303
|
'Surface',
|
|
303
304
|
'MediaCard',
|
|
305
|
+
'MasterDetail',
|
|
304
306
|
'FlatList',
|
|
305
307
|
'SectionList',
|
|
306
308
|
'BottomSheet',
|
|
@@ -524,6 +526,20 @@ describe('ZORA_COMPONENT_META invariants', () => {
|
|
|
524
526
|
expect(keyboardAvoidingView.props.behavior?.enum).toEqual(['height', 'position', 'padding']);
|
|
525
527
|
});
|
|
526
528
|
|
|
529
|
+
test('MasterDetail uses RuntimeRenderer children for its serializable pane content', () => {
|
|
530
|
+
const masterDetail = ZORA_COMPONENT_META.MasterDetail;
|
|
531
|
+
expect(masterDetail.directManifestNode).toBe(true);
|
|
532
|
+
expect(masterDetail.allowedChildren).toEqual(CONTAINER_ALLOWED_CHILDREN);
|
|
533
|
+
expect(masterDetail.props.activePane?.enum).toEqual(['master', 'detail']);
|
|
534
|
+
expect(masterDetail.props.masterWidth?.enum).toEqual([25, 30, 35, 40]);
|
|
535
|
+
expect(masterDetail.slots).toBeUndefined();
|
|
536
|
+
expect(masterDetail.bindings?.props?.activePane).toMatchObject({
|
|
537
|
+
acceptsFallback: true,
|
|
538
|
+
acceptsTransforms: true,
|
|
539
|
+
value: { type: 'string' },
|
|
540
|
+
});
|
|
541
|
+
});
|
|
542
|
+
|
|
527
543
|
test('Progress is a direct manifest leaf with serializable defaults', () => {
|
|
528
544
|
expect(ZORA_COMPONENT_META.Progress.directManifestNode).toBe(true);
|
|
529
545
|
expect(ZORA_COMPONENT_META.Progress.allowedChildren).toEqual([]);
|
|
@@ -70,6 +70,7 @@ import { viewMeta } from '../layout/viewMeta';
|
|
|
70
70
|
import { flatListMeta } from '../list/flatListMeta';
|
|
71
71
|
import { listItemMeta, listMeta, listSectionMeta } from '../list/meta';
|
|
72
72
|
import { sectionListMeta } from '../list/sectionListMeta';
|
|
73
|
+
import { masterDetailMeta } from '../master-detail/masterDetailMeta';
|
|
73
74
|
import { matrixGridMeta } from '../matrix-grid/meta';
|
|
74
75
|
import { missingElementMeta } from '../missing-element/missingElementMeta';
|
|
75
76
|
import { paginationMeta } from '../pagination/paginationMeta';
|
|
@@ -156,6 +157,7 @@ export const ZORA_COMPONENT_META: ZoraComponentMetaRegistry = finalizeFeatureMet
|
|
|
156
157
|
IconButton: iconButtonMeta,
|
|
157
158
|
Image: imageMeta,
|
|
158
159
|
KeyboardAvoidingView: keyboardAvoidingViewMeta,
|
|
160
|
+
MasterDetail: masterDetailMeta,
|
|
159
161
|
TextInput: textInputMeta,
|
|
160
162
|
MediaCard: mediaCardMeta,
|
|
161
163
|
MetricCard: metricCardMeta,
|
|
@@ -54,6 +54,8 @@ test('existing interactive authoring retains bindings in core metadata', () => {
|
|
|
54
54
|
type: 'object',
|
|
55
55
|
});
|
|
56
56
|
expect(meta.BottomSheet?.bindings?.props?.open?.value.type).toBe('boolean');
|
|
57
|
+
expect(meta.MasterDetail?.bindings?.props?.activePane?.value.type).toBe('string');
|
|
58
|
+
expect(meta.MasterDetail?.bindings?.props?.activePane?.acceptsTransforms).toBe(true);
|
|
57
59
|
});
|
|
58
60
|
|
|
59
61
|
test('final ownership data components retain bindings in core metadata', () => {
|
package/src/index.ts
CHANGED
|
@@ -14,6 +14,8 @@ export {
|
|
|
14
14
|
AuthoringSelectionAdapter,
|
|
15
15
|
ThemeEditorAdapter,
|
|
16
16
|
} from './authoring';
|
|
17
|
+
export type { CarouselProps, CarouselSlide, CarouselTransition } from './features/carousel/public';
|
|
18
|
+
export { Carousel } from './features/carousel/public';
|
|
17
19
|
export type {
|
|
18
20
|
ColorHueScaleProps,
|
|
19
21
|
ColorPickerProps,
|
|
@@ -28,6 +30,13 @@ export type {
|
|
|
28
30
|
ColorWheelSelection,
|
|
29
31
|
} from './features/color/public';
|
|
30
32
|
export { ColorHueScale, ColorPicker, ColorTone, ColorWheel } from './features/color/public';
|
|
33
|
+
export type {
|
|
34
|
+
MasterDetailActivePane,
|
|
35
|
+
MasterDetailDesktopMode,
|
|
36
|
+
MasterDetailMasterWidth,
|
|
37
|
+
MasterDetailProps,
|
|
38
|
+
} from './features/master-detail/public';
|
|
39
|
+
export { MasterDetail } from './features/master-detail/public';
|
|
31
40
|
export type {
|
|
32
41
|
ReaderColorScheme,
|
|
33
42
|
ReaderDocumentFormat,
|
package/src/readerFree.ts
CHANGED
|
@@ -346,6 +346,13 @@ export type {
|
|
|
346
346
|
} from './features/list/public';
|
|
347
347
|
export { FlatList, SectionList } from './features/list/public';
|
|
348
348
|
export { List, ListItem, ListSection } from './features/list/public';
|
|
349
|
+
export type {
|
|
350
|
+
MasterDetailActivePane,
|
|
351
|
+
MasterDetailDesktopMode,
|
|
352
|
+
MasterDetailMasterWidth,
|
|
353
|
+
MasterDetailProps,
|
|
354
|
+
} from './features/master-detail/public';
|
|
355
|
+
export { MasterDetail } from './features/master-detail/public';
|
|
349
356
|
export type { MatrixGridProps } from './features/matrix-grid/public';
|
|
350
357
|
export { MatrixGrid } from './features/matrix-grid/public';
|
|
351
358
|
export { MissingElement, type MissingElementProps } from './features/missing-element/public';
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type {
|
|
3
|
+
ImageResizeMode,
|
|
4
|
+
ImageSourcePropType,
|
|
5
|
+
ImageStyle,
|
|
6
|
+
StyleProp,
|
|
7
|
+
ViewStyle,
|
|
8
|
+
} from 'react-native';
|
|
9
|
+
|
|
10
|
+
export type CarouselTransition = 'fade' | 'slide' | 'none';
|
|
11
|
+
|
|
12
|
+
/** One presentation frame: an image, arbitrary React content, or both. */
|
|
13
|
+
export interface CarouselSlide {
|
|
14
|
+
key: string;
|
|
15
|
+
source?: string | ImageSourcePropType;
|
|
16
|
+
alt?: string;
|
|
17
|
+
content?: ReactNode;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/** Configurable cross-platform carousel; the consumer owns slide content. */
|
|
21
|
+
export interface CarouselProps {
|
|
22
|
+
slides: readonly CarouselSlide[];
|
|
23
|
+
/** Controlled index. If omitted, Carousel manages its own position. */
|
|
24
|
+
index?: number;
|
|
25
|
+
defaultIndex?: number;
|
|
26
|
+
onIndexChange?: (index: number) => void;
|
|
27
|
+
autoPlay?: boolean;
|
|
28
|
+
paused?: boolean;
|
|
29
|
+
loop?: boolean;
|
|
30
|
+
intervalMs?: number;
|
|
31
|
+
transition?: CarouselTransition;
|
|
32
|
+
enterDurationMs?: number;
|
|
33
|
+
exitDurationMs?: number;
|
|
34
|
+
initialScale?: number;
|
|
35
|
+
animateOnMount?: boolean;
|
|
36
|
+
/** Overrides the host OS preference when explicitly supplied. */
|
|
37
|
+
reducedMotion?: boolean;
|
|
38
|
+
showProgress?: boolean;
|
|
39
|
+
progressHeight?: number;
|
|
40
|
+
progressTrackColor?: string;
|
|
41
|
+
progressIndicatorColor?: string;
|
|
42
|
+
progressTrackStyle?: StyleProp<ViewStyle>;
|
|
43
|
+
progressIndicatorStyle?: StyleProp<ViewStyle>;
|
|
44
|
+
showArrows?: boolean;
|
|
45
|
+
showIndicators?: boolean;
|
|
46
|
+
previousLabel?: string;
|
|
47
|
+
nextLabel?: string;
|
|
48
|
+
controlColor?: string;
|
|
49
|
+
controlBackgroundColor?: string;
|
|
50
|
+
controlsStyle?: StyleProp<ViewStyle>;
|
|
51
|
+
activeIndicatorColor?: string;
|
|
52
|
+
inactiveIndicatorColor?: string;
|
|
53
|
+
indicatorsStyle?: StyleProp<ViewStyle>;
|
|
54
|
+
resizeMode?: ImageResizeMode;
|
|
55
|
+
imageStyle?: StyleProp<ImageStyle>;
|
|
56
|
+
style?: StyleProp<ViewStyle>;
|
|
57
|
+
/** Enables Next/Image or another consumer-specific image optimization. */
|
|
58
|
+
renderImage?: (slide: CarouselSlide, index: number) => ReactNode;
|
|
59
|
+
testID?: string;
|
|
60
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
|
|
3
|
+
import type { ZoraBaseProps } from './base';
|
|
4
|
+
|
|
5
|
+
/** Identifies the compact pane selected by host-owned route state. */
|
|
6
|
+
export type MasterDetailActivePane = 'master' | 'detail';
|
|
7
|
+
|
|
8
|
+
/** Controls the expanded-width presentation without changing route state. */
|
|
9
|
+
export type MasterDetailDesktopMode = 'split' | 'master';
|
|
10
|
+
|
|
11
|
+
/** Limits the master column to readable workspace proportions. */
|
|
12
|
+
export type MasterDetailMasterWidth = 25 | 30 | 35 | 40;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Presentation-only workspace composition. Place it as a direct child of a non-scrolling Screen
|
|
16
|
+
* so its panes own bounded scrolling. The host supplies activePane from its route state; ZORA
|
|
17
|
+
* never creates routes or handles back navigation.
|
|
18
|
+
*/
|
|
19
|
+
export interface MasterDetailProps extends ZoraBaseProps {
|
|
20
|
+
/** The first child is the master pane and the second child is the detail pane. */
|
|
21
|
+
children?: React.ReactNode;
|
|
22
|
+
activePane?: MasterDetailActivePane;
|
|
23
|
+
desktopMode?: MasterDetailDesktopMode;
|
|
24
|
+
masterWidth?: MasterDetailMasterWidth;
|
|
25
|
+
}
|
|
@@ -8,23 +8,23 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
resolvePointerEvents,
|
|
10
10
|
View3
|
|
11
|
-
} from "./Accordion-
|
|
11
|
+
} from "./Accordion-w1ag7sr4.js";
|
|
12
12
|
import {
|
|
13
13
|
useTheme
|
|
14
|
-
} from "./Accordion-
|
|
14
|
+
} from "./Accordion-ng79nxzz.js";
|
|
15
15
|
import {
|
|
16
16
|
Surface3
|
|
17
|
-
} from "./Accordion-
|
|
17
|
+
} from "./Accordion-rt4jfq2r.js";
|
|
18
18
|
import {
|
|
19
19
|
withZoraThemeScope
|
|
20
|
-
} from "./Accordion-
|
|
20
|
+
} from "./Accordion-hqg1zbxk.js";
|
|
21
21
|
import {
|
|
22
22
|
View2
|
|
23
|
-
} from "./Accordion-
|
|
23
|
+
} from "./Accordion-v21vz0cg.js";
|
|
24
24
|
import {
|
|
25
25
|
Heading2,
|
|
26
26
|
Text3
|
|
27
|
-
} from "./Accordion-
|
|
27
|
+
} from "./Accordion-1mjn0atk.js";
|
|
28
28
|
import {
|
|
29
29
|
resolveOverlayAnimation
|
|
30
30
|
} from "./Accordion-6ec4gxv2.js";
|
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
withZoraThemeScope
|
|
4
|
-
} from "./Accordion-
|
|
4
|
+
} from "./Accordion-hqg1zbxk.js";
|
|
5
5
|
import {
|
|
6
6
|
Button2
|
|
7
|
-
} from "./Accordion-
|
|
7
|
+
} from "./Accordion-ajgffs75.js";
|
|
8
8
|
import {
|
|
9
9
|
View2,
|
|
10
10
|
Divider2,
|
|
11
11
|
ScrollView2
|
|
12
|
-
} from "./Accordion-
|
|
12
|
+
} from "./Accordion-v21vz0cg.js";
|
|
13
13
|
import {
|
|
14
14
|
FormActions2,
|
|
15
15
|
FormError2,
|
|
16
16
|
hasRequiredRule,
|
|
17
17
|
useFormController
|
|
18
|
-
} from "./Accordion-
|
|
18
|
+
} from "./Accordion-gjeaevge.js";
|
|
19
19
|
import {
|
|
20
20
|
Text3
|
|
21
|
-
} from "./Accordion-
|
|
21
|
+
} from "./Accordion-1mjn0atk.js";
|
|
22
22
|
import {
|
|
23
23
|
Field2
|
|
24
|
-
} from "./Accordion-
|
|
24
|
+
} from "./Accordion-grtf75xt.js";
|
|
25
25
|
import {
|
|
26
26
|
TextInput2
|
|
27
|
-
} from "./Accordion-
|
|
27
|
+
} from "./Accordion-818avkay.js";
|
|
28
28
|
import {
|
|
29
29
|
KeyboardAvoidingView2
|
|
30
|
-
} from "./Accordion-
|
|
30
|
+
} from "./Accordion-k058095e.js";
|
|
31
31
|
import {
|
|
32
32
|
Surface2
|
|
33
|
-
} from "./Accordion-
|
|
33
|
+
} from "./Accordion-91v243pz.js";
|
|
34
34
|
import {
|
|
35
35
|
require_cjs
|
|
36
36
|
} from "./Accordion-xgpzh4wq.js";
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
} from "./Accordion-neg1cgeh.js";
|
|
5
5
|
import {
|
|
6
6
|
withZoraThemeScope
|
|
7
|
-
} from "./Accordion-
|
|
7
|
+
} from "./Accordion-hqg1zbxk.js";
|
|
8
8
|
import {
|
|
9
9
|
useZoraTheme2
|
|
10
|
-
} from "./Accordion-
|
|
10
|
+
} from "./Accordion-j5wsx41j.js";
|
|
11
11
|
import {
|
|
12
12
|
require_cjs
|
|
13
13
|
} from "./Accordion-xgpzh4wq.js";
|
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
import {
|
|
3
3
|
resolveResponsive,
|
|
4
4
|
useResponsiveRuntime
|
|
5
|
-
} from "./Accordion-
|
|
5
|
+
} from "./Accordion-wgc67k1g.js";
|
|
6
6
|
import {
|
|
7
7
|
withZoraThemeScope
|
|
8
|
-
} from "./Accordion-
|
|
8
|
+
} from "./Accordion-hqg1zbxk.js";
|
|
9
9
|
import {
|
|
10
10
|
useZoraThemeRecipe,
|
|
11
11
|
ZORA_COLORS,
|
|
12
12
|
ZORA_EMPHASES
|
|
13
|
-
} from "./Accordion-
|
|
13
|
+
} from "./Accordion-19zt3dyq.js";
|
|
14
14
|
import {
|
|
15
15
|
useZoraTheme2
|
|
16
|
-
} from "./Accordion-
|
|
16
|
+
} from "./Accordion-j5wsx41j.js";
|
|
17
17
|
import {
|
|
18
18
|
require_cjs
|
|
19
19
|
} from "./Accordion-xgpzh4wq.js";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
View3
|
|
4
|
-
} from "./Accordion-
|
|
4
|
+
} from "./Accordion-w1ag7sr4.js";
|
|
5
5
|
import {
|
|
6
6
|
useTheme
|
|
7
|
-
} from "./Accordion-
|
|
7
|
+
} from "./Accordion-ng79nxzz.js";
|
|
8
8
|
import {
|
|
9
9
|
Text2
|
|
10
|
-
} from "./Accordion-
|
|
10
|
+
} from "./Accordion-9cpm8x92.js";
|
|
11
11
|
import {
|
|
12
12
|
withZoraThemeScope
|
|
13
|
-
} from "./Accordion-
|
|
13
|
+
} from "./Accordion-hqg1zbxk.js";
|
|
14
14
|
import {
|
|
15
15
|
resolveControlSize,
|
|
16
16
|
resolveButtonColors
|
|
@@ -8,10 +8,10 @@ import {
|
|
|
8
8
|
LIGHT_SEMANTIC_COLOR_REFERENCES,
|
|
9
9
|
DARK_SEMANTIC_COLOR_REFERENCES,
|
|
10
10
|
generateThemeModeColors
|
|
11
|
-
} from "./Accordion-
|
|
11
|
+
} from "./Accordion-ng79nxzz.js";
|
|
12
12
|
import {
|
|
13
13
|
withZoraThemeScope
|
|
14
|
-
} from "./Accordion-
|
|
14
|
+
} from "./Accordion-hqg1zbxk.js";
|
|
15
15
|
import {
|
|
16
16
|
resolveSelectionEventIntent
|
|
17
17
|
} from "./Accordion-eq27a9ms.js";
|