@ankhorage/zora 28.10.1 → 28.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/README.md +1 -1
- package/dist/capabilities/index.js +2 -1
- package/dist/capabilities/index.js.map +3 -3
- package/dist/constants/authoring.d.ts +3 -3
- package/dist/constants/authoring.d.ts.map +1 -1
- package/dist/constants/authoring.js +1 -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/calendar/adapters/inbound/Calendar.d.ts.map +1 -1
- package/dist/features/calendar/adapters/inbound/Calendar.js +91 -7
- package/dist/features/calendar/adapters/inbound/Calendar.js.map +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/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/gradient/gradientMeta.d.ts +1 -1
- 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/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/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/layout/viewMeta.d.ts +1 -1
- package/dist/features/list/flatListMeta.d.ts +1 -1
- package/dist/features/list/sectionListMeta.d.ts +1 -1
- package/dist/features/master-detail/masterDetailMeta.d.ts +1 -1
- package/dist/features/popover/popoverMeta.d.ts +1 -1
- package/dist/features/reader/meta.d.ts +2 -2
- package/dist/features/registry/bindableComponentMeta.d.ts +2 -2
- 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/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/features/time-grid/adapters/inbound/TimeGrid.d.ts +1 -1
- package/dist/features/time-grid/adapters/inbound/TimeGrid.d.ts.map +1 -1
- package/dist/features/time-grid/adapters/inbound/TimeGrid.js +45 -22
- package/dist/features/time-grid/adapters/inbound/TimeGrid.js.map +1 -1
- package/dist/types/color.d.ts +3 -3
- package/dist/types/color.d.ts.map +1 -1
- package/dist/types/color.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/dist/types/time-grid.d.ts +9 -0
- package/dist/types/time-grid.d.ts.map +1 -1
- package/dist/types/time-grid.js.map +1 -1
- package/package.json +24 -6
- package/src/constants/authoring.ts +1 -0
- package/src/features/calendar/adapters/inbound/Calendar.interaction.test.tsx +65 -4
- package/src/features/calendar/adapters/inbound/Calendar.tsx +172 -22
- 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/features/time-grid/adapters/inbound/TimeGrid.tsx +64 -21
- package/src/platformAcceptance.test.ts +15 -11
- package/src/types/color.ts +3 -3
- 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/src/types/time-grid.ts +9 -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-q2yxtdzc.js → Accordion-95003ycq.js} +144 -27
- 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-59x6e7bs.js → Accordion-gb3mfjmx.js} +43 -20
- 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-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-picker/ColorPicker.types-0.d.ts +3 -3
- package/web-dist/components/color-tone/ColorTone.js +17 -15
- package/web-dist/components/color-tone/ColorTone.types-0.d.ts +3 -3
- package/web-dist/components/color-wheel/ColorWheel.js +17 -15
- package/web-dist/components/color-wheel/ColorWheel.types-0.d.ts +1 -1
- 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.d.ts +1 -1
- package/web-dist/components/time-grid/TimeGrid.dependency-2.d.ts +13 -0
- package/web-dist/components/time-grid/TimeGrid.js +3 -2
- package/web-dist/components/time-grid/TimeGrid.types-0.d.ts +10 -0
- 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 +1059 -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,4 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
getLaneIntervalPlacement,
|
|
3
|
+
getVisibleGridItems,
|
|
4
|
+
type GridLaneIntervalPlacement,
|
|
5
|
+
type GridViewport,
|
|
6
|
+
} from '@ankhorage/grid-view';
|
|
2
7
|
import React from 'react';
|
|
3
8
|
import { Pressable, View } from 'react-native';
|
|
4
9
|
|
|
@@ -10,6 +15,7 @@ import { TimeGridKeyboardProxy } from './TimeGridKeyboardProxy';
|
|
|
10
15
|
|
|
11
16
|
/*** Presents virtualized variable-height interval lanes through ZORA's shared GridView renderer. */
|
|
12
17
|
export function TimeGrid({
|
|
18
|
+
contentHeight: requestedContentHeight,
|
|
13
19
|
contentWidth,
|
|
14
20
|
focusedIntervalId,
|
|
15
21
|
height,
|
|
@@ -20,12 +26,15 @@ export function TimeGrid({
|
|
|
20
26
|
onIntervalPress,
|
|
21
27
|
onViewportChange,
|
|
22
28
|
onVisibleIntervalIdsChange,
|
|
29
|
+
orientation = 'horizontal',
|
|
23
30
|
overscanPixels,
|
|
24
31
|
renderInterval,
|
|
25
32
|
renderLaneLabel,
|
|
33
|
+
renderWorldLayer,
|
|
26
34
|
revealPaddingPixels,
|
|
27
35
|
selectedIntervalIds = [],
|
|
28
36
|
testID,
|
|
37
|
+
viewportControls,
|
|
29
38
|
width,
|
|
30
39
|
zoom,
|
|
31
40
|
}: TimeGridProps) {
|
|
@@ -49,18 +58,29 @@ export function TimeGrid({
|
|
|
49
58
|
[intervals],
|
|
50
59
|
);
|
|
51
60
|
const selectedIds = React.useMemo(() => new Set(selectedIntervalIds), [selectedIntervalIds]);
|
|
52
|
-
const
|
|
61
|
+
const laneExtent = React.useMemo(
|
|
53
62
|
() => lanes.reduce((total, lane) => total + lane.height, 0),
|
|
54
63
|
[lanes],
|
|
55
64
|
);
|
|
65
|
+
const contentHeight = orientation === 'vertical' ? (requestedContentHeight ?? 0) : laneExtent;
|
|
66
|
+
const resolvedContentWidth = orientation === 'vertical' ? laneExtent : contentWidth;
|
|
67
|
+
const placements = React.useMemo(
|
|
68
|
+
() =>
|
|
69
|
+
orientation === 'vertical'
|
|
70
|
+
? createVerticalPlacements(lanes, intervals)
|
|
71
|
+
: intervals.map((interval) => getLaneIntervalPlacement(lanes, interval)),
|
|
72
|
+
[intervals, lanes, orientation],
|
|
73
|
+
);
|
|
56
74
|
const visibleIntervals = React.useMemo(
|
|
57
|
-
() =>
|
|
58
|
-
|
|
75
|
+
() =>
|
|
76
|
+
orientation === 'vertical'
|
|
77
|
+
? getVisibleGridItems(placements, viewport, overscanPixels)
|
|
78
|
+
: resolveTimeGridVisibleIntervals(lanes, intervals, viewport, overscanPixels),
|
|
79
|
+
[intervals, lanes, orientation, overscanPixels, placements, viewport],
|
|
59
80
|
);
|
|
60
81
|
const focusedPlacement = React.useMemo(() => {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}, [focusedIntervalId, intervals, lanes]);
|
|
82
|
+
return placements.find((interval) => interval.id === focusedIntervalId);
|
|
83
|
+
}, [focusedIntervalId, placements]);
|
|
64
84
|
const gridItems = React.useMemo(
|
|
65
85
|
() =>
|
|
66
86
|
focusedPlacement && !visibleIntervals.some((interval) => interval.id === focusedPlacement.id)
|
|
@@ -71,12 +91,12 @@ export function TimeGrid({
|
|
|
71
91
|
const labelIntervals = React.useMemo(
|
|
72
92
|
() =>
|
|
73
93
|
lanes.map((lane) => ({
|
|
74
|
-
extent:
|
|
94
|
+
extent: resolvedContentWidth,
|
|
75
95
|
id: `lane-label-${lane.id}`,
|
|
76
96
|
laneId: lane.id,
|
|
77
97
|
start: 0,
|
|
78
98
|
})),
|
|
79
|
-
[
|
|
99
|
+
[lanes, resolvedContentWidth],
|
|
80
100
|
);
|
|
81
101
|
const visibleLabels = React.useMemo(
|
|
82
102
|
() => resolveTimeGridVisibleIntervals(lanes, labelIntervals, viewport, overscanPixels),
|
|
@@ -97,22 +117,14 @@ export function TimeGrid({
|
|
|
97
117
|
|
|
98
118
|
const resolveNextFocusId = React.useCallback(
|
|
99
119
|
(intervalId: string, direction: 'down' | 'left' | 'right' | 'up') => {
|
|
100
|
-
|
|
101
|
-
height: contentHeight,
|
|
102
|
-
offsetX: 0,
|
|
103
|
-
offsetY: 0,
|
|
104
|
-
pixelsPerUnitX: 1,
|
|
105
|
-
pixelsPerUnitY: 1,
|
|
106
|
-
width: contentWidth,
|
|
107
|
-
});
|
|
108
|
-
return resolveTimeGridNextFocusId(allIntervals, intervalId, direction);
|
|
120
|
+
return resolveTimeGridNextFocusId(placements, intervalId, direction);
|
|
109
121
|
},
|
|
110
|
-
[
|
|
122
|
+
[placements],
|
|
111
123
|
);
|
|
112
124
|
|
|
113
125
|
return (
|
|
114
126
|
<View style={{ flexDirection: 'row', height, width }} testID={testID}>
|
|
115
|
-
{renderLaneLabel ? (
|
|
127
|
+
{orientation === 'horizontal' && renderLaneLabel ? (
|
|
116
128
|
<View
|
|
117
129
|
accessibilityElementsHidden
|
|
118
130
|
pointerEvents="none"
|
|
@@ -139,7 +151,7 @@ export function TimeGrid({
|
|
|
139
151
|
) : null}
|
|
140
152
|
<GridView
|
|
141
153
|
contentHeight={contentHeight}
|
|
142
|
-
contentWidth={
|
|
154
|
+
contentWidth={resolvedContentWidth}
|
|
143
155
|
focusedItemId={focusedIntervalId}
|
|
144
156
|
height={height}
|
|
145
157
|
interactionPolicy={interactionPolicy}
|
|
@@ -179,7 +191,9 @@ export function TimeGrid({
|
|
|
179
191
|
);
|
|
180
192
|
}}
|
|
181
193
|
revealPaddingPixels={revealPaddingPixels}
|
|
194
|
+
renderWorldLayer={renderWorldLayer}
|
|
182
195
|
testID={testID === undefined ? undefined : `${testID}-viewport`}
|
|
196
|
+
viewportControls={viewportControls}
|
|
183
197
|
width={width}
|
|
184
198
|
zoom={zoom}
|
|
185
199
|
/>
|
|
@@ -187,6 +201,35 @@ export function TimeGrid({
|
|
|
187
201
|
);
|
|
188
202
|
}
|
|
189
203
|
|
|
204
|
+
/*** Maps date lanes and time intervals into a conventional vertical-time world. */
|
|
205
|
+
function createVerticalPlacements(
|
|
206
|
+
lanes: TimeGridProps['lanes'],
|
|
207
|
+
intervals: TimeGridProps['intervals'],
|
|
208
|
+
): readonly GridLaneIntervalPlacement[] {
|
|
209
|
+
const offsets = new Map<string, number>();
|
|
210
|
+
lanes.reduce((offset, lane) => {
|
|
211
|
+
offsets.set(lane.id, offset);
|
|
212
|
+
return offset + lane.height;
|
|
213
|
+
}, 0);
|
|
214
|
+
return intervals.flatMap((interval) => {
|
|
215
|
+
const x = offsets.get(interval.laneId);
|
|
216
|
+
const laneIndex = lanes.findIndex((candidate) => candidate.id === interval.laneId);
|
|
217
|
+
const lane = lanes.find((candidate) => candidate.id === interval.laneId);
|
|
218
|
+
return x === undefined || lane === undefined || laneIndex < 0
|
|
219
|
+
? []
|
|
220
|
+
: [
|
|
221
|
+
{
|
|
222
|
+
...interval,
|
|
223
|
+
height: interval.extent,
|
|
224
|
+
laneIndex,
|
|
225
|
+
width: lane.height,
|
|
226
|
+
x,
|
|
227
|
+
y: interval.start,
|
|
228
|
+
},
|
|
229
|
+
];
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
|
|
190
233
|
/*** Maps desktop arrow keys to the platform-neutral interval navigation directions. */
|
|
191
234
|
function resolveKeyboardDirection(key: string): 'down' | 'left' | 'right' | 'up' | undefined {
|
|
192
235
|
if (key === 'ArrowDown') return 'down';
|
|
@@ -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
|
+
);
|
package/src/types/color.ts
CHANGED
|
@@ -4,15 +4,15 @@ import type { ZoraBaseProps } from './base';
|
|
|
4
4
|
|
|
5
5
|
export type ColorPickerTab = 'grid' | 'wheel';
|
|
6
6
|
|
|
7
|
-
/** A consumer-owned OKLCH target from
|
|
7
|
+
/** A consumer-owned OKLCH target from a tone catalog. */
|
|
8
8
|
export interface ColorToneTarget {
|
|
9
9
|
readonly lightness: number;
|
|
10
10
|
readonly chroma: number;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
|
-
* Structural boundary for a
|
|
15
|
-
* neither the catalog nor its classifications.
|
|
14
|
+
* Structural boundary for a consumer-owned tone-pair entry. ZORA intentionally
|
|
15
|
+
* owns neither the catalog nor its classifications.
|
|
16
16
|
*/
|
|
17
17
|
export interface ColorToneDefinition {
|
|
18
18
|
readonly id: string;
|
|
@@ -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
|
+
}
|