@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
|
@@ -6,11 +6,11 @@ import {
|
|
|
6
6
|
useTheme
|
|
7
7
|
} from "./Accordion-7hn324r1.js";
|
|
8
8
|
import {
|
|
9
|
-
|
|
10
|
-
} from "./Accordion-
|
|
9
|
+
Text2
|
|
10
|
+
} from "./Accordion-ff583p4q.js";
|
|
11
11
|
import {
|
|
12
12
|
withZoraThemeScope
|
|
13
|
-
} from "./Accordion-
|
|
13
|
+
} from "./Accordion-13y3zx87.js";
|
|
14
14
|
import {
|
|
15
15
|
resolveControlSize,
|
|
16
16
|
resolveButtonColors
|
|
@@ -38,7 +38,7 @@ function Badge({
|
|
|
38
38
|
radius: controlSize.borderRadius,
|
|
39
39
|
style: resolveBadgeStyle(colors.backgroundColor, colors.borderColor, variant),
|
|
40
40
|
testID,
|
|
41
|
-
children: /* @__PURE__ */ jsx(
|
|
41
|
+
children: /* @__PURE__ */ jsx(Text2, {
|
|
42
42
|
color,
|
|
43
43
|
emphasis: variant === "solid" ? "inverse" : "default",
|
|
44
44
|
variant: "bodySmall",
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import {
|
|
3
3
|
Toast3,
|
|
4
4
|
ToastProvider3
|
|
5
|
-
} from "./Accordion-
|
|
5
|
+
} from "./Accordion-z8h1hn96.js";
|
|
6
6
|
import {
|
|
7
7
|
withZoraThemeScope
|
|
8
|
-
} from "./Accordion-
|
|
8
|
+
} from "./Accordion-13y3zx87.js";
|
|
9
9
|
|
|
10
10
|
// src/features/toast/adapters/inbound/Toast.tsx
|
|
11
11
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -8,16 +8,13 @@ import {
|
|
|
8
8
|
} from "./Accordion-vq462y0x.js";
|
|
9
9
|
import {
|
|
10
10
|
IconButton2
|
|
11
|
-
} from "./Accordion-
|
|
11
|
+
} from "./Accordion-yms7x22j.js";
|
|
12
12
|
import {
|
|
13
13
|
withZoraThemeScope
|
|
14
|
-
} from "./Accordion-
|
|
14
|
+
} from "./Accordion-13y3zx87.js";
|
|
15
15
|
import {
|
|
16
16
|
resolveIconSize
|
|
17
17
|
} from "./Accordion-961ncx4e.js";
|
|
18
|
-
import {
|
|
19
|
-
useZoraTheme2
|
|
20
|
-
} from "./Accordion-7zfskq1s.js";
|
|
21
18
|
import {
|
|
22
19
|
resolveControlSize,
|
|
23
20
|
resolveFieldState,
|
|
@@ -25,6 +22,9 @@ import {
|
|
|
25
22
|
resolveInputColors,
|
|
26
23
|
resolveTextStyles
|
|
27
24
|
} from "./Accordion-2d8xn32m.js";
|
|
25
|
+
import {
|
|
26
|
+
useZoraTheme2
|
|
27
|
+
} from "./Accordion-7zfskq1s.js";
|
|
28
28
|
import {
|
|
29
29
|
__toESM
|
|
30
30
|
} from "./Accordion-9qvmwkxe.js";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
Button2
|
|
4
|
-
} from "./Accordion-
|
|
4
|
+
} from "./Accordion-yms7x22j.js";
|
|
5
5
|
import {
|
|
6
6
|
withZoraThemeScope
|
|
7
|
-
} from "./Accordion-
|
|
7
|
+
} from "./Accordion-13y3zx87.js";
|
|
8
8
|
import {
|
|
9
9
|
View2
|
|
10
|
-
} from "./Accordion-
|
|
10
|
+
} from "./Accordion-01e56hb5.js";
|
|
11
11
|
import {
|
|
12
|
-
|
|
13
|
-
} from "./Accordion-
|
|
12
|
+
Text3
|
|
13
|
+
} from "./Accordion-46vwm9xv.js";
|
|
14
14
|
import {
|
|
15
15
|
useZoraTheme2
|
|
16
16
|
} from "./Accordion-7zfskq1s.js";
|
|
@@ -95,7 +95,7 @@ function FormErrorInner({ themeId: _themeId, mode: _mode, error, testID }) {
|
|
|
95
95
|
p: "s",
|
|
96
96
|
radius: "m",
|
|
97
97
|
testID,
|
|
98
|
-
children: /* @__PURE__ */ jsx3(
|
|
98
|
+
children: /* @__PURE__ */ jsx3(Text3, {
|
|
99
99
|
color: "error",
|
|
100
100
|
variant: "bodySmall",
|
|
101
101
|
children: error
|
|
@@ -4,19 +4,19 @@ import {
|
|
|
4
4
|
} from "./Accordion-cdppbyad.js";
|
|
5
5
|
import {
|
|
6
6
|
withZoraThemeScope
|
|
7
|
-
} from "./Accordion-
|
|
7
|
+
} from "./Accordion-13y3zx87.js";
|
|
8
8
|
import {
|
|
9
9
|
View2
|
|
10
|
-
} from "./Accordion-
|
|
10
|
+
} from "./Accordion-01e56hb5.js";
|
|
11
11
|
import {
|
|
12
|
-
|
|
13
|
-
} from "./Accordion-
|
|
12
|
+
Text3
|
|
13
|
+
} from "./Accordion-46vwm9xv.js";
|
|
14
14
|
import {
|
|
15
15
|
Avatar2
|
|
16
|
-
} from "./Accordion-
|
|
16
|
+
} from "./Accordion-jksn8783.js";
|
|
17
17
|
import {
|
|
18
18
|
Badge2
|
|
19
|
-
} from "./Accordion-
|
|
19
|
+
} from "./Accordion-cqgbx1pw.js";
|
|
20
20
|
import {
|
|
21
21
|
useZoraTheme2
|
|
22
22
|
} from "./Accordion-7zfskq1s.js";
|
|
@@ -135,7 +135,7 @@ function ChatListItemInner({
|
|
|
135
135
|
children: [
|
|
136
136
|
/* @__PURE__ */ jsx(View2, {
|
|
137
137
|
flex: 1,
|
|
138
|
-
children: /* @__PURE__ */ jsx(
|
|
138
|
+
children: /* @__PURE__ */ jsx(Text3, {
|
|
139
139
|
numberOfLines: 1,
|
|
140
140
|
emphasis: disabled ? "muted" : "default",
|
|
141
141
|
variant: "bodySmall",
|
|
@@ -143,7 +143,7 @@ function ChatListItemInner({
|
|
|
143
143
|
children: title
|
|
144
144
|
})
|
|
145
145
|
}),
|
|
146
|
-
hasTimestamp ? /* @__PURE__ */ jsx(
|
|
146
|
+
hasTimestamp ? /* @__PURE__ */ jsx(Text3, {
|
|
147
147
|
numberOfLines: 1,
|
|
148
148
|
color: unread ? "primary" : undefined,
|
|
149
149
|
emphasis: unread ? "default" : "subtle",
|
|
@@ -165,14 +165,14 @@ function ChatListItemInner({
|
|
|
165
165
|
children: /* @__PURE__ */ jsxs(View2, {
|
|
166
166
|
gap: "xxs",
|
|
167
167
|
children: [
|
|
168
|
-
hasPreview ? /* @__PURE__ */ jsx(
|
|
168
|
+
hasPreview ? /* @__PURE__ */ jsx(Text3, {
|
|
169
169
|
numberOfLines: 1,
|
|
170
170
|
emphasis: unread ? "default" : "muted",
|
|
171
171
|
variant: "bodySmall",
|
|
172
172
|
weight: unread ? "medium" : "regular",
|
|
173
173
|
children: preview
|
|
174
174
|
}) : null,
|
|
175
|
-
hasMeta ? /* @__PURE__ */ jsx(
|
|
175
|
+
hasMeta ? /* @__PURE__ */ jsx(Text3, {
|
|
176
176
|
numberOfLines: 1,
|
|
177
177
|
emphasis: "subtle",
|
|
178
178
|
variant: "caption",
|
|
@@ -347,13 +347,13 @@ function MessageBubbleInner({
|
|
|
347
347
|
align: isSystem ? "center" : "flex-start",
|
|
348
348
|
gap: compact ? "xxs" : "xs",
|
|
349
349
|
children: [
|
|
350
|
-
hasAuthorName ? /* @__PURE__ */ jsx2(
|
|
350
|
+
hasAuthorName ? /* @__PURE__ */ jsx2(Text3, {
|
|
351
351
|
emphasis: "muted",
|
|
352
352
|
variant: "caption",
|
|
353
353
|
weight: "semiBold",
|
|
354
354
|
children: authorName
|
|
355
355
|
}) : null,
|
|
356
|
-
text != null ? /* @__PURE__ */ jsx2(
|
|
356
|
+
text != null ? /* @__PURE__ */ jsx2(Text3, {
|
|
357
357
|
align: isSystem ? "center" : undefined,
|
|
358
358
|
emphasis: disabled ? "muted" : "default",
|
|
359
359
|
children: text
|
|
@@ -369,17 +369,17 @@ function MessageBubbleInner({
|
|
|
369
369
|
justify: isOutgoing ? "flex-end" : isSystem ? "center" : "flex-start",
|
|
370
370
|
wrap: "wrap",
|
|
371
371
|
children: [
|
|
372
|
-
timestamp != null ? /* @__PURE__ */ jsx2(
|
|
372
|
+
timestamp != null ? /* @__PURE__ */ jsx2(Text3, {
|
|
373
373
|
emphasis: "subtle",
|
|
374
374
|
variant: "caption",
|
|
375
375
|
children: timestamp
|
|
376
376
|
}) : null,
|
|
377
|
-
meta != null ? /* @__PURE__ */ jsx2(
|
|
377
|
+
meta != null ? /* @__PURE__ */ jsx2(Text3, {
|
|
378
378
|
emphasis: "subtle",
|
|
379
379
|
variant: "caption",
|
|
380
380
|
children: meta
|
|
381
381
|
}) : null,
|
|
382
|
-
renderedStatus != null ? /* @__PURE__ */ jsx2(
|
|
382
|
+
renderedStatus != null ? /* @__PURE__ */ jsx2(Text3, {
|
|
383
383
|
color: status === "failed" ? "danger" : undefined,
|
|
384
384
|
emphasis: status === "failed" ? "default" : "subtle",
|
|
385
385
|
variant: "caption",
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
// node_modules/@ankhorage/surface/src/features/typography/adapters/inbound/Text.tsx
|
|
15
15
|
var import_react_native = __toESM(require_cjs(), 1);
|
|
16
16
|
import { jsx } from "react/jsx-runtime";
|
|
17
|
-
function
|
|
17
|
+
function Text2({
|
|
18
18
|
children,
|
|
19
19
|
i18nKey,
|
|
20
20
|
variant = "body",
|
|
@@ -38,4 +38,4 @@ function Text3({
|
|
|
38
38
|
children: content
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
|
-
export {
|
|
41
|
+
export { Text2 };
|
|
@@ -4,16 +4,16 @@ import {
|
|
|
4
4
|
} from "./Accordion-7hn324r1.js";
|
|
5
5
|
import {
|
|
6
6
|
withZoraThemeScope
|
|
7
|
-
} from "./Accordion-
|
|
7
|
+
} from "./Accordion-13y3zx87.js";
|
|
8
8
|
import {
|
|
9
9
|
Icon2
|
|
10
|
-
} from "./Accordion-
|
|
10
|
+
} from "./Accordion-x4rjd7yn.js";
|
|
11
11
|
import {
|
|
12
12
|
View2
|
|
13
|
-
} from "./Accordion-
|
|
13
|
+
} from "./Accordion-01e56hb5.js";
|
|
14
14
|
import {
|
|
15
|
-
|
|
16
|
-
} from "./Accordion-
|
|
15
|
+
Text3
|
|
16
|
+
} from "./Accordion-46vwm9xv.js";
|
|
17
17
|
import {
|
|
18
18
|
useZoraTheme2
|
|
19
19
|
} from "./Accordion-7zfskq1s.js";
|
|
@@ -151,7 +151,7 @@ function AvatarInner({
|
|
|
151
151
|
const radius = resolveRadius(shape);
|
|
152
152
|
const renderFallback = () => {
|
|
153
153
|
if (resolvedInitials) {
|
|
154
|
-
return /* @__PURE__ */ jsx(
|
|
154
|
+
return /* @__PURE__ */ jsx(Text3, {
|
|
155
155
|
color: resolveTextColor(color),
|
|
156
156
|
variant: resolveTextVariant(size),
|
|
157
157
|
weight: "semiBold",
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
Button2
|
|
4
|
-
} from "./Accordion-
|
|
4
|
+
} from "./Accordion-yms7x22j.js";
|
|
5
5
|
import {
|
|
6
6
|
withZoraThemeScope
|
|
7
|
-
} from "./Accordion-
|
|
7
|
+
} from "./Accordion-13y3zx87.js";
|
|
8
8
|
import {
|
|
9
9
|
View2
|
|
10
|
-
} from "./Accordion-
|
|
10
|
+
} from "./Accordion-01e56hb5.js";
|
|
11
11
|
import {
|
|
12
12
|
Card2
|
|
13
|
-
} from "./Accordion-
|
|
13
|
+
} from "./Accordion-z1trs7s1.js";
|
|
14
14
|
|
|
15
15
|
// src/features/empty-state/adapters/inbound/EmptyState.tsx
|
|
16
16
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -19,17 +19,17 @@ import {
|
|
|
19
19
|
Surface3
|
|
20
20
|
} from "./Accordion-13b6y37e.js";
|
|
21
21
|
import {
|
|
22
|
-
|
|
23
|
-
} from "./Accordion-
|
|
22
|
+
Text2
|
|
23
|
+
} from "./Accordion-ff583p4q.js";
|
|
24
24
|
import {
|
|
25
25
|
withZoraThemeScope
|
|
26
|
-
} from "./Accordion-
|
|
26
|
+
} from "./Accordion-13y3zx87.js";
|
|
27
27
|
import {
|
|
28
28
|
Icon2
|
|
29
|
-
} from "./Accordion-
|
|
29
|
+
} from "./Accordion-x4rjd7yn.js";
|
|
30
30
|
import {
|
|
31
31
|
View2
|
|
32
|
-
} from "./Accordion-
|
|
32
|
+
} from "./Accordion-01e56hb5.js";
|
|
33
33
|
import {
|
|
34
34
|
resolveIconSize
|
|
35
35
|
} from "./Accordion-961ncx4e.js";
|
|
@@ -236,13 +236,13 @@ function PopoverMenuItemContent({
|
|
|
236
236
|
children: /* @__PURE__ */ jsxs(View3, {
|
|
237
237
|
gap: "xxs",
|
|
238
238
|
children: [
|
|
239
|
-
/* @__PURE__ */ jsx(
|
|
239
|
+
/* @__PURE__ */ jsx(Text2, {
|
|
240
240
|
color: titleColor,
|
|
241
241
|
variant: "bodySmall",
|
|
242
242
|
weight: action.selected ? "semiBold" : "medium",
|
|
243
243
|
children: action.title
|
|
244
244
|
}),
|
|
245
|
-
action.description ? /* @__PURE__ */ jsx(
|
|
245
|
+
action.description ? /* @__PURE__ */ jsx(Text2, {
|
|
246
246
|
emphasis: "muted",
|
|
247
247
|
variant: "caption",
|
|
248
248
|
children: action.description
|
|
@@ -12,17 +12,17 @@ import {
|
|
|
12
12
|
Pressable
|
|
13
13
|
} from "./Accordion-cdppbyad.js";
|
|
14
14
|
import {
|
|
15
|
-
|
|
16
|
-
} from "./Accordion-
|
|
15
|
+
Text2
|
|
16
|
+
} from "./Accordion-ff583p4q.js";
|
|
17
17
|
import {
|
|
18
18
|
withZoraThemeScope
|
|
19
|
-
} from "./Accordion-
|
|
19
|
+
} from "./Accordion-13y3zx87.js";
|
|
20
20
|
import {
|
|
21
21
|
View2
|
|
22
|
-
} from "./Accordion-
|
|
22
|
+
} from "./Accordion-01e56hb5.js";
|
|
23
23
|
import {
|
|
24
|
-
|
|
25
|
-
} from "./Accordion-
|
|
24
|
+
Text3
|
|
25
|
+
} from "./Accordion-46vwm9xv.js";
|
|
26
26
|
import {
|
|
27
27
|
resolveFieldState,
|
|
28
28
|
resolveIndicatorSize,
|
|
@@ -132,7 +132,7 @@ function renderCheckboxContent(input) {
|
|
|
132
132
|
/* @__PURE__ */ jsx(View3, {
|
|
133
133
|
radius: "s",
|
|
134
134
|
style: resolveCheckboxIndicatorStyle(colors.backgroundColor, colors.borderColor, indicatorSize.checkbox),
|
|
135
|
-
children: input.isChecked ? /* @__PURE__ */ jsx(
|
|
135
|
+
children: input.isChecked ? /* @__PURE__ */ jsx(Text2, {
|
|
136
136
|
color: input.disabled ? undefined : indicatorColor,
|
|
137
137
|
emphasis: input.disabled ? "muted" : "inverse",
|
|
138
138
|
variant: "caption",
|
|
@@ -142,7 +142,7 @@ function renderCheckboxContent(input) {
|
|
|
142
142
|
}),
|
|
143
143
|
input.children ? /* @__PURE__ */ jsx(View3, {
|
|
144
144
|
ml: "s",
|
|
145
|
-
children: /* @__PURE__ */ jsx(
|
|
145
|
+
children: /* @__PURE__ */ jsx(Text2, {
|
|
146
146
|
emphasis: labelEmphasis,
|
|
147
147
|
children: input.children
|
|
148
148
|
})
|
|
@@ -257,10 +257,10 @@ function CheckboxGroupItem({
|
|
|
257
257
|
children: /* @__PURE__ */ jsxs2(View2, {
|
|
258
258
|
gap: "xs",
|
|
259
259
|
children: [
|
|
260
|
-
/* @__PURE__ */ jsx3(
|
|
260
|
+
/* @__PURE__ */ jsx3(Text3, {
|
|
261
261
|
children: option.label
|
|
262
262
|
}),
|
|
263
|
-
option.description ? /* @__PURE__ */ jsx3(
|
|
263
|
+
option.description ? /* @__PURE__ */ jsx3(Text3, {
|
|
264
264
|
emphasis: "muted",
|
|
265
265
|
variant: "caption",
|
|
266
266
|
children: option.description
|
|
@@ -4,18 +4,18 @@ import {
|
|
|
4
4
|
} from "./Accordion-7hn324r1.js";
|
|
5
5
|
import {
|
|
6
6
|
withZoraThemeScope
|
|
7
|
-
} from "./Accordion-
|
|
7
|
+
} from "./Accordion-13y3zx87.js";
|
|
8
8
|
import {
|
|
9
9
|
Icon2
|
|
10
|
-
} from "./Accordion-
|
|
10
|
+
} from "./Accordion-x4rjd7yn.js";
|
|
11
11
|
import {
|
|
12
12
|
View2,
|
|
13
13
|
Divider2
|
|
14
|
-
} from "./Accordion-
|
|
14
|
+
} from "./Accordion-01e56hb5.js";
|
|
15
15
|
import {
|
|
16
16
|
Heading2,
|
|
17
|
-
|
|
18
|
-
} from "./Accordion-
|
|
17
|
+
Text3
|
|
18
|
+
} from "./Accordion-46vwm9xv.js";
|
|
19
19
|
import {
|
|
20
20
|
__toESM
|
|
21
21
|
} from "./Accordion-9qvmwkxe.js";
|
|
@@ -338,7 +338,7 @@ function AccordionItemInner({
|
|
|
338
338
|
level: 4,
|
|
339
339
|
children: title
|
|
340
340
|
}),
|
|
341
|
-
description ? /* @__PURE__ */ jsx6(
|
|
341
|
+
description ? /* @__PURE__ */ jsx6(Text3, {
|
|
342
342
|
emphasis: "muted",
|
|
343
343
|
variant: "bodySmall",
|
|
344
344
|
children: description
|
|
@@ -1,8 +1,29 @@
|
|
|
1
1
|
'use client';
|
|
2
|
+
import {
|
|
3
|
+
require_cjs
|
|
4
|
+
} from "./Accordion-7hn324r1.js";
|
|
2
5
|
import {
|
|
3
6
|
Pressable
|
|
4
7
|
} from "./Accordion-cdppbyad.js";
|
|
8
|
+
import {
|
|
9
|
+
resolveSelectionEventIntent
|
|
10
|
+
} from "./Accordion-5df6cgyf.js";
|
|
11
|
+
import {
|
|
12
|
+
__toESM
|
|
13
|
+
} from "./Accordion-9qvmwkxe.js";
|
|
5
14
|
|
|
15
|
+
// node_modules/@ankhorage/utility/dist/selection/applySelectionIntent.js
|
|
16
|
+
function applySelectionIntent(selectedValues, value, intent) {
|
|
17
|
+
if (intent === "replace") {
|
|
18
|
+
return selectedValues.length === 1 && Object.is(selectedValues[0], value) ? selectedValues : [value];
|
|
19
|
+
}
|
|
20
|
+
const selectedIndex = selectedValues.findIndex((candidate) => Object.is(candidate, value));
|
|
21
|
+
if (selectedIndex < 0)
|
|
22
|
+
return [...selectedValues, value];
|
|
23
|
+
if (selectedValues.length === 1)
|
|
24
|
+
return [];
|
|
25
|
+
return [...selectedValues.slice(0, selectedIndex), ...selectedValues.slice(selectedIndex + 1)];
|
|
26
|
+
}
|
|
6
27
|
// src/features/selection/adapters/inbound/SelectionProvider.tsx
|
|
7
28
|
import React from "react";
|
|
8
29
|
|
|
@@ -37,25 +58,10 @@ function selectId({
|
|
|
37
58
|
ids,
|
|
38
59
|
id
|
|
39
60
|
}) {
|
|
40
|
-
if (mode === "single")
|
|
61
|
+
if (mode === "single")
|
|
41
62
|
return [id];
|
|
42
|
-
|
|
43
|
-
if (ids.includes(id)) {
|
|
63
|
+
if (ids.includes(id))
|
|
44
64
|
return ids;
|
|
45
|
-
}
|
|
46
|
-
return [...ids, id];
|
|
47
|
-
}
|
|
48
|
-
function toggleId({
|
|
49
|
-
mode,
|
|
50
|
-
ids,
|
|
51
|
-
id
|
|
52
|
-
}) {
|
|
53
|
-
if (ids.includes(id)) {
|
|
54
|
-
return ids.filter((existingId) => existingId !== id);
|
|
55
|
-
}
|
|
56
|
-
if (mode === "single") {
|
|
57
|
-
return [id];
|
|
58
|
-
}
|
|
59
65
|
return [...ids, id];
|
|
60
66
|
}
|
|
61
67
|
|
|
@@ -71,9 +77,8 @@ function resolveDisabled(disabled) {
|
|
|
71
77
|
}
|
|
72
78
|
function useSelection() {
|
|
73
79
|
const value = React.use(SelectionContext);
|
|
74
|
-
if (!value)
|
|
80
|
+
if (!value)
|
|
75
81
|
throw new Error(MISSING_CONTEXT_MESSAGE);
|
|
76
|
-
}
|
|
77
82
|
return value;
|
|
78
83
|
}
|
|
79
84
|
function SelectionProvider2({
|
|
@@ -93,43 +98,51 @@ function SelectionProvider2({
|
|
|
93
98
|
const currentNormalizedIds = normalizeIds(rawIds, resolvedMode);
|
|
94
99
|
const selectedIdSet = React.useMemo(() => new Set(currentNormalizedIds), [currentNormalizedIds]);
|
|
95
100
|
const commitSelectionChange = React.useCallback((nextNormalizedIds) => {
|
|
96
|
-
if (resolvedDisabled)
|
|
97
|
-
return;
|
|
98
|
-
if (interactionPolicy === "passive")
|
|
101
|
+
if (resolvedDisabled || interactionPolicy === "passive")
|
|
99
102
|
return;
|
|
100
103
|
if (areIdsEqual(nextNormalizedIds, currentNormalizedIds))
|
|
101
104
|
return;
|
|
102
105
|
onSelectionChange?.(nextNormalizedIds);
|
|
103
|
-
if (!isControlled)
|
|
106
|
+
if (!isControlled)
|
|
104
107
|
setUncontrolledIds(nextNormalizedIds);
|
|
105
|
-
}
|
|
106
108
|
}, [currentNormalizedIds, interactionPolicy, isControlled, onSelectionChange, resolvedDisabled]);
|
|
107
109
|
const clear = React.useCallback(() => {
|
|
108
110
|
commitSelectionChange(normalizeIds(clearIds(), resolvedMode));
|
|
109
111
|
}, [commitSelectionChange, resolvedMode]);
|
|
110
112
|
const select = React.useCallback((id) => {
|
|
111
113
|
const nextIds = selectId({ mode: resolvedMode, ids: currentNormalizedIds, id });
|
|
112
|
-
|
|
113
|
-
commitSelectionChange(nextNormalizedIds);
|
|
114
|
+
commitSelectionChange(normalizeIds(nextIds, resolvedMode));
|
|
114
115
|
}, [commitSelectionChange, currentNormalizedIds, resolvedMode]);
|
|
115
116
|
const toggle = React.useCallback((id) => {
|
|
116
|
-
const nextIds =
|
|
117
|
-
|
|
118
|
-
commitSelectionChange(nextNormalizedIds);
|
|
117
|
+
const nextIds = applySelectionIntent(currentNormalizedIds, id, "toggle");
|
|
118
|
+
commitSelectionChange(normalizeIds(nextIds, resolvedMode));
|
|
119
119
|
}, [commitSelectionChange, currentNormalizedIds, resolvedMode]);
|
|
120
|
-
const
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
120
|
+
const activate = React.useCallback((id, intent) => {
|
|
121
|
+
const effectiveIntent = resolvedMode === "single" ? "replace" : intent;
|
|
122
|
+
const nextIds = applySelectionIntent(currentNormalizedIds, id, effectiveIntent);
|
|
123
|
+
commitSelectionChange(normalizeIds(nextIds, resolvedMode));
|
|
124
|
+
}, [commitSelectionChange, currentNormalizedIds, resolvedMode]);
|
|
125
|
+
const value = React.useMemo(() => ({
|
|
126
|
+
mode: resolvedMode,
|
|
127
|
+
disabled: resolvedDisabled,
|
|
128
|
+
selectedIds: currentNormalizedIds,
|
|
129
|
+
selectedCount: currentNormalizedIds.length,
|
|
130
|
+
hasSelection: currentNormalizedIds.length > 0,
|
|
131
|
+
isSelected: (id) => selectedIdSet.has(id),
|
|
132
|
+
activate,
|
|
133
|
+
select,
|
|
134
|
+
toggle,
|
|
135
|
+
clear
|
|
136
|
+
}), [
|
|
137
|
+
activate,
|
|
138
|
+
clear,
|
|
139
|
+
currentNormalizedIds,
|
|
140
|
+
resolvedDisabled,
|
|
141
|
+
resolvedMode,
|
|
142
|
+
select,
|
|
143
|
+
selectedIdSet,
|
|
144
|
+
toggle
|
|
145
|
+
]);
|
|
133
146
|
return /* @__PURE__ */ jsx(SelectionContext, {
|
|
134
147
|
value,
|
|
135
148
|
children
|
|
@@ -137,6 +150,7 @@ function SelectionProvider2({
|
|
|
137
150
|
}
|
|
138
151
|
|
|
139
152
|
// src/features/selection/adapters/inbound/SelectableItem.tsx
|
|
153
|
+
var import_react_native = __toESM(require_cjs(), 1);
|
|
140
154
|
import React2 from "react";
|
|
141
155
|
import { jsx as jsx2, Fragment } from "react/jsx-runtime";
|
|
142
156
|
function resolveTrigger(trigger) {
|
|
@@ -156,75 +170,54 @@ function SelectableItem2({
|
|
|
156
170
|
const resolvedTrigger = resolveTrigger(trigger);
|
|
157
171
|
const resolvedDisabled = selection.disabled || disabled;
|
|
158
172
|
const selected = selection.isSelected(id);
|
|
159
|
-
const
|
|
160
|
-
if (resolvedDisabled)
|
|
173
|
+
const activate = React2.useCallback((intent) => {
|
|
174
|
+
if (resolvedDisabled || interactionPolicy === "passive")
|
|
161
175
|
return;
|
|
162
|
-
|
|
176
|
+
selection.activate(id, intent);
|
|
177
|
+
}, [id, interactionPolicy, resolvedDisabled, selection]);
|
|
178
|
+
const select = React2.useCallback(() => {
|
|
179
|
+
if (resolvedDisabled || interactionPolicy === "passive")
|
|
163
180
|
return;
|
|
164
181
|
selection.select(id);
|
|
165
|
-
}, [id,
|
|
182
|
+
}, [id, interactionPolicy, resolvedDisabled, selection]);
|
|
166
183
|
const toggle = React2.useCallback(() => {
|
|
167
|
-
if (resolvedDisabled)
|
|
168
|
-
return;
|
|
169
|
-
if (interactionPolicy === "passive")
|
|
184
|
+
if (resolvedDisabled || interactionPolicy === "passive")
|
|
170
185
|
return;
|
|
171
186
|
selection.toggle(id);
|
|
172
|
-
}, [id,
|
|
187
|
+
}, [id, interactionPolicy, resolvedDisabled, selection]);
|
|
173
188
|
const clear = React2.useCallback(() => {
|
|
174
|
-
if (selection.disabled)
|
|
175
|
-
return;
|
|
176
|
-
if (interactionPolicy === "passive")
|
|
189
|
+
if (selection.disabled || interactionPolicy === "passive")
|
|
177
190
|
return;
|
|
178
191
|
selection.clear();
|
|
179
192
|
}, [interactionPolicy, selection]);
|
|
180
|
-
const itemState = React2.useMemo(() => {
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
}, [clear, id, resolvedDisabled, select, selected, selection.mode, toggle]);
|
|
193
|
+
const itemState = React2.useMemo(() => ({
|
|
194
|
+
id,
|
|
195
|
+
selected,
|
|
196
|
+
disabled: resolvedDisabled,
|
|
197
|
+
mode: selection.mode,
|
|
198
|
+
activate,
|
|
199
|
+
select,
|
|
200
|
+
toggle,
|
|
201
|
+
clear
|
|
202
|
+
}), [activate, clear, id, resolvedDisabled, select, selected, selection.mode, toggle]);
|
|
191
203
|
const content = isRenderProp(children) ? children(itemState) : children;
|
|
192
|
-
if (resolvedTrigger === "manual")
|
|
204
|
+
if (resolvedTrigger === "manual")
|
|
193
205
|
return /* @__PURE__ */ jsx2(Fragment, {
|
|
194
206
|
children: content
|
|
195
207
|
});
|
|
196
|
-
|
|
197
|
-
const handlePress = (event) => {
|
|
208
|
+
const handleActivation = (event) => {
|
|
198
209
|
event.stopPropagation();
|
|
199
|
-
if (resolvedDisabled)
|
|
200
|
-
return;
|
|
201
|
-
if (interactionPolicy === "passive")
|
|
210
|
+
if (resolvedDisabled || interactionPolicy === "passive")
|
|
202
211
|
return;
|
|
203
|
-
|
|
204
|
-
selection.select(id);
|
|
205
|
-
return;
|
|
206
|
-
}
|
|
207
|
-
selection.toggle(id);
|
|
208
|
-
};
|
|
209
|
-
const handleLongPress = (event) => {
|
|
210
|
-
event.stopPropagation();
|
|
211
|
-
if (resolvedDisabled)
|
|
212
|
-
return;
|
|
213
|
-
if (interactionPolicy === "passive")
|
|
214
|
-
return;
|
|
215
|
-
if (selection.mode === "single") {
|
|
216
|
-
selection.select(id);
|
|
217
|
-
return;
|
|
218
|
-
}
|
|
219
|
-
selection.toggle(id);
|
|
212
|
+
selection.activate(id, resolveSelectionEventIntent(event, import_react_native.Platform.OS === "web" ? "pointer" : "touch"));
|
|
220
213
|
};
|
|
221
214
|
return /* @__PURE__ */ jsx2(Pressable, {
|
|
222
215
|
interactionPolicy,
|
|
223
216
|
accessibilityRole: "button",
|
|
224
217
|
accessibilityState: { disabled: resolvedDisabled, selected },
|
|
225
218
|
disabled: resolvedDisabled,
|
|
226
|
-
onLongPress: resolvedTrigger === "longPress" ?
|
|
227
|
-
onPress: resolvedTrigger === "press" ?
|
|
219
|
+
onLongPress: resolvedTrigger === "longPress" ? handleActivation : undefined,
|
|
220
|
+
onPress: resolvedTrigger === "press" ? handleActivation : undefined,
|
|
228
221
|
children: content
|
|
229
222
|
});
|
|
230
223
|
}
|