@ankhorage/zora 24.0.3 → 24.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 +2 -1
- package/dist/constants/authoring.d.ts +4 -3
- package/dist/constants/authoring.d.ts.map +1 -1
- package/dist/constants/authoring.js +3 -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/chat/messageBubbleMeta.d.ts +1 -1
- package/dist/features/dialog/dialogMeta.d.ts +2 -2
- package/dist/features/explorer/adapters/inbound/Explorer.d.ts +5 -0
- package/dist/features/explorer/adapters/inbound/Explorer.d.ts.map +1 -0
- package/dist/features/explorer/adapters/inbound/Explorer.js +82 -0
- package/dist/features/explorer/adapters/inbound/Explorer.js.map +1 -0
- package/dist/features/explorer/adapters/inbound/FileExplorer.d.ts +5 -0
- package/dist/features/explorer/adapters/inbound/FileExplorer.d.ts.map +1 -0
- package/dist/features/explorer/adapters/inbound/FileExplorer.js +7 -0
- package/dist/features/explorer/adapters/inbound/FileExplorer.js.map +1 -0
- package/dist/features/explorer/adapters/inbound/MediaExplorer.d.ts +5 -0
- package/dist/features/explorer/adapters/inbound/MediaExplorer.d.ts.map +1 -0
- package/dist/features/explorer/adapters/inbound/MediaExplorer.js +7 -0
- package/dist/features/explorer/adapters/inbound/MediaExplorer.js.map +1 -0
- package/dist/features/explorer/application/resolveExplorerSelection.d.ts +7 -0
- package/dist/features/explorer/application/resolveExplorerSelection.d.ts.map +1 -0
- package/dist/features/explorer/application/resolveExplorerSelection.js +22 -0
- package/dist/features/explorer/application/resolveExplorerSelection.js.map +1 -0
- package/dist/features/explorer/meta.d.ts +306 -0
- package/dist/features/explorer/meta.d.ts.map +1 -0
- package/dist/features/explorer/meta.js +89 -0
- package/dist/features/explorer/meta.js.map +1 -0
- package/dist/features/explorer/public.d.ts +6 -0
- package/dist/features/explorer/public.d.ts.map +1 -0
- package/dist/features/explorer/public.js +5 -0
- package/dist/features/explorer/public.js.map +1 -0
- package/dist/features/gradient/gradientMeta.d.ts +1 -1
- package/dist/features/grid-view/adapters/inbound/GridView.d.ts +10 -0
- package/dist/features/grid-view/adapters/inbound/GridView.d.ts.map +1 -0
- package/dist/features/grid-view/adapters/inbound/GridView.js +49 -0
- package/dist/features/grid-view/adapters/inbound/GridView.js.map +1 -0
- package/dist/features/grid-view/adapters/inbound/TileGrid.d.ts +5 -0
- package/dist/features/grid-view/adapters/inbound/TileGrid.d.ts.map +1 -0
- package/dist/features/grid-view/adapters/inbound/TileGrid.js +18 -0
- package/dist/features/grid-view/adapters/inbound/TileGrid.js.map +1 -0
- package/dist/features/grid-view/application/layoutTileGrid.d.ts +12 -0
- package/dist/features/grid-view/application/layoutTileGrid.d.ts.map +1 -0
- package/dist/features/grid-view/application/layoutTileGrid.js +25 -0
- package/dist/features/grid-view/application/layoutTileGrid.js.map +1 -0
- package/dist/features/grid-view/meta.d.ts +20 -0
- package/dist/features/grid-view/meta.d.ts.map +1 -0
- package/dist/features/grid-view/meta.js +20 -0
- package/dist/features/grid-view/meta.js.map +1 -0
- package/dist/features/grid-view/public.d.ts +5 -0
- package/dist/features/grid-view/public.d.ts.map +1 -0
- package/dist/features/grid-view/public.js +4 -0
- package/dist/features/grid-view/public.js.map +1 -0
- package/dist/features/keyboard-avoiding-view/keyboardAvoidingViewMeta.d.ts +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/reader/meta.d.ts +2 -2
- package/dist/features/registry/ZORA_COMPONENT_REGISTRY.d.ts.map +1 -1
- package/dist/features/registry/ZORA_COMPONENT_REGISTRY.js +7 -0
- package/dist/features/registry/ZORA_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 +7 -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/features/uploader/adapters/inbound/Uploader.d.ts.map +1 -1
- package/dist/features/uploader/adapters/inbound/Uploader.js +73 -48
- package/dist/features/uploader/adapters/inbound/Uploader.js.map +1 -1
- package/dist/features/uploader/public.d.ts +1 -1
- package/dist/features/uploader/public.d.ts.map +1 -1
- package/dist/features/uploader/public.js.map +1 -1
- package/dist/features/uploader/uploaderMeta.d.ts +5 -0
- package/dist/features/uploader/uploaderMeta.d.ts.map +1 -1
- package/dist/features/uploader/uploaderMeta.js +1 -0
- package/dist/features/uploader/uploaderMeta.js.map +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/types/explorer.d.ts +40 -0
- package/dist/types/explorer.d.ts.map +1 -0
- package/dist/types/explorer.js +2 -0
- package/dist/types/explorer.js.map +1 -0
- package/dist/types/grid-view.d.ts +31 -0
- package/dist/types/grid-view.d.ts.map +1 -0
- package/dist/types/grid-view.js +2 -0
- package/dist/types/grid-view.js.map +1 -0
- package/dist/types/upload.d.ts +6 -0
- package/dist/types/upload.d.ts.map +1 -1
- package/dist/types/upload.js.map +1 -1
- package/package.json +7 -6
- package/src/constants/authoring.ts +3 -0
- package/src/features/explorer/adapters/inbound/Explorer.tsx +136 -0
- package/src/features/explorer/adapters/inbound/FileExplorer.tsx +9 -0
- package/src/features/explorer/adapters/inbound/MediaExplorer.tsx +16 -0
- package/src/features/explorer/application/resolveExplorerSelection.test.ts +35 -0
- package/src/features/explorer/application/resolveExplorerSelection.ts +29 -0
- package/src/features/explorer/meta.ts +94 -0
- package/src/features/explorer/public.ts +12 -0
- package/src/features/grid-view/adapters/inbound/GridView.tsx +95 -0
- package/src/features/grid-view/adapters/inbound/TileGrid.tsx +53 -0
- package/src/features/grid-view/application/layoutTileGrid.test.ts +36 -0
- package/src/features/grid-view/application/layoutTileGrid.ts +46 -0
- package/src/features/grid-view/meta.ts +22 -0
- package/src/features/grid-view/public.ts +4 -0
- package/src/features/layout/public.test.ts +5 -1
- package/src/features/registry/ZORA_COMPONENT_REGISTRY.ts +7 -0
- package/src/features/registry/componentMeta.test.ts +2 -0
- package/src/features/registry/componentMeta.ts +7 -0
- package/src/features/uploader/adapters/inbound/Uploader.tsx +65 -36
- package/src/features/uploader/public.ts +1 -0
- package/src/features/uploader/uploaderMeta.ts +1 -0
- package/src/index.ts +17 -0
- package/src/types/explorer.ts +45 -0
- package/src/types/grid-view.ts +34 -0
- package/src/types/upload.ts +5 -0
- package/web-dist/chunks/{Accordion-ansfkmye.js → Accordion-016wvwpg.js} +5 -5
- package/web-dist/chunks/{Accordion-3hg1wprb.js → Accordion-09qs8gt1.js} +1 -1
- package/web-dist/chunks/{Accordion-kpap0trj.js → Accordion-184r2r82.js} +1 -1
- package/web-dist/chunks/{Accordion-jdwwf626.js → Accordion-1p9r2ack.js} +3 -3
- package/web-dist/chunks/{Accordion-2q6p67xe.js → Accordion-2c759z0y.js} +7 -5
- package/web-dist/chunks/Accordion-2gvs3frs.js +197 -0
- package/web-dist/chunks/{Accordion-rkt7qdmj.js → Accordion-2nesr9cv.js} +2 -2
- package/web-dist/chunks/{Accordion-egq42kdy.js → Accordion-2rgexkze.js} +6 -4
- package/web-dist/chunks/{Accordion-7q1qf7c0.js → Accordion-3m3572sa.js} +7 -5
- package/web-dist/chunks/{Accordion-74rt38d4.js → Accordion-42jfy1a1.js} +1 -1
- package/web-dist/chunks/{Accordion-jkhq422b.js → Accordion-45nc4bte.js} +2 -2
- package/web-dist/chunks/{Accordion-jtrpmvzs.js → Accordion-5ga4549x.js} +6 -6
- package/web-dist/chunks/Accordion-6wrr910w.js +5227 -0
- package/web-dist/chunks/{Accordion-7rvtpcwt.js → Accordion-7asr7vb0.js} +6 -6
- package/web-dist/chunks/{Accordion-3f5vnfk8.js → Accordion-7yazfxr6.js} +7 -7
- package/web-dist/chunks/{Accordion-g0c439br.js → Accordion-8f0nekwe.js} +4 -2
- package/web-dist/chunks/{Accordion-apwk2wjr.js → Accordion-8jxc7tx9.js} +2 -2
- package/web-dist/chunks/Accordion-8m8p9wpw.js +179 -0
- package/web-dist/chunks/{Accordion-mdc214tk.js → Accordion-9dqkq9am.js} +12 -12
- package/web-dist/chunks/{Accordion-t3hm5tcv.js → Accordion-afmybp67.js} +7 -7
- package/web-dist/chunks/{Accordion-qj4qxx1p.js → Accordion-ajawc6nq.js} +7 -7
- package/web-dist/chunks/{Accordion-ae7m1dkn.js → Accordion-bb8y34wh.js} +2 -2
- package/web-dist/chunks/{Accordion-h46676ex.js → Accordion-be2yhfqz.js} +1 -1
- package/web-dist/chunks/{Accordion-x3tphbvw.js → Accordion-bff0p3x4.js} +1 -1
- package/web-dist/chunks/{Accordion-rg763dfb.js → Accordion-c69374jn.js} +8 -17
- package/web-dist/chunks/{Accordion-y2eyyqrk.js → Accordion-cbfa2b8j.js} +10 -10
- package/web-dist/chunks/{Accordion-x5v1p4df.js → Accordion-ch4q5w0z.js} +7 -5
- package/web-dist/chunks/{Accordion-vewrj1kr.js → Accordion-f0jsd9f9.js} +8 -6
- package/web-dist/chunks/{Accordion-2bsecqwf.js → Accordion-fkc50r9z.js} +4 -4
- package/web-dist/chunks/{Accordion-avnt7nkz.js → Accordion-fzcpm4xf.js} +1 -1
- package/web-dist/chunks/{Accordion-hwd5ntgm.js → Accordion-fzkrrc4z.js} +2 -2
- package/web-dist/chunks/{Accordion-7bb37pdc.js → Accordion-ggwxv6k3.js} +7 -7
- package/web-dist/chunks/{Accordion-sxfqnnx6.js → Accordion-hmhdwvqp.js} +12 -10
- package/web-dist/chunks/{Accordion-cs8k948c.js → Accordion-mej71qnw.js} +8 -6
- package/web-dist/chunks/{Accordion-kcwdwd5z.js → Accordion-mh67wb34.js} +10 -8
- package/web-dist/chunks/Accordion-n4et7etk.js +14 -0
- package/web-dist/chunks/{Accordion-0acrkcyd.js → Accordion-n9c5tsqw.js} +4 -4
- package/web-dist/chunks/{Accordion-nanvzve9.js → Accordion-ndf3jqhb.js} +5 -5
- package/web-dist/chunks/{Accordion-q1mnv5g8.js → Accordion-nmpmdrba.js} +5 -5
- package/web-dist/chunks/{Accordion-fvkwq99h.js → Accordion-nnv76yff.js} +6 -4
- package/web-dist/chunks/{Accordion-122fdtp0.js → Accordion-ntndskbj.js} +7 -7
- package/web-dist/chunks/{Accordion-brt4drx3.js → Accordion-pe66x9cv.js} +11 -9
- package/web-dist/chunks/{Accordion-nj9g6p48.js → Accordion-q09fjenx.js} +11 -9
- package/web-dist/chunks/{Accordion-3rv8psbv.js → Accordion-qkh5yy94.js} +4 -4
- package/web-dist/chunks/{Accordion-qsxx5q34.js → Accordion-sdcfa14w.js} +12 -10
- package/web-dist/chunks/{Accordion-1dah5bqg.js → Accordion-srjya6dz.js} +1 -1
- package/web-dist/chunks/{Accordion-nay7yexy.js → Accordion-t0hbez90.js} +13 -11
- package/web-dist/chunks/{Accordion-2afa2z5x.js → Accordion-teg40mpt.js} +4 -4
- package/web-dist/chunks/{Accordion-k8tfv274.js → Accordion-tmrjy46p.js} +8 -6
- package/web-dist/chunks/{Accordion-2d3hbryv.js → Accordion-wgejzesa.js} +8 -8
- package/web-dist/chunks/{Accordion-kpxyryke.js → Accordion-wyxmd0n0.js} +4 -2
- package/web-dist/chunks/{Accordion-2csc57rv.js → Accordion-x12fca21.js} +2 -2
- package/web-dist/chunks/{Accordion-sek2q4r1.js → Accordion-xgpzh4wq.js} +47 -5288
- package/web-dist/chunks/{Accordion-9rhbc32v.js → Accordion-xvzrx6bh.js} +16 -14
- package/web-dist/chunks/{Accordion-sxzax4x4.js → Accordion-z5a0tx18.js} +6 -4
- package/web-dist/components/accordion/Accordion.js +13 -12
- package/web-dist/components/accordion-item/AccordionItem.js +13 -12
- package/web-dist/components/activity-indicator/ActivityIndicator.js +6 -5
- package/web-dist/components/app-bar/AppBar.js +20 -19
- package/web-dist/components/app-header/AppHeader.js +20 -19
- package/web-dist/components/app-shell/AppShell.js +7 -6
- package/web-dist/components/auth-screen/AuthScreen.js +22 -21
- package/web-dist/components/avatar/Avatar.js +13 -12
- package/web-dist/components/avatar-group/AvatarGroup.js +13 -12
- package/web-dist/components/badge/Badge.js +8 -7
- package/web-dist/components/barcode-scanner-view/BarcodeScannerView.js +21 -20
- package/web-dist/components/bottom-sheet/BottomSheet.js +9 -8
- package/web-dist/components/bottom-sheet-flat-list/BottomSheetFlatList.js +9 -8
- package/web-dist/components/bottom-sheet-scroll-view/BottomSheetScrollView.js +9 -8
- package/web-dist/components/bottom-sheet-section-list/BottomSheetSectionList.js +9 -8
- package/web-dist/components/bottom-sheet-view/BottomSheetView.js +9 -8
- package/web-dist/components/bottom-sheet-virtualized-list/BottomSheetVirtualizedList.js +9 -8
- 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/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/chat-list-item/ChatListItem.js +17 -16
- package/web-dist/components/checkbox/Checkbox.js +13 -12
- package/web-dist/components/checkbox-group/CheckboxGroup.js +13 -12
- package/web-dist/components/chess-board/ChessBoard.js +5 -4
- package/web-dist/components/chip/Chip.js +14 -13
- package/web-dist/components/chip-group/ChipGroup.js +14 -13
- package/web-dist/components/collection-editor/CollectionEditor.js +20 -19
- package/web-dist/components/content-rail/ContentRail.js +16 -15
- package/web-dist/components/data-table/DataTable.js +29 -28
- package/web-dist/components/date-picker/DatePicker.js +18 -17
- package/web-dist/components/dialog/Dialog.js +13 -12
- package/web-dist/components/divider/Divider.js +7 -6
- package/web-dist/components/empty-state/EmptyState.js +21 -20
- package/web-dist/components/explorer/Explorer.d.ts +5 -0
- package/web-dist/components/explorer/Explorer.js +27 -0
- package/web-dist/components/explorer/index.d.ts +1 -0
- package/web-dist/components/explorer/index.js +2 -0
- package/web-dist/components/field/Field.js +13 -12
- package/web-dist/components/file-explorer/FileExplorer.d.ts +5 -0
- package/web-dist/components/file-explorer/FileExplorer.js +27 -0
- package/web-dist/components/file-explorer/index.d.ts +1 -0
- package/web-dist/components/file-explorer/index.js +2 -0
- package/web-dist/components/flat-list/FlatList.js +14 -13
- package/web-dist/components/forgot-password-form/ForgotPasswordForm.js +22 -21
- 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 +8 -7
- package/web-dist/components/game-entity/GameEntity.js +8 -7
- package/web-dist/components/game-field/GameField.js +8 -7
- package/web-dist/components/game-input-zone/GameInputZone.js +8 -7
- package/web-dist/components/game-measurement-probe/GameMeasurementProbe.js +8 -7
- package/web-dist/components/game-overlay/GameOverlay.js +8 -7
- package/web-dist/components/gradient/Gradient.js +8 -7
- package/web-dist/components/gradient-renderer-provider/GradientRendererProvider.js +8 -7
- package/web-dist/components/graph-view/GraphView.js +3 -3
- package/web-dist/components/grid/Grid.js +7 -6
- package/web-dist/components/grid-view/GridView.d.ts +4 -0
- package/web-dist/components/grid-view/GridView.js +10 -0
- package/web-dist/components/grid-view/index.d.ts +1 -0
- package/web-dist/components/grid-view/index.js +2 -0
- 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 +11 -10
- package/web-dist/components/keyboard-avoiding-view/KeyboardAvoidingView.js +4 -3
- package/web-dist/components/list/List.js +14 -13
- package/web-dist/components/list-item/ListItem.js +14 -13
- package/web-dist/components/list-section/ListSection.js +14 -13
- package/web-dist/components/media-card/MediaCard.js +20 -19
- package/web-dist/components/media-explorer/MediaExplorer.d.ts +5 -0
- package/web-dist/components/media-explorer/MediaExplorer.js +27 -0
- package/web-dist/components/media-explorer/index.d.ts +1 -0
- package/web-dist/components/media-explorer/index.js +2 -0
- package/web-dist/components/message-bubble/MessageBubble.js +17 -16
- package/web-dist/components/metric-card/MetricCard.js +20 -19
- package/web-dist/components/missing-element/MissingElement.js +14 -13
- package/web-dist/components/o-auth-provider-button/OAuthProviderButton.js +22 -21
- package/web-dist/components/o-auth-provider-list/OAuthProviderList.js +22 -21
- package/web-dist/components/opening-book/OpeningBook.js +5 -4
- package/web-dist/components/otp-form/OtpForm.js +22 -21
- 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 +15 -14
- 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 +11 -10
- package/web-dist/components/progress-ring/ProgressRing.js +11 -10
- package/web-dist/components/radio/Radio.js +15 -14
- package/web-dist/components/radio-group/RadioGroup.js +15 -14
- package/web-dist/components/rating/Rating.js +10 -9
- package/web-dist/components/reader/Reader.js +25 -24
- package/web-dist/components/scan-overlay/ScanOverlay.js +21 -20
- package/web-dist/components/screen/Screen.js +7 -6
- package/web-dist/components/screen-section/ScreenSection.js +11 -10
- package/web-dist/components/scroll-view/ScrollView.js +7 -6
- package/web-dist/components/search-input/SearchInput.js +14 -13
- package/web-dist/components/section-header/SectionHeader.js +11 -10
- package/web-dist/components/section-list/SectionList.js +14 -13
- package/web-dist/components/select/Select.js +17 -16
- package/web-dist/components/selectable-item/SelectableItem.js +7 -6
- package/web-dist/components/selection-provider/SelectionProvider.js +7 -6
- package/web-dist/components/sign-in-form/SignInForm.js +22 -21
- package/web-dist/components/sign-up-form/SignUpForm.js +22 -21
- 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 +8 -7
- package/web-dist/components/switch/Switch.js +8 -7
- package/web-dist/components/tab/Tab.js +8 -7
- package/web-dist/components/tab-list/TabList.js +8 -7
- package/web-dist/components/tab-panel/TabPanel.js +8 -7
- package/web-dist/components/tabletop-table/TabletopTable.js +5 -4
- package/web-dist/components/tabs/Tabs.js +8 -7
- package/web-dist/components/text/Text.js +7 -6
- package/web-dist/components/text-input/TextInput.js +14 -13
- package/web-dist/components/tile-grid/TileGrid.d.ts +4 -0
- package/web-dist/components/tile-grid/TileGrid.js +10 -0
- package/web-dist/components/tile-grid/index.d.ts +1 -0
- package/web-dist/components/tile-grid/index.js +2 -0
- package/web-dist/components/time-picker/TimePicker.js +20 -19
- package/web-dist/components/timeline/Timeline.js +12 -11
- package/web-dist/components/toast/Toast.js +10 -9
- package/web-dist/components/toast-provider/ToastProvider.js +10 -9
- package/web-dist/components/toolbar/Toolbar.js +20 -19
- package/web-dist/components/tree-item/TreeItem.js +20 -19
- package/web-dist/components/uploader/Uploader.js +109 -70
- package/web-dist/components/view/View.js +7 -6
- package/web-dist/manifest.json +1748 -1497
- package/web-dist/runtime/ZoraProvider.js +14 -12
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { getVisibleGridItems } from '@ankhorage/grid-view';
|
|
2
|
+
import { describe, expect, test } from 'bun:test';
|
|
3
|
+
|
|
4
|
+
import { layoutTileGrid } from './layoutTileGrid';
|
|
5
|
+
|
|
6
|
+
describe('TileGrid presentation', () => {
|
|
7
|
+
test('uses a responsive count of columns and stable item IDs', () => {
|
|
8
|
+
const items = Array.from({ length: 10000 }, (_, index) => ({ id: String(index) }));
|
|
9
|
+
const small = layoutTileGrid(items, 270, 120, 10);
|
|
10
|
+
const large = layoutTileGrid(items, 530, 120, 10);
|
|
11
|
+
expect(small.columns).toBe(2);
|
|
12
|
+
expect(large.columns).toBe(4);
|
|
13
|
+
expect(small.items[2]).toEqual({ id: '2', x: 0, y: 130, width: 120, height: 120 });
|
|
14
|
+
expect(small.items[9999]?.id).toBe('9999');
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
test('mounts only the viewport subset from a large catalogue', () => {
|
|
18
|
+
const items = Array.from({ length: 10000 }, (_, index) => ({ id: String(index) }));
|
|
19
|
+
const layout = layoutTileGrid(items, 270, 120, 10);
|
|
20
|
+
const visible = getVisibleGridItems(layout.items, {
|
|
21
|
+
width: 270,
|
|
22
|
+
height: 250,
|
|
23
|
+
offsetX: 0,
|
|
24
|
+
offsetY: 0,
|
|
25
|
+
pixelsPerUnitX: 1,
|
|
26
|
+
pixelsPerUnitY: 1,
|
|
27
|
+
});
|
|
28
|
+
expect(visible.map((item) => item.id)).toEqual(['0', '1', '2', '3']);
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
test('zoom affects column count without changing stable item identity', () => {
|
|
32
|
+
const items = [{ id: 'a' }, { id: 'b' }];
|
|
33
|
+
expect(layoutTileGrid(items, 500, 100, 10, 2).columns).toBe(2);
|
|
34
|
+
expect(layoutTileGrid(items, 500, 100, 10, 1).columns).toBe(4);
|
|
35
|
+
});
|
|
36
|
+
});
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { GridRectItem } from '@ankhorage/grid-view';
|
|
2
|
+
|
|
3
|
+
import type { TileGridItem } from '../../../types/grid-view';
|
|
4
|
+
|
|
5
|
+
/** A presentation-level spatial layout, expressed in engine-owned world rectangles. */
|
|
6
|
+
export interface TileGridLayout {
|
|
7
|
+
readonly items: readonly GridRectItem[];
|
|
8
|
+
readonly width: number;
|
|
9
|
+
readonly height: number;
|
|
10
|
+
readonly columns: number;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/*** Arrange keyed tiles into responsive rows without constructing placeholder grid cells. */
|
|
14
|
+
export function layoutTileGrid(
|
|
15
|
+
items: readonly TileGridItem[],
|
|
16
|
+
viewportWidth: number,
|
|
17
|
+
tileSize: number,
|
|
18
|
+
gap: number,
|
|
19
|
+
zoom = 1,
|
|
20
|
+
): TileGridLayout {
|
|
21
|
+
if (
|
|
22
|
+
![viewportWidth, tileSize, gap, zoom].every(Number.isFinite) ||
|
|
23
|
+
viewportWidth < 0 ||
|
|
24
|
+
tileSize <= 0 ||
|
|
25
|
+
gap < 0 ||
|
|
26
|
+
zoom <= 0
|
|
27
|
+
) {
|
|
28
|
+
throw new RangeError(
|
|
29
|
+
'Tile layout requires finite, nonnegative dimensions and positive scales.',
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
const columns = Math.max(1, Math.floor((viewportWidth / zoom + gap) / (tileSize + gap)));
|
|
33
|
+
const rows = Math.ceil(items.length / columns);
|
|
34
|
+
return {
|
|
35
|
+
columns,
|
|
36
|
+
width: columns * (tileSize + gap) - gap,
|
|
37
|
+
height: Math.max(0, rows * (tileSize + gap) - gap),
|
|
38
|
+
items: items.map((item, index) => ({
|
|
39
|
+
id: item.id,
|
|
40
|
+
x: (index % columns) * (tileSize + gap),
|
|
41
|
+
y: Math.floor(index / columns) * (tileSize + gap),
|
|
42
|
+
width: tileSize,
|
|
43
|
+
height: tileSize,
|
|
44
|
+
})),
|
|
45
|
+
};
|
|
46
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ZoraComponentMeta } from '../../types/authoring';
|
|
2
|
+
|
|
3
|
+
/** Code-only render callbacks are deliberately excluded from the serializable manifest boundary. */
|
|
4
|
+
export const gridViewMeta = {
|
|
5
|
+
name: 'GridView',
|
|
6
|
+
category: 'foundation',
|
|
7
|
+
description: 'Viewport renderer for world-placed items. Render callbacks belong to code APIs.',
|
|
8
|
+
directManifestNode: false,
|
|
9
|
+
note: 'Requires executable renderItem callbacks; available through code APIs, not a serializable manifest node.',
|
|
10
|
+
allowedChildren: [],
|
|
11
|
+
props: {},
|
|
12
|
+
} as const satisfies ZoraComponentMeta;
|
|
13
|
+
|
|
14
|
+
export const tileGridMeta = {
|
|
15
|
+
name: 'TileGrid',
|
|
16
|
+
category: 'foundation',
|
|
17
|
+
description: 'Virtualized tile composition. Item rendering is a code API.',
|
|
18
|
+
directManifestNode: false,
|
|
19
|
+
note: 'Requires a renderItem callback; use MediaExplorer or FileExplorer for manifest-authored tiles.',
|
|
20
|
+
allowedChildren: [],
|
|
21
|
+
props: {},
|
|
22
|
+
} as const satisfies ZoraComponentMeta;
|
|
@@ -17,7 +17,6 @@ const removedPublicNames = [
|
|
|
17
17
|
'SidebarLayout',
|
|
18
18
|
'Spacer',
|
|
19
19
|
'Stack',
|
|
20
|
-
'TileGrid',
|
|
21
20
|
'TopbarLayout',
|
|
22
21
|
] as const;
|
|
23
22
|
|
|
@@ -27,6 +26,11 @@ describe('canonical layout boundary', () => {
|
|
|
27
26
|
expect(publicSource).toMatch(new RegExp(`\\b${name}\\b`, 'u'));
|
|
28
27
|
}
|
|
29
28
|
|
|
29
|
+
expect(publicSource).not.toContain('TileGrid');
|
|
30
|
+
expect(rootSource).toContain(
|
|
31
|
+
"export { GridView, layoutTileGrid, TileGrid } from './features/grid-view/public';",
|
|
32
|
+
);
|
|
33
|
+
|
|
30
34
|
for (const name of removedPublicNames) {
|
|
31
35
|
expect(publicSource).not.toMatch(new RegExp(`\\b${name}\\b`, 'u'));
|
|
32
36
|
expect(rootSource).not.toMatch(new RegExp(`export[^\\n]*\\b${name}\\b`, 'u'));
|
|
@@ -30,6 +30,7 @@ import { DataTable } from '../data-table/public';
|
|
|
30
30
|
import { DatePicker } from '../date-picker/public';
|
|
31
31
|
import { Dialog } from '../dialog/public';
|
|
32
32
|
import { EmptyState } from '../empty-state/public';
|
|
33
|
+
import { Explorer, FileExplorer, MediaExplorer } from '../explorer/public';
|
|
33
34
|
import { Checkbox, CheckboxGroup } from '../form/checkbox/public';
|
|
34
35
|
import { Field, Form, FormActions, FormError } from '../form/public';
|
|
35
36
|
import { Radio, RadioGroup } from '../form/radio/public';
|
|
@@ -46,6 +47,7 @@ import {
|
|
|
46
47
|
GameOverlay,
|
|
47
48
|
} from '../game/public';
|
|
48
49
|
import { Gradient } from '../gradient/public';
|
|
50
|
+
import { GridView, TileGrid } from '../grid-view/public';
|
|
49
51
|
import { Hero } from '../hero/public';
|
|
50
52
|
import { Icon } from '../icon/public';
|
|
51
53
|
import { Image } from '../image/public';
|
|
@@ -190,6 +192,11 @@ const _ZORA_COMPONENT_REGISTRY = {
|
|
|
190
192
|
CollectionEditor,
|
|
191
193
|
ContentRail,
|
|
192
194
|
EmptyState,
|
|
195
|
+
Explorer,
|
|
196
|
+
FileExplorer,
|
|
197
|
+
GridView,
|
|
198
|
+
TileGrid,
|
|
199
|
+
MediaExplorer,
|
|
193
200
|
Hero,
|
|
194
201
|
List,
|
|
195
202
|
ListItem,
|
|
@@ -35,6 +35,7 @@ import { dataTableMeta } from '../data-table/dataTableMeta';
|
|
|
35
35
|
import { datePickerMeta } from '../date-picker/datePickerMeta';
|
|
36
36
|
import { dialogMeta } from '../dialog/dialogMeta';
|
|
37
37
|
import { emptyStateMeta } from '../empty-state/emptyStateMeta';
|
|
38
|
+
import { explorerMeta, fileExplorerMeta, mediaExplorerMeta } from '../explorer/meta';
|
|
38
39
|
import { checkboxGroupMeta, checkboxMeta } from '../form/checkbox/checkboxMeta';
|
|
39
40
|
import { fieldMeta } from '../form/field/meta';
|
|
40
41
|
import { formActionsMeta } from '../form/formActionsMeta';
|
|
@@ -52,6 +53,7 @@ import { gameMeasurementProbeMeta } from '../game/meta/gameMeasurementProbeMeta'
|
|
|
52
53
|
import { gameMeta } from '../game/meta/gameMeta';
|
|
53
54
|
import { gameOverlayMeta } from '../game/meta/gameOverlayMeta';
|
|
54
55
|
import { gradientMeta } from '../gradient/gradientMeta';
|
|
56
|
+
import { gridViewMeta, tileGridMeta } from '../grid-view/meta';
|
|
55
57
|
import { heroMeta } from '../hero/heroMeta';
|
|
56
58
|
import { iconMeta } from '../icon/iconMeta';
|
|
57
59
|
import { imageMeta } from '../image/imageMeta';
|
|
@@ -193,6 +195,11 @@ export const ZORA_COMPONENT_META: ZoraComponentMetaRegistry = finalizeFeatureMet
|
|
|
193
195
|
CollectionEditor: collectionEditorMeta,
|
|
194
196
|
ContentRail: contentRailMeta,
|
|
195
197
|
EmptyState: emptyStateMeta,
|
|
198
|
+
Explorer: explorerMeta,
|
|
199
|
+
FileExplorer: fileExplorerMeta,
|
|
200
|
+
MediaExplorer: mediaExplorerMeta,
|
|
201
|
+
GridView: gridViewMeta,
|
|
202
|
+
TileGrid: tileGridMeta,
|
|
196
203
|
Hero: heroMeta,
|
|
197
204
|
List: listMeta,
|
|
198
205
|
ListItem: listItemMeta,
|
|
@@ -3,6 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import type { UploadAsset, UploaderProps, UploadType } from '../../../../types/upload';
|
|
4
4
|
import { Button } from '../../../button/public';
|
|
5
5
|
import { Dialog } from '../../../dialog/public';
|
|
6
|
+
import { Explorer } from '../../../explorer/public';
|
|
6
7
|
import { Field } from '../../../form/public';
|
|
7
8
|
import { Icon } from '../../../icon/public';
|
|
8
9
|
import { Image } from '../../../image/public';
|
|
@@ -40,6 +41,7 @@ function UploaderInner({
|
|
|
40
41
|
disabled = false,
|
|
41
42
|
readOnly = false,
|
|
42
43
|
validatePicked,
|
|
44
|
+
explorerItems,
|
|
43
45
|
onUpload,
|
|
44
46
|
onRemove,
|
|
45
47
|
aspectRatio = 1,
|
|
@@ -54,6 +56,7 @@ function UploaderInner({
|
|
|
54
56
|
const removing = internalRemoving || uploadState === 'removing';
|
|
55
57
|
const [progress, setProgress] = React.useState<number | null>(null);
|
|
56
58
|
const [previewOpen, setPreviewOpen] = React.useState(false);
|
|
59
|
+
const [explorerOpen, setExplorerOpen] = React.useState(false);
|
|
57
60
|
const mountedRef = React.useRef<boolean | null>(null);
|
|
58
61
|
const resolvedAccept = resolveUploadAccept(type, accept);
|
|
59
62
|
const actionsDisabled = disabled || readOnly;
|
|
@@ -87,19 +90,10 @@ function UploaderInner({
|
|
|
87
90
|
[isMounted],
|
|
88
91
|
);
|
|
89
92
|
|
|
90
|
-
const
|
|
91
|
-
|
|
92
|
-
return;
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
setInternalError(undefined);
|
|
96
|
-
|
|
97
|
-
try {
|
|
98
|
-
const picked = await picker.pickAsync({ accept: resolvedAccept, type });
|
|
99
|
-
if (!picked || !isMounted()) {
|
|
100
|
-
return;
|
|
101
|
-
}
|
|
102
|
-
|
|
93
|
+
const acceptPicked = React.useCallback(
|
|
94
|
+
async (picked: UploadAsset | null) => {
|
|
95
|
+
if (!picked || !isMounted() || passive || actionsDisabled || uploading || removing) return;
|
|
96
|
+
setInternalError(undefined);
|
|
103
97
|
const validationError = validateUploadAsset({
|
|
104
98
|
accept: resolvedAccept,
|
|
105
99
|
asset: picked,
|
|
@@ -111,55 +105,65 @@ function UploaderInner({
|
|
|
111
105
|
onValidationError?.({ message: validationError });
|
|
112
106
|
return;
|
|
113
107
|
}
|
|
114
|
-
|
|
115
108
|
notifyValue(picked);
|
|
116
109
|
onUploadRequest?.({ asset: picked });
|
|
117
|
-
if (!onUpload)
|
|
118
|
-
return;
|
|
119
|
-
}
|
|
110
|
+
if (!onUpload) return;
|
|
120
111
|
|
|
121
112
|
setUploading(true);
|
|
122
113
|
setProgressSafe(0);
|
|
123
|
-
|
|
124
114
|
try {
|
|
125
115
|
const uploaded = await onUpload(picked, { setProgress: setProgressSafe });
|
|
126
|
-
if (!isMounted())
|
|
127
|
-
return;
|
|
128
|
-
}
|
|
129
|
-
|
|
116
|
+
if (!isMounted()) return;
|
|
130
117
|
notifyValue(uploaded);
|
|
131
118
|
setUploading(false);
|
|
132
119
|
setProgress(null);
|
|
133
120
|
} catch (error) {
|
|
134
|
-
if (!isMounted())
|
|
135
|
-
return;
|
|
136
|
-
}
|
|
137
|
-
|
|
121
|
+
if (!isMounted()) return;
|
|
138
122
|
setInternalError(formatUnknownError(error));
|
|
139
123
|
setUploading(false);
|
|
140
124
|
setProgress(null);
|
|
141
125
|
}
|
|
126
|
+
},
|
|
127
|
+
[
|
|
128
|
+
actionsDisabled,
|
|
129
|
+
isMounted,
|
|
130
|
+
maxSizeBytes,
|
|
131
|
+
notifyValue,
|
|
132
|
+
onUpload,
|
|
133
|
+
onUploadRequest,
|
|
134
|
+
onValidationError,
|
|
135
|
+
passive,
|
|
136
|
+
removing,
|
|
137
|
+
resolvedAccept,
|
|
138
|
+
setProgressSafe,
|
|
139
|
+
uploading,
|
|
140
|
+
validatePicked,
|
|
141
|
+
],
|
|
142
|
+
);
|
|
143
|
+
|
|
144
|
+
const handlePick = React.useCallback(async () => {
|
|
145
|
+
if (passive || actionsDisabled || uploading || removing) return;
|
|
146
|
+
if (explorerItems !== undefined) {
|
|
147
|
+
setExplorerOpen(true);
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
setInternalError(undefined);
|
|
151
|
+
try {
|
|
152
|
+
await acceptPicked(await picker.pickAsync({ accept: resolvedAccept, type }));
|
|
142
153
|
} catch (error) {
|
|
143
|
-
if (isMounted())
|
|
144
|
-
setInternalError(formatUnknownError(error));
|
|
145
|
-
}
|
|
154
|
+
if (isMounted()) setInternalError(formatUnknownError(error));
|
|
146
155
|
}
|
|
147
156
|
}, [
|
|
157
|
+
acceptPicked,
|
|
148
158
|
actionsDisabled,
|
|
159
|
+
explorerItems,
|
|
149
160
|
isMounted,
|
|
150
|
-
maxSizeBytes,
|
|
151
|
-
notifyValue,
|
|
152
|
-
onUploadRequest,
|
|
153
|
-
onValidationError,
|
|
154
|
-
onUpload,
|
|
155
161
|
passive,
|
|
156
162
|
picker,
|
|
157
163
|
removing,
|
|
158
164
|
resolvedAccept,
|
|
159
|
-
setProgressSafe,
|
|
160
165
|
type,
|
|
161
166
|
uploading,
|
|
162
|
-
validatePicked,
|
|
163
167
|
]);
|
|
164
168
|
|
|
165
169
|
const handleRemove = React.useCallback(async () => {
|
|
@@ -287,6 +291,31 @@ function UploaderInner({
|
|
|
287
291
|
</View>
|
|
288
292
|
</Field>
|
|
289
293
|
|
|
294
|
+
{explorerItems !== undefined ? (
|
|
295
|
+
<Dialog
|
|
296
|
+
closeOnBackdrop
|
|
297
|
+
interactionPolicy={interactionPolicy}
|
|
298
|
+
onDismiss={() => setExplorerOpen(false)}
|
|
299
|
+
title="Select from collection"
|
|
300
|
+
visible={explorerOpen}
|
|
301
|
+
>
|
|
302
|
+
<Explorer
|
|
303
|
+
items={explorerItems}
|
|
304
|
+
height={360}
|
|
305
|
+
interactionPolicy={interactionPolicy}
|
|
306
|
+
onActivate={({ id }) => {
|
|
307
|
+
const chosen = explorerItems.find((item) => item.id === id)?.uploadAsset;
|
|
308
|
+
setExplorerOpen(false);
|
|
309
|
+
if (chosen) {
|
|
310
|
+
void acceptPicked(chosen).catch((error: unknown) => {
|
|
311
|
+
if (isMounted()) setInternalError(formatUnknownError(error));
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
}}
|
|
315
|
+
/>
|
|
316
|
+
</Dialog>
|
|
317
|
+
) : null}
|
|
318
|
+
|
|
290
319
|
{canPreviewImage ? (
|
|
291
320
|
<Dialog
|
|
292
321
|
closeOnBackdrop
|
|
@@ -54,6 +54,7 @@ export const uploaderMeta = {
|
|
|
54
54
|
type: { type: 'enum', category: 'Selection', enum: ['image', 'video', 'document', 'file'] },
|
|
55
55
|
accept: { type: 'string', category: 'Validation' },
|
|
56
56
|
maxSizeBytes: { type: 'number', category: 'Validation' },
|
|
57
|
+
explorerItems: { type: 'array', category: 'Selection', label: 'App-owned collection' },
|
|
57
58
|
required: { type: 'boolean', category: 'Validation' },
|
|
58
59
|
disabled: { type: 'boolean', category: 'State' },
|
|
59
60
|
readOnly: { type: 'boolean', category: 'State' },
|
package/src/index.ts
CHANGED
|
@@ -169,6 +169,20 @@ export {
|
|
|
169
169
|
type EmptyStateAction,
|
|
170
170
|
type EmptyStateProps,
|
|
171
171
|
} from './features/empty-state/public';
|
|
172
|
+
export type {
|
|
173
|
+
ExplorerActivateEvent,
|
|
174
|
+
ExplorerItem,
|
|
175
|
+
ExplorerItemKind,
|
|
176
|
+
ExplorerProps,
|
|
177
|
+
ExplorerSelectionChangeEvent,
|
|
178
|
+
ExplorerSelectionMode,
|
|
179
|
+
} from './features/explorer/public';
|
|
180
|
+
export {
|
|
181
|
+
Explorer,
|
|
182
|
+
FileExplorer,
|
|
183
|
+
MediaExplorer,
|
|
184
|
+
resolveExplorerSelection,
|
|
185
|
+
} from './features/explorer/public';
|
|
172
186
|
export {
|
|
173
187
|
Checkbox,
|
|
174
188
|
CheckboxGroup,
|
|
@@ -249,6 +263,8 @@ export type {
|
|
|
249
263
|
GradientRendererProviderProps,
|
|
250
264
|
} from './features/gradient/public';
|
|
251
265
|
export { Gradient, GradientRendererProvider } from './features/gradient/public';
|
|
266
|
+
export type { GridViewProps, TileGridItem, TileGridProps } from './features/grid-view/public';
|
|
267
|
+
export { GridView, layoutTileGrid, TileGrid } from './features/grid-view/public';
|
|
252
268
|
export {
|
|
253
269
|
Hero,
|
|
254
270
|
type HeroAction,
|
|
@@ -494,6 +510,7 @@ export { Text } from './features/typography/public';
|
|
|
494
510
|
export type {
|
|
495
511
|
UploadAsset,
|
|
496
512
|
UploadAssetBase,
|
|
513
|
+
UploaderExplorerItem,
|
|
497
514
|
UploaderProps,
|
|
498
515
|
UploadProgressContext,
|
|
499
516
|
UploadType,
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { ZoraBaseProps } from './base';
|
|
2
|
+
|
|
3
|
+
/** Portable catalogue row. Providers retain permissions, pagination and storage objects. */
|
|
4
|
+
export type ExplorerItemKind = 'image' | 'video' | 'audio' | 'document' | 'file' | 'folder';
|
|
5
|
+
|
|
6
|
+
export interface ExplorerItem {
|
|
7
|
+
readonly id: string;
|
|
8
|
+
readonly kind: ExplorerItemKind;
|
|
9
|
+
readonly name: string;
|
|
10
|
+
readonly thumbnailUri?: string;
|
|
11
|
+
readonly uri?: string;
|
|
12
|
+
readonly contentType?: string;
|
|
13
|
+
readonly sizeBytes?: number;
|
|
14
|
+
readonly durationSeconds?: number;
|
|
15
|
+
readonly providerId?: string;
|
|
16
|
+
readonly disabled?: boolean;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export type ExplorerSelectionMode = 'single' | 'multi';
|
|
20
|
+
|
|
21
|
+
export interface ExplorerActivateEvent {
|
|
22
|
+
readonly id: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface ExplorerSelectionChangeEvent {
|
|
26
|
+
readonly selectedIds: readonly string[];
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface ExplorerProps extends ZoraBaseProps {
|
|
30
|
+
items: readonly ExplorerItem[];
|
|
31
|
+
selectionMode?: ExplorerSelectionMode;
|
|
32
|
+
selectedIds?: readonly string[];
|
|
33
|
+
defaultSelectedIds?: readonly string[];
|
|
34
|
+
onSelectionChange?: (event: ExplorerSelectionChangeEvent) => void;
|
|
35
|
+
onActivate?: (event: ExplorerActivateEvent) => void;
|
|
36
|
+
width?: number;
|
|
37
|
+
height?: number;
|
|
38
|
+
tileSize?: number;
|
|
39
|
+
zoom?: number;
|
|
40
|
+
loading?: boolean;
|
|
41
|
+
errorText?: string;
|
|
42
|
+
emptyText?: string;
|
|
43
|
+
disabled?: boolean;
|
|
44
|
+
readOnly?: boolean;
|
|
45
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { GridRectItem, GridViewport } from '@ankhorage/grid-view';
|
|
2
|
+
import type React from 'react';
|
|
3
|
+
|
|
4
|
+
import type { ZoraBaseProps } from './base';
|
|
5
|
+
|
|
6
|
+
/** The renderer owns presentation only; world geometry comes from grid-view. */
|
|
7
|
+
export interface GridViewProps extends ZoraBaseProps {
|
|
8
|
+
items: readonly GridRectItem[];
|
|
9
|
+
contentWidth: number;
|
|
10
|
+
contentHeight: number;
|
|
11
|
+
width: number;
|
|
12
|
+
height: number;
|
|
13
|
+
zoom?: number;
|
|
14
|
+
overscanPixels?: number;
|
|
15
|
+
onViewportChange?: (viewport: GridViewport) => void;
|
|
16
|
+
renderItem: (item: GridRectItem) => React.ReactNode;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/** An item needs a stable ID; visual positioning belongs to the TileGrid composition. */
|
|
20
|
+
export interface TileGridItem {
|
|
21
|
+
readonly id: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/** Reusable tile presentation based on the generic world/viewport engine. */
|
|
25
|
+
export interface TileGridProps extends ZoraBaseProps {
|
|
26
|
+
items: readonly TileGridItem[];
|
|
27
|
+
width?: number;
|
|
28
|
+
height?: number;
|
|
29
|
+
tileSize?: number;
|
|
30
|
+
gap?: number;
|
|
31
|
+
zoom?: number;
|
|
32
|
+
overscanPixels?: number;
|
|
33
|
+
renderItem: (item: TileGridItem) => React.ReactNode;
|
|
34
|
+
}
|
package/src/types/upload.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
|
|
3
3
|
import type { ZoraBaseProps } from './base';
|
|
4
|
+
import type { ExplorerItem } from './explorer';
|
|
4
5
|
|
|
5
6
|
export type UploadType = 'image' | 'video' | 'document' | 'file';
|
|
6
7
|
|
|
@@ -42,6 +43,8 @@ export interface ValidateUploadAssetInput {
|
|
|
42
43
|
validate?: (asset: UploadAsset) => string | undefined;
|
|
43
44
|
}
|
|
44
45
|
|
|
46
|
+
export type UploaderExplorerItem = ExplorerItem & { readonly uploadAsset: UploadAsset };
|
|
47
|
+
|
|
45
48
|
export interface UploaderProps extends ZoraBaseProps {
|
|
46
49
|
value?: UploadAsset | null;
|
|
47
50
|
onChange?: (next: UploadAsset | null) => void;
|
|
@@ -62,6 +65,8 @@ export interface UploaderProps extends ZoraBaseProps {
|
|
|
62
65
|
disabled?: boolean;
|
|
63
66
|
readOnly?: boolean;
|
|
64
67
|
validatePicked?: (asset: UploadAsset) => string | undefined;
|
|
68
|
+
/** If supplied, Uploader opens the canonical app-owned Explorer instead of an OS picker. */
|
|
69
|
+
explorerItems?: readonly UploaderExplorerItem[];
|
|
65
70
|
onUpload?: (asset: UploadAsset, context: UploadProgressContext) => Promise<UploadAsset>;
|
|
66
71
|
onRemove?: (current: UploadAsset) => void | Promise<void>;
|
|
67
72
|
aspectRatio?: number;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import {
|
|
3
|
-
require_cjs
|
|
4
|
-
} from "./Accordion-sek2q4r1.js";
|
|
5
2
|
import {
|
|
6
3
|
withZoraThemeScope
|
|
7
|
-
} from "./Accordion-
|
|
4
|
+
} from "./Accordion-42jfy1a1.js";
|
|
8
5
|
import {
|
|
9
6
|
View2
|
|
10
|
-
} from "./Accordion-
|
|
7
|
+
} from "./Accordion-f0jsd9f9.js";
|
|
8
|
+
import {
|
|
9
|
+
require_cjs
|
|
10
|
+
} from "./Accordion-xgpzh4wq.js";
|
|
11
11
|
import {
|
|
12
12
|
__toESM
|
|
13
13
|
} from "./Accordion-nh0cs9hq.js";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
withZoraThemeScope
|
|
4
|
-
} from "./Accordion-
|
|
4
|
+
} from "./Accordion-42jfy1a1.js";
|
|
5
5
|
import {
|
|
6
6
|
View2
|
|
7
|
-
} from "./Accordion-
|
|
7
|
+
} from "./Accordion-f0jsd9f9.js";
|
|
8
8
|
import {
|
|
9
9
|
Heading2,
|
|
10
10
|
Text3
|
|
11
|
-
} from "./Accordion-
|
|
11
|
+
} from "./Accordion-afmybp67.js";
|
|
12
12
|
|
|
13
13
|
// src/features/section/adapters/inbound/SectionHeader.tsx
|
|
14
14
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,23 +1,25 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
View3
|
|
4
|
-
} from "./Accordion-
|
|
4
|
+
} from "./Accordion-z5a0tx18.js";
|
|
5
5
|
import {
|
|
6
|
-
require_cjs,
|
|
7
6
|
useTheme
|
|
8
|
-
} from "./Accordion-
|
|
7
|
+
} from "./Accordion-6wrr910w.js";
|
|
9
8
|
import {
|
|
10
9
|
Surface3
|
|
11
|
-
} from "./Accordion-
|
|
10
|
+
} from "./Accordion-2nesr9cv.js";
|
|
12
11
|
import {
|
|
13
12
|
Text2
|
|
14
|
-
} from "./Accordion-
|
|
13
|
+
} from "./Accordion-wyxmd0n0.js";
|
|
15
14
|
import {
|
|
16
15
|
Portal
|
|
17
16
|
} from "./Accordion-0gfsj9qh.js";
|
|
18
17
|
import {
|
|
19
18
|
resolveOverlayAnimation
|
|
20
19
|
} from "./Accordion-n7y08rz5.js";
|
|
20
|
+
import {
|
|
21
|
+
require_cjs
|
|
22
|
+
} from "./Accordion-xgpzh4wq.js";
|
|
21
23
|
import {
|
|
22
24
|
__toESM
|
|
23
25
|
} from "./Accordion-nh0cs9hq.js";
|