@ankhorage/zora 24.0.2 → 24.1.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 -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 +5 -4
- 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-2bsecqwf.js → Accordion-2rdr13ef.js} +4 -4
- package/web-dist/chunks/{Accordion-rkt7qdmj.js → Accordion-3fad6gww.js} +2 -2
- package/web-dist/chunks/{Accordion-ae7m1dkn.js → Accordion-3k6x7g4q.js} +2 -2
- package/web-dist/chunks/{Accordion-74rt38d4.js → Accordion-42jfy1a1.js} +1 -1
- package/web-dist/chunks/{Accordion-7bb37pdc.js → Accordion-47awmm2f.js} +7 -7
- package/web-dist/chunks/{Accordion-2csc57rv.js → Accordion-47cnyap4.js} +2 -2
- package/web-dist/chunks/{Accordion-3f5vnfk8.js → Accordion-490vgrft.js} +7 -7
- package/web-dist/chunks/{Accordion-nay7yexy.js → Accordion-5q8dv4y8.js} +13 -11
- package/web-dist/chunks/{Accordion-2afa2z5x.js → Accordion-6a6cwfjb.js} +4 -4
- package/web-dist/chunks/Accordion-6wrr910w.js +5227 -0
- package/web-dist/chunks/{Accordion-ansfkmye.js → Accordion-7m0y4jgc.js} +5 -5
- package/web-dist/chunks/{Accordion-g0c439br.js → Accordion-98hfbrnb.js} +4 -2
- package/web-dist/chunks/{Accordion-x5v1p4df.js → Accordion-a3z0540w.js} +7 -5
- package/web-dist/chunks/{Accordion-sek2q4r1.js → Accordion-a7wn61wr.js} +1 -5226
- package/web-dist/chunks/{Accordion-7rvtpcwt.js → Accordion-af9anhgv.js} +6 -6
- package/web-dist/chunks/{Accordion-x3tphbvw.js → Accordion-bff0p3x4.js} +1 -1
- package/web-dist/chunks/{Accordion-sxfqnnx6.js → Accordion-c5pxbx8e.js} +12 -10
- package/web-dist/chunks/{Accordion-q1mnv5g8.js → Accordion-c5wknya9.js} +5 -5
- package/web-dist/chunks/{Accordion-jkhq422b.js → Accordion-c6zjnt98.js} +2 -2
- package/web-dist/chunks/{Accordion-3hg1wprb.js → Accordion-c9jsd4sy.js} +1 -1
- package/web-dist/chunks/{Accordion-fvkwq99h.js → Accordion-cj4e5325.js} +6 -4
- package/web-dist/chunks/Accordion-eh59qjm1.js +179 -0
- package/web-dist/chunks/{Accordion-y2eyyqrk.js → Accordion-emf4yhcn.js} +10 -10
- package/web-dist/chunks/{Accordion-cs8k948c.js → Accordion-f1ptzxra.js} +8 -6
- package/web-dist/chunks/{Accordion-rg763dfb.js → Accordion-ffge2fn8.js} +8 -17
- package/web-dist/chunks/Accordion-fwyetyzc.js +197 -0
- package/web-dist/chunks/{Accordion-vewrj1kr.js → Accordion-h00vevas.js} +8 -6
- package/web-dist/chunks/{Accordion-h46676ex.js → Accordion-h1hb2d5y.js} +1 -1
- package/web-dist/chunks/{Accordion-sxzax4x4.js → Accordion-h21jdam6.js} +6 -4
- package/web-dist/chunks/{Accordion-brt4drx3.js → Accordion-hx39hem4.js} +11 -9
- package/web-dist/chunks/{Accordion-mdc214tk.js → Accordion-kjn8new9.js} +12 -12
- package/web-dist/chunks/{Accordion-9rhbc32v.js → Accordion-msjhrna3.js} +16 -14
- package/web-dist/chunks/Accordion-n4et7etk.js +14 -0
- package/web-dist/chunks/{Accordion-122fdtp0.js → Accordion-np8jpwm8.js} +7 -7
- package/web-dist/chunks/{Accordion-qj4qxx1p.js → Accordion-p33wjesc.js} +7 -7
- package/web-dist/chunks/{Accordion-0acrkcyd.js → Accordion-pktrmmvq.js} +4 -4
- package/web-dist/chunks/{Accordion-apwk2wjr.js → Accordion-qhcdxcxb.js} +2 -2
- package/web-dist/chunks/{Accordion-2d3hbryv.js → Accordion-qjr9ampf.js} +8 -8
- package/web-dist/chunks/{Accordion-jdwwf626.js → Accordion-r4py4qbs.js} +3 -3
- package/web-dist/chunks/{Accordion-avnt7nkz.js → Accordion-rsnk1yeg.js} +1 -1
- package/web-dist/chunks/{Accordion-nj9g6p48.js → Accordion-sh03jzm0.js} +11 -9
- package/web-dist/chunks/{Accordion-kpxyryke.js → Accordion-sj27tnvp.js} +4 -2
- package/web-dist/chunks/{Accordion-kcwdwd5z.js → Accordion-skmtsnr8.js} +10 -8
- package/web-dist/chunks/{Accordion-jtrpmvzs.js → Accordion-sr18rge3.js} +6 -6
- package/web-dist/chunks/{Accordion-1dah5bqg.js → Accordion-srjya6dz.js} +1 -1
- package/web-dist/chunks/{Accordion-7q1qf7c0.js → Accordion-ttk69tar.js} +7 -5
- package/web-dist/chunks/{Accordion-3rv8psbv.js → Accordion-vksbj2df.js} +4 -4
- package/web-dist/chunks/{Accordion-kpap0trj.js → Accordion-wbd341v2.js} +1 -1
- package/web-dist/chunks/{Accordion-2q6p67xe.js → Accordion-wbt5fe1h.js} +7 -5
- package/web-dist/chunks/{Accordion-t3hm5tcv.js → Accordion-wfn9habd.js} +7 -7
- package/web-dist/chunks/{Accordion-k8tfv274.js → Accordion-x55arrbb.js} +8 -6
- package/web-dist/chunks/{Accordion-nanvzve9.js → Accordion-xtgssemg.js} +5 -5
- package/web-dist/chunks/{Accordion-qsxx5q34.js → Accordion-y3edx3we.js} +12 -10
- package/web-dist/chunks/{Accordion-hwd5ntgm.js → Accordion-y64jfgw4.js} +2 -2
- package/web-dist/chunks/{Accordion-egq42kdy.js → Accordion-zhhsrp7z.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 +1682 -1431
- package/web-dist/runtime/ZoraProvider.js +14 -12
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
/** Framework-bound Explorer is a composition primitive, not a separate manifest shape. */
|
|
2
|
+
export declare const explorerMeta: {
|
|
3
|
+
readonly name: "Explorer";
|
|
4
|
+
readonly category: "pattern";
|
|
5
|
+
readonly directManifestNode: false;
|
|
6
|
+
readonly note: "Shared code-only Explorer composition; MediaExplorer and FileExplorer own manifest representation.";
|
|
7
|
+
readonly allowedChildren: readonly [];
|
|
8
|
+
readonly props: {};
|
|
9
|
+
};
|
|
10
|
+
export declare const mediaExplorerMeta: {
|
|
11
|
+
readonly name: "MediaExplorer";
|
|
12
|
+
readonly category: "pattern";
|
|
13
|
+
readonly description: "Virtualized media library with normalized selection and activation events.";
|
|
14
|
+
readonly directManifestNode: true;
|
|
15
|
+
readonly allowedChildren: readonly [];
|
|
16
|
+
readonly blueprint: {
|
|
17
|
+
readonly label: "Media explorer";
|
|
18
|
+
readonly defaultProps: {
|
|
19
|
+
readonly items: readonly [];
|
|
20
|
+
readonly selectionMode: "single";
|
|
21
|
+
readonly tileSize: 120;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
readonly events: {
|
|
25
|
+
readonly selectionChange: {
|
|
26
|
+
readonly label: "Selection change";
|
|
27
|
+
readonly eventType: "explorer.selectionChange";
|
|
28
|
+
readonly payloadFields: readonly [{
|
|
29
|
+
readonly path: "selectedIds";
|
|
30
|
+
readonly type: "unknown";
|
|
31
|
+
}];
|
|
32
|
+
};
|
|
33
|
+
readonly activate: {
|
|
34
|
+
readonly label: "Activate item";
|
|
35
|
+
readonly eventType: "explorer.activate";
|
|
36
|
+
readonly payloadFields: readonly [{
|
|
37
|
+
readonly path: "id";
|
|
38
|
+
readonly type: "string";
|
|
39
|
+
}];
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
readonly props: {
|
|
43
|
+
readonly items: {
|
|
44
|
+
readonly type: "array";
|
|
45
|
+
readonly category: "Data";
|
|
46
|
+
readonly itemSchema: readonly [{
|
|
47
|
+
readonly key: "id";
|
|
48
|
+
readonly schema: {
|
|
49
|
+
readonly type: "string";
|
|
50
|
+
readonly category: "Identity";
|
|
51
|
+
};
|
|
52
|
+
}, {
|
|
53
|
+
readonly key: "kind";
|
|
54
|
+
readonly schema: {
|
|
55
|
+
readonly type: "enum";
|
|
56
|
+
readonly category: "Data";
|
|
57
|
+
readonly enum: readonly ["image", "video", "audio", "document", "file", "folder"];
|
|
58
|
+
};
|
|
59
|
+
}, {
|
|
60
|
+
readonly key: "name";
|
|
61
|
+
readonly schema: {
|
|
62
|
+
readonly type: "string";
|
|
63
|
+
readonly category: "Content";
|
|
64
|
+
};
|
|
65
|
+
}, {
|
|
66
|
+
readonly key: "uri";
|
|
67
|
+
readonly schema: {
|
|
68
|
+
readonly type: "string";
|
|
69
|
+
readonly category: "Data";
|
|
70
|
+
};
|
|
71
|
+
}, {
|
|
72
|
+
readonly key: "thumbnailUri";
|
|
73
|
+
readonly schema: {
|
|
74
|
+
readonly type: "string";
|
|
75
|
+
readonly category: "Media";
|
|
76
|
+
};
|
|
77
|
+
}, {
|
|
78
|
+
readonly key: "contentType";
|
|
79
|
+
readonly schema: {
|
|
80
|
+
readonly type: "string";
|
|
81
|
+
readonly category: "Data";
|
|
82
|
+
};
|
|
83
|
+
}, {
|
|
84
|
+
readonly key: "sizeBytes";
|
|
85
|
+
readonly schema: {
|
|
86
|
+
readonly type: "number";
|
|
87
|
+
readonly category: "Data";
|
|
88
|
+
};
|
|
89
|
+
}, {
|
|
90
|
+
readonly key: "providerId";
|
|
91
|
+
readonly schema: {
|
|
92
|
+
readonly type: "string";
|
|
93
|
+
readonly category: "Identity";
|
|
94
|
+
};
|
|
95
|
+
}, {
|
|
96
|
+
readonly key: "disabled";
|
|
97
|
+
readonly schema: {
|
|
98
|
+
readonly type: "boolean";
|
|
99
|
+
readonly category: "State";
|
|
100
|
+
};
|
|
101
|
+
}];
|
|
102
|
+
};
|
|
103
|
+
readonly selectionMode: {
|
|
104
|
+
readonly type: "enum";
|
|
105
|
+
readonly category: "Selection";
|
|
106
|
+
readonly enum: readonly ["single", "multi"];
|
|
107
|
+
readonly default: "single";
|
|
108
|
+
};
|
|
109
|
+
readonly selectedIds: {
|
|
110
|
+
readonly type: "array";
|
|
111
|
+
readonly category: "Selection";
|
|
112
|
+
};
|
|
113
|
+
readonly tileSize: {
|
|
114
|
+
readonly type: "number";
|
|
115
|
+
readonly category: "Layout";
|
|
116
|
+
readonly default: 120;
|
|
117
|
+
};
|
|
118
|
+
readonly height: {
|
|
119
|
+
readonly type: "number";
|
|
120
|
+
readonly category: "Layout";
|
|
121
|
+
readonly default: 440;
|
|
122
|
+
};
|
|
123
|
+
readonly zoom: {
|
|
124
|
+
readonly type: "number";
|
|
125
|
+
readonly category: "Layout";
|
|
126
|
+
readonly default: 1;
|
|
127
|
+
};
|
|
128
|
+
readonly loading: {
|
|
129
|
+
readonly type: "boolean";
|
|
130
|
+
readonly category: "State";
|
|
131
|
+
};
|
|
132
|
+
readonly errorText: {
|
|
133
|
+
readonly type: "string";
|
|
134
|
+
readonly category: "State";
|
|
135
|
+
};
|
|
136
|
+
readonly emptyText: {
|
|
137
|
+
readonly type: "string";
|
|
138
|
+
readonly category: "Content";
|
|
139
|
+
};
|
|
140
|
+
readonly disabled: {
|
|
141
|
+
readonly type: "boolean";
|
|
142
|
+
readonly category: "State";
|
|
143
|
+
};
|
|
144
|
+
readonly readOnly: {
|
|
145
|
+
readonly type: "boolean";
|
|
146
|
+
readonly category: "State";
|
|
147
|
+
};
|
|
148
|
+
readonly onSelectionChange: {
|
|
149
|
+
readonly type: "action";
|
|
150
|
+
readonly category: "Events";
|
|
151
|
+
};
|
|
152
|
+
readonly onActivate: {
|
|
153
|
+
readonly type: "action";
|
|
154
|
+
readonly category: "Events";
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
};
|
|
158
|
+
export declare const fileExplorerMeta: {
|
|
159
|
+
readonly name: "FileExplorer";
|
|
160
|
+
readonly category: "pattern";
|
|
161
|
+
readonly description: "Virtualized file and folder collection with normalized selection and activation.";
|
|
162
|
+
readonly directManifestNode: true;
|
|
163
|
+
readonly allowedChildren: readonly [];
|
|
164
|
+
readonly blueprint: {
|
|
165
|
+
readonly label: "File explorer";
|
|
166
|
+
readonly defaultProps: {
|
|
167
|
+
readonly items: readonly [];
|
|
168
|
+
readonly selectionMode: "single";
|
|
169
|
+
readonly tileSize: 120;
|
|
170
|
+
};
|
|
171
|
+
};
|
|
172
|
+
readonly events: {
|
|
173
|
+
readonly selectionChange: {
|
|
174
|
+
readonly label: "Selection change";
|
|
175
|
+
readonly eventType: "explorer.selectionChange";
|
|
176
|
+
readonly payloadFields: readonly [{
|
|
177
|
+
readonly path: "selectedIds";
|
|
178
|
+
readonly type: "unknown";
|
|
179
|
+
}];
|
|
180
|
+
};
|
|
181
|
+
readonly activate: {
|
|
182
|
+
readonly label: "Activate item";
|
|
183
|
+
readonly eventType: "explorer.activate";
|
|
184
|
+
readonly payloadFields: readonly [{
|
|
185
|
+
readonly path: "id";
|
|
186
|
+
readonly type: "string";
|
|
187
|
+
}];
|
|
188
|
+
};
|
|
189
|
+
};
|
|
190
|
+
readonly props: {
|
|
191
|
+
readonly items: {
|
|
192
|
+
readonly type: "array";
|
|
193
|
+
readonly category: "Data";
|
|
194
|
+
readonly itemSchema: readonly [{
|
|
195
|
+
readonly key: "id";
|
|
196
|
+
readonly schema: {
|
|
197
|
+
readonly type: "string";
|
|
198
|
+
readonly category: "Identity";
|
|
199
|
+
};
|
|
200
|
+
}, {
|
|
201
|
+
readonly key: "kind";
|
|
202
|
+
readonly schema: {
|
|
203
|
+
readonly type: "enum";
|
|
204
|
+
readonly category: "Data";
|
|
205
|
+
readonly enum: readonly ["image", "video", "audio", "document", "file", "folder"];
|
|
206
|
+
};
|
|
207
|
+
}, {
|
|
208
|
+
readonly key: "name";
|
|
209
|
+
readonly schema: {
|
|
210
|
+
readonly type: "string";
|
|
211
|
+
readonly category: "Content";
|
|
212
|
+
};
|
|
213
|
+
}, {
|
|
214
|
+
readonly key: "uri";
|
|
215
|
+
readonly schema: {
|
|
216
|
+
readonly type: "string";
|
|
217
|
+
readonly category: "Data";
|
|
218
|
+
};
|
|
219
|
+
}, {
|
|
220
|
+
readonly key: "thumbnailUri";
|
|
221
|
+
readonly schema: {
|
|
222
|
+
readonly type: "string";
|
|
223
|
+
readonly category: "Media";
|
|
224
|
+
};
|
|
225
|
+
}, {
|
|
226
|
+
readonly key: "contentType";
|
|
227
|
+
readonly schema: {
|
|
228
|
+
readonly type: "string";
|
|
229
|
+
readonly category: "Data";
|
|
230
|
+
};
|
|
231
|
+
}, {
|
|
232
|
+
readonly key: "sizeBytes";
|
|
233
|
+
readonly schema: {
|
|
234
|
+
readonly type: "number";
|
|
235
|
+
readonly category: "Data";
|
|
236
|
+
};
|
|
237
|
+
}, {
|
|
238
|
+
readonly key: "providerId";
|
|
239
|
+
readonly schema: {
|
|
240
|
+
readonly type: "string";
|
|
241
|
+
readonly category: "Identity";
|
|
242
|
+
};
|
|
243
|
+
}, {
|
|
244
|
+
readonly key: "disabled";
|
|
245
|
+
readonly schema: {
|
|
246
|
+
readonly type: "boolean";
|
|
247
|
+
readonly category: "State";
|
|
248
|
+
};
|
|
249
|
+
}];
|
|
250
|
+
};
|
|
251
|
+
readonly selectionMode: {
|
|
252
|
+
readonly type: "enum";
|
|
253
|
+
readonly category: "Selection";
|
|
254
|
+
readonly enum: readonly ["single", "multi"];
|
|
255
|
+
readonly default: "single";
|
|
256
|
+
};
|
|
257
|
+
readonly selectedIds: {
|
|
258
|
+
readonly type: "array";
|
|
259
|
+
readonly category: "Selection";
|
|
260
|
+
};
|
|
261
|
+
readonly tileSize: {
|
|
262
|
+
readonly type: "number";
|
|
263
|
+
readonly category: "Layout";
|
|
264
|
+
readonly default: 120;
|
|
265
|
+
};
|
|
266
|
+
readonly height: {
|
|
267
|
+
readonly type: "number";
|
|
268
|
+
readonly category: "Layout";
|
|
269
|
+
readonly default: 440;
|
|
270
|
+
};
|
|
271
|
+
readonly zoom: {
|
|
272
|
+
readonly type: "number";
|
|
273
|
+
readonly category: "Layout";
|
|
274
|
+
readonly default: 1;
|
|
275
|
+
};
|
|
276
|
+
readonly loading: {
|
|
277
|
+
readonly type: "boolean";
|
|
278
|
+
readonly category: "State";
|
|
279
|
+
};
|
|
280
|
+
readonly errorText: {
|
|
281
|
+
readonly type: "string";
|
|
282
|
+
readonly category: "State";
|
|
283
|
+
};
|
|
284
|
+
readonly emptyText: {
|
|
285
|
+
readonly type: "string";
|
|
286
|
+
readonly category: "Content";
|
|
287
|
+
};
|
|
288
|
+
readonly disabled: {
|
|
289
|
+
readonly type: "boolean";
|
|
290
|
+
readonly category: "State";
|
|
291
|
+
};
|
|
292
|
+
readonly readOnly: {
|
|
293
|
+
readonly type: "boolean";
|
|
294
|
+
readonly category: "State";
|
|
295
|
+
};
|
|
296
|
+
readonly onSelectionChange: {
|
|
297
|
+
readonly type: "action";
|
|
298
|
+
readonly category: "Events";
|
|
299
|
+
};
|
|
300
|
+
readonly onActivate: {
|
|
301
|
+
readonly type: "action";
|
|
302
|
+
readonly category: "Events";
|
|
303
|
+
};
|
|
304
|
+
};
|
|
305
|
+
};
|
|
306
|
+
//# sourceMappingURL=meta.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/features/explorer/meta.ts"],"names":[],"mappings":"AAyDA,0FAA0F;AAC1F,eAAO,MAAM,YAAY;;;;;;;CAOa,CAAC;AAEvC,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAYQ,CAAC;AAEvC,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAYS,CAAC"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
const explorerProps = {
|
|
2
|
+
items: {
|
|
3
|
+
type: 'array',
|
|
4
|
+
category: 'Data',
|
|
5
|
+
itemSchema: [
|
|
6
|
+
{ key: 'id', schema: { type: 'string', category: 'Identity' } },
|
|
7
|
+
{
|
|
8
|
+
key: 'kind',
|
|
9
|
+
schema: {
|
|
10
|
+
type: 'enum',
|
|
11
|
+
category: 'Data',
|
|
12
|
+
enum: ['image', 'video', 'audio', 'document', 'file', 'folder'],
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
{ key: 'name', schema: { type: 'string', category: 'Content' } },
|
|
16
|
+
{ key: 'uri', schema: { type: 'string', category: 'Data' } },
|
|
17
|
+
{ key: 'thumbnailUri', schema: { type: 'string', category: 'Media' } },
|
|
18
|
+
{ key: 'contentType', schema: { type: 'string', category: 'Data' } },
|
|
19
|
+
{ key: 'sizeBytes', schema: { type: 'number', category: 'Data' } },
|
|
20
|
+
{ key: 'providerId', schema: { type: 'string', category: 'Identity' } },
|
|
21
|
+
{ key: 'disabled', schema: { type: 'boolean', category: 'State' } },
|
|
22
|
+
],
|
|
23
|
+
},
|
|
24
|
+
selectionMode: {
|
|
25
|
+
type: 'enum',
|
|
26
|
+
category: 'Selection',
|
|
27
|
+
enum: ['single', 'multi'],
|
|
28
|
+
default: 'single',
|
|
29
|
+
},
|
|
30
|
+
selectedIds: { type: 'array', category: 'Selection' },
|
|
31
|
+
tileSize: { type: 'number', category: 'Layout', default: 120 },
|
|
32
|
+
height: { type: 'number', category: 'Layout', default: 440 },
|
|
33
|
+
zoom: { type: 'number', category: 'Layout', default: 1 },
|
|
34
|
+
loading: { type: 'boolean', category: 'State' },
|
|
35
|
+
errorText: { type: 'string', category: 'State' },
|
|
36
|
+
emptyText: { type: 'string', category: 'Content' },
|
|
37
|
+
disabled: { type: 'boolean', category: 'State' },
|
|
38
|
+
readOnly: { type: 'boolean', category: 'State' },
|
|
39
|
+
onSelectionChange: { type: 'action', category: 'Events' },
|
|
40
|
+
onActivate: { type: 'action', category: 'Events' },
|
|
41
|
+
};
|
|
42
|
+
const explorerEvents = {
|
|
43
|
+
selectionChange: {
|
|
44
|
+
label: 'Selection change',
|
|
45
|
+
eventType: 'explorer.selectionChange',
|
|
46
|
+
payloadFields: [{ path: 'selectedIds', type: 'unknown' }],
|
|
47
|
+
},
|
|
48
|
+
activate: {
|
|
49
|
+
label: 'Activate item',
|
|
50
|
+
eventType: 'explorer.activate',
|
|
51
|
+
payloadFields: [{ path: 'id', type: 'string' }],
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
/** Framework-bound Explorer is a composition primitive, not a separate manifest shape. */
|
|
55
|
+
export const explorerMeta = {
|
|
56
|
+
name: 'Explorer',
|
|
57
|
+
category: 'pattern',
|
|
58
|
+
directManifestNode: false,
|
|
59
|
+
note: 'Shared code-only Explorer composition; MediaExplorer and FileExplorer own manifest representation.',
|
|
60
|
+
allowedChildren: [],
|
|
61
|
+
props: {},
|
|
62
|
+
};
|
|
63
|
+
export const mediaExplorerMeta = {
|
|
64
|
+
name: 'MediaExplorer',
|
|
65
|
+
category: 'pattern',
|
|
66
|
+
description: 'Virtualized media library with normalized selection and activation events.',
|
|
67
|
+
directManifestNode: true,
|
|
68
|
+
allowedChildren: [],
|
|
69
|
+
blueprint: {
|
|
70
|
+
label: 'Media explorer',
|
|
71
|
+
defaultProps: { items: [], selectionMode: 'single', tileSize: 120 },
|
|
72
|
+
},
|
|
73
|
+
events: explorerEvents,
|
|
74
|
+
props: explorerProps,
|
|
75
|
+
};
|
|
76
|
+
export const fileExplorerMeta = {
|
|
77
|
+
name: 'FileExplorer',
|
|
78
|
+
category: 'pattern',
|
|
79
|
+
description: 'Virtualized file and folder collection with normalized selection and activation.',
|
|
80
|
+
directManifestNode: true,
|
|
81
|
+
allowedChildren: [],
|
|
82
|
+
blueprint: {
|
|
83
|
+
label: 'File explorer',
|
|
84
|
+
defaultProps: { items: [], selectionMode: 'single', tileSize: 120 },
|
|
85
|
+
},
|
|
86
|
+
events: explorerEvents,
|
|
87
|
+
props: explorerProps,
|
|
88
|
+
};
|
|
89
|
+
//# sourceMappingURL=meta.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"meta.js","sourceRoot":"","sources":["../../../src/features/explorer/meta.ts"],"names":[],"mappings":"AAEA,MAAM,aAAa,GAAG;IACpB,KAAK,EAAE;QACL,IAAI,EAAE,OAAO;QACb,QAAQ,EAAE,MAAM;QAChB,UAAU,EAAE;YACV,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE;YAC/D;gBACE,GAAG,EAAE,MAAM;gBACX,MAAM,EAAE;oBACN,IAAI,EAAE,MAAM;oBACZ,QAAQ,EAAE,MAAM;oBAChB,IAAI,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC;iBAChE;aACF;YACD,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE;YAChE,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE;YAC5D,EAAE,GAAG,EAAE,cAAc,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE;YACtE,EAAE,GAAG,EAAE,aAAa,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE;YACpE,EAAE,GAAG,EAAE,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,IAAI;IACxB,eAAe,EAAE,EAAE;IACnB,SAAS,EAAE;QACT,KAAK,EAAE,eAAe;QACtB,YAAY,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,aAAa,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,EAAE;KACpE;IACD,MAAM,EAAE,cAAc;IACtB,KAAK,EAAE,aAAa;CACgB,CAAC","sourcesContent":["import type { ZoraComponentMeta } from '../../types/authoring';\n\nconst explorerProps = {\n items: {\n type: 'array',\n category: 'Data',\n itemSchema: [\n { key: 'id', schema: { type: 'string', category: 'Identity' } },\n {\n key: 'kind',\n schema: {\n type: 'enum',\n category: 'Data',\n enum: ['image', 'video', 'audio', 'document', 'file', 'folder'],\n },\n },\n { key: 'name', schema: { type: 'string', category: 'Content' } },\n { key: 'uri', schema: { type: 'string', category: 'Data' } },\n { key: 'thumbnailUri', schema: { type: 'string', category: 'Media' } },\n { key: 'contentType', schema: { type: 'string', category: 'Data' } },\n { key: 'sizeBytes', schema: { type: 'number', category: 'Data' } },\n { key: 'providerId', schema: { type: 'string', category: 'Identity' } },\n { key: 'disabled', schema: { type: 'boolean', category: 'State' } },\n ],\n },\n selectionMode: {\n type: 'enum',\n category: 'Selection',\n enum: ['single', 'multi'],\n default: 'single',\n },\n selectedIds: { type: 'array', category: 'Selection' },\n tileSize: { type: 'number', category: 'Layout', default: 120 },\n height: { type: 'number', category: 'Layout', default: 440 },\n zoom: { type: 'number', category: 'Layout', default: 1 },\n loading: { type: 'boolean', category: 'State' },\n errorText: { type: 'string', category: 'State' },\n emptyText: { type: 'string', category: 'Content' },\n disabled: { type: 'boolean', category: 'State' },\n readOnly: { type: 'boolean', category: 'State' },\n onSelectionChange: { type: 'action', category: 'Events' },\n onActivate: { type: 'action', category: 'Events' },\n} as const;\n\nconst explorerEvents = {\n selectionChange: {\n label: 'Selection change',\n eventType: 'explorer.selectionChange',\n payloadFields: [{ path: 'selectedIds', type: 'unknown' }],\n },\n activate: {\n label: 'Activate item',\n eventType: 'explorer.activate',\n payloadFields: [{ path: 'id', type: 'string' }],\n },\n} as const;\n\n/** Framework-bound Explorer is a composition primitive, not a separate manifest shape. */\nexport const explorerMeta = {\n name: 'Explorer',\n category: 'pattern',\n directManifestNode: false,\n note: 'Shared code-only Explorer composition; MediaExplorer and FileExplorer own manifest representation.',\n allowedChildren: [],\n props: {},\n} as const satisfies ZoraComponentMeta;\n\nexport const mediaExplorerMeta = {\n name: 'MediaExplorer',\n category: 'pattern',\n description: 'Virtualized media library with normalized selection and activation events.',\n directManifestNode: true,\n allowedChildren: [],\n blueprint: {\n label: 'Media explorer',\n defaultProps: { items: [], selectionMode: 'single', tileSize: 120 },\n },\n events: explorerEvents,\n props: explorerProps,\n} as const satisfies ZoraComponentMeta;\n\nexport const fileExplorerMeta = {\n name: 'FileExplorer',\n category: 'pattern',\n description: 'Virtualized file and folder collection with normalized selection and activation.',\n directManifestNode: true,\n allowedChildren: [],\n blueprint: {\n label: 'File explorer',\n defaultProps: { items: [], selectionMode: 'single', tileSize: 120 },\n },\n events: explorerEvents,\n props: explorerProps,\n} as const satisfies ZoraComponentMeta;\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export type { ExplorerActivateEvent, ExplorerItem, ExplorerItemKind, ExplorerProps, ExplorerSelectionChangeEvent, ExplorerSelectionMode, } from '../../types/explorer';
|
|
2
|
+
export { Explorer } from './adapters/inbound/Explorer';
|
|
3
|
+
export { FileExplorer } from './adapters/inbound/FileExplorer';
|
|
4
|
+
export { MediaExplorer } from './adapters/inbound/MediaExplorer';
|
|
5
|
+
export { resolveExplorerSelection } from './application/resolveExplorerSelection';
|
|
6
|
+
//# sourceMappingURL=public.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/features/explorer/public.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,qBAAqB,EACrB,YAAY,EACZ,gBAAgB,EAChB,aAAa,EACb,4BAA4B,EAC5B,qBAAqB,GACtB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,wBAAwB,EAAE,MAAM,wCAAwC,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { Explorer } from './adapters/inbound/Explorer';
|
|
2
|
+
export { FileExplorer } from './adapters/inbound/FileExplorer';
|
|
3
|
+
export { MediaExplorer } from './adapters/inbound/MediaExplorer';
|
|
4
|
+
export { resolveExplorerSelection } from './application/resolveExplorerSelection';
|
|
5
|
+
//# sourceMappingURL=public.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public.js","sourceRoot":"","sources":["../../../src/features/explorer/public.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,wBAAwB,EAAE,MAAM,wCAAwC,CAAC","sourcesContent":["export type {\n ExplorerActivateEvent,\n ExplorerItem,\n ExplorerItemKind,\n ExplorerProps,\n ExplorerSelectionChangeEvent,\n ExplorerSelectionMode,\n} from '../../types/explorer';\nexport { Explorer } from './adapters/inbound/Explorer';\nexport { FileExplorer } from './adapters/inbound/FileExplorer';\nexport { MediaExplorer } from './adapters/inbound/MediaExplorer';\nexport { resolveExplorerSelection } from './application/resolveExplorerSelection';\n"]}
|
|
@@ -3,7 +3,7 @@ export declare const gradientMeta: {
|
|
|
3
3
|
readonly category: "component";
|
|
4
4
|
readonly description: "Renders a host-backed gradient container for nested manifest content.";
|
|
5
5
|
readonly directManifestNode: true;
|
|
6
|
-
readonly allowedChildren: readonly ["ActivityIndicator", "AuthScreen", "ForgotPasswordForm", "OAuthProviderButton", "OAuthProviderList", "OtpForm", "SignInForm", "SignUpForm", "Accordion", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "DatePicker", "Dialog", "Pagination", "Rating", "SearchInput", "Tabs", "Toolbar", "Skeleton", "SkeletonCard", "SkeletonList", "SkeletonText", "IconButton", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "View", "ScrollView", "Grid", "Gradient", "Divider", "Text", "Heading", "Icon", "Image", "Hero", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "TimePicker", "Form", "Card", "EmptyState", "SectionHeader", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "Reader", "ContentRail", "MissingElement"];
|
|
6
|
+
readonly allowedChildren: readonly ["ActivityIndicator", "AuthScreen", "ForgotPasswordForm", "OAuthProviderButton", "OAuthProviderList", "OtpForm", "SignInForm", "SignUpForm", "Accordion", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "DatePicker", "Dialog", "Pagination", "Rating", "SearchInput", "Tabs", "Toolbar", "Skeleton", "SkeletonCard", "SkeletonList", "SkeletonText", "IconButton", "Uploader", "MediaExplorer", "FileExplorer", "FlatList", "SectionList", "BottomSheet", "ProductCard", "View", "ScrollView", "Grid", "Gradient", "Divider", "Text", "Heading", "Icon", "Image", "Hero", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "TimePicker", "Form", "Card", "EmptyState", "SectionHeader", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "Reader", "ContentRail", "MissingElement"];
|
|
7
7
|
readonly blueprint: {
|
|
8
8
|
readonly label: "Gradient";
|
|
9
9
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { GridViewProps } from '../../../../types/grid-view';
|
|
3
|
+
/***
|
|
4
|
+
* Renders world-positioned items on native and web using the canonical viewport/culling engine.
|
|
5
|
+
*
|
|
6
|
+
* This first renderer uses nested native scroll regions. Only visible items are mounted;
|
|
7
|
+
* logical cells and invisible elements are never rendered.
|
|
8
|
+
*/
|
|
9
|
+
export declare function GridView({ items, contentWidth, contentHeight, width, height, zoom, overscanPixels, interactionPolicy, onViewportChange, renderItem, testID, }: GridViewProps): React.JSX.Element;
|
|
10
|
+
//# sourceMappingURL=GridView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GridView.d.ts","sourceRoot":"","sources":["../../../../../src/features/grid-view/adapters/inbound/GridView.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAEjE;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,EACvB,KAAK,EACL,YAAY,EACZ,aAAa,EACb,KAAK,EACL,MAAM,EACN,IAAQ,EACR,cAAoB,EACpB,iBAAiB,EACjB,gBAAgB,EAChB,UAAU,EACV,MAAM,GACP,EAAE,aAAa,qBAsEf"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { getVisibleGridItems, worldToViewport } from '@ankhorage/grid-view';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { ScrollView as NativeScrollView, View as NativeView } from 'react-native';
|
|
4
|
+
/***
|
|
5
|
+
* Renders world-positioned items on native and web using the canonical viewport/culling engine.
|
|
6
|
+
*
|
|
7
|
+
* This first renderer uses nested native scroll regions. Only visible items are mounted;
|
|
8
|
+
* logical cells and invisible elements are never rendered.
|
|
9
|
+
*/
|
|
10
|
+
export function GridView({ items, contentWidth, contentHeight, width, height, zoom = 1, overscanPixels = 160, interactionPolicy, onViewportChange, renderItem, testID, }) {
|
|
11
|
+
const [scrollX, setScrollX] = React.useState(0);
|
|
12
|
+
const [scrollY, setScrollY] = React.useState(0);
|
|
13
|
+
const scale = Math.max(0.01, zoom);
|
|
14
|
+
const viewport = React.useMemo(() => ({
|
|
15
|
+
width,
|
|
16
|
+
height,
|
|
17
|
+
offsetX: scrollX / scale,
|
|
18
|
+
offsetY: scrollY / scale,
|
|
19
|
+
pixelsPerUnitX: scale,
|
|
20
|
+
pixelsPerUnitY: scale,
|
|
21
|
+
}), [height, scale, scrollX, scrollY, width]);
|
|
22
|
+
const visibleItems = React.useMemo(() => getVisibleGridItems(items, viewport, overscanPixels), [items, overscanPixels, viewport]);
|
|
23
|
+
React.useEffect(() => {
|
|
24
|
+
onViewportChange?.(viewport);
|
|
25
|
+
}, [onViewportChange, viewport]);
|
|
26
|
+
return (<NativeScrollView horizontal scrollEnabled={interactionPolicy !== 'passive'} scrollEventThrottle={32} showsHorizontalScrollIndicator style={{ width, height }} testID={testID} onScroll={(event) => setScrollX(event.nativeEvent.contentOffset.x)}>
|
|
27
|
+
<NativeScrollView scrollEnabled={interactionPolicy !== 'passive'} scrollEventThrottle={32} showsVerticalScrollIndicator style={{ width: contentWidth * scale, height }} onScroll={(event) => setScrollY(event.nativeEvent.contentOffset.y)}>
|
|
28
|
+
<NativeView style={{ width: contentWidth * scale, height: contentHeight * scale }}>
|
|
29
|
+
{visibleItems.map((item) => {
|
|
30
|
+
const position = worldToViewport({ x: item.x, y: item.y }, {
|
|
31
|
+
...viewport,
|
|
32
|
+
offsetX: 0,
|
|
33
|
+
offsetY: 0,
|
|
34
|
+
});
|
|
35
|
+
return (<NativeView key={item.id} style={{
|
|
36
|
+
position: 'absolute',
|
|
37
|
+
left: position.x,
|
|
38
|
+
top: position.y,
|
|
39
|
+
width: item.width * scale,
|
|
40
|
+
height: item.height * scale,
|
|
41
|
+
}}>
|
|
42
|
+
{renderItem(item)}
|
|
43
|
+
</NativeView>);
|
|
44
|
+
})}
|
|
45
|
+
</NativeView>
|
|
46
|
+
</NativeScrollView>
|
|
47
|
+
</NativeScrollView>);
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=GridView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GridView.js","sourceRoot":"","sources":["../../../../../src/features/grid-view/adapters/inbound/GridView.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAqB,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC/F,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,IAAI,gBAAgB,EAAE,IAAI,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AAIlF;;;;;GAKG;AACH,MAAM,UAAU,QAAQ,CAAC,EACvB,KAAK,EACL,YAAY,EACZ,aAAa,EACb,KAAK,EACL,MAAM,EACN,IAAI,GAAG,CAAC,EACR,cAAc,GAAG,GAAG,EACpB,iBAAiB,EACjB,gBAAgB,EAChB,UAAU,EACV,MAAM,GACQ;IACd,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IAChD,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IAChD,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACnC,MAAM,QAAQ,GAAG,KAAK,CAAC,OAAO,CAC5B,GAAG,EAAE,CAAC,CAAC;QACL,KAAK;QACL,MAAM;QACN,OAAO,EAAE,OAAO,GAAG,KAAK;QACxB,OAAO,EAAE,OAAO,GAAG,KAAK;QACxB,cAAc,EAAE,KAAK;QACrB,cAAc,EAAE,KAAK;KACtB,CAAC,EACF,CAAC,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC,CACzC,CAAC;IACF,MAAM,YAAY,GAAG,KAAK,CAAC,OAAO,CAChC,GAAG,EAAE,CAAC,mBAAmB,CAAC,KAAK,EAAE,QAAQ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AAI,CAAC,CAAC,EAAE,EACxB;gBACE,GAAG,QAAQ;gBACX,OAAO,EAAE,CAAC;gBACV,OAAO,EAAE,CAAC;aACX,CACF,CAAC;YACF,OAAO,CACL,CAAC,UAAU,CACT,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CACb,KAAK,CAAC,CAAC;oBACL,QAAQ,EAAE,UAAU;oBACpB,IAAI,EAAE,QAAQ,CAAC,CAAC;oBAChB,GAAG,EAAE,QAAQ,CAAC,CAAC;oBACf,KAAK,EAAE,IAAI,CAAC,KAAK,GAAG,KAAK;oBACzB,MAAM,EAAE,IAAI,CAAC,MAAM,GAAG,KAAK;iBAC5B,CAAC,CAEF;gBAAA,CAAC,UAAU,CAAC,IAAI,CAAC,CACnB;cAAA,EAAE,UAAU,CAAC,CACd,CAAC;QACJ,CAAC,CAAC,CACJ;QAAA,EAAE,UAAU,CACd;MAAA,EAAE,gBAAgB,CACpB;IAAA,EAAE,gBAAgB,CAAC,CACpB,CAAC;AACJ,CAAC","sourcesContent":["import { getVisibleGridItems, type GridViewport, worldToViewport } from '@ankhorage/grid-view';\nimport React from 'react';\nimport { ScrollView as NativeScrollView, View as NativeView } from 'react-native';\n\nimport type { GridViewProps } from '../../../../types/grid-view';\n\n/***\n * Renders world-positioned items on native and web using the canonical viewport/culling engine.\n *\n * This first renderer uses nested native scroll regions. Only visible items are mounted;\n * logical cells and invisible elements are never rendered.\n */\nexport function GridView({\n items,\n contentWidth,\n contentHeight,\n width,\n height,\n zoom = 1,\n overscanPixels = 160,\n interactionPolicy,\n onViewportChange,\n renderItem,\n testID,\n}: GridViewProps) {\n const [scrollX, setScrollX] = React.useState(0);\n const [scrollY, setScrollY] = React.useState(0);\n const scale = Math.max(0.01, zoom);\n const viewport = React.useMemo<GridViewport>(\n () => ({\n width,\n height,\n offsetX: scrollX / scale,\n offsetY: scrollY / scale,\n pixelsPerUnitX: scale,\n pixelsPerUnitY: scale,\n }),\n [height, scale, scrollX, scrollY, width],\n );\n const visibleItems = React.useMemo(\n () => getVisibleGridItems(items, viewport, overscanPixels),\n [items, overscanPixels, viewport],\n );\n\n React.useEffect(() => {\n onViewportChange?.(viewport);\n }, [onViewportChange, viewport]);\n\n return (\n <NativeScrollView\n horizontal\n scrollEnabled={interactionPolicy !== 'passive'}\n scrollEventThrottle={32}\n showsHorizontalScrollIndicator\n style={{ width, height }}\n testID={testID}\n onScroll={(event) => setScrollX(event.nativeEvent.contentOffset.x)}\n >\n <NativeScrollView\n scrollEnabled={interactionPolicy !== 'passive'}\n scrollEventThrottle={32}\n showsVerticalScrollIndicator\n style={{ width: contentWidth * scale, height }}\n onScroll={(event) => setScrollY(event.nativeEvent.contentOffset.y)}\n >\n <NativeView style={{ width: contentWidth * scale, height: contentHeight * scale }}>\n {visibleItems.map((item) => {\n const position = worldToViewport(\n { x: item.x, y: item.y },\n {\n ...viewport,\n offsetX: 0,\n offsetY: 0,\n },\n );\n return (\n <NativeView\n key={item.id}\n style={{\n position: 'absolute',\n left: position.x,\n top: position.y,\n width: item.width * scale,\n height: item.height * scale,\n }}\n >\n {renderItem(item)}\n </NativeView>\n );\n })}\n </NativeView>\n </NativeScrollView>\n </NativeScrollView>\n );\n}\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { TileGridProps } from '../../../../types/grid-view';
|
|
3
|
+
/*** Composes a responsive, virtualized tile presentation over the generic GridView renderer. */
|
|
4
|
+
export declare function TileGrid({ items, width, height, tileSize, gap, zoom, overscanPixels, renderItem, interactionPolicy, testID, }: TileGridProps): React.JSX.Element;
|
|
5
|
+
//# sourceMappingURL=TileGrid.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TileGrid.d.ts","sourceRoot":"","sources":["../../../../../src/features/grid-view/adapters/inbound/TileGrid.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAIjE,gGAAgG;AAChG,wBAAgB,QAAQ,CAAC,EACvB,KAAK,EACL,KAAK,EACL,MAAY,EACZ,QAAc,EACd,GAAQ,EACR,IAAQ,EACR,cAAc,EACd,UAAU,EACV,iBAAiB,EACjB,MAAM,GACP,EAAE,aAAa,qBAiCf"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { View as NativeView } from 'react-native';
|
|
3
|
+
import { layoutTileGrid } from '../../application/layoutTileGrid';
|
|
4
|
+
import { GridView } from './GridView';
|
|
5
|
+
/*** Composes a responsive, virtualized tile presentation over the generic GridView renderer. */
|
|
6
|
+
export function TileGrid({ items, width, height = 440, tileSize = 120, gap = 12, zoom = 1, overscanPixels, renderItem, interactionPolicy, testID, }) {
|
|
7
|
+
const [measuredWidth, setMeasuredWidth] = React.useState(0);
|
|
8
|
+
const resolvedWidth = width ?? measuredWidth;
|
|
9
|
+
const layout = React.useMemo(() => layoutTileGrid(items, resolvedWidth, tileSize, gap, zoom), [items, resolvedWidth, tileSize, gap, zoom]);
|
|
10
|
+
const itemLookup = React.useMemo(() => new Map(items.map((item) => [item.id, item])), [items]);
|
|
11
|
+
return (<NativeView onLayout={(event) => setMeasuredWidth(event.nativeEvent.layout.width)} style={{ width, height, overflow: 'hidden' }} testID={testID}>
|
|
12
|
+
{resolvedWidth > 0 ? (<GridView contentHeight={layout.height} contentWidth={Math.max(resolvedWidth / zoom, layout.width)} height={height} interactionPolicy={interactionPolicy} items={layout.items} overscanPixels={overscanPixels} renderItem={(item) => {
|
|
13
|
+
const source = itemLookup.get(item.id);
|
|
14
|
+
return source ? renderItem(source) : null;
|
|
15
|
+
}} width={resolvedWidth} zoom={zoom}/>) : null}
|
|
16
|
+
</NativeView>);
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=TileGrid.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TileGrid.js","sourceRoot":"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KAAK,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,CAC7C,MAAM,CAAC,CAAC,MAAM,CAAC,CAEf;MAAA,CAAC,aAAa,GAAG,CAAC,CAAC,CAAC,CAAC,CACnB,CAAC,QAAQ,CACP,aAAa,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAC7B,YAAY,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,aAAa,GAAG,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAC3D,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,KAAK,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CACpB,cAAc,CAAC,CAAC,cAAc,CAAC,CAC/B,UAAU,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE;gBACnB,MAAM,MAAM,GAAG,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;gBACvC,OAAO,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;YAC5C,CAAC,CAAC,CACF,KAAK,CAAC,CAAC,aAAa,CAAC,CACrB,IAAI,CAAC,CAAC,IAAI,CAAC,EACX,CACH,CAAC,CAAC,CAAC,IAAI,CACV;IAAA,EAAE,UAAU,CAAC,CACd,CAAC;AACJ,CAAC","sourcesContent":["import React from 'react';\nimport { View as NativeView } from 'react-native';\n\nimport type { TileGridProps } from '../../../../types/grid-view';\nimport { layoutTileGrid } from '../../application/layoutTileGrid';\nimport { GridView } from './GridView';\n\n/*** Composes a responsive, virtualized tile presentation over the generic GridView renderer. */\nexport function TileGrid({\n items,\n width,\n height = 440,\n tileSize = 120,\n gap = 12,\n zoom = 1,\n overscanPixels,\n renderItem,\n interactionPolicy,\n testID,\n}: TileGridProps) {\n const [measuredWidth, setMeasuredWidth] = React.useState(0);\n const resolvedWidth = width ?? measuredWidth;\n const layout = React.useMemo(\n () => layoutTileGrid(items, resolvedWidth, tileSize, gap, zoom),\n [items, resolvedWidth, tileSize, gap, zoom],\n );\n const itemLookup = React.useMemo(() => new Map(items.map((item) => [item.id, item])), [items]);\n\n return (\n <NativeView\n onLayout={(event) => setMeasuredWidth(event.nativeEvent.layout.width)}\n style={{ width, height, overflow: 'hidden' }}\n testID={testID}\n >\n {resolvedWidth > 0 ? (\n <GridView\n contentHeight={layout.height}\n contentWidth={Math.max(resolvedWidth / zoom, layout.width)}\n height={height}\n interactionPolicy={interactionPolicy}\n items={layout.items}\n overscanPixels={overscanPixels}\n renderItem={(item) => {\n const source = itemLookup.get(item.id);\n return source ? renderItem(source) : null;\n }}\n width={resolvedWidth}\n zoom={zoom}\n />\n ) : null}\n </NativeView>\n );\n}\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { GridRectItem } from '@ankhorage/grid-view';
|
|
2
|
+
import type { TileGridItem } from '../../../types/grid-view';
|
|
3
|
+
/** A presentation-level spatial layout, expressed in engine-owned world rectangles. */
|
|
4
|
+
export interface TileGridLayout {
|
|
5
|
+
readonly items: readonly GridRectItem[];
|
|
6
|
+
readonly width: number;
|
|
7
|
+
readonly height: number;
|
|
8
|
+
readonly columns: number;
|
|
9
|
+
}
|
|
10
|
+
/*** Arrange keyed tiles into responsive rows without constructing placeholder grid cells. */
|
|
11
|
+
export declare function layoutTileGrid(items: readonly TileGridItem[], viewportWidth: number, tileSize: number, gap: number, zoom?: number): TileGridLayout;
|
|
12
|
+
//# sourceMappingURL=layoutTileGrid.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layoutTileGrid.d.ts","sourceRoot":"","sources":["../../../../src/features/grid-view/application/layoutTileGrid.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAE7D,uFAAuF;AACvF,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,KAAK,EAAE,SAAS,YAAY,EAAE,CAAC;IACxC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED,6FAA6F;AAC7F,wBAAgB,cAAc,CAC5B,KAAK,EAAE,SAAS,YAAY,EAAE,EAC9B,aAAa,EAAE,MAAM,EACrB,QAAQ,EAAE,MAAM,EAChB,GAAG,EAAE,MAAM,EACX,IAAI,SAAI,GACP,cAAc,CA0BhB"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/*** Arrange keyed tiles into responsive rows without constructing placeholder grid cells. */
|
|
2
|
+
export function layoutTileGrid(items, viewportWidth, tileSize, gap, zoom = 1) {
|
|
3
|
+
if (![viewportWidth, tileSize, gap, zoom].every(Number.isFinite) ||
|
|
4
|
+
viewportWidth < 0 ||
|
|
5
|
+
tileSize <= 0 ||
|
|
6
|
+
gap < 0 ||
|
|
7
|
+
zoom <= 0) {
|
|
8
|
+
throw new RangeError('Tile layout requires finite, nonnegative dimensions and positive scales.');
|
|
9
|
+
}
|
|
10
|
+
const columns = Math.max(1, Math.floor((viewportWidth / zoom + gap) / (tileSize + gap)));
|
|
11
|
+
const rows = Math.ceil(items.length / columns);
|
|
12
|
+
return {
|
|
13
|
+
columns,
|
|
14
|
+
width: columns * (tileSize + gap) - gap,
|
|
15
|
+
height: Math.max(0, rows * (tileSize + gap) - gap),
|
|
16
|
+
items: items.map((item, index) => ({
|
|
17
|
+
id: item.id,
|
|
18
|
+
x: (index % columns) * (tileSize + gap),
|
|
19
|
+
y: Math.floor(index / columns) * (tileSize + gap),
|
|
20
|
+
width: tileSize,
|
|
21
|
+
height: tileSize,
|
|
22
|
+
})),
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=layoutTileGrid.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layoutTileGrid.js","sourceRoot":"","sources":["../../../../src/features/grid-view/application/layoutTileGrid.ts"],"names":[],"mappings":"AAYA,6FAA6F;AAC7F,MAAM,UAAU,cAAc,CAC5B,KAA8B,EAC9B,aAAqB,EACrB,QAAgB,EAChB,GAAW,EACX,IAAI,GAAG,CAAC;IAER,IACE,CAAC,CAAC,aAAa,EAAE,QAAQ,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC;QAC5D,aAAa,GAAG,CAAC;QACjB,QAAQ,IAAI,CAAC;QACb,GAAG,GAAG,CAAC;QACP,IAAI,IAAI,CAAC,EACT,CAAC;QACD,MAAM,IAAI,UAAU,CAClB,0EAA0E,CAC3E,CAAC;IACJ,CAAC;IACD,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,aAAa,GAAG,IAAI,GAAG,GAAG,CAAC,GAAG,CAAC,QAAQ,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;IACzF,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,OAAO,CAAC,CAAC;IAC/C,OAAO;QACL,OAAO;QACP,KAAK,EAAE,OAAO,GAAG,CAAC,QAAQ,GAAG,GAAG,CAAC,GAAG,GAAG;QACvC,MAAM,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,QAAQ,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC;QAClD,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC;YACjC,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,CAAC,EAAE,CAAC,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,GAAG,GAAG,CAAC;YACvC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,GAAG,GAAG,CAAC;YACjD,KAAK,EAAE,QAAQ;YACf,MAAM,EAAE,QAAQ;SACjB,CAAC,CAAC;KACJ,CAAC;AACJ,CAAC","sourcesContent":["import type { GridRectItem } from '@ankhorage/grid-view';\n\nimport type { TileGridItem } from '../../../types/grid-view';\n\n/** A presentation-level spatial layout, expressed in engine-owned world rectangles. */\nexport interface TileGridLayout {\n readonly items: readonly GridRectItem[];\n readonly width: number;\n readonly height: number;\n readonly columns: number;\n}\n\n/*** Arrange keyed tiles into responsive rows without constructing placeholder grid cells. */\nexport function layoutTileGrid(\n items: readonly TileGridItem[],\n viewportWidth: number,\n tileSize: number,\n gap: number,\n zoom = 1,\n): TileGridLayout {\n if (\n ![viewportWidth, tileSize, gap, zoom].every(Number.isFinite) ||\n viewportWidth < 0 ||\n tileSize <= 0 ||\n gap < 0 ||\n zoom <= 0\n ) {\n throw new RangeError(\n 'Tile layout requires finite, nonnegative dimensions and positive scales.',\n );\n }\n const columns = Math.max(1, Math.floor((viewportWidth / zoom + gap) / (tileSize + gap)));\n const rows = Math.ceil(items.length / columns);\n return {\n columns,\n width: columns * (tileSize + gap) - gap,\n height: Math.max(0, rows * (tileSize + gap) - gap),\n items: items.map((item, index) => ({\n id: item.id,\n x: (index % columns) * (tileSize + gap),\n y: Math.floor(index / columns) * (tileSize + gap),\n width: tileSize,\n height: tileSize,\n })),\n };\n}\n"]}
|