@ankhorage/zora 18.0.0 → 19.0.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.d.ts +2 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +2 -1
- package/dist/constants.js.map +1 -1
- package/dist/corePluginMetadata.d.ts.map +1 -1
- package/dist/corePluginMetadata.js +1 -5
- package/dist/corePluginMetadata.js.map +1 -1
- package/dist/features/accordion/accordionItemMeta.d.ts +1 -1
- package/dist/features/bottom-sheet/bottomSheetMeta.d.ts +1 -1
- package/dist/features/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/{patterns/chat-list-item → features/chat/adapters/inbound}/ChatListItem.d.ts +1 -1
- package/dist/features/chat/adapters/inbound/ChatListItem.d.ts.map +1 -0
- package/dist/{patterns/chat-list-item → features/chat/adapters/inbound}/ChatListItem.js +9 -9
- package/dist/features/chat/adapters/inbound/ChatListItem.js.map +1 -0
- package/dist/{patterns/message-bubble → features/chat/adapters/inbound}/MessageBubble.d.ts +1 -1
- package/dist/features/chat/adapters/inbound/MessageBubble.d.ts.map +1 -0
- package/dist/{patterns/message-bubble → features/chat/adapters/inbound}/MessageBubble.js +8 -8
- package/dist/features/chat/adapters/inbound/MessageBubble.js.map +1 -0
- package/dist/{patterns/chat-list-item/meta.d.ts → features/chat/chatListItemMeta.d.ts} +1 -1
- package/dist/features/chat/chatListItemMeta.d.ts.map +1 -0
- package/dist/{patterns/chat-list-item/meta.js → features/chat/chatListItemMeta.js} +1 -1
- package/dist/features/chat/chatListItemMeta.js.map +1 -0
- package/dist/{patterns/message-bubble/meta.d.ts → features/chat/messageBubbleMeta.d.ts} +2 -2
- package/dist/features/chat/messageBubbleMeta.d.ts.map +1 -0
- package/dist/{patterns/message-bubble/meta.js → features/chat/messageBubbleMeta.js} +1 -1
- package/dist/features/chat/messageBubbleMeta.js.map +1 -0
- package/dist/features/chat/public.d.ts +4 -0
- package/dist/features/chat/public.d.ts.map +1 -0
- package/dist/features/chat/public.js +3 -0
- package/dist/features/chat/public.js.map +1 -0
- package/dist/features/chip/adapters/inbound/Chip.js +3 -3
- package/dist/features/chip/adapters/inbound/Chip.js.map +1 -1
- package/dist/{patterns/collection-editor → features/collection-editor/adapters/inbound}/CollectionEditor.d.ts +1 -1
- package/dist/features/collection-editor/adapters/inbound/CollectionEditor.d.ts.map +1 -0
- package/dist/{patterns/collection-editor → features/collection-editor/adapters/inbound}/CollectionEditor.js +8 -8
- package/dist/features/collection-editor/adapters/inbound/CollectionEditor.js.map +1 -0
- package/dist/features/collection-editor/meta.d.ts.map +1 -0
- package/dist/{patterns → features}/collection-editor/meta.js.map +1 -1
- package/dist/features/collection-editor/public.d.ts +3 -0
- package/dist/features/collection-editor/public.d.ts.map +1 -0
- package/dist/features/collection-editor/public.js +2 -0
- package/dist/features/collection-editor/public.js.map +1 -0
- package/dist/features/content-rail/contentRailMeta.d.ts +2 -2
- package/dist/features/dialog/dialogMeta.d.ts +2 -2
- package/dist/features/form/field/meta.d.ts +1 -1
- package/dist/features/form/field/meta.d.ts.map +1 -1
- package/dist/features/form/field/meta.js +1 -0
- package/dist/features/form/field/meta.js.map +1 -1
- package/dist/features/form/switch/adapters/inbound/Switch.d.ts +5 -0
- package/dist/features/form/switch/adapters/inbound/Switch.d.ts.map +1 -0
- package/dist/features/form/switch/adapters/inbound/Switch.js +9 -0
- package/dist/features/form/switch/adapters/inbound/Switch.js.map +1 -0
- package/dist/features/form/switch/public.d.ts +3 -0
- package/dist/features/form/switch/public.d.ts.map +1 -0
- package/dist/features/form/switch/public.js +2 -0
- package/dist/features/form/switch/public.js.map +1 -0
- package/dist/features/form/switch/switchMeta.d.ts +33 -0
- package/dist/features/form/switch/switchMeta.d.ts.map +1 -0
- package/dist/features/form/switch/switchMeta.js +13 -0
- package/dist/features/form/switch/switchMeta.js.map +1 -0
- package/dist/features/gradient/gradientMeta.d.ts +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/public.d.ts +1 -2
- package/dist/features/layout/public.d.ts.map +1 -1
- package/dist/features/layout/public.js +0 -1
- package/dist/features/layout/public.js.map +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/adapters/inbound/ListSection.d.ts.map +1 -1
- package/dist/features/list/adapters/inbound/ListSection.js +1 -1
- package/dist/features/list/adapters/inbound/ListSection.js.map +1 -1
- package/dist/features/list/flatListMeta.d.ts +1 -1
- package/dist/features/list/sectionListMeta.d.ts +1 -1
- package/dist/{patterns/reader → features/reader/adapters/inbound}/ReaderSurface.d.ts +1 -1
- package/dist/features/reader/adapters/inbound/ReaderSurface.d.ts.map +1 -0
- package/dist/{patterns/reader → features/reader/adapters/inbound}/ReaderSurface.js +9 -9
- package/dist/features/reader/adapters/inbound/ReaderSurface.js.map +1 -0
- package/dist/{patterns → features}/reader/meta.d.ts +2 -2
- package/dist/{patterns → features}/reader/meta.d.ts.map +1 -1
- package/dist/{patterns → features}/reader/meta.js.map +1 -1
- package/dist/features/reader/public.d.ts +4 -0
- package/dist/features/reader/public.d.ts.map +1 -0
- package/dist/features/reader/public.js +3 -0
- package/dist/features/reader/public.js.map +1 -0
- package/dist/features/reader/utils/resolveReaderProgress.d.ts.map +1 -0
- package/dist/features/reader/utils/resolveReaderProgress.js.map +1 -0
- package/dist/{patterns/scanner → features/scanner/adapters/inbound}/BarcodeScannerView.d.ts +1 -1
- package/dist/features/scanner/adapters/inbound/BarcodeScannerView.d.ts.map +1 -0
- package/dist/{patterns/scanner → features/scanner/adapters/inbound}/BarcodeScannerView.js +5 -5
- package/dist/features/scanner/adapters/inbound/BarcodeScannerView.js.map +1 -0
- package/dist/{patterns/scanner → features/scanner/adapters/inbound}/CameraPermissionView.d.ts +1 -1
- package/dist/features/scanner/adapters/inbound/CameraPermissionView.d.ts.map +1 -0
- package/dist/{patterns/scanner → features/scanner/adapters/inbound}/CameraPermissionView.js +5 -5
- package/dist/features/scanner/adapters/inbound/CameraPermissionView.js.map +1 -0
- package/dist/{patterns/scanner → features/scanner/adapters/inbound}/ScanOverlay.d.ts +1 -1
- package/dist/features/scanner/adapters/inbound/ScanOverlay.d.ts.map +1 -0
- package/dist/{patterns/scanner → features/scanner/adapters/inbound}/ScanOverlay.js +5 -5
- package/dist/features/scanner/adapters/inbound/ScanOverlay.js.map +1 -0
- package/dist/{patterns → features}/scanner/meta.d.ts +2 -2
- package/dist/{patterns → features}/scanner/meta.d.ts.map +1 -1
- package/dist/{patterns → features}/scanner/meta.js.map +1 -1
- package/dist/features/scanner/public.d.ts +5 -0
- package/dist/features/scanner/public.d.ts.map +1 -0
- package/dist/features/scanner/public.js +4 -0
- package/dist/features/scanner/public.js.map +1 -0
- package/dist/features/{layout → section}/adapters/inbound/ScreenSection.d.ts +1 -1
- package/dist/features/section/adapters/inbound/ScreenSection.d.ts.map +1 -0
- package/dist/features/{layout → section}/adapters/inbound/ScreenSection.js +2 -2
- package/dist/features/section/adapters/inbound/ScreenSection.js.map +1 -0
- package/dist/{patterns/section-header → features/section/adapters/inbound}/SectionHeader.d.ts +1 -1
- package/dist/features/section/adapters/inbound/SectionHeader.d.ts.map +1 -0
- package/dist/{patterns/section-header → features/section/adapters/inbound}/SectionHeader.js +4 -4
- package/dist/features/section/adapters/inbound/SectionHeader.js.map +1 -0
- package/dist/features/section/public.d.ts +4 -0
- package/dist/features/section/public.d.ts.map +1 -0
- package/dist/features/section/public.js +3 -0
- package/dist/features/section/public.js.map +1 -0
- package/dist/features/{layout → section}/screenSectionMeta.d.ts +1 -1
- package/dist/features/section/screenSectionMeta.d.ts.map +1 -0
- package/dist/features/section/screenSectionMeta.js.map +1 -0
- package/dist/{patterns/section-header/meta.d.ts → features/section/sectionHeaderMeta.d.ts} +1 -1
- package/dist/features/section/sectionHeaderMeta.d.ts.map +1 -0
- package/dist/{patterns/section-header/meta.js → features/section/sectionHeaderMeta.js} +1 -1
- package/dist/features/section/sectionHeaderMeta.js.map +1 -0
- package/dist/{patterns/selection → features/selection/adapters/inbound}/SelectableItem.d.ts +1 -1
- package/dist/features/selection/adapters/inbound/SelectableItem.d.ts.map +1 -0
- package/dist/{patterns/selection → features/selection/adapters/inbound}/SelectableItem.js +4 -4
- package/dist/features/selection/adapters/inbound/SelectableItem.js.map +1 -0
- package/dist/{patterns/selection → features/selection/adapters/inbound}/SelectionProvider.d.ts +1 -1
- package/dist/features/selection/adapters/inbound/SelectionProvider.d.ts.map +1 -0
- package/dist/{patterns/selection → features/selection/adapters/inbound}/SelectionProvider.js +1 -1
- package/dist/features/selection/adapters/inbound/SelectionProvider.js.map +1 -0
- package/dist/{patterns → features}/selection/meta.d.ts.map +1 -1
- package/dist/{patterns → features}/selection/meta.js.map +1 -1
- package/dist/features/selection/public.d.ts +4 -0
- package/dist/features/selection/public.d.ts.map +1 -0
- package/dist/features/selection/public.js +3 -0
- package/dist/features/selection/public.js.map +1 -0
- package/dist/{patterns/selection → features/selection/utils}/resolveSelectionNextIds.d.ts +1 -1
- package/dist/features/selection/utils/resolveSelectionNextIds.d.ts.map +1 -0
- package/dist/features/selection/utils/resolveSelectionNextIds.js.map +1 -0
- package/dist/features/surface/surfaceMeta.d.ts +1 -1
- package/dist/features/tabs/tabPanelMeta.d.ts +1 -1
- package/dist/{patterns/timeline → features/timeline/adapters/inbound}/Timeline.d.ts +1 -1
- package/dist/features/timeline/adapters/inbound/Timeline.d.ts.map +1 -0
- package/dist/{patterns/timeline → features/timeline/adapters/inbound}/Timeline.js +7 -7
- package/dist/features/timeline/adapters/inbound/Timeline.js.map +1 -0
- package/dist/features/timeline/meta.d.ts.map +1 -0
- package/dist/{patterns → features}/timeline/meta.js.map +1 -1
- package/dist/features/timeline/public.d.ts +3 -0
- package/dist/features/timeline/public.d.ts.map +1 -0
- package/dist/features/timeline/public.js +2 -0
- package/dist/features/timeline/public.js.map +1 -0
- package/dist/{patterns/tree-view → features/tree-view/adapters/inbound}/TreeItem.d.ts +2 -2
- package/dist/features/tree-view/adapters/inbound/TreeItem.d.ts.map +1 -0
- package/dist/{patterns/tree-view → features/tree-view/adapters/inbound}/TreeItem.js +4 -4
- package/dist/features/tree-view/adapters/inbound/TreeItem.js.map +1 -0
- package/dist/{patterns/tree-view → features/tree-view/adapters/inbound}/TreeView.d.ts +1 -1
- package/dist/features/tree-view/adapters/inbound/TreeView.d.ts.map +1 -0
- package/dist/{patterns/tree-view → features/tree-view/adapters/inbound}/TreeView.js +2 -2
- package/dist/features/tree-view/adapters/inbound/TreeView.js.map +1 -0
- package/dist/{patterns → features}/tree-view/meta.d.ts.map +1 -1
- package/dist/{patterns → features}/tree-view/meta.js.map +1 -1
- package/dist/features/tree-view/public.d.ts +4 -0
- package/dist/features/tree-view/public.d.ts.map +1 -0
- package/dist/features/tree-view/public.js +3 -0
- package/dist/features/tree-view/public.js.map +1 -0
- package/dist/index.d.ts +18 -34
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -17
- package/dist/index.js.map +1 -1
- package/dist/metadata/allowedChildren.d.ts +4 -4
- package/dist/metadata/allowedChildren.d.ts.map +1 -1
- package/dist/metadata/allowedChildren.js +0 -3
- package/dist/metadata/allowedChildren.js.map +1 -1
- package/dist/metadata/bindableComponentMeta.d.ts +23 -23
- package/dist/metadata/bindableComponentMeta.d.ts.map +1 -1
- package/dist/metadata/bindableComponentMeta.js +20 -28
- package/dist/metadata/bindableComponentMeta.js.map +1 -1
- package/dist/metadata/componentMeta.d.ts.map +1 -1
- package/dist/metadata/componentMeta.js +12 -24
- package/dist/metadata/componentMeta.js.map +1 -1
- package/dist/metadata/themeRecipeMeta.d.ts.map +1 -1
- package/dist/metadata/themeRecipeMeta.js +0 -2
- package/dist/metadata/themeRecipeMeta.js.map +1 -1
- package/dist/registry.d.ts.map +1 -1
- package/dist/registry.js +11 -24
- package/dist/registry.js.map +1 -1
- package/dist/{patterns/message-bubble/types.d.ts → types/chat.d.ts} +29 -4
- package/dist/types/chat.d.ts.map +1 -0
- package/dist/types/chat.js +2 -0
- package/dist/types/chat.js.map +1 -0
- package/dist/{patterns/collection-editor/types.d.ts → types/collection-editor.d.ts} +2 -2
- package/dist/types/collection-editor.d.ts.map +1 -0
- package/dist/types/collection-editor.js +2 -0
- package/dist/types/collection-editor.js.map +1 -0
- package/dist/types/layout.d.ts +0 -6
- package/dist/types/layout.d.ts.map +1 -1
- package/dist/types/layout.js.map +1 -1
- package/dist/{patterns/reader/types.d.ts → types/reader.d.ts} +2 -2
- package/dist/types/reader.d.ts.map +1 -0
- package/dist/types/reader.js +2 -0
- package/dist/types/reader.js.map +1 -0
- package/dist/{patterns/scanner/types.d.ts → types/scanner.d.ts} +3 -3
- package/dist/types/scanner.d.ts.map +1 -0
- package/dist/types/scanner.js +2 -0
- package/dist/types/scanner.js.map +1 -0
- package/dist/types/section.d.ts +15 -0
- package/dist/types/section.d.ts.map +1 -0
- package/dist/types/section.js +2 -0
- package/dist/types/section.js.map +1 -0
- package/dist/{patterns/selection/types.d.ts → types/selection.d.ts} +1 -1
- package/dist/types/selection.d.ts.map +1 -0
- package/dist/types/selection.js +2 -0
- package/dist/types/selection.js.map +1 -0
- package/dist/types/switch.d.ts +5 -0
- package/dist/types/switch.d.ts.map +1 -0
- package/dist/types/switch.js +2 -0
- package/dist/types/switch.js.map +1 -0
- package/dist/{patterns/timeline/types.d.ts → types/timeline.d.ts} +3 -3
- package/dist/types/timeline.d.ts.map +1 -0
- package/dist/types/timeline.js +2 -0
- package/dist/types/timeline.js.map +1 -0
- package/dist/{patterns/tree-view/types.d.ts → types/tree-view.d.ts} +2 -2
- package/dist/types/tree-view.d.ts.map +1 -0
- package/dist/types/tree-view.js +2 -0
- package/dist/types/tree-view.js.map +1 -0
- package/package.json +2 -2
- package/src/audit.test.ts +3 -3
- package/src/constants.ts +2 -1
- package/src/corePluginMetadata.ts +1 -5
- package/src/featureManifest.test.ts +2 -1
- package/src/features/bottom-sheet/public.test.ts +1 -1
- package/src/{patterns/chat-list-item → features/chat/adapters/inbound}/ChatListItem.test.tsx +1 -1
- package/src/{patterns/chat-list-item → features/chat/adapters/inbound}/ChatListItem.tsx +10 -10
- package/src/{patterns/message-bubble → features/chat/adapters/inbound}/MessageBubble.tsx +9 -9
- package/src/features/chat/public.ts +11 -0
- package/src/features/chip/adapters/inbound/Chip.tsx +3 -3
- package/src/{patterns/collection-editor → features/collection-editor/adapters/inbound}/CollectionEditor.tsx +9 -9
- package/src/features/collection-editor/public.ts +5 -0
- package/src/features/form/field/meta.ts +1 -0
- package/src/features/form/switch/adapters/inbound/Switch.tsx +12 -0
- package/src/features/form/switch/public.ts +2 -0
- package/src/features/form/switch/switchMeta.ts +14 -0
- package/src/features/layout/public.test.ts +3 -11
- package/src/features/layout/public.ts +0 -2
- package/src/features/list/adapters/inbound/ListSection.tsx +1 -1
- package/src/features/missing-element/MissingElement.test.ts +2 -2
- package/src/{patterns/reader → features/reader/adapters/inbound}/ReaderSurface.test.ts +3 -3
- package/src/{patterns/reader → features/reader/adapters/inbound}/ReaderSurface.tsx +10 -10
- package/src/{patterns/reader/index.ts → features/reader/public.ts} +3 -3
- package/src/{patterns/scanner → features/scanner/adapters/inbound}/BarcodeScannerView.tsx +6 -6
- package/src/{patterns/scanner → features/scanner/adapters/inbound}/CameraPermissionView.tsx +6 -6
- package/src/{patterns/scanner → features/scanner/adapters/inbound}/ScanOverlay.tsx +6 -6
- package/src/features/scanner/public.ts +10 -0
- package/src/features/{layout → section}/adapters/inbound/ScreenSection.tsx +3 -3
- package/src/{patterns/section-header → features/section/adapters/inbound}/SectionHeader.tsx +5 -5
- package/src/features/section/public.ts +3 -0
- package/src/{patterns/selection → features/selection/adapters/inbound}/SelectableItem.tsx +9 -5
- package/src/{patterns/selection → features/selection/adapters/inbound}/SelectionProvider.tsx +12 -2
- package/src/features/selection/public.ts +10 -0
- package/src/{patterns/selection → features/selection/utils}/resolveSelectionNextIds.test.ts +1 -1
- package/src/{patterns/selection → features/selection/utils}/resolveSelectionNextIds.ts +1 -1
- package/src/{patterns/timeline → features/timeline/adapters/inbound}/Timeline.tsx +9 -9
- package/src/features/timeline/public.ts +2 -0
- package/src/{patterns/tree-view → features/tree-view/adapters/inbound}/TreeItem.tsx +6 -6
- package/src/{patterns/tree-view → features/tree-view/adapters/inbound}/TreeView.tsx +3 -3
- package/src/features/tree-view/public.ts +3 -0
- package/src/index.ts +58 -76
- package/src/interactionPolicy.test.ts +8 -12
- package/src/metadata/allowedChildren.ts +0 -3
- package/src/metadata/authoringMeta.test.ts +1 -1
- package/src/metadata/bindableComponentMeta.ts +20 -28
- package/src/metadata/componentMeta.test.ts +2 -3
- package/src/metadata/componentMeta.ts +16 -28
- package/src/metadata/radioGroupReachability.test.ts +0 -1
- package/src/metadata/themeRecipeMeta.test.ts +0 -1
- package/src/metadata/themeRecipeMeta.ts +0 -2
- package/src/platformAcceptance.test.ts +1 -1
- package/src/registry.ts +11 -32
- package/src/showcaseCoverage.test.ts +1 -7
- package/src/theme/themeScopeStructure.test.ts +13 -21
- package/src/{patterns/message-bubble/types.ts → types/chat.ts} +30 -3
- package/src/{patterns/collection-editor/types.ts → types/collection-editor.ts} +2 -2
- package/src/types/layout.ts +0 -7
- package/src/{patterns/reader/types.ts → types/reader.ts} +1 -1
- package/src/{patterns/scanner/types.ts → types/scanner.ts} +2 -2
- package/src/types/section.ts +17 -0
- package/src/types/switch.ts +5 -0
- package/src/{patterns/timeline/types.ts → types/timeline.ts} +2 -2
- package/src/{patterns/tree-view/types.ts → types/tree-view.ts} +1 -1
- package/dist/features/layout/adapters/inbound/ScreenSection.d.ts.map +0 -1
- package/dist/features/layout/adapters/inbound/ScreenSection.js.map +0 -1
- package/dist/features/layout/screenSectionMeta.d.ts.map +0 -1
- package/dist/features/layout/screenSectionMeta.js.map +0 -1
- package/dist/patterns/chat-list-item/ChatListItem.d.ts.map +0 -1
- package/dist/patterns/chat-list-item/ChatListItem.js.map +0 -1
- package/dist/patterns/chat-list-item/index.d.ts +0 -3
- package/dist/patterns/chat-list-item/index.d.ts.map +0 -1
- package/dist/patterns/chat-list-item/index.js +0 -2
- package/dist/patterns/chat-list-item/index.js.map +0 -1
- package/dist/patterns/chat-list-item/meta.d.ts.map +0 -1
- package/dist/patterns/chat-list-item/meta.js.map +0 -1
- package/dist/patterns/chat-list-item/types.d.ts +0 -31
- package/dist/patterns/chat-list-item/types.d.ts.map +0 -1
- package/dist/patterns/chat-list-item/types.js +0 -2
- package/dist/patterns/chat-list-item/types.js.map +0 -1
- package/dist/patterns/collection-editor/CollectionEditor.d.ts.map +0 -1
- package/dist/patterns/collection-editor/CollectionEditor.js.map +0 -1
- package/dist/patterns/collection-editor/index.d.ts +0 -3
- package/dist/patterns/collection-editor/index.d.ts.map +0 -1
- package/dist/patterns/collection-editor/index.js +0 -3
- package/dist/patterns/collection-editor/index.js.map +0 -1
- package/dist/patterns/collection-editor/meta.d.ts.map +0 -1
- package/dist/patterns/collection-editor/types.d.ts.map +0 -1
- package/dist/patterns/collection-editor/types.js +0 -2
- package/dist/patterns/collection-editor/types.js.map +0 -1
- package/dist/patterns/confirm-dialog/ConfirmDialog.d.ts +0 -9
- package/dist/patterns/confirm-dialog/ConfirmDialog.d.ts.map +0 -1
- package/dist/patterns/confirm-dialog/ConfirmDialog.js +0 -24
- package/dist/patterns/confirm-dialog/ConfirmDialog.js.map +0 -1
- package/dist/patterns/confirm-dialog/index.d.ts +0 -3
- package/dist/patterns/confirm-dialog/index.d.ts.map +0 -1
- package/dist/patterns/confirm-dialog/index.js +0 -2
- package/dist/patterns/confirm-dialog/index.js.map +0 -1
- package/dist/patterns/confirm-dialog/meta.d.ts +0 -9
- package/dist/patterns/confirm-dialog/meta.d.ts.map +0 -1
- package/dist/patterns/confirm-dialog/meta.js +0 -9
- package/dist/patterns/confirm-dialog/meta.js.map +0 -1
- package/dist/patterns/confirm-dialog/types.d.ts +0 -18
- package/dist/patterns/confirm-dialog/types.d.ts.map +0 -1
- package/dist/patterns/confirm-dialog/types.js +0 -2
- package/dist/patterns/confirm-dialog/types.js.map +0 -1
- package/dist/patterns/filter-bar/FilterBar.d.ts +0 -9
- package/dist/patterns/filter-bar/FilterBar.d.ts.map +0 -1
- package/dist/patterns/filter-bar/FilterBar.js +0 -17
- package/dist/patterns/filter-bar/FilterBar.js.map +0 -1
- package/dist/patterns/filter-bar/index.d.ts +0 -3
- package/dist/patterns/filter-bar/index.d.ts.map +0 -1
- package/dist/patterns/filter-bar/index.js +0 -2
- package/dist/patterns/filter-bar/index.js.map +0 -1
- package/dist/patterns/filter-bar/meta.d.ts +0 -9
- package/dist/patterns/filter-bar/meta.d.ts.map +0 -1
- package/dist/patterns/filter-bar/meta.js +0 -9
- package/dist/patterns/filter-bar/meta.js.map +0 -1
- package/dist/patterns/filter-bar/types.d.ts +0 -9
- package/dist/patterns/filter-bar/types.d.ts.map +0 -1
- package/dist/patterns/filter-bar/types.js +0 -2
- package/dist/patterns/filter-bar/types.js.map +0 -1
- package/dist/patterns/inspector-field/InspectorField.d.ts +0 -9
- package/dist/patterns/inspector-field/InspectorField.d.ts.map +0 -1
- package/dist/patterns/inspector-field/InspectorField.js +0 -19
- package/dist/patterns/inspector-field/InspectorField.js.map +0 -1
- package/dist/patterns/inspector-field/index.d.ts +0 -3
- package/dist/patterns/inspector-field/index.d.ts.map +0 -1
- package/dist/patterns/inspector-field/index.js +0 -3
- package/dist/patterns/inspector-field/index.js.map +0 -1
- package/dist/patterns/inspector-field/meta.d.ts +0 -9
- package/dist/patterns/inspector-field/meta.d.ts.map +0 -1
- package/dist/patterns/inspector-field/meta.js +0 -9
- package/dist/patterns/inspector-field/meta.js.map +0 -1
- package/dist/patterns/inspector-field/types.d.ts +0 -15
- package/dist/patterns/inspector-field/types.d.ts.map +0 -1
- package/dist/patterns/inspector-field/types.js +0 -2
- package/dist/patterns/inspector-field/types.js.map +0 -1
- package/dist/patterns/message-bubble/MessageBubble.d.ts.map +0 -1
- package/dist/patterns/message-bubble/MessageBubble.js.map +0 -1
- package/dist/patterns/message-bubble/index.d.ts +0 -3
- package/dist/patterns/message-bubble/index.d.ts.map +0 -1
- package/dist/patterns/message-bubble/index.js +0 -2
- package/dist/patterns/message-bubble/index.js.map +0 -1
- package/dist/patterns/message-bubble/meta.d.ts.map +0 -1
- package/dist/patterns/message-bubble/meta.js.map +0 -1
- package/dist/patterns/message-bubble/types.d.ts.map +0 -1
- package/dist/patterns/message-bubble/types.js +0 -2
- package/dist/patterns/message-bubble/types.js.map +0 -1
- package/dist/patterns/notice/Notice.d.ts +0 -9
- package/dist/patterns/notice/Notice.d.ts.map +0 -1
- package/dist/patterns/notice/Notice.js +0 -20
- package/dist/patterns/notice/Notice.js.map +0 -1
- package/dist/patterns/notice/index.d.ts +0 -3
- package/dist/patterns/notice/index.d.ts.map +0 -1
- package/dist/patterns/notice/index.js +0 -2
- package/dist/patterns/notice/index.js.map +0 -1
- package/dist/patterns/notice/meta.d.ts +0 -34
- package/dist/patterns/notice/meta.d.ts.map +0 -1
- package/dist/patterns/notice/meta.js +0 -35
- package/dist/patterns/notice/meta.js.map +0 -1
- package/dist/patterns/notice/types.d.ts +0 -11
- package/dist/patterns/notice/types.d.ts.map +0 -1
- package/dist/patterns/notice/types.js +0 -2
- package/dist/patterns/notice/types.js.map +0 -1
- package/dist/patterns/panel/Panel.d.ts +0 -7
- package/dist/patterns/panel/Panel.d.ts.map +0 -1
- package/dist/patterns/panel/Panel.js +0 -15
- package/dist/patterns/panel/Panel.js.map +0 -1
- package/dist/patterns/panel/index.d.ts +0 -3
- package/dist/patterns/panel/index.d.ts.map +0 -1
- package/dist/patterns/panel/index.js +0 -2
- package/dist/patterns/panel/index.js.map +0 -1
- package/dist/patterns/panel/meta.d.ts +0 -80
- package/dist/patterns/panel/meta.d.ts.map +0 -1
- package/dist/patterns/panel/meta.js +0 -49
- package/dist/patterns/panel/meta.js.map +0 -1
- package/dist/patterns/panel/themeRecipeMeta.d.ts +0 -31
- package/dist/patterns/panel/themeRecipeMeta.d.ts.map +0 -1
- package/dist/patterns/panel/themeRecipeMeta.js +0 -31
- package/dist/patterns/panel/themeRecipeMeta.js.map +0 -1
- package/dist/patterns/panel/types.d.ts +0 -16
- package/dist/patterns/panel/types.d.ts.map +0 -1
- package/dist/patterns/panel/types.js +0 -2
- package/dist/patterns/panel/types.js.map +0 -1
- package/dist/patterns/reader/ReaderSurface.d.ts.map +0 -1
- package/dist/patterns/reader/ReaderSurface.js.map +0 -1
- package/dist/patterns/reader/index.d.ts +0 -4
- package/dist/patterns/reader/index.d.ts.map +0 -1
- package/dist/patterns/reader/index.js +0 -3
- package/dist/patterns/reader/index.js.map +0 -1
- package/dist/patterns/reader/resolveReaderProgress.d.ts.map +0 -1
- package/dist/patterns/reader/resolveReaderProgress.js.map +0 -1
- package/dist/patterns/reader/types.d.ts.map +0 -1
- package/dist/patterns/reader/types.js +0 -2
- package/dist/patterns/reader/types.js.map +0 -1
- package/dist/patterns/scanner/BarcodeScannerView.d.ts.map +0 -1
- package/dist/patterns/scanner/BarcodeScannerView.js.map +0 -1
- package/dist/patterns/scanner/CameraPermissionView.d.ts.map +0 -1
- package/dist/patterns/scanner/CameraPermissionView.js.map +0 -1
- package/dist/patterns/scanner/ScanOverlay.d.ts.map +0 -1
- package/dist/patterns/scanner/ScanOverlay.js.map +0 -1
- package/dist/patterns/scanner/index.d.ts +0 -5
- package/dist/patterns/scanner/index.d.ts.map +0 -1
- package/dist/patterns/scanner/index.js +0 -4
- package/dist/patterns/scanner/index.js.map +0 -1
- package/dist/patterns/scanner/types.d.ts.map +0 -1
- package/dist/patterns/scanner/types.js +0 -2
- package/dist/patterns/scanner/types.js.map +0 -1
- package/dist/patterns/section-header/SectionHeader.d.ts.map +0 -1
- package/dist/patterns/section-header/SectionHeader.js.map +0 -1
- package/dist/patterns/section-header/index.d.ts +0 -3
- package/dist/patterns/section-header/index.d.ts.map +0 -1
- package/dist/patterns/section-header/index.js +0 -2
- package/dist/patterns/section-header/index.js.map +0 -1
- package/dist/patterns/section-header/meta.d.ts.map +0 -1
- package/dist/patterns/section-header/meta.js.map +0 -1
- package/dist/patterns/section-header/types.d.ts +0 -9
- package/dist/patterns/section-header/types.d.ts.map +0 -1
- package/dist/patterns/section-header/types.js +0 -2
- package/dist/patterns/section-header/types.js.map +0 -1
- package/dist/patterns/selection/SelectableItem.d.ts.map +0 -1
- package/dist/patterns/selection/SelectableItem.js.map +0 -1
- package/dist/patterns/selection/SelectionProvider.d.ts.map +0 -1
- package/dist/patterns/selection/SelectionProvider.js.map +0 -1
- package/dist/patterns/selection/index.d.ts +0 -4
- package/dist/patterns/selection/index.d.ts.map +0 -1
- package/dist/patterns/selection/index.js +0 -3
- package/dist/patterns/selection/index.js.map +0 -1
- package/dist/patterns/selection/resolveSelectionNextIds.d.ts.map +0 -1
- package/dist/patterns/selection/resolveSelectionNextIds.js.map +0 -1
- package/dist/patterns/selection/types.d.ts.map +0 -1
- package/dist/patterns/selection/types.js +0 -2
- package/dist/patterns/selection/types.js.map +0 -1
- package/dist/patterns/switch-field/SwitchField.d.ts +0 -8
- package/dist/patterns/switch-field/SwitchField.d.ts.map +0 -1
- package/dist/patterns/switch-field/SwitchField.js +0 -13
- package/dist/patterns/switch-field/SwitchField.js.map +0 -1
- package/dist/patterns/switch-field/index.d.ts +0 -3
- package/dist/patterns/switch-field/index.d.ts.map +0 -1
- package/dist/patterns/switch-field/index.js +0 -3
- package/dist/patterns/switch-field/index.js.map +0 -1
- package/dist/patterns/switch-field/meta.d.ts +0 -9
- package/dist/patterns/switch-field/meta.d.ts.map +0 -1
- package/dist/patterns/switch-field/meta.js +0 -9
- package/dist/patterns/switch-field/meta.js.map +0 -1
- package/dist/patterns/switch-field/types.d.ts +0 -10
- package/dist/patterns/switch-field/types.d.ts.map +0 -1
- package/dist/patterns/switch-field/types.js +0 -2
- package/dist/patterns/switch-field/types.js.map +0 -1
- package/dist/patterns/theme-composer/ThemeComposer.d.ts +0 -9
- package/dist/patterns/theme-composer/ThemeComposer.d.ts.map +0 -1
- package/dist/patterns/theme-composer/ThemeComposer.js +0 -217
- package/dist/patterns/theme-composer/ThemeComposer.js.map +0 -1
- package/dist/patterns/theme-composer/index.d.ts +0 -3
- package/dist/patterns/theme-composer/index.d.ts.map +0 -1
- package/dist/patterns/theme-composer/index.js +0 -2
- package/dist/patterns/theme-composer/index.js.map +0 -1
- package/dist/patterns/theme-composer/meta.d.ts +0 -9
- package/dist/patterns/theme-composer/meta.d.ts.map +0 -1
- package/dist/patterns/theme-composer/meta.js +0 -9
- package/dist/patterns/theme-composer/meta.js.map +0 -1
- package/dist/patterns/theme-composer/types.d.ts +0 -12
- package/dist/patterns/theme-composer/types.d.ts.map +0 -1
- package/dist/patterns/theme-composer/types.js +0 -2
- package/dist/patterns/theme-composer/types.js.map +0 -1
- package/dist/patterns/timeline/Timeline.d.ts.map +0 -1
- package/dist/patterns/timeline/Timeline.js.map +0 -1
- package/dist/patterns/timeline/index.d.ts +0 -3
- package/dist/patterns/timeline/index.d.ts.map +0 -1
- package/dist/patterns/timeline/index.js +0 -2
- package/dist/patterns/timeline/index.js.map +0 -1
- package/dist/patterns/timeline/meta.d.ts.map +0 -1
- package/dist/patterns/timeline/types.d.ts.map +0 -1
- package/dist/patterns/timeline/types.js +0 -2
- package/dist/patterns/timeline/types.js.map +0 -1
- package/dist/patterns/tree-view/TreeItem.d.ts.map +0 -1
- package/dist/patterns/tree-view/TreeItem.js.map +0 -1
- package/dist/patterns/tree-view/TreeView.d.ts.map +0 -1
- package/dist/patterns/tree-view/TreeView.js.map +0 -1
- package/dist/patterns/tree-view/index.d.ts +0 -4
- package/dist/patterns/tree-view/index.d.ts.map +0 -1
- package/dist/patterns/tree-view/index.js +0 -4
- package/dist/patterns/tree-view/index.js.map +0 -1
- package/dist/patterns/tree-view/types.d.ts.map +0 -1
- package/dist/patterns/tree-view/types.js +0 -2
- package/dist/patterns/tree-view/types.js.map +0 -1
- package/src/patterns/chat-list-item/index.ts +0 -2
- package/src/patterns/chat-list-item/types.ts +0 -33
- package/src/patterns/collection-editor/index.ts +0 -2
- package/src/patterns/confirm-dialog/ConfirmDialog.tsx +0 -69
- package/src/patterns/confirm-dialog/index.ts +0 -2
- package/src/patterns/confirm-dialog/meta.ts +0 -10
- package/src/patterns/confirm-dialog/types.ts +0 -19
- package/src/patterns/filter-bar/FilterBar.tsx +0 -31
- package/src/patterns/filter-bar/index.ts +0 -2
- package/src/patterns/filter-bar/meta.ts +0 -10
- package/src/patterns/filter-bar/types.ts +0 -10
- package/src/patterns/inspector-field/InspectorField.tsx +0 -32
- package/src/patterns/inspector-field/index.ts +0 -2
- package/src/patterns/inspector-field/meta.ts +0 -10
- package/src/patterns/inspector-field/types.ts +0 -16
- package/src/patterns/message-bubble/index.ts +0 -8
- package/src/patterns/notice/Notice.tsx +0 -41
- package/src/patterns/notice/index.ts +0 -2
- package/src/patterns/notice/meta.ts +0 -36
- package/src/patterns/notice/types.ts +0 -12
- package/src/patterns/panel/Panel.tsx +0 -26
- package/src/patterns/panel/index.ts +0 -2
- package/src/patterns/panel/meta.ts +0 -51
- package/src/patterns/panel/themeRecipeMeta.ts +0 -32
- package/src/patterns/panel/types.ts +0 -17
- package/src/patterns/scanner/index.ts +0 -10
- package/src/patterns/section-header/index.ts +0 -2
- package/src/patterns/section-header/types.ts +0 -10
- package/src/patterns/selection/index.ts +0 -10
- package/src/patterns/switch-field/SwitchField.tsx +0 -42
- package/src/patterns/switch-field/index.ts +0 -2
- package/src/patterns/switch-field/meta.ts +0 -10
- package/src/patterns/switch-field/types.ts +0 -11
- package/src/patterns/theme-composer/ThemeComposer.test.ts +0 -212
- package/src/patterns/theme-composer/ThemeComposer.tsx +0 -321
- package/src/patterns/theme-composer/index.ts +0 -2
- package/src/patterns/theme-composer/meta.ts +0 -10
- package/src/patterns/theme-composer/types.ts +0 -13
- package/src/patterns/timeline/index.ts +0 -2
- package/src/patterns/tree-view/index.ts +0 -3
- /package/dist/{patterns → features}/collection-editor/meta.d.ts +0 -0
- /package/dist/{patterns → features}/collection-editor/meta.js +0 -0
- /package/dist/{patterns → features}/reader/meta.js +0 -0
- /package/dist/{patterns/reader → features/reader/utils}/resolveReaderProgress.d.ts +0 -0
- /package/dist/{patterns/reader → features/reader/utils}/resolveReaderProgress.js +0 -0
- /package/dist/{patterns → features}/scanner/meta.js +0 -0
- /package/dist/features/{layout → section}/screenSectionMeta.js +0 -0
- /package/dist/{patterns → features}/selection/meta.d.ts +0 -0
- /package/dist/{patterns → features}/selection/meta.js +0 -0
- /package/dist/{patterns/selection → features/selection/utils}/resolveSelectionNextIds.js +0 -0
- /package/dist/{patterns → features}/timeline/meta.d.ts +0 -0
- /package/dist/{patterns → features}/timeline/meta.js +0 -0
- /package/dist/{patterns → features}/tree-view/meta.d.ts +0 -0
- /package/dist/{patterns → features}/tree-view/meta.js +0 -0
- /package/src/{patterns/chat-list-item/meta.ts → features/chat/chatListItemMeta.ts} +0 -0
- /package/src/{patterns/message-bubble/meta.ts → features/chat/messageBubbleMeta.ts} +0 -0
- /package/src/{patterns → features}/collection-editor/meta.ts +0 -0
- /package/src/{patterns → features}/reader/meta.ts +0 -0
- /package/src/{patterns/reader → features/reader/utils}/resolveReaderProgress.test.ts +0 -0
- /package/src/{patterns/reader → features/reader/utils}/resolveReaderProgress.ts +0 -0
- /package/src/{patterns → features}/scanner/meta.ts +0 -0
- /package/src/features/{layout → section}/screenSectionMeta.ts +0 -0
- /package/src/{patterns/section-header/meta.ts → features/section/sectionHeaderMeta.ts} +0 -0
- /package/src/{patterns → features}/selection/meta.ts +0 -0
- /package/src/{patterns → features}/timeline/meta.ts +0 -0
- /package/src/{patterns → features}/tree-view/meta.ts +0 -0
- /package/src/{patterns/selection/types.ts → types/selection.ts} +0 -0
|
@@ -1 +1 @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,EAAE,aAAa;YACpB,OAAO,EAAE,KAAK;SACf;QACD,cAAc,EAAE;YACd,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,QAAQ;YAClB,KAAK,EAAE,sBAAsB;SAC9B;QACD,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,QAAQ;YAClB,KAAK,EAAE,kBAAkB;SAC1B;QACD,gBAAgB,EAAE;YAChB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,QAAQ;YAClB,KAAK,EAAE,wBAAwB;SAChC;QACD,cAAc,EAAE;YACd,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,QAAQ;YAClB,KAAK,EAAE,sBAAsB;SAC9B;QACD,gBAAgB,EAAE;YAChB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,QAAQ;YAClB,KAAK,EAAE,wBAAwB;SAChC;QACD,iBAAiB,EAAE;YACjB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,QAAQ;YAClB,KAAK,EAAE,yBAAyB;SACjC;QACD,kBAAkB,EAAE;YAClB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,QAAQ;YAClB,KAAK,EAAE,2BAA2B;SACnC;QACD,aAAa,EAAE;YACb,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,QAAQ;YAClB,KAAK,EAAE,qBAAqB;SAC7B;KACF;CACmC,CAAC","sourcesContent":["import type { ZoraComponentMeta } from '../../metadata';\nimport { CONTAINER_ALLOWED_CHILDREN } from '../../metadata/allowedChildren';\n\nconst EMPTY_EVENT_FIELDS = [] as const;\n\nexport const readerSurfaceMeta = {\n name: 'ReaderSurface',\n category: 'pattern',\n description:\n 'Adapter-neutral EPUB and PDF reader shell with controlled chrome, progress, and navigation events.',\n directManifestNode: true,\n requirements: {\n capabilities: [{ capability: 'ebookReader' }],\n },\n allowedChildren: [],\n blueprint: {\n label: 'Reader',\n defaultProps: {\n format: 'epub',\n status: 'idle',\n showChrome: true,\n readerColorScheme: 'system',\n fontScale: 1,\n lineHeight: 'normal',\n },\n },\n events: {\n previousPage: {\n label: 'Previous page',\n eventType: 'reader.previousPage',\n description: 'Requests navigation to the previous page.',\n payloadFields: EMPTY_EVENT_FIELDS,\n },\n nextPage: {\n label: 'Next page',\n eventType: 'reader.nextPage',\n description: 'Requests navigation to the next page.',\n payloadFields: EMPTY_EVENT_FIELDS,\n },\n locationChange: {\n label: 'Location change',\n eventType: 'reader.locationChange',\n description: 'Emitted by the adapter after the destination has been displayed.',\n payloadFields: [\n { path: 'format', type: 'string', label: 'Format' },\n { path: 'locator', type: 'string', label: 'Opaque locator' },\n { path: 'page', type: 'number', label: 'Page' },\n { path: 'pageCount', type: 'number', label: 'Page count' },\n { path: 'progression', type: 'number', label: 'Progression' },\n { path: 'chapterId', type: 'string', label: 'Chapter ID' },\n { path: 'chapterTitle', type: 'string', label: 'Chapter title' },\n { path: 'trigger', type: 'string', label: 'Navigation trigger' },\n ],\n },\n openContents: {\n label: 'Open contents',\n eventType: 'reader.openContents',\n description: 'Requests the app-owned table of contents.',\n payloadFields: EMPTY_EVENT_FIELDS,\n },\n openAppearance: {\n label: 'Open appearance',\n eventType: 'reader.openAppearance',\n description: 'Requests the app-owned reader appearance controls.',\n payloadFields: EMPTY_EVENT_FIELDS,\n },\n toggleHighlight: {\n label: 'Toggle highlight',\n eventType: 'reader.toggleHighlight',\n description: 'Requests the app-owned highlight action.',\n payloadFields: EMPTY_EVENT_FIELDS,\n },\n openExternalLink: {\n label: 'Open external link',\n eventType: 'reader.openExternalLink',\n description: 'Emitted when publication content requests an external URL.',\n payloadFields: [{ path: 'url', type: 'string', label: 'URL' }],\n },\n readerError: {\n label: 'Reader error',\n eventType: 'reader.error',\n description: 'Emitted when the adapter rejects or cannot load a document.',\n payloadFields: [\n { path: 'code', type: 'string', label: 'Error code' },\n { path: 'format', type: 'string', label: 'Format' },\n { path: 'message', type: 'string', label: 'Message' },\n ],\n },\n },\n slots: {\n viewport: {\n label: 'Reader viewport adapter',\n allowedChildren: [],\n },\n headerActions: {\n label: 'Header actions',\n allowedChildren: [...CONTAINER_ALLOWED_CHILDREN],\n },\n footerActions: {\n label: 'Footer actions',\n allowedChildren: [...CONTAINER_ALLOWED_CHILDREN],\n },\n },\n props: {\n source: {\n type: 'media',\n category: 'Document',\n label: 'Source',\n mediaKinds: ['file'],\n },\n format: {\n type: 'enum',\n category: 'Document',\n label: 'Format',\n enum: ['epub', 'pdf'],\n default: 'epub',\n },\n location: {\n type: 'string',\n category: 'State',\n label: 'Location',\n },\n status: {\n type: 'enum',\n category: 'State',\n label: 'Status',\n enum: ['idle', 'loading', 'ready', 'error'],\n default: 'idle',\n },\n page: {\n type: 'number',\n category: 'State',\n label: 'Page',\n },\n pageCount: {\n type: 'number',\n category: 'State',\n label: 'Page count',\n },\n progress: {\n type: 'number',\n category: 'State',\n label: 'Progress',\n },\n canGoPrevious: {\n type: 'boolean',\n category: 'State',\n label: 'Can go previous',\n },\n canGoNext: {\n type: 'boolean',\n category: 'State',\n label: 'Can go next',\n },\n title: {\n type: 'string',\n category: 'Content',\n label: 'Title',\n },\n subtitle: {\n type: 'string',\n category: 'Content',\n label: 'Subtitle',\n },\n chapterLabel: {\n type: 'string',\n category: 'Content',\n label: 'Chapter label',\n },\n pageLabel: {\n type: 'string',\n category: 'Content',\n label: 'Page label',\n },\n previousPageLabel: {\n type: 'string',\n category: 'Content',\n label: 'Previous page label',\n default: 'Previous page',\n },\n nextPageLabel: {\n type: 'string',\n category: 'Content',\n label: 'Next page label',\n default: 'Next page',\n },\n contentsLabel: {\n type: 'string',\n category: 'Content',\n label: 'Contents label',\n default: 'Table of contents',\n },\n appearanceLabel: {\n type: 'string',\n category: 'Content',\n label: 'Appearance label',\n default: 'Reading appearance',\n },\n highlightLabel: {\n type: 'string',\n category: 'Content',\n label: 'Highlight label',\n default: 'Toggle highlight',\n },\n loadingLabel: {\n type: 'string',\n category: 'Content',\n label: 'Loading label',\n default: 'Loading document…',\n },\n errorTitle: {\n type: 'string',\n category: 'Content',\n label: 'Error title',\n default: 'Unable to open this document.',\n },\n unavailableTitle: {\n type: 'string',\n category: 'Content',\n label: 'Unavailable title',\n default: 'Reader preview unavailable.',\n },\n showChrome: {\n type: 'boolean',\n category: 'Chrome',\n label: 'Show chrome',\n default: true,\n },\n readerColorScheme: {\n type: 'enum',\n category: 'Appearance',\n label: 'Color scheme',\n enum: ['system', 'light', 'dark', 'sepia'],\n default: 'system',\n },\n fontScale: {\n type: 'number',\n category: 'Appearance',\n label: 'Font scale',\n default: 1,\n },\n lineHeight: {\n type: 'enum',\n category: 'Appearance',\n label: 'Line height',\n enum: ['compact', 'normal', 'relaxed'],\n default: 'normal',\n },\n highlighted: {\n type: 'boolean',\n category: 'State',\n label: 'Highlighted',\n default: false,\n },\n onPreviousPage: {\n type: 'action',\n category: 'Events',\n label: 'Previous page action',\n },\n onNextPage: {\n type: 'action',\n category: 'Events',\n label: 'Next page action',\n },\n onLocationChange: {\n type: 'action',\n category: 'Events',\n label: 'Location change action',\n },\n onOpenContents: {\n type: 'action',\n category: 'Events',\n label: 'Open contents action',\n },\n onOpenAppearance: {\n type: 'action',\n category: 'Events',\n label: 'Open appearance action',\n },\n onToggleHighlight: {\n type: 'action',\n category: 'Events',\n label: 'Toggle highlight action',\n },\n onOpenExternalLink: {\n type: 'action',\n category: 'Events',\n label: 'Open external link action',\n },\n onReaderError: {\n type: 'action',\n category: 'Events',\n label: 'Reader error action',\n },\n },\n} as const satisfies ZoraComponentMeta;\n"]}
|
|
1
|
+
{"version":3,"file":"meta.js","sourceRoot":"","sources":["../../../src/features/reader/meta.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAE5E,MAAM,kBAAkB,GAAG,EAAW,CAAC;AAEvC,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,IAAI,EAAE,eAAe;IACrB,QAAQ,EAAE,SAAS;IACnB,WAAW,EACT,oGAAoG;IACtG,kB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E,QAAQ;YAClB,KAAK,EAAE,wBAAwB;SAChC;QACD,cAAc,EAAE;YACd,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,QAAQ;YAClB,KAAK,EAAE,sBAAsB;SAC9B;QACD,gBAAgB,EAAE;YAChB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,QAAQ;YAClB,KAAK,EAAE,wBAAwB;SAChC;QACD,iBAAiB,EAAE;YACjB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,QAAQ;YAClB,KAAK,EAAE,yBAAyB;SACjC;QACD,kBAAkB,EAAE;YAClB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,QAAQ;YAClB,KAAK,EAAE,2BAA2B;SACnC;QACD,aAAa,EAAE;YACb,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,QAAQ;YAClB,KAAK,EAAE,qBAAqB;SAC7B;KACF;CACmC,CAAC","sourcesContent":["import type { ZoraComponentMeta } from '../../metadata';\nimport { CONTAINER_ALLOWED_CHILDREN } from '../../metadata/allowedChildren';\n\nconst EMPTY_EVENT_FIELDS = [] as const;\n\nexport const readerSurfaceMeta = {\n name: 'ReaderSurface',\n category: 'pattern',\n description:\n 'Adapter-neutral EPUB and PDF reader shell with controlled chrome, progress, and navigation events.',\n directManifestNode: true,\n requirements: {\n capabilities: [{ capability: 'ebookReader' }],\n },\n allowedChildren: [],\n blueprint: {\n label: 'Reader',\n defaultProps: {\n format: 'epub',\n status: 'idle',\n showChrome: true,\n readerColorScheme: 'system',\n fontScale: 1,\n lineHeight: 'normal',\n },\n },\n events: {\n previousPage: {\n label: 'Previous page',\n eventType: 'reader.previousPage',\n description: 'Requests navigation to the previous page.',\n payloadFields: EMPTY_EVENT_FIELDS,\n },\n nextPage: {\n label: 'Next page',\n eventType: 'reader.nextPage',\n description: 'Requests navigation to the next page.',\n payloadFields: EMPTY_EVENT_FIELDS,\n },\n locationChange: {\n label: 'Location change',\n eventType: 'reader.locationChange',\n description: 'Emitted by the adapter after the destination has been displayed.',\n payloadFields: [\n { path: 'format', type: 'string', label: 'Format' },\n { path: 'locator', type: 'string', label: 'Opaque locator' },\n { path: 'page', type: 'number', label: 'Page' },\n { path: 'pageCount', type: 'number', label: 'Page count' },\n { path: 'progression', type: 'number', label: 'Progression' },\n { path: 'chapterId', type: 'string', label: 'Chapter ID' },\n { path: 'chapterTitle', type: 'string', label: 'Chapter title' },\n { path: 'trigger', type: 'string', label: 'Navigation trigger' },\n ],\n },\n openContents: {\n label: 'Open contents',\n eventType: 'reader.openContents',\n description: 'Requests the app-owned table of contents.',\n payloadFields: EMPTY_EVENT_FIELDS,\n },\n openAppearance: {\n label: 'Open appearance',\n eventType: 'reader.openAppearance',\n description: 'Requests the app-owned reader appearance controls.',\n payloadFields: EMPTY_EVENT_FIELDS,\n },\n toggleHighlight: {\n label: 'Toggle highlight',\n eventType: 'reader.toggleHighlight',\n description: 'Requests the app-owned highlight action.',\n payloadFields: EMPTY_EVENT_FIELDS,\n },\n openExternalLink: {\n label: 'Open external link',\n eventType: 'reader.openExternalLink',\n description: 'Emitted when publication content requests an external URL.',\n payloadFields: [{ path: 'url', type: 'string', label: 'URL' }],\n },\n readerError: {\n label: 'Reader error',\n eventType: 'reader.error',\n description: 'Emitted when the adapter rejects or cannot load a document.',\n payloadFields: [\n { path: 'code', type: 'string', label: 'Error code' },\n { path: 'format', type: 'string', label: 'Format' },\n { path: 'message', type: 'string', label: 'Message' },\n ],\n },\n },\n slots: {\n viewport: {\n label: 'Reader viewport adapter',\n allowedChildren: [],\n },\n headerActions: {\n label: 'Header actions',\n allowedChildren: [...CONTAINER_ALLOWED_CHILDREN],\n },\n footerActions: {\n label: 'Footer actions',\n allowedChildren: [...CONTAINER_ALLOWED_CHILDREN],\n },\n },\n props: {\n source: {\n type: 'media',\n category: 'Document',\n label: 'Source',\n mediaKinds: ['file'],\n },\n format: {\n type: 'enum',\n category: 'Document',\n label: 'Format',\n enum: ['epub', 'pdf'],\n default: 'epub',\n },\n location: {\n type: 'string',\n category: 'State',\n label: 'Location',\n },\n status: {\n type: 'enum',\n category: 'State',\n label: 'Status',\n enum: ['idle', 'loading', 'ready', 'error'],\n default: 'idle',\n },\n page: {\n type: 'number',\n category: 'State',\n label: 'Page',\n },\n pageCount: {\n type: 'number',\n category: 'State',\n label: 'Page count',\n },\n progress: {\n type: 'number',\n category: 'State',\n label: 'Progress',\n },\n canGoPrevious: {\n type: 'boolean',\n category: 'State',\n label: 'Can go previous',\n },\n canGoNext: {\n type: 'boolean',\n category: 'State',\n label: 'Can go next',\n },\n title: {\n type: 'string',\n category: 'Content',\n label: 'Title',\n },\n subtitle: {\n type: 'string',\n category: 'Content',\n label: 'Subtitle',\n },\n chapterLabel: {\n type: 'string',\n category: 'Content',\n label: 'Chapter label',\n },\n pageLabel: {\n type: 'string',\n category: 'Content',\n label: 'Page label',\n },\n previousPageLabel: {\n type: 'string',\n category: 'Content',\n label: 'Previous page label',\n default: 'Previous page',\n },\n nextPageLabel: {\n type: 'string',\n category: 'Content',\n label: 'Next page label',\n default: 'Next page',\n },\n contentsLabel: {\n type: 'string',\n category: 'Content',\n label: 'Contents label',\n default: 'Table of contents',\n },\n appearanceLabel: {\n type: 'string',\n category: 'Content',\n label: 'Appearance label',\n default: 'Reading appearance',\n },\n highlightLabel: {\n type: 'string',\n category: 'Content',\n label: 'Highlight label',\n default: 'Toggle highlight',\n },\n loadingLabel: {\n type: 'string',\n category: 'Content',\n label: 'Loading label',\n default: 'Loading document…',\n },\n errorTitle: {\n type: 'string',\n category: 'Content',\n label: 'Error title',\n default: 'Unable to open this document.',\n },\n unavailableTitle: {\n type: 'string',\n category: 'Content',\n label: 'Unavailable title',\n default: 'Reader preview unavailable.',\n },\n showChrome: {\n type: 'boolean',\n category: 'Chrome',\n label: 'Show chrome',\n default: true,\n },\n readerColorScheme: {\n type: 'enum',\n category: 'Appearance',\n label: 'Color scheme',\n enum: ['system', 'light', 'dark', 'sepia'],\n default: 'system',\n },\n fontScale: {\n type: 'number',\n category: 'Appearance',\n label: 'Font scale',\n default: 1,\n },\n lineHeight: {\n type: 'enum',\n category: 'Appearance',\n label: 'Line height',\n enum: ['compact', 'normal', 'relaxed'],\n default: 'normal',\n },\n highlighted: {\n type: 'boolean',\n category: 'State',\n label: 'Highlighted',\n default: false,\n },\n onPreviousPage: {\n type: 'action',\n category: 'Events',\n label: 'Previous page action',\n },\n onNextPage: {\n type: 'action',\n category: 'Events',\n label: 'Next page action',\n },\n onLocationChange: {\n type: 'action',\n category: 'Events',\n label: 'Location change action',\n },\n onOpenContents: {\n type: 'action',\n category: 'Events',\n label: 'Open contents action',\n },\n onOpenAppearance: {\n type: 'action',\n category: 'Events',\n label: 'Open appearance action',\n },\n onToggleHighlight: {\n type: 'action',\n category: 'Events',\n label: 'Toggle highlight action',\n },\n onOpenExternalLink: {\n type: 'action',\n category: 'Events',\n label: 'Open external link action',\n },\n onReaderError: {\n type: 'action',\n category: 'Events',\n label: 'Reader error action',\n },\n },\n} as const satisfies ZoraComponentMeta;\n"]}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export type { ReaderColorScheme, ReaderDocumentFormat, ReaderErrorCode, ReaderErrorEvent, ReaderExternalLinkEvent, ReaderLineHeight, ReaderLocationChangeEvent, ReaderNavigationTrigger, ReaderResolvedSource, ReaderStatus, ReaderSurfaceProps, } from '../../types/reader';
|
|
2
|
+
export { ReaderSurface } from './adapters/inbound/ReaderSurface';
|
|
3
|
+
export { resolveReaderProgress } from './utils/resolveReaderProgress';
|
|
4
|
+
//# sourceMappingURL=public.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/features/reader/public.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,iBAAiB,EACjB,oBAAoB,EACpB,eAAe,EACf,gBAAgB,EAChB,uBAAuB,EACvB,gBAAgB,EAChB,yBAAyB,EACzB,uBAAuB,EACvB,oBAAoB,EACpB,YAAY,EACZ,kBAAkB,GACnB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public.js","sourceRoot":"","sources":["../../../src/features/reader/public.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC","sourcesContent":["export type {\n ReaderColorScheme,\n ReaderDocumentFormat,\n ReaderErrorCode,\n ReaderErrorEvent,\n ReaderExternalLinkEvent,\n ReaderLineHeight,\n ReaderLocationChangeEvent,\n ReaderNavigationTrigger,\n ReaderResolvedSource,\n ReaderStatus,\n ReaderSurfaceProps,\n} from '../../types/reader';\nexport { ReaderSurface } from './adapters/inbound/ReaderSurface';\nexport { resolveReaderProgress } from './utils/resolveReaderProgress';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveReaderProgress.d.ts","sourceRoot":"","sources":["../../../../src/features/reader/utils/resolveReaderProgress.ts"],"names":[],"mappings":"AAAA,wBAAgB,qBAAqB,CAAC,EACpC,QAAQ,EACR,IAAI,EACJ,SAAS,GACV,EAAE;IACD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,MAAM,CAoBT"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveReaderProgress.js","sourceRoot":"","sources":["../../../../src/features/reader/utils/resolveReaderProgress.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,qBAAqB,CAAC,EACpC,QAAQ,EACR,IAAI,EACJ,SAAS,GAKV;IACC,IAAI,QAAQ,KAAK,SAAS,IAAI,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;QACxD,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC;IAC5C,CAAC;IAED,IACE,IAAI,KAAK,SAAS;QAClB,SAAS,KAAK,SAAS;QACvB,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC;QACtB,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC;QAC3B,SAAS,GAAG,CAAC,EACb,CAAC;QACD,OAAO,CAAC,CAAC;IACX,CAAC;IAED,IAAI,SAAS,KAAK,CAAC,EAAE,CAAC;QACpB,OAAO,CAAC,CAAC;IACX,CAAC;IAED,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AAChE,CAAC","sourcesContent":["export function resolveReaderProgress({\n progress,\n page,\n pageCount,\n}: {\n progress?: number;\n page?: number;\n pageCount?: number;\n}): number {\n if (progress !== undefined && Number.isFinite(progress)) {\n return Math.min(1, Math.max(0, progress));\n }\n\n if (\n page === undefined ||\n pageCount === undefined ||\n !Number.isFinite(page) ||\n !Number.isFinite(pageCount) ||\n pageCount < 1\n ) {\n return 0;\n }\n\n if (pageCount === 1) {\n return 1;\n }\n\n return Math.min(1, Math.max(0, (page - 1) / (pageCount - 1)));\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BarcodeScannerView.d.ts","sourceRoot":"","sources":["../../../../../src/features/scanner/adapters/inbound/BarcodeScannerView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAqHzE;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,+DAA8C,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { StyleSheet } from 'react-native';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
3
|
+
import { useZoraTheme } from '../../../../theme/useZoraTheme';
|
|
4
|
+
import { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';
|
|
5
|
+
import { Card } from '../../../card/public';
|
|
6
|
+
import { View } from '../../../layout/public';
|
|
7
|
+
import { Text } from '../../../typography/public';
|
|
8
8
|
import { CameraPermissionView } from './CameraPermissionView';
|
|
9
9
|
import { ScanOverlay } from './ScanOverlay';
|
|
10
10
|
function BarcodeScannerViewInner({ themeId: _themeId, interactionPolicy, mode: _mode, permissionStatus, camera, children, title = 'Scan barcode', description = 'Point the camera at a barcode to continue.', overlayTitle, overlayDescription, cornerLabel, requestPermissionLabel, deniedPermissionLabel, manualEntryLabel, onRequestPermission, onManualEntry, testID, }) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BarcodeScannerView.js","sourceRoot":"","sources":["../../../../../src/features/scanner/adapters/inbound/BarcodeScannerView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAE1E,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,SAAS,u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ACV,MAAM,EAAE,CAAC;QACT,IAAI,EAAE,CAAC;QACP,QAAQ,EAAE,UAAU;QACpB,KAAK,EAAE,CAAC;QACR,GAAG,EAAE,CAAC;KACP;IACD,WAAW,EAAE;QACX,MAAM,EAAE,CAAC;QACT,IAAI,EAAE,CAAC;QACP,QAAQ,EAAE,UAAU;QACpB,KAAK,EAAE,CAAC;QACR,GAAG,EAAE,CAAC;KACP;IACD,OAAO,EAAE;QACP,MAAM,EAAE,EAAE;QACV,IAAI,EAAE,EAAE;QACR,QAAQ,EAAE,UAAU;QACpB,KAAK,EAAE,EAAE;QACT,GAAG,EAAE,EAAE;KACR;CACF,CAAC,CAAC;AAEH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,kBAAkB,CAAC,uBAAuB,CAAC,CAAC","sourcesContent":["import React from 'react';\nimport { StyleSheet } from 'react-native';\n\nimport { useZoraTheme } from '../../../../theme/useZoraTheme';\nimport { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';\nimport type { BarcodeScannerViewProps } from '../../../../types/scanner';\nimport { Card } from '../../../card/public';\nimport { View } from '../../../layout/public';\nimport { Text } from '../../../typography/public';\nimport { CameraPermissionView } from './CameraPermissionView';\nimport { ScanOverlay } from './ScanOverlay';\n\nfunction BarcodeScannerViewInner({\n themeId: _themeId,\n interactionPolicy,\n mode: _mode,\n permissionStatus,\n camera,\n children,\n title = 'Scan barcode',\n description = 'Point the camera at a barcode to continue.',\n overlayTitle,\n overlayDescription,\n cornerLabel,\n requestPermissionLabel,\n deniedPermissionLabel,\n manualEntryLabel,\n onRequestPermission,\n onManualEntry,\n testID,\n}: BarcodeScannerViewProps) {\n const { theme } = useZoraTheme();\n const viewportStyle = {\n backgroundColor: theme.semantics.surface.default,\n };\n const placeholderStyle = {\n backgroundColor: theme.semantics.surface.default,\n };\n\n if (permissionStatus !== 'granted') {\n return (\n <CameraPermissionView\n deniedLabel={deniedPermissionLabel}\n manualEntryLabel={manualEntryLabel}\n onManualEntry={onManualEntry}\n onRequestPermission={onRequestPermission}\n requestLabel={requestPermissionLabel}\n status={permissionStatus}\n testID={testID}\n interactionPolicy={interactionPolicy}\n />\n );\n }\n\n return (\n <Card\n compact\n description={description}\n eyebrow=\"Scanner\"\n interactionPolicy={interactionPolicy}\n testID={testID}\n title={title}\n tone=\"subtle\"\n >\n <View gap=\"m\">\n <View>\n <View style={[styles.viewport, viewportStyle]}>\n {camera ? (\n <View style={styles.cameraSlot}>{camera}</View>\n ) : (\n <View style={[styles.placeholder, placeholderStyle]} />\n )}\n <View style={[styles.overlay, { pointerEvents: 'none' }]}>\n <ScanOverlay\n cornerLabel={cornerLabel}\n description={overlayDescription}\n title={overlayTitle}\n />\n </View>\n </View>\n </View>\n {children ? <View>{children}</View> : null}\n <Text emphasis=\"muted\" variant=\"caption\">\n Native scanning belongs to an app adapter such as expo-camera. ZORA owns this visible\n scanner surface.\n </Text>\n </View>\n </Card>\n );\n}\n\nconst styles = StyleSheet.create({\n viewport: {\n aspectRatio: 0.72,\n borderRadius: 28,\n minHeight: 360,\n overflow: 'hidden',\n position: 'relative',\n },\n cameraSlot: {\n bottom: 0,\n left: 0,\n position: 'absolute',\n right: 0,\n top: 0,\n },\n placeholder: {\n bottom: 0,\n left: 0,\n position: 'absolute',\n right: 0,\n top: 0,\n },\n overlay: {\n bottom: 24,\n left: 24,\n position: 'absolute',\n right: 24,\n top: 24,\n },\n});\n\n/***\n * Composed ZORA scanner shell for barcode scanning experiences.\n *\n * `BarcodeScannerView` is camera-adapter-neutral: pass an `expo-camera`, web,\n * or test camera element through `camera`; keep permission and fallback UI here.\n *\n */\nexport const BarcodeScannerView = withZoraThemeScope(BarcodeScannerViewInner);\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CameraPermissionView.d.ts","sourceRoot":"","sources":["../../../../../src/features/scanner/adapters/inbound/CameraPermissionView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAqG3E;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,iEAAgD,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
2
|
+
import { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';
|
|
3
|
+
import { Button } from '../../../button/public';
|
|
4
|
+
import { Card } from '../../../card/public';
|
|
5
|
+
import { View } from '../../../layout/public';
|
|
6
|
+
import { Text } from '../../../typography/public';
|
|
7
7
|
function resolvePermissionCopy(status) {
|
|
8
8
|
if (status === 'denied') {
|
|
9
9
|
return {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CameraPermissionView.js","sourceRoot":"","sources":["../../../../../src/features/scanner/adapters/inbound/CameraPermissionView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAE1E,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAElD,SAAS,qBAAqB,CAAC,MAA2C;IACxE,IAAI,MAAM,KAAK,QAAQ,EAAE,CAAC;QACxB,OAAO;YACL,KAAK,EAAE,0BAA0B;YACjC,WAAW,EACT,iGAAiG;SACpG,CAAC;IACJ,CAAC;IAED,IAAI,MAAM,KAAK,YAAY,EAAE,CAAC;QAC5B,OAAO;YACL,KAAK,EAAE,0BAA0B;YACjC,WAAW,EAAE,2CAA2C;SACzD,CAAC;IACJ,CAAC;IAED,OAAO;QACL,KAAK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;QAAA,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,CACrD;UAAA,CAAC,uBAAuB,CAAC,CAAC,CAAC,CACzB,CAAC,MAAM,CACL,KAAK,CAAC,SAAS,CACf,QAAQ,CAAC,CAAC,MAAM,KAAK,YAAY,CAAC,CAClC,OAAO,CAAC,CAAC,uBAAuB,CAAC,CACjC,IAAI,kBAAkB,CAAC,CACvB,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CAErC;cAAA,CAAC,YAAY,CACf;YAAA,EAAE,MAAM,CAAC,CACV,CAAC,CAAC,CAAC,IAAI,CACR;UAAA,CAAC,iBAAiB,CAAC,CAAC,CAAC,CACnB,CAAC,MAAM,CACL,KAAK,CAAC,SAAS,CACf,OAAO,CAAC,CAAC,iBAAiB,CAAC,CAC3B,OAAO,CAAC,MAAM,CACd,IAAI,sBAAsB,CAAC,CAC3B,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CAErC;cAAA,CAAC,gBAAgB,CACnB;YAAA,EAAE,MAAM,CAAC,CACV,CAAC,CAAC,CAAC,IAAI,CACV;QAAA,EAAE,IAAI,CACR;MAAA,EAAE,IAAI,CACR;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,kBAAkB,CAAC,yBAAyB,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';\nimport type { CameraPermissionViewProps } from '../../../../types/scanner';\nimport { Button } from '../../../button/public';\nimport { Card } from '../../../card/public';\nimport { View } from '../../../layout/public';\nimport { Text } from '../../../typography/public';\n\nfunction resolvePermissionCopy(status: CameraPermissionViewProps['status']) {\n if (status === 'denied') {\n return {\n title: 'Camera permission needed',\n description:\n 'Camera access is denied. Enable camera access in system settings or enter the barcode manually.',\n };\n }\n\n if (status === 'requesting') {\n return {\n title: 'Requesting camera access',\n description: 'Waiting for the system permission prompt.',\n };\n }\n\n return {\n title: 'Allow camera access',\n description:\n 'Camera access is required to scan barcodes. You can also enter the barcode manually.',\n };\n}\n\nfunction CameraPermissionViewInner({\n themeId: _themeId,\n interactionPolicy,\n mode: _mode,\n status,\n title,\n description,\n requestLabel = 'Allow camera access',\n deniedLabel = 'Open settings',\n manualEntryLabel = 'Enter barcode manually',\n onRequestPermission,\n onManualEntry,\n requestButtonProps,\n manualEntryButtonProps,\n testID,\n}: CameraPermissionViewProps) {\n const copy = resolvePermissionCopy(status);\n const primaryLabel = status === 'denied' ? deniedLabel : requestLabel;\n const handleRequestPermission = onRequestPermission\n ? () => {\n void onRequestPermission();\n }\n : undefined;\n const handleManualEntry = onManualEntry\n ? () => {\n void onManualEntry();\n }\n : undefined;\n\n return (\n <Card\n compact\n description={description ?? copy.description}\n eyebrow=\"Scanner permission\"\n interactionPolicy={interactionPolicy}\n testID={testID}\n title={title ?? copy.title}\n tone=\"subtle\"\n >\n <View gap=\"m\">\n <Text emphasis=\"muted\" variant=\"bodySmall\">\n Permission state: {status}\n </Text>\n <View direction={{ base: 'column', md: 'row' }} gap=\"s\">\n {handleRequestPermission ? (\n <Button\n color=\"primary\"\n disabled={status === 'requesting'}\n onPress={handleRequestPermission}\n {...requestButtonProps}\n interactionPolicy={interactionPolicy}\n >\n {primaryLabel}\n </Button>\n ) : null}\n {handleManualEntry ? (\n <Button\n color=\"neutral\"\n onPress={handleManualEntry}\n variant=\"soft\"\n {...manualEntryButtonProps}\n interactionPolicy={interactionPolicy}\n >\n {manualEntryLabel}\n </Button>\n ) : null}\n </View>\n </View>\n </Card>\n );\n}\n\n/***\n * ZORA-owned camera permission state for scanner flows.\n *\n * Native permission APIs stay in app adapters. This component renders the\n * request, denied, requesting, and manual-entry surfaces consistently.\n *\n */\nexport const CameraPermissionView = withZoraThemeScope(CameraPermissionViewInner);\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScanOverlay.d.ts","sourceRoot":"","sources":["../../../../../src/features/scanner/adapters/inbound/ScanOverlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAuFlE;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,wDAAuC,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { StyleSheet } from 'react-native';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
3
|
+
import { useZoraTheme } from '../../../../theme/useZoraTheme';
|
|
4
|
+
import { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';
|
|
5
|
+
import { Badge } from '../../../badge/public';
|
|
6
|
+
import { View } from '../../../layout/public';
|
|
7
|
+
import { Text } from '../../../typography/public';
|
|
8
8
|
function ScanOverlayInner({ themeId: _themeId, interactionPolicy: _interactionPolicy, mode: _mode, title = 'Align the barcode', description = 'Hold the barcode inside the frame. Scanning starts automatically.', cornerLabel = 'SCAN', testID, }) {
|
|
9
9
|
const { theme } = useZoraTheme();
|
|
10
10
|
const frameStyle = {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScanOverlay.js","sourceRoot":"","sources":["../../../../../src/features/scanner/adapters/inbound/ScanOverlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAE1E,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,M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E;QACV,IAAI,EAAE,EAAE;KACT;IACD,WAAW,EAAE;QACX,iBAAiB,EAAE,CAAC;QACpB,gBAAgB,EAAE,CAAC;QACnB,MAAM,EAAE,EAAE;QACV,KAAK,EAAE,EAAE;KACV;CACF,CAAC,CAAC;AAEH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,kBAAkB,CAAC,gBAAgB,CAAC,CAAC","sourcesContent":["import React from 'react';\nimport { StyleSheet } from 'react-native';\n\nimport { useZoraTheme } from '../../../../theme/useZoraTheme';\nimport { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';\nimport type { ScanOverlayProps } from '../../../../types/scanner';\nimport { Badge } from '../../../badge/public';\nimport { View } from '../../../layout/public';\nimport { Text } from '../../../typography/public';\n\nfunction ScanOverlayInner({\n themeId: _themeId,\n interactionPolicy: _interactionPolicy,\n mode: _mode,\n title = 'Align the barcode',\n description = 'Hold the barcode inside the frame. Scanning starts automatically.',\n cornerLabel = 'SCAN',\n testID,\n}: ScanOverlayProps) {\n const { theme } = useZoraTheme();\n const frameStyle = {\n borderColor: theme.semantics.border.default,\n };\n const cornerStyle = {\n borderColor: theme.semantics.border.focus,\n };\n\n return (\n <View testID={testID}>\n <View gap=\"m\">\n <View accessibilityRole=\"image\" style={[styles.frame, frameStyle]}>\n <View style={[styles.corner, styles.topLeft, cornerStyle]} />\n <View style={[styles.corner, styles.topRight, cornerStyle]} />\n <View style={[styles.corner, styles.bottomLeft, cornerStyle]} />\n <View style={[styles.corner, styles.bottomRight, cornerStyle]} />\n <Badge color=\"primary\">{cornerLabel}</Badge>\n </View>\n <View gap=\"xs\">\n <Text align=\"center\" variant=\"label\" weight=\"semiBold\">\n {title}\n </Text>\n <Text align=\"center\" emphasis=\"muted\" variant=\"bodySmall\">\n {description}\n </Text>\n </View>\n </View>\n </View>\n );\n}\n\nconst styles = StyleSheet.create({\n frame: {\n alignItems: 'center',\n aspectRatio: 1.55,\n borderRadius: 28,\n borderWidth: 1,\n justifyContent: 'center',\n minHeight: 180,\n overflow: 'hidden',\n position: 'relative',\n },\n corner: {\n height: 34,\n position: 'absolute',\n width: 34,\n },\n topLeft: {\n borderLeftWidth: 4,\n borderTopWidth: 4,\n left: 18,\n top: 18,\n },\n topRight: {\n borderRightWidth: 4,\n borderTopWidth: 4,\n right: 18,\n top: 18,\n },\n bottomLeft: {\n borderBottomWidth: 4,\n borderLeftWidth: 4,\n bottom: 18,\n left: 18,\n },\n bottomRight: {\n borderBottomWidth: 4,\n borderRightWidth: 4,\n bottom: 18,\n right: 18,\n },\n});\n\n/***\n * Camera-agnostic scan frame overlay for barcode and QR scanning flows.\n *\n * `ScanOverlay` intentionally renders no native camera. Apps provide camera\n * capability separately while ZORA owns the visible scan affordance.\n *\n */\nexport const ScanOverlay = withZoraThemeScope(ScanOverlayInner);\n"]}
|
|
@@ -105,7 +105,7 @@ export declare const barcodeScannerViewMeta: {
|
|
|
105
105
|
readonly category: "pattern";
|
|
106
106
|
readonly description: "Composed scanner shell with permission, camera slot, scan overlay, and manual entry affordance.";
|
|
107
107
|
readonly directManifestNode: true;
|
|
108
|
-
readonly allowedChildren: readonly ["ActivityIndicator", "ForgotPasswordForm", "OAuthProviderButton", "OAuthProviderList", "OtpForm", "SignInForm", "SignUpForm", "Accordion", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "DatePicker", "Dialog", "Pagination", "Rating", "SearchInput", "Tabs", "Toolbar", "Skeleton", "SkeletonCard", "SkeletonList", "SkeletonText", "IconButton", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "View", "ScrollView", "Grid", "Gradient", "Divider", "Text", "Heading", "Icon", "Image", "Hero", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "TimePicker", "Form", "Card", "
|
|
108
|
+
readonly allowedChildren: readonly ["ActivityIndicator", "ForgotPasswordForm", "OAuthProviderButton", "OAuthProviderList", "OtpForm", "SignInForm", "SignUpForm", "Accordion", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "DatePicker", "Dialog", "Pagination", "Rating", "SearchInput", "Tabs", "Toolbar", "Skeleton", "SkeletonCard", "SkeletonList", "SkeletonText", "IconButton", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "View", "ScrollView", "Grid", "Gradient", "Divider", "Text", "Heading", "Icon", "Image", "Hero", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "TimePicker", "Form", "Card", "EmptyState", "SectionHeader", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
|
|
109
109
|
readonly requirements: {
|
|
110
110
|
readonly permissions: readonly [{
|
|
111
111
|
readonly permission: "camera";
|
|
@@ -145,7 +145,7 @@ export declare const barcodeScannerViewMeta: {
|
|
|
145
145
|
};
|
|
146
146
|
readonly children: {
|
|
147
147
|
readonly label: "Scanner footer";
|
|
148
|
-
readonly allowedChildren: readonly ["ActivityIndicator", "ForgotPasswordForm", "OAuthProviderButton", "OAuthProviderList", "OtpForm", "SignInForm", "SignUpForm", "Accordion", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "DatePicker", "Dialog", "Pagination", "Rating", "SearchInput", "Tabs", "Toolbar", "Skeleton", "SkeletonCard", "SkeletonList", "SkeletonText", "IconButton", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "View", "ScrollView", "Grid", "Gradient", "Divider", "Text", "Heading", "Icon", "Image", "Hero", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "TimePicker", "Form", "Card", "
|
|
148
|
+
readonly allowedChildren: readonly ["ActivityIndicator", "ForgotPasswordForm", "OAuthProviderButton", "OAuthProviderList", "OtpForm", "SignInForm", "SignUpForm", "Accordion", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "DatePicker", "Dialog", "Pagination", "Rating", "SearchInput", "Tabs", "Toolbar", "Skeleton", "SkeletonCard", "SkeletonList", "SkeletonText", "IconButton", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "View", "ScrollView", "Grid", "Gradient", "Divider", "Text", "Heading", "Icon", "Image", "Hero", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "TimePicker", "Form", "Card", "EmptyState", "SectionHeader", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
|
|
149
149
|
};
|
|
150
150
|
};
|
|
151
151
|
readonly props: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/
|
|
1
|
+
{"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/features/scanner/meta.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkCU,CAAC;AAEvC,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgEC,CAAC;AAEvC,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2FG,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meta.js","sourceRoot":"","sources":["../../../src/
|
|
1
|
+
{"version":3,"file":"meta.js","sourceRoot":"","sources":["../../../src/features/scanner/meta.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAE5E,MAAM,CAAC,MAAM,eAAe,GAAG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BAAqB;SAC7B;QACD,sBAAsB,EAAE;YACtB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,SAAS;YACnB,KAAK,EAAE,0BAA0B;SAClC;QACD,gBAAgB,EAAE;YAChB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,SAAS;YACnB,KAAK,EAAE,oBAAoB;SAC5B;QACD,mBAAmB,EAAE;YACnB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,QAAQ;YAClB,KAAK,EAAE,2BAA2B;SACnC;QACD,aAAa,EAAE;YACb,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,QAAQ;YAClB,KAAK,EAAE,qBAAqB;SAC7B;KACF;CACmC,CAAC","sourcesContent":["import type { ZoraComponentMeta } from '../../metadata';\nimport { CONTAINER_ALLOWED_CHILDREN } from '../../metadata/allowedChildren';\n\nexport const scanOverlayMeta = {\n name: 'ScanOverlay',\n category: 'pattern',\n description: 'Camera-agnostic scan frame overlay for barcode and QR scanning flows.',\n directManifestNode: true,\n allowedChildren: [],\n blueprint: {\n label: 'Scan overlay',\n defaultProps: {\n title: 'Align the barcode',\n description: 'Hold the barcode inside the frame. Scanning starts automatically.',\n cornerLabel: 'SCAN',\n },\n },\n props: {\n title: {\n type: 'string',\n category: 'Content',\n label: 'Title',\n default: 'Align the barcode',\n },\n description: {\n type: 'string',\n category: 'Content',\n label: 'Description',\n default: 'Hold the barcode inside the frame. Scanning starts automatically.',\n },\n cornerLabel: {\n type: 'string',\n category: 'Content',\n label: 'Corner label',\n default: 'SCAN',\n },\n },\n} as const satisfies ZoraComponentMeta;\n\nexport const cameraPermissionViewMeta = {\n name: 'CameraPermissionView',\n category: 'pattern',\n description: 'ZORA-owned camera permission state for scanner flows.',\n directManifestNode: true,\n allowedChildren: [],\n requirements: {\n permissions: [{ permission: 'camera' }],\n },\n blueprint: {\n label: 'Camera permission',\n defaultProps: {\n status: 'unknown',\n requestLabel: 'Allow camera access',\n manualEntryLabel: 'Enter barcode manually',\n },\n },\n props: {\n status: {\n type: 'enum',\n category: 'State',\n label: 'Permission status',\n enum: ['unknown', 'requesting', 'denied'],\n default: 'unknown',\n },\n title: {\n type: 'string',\n category: 'Content',\n label: 'Title',\n },\n description: {\n type: 'string',\n category: 'Content',\n label: 'Description',\n },\n requestLabel: {\n type: 'string',\n category: 'Content',\n label: 'Request label',\n default: 'Allow camera access',\n },\n deniedLabel: {\n type: 'string',\n category: 'Content',\n label: 'Denied label',\n default: 'Open settings',\n },\n manualEntryLabel: {\n type: 'string',\n category: 'Content',\n label: 'Manual entry label',\n default: 'Enter barcode manually',\n },\n onRequestPermission: {\n type: 'action',\n category: 'Events',\n label: 'Request permission action',\n },\n onManualEntry: {\n type: 'action',\n category: 'Events',\n label: 'Manual entry action',\n },\n },\n} as const satisfies ZoraComponentMeta;\n\nexport const barcodeScannerViewMeta = {\n name: 'BarcodeScannerView',\n category: 'pattern',\n description:\n 'Composed scanner shell with permission, camera slot, scan overlay, and manual entry affordance.',\n directManifestNode: true,\n allowedChildren: [...CONTAINER_ALLOWED_CHILDREN],\n requirements: {\n permissions: [{ permission: 'camera' }],\n capabilities: [{ capability: 'barcodeScanner' }],\n },\n blueprint: {\n label: 'Barcode scanner',\n defaultProps: {\n permissionStatus: 'unknown',\n title: 'Scan barcode',\n description: 'Point the camera at a barcode to continue.',\n },\n },\n events: {\n onBarcodeScanned: {\n label: 'Barcode scanned',\n eventType: 'scan',\n description: 'Emitted by the app camera adapter after a barcode has been scanned.',\n payloadFields: [\n { path: 'value', type: 'string', label: 'Barcode value' },\n { path: 'type', type: 'string', label: 'Barcode type' },\n ],\n },\n },\n slots: {\n camera: {\n label: 'Camera adapter',\n allowedChildren: [],\n },\n children: {\n label: 'Scanner footer',\n allowedChildren: [...CONTAINER_ALLOWED_CHILDREN],\n },\n },\n props: {\n permissionStatus: {\n type: 'enum',\n category: 'State',\n label: 'Permission status',\n enum: ['unknown', 'requesting', 'granted', 'denied'],\n default: 'unknown',\n },\n title: {\n type: 'string',\n category: 'Content',\n label: 'Title',\n default: 'Scan barcode',\n },\n description: {\n type: 'string',\n category: 'Content',\n label: 'Description',\n default: 'Point the camera at a barcode to continue.',\n },\n overlayTitle: {\n type: 'string',\n category: 'Content',\n label: 'Overlay title',\n },\n overlayDescription: {\n type: 'string',\n category: 'Content',\n label: 'Overlay description',\n },\n requestPermissionLabel: {\n type: 'string',\n category: 'Content',\n label: 'Request permission label',\n },\n manualEntryLabel: {\n type: 'string',\n category: 'Content',\n label: 'Manual entry label',\n },\n onRequestPermission: {\n type: 'action',\n category: 'Events',\n label: 'Request permission action',\n },\n onManualEntry: {\n type: 'action',\n category: 'Events',\n label: 'Manual entry action',\n },\n },\n} as const satisfies ZoraComponentMeta;\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export type { BarcodeScannerViewProps, BarcodeScanResult, CameraPermissionStatus, CameraPermissionViewProps, ScanOverlayProps, } from '../../types/scanner';
|
|
2
|
+
export { BarcodeScannerView } from './adapters/inbound/BarcodeScannerView';
|
|
3
|
+
export { CameraPermissionView } from './adapters/inbound/CameraPermissionView';
|
|
4
|
+
export { ScanOverlay } from './adapters/inbound/ScanOverlay';
|
|
5
|
+
//# sourceMappingURL=public.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/features/scanner/public.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,uBAAuB,EACvB,iBAAiB,EACjB,sBAAsB,EACtB,yBAAyB,EACzB,gBAAgB,GACjB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAC3E,OAAO,EAAE,oBAAoB,EAAE,MAAM,yCAAyC,CAAC;AAC/E,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public.js","sourceRoot":"","sources":["../../../src/features/scanner/public.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAC3E,OAAO,EAAE,oBAAoB,EAAE,MAAM,yCAAyC,CAAC;AAC/E,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC","sourcesContent":["export type {\n BarcodeScannerViewProps,\n BarcodeScanResult,\n CameraPermissionStatus,\n CameraPermissionViewProps,\n ScanOverlayProps,\n} from '../../types/scanner';\nexport { BarcodeScannerView } from './adapters/inbound/BarcodeScannerView';\nexport { CameraPermissionView } from './adapters/inbound/CameraPermissionView';\nexport { ScanOverlay } from './adapters/inbound/ScanOverlay';\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { ScreenSectionProps } from '../../../../types/
|
|
2
|
+
import type { ScreenSectionProps } from '../../../../types/section';
|
|
3
3
|
/*** Screen section with optional heading, description, actions, and content. */
|
|
4
4
|
export declare const ScreenSection: (props: ScreenSectionProps) => React.ReactElement | null;
|
|
5
5
|
//# sourceMappingURL=ScreenSection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScreenSection.d.ts","sourceRoot":"","sources":["../../../../../src/features/section/adapters/inbound/ScreenSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAsBpE,gFAAgF;AAChF,eAAO,MAAM,aAAa,0DAAyC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { SectionHeader } from '../../../../patterns/section-header';
|
|
3
2
|
import { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';
|
|
4
|
-
import { View } from '
|
|
3
|
+
import { View } from '../../../layout/public';
|
|
4
|
+
import { SectionHeader } from './SectionHeader';
|
|
5
5
|
function ScreenSectionInner({ themeId: _themeId, mode: _mode, interactionPolicy: _interactionPolicy, title, description, actions, children, testID, }) {
|
|
6
6
|
return (<View gap="m" testID={testID}>
|
|
7
7
|
{title ? <SectionHeader actions={actions} description={description} title={title}/> : null}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScreenSection.js","sourceRoot":"","sources":["../../../../../src/features/section/adapters/inbound/ScreenSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAE1E,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,SAAS,kBAAkB,CAAC,EAC1B,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,iBAAiB,EAAE,kBAAkB,EACrC,KAAK,EACL,WAAW,EACX,OAAO,EACP,QAAQ,EACR,MAAM,GACa;IACnB,OAAO,CACL,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAC3B;MAAA,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,EAAG,CAAC,CAAC,CAAC,IAAI,CAC3F;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC;AAED,gFAAgF;AAChF,MAAM,CAAC,MAAM,aAAa,GAAG,kBAAkB,CAAC,kBAAkB,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';\nimport type { ScreenSectionProps } from '../../../../types/section';\nimport { View } from '../../../layout/public';\nimport { SectionHeader } from './SectionHeader';\n\nfunction ScreenSectionInner({\n themeId: _themeId,\n mode: _mode,\n interactionPolicy: _interactionPolicy,\n title,\n description,\n actions,\n children,\n testID,\n}: ScreenSectionProps) {\n return (\n <View gap=\"m\" testID={testID}>\n {title ? <SectionHeader actions={actions} description={description} title={title} /> : null}\n {children}\n </View>\n );\n}\n\n/*** Screen section with optional heading, description, actions, and content. */\nexport const ScreenSection = withZoraThemeScope(ScreenSectionInner);\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SectionHeader.d.ts","sourceRoot":"","sources":["../../../../../src/features/section/adapters/inbound/SectionHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AA2CpE;;;;GAIG;AACH,eAAO,MAAM,aAAa,0DAAyC,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';
|
|
3
|
+
import { View } from '../../../layout/public';
|
|
4
|
+
import { Heading } from '../../../typography/public';
|
|
5
|
+
import { Text } from '../../../typography/public';
|
|
6
6
|
function SectionHeaderInner({ themeId: _themeId, mode: _mode, interactionPolicy: _interactionPolicy, title, description, eyebrow, actions, testID, }) {
|
|
7
7
|
return (<View align={{ base: 'flex-start', md: 'center' }} direction={{ base: 'column', md: 'row' }} gap="m" justify="space-between" testID={testID}>
|
|
8
8
|
<View flex={{ md: 1 }} width={{ base: '100%', md: 'auto' }}>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SectionHeader.js","sourceRoot":"","sources":["../../../../../src/features/section/adapters/inbound/SectionHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAE1E,OAAO,EAAE,IA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WAAW,CACd;YAAA,EAAE,IAAI,CAAC,CACR,CAAC,CAAC,CAAC,IAAI,CACV;QAAA,EAAE,IAAI,CACR;MAAA,EAAE,IAAI,CACN;MAAA,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAC1C;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,kBAAkB,CAAC,kBAAkB,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';\nimport type { SectionHeaderProps } from '../../../../types/section';\nimport { View } from '../../../layout/public';\nimport { Heading } from '../../../typography/public';\nimport { Text } from '../../../typography/public';\n\nfunction SectionHeaderInner({\n themeId: _themeId,\n mode: _mode,\n interactionPolicy: _interactionPolicy,\n title,\n description,\n eyebrow,\n actions,\n testID,\n}: SectionHeaderProps) {\n return (\n <View\n align={{ base: 'flex-start', md: 'center' }}\n direction={{ base: 'column', md: 'row' }}\n gap=\"m\"\n justify=\"space-between\"\n testID={testID}\n >\n <View flex={{ md: 1 }} width={{ base: '100%', md: 'auto' }}>\n <View gap=\"xs\">\n {eyebrow ? (\n <Text emphasis=\"muted\" variant=\"caption\" weight=\"semiBold\">\n {eyebrow}\n </Text>\n ) : null}\n <Heading level={3}>{title}</Heading>\n {description ? (\n <Text emphasis=\"muted\" variant=\"bodySmall\">\n {description}\n </Text>\n ) : null}\n </View>\n </View>\n {actions ? <View>{actions}</View> : null}\n </View>\n );\n}\n\n/***\n * Section heading pattern with optional description and action slot.\n *\n \n */\nexport const SectionHeader = withZoraThemeScope(SectionHeaderInner);\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/features/section/public.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAClF,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public.js","sourceRoot":"","sources":["../../../src/features/section/public.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC","sourcesContent":["export type { ScreenSectionProps, SectionHeaderProps } from '../../types/section';\nexport { ScreenSection } from './adapters/inbound/ScreenSection';\nexport { SectionHeader } from './adapters/inbound/SectionHeader';\n"]}
|
|
@@ -2,7 +2,7 @@ export declare const screenSectionMeta: {
|
|
|
2
2
|
readonly name: "ScreenSection";
|
|
3
3
|
readonly category: "layout";
|
|
4
4
|
readonly directManifestNode: true;
|
|
5
|
-
readonly allowedChildren: readonly ["ActivityIndicator", "ForgotPasswordForm", "OAuthProviderButton", "OAuthProviderList", "OtpForm", "SignInForm", "SignUpForm", "Accordion", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "DatePicker", "Dialog", "Pagination", "Rating", "SearchInput", "Tabs", "Toolbar", "Skeleton", "SkeletonCard", "SkeletonList", "SkeletonText", "IconButton", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "View", "ScrollView", "Grid", "Gradient", "Divider", "Text", "Heading", "Icon", "Image", "Hero", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "TimePicker", "Form", "Card", "
|
|
5
|
+
readonly allowedChildren: readonly ["ActivityIndicator", "ForgotPasswordForm", "OAuthProviderButton", "OAuthProviderList", "OtpForm", "SignInForm", "SignUpForm", "Accordion", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "DatePicker", "Dialog", "Pagination", "Rating", "SearchInput", "Tabs", "Toolbar", "Skeleton", "SkeletonCard", "SkeletonList", "SkeletonText", "IconButton", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "View", "ScrollView", "Grid", "Gradient", "Divider", "Text", "Heading", "Icon", "Image", "Hero", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "TimePicker", "Form", "Card", "EmptyState", "SectionHeader", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
|
|
6
6
|
readonly blueprint: {
|
|
7
7
|
readonly label: "Screen section";
|
|
8
8
|
readonly defaultProps: {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"screenSectionMeta.d.ts","sourceRoot":"","sources":["../../../src/features/section/screenSectionMeta.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BQ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"screenSectionMeta.js","sourceRoot":"","sources":["../../../src/features/section/screenSectionMeta.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,+BAA+B,EAAE,MAAM,gCAAgC,CAAC;AAEjF,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,IAAI,EAAE,eAAe;IACrB,QAAQ,EAAE,QAAQ;IAClB,kBAAkB,EAAE,IAAI;IACxB,eAAe,EAAE,CAAC,GAAG,+BAA+B,CAAC;IACrD,SAAS,EAAE;QACT,KAAK,EAAE,gBAAgB;QACvB,YAAY,EAAE;YACZ,KAAK,EAAE,SAAS;YAChB,WAAW,EAAE,sBAAsB;SACpC;KACF;IACD,KAAK,EAAE;QACL,KAAK,EAAE;YACL,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,SAAS;YACnB,KAAK,EAAE,OAAO;YACd,OAAO,EAAE,SAAS;SACnB;QACD,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,SAAS;YACnB,KAAK,EAAE,aAAa;YACpB,OAAO,EAAE,sBAAsB;SAChC;KACF;CACmC,CAAC","sourcesContent":["import type { ZoraComponentMeta } from '../../metadata';\nimport { SCREEN_SECTION_ALLOWED_CHILDREN } from '../../metadata/allowedChildren';\n\nexport const screenSectionMeta = {\n name: 'ScreenSection',\n category: 'layout',\n directManifestNode: true,\n allowedChildren: [...SCREEN_SECTION_ALLOWED_CHILDREN],\n blueprint: {\n label: 'Screen section',\n defaultProps: {\n title: 'Section',\n description: 'Section description.',\n },\n },\n props: {\n title: {\n type: 'string',\n category: 'Content',\n label: 'Title',\n default: 'Section',\n },\n description: {\n type: 'string',\n category: 'Content',\n label: 'Description',\n default: 'Section description.',\n },\n },\n} as const satisfies ZoraComponentMeta;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sectionHeaderMeta.d.ts","sourceRoot":"","sources":["../../../src/features/section/sectionHeaderMeta.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BQ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sectionHeaderMeta.js","sourceRoot":"","sources":["../../../src/features/section/sectionHeaderMeta.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,IAAI,EAAE,eAAe;IACrB,QAAQ,EAAE,SAAS;IACnB,kBAAkB,EAAE,IAAI;IACxB,eAAe,EAAE,EAAE;IACnB,SAAS,EAAE;QACT,KAAK,EAAE,gBAAgB;QACvB,YAAY,EAAE;YACZ,KAAK,EAAE,eAAe;YACtB,WAAW,EAAE,oBAAoB;SAClC;KACF;IACD,KAAK,EAAE;QACL,KAAK,EAAE;YACL,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,SAAS;YACnB,KAAK,EAAE,OAAO;YACd,OAAO,EAAE,eAAe;SACzB;QACD,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,SAAS;YACnB,KAAK,EAAE,aAAa;YACpB,OAAO,EAAE,oBAAoB;SAC9B;QACD,OAAO,EAAE;YACP,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,SAAS;YACnB,KAAK,EAAE,SAAS;SACjB;KACF;CACmC,CAAC","sourcesContent":["import type { ZoraComponentMeta } from '../../metadata';\n\nexport const sectionHeaderMeta = {\n name: 'SectionHeader',\n category: 'pattern',\n directManifestNode: true,\n allowedChildren: [],\n blueprint: {\n label: 'Section header',\n defaultProps: {\n title: 'Section title',\n description: 'Short description.',\n },\n },\n props: {\n title: {\n type: 'string',\n category: 'Content',\n label: 'Title',\n default: 'Section title',\n },\n description: {\n type: 'string',\n category: 'Content',\n label: 'Description',\n default: 'Short description.',\n },\n eyebrow: {\n type: 'string',\n category: 'Content',\n label: 'Eyebrow',\n },\n },\n} as const satisfies ZoraComponentMeta;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectableItem.d.ts","sourceRoot":"","sources":["../../../../../src/features/selection/adapters/inbound/SelectableItem.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EACV,mBAAmB,EAGpB,MAAM,6BAA6B,CAAC;AAarC;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,EAC7B,EAAE,EACF,OAAO,EACP,QAAgB,EAChB,iBAAiB,EACjB,QAAQ,GACT,EAAE,mBAAmB,qBAiFrB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Pressable } from '@ankhorage/surface';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { useSelection } from './SelectionProvider';
|
|
4
4
|
function resolveTrigger(trigger) {
|
|
@@ -50,7 +50,7 @@ export function SelectableItem({ id, trigger, disabled = false, interactionPolic
|
|
|
50
50
|
};
|
|
51
51
|
}, [clear, id, resolvedDisabled, select, selected, selection.mode, toggle]);
|
|
52
52
|
// IMPORTANT:
|
|
53
|
-
// Do not pass `children` directly into
|
|
53
|
+
// Do not pass `children` directly into Pressable. Pressable also supports function children,
|
|
54
54
|
// but its function signature receives interaction state, not SelectableItemState.
|
|
55
55
|
const content = isRenderProp(children) ? children(itemState) : children;
|
|
56
56
|
if (resolvedTrigger === 'manual') {
|
|
@@ -80,8 +80,8 @@ export function SelectableItem({ id, trigger, disabled = false, interactionPolic
|
|
|
80
80
|
}
|
|
81
81
|
selection.toggle(id);
|
|
82
82
|
};
|
|
83
|
-
return (<
|
|
83
|
+
return (<Pressable interactionPolicy={interactionPolicy} accessibilityRole="button" accessibilityState={{ disabled: resolvedDisabled, selected }} disabled={resolvedDisabled} onLongPress={resolvedTrigger === 'longPress' ? handleLongPress : undefined} onPress={resolvedTrigger === 'press' ? handlePress : undefined}>
|
|
84
84
|
{content}
|
|
85
|
-
</
|
|
85
|
+
</Pressable>);
|
|
86
86
|
}
|
|
87
87
|
//# sourceMappingURL=SelectableItem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectableItem.js","sourceRoot":"","sources":["../../../../../src/features/selection/adapters/inbound/SelectableItem.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,SAAS,cAAc,CAAC,OAAqC;IAC3D,OAAO,OAAO,IAAI,QAAQ,CAAC;AAC7B,CAAC;AAED,SAAS,YAAY,CACnB,QAAyC;IAEzC,OAAO,OAAO,QAAQ,KAAK,UAAU,CAAC;AACxC,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,EAC7B,EAAE,EACF,OAAO,EACP,QAAQ,GAAG,KAAK,EAChB,iBAA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AC,QAAQ,CAC1B,kBAAkB,CAAC,CAAC,EAAE,QAAQ,EAAE,gBAAgB,EAAE,QAAQ,EAAE,CAAC,CAC7D,QAAQ,CAAC,CAAC,gBAAgB,CAAC,CAC3B,WAAW,CAAC,CAAC,eAAe,KAAK,WAAW,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,SAAS,CAAC,CAC3E,OAAO,CAAC,CAAC,eAAe,KAAK,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAE/D;MAAA,CAAC,OAAO,CACV;IAAA,EAAE,SAAS,CAAC,CACb,CAAC;AACJ,CAAC","sourcesContent":["import { Pressable } from '@ankhorage/surface';\nimport React from 'react';\nimport type { GestureResponderEvent } from 'react-native';\n\nimport type {\n SelectableItemProps,\n SelectableItemState,\n SelectionTrigger,\n} from '../../../../types/selection';\nimport { useSelection } from './SelectionProvider';\n\nfunction resolveTrigger(trigger: SelectionTrigger | undefined): SelectionTrigger {\n return trigger ?? 'manual';\n}\n\nfunction isRenderProp(\n children: SelectableItemProps['children'],\n): children is (state: SelectableItemState) => React.ReactNode {\n return typeof children === 'function';\n}\n\n/***\n * Adds selection behavior to arbitrary child content via render props.\n *\n \n */\nexport function SelectableItem({\n id,\n trigger,\n disabled = false,\n interactionPolicy,\n children,\n}: SelectableItemProps) {\n const selection = useSelection();\n const resolvedTrigger = resolveTrigger(trigger);\n const resolvedDisabled = selection.disabled || disabled;\n const selected = selection.isSelected(id);\n\n const select = React.useCallback(() => {\n if (resolvedDisabled) return;\n if (interactionPolicy === 'passive') return;\n selection.select(id);\n }, [id, resolvedDisabled, interactionPolicy, selection]);\n\n const toggle = React.useCallback(() => {\n if (resolvedDisabled) return;\n if (interactionPolicy === 'passive') return;\n selection.toggle(id);\n }, [id, resolvedDisabled, interactionPolicy, selection]);\n\n const clear = React.useCallback(() => {\n if (selection.disabled) return;\n if (interactionPolicy === 'passive') return;\n selection.clear();\n }, [interactionPolicy, selection]);\n\n const itemState = React.useMemo<SelectableItemState>(() => {\n return {\n id,\n selected,\n disabled: resolvedDisabled,\n mode: selection.mode,\n select,\n toggle,\n clear,\n };\n }, [clear, id, resolvedDisabled, select, selected, selection.mode, toggle]);\n\n // IMPORTANT:\n // Do not pass `children` directly into Pressable. Pressable also supports function children,\n // but its function signature receives interaction state, not SelectableItemState.\n const content = isRenderProp(children) ? children(itemState) : children;\n\n if (resolvedTrigger === 'manual') {\n return <>{content}</>;\n }\n\n const handlePress = (event: GestureResponderEvent) => {\n event.stopPropagation();\n if (resolvedDisabled) return;\n if (interactionPolicy === 'passive') return;\n if (selection.mode === 'single') {\n selection.select(id);\n return;\n }\n\n selection.toggle(id);\n };\n\n const handleLongPress = (event: GestureResponderEvent) => {\n event.stopPropagation();\n if (resolvedDisabled) return;\n if (interactionPolicy === 'passive') return;\n if (selection.mode === 'single') {\n selection.select(id);\n return;\n }\n\n selection.toggle(id);\n };\n\n return (\n <Pressable\n interactionPolicy={interactionPolicy}\n accessibilityRole=\"button\"\n accessibilityState={{ disabled: resolvedDisabled, selected }}\n disabled={resolvedDisabled}\n onLongPress={resolvedTrigger === 'longPress' ? handleLongPress : undefined}\n onPress={resolvedTrigger === 'press' ? handlePress : undefined}\n >\n {content}\n </Pressable>\n );\n}\n"]}
|
package/dist/{patterns/selection → features/selection/adapters/inbound}/SelectionProvider.d.ts
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { SelectionProviderProps, UseSelectionResult } from '
|
|
2
|
+
import type { SelectionProviderProps, UseSelectionResult } from '../../../../types/selection';
|
|
3
3
|
/***
|
|
4
4
|
* Accesses selection state provided by `SelectionProvider`.
|
|
5
5
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectionProvider.d.ts","sourceRoot":"","sources":["../../../../../src/features/selection/adapters/inbound/SelectionProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAEV,sBAAsB,EACtB,kBAAkB,EACnB,MAAM,6BAA6B,CAAC;AA0BrC;;GAEG;AACH,wBAAgB,YAAY,IAAI,kBAAkB,CAOjD;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,QAAQ,EACR,WAAW,EACX,kBAAkB,EAClB,IAAI,EACJ,QAAQ,EACR,iBAAiB,EACjB,iBAAiB,GAClB,EAAE,sBAAsB,qBAkExB"}
|