@ankhorage/zora 28.10.0 → 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 +16 -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 +24 -6
- 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
|
@@ -18,22 +18,22 @@ interface EchoTail {
|
|
|
18
18
|
target: number;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
/***
|
|
22
|
-
* Arbitrates each native scroll axis between programmatic requests and the user,
|
|
23
|
-
* so echoes of GridView's own scrollTo calls never become viewport pans.
|
|
24
|
-
*/
|
|
21
|
+
/*** Arbitrates native scroll ownership so programmatic offsets never become viewport proposals. */
|
|
25
22
|
export function createGridScrollSync({
|
|
26
23
|
scrollTo,
|
|
27
24
|
onUserScroll,
|
|
28
|
-
|
|
25
|
+
acceptUnownedScroll = true,
|
|
29
26
|
now = Date.now,
|
|
30
27
|
schedule = setTimeout,
|
|
31
28
|
cancel = clearTimeout,
|
|
32
29
|
}: GridScrollSyncOptions): GridScrollSync {
|
|
33
|
-
|
|
30
|
+
// A requested native position is not proof that the platform reached it. Keeping
|
|
31
|
+
// target and observed positions separate prevents rebasing echoes becoming pans.
|
|
32
|
+
let expectedPosition: GridScrollPosition = { x: 0, y: 0 };
|
|
33
|
+
let observedPosition: GridScrollPosition = { x: 0, y: 0 };
|
|
34
34
|
const pending = new Map<GridScrollAxis, GridPendingScroll>();
|
|
35
35
|
const inFlight = new Map<GridScrollAxis, number>();
|
|
36
|
-
|
|
36
|
+
const userGestures = new Set<GridScrollAxis>();
|
|
37
37
|
const echoTails = new Map<GridScrollAxis, EchoTail>();
|
|
38
38
|
const timers = new Map<GridScrollAxis, ReturnType<typeof setTimeout>>();
|
|
39
39
|
|
|
@@ -48,93 +48,150 @@ export function createGridScrollSync({
|
|
|
48
48
|
inFlight.delete(axis);
|
|
49
49
|
};
|
|
50
50
|
const adopt = (axis: GridScrollAxis, offset: number) => {
|
|
51
|
-
const displacement = offset - readAxis(
|
|
52
|
-
|
|
51
|
+
const displacement = offset - readAxis(observedPosition, axis);
|
|
52
|
+
observedPosition = withAxis(observedPosition, axis, offset);
|
|
53
|
+
expectedPosition = withAxis(expectedPosition, axis, offset);
|
|
54
|
+
if (displacement !== 0) onUserScroll(axis, displacement);
|
|
55
|
+
};
|
|
56
|
+
const adoptFromExpected = (axis: GridScrollAxis, offset: number) => {
|
|
57
|
+
const displacement = offset - readAxis(expectedPosition, axis);
|
|
58
|
+
observedPosition = withAxis(observedPosition, axis, offset);
|
|
59
|
+
expectedPosition = withAxis(expectedPosition, axis, offset);
|
|
53
60
|
if (displacement !== 0) onUserScroll(axis, displacement);
|
|
54
61
|
};
|
|
55
62
|
const settle = (axis: GridScrollAxis, finalOffset?: number) => {
|
|
56
63
|
const pendingScroll = pending.get(axis);
|
|
57
64
|
const offset = finalOffset ?? inFlight.get(axis);
|
|
58
65
|
release(axis);
|
|
59
|
-
if (offset
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
) {
|
|
65
|
-
echoTails.set(axis, { lastOffset: offset, target: pendingScroll.target });
|
|
66
|
-
} else {
|
|
67
|
-
echoTails.delete(axis);
|
|
68
|
-
}
|
|
69
|
-
adopt(axis, offset);
|
|
66
|
+
if (offset === undefined) return;
|
|
67
|
+
if (pendingScroll?.animated && !isSameOffset(offset, pendingScroll.target)) {
|
|
68
|
+
echoTails.set(axis, { lastOffset: offset, target: pendingScroll.target });
|
|
69
|
+
} else {
|
|
70
|
+
echoTails.delete(axis);
|
|
70
71
|
}
|
|
72
|
+
if (acceptUnownedScroll) adoptFromExpected(axis, offset);
|
|
73
|
+
else observedPosition = withAxis(observedPosition, axis, offset);
|
|
74
|
+
};
|
|
75
|
+
/*** Restores a locked native axis and retains ownership until a new native drag takes it over. */
|
|
76
|
+
const restore = (axis: GridScrollAxis, offset: number, target: number) => {
|
|
77
|
+
release(axis);
|
|
78
|
+
echoTails.delete(axis);
|
|
79
|
+
userGestures.delete(axis);
|
|
80
|
+
observedPosition = withAxis(observedPosition, axis, offset);
|
|
81
|
+
expectedPosition = withAxis(expectedPosition, axis, target);
|
|
82
|
+
pending.set(axis, {
|
|
83
|
+
animated: false,
|
|
84
|
+
expiresAt: Number.POSITIVE_INFINITY,
|
|
85
|
+
restoring: true,
|
|
86
|
+
target,
|
|
87
|
+
});
|
|
88
|
+
if (!isSameOffset(offset, target)) scrollTo(axis, target, false);
|
|
71
89
|
};
|
|
72
90
|
const scrolled = (axis: GridScrollAxis, offset: number) => {
|
|
91
|
+
const pendingScroll = pending.get(axis);
|
|
92
|
+
if (pendingScroll?.restoring) {
|
|
93
|
+
observedPosition = withAxis(observedPosition, axis, offset);
|
|
94
|
+
if (!isSameOffset(offset, pendingScroll.target)) restore(axis, offset, pendingScroll.target);
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
if (userGestures.has(axis)) {
|
|
98
|
+
adopt(axis, offset);
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
73
101
|
const tail = echoTails.get(axis);
|
|
74
102
|
if (tail) {
|
|
75
103
|
if (isContinuingProgrammaticEcho(tail, offset)) {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
if (displacement !== 0) onProgrammaticScroll(axis, displacement);
|
|
104
|
+
observedPosition = withAxis(observedPosition, axis, offset);
|
|
105
|
+
if (acceptUnownedScroll) expectedPosition = withAxis(expectedPosition, axis, offset);
|
|
79
106
|
if (isSameOffset(offset, tail.target)) echoTails.delete(axis);
|
|
80
107
|
else tail.lastOffset = offset;
|
|
81
108
|
return;
|
|
82
109
|
}
|
|
83
110
|
echoTails.delete(axis);
|
|
84
111
|
}
|
|
85
|
-
let
|
|
86
|
-
if (
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
pendingScroll = { ...pendingScroll, expiresAt: now() + ANIMATED_SCROLL_WINDOW_MS };
|
|
90
|
-
pending.set(axis, pendingScroll);
|
|
112
|
+
let currentPending = pendingScroll;
|
|
113
|
+
if (currentPending?.animated && now() > currentPending.expiresAt) {
|
|
114
|
+
currentPending = { ...currentPending, expiresAt: now() + ANIMATED_SCROLL_WINDOW_MS };
|
|
115
|
+
pending.set(axis, currentPending);
|
|
91
116
|
}
|
|
92
|
-
const source = resolveScrollEventSource(
|
|
93
|
-
if (source === 'in-flight' &&
|
|
117
|
+
const source = resolveScrollEventSource(currentPending, offset, now());
|
|
118
|
+
if (source === 'in-flight' && currentPending) {
|
|
94
119
|
clearTimer(axis);
|
|
95
120
|
inFlight.set(axis, offset);
|
|
96
|
-
// Native animation frames can pause longer than 120ms; only reconcile at the
|
|
97
|
-
// original request deadline, or earlier on an explicit drag/end/target echo.
|
|
98
121
|
timers.set(
|
|
99
122
|
axis,
|
|
100
|
-
schedule(() => settle(axis), Math.max(0,
|
|
123
|
+
schedule(() => settle(axis), Math.max(0, currentPending.expiresAt - now())),
|
|
101
124
|
);
|
|
125
|
+
observedPosition = withAxis(observedPosition, axis, offset);
|
|
102
126
|
return;
|
|
103
127
|
}
|
|
104
|
-
|
|
105
|
-
|
|
128
|
+
if (source === 'settled') {
|
|
129
|
+
release(axis);
|
|
130
|
+
observedPosition = withAxis(observedPosition, axis, offset);
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
if (currentPending && !acceptUnownedScroll) {
|
|
134
|
+
release(axis);
|
|
135
|
+
observedPosition = withAxis(observedPosition, axis, offset);
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
if (acceptUnownedScroll) adoptFromExpected(axis, offset);
|
|
139
|
+
else adopt(axis, offset);
|
|
106
140
|
};
|
|
107
141
|
|
|
108
142
|
return {
|
|
109
143
|
isCurrent: (next) =>
|
|
110
|
-
AXES.every((axis) => isSameOffset(readAxis(
|
|
144
|
+
AXES.every((axis) => isSameOffset(readAxis(expectedPosition, axis), readAxis(next, axis))),
|
|
111
145
|
request: (next, animated) => {
|
|
112
146
|
const windowMs = animated ? ANIMATED_SCROLL_WINDOW_MS : IMMEDIATE_SCROLL_WINDOW_MS;
|
|
113
147
|
const expiresAt = now() + windowMs;
|
|
114
148
|
for (const axis of AXES) {
|
|
115
149
|
const target = readAxis(next, axis);
|
|
116
|
-
if (isSameOffset(readAxis(
|
|
150
|
+
if (isSameOffset(readAxis(expectedPosition, axis), target)) continue;
|
|
117
151
|
release(axis);
|
|
118
152
|
echoTails.delete(axis);
|
|
153
|
+
userGestures.delete(axis);
|
|
119
154
|
pending.set(axis, { animated, expiresAt, target });
|
|
120
155
|
scrollTo(axis, target, animated);
|
|
156
|
+
expectedPosition = withAxis(expectedPosition, axis, target);
|
|
121
157
|
}
|
|
122
|
-
position = next;
|
|
123
158
|
},
|
|
159
|
+
restore,
|
|
124
160
|
scrolled,
|
|
125
161
|
dragBegan: (axis, offset) => {
|
|
126
|
-
const
|
|
127
|
-
if (
|
|
128
|
-
|
|
162
|
+
const pendingScroll = pending.get(axis);
|
|
163
|
+
if (pendingScroll?.restoring && !isSameOffset(offset, pendingScroll.target)) {
|
|
164
|
+
restore(axis, offset, pendingScroll.target);
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
release(axis);
|
|
168
|
+
echoTails.delete(axis);
|
|
169
|
+
userGestures.add(axis);
|
|
170
|
+
// Native scroll-begin can arrive after a descendant responder releases and already
|
|
171
|
+
// includes that responder's terminal displacement. It establishes the scroll baseline;
|
|
172
|
+
// only subsequent scroll frames are user viewport movement.
|
|
173
|
+
observedPosition = withAxis(observedPosition, axis, offset);
|
|
174
|
+
expectedPosition = withAxis(expectedPosition, axis, offset);
|
|
129
175
|
},
|
|
130
176
|
scrollEnded: (axis, offset) => {
|
|
177
|
+
const pendingScroll = pending.get(axis);
|
|
178
|
+
if (pendingScroll?.restoring) {
|
|
179
|
+
if (!isSameOffset(offset, pendingScroll.target))
|
|
180
|
+
restore(axis, offset, pendingScroll.target);
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
if (userGestures.has(axis)) {
|
|
184
|
+
scrolled(axis, offset);
|
|
185
|
+
userGestures.delete(axis);
|
|
186
|
+
return;
|
|
187
|
+
}
|
|
131
188
|
scrolled(axis, offset);
|
|
132
|
-
echoTails.delete(axis);
|
|
133
189
|
if (pending.has(axis)) settle(axis, offset);
|
|
134
190
|
},
|
|
135
191
|
dispose: () => {
|
|
136
192
|
for (const axis of AXES) release(axis);
|
|
137
193
|
echoTails.clear();
|
|
194
|
+
userGestures.clear();
|
|
138
195
|
},
|
|
139
196
|
};
|
|
140
197
|
}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
export type {
|
|
1
|
+
export type {
|
|
2
|
+
GridViewProps,
|
|
3
|
+
GridWorldLayerContext,
|
|
4
|
+
TileGridItem,
|
|
5
|
+
TileGridProps,
|
|
6
|
+
} from '../../types/grid-view';
|
|
2
7
|
export { GridView } from './adapters/inbound/GridView';
|
|
3
8
|
export { TileGrid } from './adapters/inbound/TileGrid';
|
|
4
9
|
export { layoutTileGrid } from './application/layoutTileGrid';
|
|
@@ -5,14 +5,18 @@ export function createScrollGestureLock(
|
|
|
5
5
|
parent: ScrollGestureLock,
|
|
6
6
|
onActiveGesturesChange: (delta: 1 | -1) => void,
|
|
7
7
|
): ScrollGestureLock {
|
|
8
|
+
let activeGestures = 0;
|
|
8
9
|
return {
|
|
10
|
+
isActive: () => activeGestures > 0,
|
|
9
11
|
acquire: () => {
|
|
10
12
|
const releaseParent = parent.acquire();
|
|
11
13
|
let released = false;
|
|
14
|
+
activeGestures += 1;
|
|
12
15
|
onActiveGesturesChange(1);
|
|
13
16
|
return () => {
|
|
14
17
|
if (released) return;
|
|
15
18
|
released = true;
|
|
19
|
+
activeGestures -= 1;
|
|
16
20
|
onActiveGesturesChange(-1);
|
|
17
21
|
releaseParent();
|
|
18
22
|
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export { compileZoraTheme } from '#zora/theme/application/use-cases/compileZoraTheme';
|
|
2
|
+
export { createZoraThemeConfig } from '#zora/theme/application/use-cases/createZoraThemeConfig';
|
|
3
|
+
export { zoraDefaultTheme } from '#zora/theme/zoraDefaultTheme';
|
|
4
|
+
export type {
|
|
5
|
+
ZoraComputedTheme,
|
|
6
|
+
ZoraComputedThemeMode,
|
|
7
|
+
ZoraTheme,
|
|
8
|
+
ZoraThemeCompilationDiagnostic,
|
|
9
|
+
ZoraThemeCompilationDiagnosticCode,
|
|
10
|
+
ZoraThemeCompilationOptions,
|
|
11
|
+
ZoraThemeId,
|
|
12
|
+
ZoraThemeMode,
|
|
13
|
+
ZoraThemeProvenanceEntry,
|
|
14
|
+
ZoraThemeSelectionResult,
|
|
15
|
+
ZoraThemeSelectionTarget,
|
|
16
|
+
ZoraThemeSwatchRole,
|
|
17
|
+
ZoraThemeValueOrigin,
|
|
18
|
+
} from '#zora/types/theme';
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
export type {
|
|
2
|
+
ZoraBaseProps,
|
|
3
|
+
ZoraProviderProps,
|
|
4
|
+
ZoraThemeScopeProps,
|
|
5
|
+
ZoraToastCapability,
|
|
6
|
+
} from './runtime';
|
|
7
|
+
export { useZoraTheme, withZoraThemeScope, ZoraProvider, ZoraThemeScope } from './runtime';
|
|
1
8
|
export { compileZoraTheme } from '#zora/theme/application/use-cases/compileZoraTheme';
|
|
2
9
|
export { createZoraThemeConfig } from '#zora/theme/application/use-cases/createZoraThemeConfig';
|
|
3
10
|
export { zoraDefaultTheme } from '#zora/theme/zoraDefaultTheme';
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import { expect, test } from 'bun:test';
|
|
2
2
|
|
|
3
|
-
test(
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
test(
|
|
4
|
+
'passes the isolated Surface and RN Web 0.21 acceptance suite',
|
|
5
|
+
() => {
|
|
6
|
+
const subprocess = Bun.spawnSync({
|
|
7
|
+
cmd: [process.execPath, 'test', 'test-fixtures/platformAcceptance.test.tsx'],
|
|
8
|
+
stderr: 'pipe',
|
|
9
|
+
stdout: 'pipe',
|
|
10
|
+
});
|
|
11
|
+
const output = `${subprocess.stdout.toString()}\n${subprocess.stderr.toString()}`;
|
|
10
12
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
13
|
+
expect(subprocess.exitCode, output).toBe(0);
|
|
14
|
+
expect(output).toContain('11 pass');
|
|
15
|
+
expect(output).toContain('0 fail');
|
|
16
|
+
},
|
|
17
|
+
{ timeout: 120_000 },
|
|
18
|
+
);
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import type { FlowPortDescriptor } from '@ankhorage/contracts/flow';
|
|
2
|
+
import type React from 'react';
|
|
3
|
+
|
|
4
|
+
import type { ZoraBaseProps } from './base';
|
|
5
|
+
|
|
6
|
+
/** A position in the caller-owned flow coordinate space. */
|
|
7
|
+
export interface FlowPoint {
|
|
8
|
+
readonly x: number;
|
|
9
|
+
readonly y: number;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/** A typed connection endpoint owned by one flow node. */
|
|
13
|
+
export interface FlowPort {
|
|
14
|
+
readonly id: string;
|
|
15
|
+
readonly direction: 'input' | 'output';
|
|
16
|
+
readonly label: string;
|
|
17
|
+
/** The portable Contracts schema used to validate a prospective connection. */
|
|
18
|
+
readonly data?: FlowPortDescriptor['data'];
|
|
19
|
+
readonly disabled?: boolean;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/** Explains why the controlled canvas refused a connection request. */
|
|
23
|
+
export type FlowConnectionRejection =
|
|
24
|
+
| 'connection_requires_distinct_nodes'
|
|
25
|
+
| 'connection_requires_output_to_input'
|
|
26
|
+
| 'connection_targets_disabled_port'
|
|
27
|
+
| 'connection_types_incompatible';
|
|
28
|
+
|
|
29
|
+
/** A caller-owned node rendered on the flow canvas. */
|
|
30
|
+
export interface FlowNodeData {
|
|
31
|
+
readonly id: string;
|
|
32
|
+
readonly title: string;
|
|
33
|
+
readonly position: FlowPoint;
|
|
34
|
+
readonly ports: readonly FlowPort[];
|
|
35
|
+
readonly description?: string;
|
|
36
|
+
readonly disabled?: boolean;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** A stable address for a typed flow port. */
|
|
40
|
+
export interface FlowPortAddress {
|
|
41
|
+
readonly nodeId: string;
|
|
42
|
+
readonly portId: string;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/** A directed connection from an output port to an input port. */
|
|
46
|
+
export interface FlowConnection {
|
|
47
|
+
readonly id: string;
|
|
48
|
+
readonly source: FlowPortAddress;
|
|
49
|
+
readonly target: FlowPortAddress;
|
|
50
|
+
readonly label?: string;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/** A palette entry that asks the controlled host to insert a node. */
|
|
54
|
+
export interface FlowPaletteItem {
|
|
55
|
+
readonly id: string;
|
|
56
|
+
readonly title: string;
|
|
57
|
+
readonly description?: string;
|
|
58
|
+
readonly disabled?: boolean;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/** The controlled viewport for pan and zoom. */
|
|
62
|
+
export interface FlowViewport {
|
|
63
|
+
readonly pan: FlowPoint;
|
|
64
|
+
readonly zoom: number;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/** State given to a custom node renderer. */
|
|
68
|
+
export interface FlowNodeRenderState {
|
|
69
|
+
readonly selected: boolean;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/** Public controlled interaction contract for the shared React Native and React Native Web canvas. */
|
|
73
|
+
export interface FlowCanvasProps extends ZoraBaseProps {
|
|
74
|
+
readonly nodes: readonly FlowNodeData[];
|
|
75
|
+
readonly connections: readonly FlowConnection[];
|
|
76
|
+
readonly viewport: FlowViewport;
|
|
77
|
+
readonly paletteItems?: readonly FlowPaletteItem[];
|
|
78
|
+
readonly selectedNodeIds?: readonly string[];
|
|
79
|
+
readonly readOnly?: boolean;
|
|
80
|
+
readonly canUndo?: boolean;
|
|
81
|
+
readonly canRedo?: boolean;
|
|
82
|
+
readonly minZoom?: number;
|
|
83
|
+
readonly maxZoom?: number;
|
|
84
|
+
readonly renderNode?: (node: FlowNodeData, state: FlowNodeRenderState) => React.ReactNode;
|
|
85
|
+
readonly onNodeSelectionChange?: (nodeIds: readonly string[]) => void;
|
|
86
|
+
readonly onNodesMove?: (nodes: readonly FlowNodeData[]) => void;
|
|
87
|
+
readonly onViewportChange?: (viewport: FlowViewport) => void;
|
|
88
|
+
readonly onConnect?: (source: FlowPortAddress, target: FlowPortAddress) => void;
|
|
89
|
+
readonly onConnectionRejected?: (
|
|
90
|
+
source: FlowPortAddress,
|
|
91
|
+
target: FlowPortAddress,
|
|
92
|
+
reason: FlowConnectionRejection,
|
|
93
|
+
) => void;
|
|
94
|
+
readonly onDisconnect?: (connectionId: string) => void;
|
|
95
|
+
readonly onInsert?: (paletteItemId: string) => void;
|
|
96
|
+
readonly onNodesDelete?: (nodeIds: readonly string[]) => void;
|
|
97
|
+
readonly onUndo?: () => void;
|
|
98
|
+
readonly onRedo?: () => void;
|
|
99
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
|
|
3
|
+
import type { ZoraBaseProps } from './base';
|
|
4
|
+
import type { IconProps } from './icon';
|
|
5
|
+
|
|
6
|
+
/** A node-local point in unscaled pixels, measured from the node's top-left corner. */
|
|
7
|
+
export interface GraphNodePoint {
|
|
8
|
+
readonly x: number;
|
|
9
|
+
readonly y: number;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/** An optional connection anchor presented by a GraphNode; connection rules belong to the caller. */
|
|
13
|
+
export interface GraphNodePort {
|
|
14
|
+
readonly id: string;
|
|
15
|
+
readonly direction: 'input' | 'output';
|
|
16
|
+
readonly label: string;
|
|
17
|
+
readonly disabled?: boolean;
|
|
18
|
+
readonly testID?: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/** Generic, cross-platform node presentation shared by graph and canvas hosts. */
|
|
22
|
+
export interface GraphNodeProps extends ZoraBaseProps {
|
|
23
|
+
/** Optional default header title. Omit all header props to compose the entire card body. */
|
|
24
|
+
readonly title?: string;
|
|
25
|
+
readonly description?: string;
|
|
26
|
+
/** Leading icon source, rendered with the ZORA Icon. */
|
|
27
|
+
readonly icon?: IconProps;
|
|
28
|
+
/** Trailing caller-supplied badge content, rendered with the ZORA Badge. */
|
|
29
|
+
readonly badge?: React.ReactNode;
|
|
30
|
+
/** Arbitrary ZORA content composed beneath the title. */
|
|
31
|
+
readonly children?: React.ReactNode;
|
|
32
|
+
readonly ports?: readonly GraphNodePort[];
|
|
33
|
+
readonly selected?: boolean;
|
|
34
|
+
readonly disabled?: boolean;
|
|
35
|
+
readonly readOnly?: boolean;
|
|
36
|
+
/** Unscaled node width in pixels; defaults to 224. */
|
|
37
|
+
readonly width?: number;
|
|
38
|
+
/** Controlled press. Omit it, with `onMove`, to leave pointer handling to the host. */
|
|
39
|
+
readonly onPress?: () => void;
|
|
40
|
+
/** Controlled drag in screen-pixel deltas. Omit it to attach no gesture handlers. */
|
|
41
|
+
readonly onMove?: (delta: GraphNodePoint) => void;
|
|
42
|
+
readonly onPortPress?: (portId: string) => void;
|
|
43
|
+
/** Reports a port's anchor center in node-local pixels whenever layout changes. */
|
|
44
|
+
readonly onPortLayout?: (portId: string, anchor: GraphNodePoint) => void;
|
|
45
|
+
}
|
package/src/types/grid-view.ts
CHANGED
|
@@ -8,6 +8,17 @@ import type React from 'react';
|
|
|
8
8
|
|
|
9
9
|
import type { ZoraBaseProps } from './base';
|
|
10
10
|
|
|
11
|
+
/** Pixel mapping handed to a world layer so it can draw in the same coordinates as the items. */
|
|
12
|
+
export interface GridWorldLayerContext {
|
|
13
|
+
/** Pixel position of world coordinate (0, 0) inside the layer. */
|
|
14
|
+
readonly origin: { readonly x: number; readonly y: number };
|
|
15
|
+
readonly pixelsPerUnitX: number;
|
|
16
|
+
readonly pixelsPerUnitY: number;
|
|
17
|
+
/** Pixel size of the scrollable layer. */
|
|
18
|
+
readonly width: number;
|
|
19
|
+
readonly height: number;
|
|
20
|
+
}
|
|
21
|
+
|
|
11
22
|
/** The renderer owns presentation only; world geometry comes from grid-view. */
|
|
12
23
|
export interface GridViewProps extends ZoraBaseProps {
|
|
13
24
|
items: readonly GridRectItem[];
|
|
@@ -37,6 +48,13 @@ export interface GridViewProps extends ZoraBaseProps {
|
|
|
37
48
|
revealPaddingPixels?: number;
|
|
38
49
|
/** Keeps the rendered viewport fixed while preserving interaction within rendered items. */
|
|
39
50
|
viewportInteraction?: 'enabled' | 'locked';
|
|
51
|
+
/** Shows or hides the built-in pan and zoom buttons while keeping scroll and pinch interaction. */
|
|
52
|
+
viewportControls?: 'visible' | 'hidden';
|
|
53
|
+
/**
|
|
54
|
+
* Renders content in world coordinates beneath the items, scrolling and zooming with them.
|
|
55
|
+
* The layer is not virtualized and does not receive touches outside its own children.
|
|
56
|
+
*/
|
|
57
|
+
renderWorldLayer?: (layer: GridWorldLayerContext) => React.ReactNode;
|
|
40
58
|
onViewportChange?: (viewport: GridViewport) => void;
|
|
41
59
|
onVisibleItemIdsChange?: (ids: readonly string[]) => void;
|
|
42
60
|
renderItem: (item: GridRectItem) => React.ReactNode;
|
|
@@ -85,6 +103,8 @@ export interface GridPendingScroll {
|
|
|
85
103
|
readonly animated: boolean;
|
|
86
104
|
readonly expiresAt: number;
|
|
87
105
|
readonly target: number;
|
|
106
|
+
/** Keeps ownership until the native offset returns to its locked-gesture restore target. */
|
|
107
|
+
readonly restoring?: boolean;
|
|
88
108
|
}
|
|
89
109
|
|
|
90
110
|
/** Native capabilities and clock used by the programmatic-versus-user scroll arbiter. */
|
|
@@ -93,8 +113,8 @@ export interface GridScrollSyncOptions {
|
|
|
93
113
|
readonly scrollTo: (axis: GridScrollAxis, offset: number, animated: boolean) => void;
|
|
94
114
|
/** Reports a genuine user scroll as the pixel displacement of the native offset. */
|
|
95
115
|
readonly onUserScroll: (axis: GridScrollAxis, displacement: number) => void;
|
|
96
|
-
/**
|
|
97
|
-
readonly
|
|
116
|
+
/** Enables browser scroll events that lack native drag lifecycle signals. */
|
|
117
|
+
readonly acceptUnownedScroll?: boolean;
|
|
98
118
|
readonly now?: () => number;
|
|
99
119
|
readonly schedule?: (callback: () => void, delay: number) => ReturnType<typeof setTimeout>;
|
|
100
120
|
readonly cancel?: (handle: ReturnType<typeof setTimeout>) => void;
|
|
@@ -106,11 +126,13 @@ export interface GridScrollSync {
|
|
|
106
126
|
readonly isCurrent: (position: GridScrollPosition) => boolean;
|
|
107
127
|
/** Moves native scrolling to a viewport-derived position. */
|
|
108
128
|
readonly request: (position: GridScrollPosition, animated: boolean) => void;
|
|
129
|
+
/** Restores one native axis after a descendant gesture displaced it without publishing a pan. */
|
|
130
|
+
readonly restore: (axis: GridScrollAxis, offset: number, target: number) => void;
|
|
109
131
|
/** Routes one native scroll event. */
|
|
110
132
|
readonly scrolled: (axis: GridScrollAxis, offset: number) => void;
|
|
111
133
|
/** Hands an axis to the user, adopting the native offset at the start of their drag. */
|
|
112
134
|
readonly dragBegan: (axis: GridScrollAxis, offset: number) => void;
|
|
113
|
-
/** Adopts the final native offset
|
|
135
|
+
/** Adopts the final native offset after a genuine user gesture ends. */
|
|
114
136
|
readonly scrollEnded: (axis: GridScrollAxis, offset: number) => void;
|
|
115
137
|
/** Cancels every pending settle timer. */
|
|
116
138
|
readonly dispose: () => void;
|
package/src/types/layout.ts
CHANGED
|
@@ -35,4 +35,6 @@ export interface ScreenProps extends ZoraBaseProps {
|
|
|
35
35
|
export interface ScrollGestureLock {
|
|
36
36
|
/** Suspends scrolling until the returned release function runs; releasing twice is harmless. */
|
|
37
37
|
readonly acquire: () => () => void;
|
|
38
|
+
/** Reports whether this container currently has an active descendant gesture. */
|
|
39
|
+
readonly isActive?: () => boolean;
|
|
38
40
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
withZoraThemeScope
|
|
4
|
-
} from "./Accordion-
|
|
4
|
+
} from "./Accordion-pagdkp07.js";
|
|
5
5
|
import {
|
|
6
6
|
View2
|
|
7
|
-
} from "./Accordion-
|
|
7
|
+
} from "./Accordion-2kv6p7by.js";
|
|
8
8
|
import {
|
|
9
9
|
Heading2,
|
|
10
10
|
Text2
|
|
11
|
-
} from "./Accordion-
|
|
11
|
+
} from "./Accordion-5x4cv0kv.js";
|
|
12
12
|
|
|
13
13
|
// src/features/dialog/adapters/inbound/Dialog.tsx
|
|
14
14
|
import { Modal as SurfaceModal } from "@ankhorage/surface/web";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
withZoraThemeScope
|
|
4
|
-
} from "./Accordion-
|
|
4
|
+
} from "./Accordion-pagdkp07.js";
|
|
5
5
|
import {
|
|
6
6
|
Icon2
|
|
7
|
-
} from "./Accordion-
|
|
7
|
+
} from "./Accordion-hbwyj12m.js";
|
|
8
8
|
import {
|
|
9
9
|
View2
|
|
10
|
-
} from "./Accordion-
|
|
10
|
+
} from "./Accordion-2kv6p7by.js";
|
|
11
11
|
import {
|
|
12
12
|
useZoraTheme2
|
|
13
13
|
} from "./Accordion-x1ze1wvk.js";
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
withZoraThemeScope
|
|
4
|
-
} from "./Accordion-
|
|
4
|
+
} from "./Accordion-pagdkp07.js";
|
|
5
|
+
import {
|
|
6
|
+
createScrollGestureLock,
|
|
7
|
+
ScrollGestureLockContext,
|
|
8
|
+
useScrollGestureLock
|
|
9
|
+
} from "./Accordion-w8zke8fa.js";
|
|
5
10
|
|
|
6
11
|
// src/features/layout/adapters/inbound/View.tsx
|
|
7
12
|
import { View as SurfaceView } from "@ankhorage/surface/web";
|
|
@@ -111,40 +116,7 @@ function resolvePageMaxWidth(width = "default") {
|
|
|
111
116
|
|
|
112
117
|
// src/features/layout/adapters/inbound/ScrollView.tsx
|
|
113
118
|
import { ScrollView as SurfaceScrollView } from "@ankhorage/surface/web";
|
|
114
|
-
import React3 from "react";
|
|
115
|
-
|
|
116
|
-
// src/features/layout/utils/createScrollGestureLock.ts
|
|
117
|
-
function createScrollGestureLock(parent, onActiveGesturesChange) {
|
|
118
|
-
return {
|
|
119
|
-
acquire: () => {
|
|
120
|
-
const releaseParent = parent.acquire();
|
|
121
|
-
let released = false;
|
|
122
|
-
onActiveGesturesChange(1);
|
|
123
|
-
return () => {
|
|
124
|
-
if (released)
|
|
125
|
-
return;
|
|
126
|
-
released = true;
|
|
127
|
-
onActiveGesturesChange(-1);
|
|
128
|
-
releaseParent();
|
|
129
|
-
};
|
|
130
|
-
}
|
|
131
|
-
};
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
// src/features/layout/adapters/inbound/ScrollGestureLockContext.ts
|
|
135
119
|
import React from "react";
|
|
136
|
-
var ScrollGestureLockContext = React.createContext(undefined);
|
|
137
|
-
|
|
138
|
-
// src/features/layout/adapters/inbound/useScrollGestureLock.ts
|
|
139
|
-
import React2 from "react";
|
|
140
|
-
var unlockedScrollGesture = { acquire: () => () => {
|
|
141
|
-
return;
|
|
142
|
-
} };
|
|
143
|
-
function useScrollGestureLock() {
|
|
144
|
-
return React2.useContext(ScrollGestureLockContext) ?? unlockedScrollGesture;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
// src/features/layout/adapters/inbound/ScrollView.tsx
|
|
148
120
|
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
149
121
|
var ScrollView2 = withZoraThemeScope(ScrollViewInner);
|
|
150
122
|
function ScrollViewInner({
|
|
@@ -156,8 +128,8 @@ function ScrollViewInner({
|
|
|
156
128
|
...props
|
|
157
129
|
}) {
|
|
158
130
|
const parentLock = useScrollGestureLock();
|
|
159
|
-
const [activeGestures, setActiveGestures] =
|
|
160
|
-
const lock =
|
|
131
|
+
const [activeGestures, setActiveGestures] = React.useState(0);
|
|
132
|
+
const lock = React.useMemo(() => createScrollGestureLock(parentLock, (delta) => setActiveGestures((count) => count + delta)), [parentLock]);
|
|
161
133
|
return /* @__PURE__ */ jsx5(ScrollGestureLockContext.Provider, {
|
|
162
134
|
value: lock,
|
|
163
135
|
children: /* @__PURE__ */ jsx5(SurfaceScrollView, {
|
|
@@ -215,13 +187,13 @@ function ScreenInner({
|
|
|
215
187
|
}
|
|
216
188
|
var Screen2 = withZoraThemeScope(ScreenInner);
|
|
217
189
|
// src/features/layout/adapters/inbound/ZoraWebStyleSheet.tsx
|
|
218
|
-
import
|
|
190
|
+
import React2 from "react";
|
|
219
191
|
import { Platform, StyleSheet } from "react-native-web";
|
|
220
192
|
function ZoraWebStyleSheet2() {
|
|
221
193
|
const sheet = getReactNativeWebStyleSheet();
|
|
222
194
|
if (sheet === null)
|
|
223
195
|
return null;
|
|
224
|
-
return
|
|
196
|
+
return React2.createElement("style", {
|
|
225
197
|
dangerouslySetInnerHTML: { __html: sheet.textContent },
|
|
226
198
|
id: sheet.id
|
|
227
199
|
});
|