@ankhorage/zora 22.1.4 → 23.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/README.md +1 -1
- package/dist/constants/authoring.d.ts +4 -4
- package/dist/constants/authoring.d.ts.map +1 -1
- package/dist/constants/authoring.js +2 -0
- package/dist/constants/authoring.js.map +1 -1
- package/dist/features/accordion/accordionItemMeta.d.ts +1 -1
- package/dist/features/auth/adapters/inbound/AuthScreen.d.ts +10 -0
- package/dist/features/auth/adapters/inbound/AuthScreen.d.ts.map +1 -0
- package/dist/features/auth/adapters/inbound/AuthScreen.js +67 -0
- package/dist/features/auth/adapters/inbound/AuthScreen.js.map +1 -0
- package/dist/features/auth/authScreenMeta.d.ts +204 -0
- package/dist/features/auth/authScreenMeta.d.ts.map +1 -0
- package/dist/features/auth/authScreenMeta.js +112 -0
- package/dist/features/auth/authScreenMeta.js.map +1 -0
- package/dist/features/auth/public.d.ts +2 -1
- package/dist/features/auth/public.d.ts.map +1 -1
- package/dist/features/auth/public.js +1 -0
- package/dist/features/auth/public.js.map +1 -1
- package/dist/features/bottom-sheet/bottomSheetMeta.d.ts +1 -1
- package/dist/features/card/cardMeta.d.ts +1 -1
- package/dist/features/card/mediaCardMeta.d.ts +1 -1
- package/dist/features/card/postCardMeta.d.ts +1 -1
- package/dist/features/chat/messageBubbleMeta.d.ts +1 -1
- package/dist/features/dialog/dialogMeta.d.ts +2 -2
- package/dist/features/gradient/gradientMeta.d.ts +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/GraphNodeOverlay.d.ts +2 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/GraphNodeOverlay.d.ts.map +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/GraphNodeOverlay.js +2 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/GraphNodeOverlay.js.map +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/GraphView.d.ts.map +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/GraphView.js +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/GraphView.js.map +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/bindGraphEvents.d.ts.map +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/bindGraphEvents.js +12 -4
- package/dist/features/graph-view/adapters/inbound/web-artifact/bindGraphEvents.js.map +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/createGraphRuntime.d.ts +2 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/createGraphRuntime.d.ts.map +1 -1
- package/dist/features/graph-view/adapters/inbound/web-artifact/createGraphRuntime.js +3 -3
- package/dist/features/graph-view/adapters/inbound/web-artifact/createGraphRuntime.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/viewMeta.d.ts +1 -1
- package/dist/features/list/flatListMeta.d.ts +1 -1
- package/dist/features/list/sectionListMeta.d.ts +1 -1
- package/dist/features/reader/meta.d.ts +2 -2
- package/dist/features/registry/ZORA_COMPONENT_REGISTRY.d.ts.map +1 -1
- package/dist/features/registry/ZORA_COMPONENT_REGISTRY.js +2 -1
- package/dist/features/registry/ZORA_COMPONENT_REGISTRY.js.map +1 -1
- package/dist/features/registry/bindableComponentMeta.d.ts +2 -2
- package/dist/features/registry/componentMeta.d.ts.map +1 -1
- package/dist/features/registry/componentMeta.js +2 -0
- package/dist/features/registry/componentMeta.js.map +1 -1
- package/dist/features/scanner/meta.d.ts +2 -2
- package/dist/features/section/screenSectionMeta.d.ts +1 -1
- package/dist/features/selection/adapters/inbound/SelectableItem.d.ts +1 -5
- package/dist/features/selection/adapters/inbound/SelectableItem.d.ts.map +1 -1
- package/dist/features/selection/adapters/inbound/SelectableItem.js +30 -54
- package/dist/features/selection/adapters/inbound/SelectableItem.js.map +1 -1
- package/dist/features/selection/adapters/inbound/SelectionProvider.d.ts +2 -6
- package/dist/features/selection/adapters/inbound/SelectionProvider.d.ts.map +1 -1
- package/dist/features/selection/adapters/inbound/SelectionProvider.js +36 -32
- package/dist/features/selection/adapters/inbound/SelectionProvider.js.map +1 -1
- package/dist/features/selection/application/resolveSelectionEventIntent.d.ts +5 -0
- package/dist/features/selection/application/resolveSelectionEventIntent.d.ts.map +1 -0
- package/dist/features/selection/application/resolveSelectionEventIntent.js +49 -0
- package/dist/features/selection/application/resolveSelectionEventIntent.js.map +1 -0
- package/dist/features/selection/public.d.ts +2 -0
- package/dist/features/selection/public.d.ts.map +1 -1
- package/dist/features/selection/public.js +1 -0
- package/dist/features/selection/public.js.map +1 -1
- package/dist/features/selection/utils/resolveSelectionNextIds.d.ts +4 -5
- package/dist/features/selection/utils/resolveSelectionNextIds.d.ts.map +1 -1
- package/dist/features/selection/utils/resolveSelectionNextIds.js +6 -13
- package/dist/features/selection/utils/resolveSelectionNextIds.js.map +1 -1
- package/dist/features/surface/surfaceMeta.d.ts +1 -1
- package/dist/features/tabs/tabPanelMeta.d.ts +1 -1
- package/dist/features/tree-view/adapters/inbound/TreeItem.d.ts +3 -2
- package/dist/features/tree-view/adapters/inbound/TreeItem.d.ts.map +1 -1
- package/dist/features/tree-view/adapters/inbound/TreeItem.js +11 -4
- package/dist/features/tree-view/adapters/inbound/TreeItem.js.map +1 -1
- package/dist/features/tree-view/adapters/inbound/TreeView.d.ts.map +1 -1
- package/dist/features/tree-view/adapters/inbound/TreeView.js +4 -5
- package/dist/features/tree-view/adapters/inbound/TreeView.js.map +1 -1
- package/dist/features/tree-view/adapters/inbound/web-artifact/TreeItemRow.d.ts +3 -2
- package/dist/features/tree-view/adapters/inbound/web-artifact/TreeItemRow.d.ts.map +1 -1
- package/dist/features/tree-view/adapters/inbound/web-artifact/TreeItemRow.js +17 -9
- package/dist/features/tree-view/adapters/inbound/web-artifact/TreeItemRow.js.map +1 -1
- package/dist/features/tree-view/adapters/inbound/web-artifact/TreeView.d.ts +4 -3
- package/dist/features/tree-view/adapters/inbound/web-artifact/TreeView.d.ts.map +1 -1
- package/dist/features/tree-view/adapters/inbound/web-artifact/TreeView.js +8 -8
- package/dist/features/tree-view/adapters/inbound/web-artifact/TreeView.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/types/auth.d.ts +19 -0
- package/dist/types/auth.d.ts.map +1 -1
- package/dist/types/auth.js.map +1 -1
- package/dist/types/graph-view.d.ts +2 -0
- package/dist/types/graph-view.d.ts.map +1 -1
- package/dist/types/graph-view.js.map +1 -1
- package/dist/types/selection.d.ts +3 -0
- package/dist/types/selection.d.ts.map +1 -1
- package/dist/types/selection.js.map +1 -1
- package/dist/types/tree-view.d.ts +3 -2
- package/dist/types/tree-view.d.ts.map +1 -1
- package/dist/types/tree-view.js.map +1 -1
- package/package.json +2 -2
- package/src/constants/authoring.ts +2 -0
- package/src/features/auth/adapters/inbound/AuthScreen.tsx +202 -0
- package/src/features/auth/authScreenMeta.ts +114 -0
- package/src/features/auth/public.test.ts +6 -0
- package/src/features/auth/public.ts +3 -0
- package/src/features/graph-view/adapters/inbound/web-artifact/GraphNodeOverlay.tsx +10 -2
- package/src/features/graph-view/adapters/inbound/web-artifact/GraphView.tsx +3 -1
- package/src/features/graph-view/adapters/inbound/web-artifact/bindGraphEvents.ts +22 -5
- package/src/features/graph-view/adapters/inbound/web-artifact/createGraphRuntime.test.ts +21 -0
- package/src/features/graph-view/adapters/inbound/web-artifact/createGraphRuntime.ts +10 -3
- package/src/features/registry/ZORA_COMPONENT_REGISTRY.ts +2 -0
- package/src/features/registry/componentMeta.test.ts +1 -0
- package/src/features/registry/componentMeta.ts +2 -0
- package/src/features/selection/adapters/inbound/SelectableItem.tsx +33 -50
- package/src/features/selection/adapters/inbound/SelectionProvider.tsx +34 -35
- package/src/features/selection/application/resolveSelectionEventIntent.test.ts +35 -0
- package/src/features/selection/application/resolveSelectionEventIntent.ts +55 -0
- package/src/features/selection/public.ts +2 -0
- package/src/features/selection/utils/resolveSelectionNextIds.test.ts +1 -14
- package/src/features/selection/utils/resolveSelectionNextIds.ts +6 -28
- package/src/features/tree-view/adapters/inbound/TreeItem.tsx +25 -9
- package/src/features/tree-view/adapters/inbound/TreeView.tsx +4 -6
- package/src/features/tree-view/adapters/inbound/web-artifact/TreeItemRow.tsx +26 -8
- package/src/features/tree-view/adapters/inbound/web-artifact/TreeView.test.tsx +77 -7
- package/src/features/tree-view/adapters/inbound/web-artifact/TreeView.tsx +11 -9
- package/src/index.ts +4 -0
- package/src/showcaseCoverage.test.ts +1 -0
- package/src/types/auth.ts +21 -0
- package/src/types/graph-view.ts +2 -0
- package/src/types/selection.ts +3 -0
- package/src/types/tree-view.ts +3 -2
- package/web-dist/chunks/{Accordion-j2aw3d5b.js → Accordion-01e56hb5.js} +1 -1
- package/web-dist/chunks/{Accordion-784f23tq.js → Accordion-14p7zanv.js} +1 -1
- package/web-dist/chunks/{Accordion-cecn51ry.js → Accordion-17pht8jd.js} +3 -3
- package/web-dist/chunks/{Accordion-555gnfmw.js → Accordion-2ak69ntj.js} +11 -11
- package/web-dist/chunks/{Accordion-ycmg06sq.js → Accordion-46vwm9xv.js} +3 -3
- package/web-dist/chunks/{Accordion-nn38n7q4.js → Accordion-4r9a9qny.js} +5 -5
- package/web-dist/chunks/Accordion-5df6cgyf.js +55 -0
- package/web-dist/chunks/{Accordion-v1dtv6v0.js → Accordion-5pskbqss.js} +7 -7
- package/web-dist/chunks/{Accordion-sr353w95.js → Accordion-78mj69zp.js} +2 -2
- package/web-dist/chunks/{Accordion-emczc5rg.js → Accordion-8xdet564.js} +16 -16
- package/web-dist/chunks/{Accordion-ajydqhjp.js → Accordion-8xk2zmr5.js} +2 -2
- package/web-dist/chunks/{Accordion-8af800ts.js → Accordion-9n7h9hag.js} +8 -8
- package/web-dist/chunks/{Accordion-73m7z73v.js → Accordion-b9myvfep.js} +5 -5
- package/web-dist/chunks/{Accordion-vmz8y01b.js → Accordion-bmp1ab7m.js} +496 -303
- package/web-dist/chunks/{Accordion-s1jhv8gk.js → Accordion-cqgbx1pw.js} +4 -4
- package/web-dist/chunks/{Accordion-2fm2tm5r.js → Accordion-cydzrpk2.js} +2 -2
- package/web-dist/chunks/{Accordion-07rdw2vh.js → Accordion-ejns5mga.js} +5 -5
- package/web-dist/chunks/{Accordion-yz7b7njb.js → Accordion-ejy7gr0a.js} +6 -6
- package/web-dist/chunks/{Accordion-mpnb4qqw.js → Accordion-f2mfgcx6.js} +15 -15
- package/web-dist/chunks/{Accordion-bsy1jrak.js → Accordion-ff583p4q.js} +2 -2
- package/web-dist/chunks/{Accordion-jj3bg8c1.js → Accordion-jksn8783.js} +6 -6
- package/web-dist/chunks/{Accordion-tj61sa5s.js → Accordion-jnwa02s7.js} +4 -4
- package/web-dist/chunks/{Accordion-rkv7jyaj.js → Accordion-kemavggr.js} +1 -1
- package/web-dist/chunks/{Accordion-mvfz28m8.js → Accordion-kmv2fp6m.js} +7 -7
- package/web-dist/chunks/{Accordion-jhwsvx3g.js → Accordion-kpnwdpb5.js} +1 -1
- package/web-dist/chunks/{Accordion-avmgvcef.js → Accordion-mm4kx13n.js} +10 -10
- package/web-dist/chunks/{Accordion-qvt6qdqm.js → Accordion-nggjwm07.js} +6 -6
- package/web-dist/chunks/{Accordion-yf6vseep.js → Accordion-q0st659f.js} +82 -89
- package/web-dist/chunks/{Accordion-zx0jc0kg.js → Accordion-qb8ppq9t.js} +5 -5
- package/web-dist/chunks/Accordion-r23sx4gf.js +34 -0
- package/web-dist/chunks/{Accordion-9rnepkvk.js → Accordion-rev0zb75.js} +6 -6
- package/web-dist/chunks/{Accordion-z585n0mr.js → Accordion-rjgdrn7y.js} +1 -1
- package/web-dist/chunks/{Accordion-pnvt10cv.js → Accordion-rnjt5z4y.js} +19 -19
- package/web-dist/chunks/{Accordion-45ej9brb.js → Accordion-tyqds4zr.js} +6 -6
- package/web-dist/chunks/{Accordion-8hhvtcxp.js → Accordion-v166qr59.js} +4 -4
- package/web-dist/chunks/{Accordion-1cgz6f8t.js → Accordion-x4rjd7yn.js} +1 -1
- package/web-dist/chunks/{Accordion-zf3kzvef.js → Accordion-xw1gkpfk.js} +6 -6
- package/web-dist/chunks/{Accordion-nc5gnvnb.js → Accordion-yms7x22j.js} +9 -9
- package/web-dist/chunks/{Accordion-b3qy1trj.js → Accordion-z1trs7s1.js} +26 -26
- package/web-dist/chunks/{Accordion-5qmfa7vr.js → Accordion-z8h1hn96.js} +5 -5
- package/web-dist/components/accordion/Accordion.js +5 -5
- package/web-dist/components/accordion-item/AccordionItem.js +5 -5
- package/web-dist/components/activity-indicator/ActivityIndicator.js +1 -1
- package/web-dist/components/app-bar/AppBar.js +9 -9
- package/web-dist/components/app-shell/AppShell.js +2 -2
- package/web-dist/components/auth-screen/AuthScreen.d.ts +9 -0
- package/web-dist/components/auth-screen/AuthScreen.js +43 -0
- package/web-dist/components/auth-screen/index.d.ts +1 -0
- package/web-dist/components/auth-screen/index.js +2 -0
- package/web-dist/components/avatar/Avatar.js +5 -5
- package/web-dist/components/avatar-group/AvatarGroup.js +5 -5
- package/web-dist/components/badge/Badge.js +3 -3
- package/web-dist/components/barcode-scanner-view/BarcodeScannerView.js +12 -12
- package/web-dist/components/bottom-sheet/BottomSheet.js +3 -3
- package/web-dist/components/bottom-sheet-flat-list/BottomSheetFlatList.js +3 -3
- package/web-dist/components/bottom-sheet-scroll-view/BottomSheetScrollView.js +3 -3
- package/web-dist/components/bottom-sheet-section-list/BottomSheetSectionList.js +3 -3
- package/web-dist/components/bottom-sheet-view/BottomSheetView.js +3 -3
- package/web-dist/components/bottom-sheet-virtualized-list/BottomSheetVirtualizedList.js +3 -3
- package/web-dist/components/breadcrumbs/Breadcrumbs.js +11 -11
- package/web-dist/components/button/Button.js +5 -5
- package/web-dist/components/button-group/ButtonGroup.js +5 -5
- package/web-dist/components/camera-permission-view/CameraPermissionView.js +12 -12
- package/web-dist/components/card/Card.js +11 -11
- 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 +9 -9
- package/web-dist/components/checkbox/Checkbox.js +6 -6
- package/web-dist/components/checkbox-group/CheckboxGroup.js +6 -6
- package/web-dist/components/chess-board/ChessBoard.js +2 -2
- package/web-dist/components/chip/Chip.js +5 -5
- package/web-dist/components/chip-group/ChipGroup.js +5 -5
- package/web-dist/components/collection-editor/CollectionEditor.js +13 -13
- package/web-dist/components/content-rail/ContentRail.js +8 -8
- package/web-dist/components/data-table/DataTable.js +22 -22
- package/web-dist/components/date-picker/DatePicker.js +15 -15
- package/web-dist/components/dialog/Dialog.js +5 -5
- package/web-dist/components/divider/Divider.js +2 -2
- package/web-dist/components/empty-state/EmptyState.js +12 -12
- package/web-dist/components/field/Field.js +7 -7
- package/web-dist/components/flat-list/FlatList.js +7 -7
- package/web-dist/components/forgot-password-form/ForgotPasswordForm.d.ts +1 -0
- package/web-dist/components/forgot-password-form/ForgotPasswordForm.js +21 -16
- package/web-dist/components/form/Form.js +9 -9
- package/web-dist/components/form-actions/FormActions.js +9 -9
- package/web-dist/components/form-error/FormError.js +9 -9
- package/web-dist/components/game/Game.js +3 -3
- package/web-dist/components/game-entity/GameEntity.js +3 -3
- package/web-dist/components/game-field/GameField.js +3 -3
- package/web-dist/components/game-input-zone/GameInputZone.js +3 -3
- package/web-dist/components/game-measurement-probe/GameMeasurementProbe.js +3 -3
- package/web-dist/components/game-overlay/GameOverlay.js +3 -3
- package/web-dist/components/gradient/Gradient.js +3 -3
- package/web-dist/components/gradient-renderer-provider/GradientRendererProvider.js +3 -3
- package/web-dist/components/graph-view/GraphView.js +20 -11
- package/web-dist/components/graph-view/GraphView.types-0.d.ts +2 -0
- package/web-dist/components/grid/Grid.js +2 -2
- package/web-dist/components/heading/Heading.js +4 -4
- package/web-dist/components/hero/Hero.js +14 -14
- package/web-dist/components/icon/Icon.js +2 -2
- package/web-dist/components/icon-button/IconButton.js +5 -5
- package/web-dist/components/image/Image.js +4 -4
- package/web-dist/components/keyboard-avoiding-view/KeyboardAvoidingView.js +5 -32
- package/web-dist/components/list/List.js +7 -7
- package/web-dist/components/list-item/ListItem.js +7 -7
- package/web-dist/components/list-section/ListSection.js +7 -7
- package/web-dist/components/media-card/MediaCard.js +11 -11
- package/web-dist/components/message-bubble/MessageBubble.js +9 -9
- package/web-dist/components/metric-card/MetricCard.js +11 -11
- package/web-dist/components/missing-element/MissingElement.js +10 -10
- package/web-dist/components/o-auth-provider-button/OAuthProviderButton.d.ts +1 -0
- package/web-dist/components/o-auth-provider-button/OAuthProviderButton.js +21 -16
- package/web-dist/components/o-auth-provider-list/OAuthProviderList.d.ts +1 -0
- package/web-dist/components/o-auth-provider-list/OAuthProviderList.js +21 -16
- package/web-dist/components/opening-book/OpeningBook.js +2 -2
- package/web-dist/components/otp-form/OtpForm.d.ts +1 -0
- package/web-dist/components/otp-form/OtpForm.js +21 -16
- package/web-dist/components/pagination/Pagination.js +8 -8
- package/web-dist/components/palette-item/PaletteItem.js +13 -13
- 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-menu/PopoverMenu.js +6 -6
- package/web-dist/components/post-card/PostCard.js +11 -11
- package/web-dist/components/product-card/ProductCard.js +11 -11
- package/web-dist/components/progress/Progress.js +4 -4
- package/web-dist/components/progress-ring/ProgressRing.js +4 -4
- package/web-dist/components/radio/Radio.js +7 -7
- package/web-dist/components/radio-group/RadioGroup.js +7 -7
- package/web-dist/components/rating/Rating.js +3 -3
- package/web-dist/components/reader-surface/ReaderSurface.js +15 -15
- package/web-dist/components/scan-overlay/ScanOverlay.js +12 -12
- package/web-dist/components/screen/Screen.js +2 -2
- package/web-dist/components/screen-section/ScreenSection.js +4 -4
- package/web-dist/components/scroll-view/ScrollView.js +2 -2
- package/web-dist/components/search-input/SearchInput.js +6 -6
- package/web-dist/components/section-header/SectionHeader.js +4 -4
- package/web-dist/components/section-list/SectionList.js +7 -7
- package/web-dist/components/select/Select.js +7 -7
- package/web-dist/components/selectable-item/SelectableItem.js +1 -1
- package/web-dist/components/selection-provider/SelectionProvider.js +1 -1
- package/web-dist/components/sign-in-form/SignInForm.d.ts +1 -0
- package/web-dist/components/sign-in-form/SignInForm.js +21 -16
- package/web-dist/components/sign-up-form/SignUpForm.d.ts +1 -0
- package/web-dist/components/sign-up-form/SignUpForm.js +21 -16
- package/web-dist/components/skeleton/Skeleton.js +14 -14
- package/web-dist/components/skeleton-card/SkeletonCard.js +14 -14
- package/web-dist/components/skeleton-list/SkeletonList.js +14 -14
- package/web-dist/components/skeleton-text/SkeletonText.js +14 -14
- package/web-dist/components/surface/Surface.js +2 -2
- package/web-dist/components/switch/Switch.js +4 -4
- package/web-dist/components/tab/Tab.js +3 -3
- package/web-dist/components/tab-list/TabList.js +3 -3
- package/web-dist/components/tab-panel/TabPanel.js +3 -3
- package/web-dist/components/tabletop-table/TabletopTable.js +2 -2
- package/web-dist/components/tabs/Tabs.js +3 -3
- package/web-dist/components/text/Text.js +4 -4
- package/web-dist/components/text-input/TextInput.js +6 -6
- package/web-dist/components/time-picker/TimePicker.js +13 -13
- package/web-dist/components/timeline/Timeline.js +7 -7
- package/web-dist/components/toast/Toast.js +4 -4
- package/web-dist/components/toast-provider/ToastProvider.js +4 -4
- package/web-dist/components/toolbar/Toolbar.js +11 -11
- package/web-dist/components/tree-item/TreeItem.js +43 -24
- package/web-dist/components/tree-view/TreeView.d.ts +4 -3
- package/web-dist/components/tree-view/TreeView.js +25 -12
- package/web-dist/components/uploader/Uploader.js +19 -19
- package/web-dist/components/view/View.js +2 -2
- package/web-dist/manifest.json +753 -684
- package/web-dist/runtime/ZoraProvider.js +6 -6
- /package/web-dist/chunks/{Accordion-k3bc4kad.js → Accordion-13y3zx87.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selection.d.ts","sourceRoot":"","sources":["../../src/types/selection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE/C,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,WAAW,GAAG,QAAQ,CAAC;AAEhE,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAChC,kBAAkB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACvC,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iBAAiB,CAAC,EAAE,CAAC,GAAG,EAAE,SAAS,MAAM,EAAE,KAAK,IAAI,CAAC;IACrD,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;CACvC;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,aAAa,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;IAC/B,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,OAAO,CAAC;IACtB,UAAU,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC;IACpC,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7B,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7B,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;AAED,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,aAAa,CAAC;IACpB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;AAED,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,CAAC,EAAE,gBAAgB,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,QAAQ,EAAE,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,KAAK,EAAE,mBAAmB,KAAK,KAAK,CAAC,SAAS,CAAC,CAAC;CAC/E"}
|
|
1
|
+
{"version":3,"file":"selection.d.ts","sourceRoot":"","sources":["../../src/types/selection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE/C,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,WAAW,GAAG,QAAQ,CAAC;AAEhE,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAChC,kBAAkB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACvC,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iBAAiB,CAAC,EAAE,CAAC,GAAG,EAAE,SAAS,MAAM,EAAE,KAAK,IAAI,CAAC;IACrD,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;CACvC;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,aAAa,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;IAC/B,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,OAAO,CAAC;IACtB,UAAU,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC;IACpC,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;IACxD,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7B,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7B,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;AAED,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,aAAa,CAAC;IACpB,QAAQ,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;IAC5C,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;AAED,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,CAAC,EAAE,gBAAgB,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,QAAQ,EAAE,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,KAAK,EAAE,mBAAmB,KAAK,KAAK,CAAC,SAAS,CAAC,CAAC;CAC/E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selection.js","sourceRoot":"","sources":["../../src/types/selection.ts"],"names":[],"mappings":"","sourcesContent":["import type { InteractionPolicy } from '@ankhorage/surface';\nimport type React from 'react';\n\nexport type SelectionMode = 'single' | 'multi';\n\nexport type SelectionTrigger = 'press' | 'longPress' | 'manual';\n\nexport interface SelectionProviderProps {\n children: React.ReactNode;\n selectedIds?: readonly string[];\n defaultSelectedIds?: readonly string[];\n mode?: SelectionMode;\n disabled?: boolean;\n onSelectionChange?: (ids: readonly string[]) => void;\n interactionPolicy?: InteractionPolicy;\n}\n\nexport interface UseSelectionResult {\n mode: SelectionMode;\n disabled: boolean;\n selectedIds: readonly string[];\n selectedCount: number;\n hasSelection: boolean;\n isSelected: (id: string) => boolean;\n select: (id: string) => void;\n toggle: (id: string) => void;\n clear: () => void;\n}\n\nexport interface SelectableItemState {\n id: string;\n selected: boolean;\n disabled: boolean;\n mode: SelectionMode;\n select: () => void;\n toggle: () => void;\n clear: () => void;\n}\n\nexport interface SelectableItemProps {\n id: string;\n trigger?: SelectionTrigger;\n disabled?: boolean;\n interactionPolicy?: InteractionPolicy;\n children: React.ReactNode | ((state: SelectableItemState) => React.ReactNode);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"selection.js","sourceRoot":"","sources":["../../src/types/selection.ts"],"names":[],"mappings":"","sourcesContent":["import type { InteractionPolicy } from '@ankhorage/surface';\nimport type { SelectionIntent } from '@ankhorage/utility/selection';\nimport type React from 'react';\n\nexport type SelectionMode = 'single' | 'multi';\n\nexport type SelectionTrigger = 'press' | 'longPress' | 'manual';\n\nexport interface SelectionProviderProps {\n children: React.ReactNode;\n selectedIds?: readonly string[];\n defaultSelectedIds?: readonly string[];\n mode?: SelectionMode;\n disabled?: boolean;\n onSelectionChange?: (ids: readonly string[]) => void;\n interactionPolicy?: InteractionPolicy;\n}\n\nexport interface UseSelectionResult {\n mode: SelectionMode;\n disabled: boolean;\n selectedIds: readonly string[];\n selectedCount: number;\n hasSelection: boolean;\n isSelected: (id: string) => boolean;\n activate: (id: string, intent: SelectionIntent) => void;\n select: (id: string) => void;\n toggle: (id: string) => void;\n clear: () => void;\n}\n\nexport interface SelectableItemState {\n id: string;\n selected: boolean;\n disabled: boolean;\n mode: SelectionMode;\n activate: (intent: SelectionIntent) => void;\n select: () => void;\n toggle: () => void;\n clear: () => void;\n}\n\nexport interface SelectableItemProps {\n id: string;\n trigger?: SelectionTrigger;\n disabled?: boolean;\n interactionPolicy?: InteractionPolicy;\n children: React.ReactNode | ((state: SelectableItemState) => React.ReactNode);\n}\n"]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ButtonIconSpec } from '@ankhorage/surface';
|
|
2
|
+
import type { SelectionIntent } from '@ankhorage/utility/selection';
|
|
2
3
|
import type { ReactNode } from 'react';
|
|
3
4
|
import type { ZoraBaseProps } from './base';
|
|
4
5
|
export interface TreeItemNode<TId extends string = string> {
|
|
@@ -19,10 +20,10 @@ export interface TreeItemRenderProps<TId extends string = string> {
|
|
|
19
20
|
}
|
|
20
21
|
export interface TreeViewProps<TId extends string = string> extends ZoraBaseProps {
|
|
21
22
|
nodes: readonly TreeItemNode<TId>[];
|
|
22
|
-
|
|
23
|
+
selectedIds?: readonly TId[];
|
|
23
24
|
expandedIds?: readonly TId[];
|
|
24
25
|
defaultExpandedIds?: readonly TId[];
|
|
25
|
-
onSelect?: (id: TId) => void;
|
|
26
|
+
onSelect?: (id: TId, intent: SelectionIntent) => void;
|
|
26
27
|
onExpandedChange?: (ids: readonly TId[]) => void;
|
|
27
28
|
renderItem?: (props: TreeItemRenderProps<TId>) => ReactNode;
|
|
28
29
|
expansionIndicator?: 'chevron' | 'folder';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tree-view.d.ts","sourceRoot":"","sources":["../../src/types/tree-view.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAE5C,MAAM,WAAW,YAAY,CAAC,GAAG,SAAS,MAAM,GAAG,MAAM;IACvD,EAAE,EAAE,GAAG,CAAC;IACR,KAAK,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,QAAQ,CAAC,EAAE,SAAS,YAAY,CAAC,GAAG,CAAC,EAAE,CAAC;IACxC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB;AAED,MAAM,WAAW,mBAAmB,CAAC,GAAG,SAAS,MAAM,GAAG,MAAM;IAC9D,IAAI,EAAE,YAAY,CAAC,GAAG,CAAC,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,aAAa,CAAC,GAAG,SAAS,MAAM,GAAG,MAAM,CAAE,SAAQ,aAAa;IAC/E,KAAK,EAAE,SAAS,YAAY,CAAC,GAAG,CAAC,EAAE,CAAC;IACpC,
|
|
1
|
+
{"version":3,"file":"tree-view.d.ts","sourceRoot":"","sources":["../../src/types/tree-view.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAE5C,MAAM,WAAW,YAAY,CAAC,GAAG,SAAS,MAAM,GAAG,MAAM;IACvD,EAAE,EAAE,GAAG,CAAC;IACR,KAAK,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,QAAQ,CAAC,EAAE,SAAS,YAAY,CAAC,GAAG,CAAC,EAAE,CAAC;IACxC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB;AAED,MAAM,WAAW,mBAAmB,CAAC,GAAG,SAAS,MAAM,GAAG,MAAM;IAC9D,IAAI,EAAE,YAAY,CAAC,GAAG,CAAC,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,aAAa,CAAC,GAAG,SAAS,MAAM,GAAG,MAAM,CAAE,SAAQ,aAAa;IAC/E,KAAK,EAAE,SAAS,YAAY,CAAC,GAAG,CAAC,EAAE,CAAC;IACpC,WAAW,CAAC,EAAE,SAAS,GAAG,EAAE,CAAC;IAC7B,WAAW,CAAC,EAAE,SAAS,GAAG,EAAE,CAAC;IAC7B,kBAAkB,CAAC,EAAE,SAAS,GAAG,EAAE,CAAC;IACpC,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;IACtD,gBAAgB,CAAC,EAAE,CAAC,GAAG,EAAE,SAAS,GAAG,EAAE,KAAK,IAAI,CAAC;IACjD,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,mBAAmB,CAAC,GAAG,CAAC,KAAK,SAAS,CAAC;IAC5D,kBAAkB,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;CAC3C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tree-view.js","sourceRoot":"","sources":["../../src/types/tree-view.ts"],"names":[],"mappings":"","sourcesContent":["import type { ButtonIconSpec } from '@ankhorage/surface';\nimport type { ReactNode } from 'react';\n\nimport type { ZoraBaseProps } from './base';\n\nexport interface TreeItemNode<TId extends string = string> {\n id: TId;\n label: ReactNode;\n icon?: ButtonIconSpec;\n children?: readonly TreeItemNode<TId>[];\n disabled?: boolean;\n meta?: ReactNode;\n actions?: ReactNode;\n}\n\nexport interface TreeItemRenderProps<TId extends string = string> {\n node: TreeItemNode<TId>;\n depth: number;\n selected: boolean;\n expanded: boolean;\n hasChildren: boolean;\n}\n\nexport interface TreeViewProps<TId extends string = string> extends ZoraBaseProps {\n nodes: readonly TreeItemNode<TId>[];\n
|
|
1
|
+
{"version":3,"file":"tree-view.js","sourceRoot":"","sources":["../../src/types/tree-view.ts"],"names":[],"mappings":"","sourcesContent":["import type { ButtonIconSpec } from '@ankhorage/surface';\nimport type { SelectionIntent } from '@ankhorage/utility/selection';\nimport type { ReactNode } from 'react';\n\nimport type { ZoraBaseProps } from './base';\n\nexport interface TreeItemNode<TId extends string = string> {\n id: TId;\n label: ReactNode;\n icon?: ButtonIconSpec;\n children?: readonly TreeItemNode<TId>[];\n disabled?: boolean;\n meta?: ReactNode;\n actions?: ReactNode;\n}\n\nexport interface TreeItemRenderProps<TId extends string = string> {\n node: TreeItemNode<TId>;\n depth: number;\n selected: boolean;\n expanded: boolean;\n hasChildren: boolean;\n}\n\nexport interface TreeViewProps<TId extends string = string> extends ZoraBaseProps {\n nodes: readonly TreeItemNode<TId>[];\n selectedIds?: readonly TId[];\n expandedIds?: readonly TId[];\n defaultExpandedIds?: readonly TId[];\n onSelect?: (id: TId, intent: SelectionIntent) => void;\n onExpandedChange?: (ids: readonly TId[]) => void;\n renderItem?: (props: TreeItemRenderProps<TId>) => ReactNode;\n expansionIndicator?: 'chevron' | 'folder';\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ankhorage/zora",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "23.1.0",
|
|
5
5
|
"description": "Opinionated React Native and React Native Web UI kit built on @ankhorage/surface.",
|
|
6
6
|
"homepage": "https://github.com/ankhorage/zora#readme",
|
|
7
7
|
"bugs": {
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
"version-packages": "ankhorage-changeset version"
|
|
125
125
|
},
|
|
126
126
|
"devDependencies": {
|
|
127
|
-
"@ankhorage/devtools": "^2.1.
|
|
127
|
+
"@ankhorage/devtools": "^2.1.9",
|
|
128
128
|
"@ankhorage/paradox": "^0.2.28",
|
|
129
129
|
"@react-native-vector-icons/fontawesome": "^13.1.4",
|
|
130
130
|
"@react-native-vector-icons/fontawesome5": "^13.1.4",
|
|
@@ -6,6 +6,7 @@ export const COMPONENT_THEME_AUTHORING = {
|
|
|
6
6
|
|
|
7
7
|
export const FEATURE_MANIFEST_ELEMENTS = {
|
|
8
8
|
auth: [
|
|
9
|
+
'AuthScreen',
|
|
9
10
|
'ForgotPasswordForm',
|
|
10
11
|
'OAuthProviderButton',
|
|
11
12
|
'OAuthProviderList',
|
|
@@ -47,6 +48,7 @@ export const FEATURE_MANIFEST_ELEMENTS = {
|
|
|
47
48
|
|
|
48
49
|
export const CONTAINER_ALLOWED_CHILDREN = [
|
|
49
50
|
'ActivityIndicator',
|
|
51
|
+
'AuthScreen',
|
|
50
52
|
'ForgotPasswordForm',
|
|
51
53
|
'OAuthProviderButton',
|
|
52
54
|
'OAuthProviderList',
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Platform } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import type { AuthScreenProps } from '../../../../types/auth';
|
|
5
|
+
import { KeyboardAvoidingView } from '../../../keyboard-avoiding-view/public';
|
|
6
|
+
import { Divider, ScrollView, View } from '../../../layout/public';
|
|
7
|
+
import { Surface } from '../../../surface/public';
|
|
8
|
+
import { withZoraThemeScope } from '../../../theme/adapters/inbound/withZoraThemeScope';
|
|
9
|
+
import { Text } from '../../../typography/public';
|
|
10
|
+
import { OAuthProviderList } from './OAuthProviderList';
|
|
11
|
+
import { SignInForm } from './SignInForm';
|
|
12
|
+
import { SignUpForm } from './SignUpForm';
|
|
13
|
+
|
|
14
|
+
/***
|
|
15
|
+
* Reusable authentication-screen composition for sign-in and sign-up flows.
|
|
16
|
+
*
|
|
17
|
+
* Owns keyboard-safe responsive layout, auth surface presentation, OAuth separation, and
|
|
18
|
+
* sign-in/sign-up form composition while consumers retain routing and authentication orchestration.
|
|
19
|
+
*/
|
|
20
|
+
export const AuthScreen = withZoraThemeScope(AuthScreenInner);
|
|
21
|
+
|
|
22
|
+
/*** Render the themed authentication screen while preserving consumer-owned callbacks and state. */
|
|
23
|
+
function AuthScreenInner({
|
|
24
|
+
themeId: _themeId,
|
|
25
|
+
mode: _themeMode,
|
|
26
|
+
interactionPolicy,
|
|
27
|
+
authMode,
|
|
28
|
+
title,
|
|
29
|
+
description,
|
|
30
|
+
info,
|
|
31
|
+
error,
|
|
32
|
+
loading = false,
|
|
33
|
+
disabled = false,
|
|
34
|
+
identifiers,
|
|
35
|
+
identifierLabel,
|
|
36
|
+
signUpFields,
|
|
37
|
+
oauthProviders = [],
|
|
38
|
+
oauthSeparatorLabel = 'or continue with password',
|
|
39
|
+
onModeChange,
|
|
40
|
+
onOAuthProviderPress,
|
|
41
|
+
onSignInSubmit,
|
|
42
|
+
onSignUpSubmit,
|
|
43
|
+
testID,
|
|
44
|
+
}: AuthScreenProps) {
|
|
45
|
+
const effectiveTitle = title ?? (authMode === 'signIn' ? 'Sign in' : 'Create account');
|
|
46
|
+
const hasOAuth = oauthProviders.length > 0;
|
|
47
|
+
|
|
48
|
+
return (
|
|
49
|
+
<KeyboardAvoidingView
|
|
50
|
+
behavior={Platform.select({ android: 'height', ios: 'padding' })}
|
|
51
|
+
interactionPolicy={interactionPolicy}
|
|
52
|
+
style={{ flex: 1 }}
|
|
53
|
+
>
|
|
54
|
+
<ScrollView
|
|
55
|
+
bg="background"
|
|
56
|
+
contentContainerStyle={{ flexGrow: 1 }}
|
|
57
|
+
flex={1}
|
|
58
|
+
interactionPolicy={interactionPolicy}
|
|
59
|
+
keyboardShouldPersistTaps="handled"
|
|
60
|
+
>
|
|
61
|
+
<View
|
|
62
|
+
align="center"
|
|
63
|
+
flex={1}
|
|
64
|
+
interactionPolicy={interactionPolicy}
|
|
65
|
+
justify="center"
|
|
66
|
+
px={{ base: 'm', md: 'xl' }}
|
|
67
|
+
py="xl"
|
|
68
|
+
>
|
|
69
|
+
<Surface
|
|
70
|
+
gap="m"
|
|
71
|
+
maxWidth={560}
|
|
72
|
+
p={{ base: 'l', md: 'xl' }}
|
|
73
|
+
radius="l"
|
|
74
|
+
testID={testID}
|
|
75
|
+
variant="outline"
|
|
76
|
+
width="100%"
|
|
77
|
+
>
|
|
78
|
+
<View gap="xs" interactionPolicy={interactionPolicy}>
|
|
79
|
+
<Text variant="lead" weight="semiBold">
|
|
80
|
+
{effectiveTitle}
|
|
81
|
+
</Text>
|
|
82
|
+
{description ? (
|
|
83
|
+
<Text emphasis="muted" variant="bodySmall">
|
|
84
|
+
{description}
|
|
85
|
+
</Text>
|
|
86
|
+
) : null}
|
|
87
|
+
</View>
|
|
88
|
+
|
|
89
|
+
{hasOAuth ? (
|
|
90
|
+
<>
|
|
91
|
+
<OAuthProviderList
|
|
92
|
+
disabled={disabled || loading}
|
|
93
|
+
interactionPolicy={interactionPolicy}
|
|
94
|
+
onProviderPress={onOAuthProviderPress}
|
|
95
|
+
providers={oauthProviders}
|
|
96
|
+
testID={testID ? `${testID}-oauth` : undefined}
|
|
97
|
+
/>
|
|
98
|
+
<View align="center" direction="row" gap="s" interactionPolicy={interactionPolicy}>
|
|
99
|
+
<View flex={1} interactionPolicy={interactionPolicy}>
|
|
100
|
+
<Divider interactionPolicy={interactionPolicy} />
|
|
101
|
+
</View>
|
|
102
|
+
<Text emphasis="muted" variant="bodySmall">
|
|
103
|
+
{oauthSeparatorLabel}
|
|
104
|
+
</Text>
|
|
105
|
+
<View flex={1} interactionPolicy={interactionPolicy}>
|
|
106
|
+
<Divider interactionPolicy={interactionPolicy} />
|
|
107
|
+
</View>
|
|
108
|
+
</View>
|
|
109
|
+
</>
|
|
110
|
+
) : null}
|
|
111
|
+
|
|
112
|
+
<AuthScreenForm
|
|
113
|
+
authMode={authMode}
|
|
114
|
+
disabled={disabled}
|
|
115
|
+
error={error}
|
|
116
|
+
identifierLabel={identifierLabel}
|
|
117
|
+
identifiers={identifiers}
|
|
118
|
+
interactionPolicy={interactionPolicy}
|
|
119
|
+
loading={loading}
|
|
120
|
+
onModeChange={onModeChange}
|
|
121
|
+
onSignInSubmit={onSignInSubmit}
|
|
122
|
+
onSignUpSubmit={onSignUpSubmit}
|
|
123
|
+
signUpFields={signUpFields}
|
|
124
|
+
testID={testID ? `${testID}-form` : undefined}
|
|
125
|
+
/>
|
|
126
|
+
|
|
127
|
+
{info ? (
|
|
128
|
+
<Text color="success" variant="bodySmall">
|
|
129
|
+
{info}
|
|
130
|
+
</Text>
|
|
131
|
+
) : null}
|
|
132
|
+
</Surface>
|
|
133
|
+
</View>
|
|
134
|
+
</ScrollView>
|
|
135
|
+
</KeyboardAvoidingView>
|
|
136
|
+
);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
type AuthScreenFormProps = Pick<
|
|
140
|
+
AuthScreenProps,
|
|
141
|
+
| 'authMode'
|
|
142
|
+
| 'disabled'
|
|
143
|
+
| 'error'
|
|
144
|
+
| 'identifierLabel'
|
|
145
|
+
| 'identifiers'
|
|
146
|
+
| 'interactionPolicy'
|
|
147
|
+
| 'loading'
|
|
148
|
+
| 'onModeChange'
|
|
149
|
+
| 'onSignInSubmit'
|
|
150
|
+
| 'onSignUpSubmit'
|
|
151
|
+
| 'signUpFields'
|
|
152
|
+
| 'testID'
|
|
153
|
+
>;
|
|
154
|
+
|
|
155
|
+
/*** Render the active ZORA auth form and translate form-switch actions into the shared mode boundary. */
|
|
156
|
+
function AuthScreenForm({
|
|
157
|
+
authMode,
|
|
158
|
+
disabled,
|
|
159
|
+
error,
|
|
160
|
+
identifierLabel,
|
|
161
|
+
identifiers,
|
|
162
|
+
interactionPolicy,
|
|
163
|
+
loading,
|
|
164
|
+
onModeChange,
|
|
165
|
+
onSignInSubmit,
|
|
166
|
+
onSignUpSubmit,
|
|
167
|
+
signUpFields,
|
|
168
|
+
testID,
|
|
169
|
+
}: AuthScreenFormProps) {
|
|
170
|
+
if (authMode === 'signIn') {
|
|
171
|
+
return (
|
|
172
|
+
<SignInForm
|
|
173
|
+
disabled={disabled}
|
|
174
|
+
error={error}
|
|
175
|
+
identifierLabel={identifierLabel}
|
|
176
|
+
identifiers={identifiers}
|
|
177
|
+
interactionPolicy={interactionPolicy}
|
|
178
|
+
loading={loading}
|
|
179
|
+
onSignUp={onModeChange ? () => onModeChange('signUp') : undefined}
|
|
180
|
+
onSubmit={onSignInSubmit}
|
|
181
|
+
signUpLabel="Need an account? Sign up"
|
|
182
|
+
submitLabel="Sign in"
|
|
183
|
+
testID={testID}
|
|
184
|
+
/>
|
|
185
|
+
);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
return (
|
|
189
|
+
<SignUpForm
|
|
190
|
+
disabled={disabled}
|
|
191
|
+
error={error}
|
|
192
|
+
fields={signUpFields}
|
|
193
|
+
interactionPolicy={interactionPolicy}
|
|
194
|
+
loading={loading}
|
|
195
|
+
onSignIn={onModeChange ? () => onModeChange('signIn') : undefined}
|
|
196
|
+
onSubmit={onSignUpSubmit}
|
|
197
|
+
signInLabel="Already have an account? Sign in"
|
|
198
|
+
submitLabel="Create account"
|
|
199
|
+
testID={testID}
|
|
200
|
+
/>
|
|
201
|
+
);
|
|
202
|
+
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import type { ZoraComponentMeta } from '../../types/authoring';
|
|
2
|
+
|
|
3
|
+
export const authScreenMeta = {
|
|
4
|
+
name: 'AuthScreen',
|
|
5
|
+
category: 'pattern',
|
|
6
|
+
description:
|
|
7
|
+
'Presents a complete responsive sign-in or sign-up screen while leaving authentication orchestration to the consumer.',
|
|
8
|
+
directManifestNode: true,
|
|
9
|
+
allowedChildren: [],
|
|
10
|
+
blueprint: {
|
|
11
|
+
label: 'Auth screen',
|
|
12
|
+
defaultProps: {
|
|
13
|
+
authMode: 'signIn',
|
|
14
|
+
identifiers: ['email'],
|
|
15
|
+
loading: false,
|
|
16
|
+
disabled: false,
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
events: {
|
|
20
|
+
modeChange: {
|
|
21
|
+
label: 'Mode change',
|
|
22
|
+
eventType: 'authScreen.modeChange',
|
|
23
|
+
payloadFields: [{ path: 'mode', type: 'string', label: 'Mode' }],
|
|
24
|
+
},
|
|
25
|
+
oauthProviderPress: {
|
|
26
|
+
label: 'OAuth provider press',
|
|
27
|
+
eventType: 'authScreen.oauthProviderPress',
|
|
28
|
+
payloadFields: [{ path: 'providerId', type: 'string', label: 'Provider ID' }],
|
|
29
|
+
},
|
|
30
|
+
signInSubmit: {
|
|
31
|
+
label: 'Sign-in submit',
|
|
32
|
+
eventType: 'authScreen.signInSubmit',
|
|
33
|
+
payloadFields: [
|
|
34
|
+
{ path: 'identifier', type: 'string', label: 'Identifier' },
|
|
35
|
+
{ path: 'identifierKind', type: 'string', label: 'Identifier kind' },
|
|
36
|
+
{ path: 'secret', type: 'string', label: 'Secret' },
|
|
37
|
+
],
|
|
38
|
+
},
|
|
39
|
+
signUpSubmit: {
|
|
40
|
+
label: 'Sign-up submit',
|
|
41
|
+
eventType: 'authScreen.signUpSubmit',
|
|
42
|
+
payloadFields: [{ path: 'values', type: 'record', label: 'Values' }],
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
props: {
|
|
46
|
+
authMode: {
|
|
47
|
+
type: 'enum',
|
|
48
|
+
category: 'Authentication',
|
|
49
|
+
label: 'Auth mode',
|
|
50
|
+
enum: ['signIn', 'signUp'],
|
|
51
|
+
default: 'signIn',
|
|
52
|
+
},
|
|
53
|
+
title: { type: 'string', category: 'Content', label: 'Title' },
|
|
54
|
+
description: { type: 'string', category: 'Content', label: 'Description' },
|
|
55
|
+
info: { type: 'string', category: 'State', label: 'Info' },
|
|
56
|
+
error: { type: 'string', category: 'State', label: 'Error' },
|
|
57
|
+
loading: { type: 'boolean', category: 'State', label: 'Loading', default: false },
|
|
58
|
+
disabled: { type: 'boolean', category: 'State', label: 'Disabled', default: false },
|
|
59
|
+
identifiers: {
|
|
60
|
+
type: 'array',
|
|
61
|
+
category: 'Authentication',
|
|
62
|
+
label: 'Identifiers',
|
|
63
|
+
default: ['email'],
|
|
64
|
+
},
|
|
65
|
+
identifierLabel: { type: 'string', category: 'Content', label: 'Identifier label' },
|
|
66
|
+
signUpFields: {
|
|
67
|
+
type: 'array',
|
|
68
|
+
category: 'Authentication',
|
|
69
|
+
label: 'Sign-up fields',
|
|
70
|
+
itemSchema: [
|
|
71
|
+
{ key: 'name', schema: { type: 'string', category: 'Identity', label: 'Name' } },
|
|
72
|
+
{ key: 'label', schema: { type: 'string', category: 'Content', label: 'Label' } },
|
|
73
|
+
{
|
|
74
|
+
key: 'type',
|
|
75
|
+
schema: {
|
|
76
|
+
type: 'enum',
|
|
77
|
+
category: 'Authentication',
|
|
78
|
+
label: 'Type',
|
|
79
|
+
enum: ['email', 'number', 'otp', 'password', 'tel', 'text', 'url'],
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
key: 'placeholder',
|
|
84
|
+
schema: { type: 'string', category: 'Content', label: 'Placeholder' },
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
key: 'required',
|
|
88
|
+
schema: { type: 'boolean', category: 'Validation', label: 'Required' },
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
key: 'disabled',
|
|
92
|
+
schema: { type: 'boolean', category: 'State', label: 'Disabled' },
|
|
93
|
+
},
|
|
94
|
+
],
|
|
95
|
+
},
|
|
96
|
+
oauthProviders: {
|
|
97
|
+
type: 'array',
|
|
98
|
+
category: 'Authentication',
|
|
99
|
+
label: 'OAuth providers',
|
|
100
|
+
itemSchema: [
|
|
101
|
+
{ key: 'id', schema: { type: 'string', category: 'Identity', label: 'Provider ID' } },
|
|
102
|
+
{ key: 'label', schema: { type: 'string', category: 'Content', label: 'Label' } },
|
|
103
|
+
{ key: 'disabled', schema: { type: 'boolean', category: 'State', label: 'Disabled' } },
|
|
104
|
+
{ key: 'loading', schema: { type: 'boolean', category: 'State', label: 'Loading' } },
|
|
105
|
+
],
|
|
106
|
+
},
|
|
107
|
+
oauthSeparatorLabel: {
|
|
108
|
+
type: 'string',
|
|
109
|
+
category: 'Content',
|
|
110
|
+
label: 'OAuth separator label',
|
|
111
|
+
default: 'or continue with password',
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
} as const satisfies ZoraComponentMeta;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { expect, test } from 'bun:test';
|
|
2
2
|
|
|
3
|
+
import { authScreenMeta } from './authScreenMeta';
|
|
3
4
|
import { forgotPasswordFormMeta } from './forgotPasswordFormMeta';
|
|
4
5
|
import { oauthProviderButtonMeta } from './oauthProviderButtonMeta';
|
|
5
6
|
import { oauthProviderListMeta } from './oauthProviderListMeta';
|
|
@@ -8,6 +9,7 @@ import { signInFormMeta } from './signInFormMeta';
|
|
|
8
9
|
import { signUpFormMeta } from './signUpFormMeta';
|
|
9
10
|
|
|
10
11
|
const AUTH_MANIFEST_ELEMENTS = {
|
|
12
|
+
AuthScreen: authScreenMeta,
|
|
11
13
|
ForgotPasswordForm: forgotPasswordFormMeta,
|
|
12
14
|
OAuthProviderButton: oauthProviderButtonMeta,
|
|
13
15
|
OAuthProviderList: oauthProviderListMeta,
|
|
@@ -25,6 +27,10 @@ test('auth solutions are direct manifest leaf nodes with authoring schemas', ()
|
|
|
25
27
|
});
|
|
26
28
|
|
|
27
29
|
test('auth solution events expose their actionable boundaries', () => {
|
|
30
|
+
expect(authScreenMeta.events.modeChange.eventType).toBe('authScreen.modeChange');
|
|
31
|
+
expect(authScreenMeta.events.oauthProviderPress.payloadFields).toEqual([
|
|
32
|
+
{ path: 'providerId', type: 'string', label: 'Provider ID' },
|
|
33
|
+
]);
|
|
28
34
|
expect(signInFormMeta.events.submit.payloadFields).toContainEqual({
|
|
29
35
|
path: 'secret',
|
|
30
36
|
type: 'string',
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export type {
|
|
2
2
|
AuthFormBaseProps,
|
|
3
3
|
AuthIdentifierKind,
|
|
4
|
+
AuthScreenMode,
|
|
5
|
+
AuthScreenProps,
|
|
4
6
|
ForgotPasswordFormProps,
|
|
5
7
|
ForgotPasswordFormValues,
|
|
6
8
|
OAuthProviderButtonProps,
|
|
@@ -16,6 +18,7 @@ export type {
|
|
|
16
18
|
SignUpFormProps,
|
|
17
19
|
SignUpFormValues,
|
|
18
20
|
} from '../../types/auth';
|
|
21
|
+
export { AuthScreen } from './adapters/inbound/AuthScreen';
|
|
19
22
|
export { ForgotPasswordForm } from './adapters/inbound/ForgotPasswordForm';
|
|
20
23
|
export { OAuthProviderButton } from './adapters/inbound/OAuthProviderButton';
|
|
21
24
|
export { OAuthProviderList } from './adapters/inbound/OAuthProviderList';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { SelectionIntent } from '@ankhorage/utility/selection';
|
|
1
2
|
import React from 'react';
|
|
2
3
|
|
|
3
4
|
import type {
|
|
@@ -7,12 +8,17 @@ import type {
|
|
|
7
8
|
GraphViewRenderedNode,
|
|
8
9
|
GraphViewSize,
|
|
9
10
|
} from '../../../../../types/graph-view';
|
|
11
|
+
import { resolveSelectionEventIntent } from '../../../../selection/application/resolveSelectionEventIntent';
|
|
10
12
|
|
|
11
13
|
interface GraphNodeOverlayProps {
|
|
12
14
|
readonly nodes: readonly GraphViewNode[];
|
|
13
15
|
readonly renderedNodes: readonly GraphViewRenderedNode[];
|
|
14
16
|
readonly renderNode: (context: GraphViewNodeRenderContext) => React.ReactNode;
|
|
15
|
-
readonly onNodeEvent: (
|
|
17
|
+
readonly onNodeEvent: (
|
|
18
|
+
id: string,
|
|
19
|
+
type: GraphViewElementEventType,
|
|
20
|
+
selectionIntent?: SelectionIntent,
|
|
21
|
+
) => void;
|
|
16
22
|
readonly onNodeSize: (id: string, size: GraphViewSize) => void;
|
|
17
23
|
}
|
|
18
24
|
|
|
@@ -89,7 +95,9 @@ function MeasuredGraphNode(props: MeasuredGraphNodeProps) {
|
|
|
89
95
|
transform: `translate(-50%, -50%) scale(${renderedNode.zoom})`,
|
|
90
96
|
transformOrigin: 'center',
|
|
91
97
|
}}
|
|
92
|
-
|
|
98
|
+
onPointerUp={(event) =>
|
|
99
|
+
props.onNodeEvent(node.id, 'press', resolveSelectionEventIntent(event, 'pointer'))
|
|
100
|
+
}
|
|
93
101
|
onDoubleClick={() => props.onNodeEvent(node.id, 'double-press')}
|
|
94
102
|
onMouseEnter={() => props.onNodeEvent(node.id, 'pointer-enter')}
|
|
95
103
|
onMouseLeave={() => props.onNodeEvent(node.id, 'pointer-leave')}
|
|
@@ -48,7 +48,9 @@ export function GraphView(props: GraphViewProps) {
|
|
|
48
48
|
nodes={props.nodes}
|
|
49
49
|
renderedNodes={renderedNodes}
|
|
50
50
|
renderNode={props.renderNode}
|
|
51
|
-
onNodeEvent={(id, type) =>
|
|
51
|
+
onNodeEvent={(id, type, selectionIntent) =>
|
|
52
|
+
runtimeRef.current?.handleOverlayNodeEvent(id, type, selectionIntent)
|
|
53
|
+
}
|
|
52
54
|
onNodeSize={(id, size) => runtimeRef.current?.setNodeSize(id, size)}
|
|
53
55
|
/>
|
|
54
56
|
) : null}
|
|
@@ -3,8 +3,10 @@ import type { Core, EventObject } from 'cytoscape';
|
|
|
3
3
|
import type {
|
|
4
4
|
GraphViewCallbacks,
|
|
5
5
|
GraphViewController,
|
|
6
|
+
GraphViewElementEvent,
|
|
6
7
|
GraphViewElementEventType,
|
|
7
8
|
} from '../../../../../types/graph-view';
|
|
9
|
+
import { resolveSelectionEventIntent } from '../../../../selection/application/resolveSelectionEventIntent';
|
|
8
10
|
|
|
9
11
|
/*** Bind stable Cytoscape events that always read the latest React callbacks. */
|
|
10
12
|
export function bindGraphEvents(
|
|
@@ -46,10 +48,11 @@ function bindElementEvents(
|
|
|
46
48
|
const handler = (event: EventObject) => {
|
|
47
49
|
const target: unknown = event.target;
|
|
48
50
|
if (!isGraphEventTarget(target)) return;
|
|
49
|
-
emitElementEvent(
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
emitElementEvent(
|
|
52
|
+
callbacksRef.current,
|
|
53
|
+
selector,
|
|
54
|
+
createElementEvent(event, target.id(), type),
|
|
55
|
+
);
|
|
53
56
|
onRuntimeChange();
|
|
54
57
|
};
|
|
55
58
|
cy.on(cytoscapeEvent, selector, handler);
|
|
@@ -57,6 +60,20 @@ function bindElementEvents(
|
|
|
57
60
|
});
|
|
58
61
|
}
|
|
59
62
|
|
|
63
|
+
/*** Translate one renderer event into the engine-neutral public event contract. */
|
|
64
|
+
function createElementEvent(
|
|
65
|
+
event: EventObject,
|
|
66
|
+
id: string,
|
|
67
|
+
type: GraphViewElementEventType,
|
|
68
|
+
): GraphViewElementEvent {
|
|
69
|
+
if (type !== 'press') return { id, type };
|
|
70
|
+
return {
|
|
71
|
+
id,
|
|
72
|
+
type,
|
|
73
|
+
selectionIntent: resolveSelectionEventIntent(event, 'pointer'),
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
|
|
60
77
|
/*** Return whether a Cytoscape event target exposes the element identifier contract. */
|
|
61
78
|
function isGraphEventTarget(value: unknown): value is GraphEventTarget {
|
|
62
79
|
return (
|
|
@@ -72,7 +89,7 @@ interface GraphEventTarget {
|
|
|
72
89
|
function emitElementEvent(
|
|
73
90
|
callbacks: GraphViewCallbacks,
|
|
74
91
|
selector: ElementSelector,
|
|
75
|
-
event:
|
|
92
|
+
event: GraphViewElementEvent,
|
|
76
93
|
) {
|
|
77
94
|
if (selector === 'node') {
|
|
78
95
|
callbacks.onNodeEvent?.(event);
|
|
@@ -172,6 +172,27 @@ test('preserves selection and positions through hover presentation updates witho
|
|
|
172
172
|
}
|
|
173
173
|
});
|
|
174
174
|
|
|
175
|
+
test('forwards semantic selection intent from rich-node press events', async () => {
|
|
176
|
+
const ready = Promise.withResolvers<GraphViewController>();
|
|
177
|
+
const events: GraphViewElementEvent[] = [];
|
|
178
|
+
const runtime = createGraphRuntime(undefined, {
|
|
179
|
+
current: { onReady: ready.resolve, onNodeEvent: (event) => events.push(event) },
|
|
180
|
+
});
|
|
181
|
+
try {
|
|
182
|
+
runtime.update({
|
|
183
|
+
nodes: [{ id: 'a' }],
|
|
184
|
+
edges: [],
|
|
185
|
+
layout: 'grid',
|
|
186
|
+
richNodeRendering: false,
|
|
187
|
+
});
|
|
188
|
+
await ready.promise;
|
|
189
|
+
runtime.handleOverlayNodeEvent('a', 'press', 'toggle');
|
|
190
|
+
expect(events.at(-1)).toEqual({ id: 'a', type: 'press', selectionIntent: 'toggle' });
|
|
191
|
+
} finally {
|
|
192
|
+
runtime.destroy();
|
|
193
|
+
}
|
|
194
|
+
});
|
|
195
|
+
|
|
175
196
|
test('settles the pending initial layout when presentation changes before readiness', async () => {
|
|
176
197
|
const ready = Promise.withResolvers<GraphViewController>();
|
|
177
198
|
const calls = { ready: 0, sort: 0 };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { SelectionIntent } from '@ankhorage/utility/selection';
|
|
1
2
|
import cytoscape, { type Core, type CytoscapeOptions } from 'cytoscape';
|
|
2
3
|
|
|
3
4
|
import type {
|
|
@@ -30,7 +31,11 @@ type RenderedNodeListener = (nodes: readonly GraphViewRenderedNode[]) => void;
|
|
|
30
31
|
|
|
31
32
|
export interface GraphRuntime {
|
|
32
33
|
destroy(): void;
|
|
33
|
-
handleOverlayNodeEvent(
|
|
34
|
+
handleOverlayNodeEvent(
|
|
35
|
+
id: string,
|
|
36
|
+
type: GraphViewElementEventType,
|
|
37
|
+
selectionIntent?: SelectionIntent,
|
|
38
|
+
): void;
|
|
34
39
|
setNodeSize(id: string, size: GraphViewSize): void;
|
|
35
40
|
setSelectedNodeIds(nodeIds: readonly string[] | undefined): void;
|
|
36
41
|
subscribeRenderedNodes(listener: RenderedNodeListener): () => void;
|
|
@@ -80,7 +85,8 @@ export function createGraphRuntime(
|
|
|
80
85
|
|
|
81
86
|
return {
|
|
82
87
|
destroy: () => destroyRuntime(state),
|
|
83
|
-
handleOverlayNodeEvent: (id, type) =>
|
|
88
|
+
handleOverlayNodeEvent: (id, type, selectionIntent) =>
|
|
89
|
+
handleOverlayNodeEvent(state, id, type, selectionIntent),
|
|
84
90
|
setNodeSize: (id, size) => setNodeSize(state, id, size),
|
|
85
91
|
setSelectedNodeIds: (nodeIds) => setSelectedNodeIds(state, nodeIds),
|
|
86
92
|
subscribeRenderedNodes: (listener) => subscribeRenderedNodes(state, listener),
|
|
@@ -401,11 +407,12 @@ function handleOverlayNodeEvent(
|
|
|
401
407
|
state: GraphRuntimeState,
|
|
402
408
|
id: string,
|
|
403
409
|
type: GraphViewElementEventType,
|
|
410
|
+
selectionIntent?: SelectionIntent,
|
|
404
411
|
) {
|
|
405
412
|
if (type === 'pointer-enter') state.hoveredNodeIds.add(id);
|
|
406
413
|
if (type === 'pointer-leave') state.hoveredNodeIds.delete(id);
|
|
407
414
|
if (type === 'press') state.cy.getElementById(id).select();
|
|
408
|
-
state.callbacksRef.current.onNodeEvent?.({ id, type });
|
|
415
|
+
state.callbacksRef.current.onNodeEvent?.({ id, type, selectionIntent });
|
|
409
416
|
emitRenderedNodes(state);
|
|
410
417
|
}
|
|
411
418
|
|
|
@@ -6,6 +6,7 @@ import { Accordion, AccordionItem } from '../accordion/public';
|
|
|
6
6
|
import { ActivityIndicator } from '../activity-indicator/public';
|
|
7
7
|
import { AppBar } from '../app-bar/public';
|
|
8
8
|
import {
|
|
9
|
+
AuthScreen,
|
|
9
10
|
ForgotPasswordForm,
|
|
10
11
|
OAuthProviderButton,
|
|
11
12
|
OAuthProviderList,
|
|
@@ -175,6 +176,7 @@ const _ZORA_COMPONENT_REGISTRY = {
|
|
|
175
176
|
AppShell,
|
|
176
177
|
Screen,
|
|
177
178
|
ScreenSection,
|
|
179
|
+
AuthScreen,
|
|
178
180
|
ForgotPasswordForm,
|
|
179
181
|
OAuthProviderButton,
|
|
180
182
|
OAuthProviderList,
|
|
@@ -166,6 +166,7 @@ describe('ZORA_COMPONENT_META invariants', () => {
|
|
|
166
166
|
test('direct manifest node leaf/container rules', () => {
|
|
167
167
|
const expectedLeafNodes = new Set([
|
|
168
168
|
'ActivityIndicator',
|
|
169
|
+
'AuthScreen',
|
|
169
170
|
'ForgotPasswordForm',
|
|
170
171
|
'OAuthProviderButton',
|
|
171
172
|
'OAuthProviderList',
|