@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,39 +1,51 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import"../../chunks/Accordion-7hn324r1.js";
|
|
3
|
-
import"../../chunks/Accordion-vq462y0x.js";
|
|
4
2
|
import"../../chunks/Accordion-x5ny2aax.js";
|
|
3
|
+
import {
|
|
4
|
+
require_cjs
|
|
5
|
+
} from "../../chunks/Accordion-7hn324r1.js";
|
|
6
|
+
import {
|
|
7
|
+
Pressable
|
|
8
|
+
} from "../../chunks/Accordion-cdppbyad.js";
|
|
9
|
+
import"../../chunks/Accordion-vq462y0x.js";
|
|
5
10
|
import"../../chunks/Accordion-r1epjp5y.js";
|
|
6
|
-
import"../../chunks/Accordion-
|
|
7
|
-
import"../../chunks/Accordion-bsy1jrak.js";
|
|
11
|
+
import"../../chunks/Accordion-ff583p4q.js";
|
|
8
12
|
import {
|
|
9
13
|
IconButton2
|
|
10
|
-
} from "../../chunks/Accordion-
|
|
14
|
+
} from "../../chunks/Accordion-yms7x22j.js";
|
|
11
15
|
import"../../chunks/Accordion-kcx57mk5.js";
|
|
12
16
|
import {
|
|
13
17
|
withZoraThemeScope
|
|
14
|
-
} from "../../chunks/Accordion-
|
|
18
|
+
} from "../../chunks/Accordion-13y3zx87.js";
|
|
15
19
|
import {
|
|
16
20
|
View2
|
|
17
|
-
} from "../../chunks/Accordion-
|
|
21
|
+
} from "../../chunks/Accordion-01e56hb5.js";
|
|
18
22
|
import {
|
|
19
23
|
Icon2
|
|
20
|
-
} from "../../chunks/Accordion-
|
|
21
|
-
import"../../chunks/Accordion-
|
|
24
|
+
} from "../../chunks/Accordion-x4rjd7yn.js";
|
|
25
|
+
import"../../chunks/Accordion-46vwm9xv.js";
|
|
22
26
|
import {
|
|
23
27
|
ListItem2
|
|
24
|
-
} from "../../chunks/Accordion-
|
|
25
|
-
import"../../chunks/Accordion-
|
|
28
|
+
} from "../../chunks/Accordion-rnjt5z4y.js";
|
|
29
|
+
import"../../chunks/Accordion-tyqds4zr.js";
|
|
30
|
+
import"../../chunks/Accordion-q0st659f.js";
|
|
26
31
|
import {
|
|
27
32
|
toggleExpandedIds
|
|
28
33
|
} from "../../chunks/Accordion-52fg6h9t.js";
|
|
34
|
+
import {
|
|
35
|
+
resolveSelectionEventIntent
|
|
36
|
+
} from "../../chunks/Accordion-5df6cgyf.js";
|
|
29
37
|
import"../../chunks/Accordion-61e19g3e.js";
|
|
38
|
+
import"../../chunks/Accordion-ys214jt5.js";
|
|
30
39
|
import"../../chunks/Accordion-e1nn8m46.js";
|
|
31
40
|
import"../../chunks/Accordion-7zfskq1s.js";
|
|
32
|
-
import"../../chunks/Accordion-ys214jt5.js";
|
|
33
41
|
import"../../chunks/Accordion-rgyg9bw8.js";
|
|
34
42
|
import"../../chunks/Accordion-fre84yaq.js";
|
|
43
|
+
import {
|
|
44
|
+
__toESM
|
|
45
|
+
} from "../../chunks/Accordion-9qvmwkxe.js";
|
|
35
46
|
|
|
36
47
|
// src/features/tree-view/adapters/inbound/TreeItem.tsx
|
|
48
|
+
var import_react_native = __toESM(require_cjs(), 1);
|
|
37
49
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
38
50
|
function TreeItemInner({
|
|
39
51
|
themeId: _themeId,
|
|
@@ -41,7 +53,7 @@ function TreeItemInner({
|
|
|
41
53
|
node,
|
|
42
54
|
depth,
|
|
43
55
|
expansionIndicator,
|
|
44
|
-
|
|
56
|
+
selectedIds,
|
|
45
57
|
expandedIds,
|
|
46
58
|
onSelect,
|
|
47
59
|
onToggleExpand,
|
|
@@ -51,7 +63,7 @@ function TreeItemInner({
|
|
|
51
63
|
}) {
|
|
52
64
|
const hasChildren = node.children !== undefined && node.children.length > 0;
|
|
53
65
|
const isExpanded = expandedIds.includes(node.id);
|
|
54
|
-
const isSelected =
|
|
66
|
+
const isSelected = selectedIds.includes(node.id);
|
|
55
67
|
const renderContent = () => {
|
|
56
68
|
if (renderItem) {
|
|
57
69
|
return renderItem({
|
|
@@ -73,11 +85,19 @@ function TreeItemInner({
|
|
|
73
85
|
selected: isSelected,
|
|
74
86
|
trailing: node.actions
|
|
75
87
|
};
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
88
|
+
if (onSelect === undefined)
|
|
89
|
+
return /* @__PURE__ */ jsx(ListItem2, {
|
|
90
|
+
...listItemProps
|
|
91
|
+
});
|
|
92
|
+
return /* @__PURE__ */ jsx(Pressable, {
|
|
93
|
+
accessibilityRole: "button",
|
|
94
|
+
accessibilityState: { disabled: node.disabled, selected: isSelected },
|
|
95
|
+
disabled: node.disabled,
|
|
96
|
+
interactionPolicy,
|
|
97
|
+
onPress: (event) => onSelect(node.id, resolveSelectionEventIntent(event, import_react_native.Platform.OS === "web" ? "pointer" : "touch")),
|
|
98
|
+
children: /* @__PURE__ */ jsx(ListItem2, {
|
|
99
|
+
...listItemProps
|
|
100
|
+
})
|
|
81
101
|
});
|
|
82
102
|
};
|
|
83
103
|
return /* @__PURE__ */ jsxs(View2, {
|
|
@@ -122,7 +142,7 @@ function TreeItemInner({
|
|
|
122
142
|
onSelect,
|
|
123
143
|
onToggleExpand,
|
|
124
144
|
renderItem,
|
|
125
|
-
|
|
145
|
+
selectedIds
|
|
126
146
|
}, child.id))
|
|
127
147
|
}) : null
|
|
128
148
|
]
|
|
@@ -136,7 +156,7 @@ function TreeViewInner({
|
|
|
136
156
|
themeId: _themeId,
|
|
137
157
|
mode: _mode,
|
|
138
158
|
nodes,
|
|
139
|
-
|
|
159
|
+
selectedIds = [],
|
|
140
160
|
expandedIds: controlledExpandedIds,
|
|
141
161
|
defaultExpandedIds,
|
|
142
162
|
onSelect,
|
|
@@ -153,9 +173,8 @@ function TreeViewInner({
|
|
|
153
173
|
if (interactionPolicy === "passive")
|
|
154
174
|
return;
|
|
155
175
|
const nextExpandedIds = toggleExpandedIds(expandedIds, id);
|
|
156
|
-
if (!isControlled)
|
|
176
|
+
if (!isControlled)
|
|
157
177
|
setInternalExpandedIds(nextExpandedIds);
|
|
158
|
-
}
|
|
159
178
|
onExpandedChange?.(nextExpandedIds);
|
|
160
179
|
};
|
|
161
180
|
return /* @__PURE__ */ jsx2(View2, {
|
|
@@ -169,7 +188,7 @@ function TreeViewInner({
|
|
|
169
188
|
onSelect,
|
|
170
189
|
onToggleExpand: handleToggleExpand,
|
|
171
190
|
renderItem,
|
|
172
|
-
|
|
191
|
+
selectedIds,
|
|
173
192
|
interactionPolicy
|
|
174
193
|
}, node.id))
|
|
175
194
|
});
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { SelectionIntent } from '@ankhorage/utility/selection';
|
|
1
2
|
import React from 'react';
|
|
2
3
|
export interface TreeItemNode<TId extends string = string> {
|
|
3
4
|
readonly id: TId;
|
|
@@ -17,10 +18,10 @@ export interface TreeItemRenderProps<TId extends string = string> {
|
|
|
17
18
|
}
|
|
18
19
|
export interface TreeViewProps<TId extends string = string> {
|
|
19
20
|
readonly nodes: readonly TreeItemNode<TId>[];
|
|
20
|
-
readonly
|
|
21
|
+
readonly selectedIds?: readonly TId[];
|
|
21
22
|
readonly expandedIds?: readonly TId[];
|
|
22
23
|
readonly defaultExpandedIds?: readonly TId[];
|
|
23
|
-
readonly onSelect?: (id: TId) => void;
|
|
24
|
+
readonly onSelect?: (id: TId, intent: SelectionIntent) => void;
|
|
24
25
|
readonly onExpandedChange?: (ids: readonly TId[]) => void;
|
|
25
26
|
readonly renderItem?: (props: TreeItemRenderProps<TId>) => React.ReactNode;
|
|
26
27
|
readonly expansionIndicator?: 'chevron' | 'folder';
|
|
@@ -33,5 +34,5 @@ export interface TreeViewProps<TId extends string = string> {
|
|
|
33
34
|
* expansionIndicator Use `chevron` beside custom node icons, or `folder` (default) for
|
|
34
35
|
* built-in folder/file indicators. Expansion is leading and independent from row selection.
|
|
35
36
|
*/
|
|
36
|
-
export declare function TreeView<TId extends string = string>({ nodes,
|
|
37
|
+
export declare function TreeView<TId extends string = string>({ nodes, selectedIds, expandedIds: controlledExpandedIds, defaultExpandedIds, onSelect, onExpandedChange, renderItem, expansionIndicator, className, style, ariaLabel, }: TreeViewProps<TId>): React.JSX.Element;
|
|
37
38
|
//# sourceMappingURL=TreeView.d.ts.map
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
import {
|
|
3
3
|
toggleExpandedIds
|
|
4
4
|
} from "../../chunks/Accordion-52fg6h9t.js";
|
|
5
|
+
import {
|
|
6
|
+
resolveSelectionEventIntent
|
|
7
|
+
} from "../../chunks/Accordion-5df6cgyf.js";
|
|
5
8
|
|
|
6
9
|
// src/features/tree-view/adapters/inbound/web-artifact/TreeView.tsx
|
|
7
10
|
import React2 from "react";
|
|
@@ -42,7 +45,7 @@ function TreeItemRow(props) {
|
|
|
42
45
|
const { node } = props;
|
|
43
46
|
const hasChildren = node.children !== undefined && node.children.length > 0;
|
|
44
47
|
const expanded = props.expandedIds.includes(node.id);
|
|
45
|
-
const selected = props.
|
|
48
|
+
const selected = props.selectedIds.includes(node.id);
|
|
46
49
|
const content = props.renderItem?.({
|
|
47
50
|
node,
|
|
48
51
|
depth: props.depth,
|
|
@@ -59,7 +62,8 @@ function TreeItemRow(props) {
|
|
|
59
62
|
"aria-disabled": node.disabled === true ? true : undefined,
|
|
60
63
|
"aria-expanded": hasChildren ? expanded : undefined,
|
|
61
64
|
"aria-selected": selected,
|
|
62
|
-
|
|
65
|
+
onPointerUp: (event) => selectNode(event, props),
|
|
66
|
+
onClick: (event) => selectNodeFromSyntheticClick(event, props),
|
|
63
67
|
onKeyDown: (event) => selectNodeFromKeyboard(event, props),
|
|
64
68
|
role: "treeitem",
|
|
65
69
|
tabIndex: node.disabled || props.onSelect === undefined ? undefined : 0,
|
|
@@ -112,6 +116,7 @@ function TreeItemActions({ actions }) {
|
|
|
112
116
|
return null;
|
|
113
117
|
return /* @__PURE__ */ jsx2("span", {
|
|
114
118
|
onClick: (event) => event.stopPropagation(),
|
|
119
|
+
onPointerUp: (event) => event.stopPropagation(),
|
|
115
120
|
onKeyDown: (event) => event.stopPropagation(),
|
|
116
121
|
style: INLINE_STYLE,
|
|
117
122
|
children: actions
|
|
@@ -133,6 +138,7 @@ function TreeItemExpander(props) {
|
|
|
133
138
|
"aria-label": props.expanded ? "Collapse" : "Expand",
|
|
134
139
|
disabled: props.disabled,
|
|
135
140
|
onKeyDown: (event) => event.stopPropagation(),
|
|
141
|
+
onPointerUp: (event) => event.stopPropagation(),
|
|
136
142
|
onClick: (event) => {
|
|
137
143
|
event.stopPropagation();
|
|
138
144
|
props.onToggleExpand(props.nodeId);
|
|
@@ -153,15 +159,21 @@ function TreeItemChildren(props) {
|
|
|
153
159
|
}))
|
|
154
160
|
});
|
|
155
161
|
}
|
|
156
|
-
function selectNode(props) {
|
|
157
|
-
if (
|
|
158
|
-
|
|
162
|
+
function selectNode(event, props) {
|
|
163
|
+
if (props.node.disabled)
|
|
164
|
+
return;
|
|
165
|
+
props.onSelect?.(props.node.id, resolveSelectionEventIntent(event, "pointer"));
|
|
166
|
+
}
|
|
167
|
+
function selectNodeFromSyntheticClick(event, props) {
|
|
168
|
+
if (event.detail !== 0 || props.node.disabled)
|
|
169
|
+
return;
|
|
170
|
+
props.onSelect?.(props.node.id, resolveSelectionEventIntent(event, "keyboard"));
|
|
159
171
|
}
|
|
160
172
|
function selectNodeFromKeyboard(event, props) {
|
|
161
173
|
if (props.node.disabled || event.key !== "Enter" && event.key !== " ")
|
|
162
174
|
return;
|
|
163
175
|
event.preventDefault();
|
|
164
|
-
props.onSelect?.(props.node.id);
|
|
176
|
+
props.onSelect?.(props.node.id, resolveSelectionEventIntent(event, "keyboard"));
|
|
165
177
|
}
|
|
166
178
|
function createRowStyle(depth, selected, disabled, selectable) {
|
|
167
179
|
return {
|
|
@@ -217,7 +229,7 @@ var EXPANDER_STYLE = {
|
|
|
217
229
|
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
218
230
|
function TreeView({
|
|
219
231
|
nodes,
|
|
220
|
-
|
|
232
|
+
selectedIds = [],
|
|
221
233
|
expandedIds: controlledExpandedIds,
|
|
222
234
|
defaultExpandedIds,
|
|
223
235
|
onSelect,
|
|
@@ -238,10 +250,11 @@ function TreeView({
|
|
|
238
250
|
setInternalExpandedIds(nextExpandedIds);
|
|
239
251
|
onExpandedChange?.(nextExpandedIds);
|
|
240
252
|
}, [expandedIds, isControlled, onExpandedChange]);
|
|
241
|
-
useSelectedTreeItemReveal(rootRef,
|
|
253
|
+
useSelectedTreeItemReveal(rootRef, selectedIds, expandedIds);
|
|
242
254
|
return /* @__PURE__ */ jsx3("div", {
|
|
243
255
|
ref: rootRef,
|
|
244
256
|
"aria-label": ariaLabel,
|
|
257
|
+
"aria-multiselectable": "true",
|
|
245
258
|
className,
|
|
246
259
|
role: "tree",
|
|
247
260
|
style: { ...TREE_STYLE, ...style },
|
|
@@ -253,17 +266,17 @@ function TreeView({
|
|
|
253
266
|
onSelect,
|
|
254
267
|
onToggleExpand: handleToggleExpand,
|
|
255
268
|
renderItem,
|
|
256
|
-
|
|
269
|
+
selectedIds
|
|
257
270
|
}, node.id))
|
|
258
271
|
});
|
|
259
272
|
}
|
|
260
|
-
function useSelectedTreeItemReveal(rootRef,
|
|
273
|
+
function useSelectedTreeItemReveal(rootRef, selectedIds, expandedIds) {
|
|
261
274
|
React2.useEffect(() => {
|
|
262
|
-
if (
|
|
275
|
+
if (selectedIds.length === 0)
|
|
263
276
|
return;
|
|
264
277
|
const root = rootRef.current;
|
|
265
278
|
root?.querySelector('[role="treeitem"][aria-selected="true"]')?.scrollIntoView({ block: "nearest", inline: "nearest" });
|
|
266
|
-
}, [expandedIds, rootRef,
|
|
279
|
+
}, [expandedIds, rootRef, selectedIds]);
|
|
267
280
|
}
|
|
268
281
|
var TREE_STYLE = {
|
|
269
282
|
display: "flex",
|
|
@@ -4,46 +4,46 @@ import"../../chunks/Accordion-vq462y0x.js";
|
|
|
4
4
|
import"../../chunks/Accordion-x5ny2aax.js";
|
|
5
5
|
import"../../chunks/Accordion-r1epjp5y.js";
|
|
6
6
|
import"../../chunks/Accordion-cdppbyad.js";
|
|
7
|
-
import"../../chunks/Accordion-
|
|
7
|
+
import"../../chunks/Accordion-ff583p4q.js";
|
|
8
8
|
import {
|
|
9
9
|
Button2
|
|
10
|
-
} from "../../chunks/Accordion-
|
|
10
|
+
} from "../../chunks/Accordion-yms7x22j.js";
|
|
11
11
|
import"../../chunks/Accordion-kcx57mk5.js";
|
|
12
12
|
import {
|
|
13
13
|
withZoraThemeScope
|
|
14
|
-
} from "../../chunks/Accordion-
|
|
14
|
+
} from "../../chunks/Accordion-13y3zx87.js";
|
|
15
15
|
import {
|
|
16
16
|
View2
|
|
17
|
-
} from "../../chunks/Accordion-
|
|
17
|
+
} from "../../chunks/Accordion-01e56hb5.js";
|
|
18
18
|
import"../../chunks/Accordion-6zb9d92y.js";
|
|
19
19
|
import"../../chunks/Accordion-w6n8e1ff.js";
|
|
20
20
|
import"../../chunks/Accordion-99cj85ez.js";
|
|
21
21
|
import"../../chunks/Accordion-13b6y37e.js";
|
|
22
22
|
import {
|
|
23
23
|
Dialog2
|
|
24
|
-
} from "../../chunks/Accordion-
|
|
24
|
+
} from "../../chunks/Accordion-4r9a9qny.js";
|
|
25
25
|
import {
|
|
26
|
-
|
|
27
|
-
} from "../../chunks/Accordion-
|
|
28
|
-
import"../../chunks/Accordion-
|
|
29
|
-
import"../../chunks/Accordion-
|
|
26
|
+
Text3
|
|
27
|
+
} from "../../chunks/Accordion-46vwm9xv.js";
|
|
28
|
+
import"../../chunks/Accordion-ejy7gr0a.js";
|
|
29
|
+
import"../../chunks/Accordion-qb8ppq9t.js";
|
|
30
30
|
import {
|
|
31
31
|
Field2
|
|
32
|
-
} from "../../chunks/Accordion-
|
|
32
|
+
} from "../../chunks/Accordion-5pskbqss.js";
|
|
33
33
|
import {
|
|
34
34
|
Icon2
|
|
35
|
-
} from "../../chunks/Accordion-
|
|
35
|
+
} from "../../chunks/Accordion-x4rjd7yn.js";
|
|
36
36
|
import {
|
|
37
37
|
Image2
|
|
38
|
-
} from "../../chunks/Accordion-
|
|
38
|
+
} from "../../chunks/Accordion-17pht8jd.js";
|
|
39
39
|
import {
|
|
40
40
|
Progress2
|
|
41
|
-
} from "../../chunks/Accordion-
|
|
41
|
+
} from "../../chunks/Accordion-rev0zb75.js";
|
|
42
42
|
import"../../chunks/Accordion-eqvdv7tt.js";
|
|
43
43
|
import"../../chunks/Accordion-61e19g3e.js";
|
|
44
|
+
import"../../chunks/Accordion-ys214jt5.js";
|
|
44
45
|
import"../../chunks/Accordion-e1nn8m46.js";
|
|
45
46
|
import"../../chunks/Accordion-7zfskq1s.js";
|
|
46
|
-
import"../../chunks/Accordion-ys214jt5.js";
|
|
47
47
|
import"../../chunks/Accordion-rgyg9bw8.js";
|
|
48
48
|
import"../../chunks/Accordion-fre84yaq.js";
|
|
49
49
|
|
|
@@ -353,7 +353,7 @@ function UploaderInner({
|
|
|
353
353
|
resolvedAccept || maxSizeBytes ? /* @__PURE__ */ jsxs(View2, {
|
|
354
354
|
gap: "xs",
|
|
355
355
|
children: [
|
|
356
|
-
resolvedAccept ? /* @__PURE__ */ jsxs(
|
|
356
|
+
resolvedAccept ? /* @__PURE__ */ jsxs(Text3, {
|
|
357
357
|
emphasis: "muted",
|
|
358
358
|
variant: "caption",
|
|
359
359
|
children: [
|
|
@@ -361,7 +361,7 @@ function UploaderInner({
|
|
|
361
361
|
resolvedAccept
|
|
362
362
|
]
|
|
363
363
|
}) : null,
|
|
364
|
-
maxSizeBytes ? /* @__PURE__ */ jsxs(
|
|
364
|
+
maxSizeBytes ? /* @__PURE__ */ jsxs(Text3, {
|
|
365
365
|
emphasis: "muted",
|
|
366
366
|
variant: "caption",
|
|
367
367
|
children: [
|
|
@@ -374,7 +374,7 @@ function UploaderInner({
|
|
|
374
374
|
uploading ? /* @__PURE__ */ jsxs(View2, {
|
|
375
375
|
gap: "xs",
|
|
376
376
|
children: [
|
|
377
|
-
/* @__PURE__ */ jsx(
|
|
377
|
+
/* @__PURE__ */ jsx(Text3, {
|
|
378
378
|
emphasis: "muted",
|
|
379
379
|
variant: "caption",
|
|
380
380
|
children: "Uploading…"
|
|
@@ -477,12 +477,12 @@ function UploadPresentation({
|
|
|
477
477
|
/* @__PURE__ */ jsxs(View2, {
|
|
478
478
|
gap: "xs",
|
|
479
479
|
children: [
|
|
480
|
-
/* @__PURE__ */ jsx(
|
|
480
|
+
/* @__PURE__ */ jsx(Text3, {
|
|
481
481
|
variant: "label",
|
|
482
482
|
weight: "semiBold",
|
|
483
483
|
children: asset?.fileName ?? "No file selected"
|
|
484
484
|
}),
|
|
485
|
-
asset?.contentType ? /* @__PURE__ */ jsx(
|
|
485
|
+
asset?.contentType ? /* @__PURE__ */ jsx(Text3, {
|
|
486
486
|
emphasis: "muted",
|
|
487
487
|
variant: "caption",
|
|
488
488
|
children: asset.contentType
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import"../../chunks/Accordion-kcx57mk5.js";
|
|
3
3
|
import"../../chunks/Accordion-7hn324r1.js";
|
|
4
|
-
import"../../chunks/Accordion-
|
|
4
|
+
import"../../chunks/Accordion-13y3zx87.js";
|
|
5
5
|
import"../../chunks/Accordion-x5ny2aax.js";
|
|
6
6
|
import"../../chunks/Accordion-r1epjp5y.js";
|
|
7
7
|
import {
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
Grid2,
|
|
12
12
|
ScrollView2,
|
|
13
13
|
Screen2
|
|
14
|
-
} from "../../chunks/Accordion-
|
|
14
|
+
} from "../../chunks/Accordion-01e56hb5.js";
|
|
15
15
|
import"../../chunks/Accordion-rgyg9bw8.js";
|
|
16
16
|
import"../../chunks/Accordion-fre84yaq.js";
|
|
17
17
|
export {
|