@ankhorage/zora 28.10.1 → 28.11.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 +10 -0
- package/README.md +1 -1
- package/dist/features/flow/adapters/inbound/FlowCanvas.d.ts +5 -0
- package/dist/features/flow/adapters/inbound/FlowCanvas.d.ts.map +1 -0
- package/dist/features/flow/adapters/inbound/FlowCanvas.js +261 -0
- package/dist/features/flow/adapters/inbound/FlowCanvas.js.map +1 -0
- package/dist/features/flow/application/createFlowEditorController.d.ts +13 -0
- package/dist/features/flow/application/createFlowEditorController.d.ts.map +1 -0
- package/dist/features/flow/application/createFlowEditorController.js +86 -0
- package/dist/features/flow/application/createFlowEditorController.js.map +1 -0
- package/dist/features/flow/application/getFlowPortAnchor.d.ts +10 -0
- package/dist/features/flow/application/getFlowPortAnchor.d.ts.map +1 -0
- package/dist/features/flow/application/getFlowPortAnchor.js +18 -0
- package/dist/features/flow/application/getFlowPortAnchor.js.map +1 -0
- package/dist/features/flow/application/mapFlowViewport.d.ts +10 -0
- package/dist/features/flow/application/mapFlowViewport.d.ts.map +1 -0
- package/dist/features/flow/application/mapFlowViewport.js +22 -0
- package/dist/features/flow/application/mapFlowViewport.js.map +1 -0
- package/dist/features/flow/public.d.ts +3 -0
- package/dist/features/flow/public.d.ts.map +1 -0
- package/dist/features/flow/public.js +2 -0
- package/dist/features/flow/public.js.map +1 -0
- package/dist/features/graph-node/adapters/inbound/GraphNode.d.ts +5 -0
- package/dist/features/graph-node/adapters/inbound/GraphNode.d.ts.map +1 -0
- package/dist/features/graph-node/adapters/inbound/GraphNode.js +190 -0
- package/dist/features/graph-node/adapters/inbound/GraphNode.js.map +1 -0
- package/dist/features/graph-node/getGraphNodePortGeometry.d.ts +17 -0
- package/dist/features/graph-node/getGraphNodePortGeometry.d.ts.map +1 -0
- package/dist/features/graph-node/getGraphNodePortGeometry.js +23 -0
- package/dist/features/graph-node/getGraphNodePortGeometry.js.map +1 -0
- package/dist/features/graph-node/public.d.ts +3 -0
- package/dist/features/graph-node/public.d.ts.map +1 -0
- package/dist/features/graph-node/public.js +2 -0
- package/dist/features/graph-node/public.js.map +1 -0
- package/dist/features/grid-view/adapters/inbound/GridView.d.ts +1 -1
- package/dist/features/grid-view/adapters/inbound/GridView.d.ts.map +1 -1
- package/dist/features/grid-view/adapters/inbound/GridView.js +105 -41
- package/dist/features/grid-view/adapters/inbound/GridView.js.map +1 -1
- package/dist/features/grid-view/application/createGridScrollSync.d.ts +2 -5
- package/dist/features/grid-view/application/createGridScrollSync.d.ts.map +1 -1
- package/dist/features/grid-view/application/createGridScrollSync.js +109 -45
- package/dist/features/grid-view/application/createGridScrollSync.js.map +1 -1
- package/dist/features/grid-view/public.d.ts +1 -1
- package/dist/features/grid-view/public.d.ts.map +1 -1
- package/dist/features/grid-view/public.js.map +1 -1
- package/dist/features/layout/utils/createScrollGestureLock.d.ts.map +1 -1
- package/dist/features/layout/utils/createScrollGestureLock.js +4 -0
- package/dist/features/layout/utils/createScrollGestureLock.js.map +1 -1
- package/dist/features/theme/node.d.ts +5 -0
- package/dist/features/theme/node.d.ts.map +1 -0
- package/dist/features/theme/node.js +4 -0
- package/dist/features/theme/node.js.map +1 -0
- package/dist/features/theme/public.d.ts +2 -0
- package/dist/features/theme/public.d.ts.map +1 -1
- package/dist/features/theme/public.js +1 -0
- package/dist/features/theme/public.js.map +1 -1
- package/dist/types/flow.d.ts +81 -0
- package/dist/types/flow.d.ts.map +1 -0
- package/dist/types/flow.js +2 -0
- package/dist/types/flow.js.map +1 -0
- package/dist/types/graph-node.d.ts +42 -0
- package/dist/types/graph-node.d.ts.map +1 -0
- package/dist/types/graph-node.js +2 -0
- package/dist/types/graph-node.js.map +1 -0
- package/dist/types/grid-view.d.ts +27 -3
- package/dist/types/grid-view.d.ts.map +1 -1
- package/dist/types/grid-view.js.map +1 -1
- package/dist/types/layout.d.ts +2 -0
- package/dist/types/layout.d.ts.map +1 -1
- package/dist/types/layout.js.map +1 -1
- package/package.json +21 -3
- package/src/features/flow/adapters/inbound/FlowCanvas.tsx +501 -0
- package/src/features/flow/application/createFlowEditorController.test.ts +146 -0
- package/src/features/flow/application/createFlowEditorController.ts +99 -0
- package/src/features/flow/application/getFlowPortAnchor.test.ts +23 -0
- package/src/features/flow/application/getFlowPortAnchor.ts +30 -0
- package/src/features/flow/application/mapFlowViewport.test.ts +11 -0
- package/src/features/flow/application/mapFlowViewport.ts +29 -0
- package/src/features/flow/public.test.ts +7 -0
- package/src/features/flow/public.ts +13 -0
- package/src/features/graph-node/adapters/inbound/GraphNode.test.tsx +80 -0
- package/src/features/graph-node/adapters/inbound/GraphNode.tsx +259 -0
- package/src/features/graph-node/getGraphNodePortGeometry.test.ts +35 -0
- package/src/features/graph-node/getGraphNodePortGeometry.ts +41 -0
- package/src/features/graph-node/public.test.ts +7 -0
- package/src/features/graph-node/public.ts +2 -0
- package/src/features/grid-view/adapters/inbound/GridView.nativeScrollSync.test.tsx +198 -7
- package/src/features/grid-view/adapters/inbound/GridView.tsx +248 -145
- package/src/features/grid-view/application/createGridScrollSync.test.ts +46 -17
- package/src/features/grid-view/application/createGridScrollSync.ts +100 -43
- package/src/features/grid-view/public.ts +6 -1
- package/src/features/layout/utils/createScrollGestureLock.ts +4 -0
- package/src/features/theme/application/use-cases/compileZoraTheme.test.ts +1 -1
- package/src/features/theme/node.ts +18 -0
- package/src/features/theme/public.ts +7 -0
- package/src/platformAcceptance.test.ts +15 -11
- package/src/types/flow.ts +99 -0
- package/src/types/graph-node.ts +45 -0
- package/src/types/grid-view.ts +25 -3
- package/src/types/layout.ts +2 -0
- package/web-dist/chunks/{Accordion-9dq115tn.js → Accordion-064hgrct.js} +3 -3
- package/web-dist/chunks/{Accordion-wbf7gqrm.js → Accordion-2b3sd76b.js} +3 -3
- package/web-dist/chunks/{Accordion-k9n1yse4.js → Accordion-2kv6p7by.js} +10 -38
- package/web-dist/chunks/{Accordion-6gc0jw1n.js → Accordion-5x4cv0kv.js} +1 -1
- package/web-dist/chunks/{Accordion-r8swmfjm.js → Accordion-6d63tc7d.js} +1 -1
- package/web-dist/chunks/{Accordion-vbz1mjm6.js → Accordion-7eysykr1.js} +4 -4
- package/web-dist/chunks/{Accordion-59x6e7bs.js → Accordion-91qf4q27.js} +1 -1
- package/web-dist/chunks/{Accordion-hadw5304.js → Accordion-98886mbn.js} +1 -1
- package/web-dist/chunks/{Accordion-vtbs98r4.js → Accordion-a0hbjxg9.js} +4 -4
- package/web-dist/chunks/{Accordion-73p2mg3h.js → Accordion-a49s4ywn.js} +4 -4
- package/web-dist/chunks/{Accordion-tb0vc91c.js → Accordion-a8b6g53f.js} +4 -4
- package/web-dist/chunks/{Accordion-25v2vczc.js → Accordion-afxbyvwp.js} +3 -3
- package/web-dist/chunks/{Accordion-g5pvs1aa.js → Accordion-ajqj6ymg.js} +5 -5
- package/web-dist/chunks/{Accordion-w2kx944a.js → Accordion-ak6dvant.js} +3 -3
- package/web-dist/chunks/{Accordion-778fjjsh.js → Accordion-b1tqkxx6.js} +3 -3
- package/web-dist/chunks/{Accordion-rp9cjtpg.js → Accordion-bm30dkbw.js} +2 -2
- package/web-dist/chunks/{Accordion-rsw5jt7m.js → Accordion-cah5j61y.js} +2 -2
- package/web-dist/chunks/{Accordion-pr1tv6jx.js → Accordion-dfr26j8m.js} +1 -1
- package/web-dist/chunks/{Accordion-zmrbktd8.js → Accordion-dnfgtbq3.js} +8 -8
- package/web-dist/chunks/{Accordion-m3tq2vcc.js → Accordion-dy1j2a7p.js} +6 -6
- package/web-dist/chunks/{Accordion-7pgh8q4h.js → Accordion-e9jwetg7.js} +2 -2
- package/web-dist/chunks/{Accordion-gnkzvj03.js → Accordion-e9xmwxzp.js} +1 -1
- package/web-dist/chunks/{Accordion-q8ymmar7.js → Accordion-ek0hh2nx.js} +4 -4
- package/web-dist/chunks/{Accordion-2berhsg5.js → Accordion-et7xzm6k.js} +9 -9
- package/web-dist/chunks/Accordion-eysfka31.js +1590 -0
- package/web-dist/chunks/{Accordion-3xfqmr1r.js → Accordion-gy3bx3xa.js} +2 -2
- package/web-dist/chunks/{Accordion-tj4fe6wk.js → Accordion-h2rnzgyv.js} +3 -3
- package/web-dist/chunks/Accordion-hbwhya78.js +83 -0
- package/web-dist/chunks/{Accordion-t9w365ke.js → Accordion-hbwyj12m.js} +1 -1
- package/web-dist/chunks/{Accordion-q2yxtdzc.js → Accordion-j3esnt3f.js} +6 -6
- package/web-dist/chunks/Accordion-jkgd7dmf.js +1 -0
- package/web-dist/chunks/{Accordion-qwftammh.js → Accordion-kxjjp03t.js} +5 -5
- package/web-dist/chunks/Accordion-mkd3k28h.js +275 -0
- package/web-dist/chunks/{Accordion-xqkkfwkm.js → Accordion-nhf8zjt4.js} +2 -2
- package/web-dist/chunks/{Accordion-hg4db1sk.js → Accordion-p84h11ek.js} +4 -4
- package/web-dist/chunks/{Accordion-zhgty1ae.js → Accordion-pagdkp07.js} +3 -3
- package/web-dist/chunks/{Accordion-dv5c27w4.js → Accordion-pjbmmr20.js} +1 -1
- package/web-dist/chunks/{Accordion-7ayxbm7k.js → Accordion-pr4a281g.js} +1 -1
- package/web-dist/chunks/{Accordion-yca8r7kx.js → Accordion-qz6ddnmv.js} +3 -3
- package/web-dist/chunks/{Accordion-dcjzxzv3.js → Accordion-rv90tjqr.js} +2 -2
- package/web-dist/chunks/{Accordion-0zk0xp73.js → Accordion-snk6nggm.js} +326 -174
- package/web-dist/chunks/{Accordion-casb2ndy.js → Accordion-th7yhwhf.js} +5 -5
- package/web-dist/chunks/{Accordion-e6ettgh0.js → Accordion-vbh3xqv6.js} +2 -2
- package/web-dist/chunks/{Accordion-vdzyhtyd.js → Accordion-w4zh2nws.js} +8 -8
- package/web-dist/chunks/Accordion-w8zke8fa.js +37 -0
- package/web-dist/chunks/{Accordion-3e60xwvy.js → Accordion-wkqemqjw.js} +1 -1
- package/web-dist/chunks/{Accordion-vwqf8kn1.js → Accordion-x9sb23p3.js} +3 -3
- package/web-dist/chunks/{Accordion-xhkphta6.js → Accordion-y6sg47rv.js} +1 -1
- package/web-dist/chunks/{Accordion-mw8zh0vs.js → Accordion-yannd7r3.js} +4 -4
- package/web-dist/chunks/{Accordion-457amtv7.js → Accordion-z3m3wvfz.js} +6 -1580
- package/web-dist/chunks/{Accordion-pvcdvh3w.js → Accordion-zagrbkq1.js} +2 -2
- package/web-dist/chunks/{Accordion-2jcas7qq.js → Accordion-zays65re.js} +5 -5
- package/web-dist/chunks/{RichTextClient-w75r2x97.js → RichTextClient-qd6gmm0x.js} +12 -11
- package/web-dist/chunks/{Video.native-bb9g33nd.js → Video.native-7zsbp5vg.js} +7 -6
- package/web-dist/components/accordion/Accordion.js +6 -5
- package/web-dist/components/accordion-item/AccordionItem.js +6 -5
- package/web-dist/components/activity-indicator/ActivityIndicator.js +1 -1
- package/web-dist/components/app-bar/AppBar.js +8 -7
- package/web-dist/components/app-header/AppHeader.js +8 -7
- package/web-dist/components/app-shell/AppShell.js +3 -2
- package/web-dist/components/audio/Audio.js +6 -5
- package/web-dist/components/auth-screen/AuthScreen.js +11 -10
- package/web-dist/components/avatar/Avatar.js +6 -5
- package/web-dist/components/avatar-group/AvatarGroup.js +6 -5
- package/web-dist/components/badge/Badge.js +2 -2
- package/web-dist/components/barcode-scanner-view/BarcodeScannerView.js +11 -10
- package/web-dist/components/bottom-sheet/BottomSheet.js +4 -3
- package/web-dist/components/bottom-sheet-flat-list/BottomSheetFlatList.js +4 -3
- package/web-dist/components/bottom-sheet-scroll-view/BottomSheetScrollView.js +4 -3
- package/web-dist/components/bottom-sheet-section-list/BottomSheetSectionList.js +4 -3
- package/web-dist/components/bottom-sheet-view/BottomSheetView.js +4 -3
- package/web-dist/components/bottom-sheet-virtualized-list/BottomSheetVirtualizedList.js +4 -3
- package/web-dist/components/breadcrumbs/Breadcrumbs.js +6 -5
- package/web-dist/components/button/Button.js +4 -3
- package/web-dist/components/button-group/ButtonGroup.js +4 -3
- package/web-dist/components/calendar/Calendar.js +8 -7
- package/web-dist/components/camera-permission-view/CameraPermissionView.js +11 -10
- package/web-dist/components/card/Card.js +10 -9
- package/web-dist/components/card-back/CardBack.js +2 -2
- package/web-dist/components/card-hand/CardHand.js +2 -2
- package/web-dist/components/chat-list-item/ChatListItem.js +8 -7
- package/web-dist/components/checkbox/Checkbox.js +5 -4
- package/web-dist/components/checkbox-group/CheckboxGroup.js +5 -4
- package/web-dist/components/chess-board/ChessBoard.js +4 -3
- package/web-dist/components/chip/Chip.js +6 -5
- package/web-dist/components/chip-group/ChipGroup.js +6 -5
- package/web-dist/components/collection-editor/CollectionEditor.js +10 -9
- package/web-dist/components/color-hue-scale/ColorHueScale.js +17 -15
- package/web-dist/components/color-picker/ColorPicker.js +17 -15
- package/web-dist/components/color-tone/ColorTone.js +17 -15
- package/web-dist/components/color-wheel/ColorWheel.js +17 -15
- package/web-dist/components/content-rail/ContentRail.js +5 -4
- package/web-dist/components/data-table/DataTable.js +16 -15
- package/web-dist/components/date-picker/DatePicker.js +10 -9
- package/web-dist/components/dialog/Dialog.js +5 -4
- package/web-dist/components/divider/Divider.js +3 -2
- package/web-dist/components/empty-state/EmptyState.js +11 -10
- package/web-dist/components/explorer/Explorer.js +8 -7
- package/web-dist/components/field/Field.js +5 -4
- package/web-dist/components/file-explorer/FileExplorer.js +8 -7
- package/web-dist/components/flat-list/FlatList.js +6 -5
- package/web-dist/components/flow-canvas/FlowCanvas.d.ts +7 -0
- package/web-dist/components/flow-canvas/FlowCanvas.dependency-0.d.ts +27 -0
- package/web-dist/components/flow-canvas/FlowCanvas.dependency-1.d.ts +3 -0
- package/web-dist/components/flow-canvas/FlowCanvas.js +513 -0
- package/web-dist/components/flow-canvas/FlowCanvas.types-0.d.ts +92 -0
- package/web-dist/components/flow-canvas/index.d.ts +2 -0
- package/web-dist/components/flow-canvas/index.js +2 -0
- package/web-dist/components/forgot-password-form/ForgotPasswordForm.js +11 -10
- package/web-dist/components/form/Form.js +7 -6
- package/web-dist/components/form-actions/FormActions.js +7 -6
- package/web-dist/components/form-error/FormError.js +7 -6
- package/web-dist/components/game/Game.js +4 -3
- package/web-dist/components/game-entity/GameEntity.js +4 -3
- package/web-dist/components/game-field/GameField.js +4 -3
- package/web-dist/components/game-input-zone/GameInputZone.js +4 -3
- package/web-dist/components/game-measurement-probe/GameMeasurementProbe.js +4 -3
- package/web-dist/components/game-overlay/GameOverlay.js +4 -3
- package/web-dist/components/gradient/Gradient.js +4 -3
- package/web-dist/components/gradient-renderer-provider/GradientRendererProvider.js +4 -3
- package/web-dist/components/graph-node/GraphNode.d.ts +7 -0
- package/web-dist/components/graph-node/GraphNode.dependency-0.d.ts +27 -0
- package/web-dist/components/graph-node/GraphNode.dependency-1.d.ts +3 -0
- package/web-dist/components/graph-node/GraphNode.dependency-2.d.ts +5 -0
- package/web-dist/components/graph-node/GraphNode.js +20 -0
- package/web-dist/components/graph-node/GraphNode.types-0.d.ts +46 -0
- package/web-dist/components/graph-node/index.d.ts +2 -0
- package/web-dist/components/graph-node/index.js +2 -0
- package/web-dist/components/grid/Grid.js +3 -2
- package/web-dist/components/grid-line-overlay/GridLineOverlay.js +2 -2
- package/web-dist/components/grid-ruler/GridRuler.js +2 -2
- package/web-dist/components/grid-view/GridView.d.ts +1 -1
- package/web-dist/components/grid-view/GridView.js +2 -1
- package/web-dist/components/grid-view/GridView.types-0.d.ts +21 -0
- package/web-dist/components/heading/Heading.js +2 -2
- package/web-dist/components/hero/Hero.js +10 -9
- package/web-dist/components/icon/Icon.js +2 -2
- package/web-dist/components/icon-button/IconButton.js +4 -3
- package/web-dist/components/image/Image.js +5 -4
- package/web-dist/components/keyboard-avoiding-view/KeyboardAvoidingView.js +2 -2
- package/web-dist/components/link/Link.js +2 -2
- package/web-dist/components/list/List.js +6 -5
- package/web-dist/components/list-item/ListItem.js +6 -5
- package/web-dist/components/list-section/ListSection.js +6 -5
- package/web-dist/components/master-detail/MasterDetail.js +3 -2
- package/web-dist/components/matrix-grid/MatrixGrid.js +5 -4
- package/web-dist/components/media-card/MediaCard.js +10 -9
- package/web-dist/components/media-explorer/MediaExplorer.js +8 -7
- package/web-dist/components/message-bubble/MessageBubble.js +8 -7
- package/web-dist/components/metric-card/MetricCard.js +10 -9
- package/web-dist/components/missing-element/MissingElement.js +5 -4
- package/web-dist/components/o-auth-provider-button/OAuthProviderButton.js +11 -10
- package/web-dist/components/o-auth-provider-list/OAuthProviderList.js +11 -10
- package/web-dist/components/opening-book/OpeningBook.js +4 -3
- package/web-dist/components/otp-form/OtpForm.js +11 -10
- package/web-dist/components/pagination/Pagination.js +5 -4
- package/web-dist/components/palette-item/PaletteItem.js +10 -9
- package/web-dist/components/playing-card/PlayingCard.js +2 -2
- package/web-dist/components/poker-training-table/PokerTrainingTable.js +2 -2
- package/web-dist/components/popover/Popover.js +1 -1
- package/web-dist/components/popover-menu/PopoverMenu.js +5 -4
- package/web-dist/components/post-card/PostCard.js +10 -9
- package/web-dist/components/product-card/ProductCard.js +10 -9
- package/web-dist/components/progress/Progress.js +5 -4
- package/web-dist/components/progress-ring/ProgressRing.js +5 -4
- package/web-dist/components/radio/Radio.js +6 -5
- package/web-dist/components/radio-group/RadioGroup.js +6 -5
- package/web-dist/components/rating/Rating.js +4 -3
- package/web-dist/components/reader/Reader.js +11 -10
- package/web-dist/components/rich-text/RichText.js +3 -3
- package/web-dist/components/runtime-authoring-overlay/RuntimeAuthoringOverlay.js +4 -3
- package/web-dist/components/scan-overlay/ScanOverlay.js +11 -10
- package/web-dist/components/screen/Screen.js +3 -2
- package/web-dist/components/screen-section/ScreenSection.js +5 -4
- package/web-dist/components/scroll-view/ScrollView.js +3 -2
- package/web-dist/components/search-input/SearchInput.js +6 -5
- package/web-dist/components/section-header/SectionHeader.js +5 -4
- package/web-dist/components/section-list/SectionList.js +6 -5
- package/web-dist/components/select/Select.js +11 -10
- package/web-dist/components/selectable-item/SelectableItem.js +4 -3
- package/web-dist/components/selection-provider/SelectionProvider.js +4 -3
- package/web-dist/components/sign-in-form/SignInForm.js +11 -10
- package/web-dist/components/sign-up-form/SignUpForm.js +11 -10
- package/web-dist/components/skeleton/Skeleton.js +13 -12
- package/web-dist/components/skeleton-card/SkeletonCard.js +13 -12
- package/web-dist/components/skeleton-list/SkeletonList.js +13 -12
- package/web-dist/components/skeleton-text/SkeletonText.js +13 -12
- package/web-dist/components/spatial-grid/SpatialGrid.js +2 -1
- package/web-dist/components/surface/Surface.js +2 -2
- package/web-dist/components/switch/Switch.js +1 -1
- package/web-dist/components/tab/Tab.js +2 -2
- package/web-dist/components/tab-list/TabList.js +2 -2
- package/web-dist/components/tab-panel/TabPanel.js +2 -2
- package/web-dist/components/tabletop-table/TabletopTable.js +2 -2
- package/web-dist/components/tabs/Tabs.js +2 -2
- package/web-dist/components/text/Text.js +2 -2
- package/web-dist/components/text-input/TextInput.js +5 -4
- package/web-dist/components/theme-mode-toggle/ThemeModeToggle.js +4 -3
- package/web-dist/components/tile-grid/TileGrid.js +2 -1
- package/web-dist/components/time-grid/TimeGrid.js +3 -2
- package/web-dist/components/time-picker/TimePicker.js +7 -6
- package/web-dist/components/timeline/Timeline.js +6 -5
- package/web-dist/components/toast/Toast.js +2 -2
- package/web-dist/components/toast-provider/ToastProvider.js +2 -2
- package/web-dist/components/toolbar/Toolbar.js +11 -10
- package/web-dist/components/tree-item/TreeItem.js +9 -8
- package/web-dist/components/uploader/Uploader.js +13 -12
- package/web-dist/components/video/Video.js +7 -6
- package/web-dist/components/view/View.js +3 -2
- package/web-dist/components/zora-provider/ZoraProvider.d.ts +7 -0
- package/web-dist/components/zora-provider/ZoraProvider.dependency-0.d.ts +15 -0
- package/web-dist/components/zora-provider/ZoraProvider.js +11 -0
- package/web-dist/components/zora-provider/ZoraProvider.types-0.d.ts +19 -0
- package/web-dist/components/zora-provider/index.d.ts +2 -0
- package/web-dist/components/zora-provider/index.js +2 -0
- package/web-dist/components/zora-theme-scope/ZoraThemeScope.d.ts +14 -0
- package/web-dist/components/zora-theme-scope/ZoraThemeScope.js +11 -0
- package/web-dist/components/zora-theme-scope/ZoraThemeScope.types-0.d.ts +3 -0
- package/web-dist/components/zora-theme-scope/index.d.ts +2 -0
- package/web-dist/components/zora-theme-scope/index.js +2 -0
- package/web-dist/components/zora-web-style-sheet/ZoraWebStyleSheet.js +3 -2
- package/web-dist/manifest.json +1058 -832
- package/web-dist/runtime/ZoraProvider.js +4 -80
|
@@ -5,11 +5,14 @@ import React from 'react';
|
|
|
5
5
|
import { createRoot } from 'react-dom/client';
|
|
6
6
|
|
|
7
7
|
import type { GridScrollAxis } from '../../../../types/grid-view';
|
|
8
|
+
import type { ScrollGestureLock } from '../../../../types/layout';
|
|
9
|
+
import { ScrollGestureLockContext } from '../../../layout/adapters/inbound/ScrollGestureLockContext';
|
|
8
10
|
|
|
9
11
|
type NativeScrollEvent = Readonly<{
|
|
10
12
|
nativeEvent: Readonly<{ contentOffset: { x: number; y: number } }>;
|
|
11
13
|
}>;
|
|
12
14
|
type NativeScrollProps = Readonly<{
|
|
15
|
+
onScrollBeginDrag?: (event: NativeScrollEvent) => void;
|
|
13
16
|
onMomentumScrollEnd?: (event: NativeScrollEvent) => void;
|
|
14
17
|
onScroll?: (event: NativeScrollEvent) => void;
|
|
15
18
|
testID?: string;
|
|
@@ -31,16 +34,18 @@ Object.assign(globalThis, {
|
|
|
31
34
|
|
|
32
35
|
const scrollHandlers = new Map<string, NativeScrollProps>();
|
|
33
36
|
const nativeRequests: (readonly [GridScrollAxis, number, boolean])[] = [];
|
|
37
|
+
let itemScrollLock: ScrollGestureLock | undefined;
|
|
34
38
|
const ScrollView = React.forwardRef<
|
|
35
39
|
{ scrollTo: (request: ScrollRequest) => void },
|
|
36
40
|
React.PropsWithChildren<NativeScrollProps>
|
|
37
|
-
>(function ScrollView({ children, onMomentumScrollEnd, onScroll, testID }, ref) {
|
|
41
|
+
>(function ScrollView({ children, onMomentumScrollEnd, onScroll, onScrollBeginDrag, testID }, ref) {
|
|
38
42
|
React.useEffect(() => {
|
|
39
|
-
if (testID !== undefined)
|
|
43
|
+
if (testID !== undefined)
|
|
44
|
+
scrollHandlers.set(testID, { onMomentumScrollEnd, onScroll, onScrollBeginDrag, testID });
|
|
40
45
|
return () => {
|
|
41
46
|
if (testID !== undefined) scrollHandlers.delete(testID);
|
|
42
47
|
};
|
|
43
|
-
}, [onMomentumScrollEnd, onScroll, testID]);
|
|
48
|
+
}, [onMomentumScrollEnd, onScroll, onScrollBeginDrag, testID]);
|
|
44
49
|
React.useImperativeHandle(ref, () => ({
|
|
45
50
|
scrollTo: ({ animated = false, x, y }) => {
|
|
46
51
|
if (x !== undefined) nativeRequests.push(['x', x, animated]);
|
|
@@ -59,6 +64,7 @@ const View = React.forwardRef<
|
|
|
59
64
|
});
|
|
60
65
|
|
|
61
66
|
await mock.module('react-native', () => ({
|
|
67
|
+
Platform: { OS: 'ios' },
|
|
62
68
|
Pressable: ({ children }: React.PropsWithChildren) => <button>{children}</button>,
|
|
63
69
|
ScrollView,
|
|
64
70
|
Text: ({ children }: React.PropsWithChildren) => <span>{children}</span>,
|
|
@@ -69,6 +75,7 @@ const { GridView } = await import('./GridView');
|
|
|
69
75
|
|
|
70
76
|
beforeEach(() => {
|
|
71
77
|
jest.useFakeTimers();
|
|
78
|
+
itemScrollLock = undefined;
|
|
72
79
|
nativeRequests.length = 0;
|
|
73
80
|
scrollHandlers.clear();
|
|
74
81
|
});
|
|
@@ -85,7 +92,7 @@ afterAll(() => {
|
|
|
85
92
|
}
|
|
86
93
|
});
|
|
87
94
|
|
|
88
|
-
test('
|
|
95
|
+
test('keeps late native animation frames out of viewport proposals after watchdog fallback', async () => {
|
|
89
96
|
const host = document.createElement('div');
|
|
90
97
|
document.body.append(host);
|
|
91
98
|
const root = createRoot(host);
|
|
@@ -127,15 +134,14 @@ test('reconciles the published viewport with late native animation frames after
|
|
|
127
134
|
jest.advanceTimersByTime(700);
|
|
128
135
|
}),
|
|
129
136
|
);
|
|
130
|
-
expect(published.map((viewport) => viewport.offsetY)).toEqual([200
|
|
137
|
+
expect(published.map((viewport) => viewport.offsetY)).toEqual([200]);
|
|
131
138
|
|
|
132
139
|
await dispatchNativeScrollAsync('grid-vertical-scroll', 100, physicalOffsets);
|
|
133
140
|
await dispatchNativeScrollAsync('grid-vertical-scroll', 200, physicalOffsets);
|
|
134
141
|
await dispatchNativeScrollEndAsync('grid-vertical-scroll', 200, physicalOffsets);
|
|
135
142
|
|
|
136
143
|
expect(physicalOffsets).toEqual([40, 100, 200, 200]);
|
|
137
|
-
expect(published.map((viewport) => viewport.offsetY)).toEqual([200
|
|
138
|
-
expect(published.at(-1)?.offsetY).toBe(physicalOffsets.at(-1));
|
|
144
|
+
expect(published.map((viewport) => viewport.offsetY)).toEqual([200]);
|
|
139
145
|
expect(nativeRequests).toEqual([['y', 200, true]]);
|
|
140
146
|
expect(jest.getTimerCount()).toBe(0);
|
|
141
147
|
} finally {
|
|
@@ -148,6 +154,180 @@ test('reconciles the published viewport with late native animation frames after
|
|
|
148
154
|
}
|
|
149
155
|
});
|
|
150
156
|
|
|
157
|
+
test('positions a controlled initial viewport without publishing a synthetic pan', async () => {
|
|
158
|
+
const host = document.createElement('div');
|
|
159
|
+
document.body.append(host);
|
|
160
|
+
const root = createRoot(host);
|
|
161
|
+
const published: GridViewport[] = [];
|
|
162
|
+
|
|
163
|
+
try {
|
|
164
|
+
await React.act(() =>
|
|
165
|
+
Promise.resolve().then(() => {
|
|
166
|
+
root.render(
|
|
167
|
+
<GridView
|
|
168
|
+
contentHeight={1000}
|
|
169
|
+
contentWidth={1000}
|
|
170
|
+
height={100}
|
|
171
|
+
items={[]}
|
|
172
|
+
renderItem={() => null}
|
|
173
|
+
testID="grid"
|
|
174
|
+
viewport={{
|
|
175
|
+
height: 100,
|
|
176
|
+
offsetX: 120,
|
|
177
|
+
offsetY: 240,
|
|
178
|
+
pixelsPerUnitX: 1,
|
|
179
|
+
pixelsPerUnitY: 1,
|
|
180
|
+
width: 100,
|
|
181
|
+
}}
|
|
182
|
+
viewportConstraints={{ world: { height: 1000, width: 1000, x: 0, y: 0 } }}
|
|
183
|
+
width={100}
|
|
184
|
+
onViewportChange={(next) => published.push(next)}
|
|
185
|
+
/>,
|
|
186
|
+
);
|
|
187
|
+
}),
|
|
188
|
+
);
|
|
189
|
+
expect(nativeRequests).toEqual([
|
|
190
|
+
['x', 120, false],
|
|
191
|
+
['y', 240, false],
|
|
192
|
+
]);
|
|
193
|
+
expect(published).toEqual([]);
|
|
194
|
+
} finally {
|
|
195
|
+
await React.act(() =>
|
|
196
|
+
Promise.resolve().then(() => {
|
|
197
|
+
root.unmount();
|
|
198
|
+
}),
|
|
199
|
+
);
|
|
200
|
+
host.remove();
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
|
|
204
|
+
test('restores a native scroll frame and suppresses its viewport proposal while an item gesture owns the grid', async () => {
|
|
205
|
+
const host = document.createElement('div');
|
|
206
|
+
document.body.append(host);
|
|
207
|
+
const root = createRoot(host);
|
|
208
|
+
const published: GridViewport[] = [];
|
|
209
|
+
|
|
210
|
+
try {
|
|
211
|
+
await React.act(() =>
|
|
212
|
+
Promise.resolve().then(() => {
|
|
213
|
+
root.render(
|
|
214
|
+
<GridView
|
|
215
|
+
contentHeight={1000}
|
|
216
|
+
contentWidth={1000}
|
|
217
|
+
height={100}
|
|
218
|
+
items={[{ height: 20, id: 'item', width: 20, x: 0, y: 0 }]}
|
|
219
|
+
renderItem={() => <ItemGestureOwner />}
|
|
220
|
+
testID="grid"
|
|
221
|
+
viewportConstraints={{ world: { height: 1000, width: 1000, x: 0, y: 0 } }}
|
|
222
|
+
width={100}
|
|
223
|
+
onViewportChange={(next) => published.push(next)}
|
|
224
|
+
/>,
|
|
225
|
+
);
|
|
226
|
+
}),
|
|
227
|
+
);
|
|
228
|
+
let release: (() => void) | undefined;
|
|
229
|
+
await React.act(() =>
|
|
230
|
+
Promise.resolve().then(() => {
|
|
231
|
+
release = itemScrollLock?.acquire();
|
|
232
|
+
}),
|
|
233
|
+
);
|
|
234
|
+
if (!release)
|
|
235
|
+
throw new Error('Expected the rendered item to receive GridView scroll ownership.');
|
|
236
|
+
|
|
237
|
+
await dispatchNativeScrollAsync('grid-vertical-scroll', 24, []);
|
|
238
|
+
|
|
239
|
+
expect(published).toEqual([]);
|
|
240
|
+
expect(nativeRequests).toEqual([['y', 0, false]]);
|
|
241
|
+
|
|
242
|
+
await dispatchNativeScrollAsync('grid-vertical-scroll', 0, []);
|
|
243
|
+
|
|
244
|
+
expect(published).toEqual([]);
|
|
245
|
+
|
|
246
|
+
await React.act(() =>
|
|
247
|
+
Promise.resolve().then(() => {
|
|
248
|
+
release();
|
|
249
|
+
}),
|
|
250
|
+
);
|
|
251
|
+
} finally {
|
|
252
|
+
await React.act(() =>
|
|
253
|
+
Promise.resolve().then(() => {
|
|
254
|
+
root.unmount();
|
|
255
|
+
}),
|
|
256
|
+
);
|
|
257
|
+
host.remove();
|
|
258
|
+
}
|
|
259
|
+
});
|
|
260
|
+
|
|
261
|
+
test('retains restore ownership through delayed native lifecycle events after an item gesture releases', async () => {
|
|
262
|
+
const host = document.createElement('div');
|
|
263
|
+
document.body.append(host);
|
|
264
|
+
const root = createRoot(host);
|
|
265
|
+
const published: GridViewport[] = [];
|
|
266
|
+
|
|
267
|
+
try {
|
|
268
|
+
await React.act(() =>
|
|
269
|
+
Promise.resolve().then(() => {
|
|
270
|
+
root.render(
|
|
271
|
+
<GridView
|
|
272
|
+
contentHeight={1000}
|
|
273
|
+
contentWidth={1000}
|
|
274
|
+
height={100}
|
|
275
|
+
items={[{ height: 20, id: 'item', width: 20, x: 0, y: 0 }]}
|
|
276
|
+
renderItem={() => <ItemGestureOwner />}
|
|
277
|
+
testID="grid"
|
|
278
|
+
viewportConstraints={{ world: { height: 1000, width: 1000, x: 0, y: 0 } }}
|
|
279
|
+
width={100}
|
|
280
|
+
onViewportChange={(next) => published.push(next)}
|
|
281
|
+
/>,
|
|
282
|
+
);
|
|
283
|
+
}),
|
|
284
|
+
);
|
|
285
|
+
let release: (() => void) | undefined;
|
|
286
|
+
await React.act(() =>
|
|
287
|
+
Promise.resolve().then(() => {
|
|
288
|
+
release = itemScrollLock?.acquire();
|
|
289
|
+
}),
|
|
290
|
+
);
|
|
291
|
+
if (!release)
|
|
292
|
+
throw new Error('Expected the rendered item to receive GridView scroll ownership.');
|
|
293
|
+
|
|
294
|
+
await dispatchNativeScrollAsync('grid-vertical-scroll', 24, []);
|
|
295
|
+
await React.act(() =>
|
|
296
|
+
Promise.resolve().then(() => {
|
|
297
|
+
release();
|
|
298
|
+
}),
|
|
299
|
+
);
|
|
300
|
+
await dispatchNativeScrollBeganAsync('grid-vertical-scroll', 24);
|
|
301
|
+
await dispatchNativeScrollEndAsync('grid-vertical-scroll', 24, []);
|
|
302
|
+
await React.act(() =>
|
|
303
|
+
Promise.resolve().then(() => {
|
|
304
|
+
jest.advanceTimersByTime(1000);
|
|
305
|
+
}),
|
|
306
|
+
);
|
|
307
|
+
await dispatchNativeScrollAsync('grid-vertical-scroll', 0, []);
|
|
308
|
+
|
|
309
|
+
expect(published).toEqual([]);
|
|
310
|
+
expect(nativeRequests).toEqual([
|
|
311
|
+
['y', 0, false],
|
|
312
|
+
['y', 0, false],
|
|
313
|
+
['y', 0, false],
|
|
314
|
+
]);
|
|
315
|
+
} finally {
|
|
316
|
+
await React.act(() =>
|
|
317
|
+
Promise.resolve().then(() => {
|
|
318
|
+
root.unmount();
|
|
319
|
+
}),
|
|
320
|
+
);
|
|
321
|
+
host.remove();
|
|
322
|
+
}
|
|
323
|
+
});
|
|
324
|
+
|
|
325
|
+
/*** Acquires the GridView-provided lock so the test can model a native item responder gesture. */
|
|
326
|
+
function ItemGestureOwner() {
|
|
327
|
+
itemScrollLock = React.useContext(ScrollGestureLockContext);
|
|
328
|
+
return null;
|
|
329
|
+
}
|
|
330
|
+
|
|
151
331
|
/*** Delivers one physical native scroll frame through the mounted GridView boundary. */
|
|
152
332
|
async function dispatchNativeScrollAsync(
|
|
153
333
|
testID: string,
|
|
@@ -164,6 +344,17 @@ async function dispatchNativeScrollAsync(
|
|
|
164
344
|
);
|
|
165
345
|
}
|
|
166
346
|
|
|
347
|
+
/** Delivers the native drag-begin signal for an axis without treating it as a user gesture in the harness. */
|
|
348
|
+
async function dispatchNativeScrollBeganAsync(testID: string, offset: number): Promise<void> {
|
|
349
|
+
const handler = scrollHandlers.get(testID)?.onScrollBeginDrag;
|
|
350
|
+
if (!handler) throw new Error(`Missing native scroll-begin handler for ${testID}.`);
|
|
351
|
+
await React.act(() =>
|
|
352
|
+
Promise.resolve().then(() => {
|
|
353
|
+
handler(createNativeScrollEvent(offset));
|
|
354
|
+
}),
|
|
355
|
+
);
|
|
356
|
+
}
|
|
357
|
+
|
|
167
358
|
/*** Delivers the native momentum-end signal after the final physical offset is observed. */
|
|
168
359
|
async function dispatchNativeScrollEndAsync(
|
|
169
360
|
testID: string,
|