@buoy-gg/shared-ui 1.7.2
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/README.md +34 -0
- package/lib/commonjs/JsModal.js +1473 -0
- package/lib/commonjs/clipboard/autoDetectClipboard.js +67 -0
- package/lib/commonjs/clipboard/clipboard-impl.js +26 -0
- package/lib/commonjs/clipboard/copyToClipboard.js +66 -0
- package/lib/commonjs/clipboard/index.js +25 -0
- package/lib/commonjs/context/HintsContext.js +49 -0
- package/lib/commonjs/context/index.js +24 -0
- package/lib/commonjs/dataViewer/CyberpunkInput.js +382 -0
- package/lib/commonjs/dataViewer/DataViewer.js +142 -0
- package/lib/commonjs/dataViewer/DiffSummary.js +133 -0
- package/lib/commonjs/dataViewer/IndentGuides.js +128 -0
- package/lib/commonjs/dataViewer/IndentGuidesOverlay.js +104 -0
- package/lib/commonjs/dataViewer/SplitDiffViewer.js +420 -0
- package/lib/commonjs/dataViewer/TypeLegend.js +111 -0
- package/lib/commonjs/dataViewer/VirtualizedDataExplorer.js +1057 -0
- package/lib/commonjs/dataViewer/diffThemes.js +108 -0
- package/lib/commonjs/dataViewer/index.js +101 -0
- package/lib/commonjs/dataViewer/lineDiff.js +366 -0
- package/lib/commonjs/dataViewer/tree/TreeDiffViewer.js +887 -0
- package/lib/commonjs/env/EnvironmentIndicator.js +121 -0
- package/lib/commonjs/env/EnvironmentSelector.js +204 -0
- package/lib/commonjs/env/EnvironmentSelectorInline.js +298 -0
- package/lib/commonjs/hooks/index.js +44 -0
- package/lib/commonjs/hooks/safe-area-impl.js +28 -0
- package/lib/commonjs/hooks/useDeviceInfo.js +524 -0
- package/lib/commonjs/hooks/useFilterManager.js +136 -0
- package/lib/commonjs/hooks/useSafeAreaInsets.js +256 -0
- package/lib/commonjs/icons/BenchmarkIcon.js +109 -0
- package/lib/commonjs/icons/EnvLaptopIcon.js +204 -0
- package/lib/commonjs/icons/IconBackground.js +279 -0
- package/lib/commonjs/icons/ReactQueryIcon.js +169 -0
- package/lib/commonjs/icons/RenderCountIcon.js +147 -0
- package/lib/commonjs/icons/RouteMapIcon.js +250 -0
- package/lib/commonjs/icons/SentryBugIcon.js +181 -0
- package/lib/commonjs/icons/StackPulseIcon.js +158 -0
- package/lib/commonjs/icons/StorageStackIcon.js +156 -0
- package/lib/commonjs/icons/WifiCircuitIcon.js +169 -0
- package/lib/commonjs/icons/index.js +175 -0
- package/lib/commonjs/icons/lucide-icons-original-full.js +3244 -0
- package/lib/commonjs/icons/lucide-icons.js +2252 -0
- package/lib/commonjs/icons/primitives/GlobeIcon.js +66 -0
- package/lib/commonjs/icons/primitives/icon-primitives.js +169 -0
- package/lib/commonjs/icons/primitives/index.js +49 -0
- package/lib/commonjs/index.js +485 -0
- package/lib/commonjs/license/FeatureGate.js +764 -0
- package/lib/commonjs/license/LicenseEntryModal.js +950 -0
- package/lib/commonjs/license/ManageDevicesModal.js +545 -0
- package/lib/commonjs/license/index.js +62 -0
- package/lib/commonjs/logger/index-sentry.js +245 -0
- package/lib/commonjs/logger/index.js +62 -0
- package/lib/commonjs/logger/logDump.js +19 -0
- package/lib/commonjs/logger/types.js +38 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/settings/components/BubbleSettingsSection.js +382 -0
- package/lib/commonjs/settings/index.js +24 -0
- package/lib/commonjs/storage/devToolsStorageKeys.js +235 -0
- package/lib/commonjs/storage/index.js +18 -0
- package/lib/commonjs/types/index.js +16 -0
- package/lib/commonjs/types/types.d.js +1 -0
- package/lib/commonjs/types/types.js +12 -0
- package/lib/commonjs/ui/components/BackButton.js +47 -0
- package/lib/commonjs/ui/components/Badge.js +221 -0
- package/lib/commonjs/ui/components/ClipboardHintBanner.js +149 -0
- package/lib/commonjs/ui/components/CollapsibleSection.js +170 -0
- package/lib/commonjs/ui/components/CompactFilterChips.js +114 -0
- package/lib/commonjs/ui/components/CompactRow.js +230 -0
- package/lib/commonjs/ui/components/CopyButton.js +256 -0
- package/lib/commonjs/ui/components/DataInspector.js +322 -0
- package/lib/commonjs/ui/components/DetailView.js +357 -0
- package/lib/commonjs/ui/components/Divider.js +18 -0
- package/lib/commonjs/ui/components/DraggableHeader.js +144 -0
- package/lib/commonjs/ui/components/DynamicFilterView.js +725 -0
- package/lib/commonjs/ui/components/EmptyState.js +136 -0
- package/lib/commonjs/ui/components/ErrorBoundary.js +112 -0
- package/lib/commonjs/ui/components/EventHistoryViewer/CompareBar.js +210 -0
- package/lib/commonjs/ui/components/EventHistoryViewer/DiffModeTabs.js +90 -0
- package/lib/commonjs/ui/components/EventHistoryViewer/EventHistoryViewer.js +130 -0
- package/lib/commonjs/ui/components/EventHistoryViewer/EventPickerModal.js +206 -0
- package/lib/commonjs/ui/components/EventHistoryViewer/ViewToggleCards.js +137 -0
- package/lib/commonjs/ui/components/EventHistoryViewer/index.js +40 -0
- package/lib/commonjs/ui/components/EventHistoryViewer/types.js +5 -0
- package/lib/commonjs/ui/components/EventListItem.js +247 -0
- package/lib/commonjs/ui/components/EventStepperFooter.js +148 -0
- package/lib/commonjs/ui/components/ExpandablePopover.js +341 -0
- package/lib/commonjs/ui/components/ExpandableSection.js +71 -0
- package/lib/commonjs/ui/components/ExpandableSectionHeader.js +86 -0
- package/lib/commonjs/ui/components/ExpandableSectionWithModal.js +182 -0
- package/lib/commonjs/ui/components/FilterComponents.js +267 -0
- package/lib/commonjs/ui/components/FilterViewPattern.js +174 -0
- package/lib/commonjs/ui/components/HeaderSearchButton.js +32 -0
- package/lib/commonjs/ui/components/ListItem.js +171 -0
- package/lib/commonjs/ui/components/ModalHeader.js +173 -0
- package/lib/commonjs/ui/components/ModalHintBanner.js +147 -0
- package/lib/commonjs/ui/components/SearchBar.js +264 -0
- package/lib/commonjs/ui/components/SectionHeader.js +125 -0
- package/lib/commonjs/ui/components/StatsCard.js +198 -0
- package/lib/commonjs/ui/components/StatusIndicator.js +231 -0
- package/lib/commonjs/ui/components/StorageTypeBadge.js +96 -0
- package/lib/commonjs/ui/components/TabSelector.js +70 -0
- package/lib/commonjs/ui/components/TimeDisplay.js +142 -0
- package/lib/commonjs/ui/components/TypeBadge.js +100 -0
- package/lib/commonjs/ui/components/ValueTypeBadge.js +146 -0
- package/lib/commonjs/ui/components/WindowControls.js +118 -0
- package/lib/commonjs/ui/components/index.js +323 -0
- package/lib/commonjs/ui/components/types.js +5 -0
- package/lib/commonjs/ui/console/BubbleSettingsModal.js +50 -0
- package/lib/commonjs/ui/console/ConsoleSection.js +50 -0
- package/lib/commonjs/ui/console/CyberpunkButtonOutline.js +261 -0
- package/lib/commonjs/ui/console/CyberpunkConsoleSection.js +649 -0
- package/lib/commonjs/ui/console/CyberpunkIconContainer.js +186 -0
- package/lib/commonjs/ui/console/CyberpunkSectionButton.js +122 -0
- package/lib/commonjs/ui/console/GalaxyButton.js +99 -0
- package/lib/commonjs/ui/console/index.js +12 -0
- package/lib/commonjs/ui/gameUI/components/GameUICollapsibleSection.js +120 -0
- package/lib/commonjs/ui/gameUI/components/GameUICompactStats.js +335 -0
- package/lib/commonjs/ui/gameUI/components/GameUIIssuesList.js +283 -0
- package/lib/commonjs/ui/gameUI/components/GameUIStatusHeader.js +143 -0
- package/lib/commonjs/ui/gameUI/constants/gameUIColors.js +186 -0
- package/lib/commonjs/ui/gameUI/constants/macOSDesignSystemColors.js +206 -0
- package/lib/commonjs/ui/gameUI/hooks/useGameUIAlertState.js +110 -0
- package/lib/commonjs/ui/gameUI/index.js +72 -0
- package/lib/commonjs/ui/index.js +39 -0
- package/lib/commonjs/utils/displayValue.js +41 -0
- package/lib/commonjs/utils/formatting/dataFormatting.js +73 -0
- package/lib/commonjs/utils/formatting/httpFormatting.js +153 -0
- package/lib/commonjs/utils/formatting/index.js +27 -0
- package/lib/commonjs/utils/getSafeAreaInsets.js +40 -0
- package/lib/commonjs/utils/index.js +175 -0
- package/lib/commonjs/utils/loadOptionalModule.js +94 -0
- package/lib/commonjs/utils/minimalSuperJSON.js +337 -0
- package/lib/commonjs/utils/persistentStorage.js +594 -0
- package/lib/commonjs/utils/safeAsyncStorage.js +71 -0
- package/lib/commonjs/utils/safeStringify.js +229 -0
- package/lib/commonjs/utils/time/formatRelativeTime.js +34 -0
- package/lib/commonjs/utils/time/index.js +12 -0
- package/lib/commonjs/utils/typeHelpers.js +142 -0
- package/lib/commonjs/utils/valueFormatting.js +140 -0
- package/lib/module/JsModal.js +1469 -0
- package/lib/module/clipboard/autoDetectClipboard.js +45 -0
- package/lib/module/clipboard/clipboard-impl.js +20 -0
- package/lib/module/clipboard/copyToClipboard.js +62 -0
- package/lib/module/clipboard/index.js +5 -0
- package/lib/module/context/HintsContext.js +43 -0
- package/lib/module/context/index.js +3 -0
- package/lib/module/dataViewer/CyberpunkInput.js +378 -0
- package/lib/module/dataViewer/DataViewer.js +137 -0
- package/lib/module/dataViewer/DiffSummary.js +128 -0
- package/lib/module/dataViewer/IndentGuides.js +124 -0
- package/lib/module/dataViewer/IndentGuidesOverlay.js +99 -0
- package/lib/module/dataViewer/SplitDiffViewer.js +415 -0
- package/lib/module/dataViewer/TypeLegend.js +105 -0
- package/lib/module/dataViewer/VirtualizedDataExplorer.js +1053 -0
- package/lib/module/dataViewer/diffThemes.js +104 -0
- package/lib/module/dataViewer/index.js +17 -0
- package/lib/module/dataViewer/lineDiff.js +362 -0
- package/lib/module/dataViewer/tree/TreeDiffViewer.js +882 -0
- package/lib/module/env/EnvironmentIndicator.js +117 -0
- package/lib/module/env/EnvironmentSelector.js +199 -0
- package/lib/module/env/EnvironmentSelectorInline.js +293 -0
- package/lib/module/hooks/index.js +6 -0
- package/lib/module/hooks/safe-area-impl.js +23 -0
- package/lib/module/hooks/useDeviceInfo.js +519 -0
- package/lib/module/hooks/useFilterManager.js +132 -0
- package/lib/module/hooks/useSafeAreaInsets.js +250 -0
- package/lib/module/icons/BenchmarkIcon.js +104 -0
- package/lib/module/icons/EnvLaptopIcon.js +199 -0
- package/lib/module/icons/IconBackground.js +274 -0
- package/lib/module/icons/ReactQueryIcon.js +164 -0
- package/lib/module/icons/RenderCountIcon.js +142 -0
- package/lib/module/icons/RouteMapIcon.js +245 -0
- package/lib/module/icons/SentryBugIcon.js +176 -0
- package/lib/module/icons/StackPulseIcon.js +153 -0
- package/lib/module/icons/StorageStackIcon.js +151 -0
- package/lib/module/icons/WifiCircuitIcon.js +164 -0
- package/lib/module/icons/index.js +23 -0
- package/lib/module/icons/lucide-icons-original-full.js +3174 -0
- package/lib/module/icons/lucide-icons.js +2199 -0
- package/lib/module/icons/primitives/GlobeIcon.js +61 -0
- package/lib/module/icons/primitives/icon-primitives.js +161 -0
- package/lib/module/icons/primitives/index.js +15 -0
- package/lib/module/index.js +58 -0
- package/lib/module/license/FeatureGate.js +754 -0
- package/lib/module/license/LicenseEntryModal.js +944 -0
- package/lib/module/license/ManageDevicesModal.js +539 -0
- package/lib/module/license/index.js +5 -0
- package/lib/module/logger/index-sentry.js +230 -0
- package/lib/module/logger/index.js +13 -0
- package/lib/module/logger/logDump.js +13 -0
- package/lib/module/logger/types.js +37 -0
- package/lib/module/package.json +1 -0
- package/lib/module/settings/components/BubbleSettingsSection.js +376 -0
- package/lib/module/settings/index.js +3 -0
- package/lib/module/storage/devToolsStorageKeys.js +228 -0
- package/lib/module/storage/index.js +3 -0
- package/lib/module/types/index.js +3 -0
- package/lib/module/types/types.d.js +1 -0
- package/lib/module/types/types.js +8 -0
- package/lib/module/ui/components/BackButton.js +43 -0
- package/lib/module/ui/components/Badge.js +213 -0
- package/lib/module/ui/components/ClipboardHintBanner.js +145 -0
- package/lib/module/ui/components/CollapsibleSection.js +166 -0
- package/lib/module/ui/components/CompactFilterChips.js +110 -0
- package/lib/module/ui/components/CompactRow.js +226 -0
- package/lib/module/ui/components/CopyButton.js +253 -0
- package/lib/module/ui/components/DataInspector.js +318 -0
- package/lib/module/ui/components/DetailView.js +353 -0
- package/lib/module/ui/components/Divider.js +14 -0
- package/lib/module/ui/components/DraggableHeader.js +140 -0
- package/lib/module/ui/components/DynamicFilterView.js +721 -0
- package/lib/module/ui/components/EmptyState.js +129 -0
- package/lib/module/ui/components/ErrorBoundary.js +107 -0
- package/lib/module/ui/components/EventHistoryViewer/CompareBar.js +205 -0
- package/lib/module/ui/components/EventHistoryViewer/DiffModeTabs.js +85 -0
- package/lib/module/ui/components/EventHistoryViewer/EventHistoryViewer.js +125 -0
- package/lib/module/ui/components/EventHistoryViewer/EventPickerModal.js +201 -0
- package/lib/module/ui/components/EventHistoryViewer/ViewToggleCards.js +132 -0
- package/lib/module/ui/components/EventHistoryViewer/index.js +19 -0
- package/lib/module/ui/components/EventHistoryViewer/types.js +3 -0
- package/lib/module/ui/components/EventListItem.js +243 -0
- package/lib/module/ui/components/EventStepperFooter.js +143 -0
- package/lib/module/ui/components/ExpandablePopover.js +338 -0
- package/lib/module/ui/components/ExpandableSection.js +67 -0
- package/lib/module/ui/components/ExpandableSectionHeader.js +82 -0
- package/lib/module/ui/components/ExpandableSectionWithModal.js +178 -0
- package/lib/module/ui/components/FilterComponents.js +259 -0
- package/lib/module/ui/components/FilterViewPattern.js +170 -0
- package/lib/module/ui/components/HeaderSearchButton.js +28 -0
- package/lib/module/ui/components/ListItem.js +167 -0
- package/lib/module/ui/components/ModalHeader.js +166 -0
- package/lib/module/ui/components/ModalHintBanner.js +143 -0
- package/lib/module/ui/components/SearchBar.js +260 -0
- package/lib/module/ui/components/SectionHeader.js +121 -0
- package/lib/module/ui/components/StatsCard.js +194 -0
- package/lib/module/ui/components/StatusIndicator.js +227 -0
- package/lib/module/ui/components/StorageTypeBadge.js +92 -0
- package/lib/module/ui/components/TabSelector.js +66 -0
- package/lib/module/ui/components/TimeDisplay.js +138 -0
- package/lib/module/ui/components/TypeBadge.js +96 -0
- package/lib/module/ui/components/ValueTypeBadge.js +142 -0
- package/lib/module/ui/components/WindowControls.js +114 -0
- package/lib/module/ui/components/index.js +33 -0
- package/lib/module/ui/components/types.js +3 -0
- package/lib/module/ui/console/BubbleSettingsModal.js +46 -0
- package/lib/module/ui/console/ConsoleSection.js +46 -0
- package/lib/module/ui/console/CyberpunkButtonOutline.js +257 -0
- package/lib/module/ui/console/CyberpunkConsoleSection.js +646 -0
- package/lib/module/ui/console/CyberpunkIconContainer.js +182 -0
- package/lib/module/ui/console/CyberpunkSectionButton.js +118 -0
- package/lib/module/ui/console/GalaxyButton.js +95 -0
- package/lib/module/ui/console/index.js +5 -0
- package/lib/module/ui/gameUI/components/GameUICollapsibleSection.js +116 -0
- package/lib/module/ui/gameUI/components/GameUICompactStats.js +331 -0
- package/lib/module/ui/gameUI/components/GameUIIssuesList.js +279 -0
- package/lib/module/ui/gameUI/components/GameUIStatusHeader.js +139 -0
- package/lib/module/ui/gameUI/constants/gameUIColors.js +183 -0
- package/lib/module/ui/gameUI/constants/macOSDesignSystemColors.js +202 -0
- package/lib/module/ui/gameUI/hooks/useGameUIAlertState.js +105 -0
- package/lib/module/ui/gameUI/index.js +19 -0
- package/lib/module/ui/index.js +12 -0
- package/lib/module/utils/displayValue.js +36 -0
- package/lib/module/utils/formatting/dataFormatting.js +66 -0
- package/lib/module/utils/formatting/httpFormatting.js +148 -0
- package/lib/module/utils/formatting/index.js +8 -0
- package/lib/module/utils/getSafeAreaInsets.js +36 -0
- package/lib/module/utils/index.js +10 -0
- package/lib/module/utils/loadOptionalModule.js +89 -0
- package/lib/module/utils/minimalSuperJSON.js +332 -0
- package/lib/module/utils/persistentStorage.js +588 -0
- package/lib/module/utils/safeAsyncStorage.js +64 -0
- package/lib/module/utils/safeStringify.js +225 -0
- package/lib/module/utils/time/formatRelativeTime.js +30 -0
- package/lib/module/utils/time/index.js +3 -0
- package/lib/module/utils/typeHelpers.js +130 -0
- package/lib/module/utils/valueFormatting.js +131 -0
- package/lib/typescript/commonjs/JsModal.d.ts +78 -0
- package/lib/typescript/commonjs/JsModal.d.ts.map +1 -0
- package/lib/typescript/commonjs/clipboard/autoDetectClipboard.d.ts +31 -0
- package/lib/typescript/commonjs/clipboard/autoDetectClipboard.d.ts.map +1 -0
- package/lib/typescript/commonjs/clipboard/clipboard-impl.d.ts +16 -0
- package/lib/typescript/commonjs/clipboard/clipboard-impl.d.ts.map +1 -0
- package/lib/typescript/commonjs/clipboard/copyToClipboard.d.ts +11 -0
- package/lib/typescript/commonjs/clipboard/copyToClipboard.d.ts.map +1 -0
- package/lib/typescript/commonjs/clipboard/index.d.ts +4 -0
- package/lib/typescript/commonjs/clipboard/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/context/HintsContext.d.ts +30 -0
- package/lib/typescript/commonjs/context/HintsContext.d.ts.map +1 -0
- package/lib/typescript/commonjs/context/index.d.ts +2 -0
- package/lib/typescript/commonjs/context/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/dataViewer/CyberpunkInput.d.ts +13 -0
- package/lib/typescript/commonjs/dataViewer/CyberpunkInput.d.ts.map +1 -0
- package/lib/typescript/commonjs/dataViewer/DataViewer.d.ts +24 -0
- package/lib/typescript/commonjs/dataViewer/DataViewer.d.ts.map +1 -0
- package/lib/typescript/commonjs/dataViewer/DiffSummary.d.ts +26 -0
- package/lib/typescript/commonjs/dataViewer/DiffSummary.d.ts.map +1 -0
- package/lib/typescript/commonjs/dataViewer/IndentGuides.d.ts +16 -0
- package/lib/typescript/commonjs/dataViewer/IndentGuides.d.ts.map +1 -0
- package/lib/typescript/commonjs/dataViewer/IndentGuidesOverlay.d.ts +19 -0
- package/lib/typescript/commonjs/dataViewer/IndentGuidesOverlay.d.ts.map +1 -0
- package/lib/typescript/commonjs/dataViewer/SplitDiffViewer.d.ts +40 -0
- package/lib/typescript/commonjs/dataViewer/SplitDiffViewer.d.ts.map +1 -0
- package/lib/typescript/commonjs/dataViewer/TypeLegend.d.ts +18 -0
- package/lib/typescript/commonjs/dataViewer/TypeLegend.d.ts.map +1 -0
- package/lib/typescript/commonjs/dataViewer/VirtualizedDataExplorer.d.ts +14 -0
- package/lib/typescript/commonjs/dataViewer/VirtualizedDataExplorer.d.ts.map +1 -0
- package/lib/typescript/commonjs/dataViewer/diffThemes.d.ts +62 -0
- package/lib/typescript/commonjs/dataViewer/diffThemes.d.ts.map +1 -0
- package/lib/typescript/commonjs/dataViewer/index.d.ts +14 -0
- package/lib/typescript/commonjs/dataViewer/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/dataViewer/lineDiff.d.ts +36 -0
- package/lib/typescript/commonjs/dataViewer/lineDiff.d.ts.map +1 -0
- package/lib/typescript/commonjs/dataViewer/tree/TreeDiffViewer.d.ts +24 -0
- package/lib/typescript/commonjs/dataViewer/tree/TreeDiffViewer.d.ts.map +1 -0
- package/lib/typescript/commonjs/env/EnvironmentIndicator.d.ts +12 -0
- package/lib/typescript/commonjs/env/EnvironmentIndicator.d.ts.map +1 -0
- package/lib/typescript/commonjs/env/EnvironmentSelector.d.ts +18 -0
- package/lib/typescript/commonjs/env/EnvironmentSelector.d.ts.map +1 -0
- package/lib/typescript/commonjs/env/EnvironmentSelectorInline.d.ts +12 -0
- package/lib/typescript/commonjs/env/EnvironmentSelectorInline.d.ts.map +1 -0
- package/lib/typescript/commonjs/hooks/index.d.ts +5 -0
- package/lib/typescript/commonjs/hooks/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/hooks/safe-area-impl.d.ts +24 -0
- package/lib/typescript/commonjs/hooks/safe-area-impl.d.ts.map +1 -0
- package/lib/typescript/commonjs/hooks/useDeviceInfo.d.ts +125 -0
- package/lib/typescript/commonjs/hooks/useDeviceInfo.d.ts.map +1 -0
- package/lib/typescript/commonjs/hooks/useFilterManager.d.ts +59 -0
- package/lib/typescript/commonjs/hooks/useFilterManager.d.ts.map +1 -0
- package/lib/typescript/commonjs/hooks/useSafeAreaInsets.d.ts +113 -0
- package/lib/typescript/commonjs/hooks/useSafeAreaInsets.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/BenchmarkIcon.d.ts +14 -0
- package/lib/typescript/commonjs/icons/BenchmarkIcon.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/EnvLaptopIcon.d.ts +14 -0
- package/lib/typescript/commonjs/icons/EnvLaptopIcon.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/IconBackground.d.ts +10 -0
- package/lib/typescript/commonjs/icons/IconBackground.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/ReactQueryIcon.d.ts +12 -0
- package/lib/typescript/commonjs/icons/ReactQueryIcon.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/RenderCountIcon.d.ts +14 -0
- package/lib/typescript/commonjs/icons/RenderCountIcon.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/RouteMapIcon.d.ts +14 -0
- package/lib/typescript/commonjs/icons/RouteMapIcon.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/SentryBugIcon.d.ts +12 -0
- package/lib/typescript/commonjs/icons/SentryBugIcon.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/StackPulseIcon.d.ts +11 -0
- package/lib/typescript/commonjs/icons/StackPulseIcon.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/StorageStackIcon.d.ts +12 -0
- package/lib/typescript/commonjs/icons/StorageStackIcon.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/WifiCircuitIcon.d.ts +15 -0
- package/lib/typescript/commonjs/icons/WifiCircuitIcon.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/index.d.ts +15 -0
- package/lib/typescript/commonjs/icons/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/lucide-icons-original-full.d.ts +148 -0
- package/lib/typescript/commonjs/icons/lucide-icons-original-full.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/lucide-icons.d.ts +170 -0
- package/lib/typescript/commonjs/icons/lucide-icons.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/primitives/GlobeIcon.d.ts +15 -0
- package/lib/typescript/commonjs/icons/primitives/GlobeIcon.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/primitives/icon-primitives.d.ts +92 -0
- package/lib/typescript/commonjs/icons/primitives/icon-primitives.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/primitives/index.d.ts +9 -0
- package/lib/typescript/commonjs/icons/primitives/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/index.d.ts +28 -0
- package/lib/typescript/commonjs/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/license/FeatureGate.d.ts +123 -0
- package/lib/typescript/commonjs/license/FeatureGate.d.ts.map +1 -0
- package/lib/typescript/commonjs/license/LicenseEntryModal.d.ts +69 -0
- package/lib/typescript/commonjs/license/LicenseEntryModal.d.ts.map +1 -0
- package/lib/typescript/commonjs/license/ManageDevicesModal.d.ts +23 -0
- package/lib/typescript/commonjs/license/ManageDevicesModal.d.ts.map +1 -0
- package/lib/typescript/commonjs/license/index.d.ts +7 -0
- package/lib/typescript/commonjs/license/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/logger/index-sentry.d.ts +68 -0
- package/lib/typescript/commonjs/logger/index-sentry.d.ts.map +1 -0
- package/lib/typescript/commonjs/logger/index.d.ts +5 -0
- package/lib/typescript/commonjs/logger/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/logger/logDump.d.ts +5 -0
- package/lib/typescript/commonjs/logger/logDump.d.ts.map +1 -0
- package/lib/typescript/commonjs/logger/types.d.ts +100 -0
- package/lib/typescript/commonjs/logger/types.d.ts.map +1 -0
- package/lib/typescript/commonjs/package.json +1 -0
- package/lib/typescript/commonjs/settings/components/BubbleSettingsSection.d.ts +19 -0
- package/lib/typescript/commonjs/settings/components/BubbleSettingsSection.d.ts.map +1 -0
- package/lib/typescript/commonjs/settings/index.d.ts +2 -0
- package/lib/typescript/commonjs/settings/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/storage/devToolsStorageKeys.d.ts +173 -0
- package/lib/typescript/commonjs/storage/devToolsStorageKeys.d.ts.map +1 -0
- package/lib/typescript/commonjs/storage/index.d.ts +2 -0
- package/lib/typescript/commonjs/storage/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/types/index.d.ts +2 -0
- package/lib/typescript/commonjs/types/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/types/types.d.ts +8 -0
- package/lib/typescript/commonjs/types/types.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/BackButton.d.ts +10 -0
- package/lib/typescript/commonjs/ui/components/BackButton.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/Badge.d.ts +41 -0
- package/lib/typescript/commonjs/ui/components/Badge.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/ClipboardHintBanner.d.ts +17 -0
- package/lib/typescript/commonjs/ui/components/ClipboardHintBanner.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/CollapsibleSection.d.ts +35 -0
- package/lib/typescript/commonjs/ui/components/CollapsibleSection.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/CompactFilterChips.d.ts +23 -0
- package/lib/typescript/commonjs/ui/components/CompactFilterChips.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/CompactRow.d.ts +21 -0
- package/lib/typescript/commonjs/ui/components/CompactRow.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/CopyButton.d.ts +41 -0
- package/lib/typescript/commonjs/ui/components/CopyButton.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/DataInspector.d.ts +35 -0
- package/lib/typescript/commonjs/ui/components/DataInspector.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/DetailView.d.ts +68 -0
- package/lib/typescript/commonjs/ui/components/DetailView.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/Divider.d.ts +2 -0
- package/lib/typescript/commonjs/ui/components/Divider.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/DraggableHeader.d.ts +35 -0
- package/lib/typescript/commonjs/ui/components/DraggableHeader.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/DynamicFilterView.d.ts +91 -0
- package/lib/typescript/commonjs/ui/components/DynamicFilterView.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/EmptyState.d.ts +43 -0
- package/lib/typescript/commonjs/ui/components/EmptyState.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/ErrorBoundary.d.ts +18 -0
- package/lib/typescript/commonjs/ui/components/ErrorBoundary.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/EventHistoryViewer/CompareBar.d.ts +15 -0
- package/lib/typescript/commonjs/ui/components/EventHistoryViewer/CompareBar.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/EventHistoryViewer/DiffModeTabs.d.ts +15 -0
- package/lib/typescript/commonjs/ui/components/EventHistoryViewer/DiffModeTabs.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/EventHistoryViewer/EventHistoryViewer.d.ts +15 -0
- package/lib/typescript/commonjs/ui/components/EventHistoryViewer/EventHistoryViewer.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/EventHistoryViewer/EventPickerModal.d.ts +15 -0
- package/lib/typescript/commonjs/ui/components/EventHistoryViewer/EventPickerModal.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/EventHistoryViewer/ViewToggleCards.d.ts +14 -0
- package/lib/typescript/commonjs/ui/components/EventHistoryViewer/ViewToggleCards.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/EventHistoryViewer/index.d.ts +13 -0
- package/lib/typescript/commonjs/ui/components/EventHistoryViewer/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/EventHistoryViewer/types.d.ts +216 -0
- package/lib/typescript/commonjs/ui/components/EventHistoryViewer/types.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/EventListItem.d.ts +65 -0
- package/lib/typescript/commonjs/ui/components/EventListItem.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/EventStepperFooter.d.ts +32 -0
- package/lib/typescript/commonjs/ui/components/EventStepperFooter.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/ExpandablePopover.d.ts +34 -0
- package/lib/typescript/commonjs/ui/components/ExpandablePopover.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/ExpandableSection.d.ts +15 -0
- package/lib/typescript/commonjs/ui/components/ExpandableSection.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/ExpandableSectionHeader.d.ts +13 -0
- package/lib/typescript/commonjs/ui/components/ExpandableSectionHeader.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/ExpandableSectionWithModal.d.ts +18 -0
- package/lib/typescript/commonjs/ui/components/ExpandableSectionWithModal.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/FilterComponents.d.ts +38 -0
- package/lib/typescript/commonjs/ui/components/FilterComponents.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/FilterViewPattern.d.ts +15 -0
- package/lib/typescript/commonjs/ui/components/FilterViewPattern.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/HeaderSearchButton.d.ts +9 -0
- package/lib/typescript/commonjs/ui/components/HeaderSearchButton.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/ListItem.d.ts +49 -0
- package/lib/typescript/commonjs/ui/components/ListItem.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/ModalHeader.d.ts +34 -0
- package/lib/typescript/commonjs/ui/components/ModalHeader.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/ModalHintBanner.d.ts +15 -0
- package/lib/typescript/commonjs/ui/components/ModalHintBanner.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/SearchBar.d.ts +32 -0
- package/lib/typescript/commonjs/ui/components/SearchBar.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/SectionHeader.d.ts +33 -0
- package/lib/typescript/commonjs/ui/components/SectionHeader.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/StatsCard.d.ts +45 -0
- package/lib/typescript/commonjs/ui/components/StatsCard.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/StatusIndicator.d.ts +40 -0
- package/lib/typescript/commonjs/ui/components/StatusIndicator.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/StorageTypeBadge.d.ts +9 -0
- package/lib/typescript/commonjs/ui/components/StorageTypeBadge.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/TabSelector.d.ts +12 -0
- package/lib/typescript/commonjs/ui/components/TabSelector.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/TimeDisplay.d.ts +30 -0
- package/lib/typescript/commonjs/ui/components/TimeDisplay.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/TypeBadge.d.ts +6 -0
- package/lib/typescript/commonjs/ui/components/TypeBadge.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/ValueTypeBadge.d.ts +10 -0
- package/lib/typescript/commonjs/ui/components/ValueTypeBadge.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/WindowControls.d.ts +19 -0
- package/lib/typescript/commonjs/ui/components/WindowControls.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/index.d.ts +36 -0
- package/lib/typescript/commonjs/ui/components/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/types.d.ts +3 -0
- package/lib/typescript/commonjs/ui/components/types.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/console/BubbleSettingsModal.d.ts +11 -0
- package/lib/typescript/commonjs/ui/console/BubbleSettingsModal.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/console/ConsoleSection.d.ts +19 -0
- package/lib/typescript/commonjs/ui/console/ConsoleSection.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/console/CyberpunkButtonOutline.d.ts +12 -0
- package/lib/typescript/commonjs/ui/console/CyberpunkButtonOutline.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/console/CyberpunkConsoleSection.d.ts +17 -0
- package/lib/typescript/commonjs/ui/console/CyberpunkConsoleSection.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/console/CyberpunkIconContainer.d.ts +9 -0
- package/lib/typescript/commonjs/ui/console/CyberpunkIconContainer.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/console/CyberpunkSectionButton.d.ts +14 -0
- package/lib/typescript/commonjs/ui/console/CyberpunkSectionButton.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/console/GalaxyButton.d.ts +10 -0
- package/lib/typescript/commonjs/ui/console/GalaxyButton.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/console/index.d.ts +2 -0
- package/lib/typescript/commonjs/ui/console/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/gameUI/components/GameUICollapsibleSection.d.ts +24 -0
- package/lib/typescript/commonjs/ui/gameUI/components/GameUICollapsibleSection.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/gameUI/components/GameUICompactStats.d.ts +40 -0
- package/lib/typescript/commonjs/ui/gameUI/components/GameUICompactStats.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/gameUI/components/GameUIIssuesList.d.ts +29 -0
- package/lib/typescript/commonjs/ui/gameUI/components/GameUIIssuesList.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/gameUI/components/GameUIStatusHeader.d.ts +16 -0
- package/lib/typescript/commonjs/ui/gameUI/components/GameUIStatusHeader.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/gameUI/constants/gameUIColors.d.ts +103 -0
- package/lib/typescript/commonjs/ui/gameUI/constants/gameUIColors.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/gameUI/constants/macOSDesignSystemColors.d.ts +157 -0
- package/lib/typescript/commonjs/ui/gameUI/constants/macOSDesignSystemColors.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/gameUI/hooks/useGameUIAlertState.d.ts +37 -0
- package/lib/typescript/commonjs/ui/gameUI/hooks/useGameUIAlertState.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/gameUI/index.d.ts +18 -0
- package/lib/typescript/commonjs/ui/gameUI/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/index.d.ts +4 -0
- package/lib/typescript/commonjs/ui/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/displayValue.d.ts +16 -0
- package/lib/typescript/commonjs/utils/displayValue.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/formatting/dataFormatting.d.ts +31 -0
- package/lib/typescript/commonjs/utils/formatting/dataFormatting.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/formatting/httpFormatting.d.ts +34 -0
- package/lib/typescript/commonjs/utils/formatting/httpFormatting.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/formatting/index.d.ts +6 -0
- package/lib/typescript/commonjs/utils/formatting/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/getSafeAreaInsets.d.ts +14 -0
- package/lib/typescript/commonjs/utils/getSafeAreaInsets.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/index.d.ts +9 -0
- package/lib/typescript/commonjs/utils/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/loadOptionalModule.d.ts +27 -0
- package/lib/typescript/commonjs/utils/loadOptionalModule.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/minimalSuperJSON.d.ts +18 -0
- package/lib/typescript/commonjs/utils/minimalSuperJSON.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/persistentStorage.d.ts +45 -0
- package/lib/typescript/commonjs/utils/persistentStorage.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/safeAsyncStorage.d.ts +35 -0
- package/lib/typescript/commonjs/utils/safeAsyncStorage.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/safeStringify.d.ts +49 -0
- package/lib/typescript/commonjs/utils/safeStringify.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/time/formatRelativeTime.d.ts +8 -0
- package/lib/typescript/commonjs/utils/time/formatRelativeTime.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/time/index.d.ts +2 -0
- package/lib/typescript/commonjs/utils/time/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/typeHelpers.d.ts +52 -0
- package/lib/typescript/commonjs/utils/typeHelpers.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/valueFormatting.d.ts +39 -0
- package/lib/typescript/commonjs/utils/valueFormatting.d.ts.map +1 -0
- package/lib/typescript/module/JsModal.d.ts +78 -0
- package/lib/typescript/module/JsModal.d.ts.map +1 -0
- package/lib/typescript/module/clipboard/autoDetectClipboard.d.ts +31 -0
- package/lib/typescript/module/clipboard/autoDetectClipboard.d.ts.map +1 -0
- package/lib/typescript/module/clipboard/clipboard-impl.d.ts +16 -0
- package/lib/typescript/module/clipboard/clipboard-impl.d.ts.map +1 -0
- package/lib/typescript/module/clipboard/copyToClipboard.d.ts +11 -0
- package/lib/typescript/module/clipboard/copyToClipboard.d.ts.map +1 -0
- package/lib/typescript/module/clipboard/index.d.ts +4 -0
- package/lib/typescript/module/clipboard/index.d.ts.map +1 -0
- package/lib/typescript/module/context/HintsContext.d.ts +30 -0
- package/lib/typescript/module/context/HintsContext.d.ts.map +1 -0
- package/lib/typescript/module/context/index.d.ts +2 -0
- package/lib/typescript/module/context/index.d.ts.map +1 -0
- package/lib/typescript/module/dataViewer/CyberpunkInput.d.ts +13 -0
- package/lib/typescript/module/dataViewer/CyberpunkInput.d.ts.map +1 -0
- package/lib/typescript/module/dataViewer/DataViewer.d.ts +24 -0
- package/lib/typescript/module/dataViewer/DataViewer.d.ts.map +1 -0
- package/lib/typescript/module/dataViewer/DiffSummary.d.ts +26 -0
- package/lib/typescript/module/dataViewer/DiffSummary.d.ts.map +1 -0
- package/lib/typescript/module/dataViewer/IndentGuides.d.ts +16 -0
- package/lib/typescript/module/dataViewer/IndentGuides.d.ts.map +1 -0
- package/lib/typescript/module/dataViewer/IndentGuidesOverlay.d.ts +19 -0
- package/lib/typescript/module/dataViewer/IndentGuidesOverlay.d.ts.map +1 -0
- package/lib/typescript/module/dataViewer/SplitDiffViewer.d.ts +40 -0
- package/lib/typescript/module/dataViewer/SplitDiffViewer.d.ts.map +1 -0
- package/lib/typescript/module/dataViewer/TypeLegend.d.ts +18 -0
- package/lib/typescript/module/dataViewer/TypeLegend.d.ts.map +1 -0
- package/lib/typescript/module/dataViewer/VirtualizedDataExplorer.d.ts +14 -0
- package/lib/typescript/module/dataViewer/VirtualizedDataExplorer.d.ts.map +1 -0
- package/lib/typescript/module/dataViewer/diffThemes.d.ts +62 -0
- package/lib/typescript/module/dataViewer/diffThemes.d.ts.map +1 -0
- package/lib/typescript/module/dataViewer/index.d.ts +14 -0
- package/lib/typescript/module/dataViewer/index.d.ts.map +1 -0
- package/lib/typescript/module/dataViewer/lineDiff.d.ts +36 -0
- package/lib/typescript/module/dataViewer/lineDiff.d.ts.map +1 -0
- package/lib/typescript/module/dataViewer/tree/TreeDiffViewer.d.ts +24 -0
- package/lib/typescript/module/dataViewer/tree/TreeDiffViewer.d.ts.map +1 -0
- package/lib/typescript/module/env/EnvironmentIndicator.d.ts +12 -0
- package/lib/typescript/module/env/EnvironmentIndicator.d.ts.map +1 -0
- package/lib/typescript/module/env/EnvironmentSelector.d.ts +18 -0
- package/lib/typescript/module/env/EnvironmentSelector.d.ts.map +1 -0
- package/lib/typescript/module/env/EnvironmentSelectorInline.d.ts +12 -0
- package/lib/typescript/module/env/EnvironmentSelectorInline.d.ts.map +1 -0
- package/lib/typescript/module/hooks/index.d.ts +5 -0
- package/lib/typescript/module/hooks/index.d.ts.map +1 -0
- package/lib/typescript/module/hooks/safe-area-impl.d.ts +24 -0
- package/lib/typescript/module/hooks/safe-area-impl.d.ts.map +1 -0
- package/lib/typescript/module/hooks/useDeviceInfo.d.ts +125 -0
- package/lib/typescript/module/hooks/useDeviceInfo.d.ts.map +1 -0
- package/lib/typescript/module/hooks/useFilterManager.d.ts +59 -0
- package/lib/typescript/module/hooks/useFilterManager.d.ts.map +1 -0
- package/lib/typescript/module/hooks/useSafeAreaInsets.d.ts +113 -0
- package/lib/typescript/module/hooks/useSafeAreaInsets.d.ts.map +1 -0
- package/lib/typescript/module/icons/BenchmarkIcon.d.ts +14 -0
- package/lib/typescript/module/icons/BenchmarkIcon.d.ts.map +1 -0
- package/lib/typescript/module/icons/EnvLaptopIcon.d.ts +14 -0
- package/lib/typescript/module/icons/EnvLaptopIcon.d.ts.map +1 -0
- package/lib/typescript/module/icons/IconBackground.d.ts +10 -0
- package/lib/typescript/module/icons/IconBackground.d.ts.map +1 -0
- package/lib/typescript/module/icons/ReactQueryIcon.d.ts +12 -0
- package/lib/typescript/module/icons/ReactQueryIcon.d.ts.map +1 -0
- package/lib/typescript/module/icons/RenderCountIcon.d.ts +14 -0
- package/lib/typescript/module/icons/RenderCountIcon.d.ts.map +1 -0
- package/lib/typescript/module/icons/RouteMapIcon.d.ts +14 -0
- package/lib/typescript/module/icons/RouteMapIcon.d.ts.map +1 -0
- package/lib/typescript/module/icons/SentryBugIcon.d.ts +12 -0
- package/lib/typescript/module/icons/SentryBugIcon.d.ts.map +1 -0
- package/lib/typescript/module/icons/StackPulseIcon.d.ts +11 -0
- package/lib/typescript/module/icons/StackPulseIcon.d.ts.map +1 -0
- package/lib/typescript/module/icons/StorageStackIcon.d.ts +12 -0
- package/lib/typescript/module/icons/StorageStackIcon.d.ts.map +1 -0
- package/lib/typescript/module/icons/WifiCircuitIcon.d.ts +15 -0
- package/lib/typescript/module/icons/WifiCircuitIcon.d.ts.map +1 -0
- package/lib/typescript/module/icons/index.d.ts +15 -0
- package/lib/typescript/module/icons/index.d.ts.map +1 -0
- package/lib/typescript/module/icons/lucide-icons-original-full.d.ts +148 -0
- package/lib/typescript/module/icons/lucide-icons-original-full.d.ts.map +1 -0
- package/lib/typescript/module/icons/lucide-icons.d.ts +170 -0
- package/lib/typescript/module/icons/lucide-icons.d.ts.map +1 -0
- package/lib/typescript/module/icons/primitives/GlobeIcon.d.ts +15 -0
- package/lib/typescript/module/icons/primitives/GlobeIcon.d.ts.map +1 -0
- package/lib/typescript/module/icons/primitives/icon-primitives.d.ts +92 -0
- package/lib/typescript/module/icons/primitives/icon-primitives.d.ts.map +1 -0
- package/lib/typescript/module/icons/primitives/index.d.ts +9 -0
- package/lib/typescript/module/icons/primitives/index.d.ts.map +1 -0
- package/lib/typescript/module/index.d.ts +28 -0
- package/lib/typescript/module/index.d.ts.map +1 -0
- package/lib/typescript/module/license/FeatureGate.d.ts +123 -0
- package/lib/typescript/module/license/FeatureGate.d.ts.map +1 -0
- package/lib/typescript/module/license/LicenseEntryModal.d.ts +69 -0
- package/lib/typescript/module/license/LicenseEntryModal.d.ts.map +1 -0
- package/lib/typescript/module/license/ManageDevicesModal.d.ts +23 -0
- package/lib/typescript/module/license/ManageDevicesModal.d.ts.map +1 -0
- package/lib/typescript/module/license/index.d.ts +7 -0
- package/lib/typescript/module/license/index.d.ts.map +1 -0
- package/lib/typescript/module/logger/index-sentry.d.ts +68 -0
- package/lib/typescript/module/logger/index-sentry.d.ts.map +1 -0
- package/lib/typescript/module/logger/index.d.ts +5 -0
- package/lib/typescript/module/logger/index.d.ts.map +1 -0
- package/lib/typescript/module/logger/logDump.d.ts +5 -0
- package/lib/typescript/module/logger/logDump.d.ts.map +1 -0
- package/lib/typescript/module/logger/types.d.ts +100 -0
- package/lib/typescript/module/logger/types.d.ts.map +1 -0
- package/lib/typescript/module/package.json +1 -0
- package/lib/typescript/module/settings/components/BubbleSettingsSection.d.ts +19 -0
- package/lib/typescript/module/settings/components/BubbleSettingsSection.d.ts.map +1 -0
- package/lib/typescript/module/settings/index.d.ts +2 -0
- package/lib/typescript/module/settings/index.d.ts.map +1 -0
- package/lib/typescript/module/storage/devToolsStorageKeys.d.ts +173 -0
- package/lib/typescript/module/storage/devToolsStorageKeys.d.ts.map +1 -0
- package/lib/typescript/module/storage/index.d.ts +2 -0
- package/lib/typescript/module/storage/index.d.ts.map +1 -0
- package/lib/typescript/module/types/index.d.ts +2 -0
- package/lib/typescript/module/types/index.d.ts.map +1 -0
- package/lib/typescript/module/types/types.d.ts +8 -0
- package/lib/typescript/module/types/types.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/BackButton.d.ts +10 -0
- package/lib/typescript/module/ui/components/BackButton.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/Badge.d.ts +41 -0
- package/lib/typescript/module/ui/components/Badge.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/ClipboardHintBanner.d.ts +17 -0
- package/lib/typescript/module/ui/components/ClipboardHintBanner.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/CollapsibleSection.d.ts +35 -0
- package/lib/typescript/module/ui/components/CollapsibleSection.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/CompactFilterChips.d.ts +23 -0
- package/lib/typescript/module/ui/components/CompactFilterChips.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/CompactRow.d.ts +21 -0
- package/lib/typescript/module/ui/components/CompactRow.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/CopyButton.d.ts +41 -0
- package/lib/typescript/module/ui/components/CopyButton.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/DataInspector.d.ts +35 -0
- package/lib/typescript/module/ui/components/DataInspector.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/DetailView.d.ts +68 -0
- package/lib/typescript/module/ui/components/DetailView.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/Divider.d.ts +2 -0
- package/lib/typescript/module/ui/components/Divider.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/DraggableHeader.d.ts +35 -0
- package/lib/typescript/module/ui/components/DraggableHeader.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/DynamicFilterView.d.ts +91 -0
- package/lib/typescript/module/ui/components/DynamicFilterView.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/EmptyState.d.ts +43 -0
- package/lib/typescript/module/ui/components/EmptyState.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/ErrorBoundary.d.ts +18 -0
- package/lib/typescript/module/ui/components/ErrorBoundary.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/EventHistoryViewer/CompareBar.d.ts +15 -0
- package/lib/typescript/module/ui/components/EventHistoryViewer/CompareBar.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/EventHistoryViewer/DiffModeTabs.d.ts +15 -0
- package/lib/typescript/module/ui/components/EventHistoryViewer/DiffModeTabs.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/EventHistoryViewer/EventHistoryViewer.d.ts +15 -0
- package/lib/typescript/module/ui/components/EventHistoryViewer/EventHistoryViewer.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/EventHistoryViewer/EventPickerModal.d.ts +15 -0
- package/lib/typescript/module/ui/components/EventHistoryViewer/EventPickerModal.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/EventHistoryViewer/ViewToggleCards.d.ts +14 -0
- package/lib/typescript/module/ui/components/EventHistoryViewer/ViewToggleCards.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/EventHistoryViewer/index.d.ts +13 -0
- package/lib/typescript/module/ui/components/EventHistoryViewer/index.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/EventHistoryViewer/types.d.ts +216 -0
- package/lib/typescript/module/ui/components/EventHistoryViewer/types.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/EventListItem.d.ts +65 -0
- package/lib/typescript/module/ui/components/EventListItem.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/EventStepperFooter.d.ts +32 -0
- package/lib/typescript/module/ui/components/EventStepperFooter.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/ExpandablePopover.d.ts +34 -0
- package/lib/typescript/module/ui/components/ExpandablePopover.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/ExpandableSection.d.ts +15 -0
- package/lib/typescript/module/ui/components/ExpandableSection.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/ExpandableSectionHeader.d.ts +13 -0
- package/lib/typescript/module/ui/components/ExpandableSectionHeader.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/ExpandableSectionWithModal.d.ts +18 -0
- package/lib/typescript/module/ui/components/ExpandableSectionWithModal.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/FilterComponents.d.ts +38 -0
- package/lib/typescript/module/ui/components/FilterComponents.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/FilterViewPattern.d.ts +15 -0
- package/lib/typescript/module/ui/components/FilterViewPattern.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/HeaderSearchButton.d.ts +9 -0
- package/lib/typescript/module/ui/components/HeaderSearchButton.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/ListItem.d.ts +49 -0
- package/lib/typescript/module/ui/components/ListItem.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/ModalHeader.d.ts +34 -0
- package/lib/typescript/module/ui/components/ModalHeader.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/ModalHintBanner.d.ts +15 -0
- package/lib/typescript/module/ui/components/ModalHintBanner.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/SearchBar.d.ts +32 -0
- package/lib/typescript/module/ui/components/SearchBar.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/SectionHeader.d.ts +33 -0
- package/lib/typescript/module/ui/components/SectionHeader.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/StatsCard.d.ts +45 -0
- package/lib/typescript/module/ui/components/StatsCard.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/StatusIndicator.d.ts +40 -0
- package/lib/typescript/module/ui/components/StatusIndicator.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/StorageTypeBadge.d.ts +9 -0
- package/lib/typescript/module/ui/components/StorageTypeBadge.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/TabSelector.d.ts +12 -0
- package/lib/typescript/module/ui/components/TabSelector.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/TimeDisplay.d.ts +30 -0
- package/lib/typescript/module/ui/components/TimeDisplay.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/TypeBadge.d.ts +6 -0
- package/lib/typescript/module/ui/components/TypeBadge.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/ValueTypeBadge.d.ts +10 -0
- package/lib/typescript/module/ui/components/ValueTypeBadge.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/WindowControls.d.ts +19 -0
- package/lib/typescript/module/ui/components/WindowControls.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/index.d.ts +36 -0
- package/lib/typescript/module/ui/components/index.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/types.d.ts +3 -0
- package/lib/typescript/module/ui/components/types.d.ts.map +1 -0
- package/lib/typescript/module/ui/console/BubbleSettingsModal.d.ts +11 -0
- package/lib/typescript/module/ui/console/BubbleSettingsModal.d.ts.map +1 -0
- package/lib/typescript/module/ui/console/ConsoleSection.d.ts +19 -0
- package/lib/typescript/module/ui/console/ConsoleSection.d.ts.map +1 -0
- package/lib/typescript/module/ui/console/CyberpunkButtonOutline.d.ts +12 -0
- package/lib/typescript/module/ui/console/CyberpunkButtonOutline.d.ts.map +1 -0
- package/lib/typescript/module/ui/console/CyberpunkConsoleSection.d.ts +17 -0
- package/lib/typescript/module/ui/console/CyberpunkConsoleSection.d.ts.map +1 -0
- package/lib/typescript/module/ui/console/CyberpunkIconContainer.d.ts +9 -0
- package/lib/typescript/module/ui/console/CyberpunkIconContainer.d.ts.map +1 -0
- package/lib/typescript/module/ui/console/CyberpunkSectionButton.d.ts +14 -0
- package/lib/typescript/module/ui/console/CyberpunkSectionButton.d.ts.map +1 -0
- package/lib/typescript/module/ui/console/GalaxyButton.d.ts +10 -0
- package/lib/typescript/module/ui/console/GalaxyButton.d.ts.map +1 -0
- package/lib/typescript/module/ui/console/index.d.ts +2 -0
- package/lib/typescript/module/ui/console/index.d.ts.map +1 -0
- package/lib/typescript/module/ui/gameUI/components/GameUICollapsibleSection.d.ts +24 -0
- package/lib/typescript/module/ui/gameUI/components/GameUICollapsibleSection.d.ts.map +1 -0
- package/lib/typescript/module/ui/gameUI/components/GameUICompactStats.d.ts +40 -0
- package/lib/typescript/module/ui/gameUI/components/GameUICompactStats.d.ts.map +1 -0
- package/lib/typescript/module/ui/gameUI/components/GameUIIssuesList.d.ts +29 -0
- package/lib/typescript/module/ui/gameUI/components/GameUIIssuesList.d.ts.map +1 -0
- package/lib/typescript/module/ui/gameUI/components/GameUIStatusHeader.d.ts +16 -0
- package/lib/typescript/module/ui/gameUI/components/GameUIStatusHeader.d.ts.map +1 -0
- package/lib/typescript/module/ui/gameUI/constants/gameUIColors.d.ts +103 -0
- package/lib/typescript/module/ui/gameUI/constants/gameUIColors.d.ts.map +1 -0
- package/lib/typescript/module/ui/gameUI/constants/macOSDesignSystemColors.d.ts +157 -0
- package/lib/typescript/module/ui/gameUI/constants/macOSDesignSystemColors.d.ts.map +1 -0
- package/lib/typescript/module/ui/gameUI/hooks/useGameUIAlertState.d.ts +37 -0
- package/lib/typescript/module/ui/gameUI/hooks/useGameUIAlertState.d.ts.map +1 -0
- package/lib/typescript/module/ui/gameUI/index.d.ts +18 -0
- package/lib/typescript/module/ui/gameUI/index.d.ts.map +1 -0
- package/lib/typescript/module/ui/index.d.ts +4 -0
- package/lib/typescript/module/ui/index.d.ts.map +1 -0
- package/lib/typescript/module/utils/displayValue.d.ts +16 -0
- package/lib/typescript/module/utils/displayValue.d.ts.map +1 -0
- package/lib/typescript/module/utils/formatting/dataFormatting.d.ts +31 -0
- package/lib/typescript/module/utils/formatting/dataFormatting.d.ts.map +1 -0
- package/lib/typescript/module/utils/formatting/httpFormatting.d.ts +34 -0
- package/lib/typescript/module/utils/formatting/httpFormatting.d.ts.map +1 -0
- package/lib/typescript/module/utils/formatting/index.d.ts +6 -0
- package/lib/typescript/module/utils/formatting/index.d.ts.map +1 -0
- package/lib/typescript/module/utils/getSafeAreaInsets.d.ts +14 -0
- package/lib/typescript/module/utils/getSafeAreaInsets.d.ts.map +1 -0
- package/lib/typescript/module/utils/index.d.ts +9 -0
- package/lib/typescript/module/utils/index.d.ts.map +1 -0
- package/lib/typescript/module/utils/loadOptionalModule.d.ts +27 -0
- package/lib/typescript/module/utils/loadOptionalModule.d.ts.map +1 -0
- package/lib/typescript/module/utils/minimalSuperJSON.d.ts +18 -0
- package/lib/typescript/module/utils/minimalSuperJSON.d.ts.map +1 -0
- package/lib/typescript/module/utils/persistentStorage.d.ts +45 -0
- package/lib/typescript/module/utils/persistentStorage.d.ts.map +1 -0
- package/lib/typescript/module/utils/safeAsyncStorage.d.ts +35 -0
- package/lib/typescript/module/utils/safeAsyncStorage.d.ts.map +1 -0
- package/lib/typescript/module/utils/safeStringify.d.ts +49 -0
- package/lib/typescript/module/utils/safeStringify.d.ts.map +1 -0
- package/lib/typescript/module/utils/time/formatRelativeTime.d.ts +8 -0
- package/lib/typescript/module/utils/time/formatRelativeTime.d.ts.map +1 -0
- package/lib/typescript/module/utils/time/index.d.ts +2 -0
- package/lib/typescript/module/utils/time/index.d.ts.map +1 -0
- package/lib/typescript/module/utils/typeHelpers.d.ts +52 -0
- package/lib/typescript/module/utils/typeHelpers.d.ts.map +1 -0
- package/lib/typescript/module/utils/valueFormatting.d.ts +39 -0
- package/lib/typescript/module/utils/valueFormatting.d.ts.map +1 -0
- package/package.json +172 -0
- package/scripts/detect-clipboard.js +137 -0
- package/scripts/detect-safe-area.js +130 -0
|
@@ -0,0 +1,1469 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* JsModal - Ultra-optimized for true 60FPS performance
|
|
5
|
+
*
|
|
6
|
+
* Achieves 60FPS by following the principles from the dial menu:
|
|
7
|
+
* 1. ALWAYS use native driver (useNativeDriver: true)
|
|
8
|
+
* 2. Use transforms instead of layout properties (translateY instead of height)
|
|
9
|
+
* 3. Use interpolation for all calculations (no JS thread math)
|
|
10
|
+
* 4. Minimize PanResponder JS work (direct setValue, no state updates)
|
|
11
|
+
*
|
|
12
|
+
* Structure follows SRP with each function doing ONE thing only.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { useState, useRef, useEffect, useMemo, useCallback, memo, isValidElement, cloneElement } from "react";
|
|
16
|
+
import { View, StyleSheet, TouchableWithoutFeedback, Dimensions, PanResponder, Animated, ScrollView, Text } from "react-native";
|
|
17
|
+
import { useSafeAreaInsets } from "./hooks/useSafeAreaInsets.js";
|
|
18
|
+
import { gameUIColors, buoyColors } from "./ui/gameUI/index.js";
|
|
19
|
+
import { DraggableHeader, ModalHintBanner, WindowControls } from "./ui/components/index.js";
|
|
20
|
+
import { safeGetItem, safeSetItem } from "./utils/safeAsyncStorage.js";
|
|
21
|
+
import { devToolsStorageKeys } from "./storage/devToolsStorageKeys.js";
|
|
22
|
+
import { useHintsDisabled } from "./context/index.js";
|
|
23
|
+
// ============================================================================
|
|
24
|
+
// CONSTANTS - Modal dimensions and configuration
|
|
25
|
+
// ============================================================================
|
|
26
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
27
|
+
const SCREEN = Dimensions.get("window");
|
|
28
|
+
const MIN_HEIGHT = 100;
|
|
29
|
+
const DEFAULT_HEIGHT = 400;
|
|
30
|
+
const FLOATING_WIDTH = SCREEN.width; // Full width
|
|
31
|
+
const FLOATING_HEIGHT = 500;
|
|
32
|
+
const FLOATING_MIN_WIDTH = SCREEN.width * 0.25; // 1/4 of screen width
|
|
33
|
+
const FLOATING_MIN_HEIGHT = 80; // Just a bit more than header height (60px header + 20px content)
|
|
34
|
+
|
|
35
|
+
// ============================================================================
|
|
36
|
+
// STORAGE - Modal state persistence with AsyncStorage
|
|
37
|
+
// ============================================================================
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Utility class for persisting modal state to AsyncStorage
|
|
41
|
+
*
|
|
42
|
+
* Handles saving and loading modal state including mode, dimensions,
|
|
43
|
+
* and position with memory caching for performance.
|
|
44
|
+
*/
|
|
45
|
+
class ModalStorage {
|
|
46
|
+
static memoryCache = {};
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Save modal state to AsyncStorage with memory caching
|
|
50
|
+
*
|
|
51
|
+
* @param key - Storage key for the modal state
|
|
52
|
+
* @param value - Modal state to persist
|
|
53
|
+
*/
|
|
54
|
+
static async save(key, value) {
|
|
55
|
+
try {
|
|
56
|
+
this.memoryCache[key] = value;
|
|
57
|
+
await safeSetItem(key, JSON.stringify(value));
|
|
58
|
+
} catch (error) {
|
|
59
|
+
// Failed to save modal state
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Load modal state from AsyncStorage with memory cache fallback
|
|
65
|
+
*
|
|
66
|
+
* @param key - Storage key for the modal state
|
|
67
|
+
* @returns Persisted modal state or null if not found
|
|
68
|
+
*/
|
|
69
|
+
static async load(key) {
|
|
70
|
+
try {
|
|
71
|
+
// Try memory cache first
|
|
72
|
+
if (this.memoryCache[key]) {
|
|
73
|
+
return this.memoryCache[key];
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// Load from storage (AsyncStorage or memory fallback)
|
|
77
|
+
const stored = await safeGetItem(key);
|
|
78
|
+
if (stored) {
|
|
79
|
+
const parsed = JSON.parse(stored);
|
|
80
|
+
this.memoryCache[key] = parsed;
|
|
81
|
+
return parsed;
|
|
82
|
+
}
|
|
83
|
+
} catch (error) {
|
|
84
|
+
// Failed to load modal state
|
|
85
|
+
}
|
|
86
|
+
return null;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// ============================================================================
|
|
91
|
+
// TYPE DEFINITIONS - Interface contracts for the modal
|
|
92
|
+
// ============================================================================
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Modal state that can be saved and restored when minimizing/restoring
|
|
96
|
+
*/
|
|
97
|
+
|
|
98
|
+
// ============================================================================
|
|
99
|
+
// ICON COMPONENTS - Visual indicators for modal controls
|
|
100
|
+
// ============================================================================
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* DragIndicator - Visual feedback for draggable areas
|
|
104
|
+
*/
|
|
105
|
+
const DragIndicator = /*#__PURE__*/memo(function DragIndicator({
|
|
106
|
+
isResizing,
|
|
107
|
+
mode,
|
|
108
|
+
hasCustomContent = false
|
|
109
|
+
}) {
|
|
110
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
111
|
+
style: [styles.dragIndicatorContainer, hasCustomContent && styles.dragIndicatorContainerCustom],
|
|
112
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
113
|
+
style: [styles.dragIndicator, mode === "floating" && styles.floatingDragIndicator, isResizing && styles.dragIndicatorActive]
|
|
114
|
+
}), isResizing && mode === "bottomSheet" && /*#__PURE__*/_jsxs(View, {
|
|
115
|
+
style: styles.resizeGripContainer,
|
|
116
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
117
|
+
style: styles.resizeGripLine
|
|
118
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
119
|
+
style: styles.resizeGripLine
|
|
120
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
121
|
+
style: styles.resizeGripLine
|
|
122
|
+
})]
|
|
123
|
+
})]
|
|
124
|
+
});
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* CornerHandle - Resize handle for floating mode corners
|
|
129
|
+
*/
|
|
130
|
+
const CornerHandle = /*#__PURE__*/memo(function CornerHandle({
|
|
131
|
+
position,
|
|
132
|
+
isActive
|
|
133
|
+
}) {
|
|
134
|
+
return /*#__PURE__*/_jsx(View, {
|
|
135
|
+
style: [styles.cornerHandle],
|
|
136
|
+
children: /*#__PURE__*/_jsx(View, {
|
|
137
|
+
style: [styles.handler, isActive && styles.handlerActive]
|
|
138
|
+
})
|
|
139
|
+
});
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* ModalHeader - Header bar with title, controls, and drag area
|
|
144
|
+
*/
|
|
145
|
+
|
|
146
|
+
const ModalHeader = /*#__PURE__*/memo(function ModalHeader({
|
|
147
|
+
header,
|
|
148
|
+
onClose,
|
|
149
|
+
onToggleMode,
|
|
150
|
+
onMinimize,
|
|
151
|
+
isResizing,
|
|
152
|
+
mode,
|
|
153
|
+
panHandlers
|
|
154
|
+
}) {
|
|
155
|
+
const lastTapRef = useRef(0);
|
|
156
|
+
const tapCountRef = useRef(0);
|
|
157
|
+
const tapTimeoutRef = useRef(null);
|
|
158
|
+
const handleHeaderTap = useCallback(() => {
|
|
159
|
+
const now = Date.now();
|
|
160
|
+
const timeSinceLastTap = now - lastTapRef.current;
|
|
161
|
+
|
|
162
|
+
// Reset tap count if more than 500ms since last tap
|
|
163
|
+
if (timeSinceLastTap > 500) {
|
|
164
|
+
tapCountRef.current = 0;
|
|
165
|
+
}
|
|
166
|
+
tapCountRef.current++;
|
|
167
|
+
lastTapRef.current = now;
|
|
168
|
+
|
|
169
|
+
// Clear existing timeout
|
|
170
|
+
if (tapTimeoutRef.current) {
|
|
171
|
+
clearTimeout(tapTimeoutRef.current);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
// Set timeout to process the tap gesture
|
|
175
|
+
tapTimeoutRef.current = setTimeout(() => {
|
|
176
|
+
if (tapCountRef.current === 2) {
|
|
177
|
+
// Double tap - toggle mode
|
|
178
|
+
onToggleMode();
|
|
179
|
+
} else if (tapCountRef.current >= 3) {
|
|
180
|
+
// Triple tap - minimize modal (if available)
|
|
181
|
+
if (onMinimize) {
|
|
182
|
+
onMinimize();
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
tapCountRef.current = 0;
|
|
186
|
+
}, 300);
|
|
187
|
+
}, [onToggleMode, onMinimize]);
|
|
188
|
+
|
|
189
|
+
// Clean up timeout on unmount
|
|
190
|
+
useEffect(() => {
|
|
191
|
+
return () => {
|
|
192
|
+
if (tapTimeoutRef.current) {
|
|
193
|
+
clearTimeout(tapTimeoutRef.current);
|
|
194
|
+
}
|
|
195
|
+
};
|
|
196
|
+
}, []);
|
|
197
|
+
const headerProps = panHandlers ? panHandlers : {};
|
|
198
|
+
// Disable tap handling when no panHandlers (i.e., when using DraggableHeader in floating mode)
|
|
199
|
+
const shouldHandleTap = !!panHandlers;
|
|
200
|
+
|
|
201
|
+
// If custom content is provided, check if it's a complete replacement
|
|
202
|
+
if (header?.customContent) {
|
|
203
|
+
// Check if the custom content is a complete header replacement (like CyberpunkModalHeader)
|
|
204
|
+
// by checking if it's a React element with specific props
|
|
205
|
+
const isCompleteReplacement = /*#__PURE__*/isValidElement(header.customContent) && typeof header.customContent.type === "function" && header.customContent.type.name === "CyberpunkModalHeader";
|
|
206
|
+
if (isCompleteReplacement) {
|
|
207
|
+
// Clone the element and pass the necessary props
|
|
208
|
+
return /*#__PURE__*/cloneElement(header.customContent, {
|
|
209
|
+
onToggleMode,
|
|
210
|
+
onClose,
|
|
211
|
+
mode,
|
|
212
|
+
panHandlers: headerProps,
|
|
213
|
+
showToggleButton: header?.showToggleButton !== false,
|
|
214
|
+
hideCloseButton: header?.hideCloseButton
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
// Otherwise, render custom content within the standard header structure
|
|
219
|
+
// Apply pan handlers to the outer View for dragging in floating mode
|
|
220
|
+
// If the custom content is a React element, inject onMinimize so it can trigger minimize
|
|
221
|
+
let customContentWithMinimize = header.customContent;
|
|
222
|
+
if (/*#__PURE__*/isValidElement(header.customContent) && onMinimize) {
|
|
223
|
+
customContentWithMinimize = /*#__PURE__*/cloneElement(header.customContent, {
|
|
224
|
+
onMinimize
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
const headerContent = /*#__PURE__*/_jsxs(View, {
|
|
228
|
+
style: styles.headerInner,
|
|
229
|
+
children: [/*#__PURE__*/_jsx(DragIndicator, {
|
|
230
|
+
isResizing: isResizing,
|
|
231
|
+
mode: mode,
|
|
232
|
+
hasCustomContent: true
|
|
233
|
+
}), customContentWithMinimize]
|
|
234
|
+
});
|
|
235
|
+
return /*#__PURE__*/_jsx(View, {
|
|
236
|
+
style: styles.header,
|
|
237
|
+
...headerProps,
|
|
238
|
+
children: shouldHandleTap ? /*#__PURE__*/_jsx(TouchableWithoutFeedback, {
|
|
239
|
+
onPress: handleHeaderTap,
|
|
240
|
+
children: headerContent
|
|
241
|
+
}) : headerContent
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
const headerContent = /*#__PURE__*/_jsxs(View, {
|
|
245
|
+
style: styles.headerInner,
|
|
246
|
+
children: [/*#__PURE__*/_jsx(DragIndicator, {
|
|
247
|
+
isResizing: isResizing,
|
|
248
|
+
mode: mode
|
|
249
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
250
|
+
style: styles.headerContent,
|
|
251
|
+
children: [header?.title && /*#__PURE__*/_jsx(Text, {
|
|
252
|
+
style: styles.headerTitle,
|
|
253
|
+
children: header.title
|
|
254
|
+
}), header?.subtitle && /*#__PURE__*/_jsx(Text, {
|
|
255
|
+
style: styles.headerSubtitle,
|
|
256
|
+
children: header.subtitle
|
|
257
|
+
})]
|
|
258
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
259
|
+
style: styles.headerHintText,
|
|
260
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
261
|
+
style: styles.hintText,
|
|
262
|
+
children: "Double tap: Toggle \u2022 Triple tap: Close"
|
|
263
|
+
})
|
|
264
|
+
})]
|
|
265
|
+
});
|
|
266
|
+
return /*#__PURE__*/_jsx(View, {
|
|
267
|
+
style: [styles.header, mode === "floating" && styles.floatingModeHeader],
|
|
268
|
+
...headerProps,
|
|
269
|
+
children: shouldHandleTap ? /*#__PURE__*/_jsx(TouchableWithoutFeedback, {
|
|
270
|
+
onPress: handleHeaderTap,
|
|
271
|
+
children: headerContent
|
|
272
|
+
}) : headerContent
|
|
273
|
+
});
|
|
274
|
+
});
|
|
275
|
+
|
|
276
|
+
// ============================================================================
|
|
277
|
+
// MAIN COMPONENT - Optimized for 60FPS with transforms and interpolation
|
|
278
|
+
// ============================================================================
|
|
279
|
+
/**
|
|
280
|
+
* JsModal - Ultra-optimized modal component for true 60FPS performance
|
|
281
|
+
*
|
|
282
|
+
* This modal component is designed for maximum performance using native driver
|
|
283
|
+
* animations, transforms instead of layout properties, and minimal JavaScript
|
|
284
|
+
* thread work. It supports two modes: bottom sheet and floating window.
|
|
285
|
+
*
|
|
286
|
+
* Key Performance Features:
|
|
287
|
+
* - Uses native driver for all animations (useNativeDriver: true)
|
|
288
|
+
* - Transform-based positioning instead of layout changes
|
|
289
|
+
* - Interpolation for all calculations on the native thread
|
|
290
|
+
* - Minimal PanResponder JavaScript work
|
|
291
|
+
* - State persistence with AsyncStorage
|
|
292
|
+
* - Drag and resize functionality in both modes
|
|
293
|
+
*
|
|
294
|
+
* @param props - Modal configuration and content
|
|
295
|
+
* @returns JSX.Element representing the modal
|
|
296
|
+
*
|
|
297
|
+
* @example
|
|
298
|
+
* ```typescript
|
|
299
|
+
* <JsModal
|
|
300
|
+
* visible={isVisible}
|
|
301
|
+
* onClose={() => setVisible(false)}
|
|
302
|
+
* header={{
|
|
303
|
+
* title: "Settings",
|
|
304
|
+
* subtitle: "Configure your preferences"
|
|
305
|
+
* }}
|
|
306
|
+
* persistenceKey="settings-modal"
|
|
307
|
+
* enablePersistence={true}
|
|
308
|
+
* >
|
|
309
|
+
* <SettingsContent />
|
|
310
|
+
* </JsModal>
|
|
311
|
+
* ```
|
|
312
|
+
*
|
|
313
|
+
* @performance All animations use native driver for 60FPS performance
|
|
314
|
+
* @performance Uses transform-based positioning for optimal rendering
|
|
315
|
+
* @performance Includes state persistence and restoration capabilities
|
|
316
|
+
*/
|
|
317
|
+
const JsModalComponent = ({
|
|
318
|
+
visible,
|
|
319
|
+
onClose,
|
|
320
|
+
children,
|
|
321
|
+
header,
|
|
322
|
+
styles: customStyles = {},
|
|
323
|
+
minHeight = MIN_HEIGHT,
|
|
324
|
+
maxHeight,
|
|
325
|
+
initialHeight = DEFAULT_HEIGHT,
|
|
326
|
+
animatedHeight: externalAnimatedHeight,
|
|
327
|
+
initialMode = "bottomSheet",
|
|
328
|
+
onModeChange,
|
|
329
|
+
persistenceKey,
|
|
330
|
+
enablePersistence = true,
|
|
331
|
+
initialFloatingPosition,
|
|
332
|
+
footer,
|
|
333
|
+
footerHeight = 0,
|
|
334
|
+
onBack,
|
|
335
|
+
onMinimize,
|
|
336
|
+
minimizeTargetPosition,
|
|
337
|
+
initialModalState,
|
|
338
|
+
zIndex
|
|
339
|
+
}) => {
|
|
340
|
+
const insets = useSafeAreaInsets();
|
|
341
|
+
const [isStateLoaded, setIsStateLoaded] = useState(!enablePersistence);
|
|
342
|
+
const [mode, setMode] = useState(initialMode);
|
|
343
|
+
const [isResizing, setIsResizing] = useState(false);
|
|
344
|
+
const [isDragging, setIsDragging] = useState(false);
|
|
345
|
+
const [panelHeight, setPanelHeight] = useState(initialHeight);
|
|
346
|
+
const [dimensions, setDimensions] = useState({
|
|
347
|
+
width: FLOATING_WIDTH,
|
|
348
|
+
height: FLOATING_HEIGHT,
|
|
349
|
+
top: (SCREEN.height - FLOATING_HEIGHT) / 2,
|
|
350
|
+
left: 0 // Flush with left edge
|
|
351
|
+
});
|
|
352
|
+
const [containerBounds] = useState({
|
|
353
|
+
width: SCREEN.width,
|
|
354
|
+
height: SCREEN.height
|
|
355
|
+
});
|
|
356
|
+
const [showHint, setShowHint] = useState(false);
|
|
357
|
+
const [hintLoaded, setHintLoaded] = useState(false);
|
|
358
|
+
const hintsDisabled = useHintsDisabled();
|
|
359
|
+
|
|
360
|
+
// ============================================================================
|
|
361
|
+
// ANIMATED VALUES - All using native driver
|
|
362
|
+
// ============================================================================
|
|
363
|
+
|
|
364
|
+
// Main visibility progress (0 = hidden, 1 = visible)
|
|
365
|
+
const visibilityProgress = useRef(new Animated.Value(0)).current;
|
|
366
|
+
|
|
367
|
+
// Bottom sheet specific - using translateY for performance!
|
|
368
|
+
const bottomSheetTranslateY = useRef(new Animated.Value(SCREEN.height)).current;
|
|
369
|
+
const dragOffset = useRef(new Animated.Value(0)).current;
|
|
370
|
+
|
|
371
|
+
// Height tracking for resize - actual position from bottom
|
|
372
|
+
const animatedBottomPosition = useRef(new Animated.Value(initialHeight)).current;
|
|
373
|
+
const currentHeightRef = useRef(initialHeight);
|
|
374
|
+
|
|
375
|
+
// Save state with debounce
|
|
376
|
+
useEffect(() => {
|
|
377
|
+
if (!enablePersistence || !persistenceKey || !isStateLoaded) return;
|
|
378
|
+
const timeoutId = setTimeout(() => {
|
|
379
|
+
ModalStorage.save(persistenceKey, {
|
|
380
|
+
mode,
|
|
381
|
+
panelHeight: currentHeightRef.current,
|
|
382
|
+
dimensions,
|
|
383
|
+
isVisible: visible
|
|
384
|
+
});
|
|
385
|
+
}, 500);
|
|
386
|
+
return () => clearTimeout(timeoutId);
|
|
387
|
+
}, [mode, panelHeight, dimensions, visible, persistenceKey, enablePersistence, isStateLoaded]);
|
|
388
|
+
|
|
389
|
+
// Sync with external height if provided
|
|
390
|
+
useEffect(() => {
|
|
391
|
+
// Height sync effect
|
|
392
|
+
if (externalAnimatedHeight && !isResizing) {
|
|
393
|
+
currentHeightRef.current = initialHeight;
|
|
394
|
+
externalAnimatedHeight.setValue(initialHeight);
|
|
395
|
+
// Set external height
|
|
396
|
+
}
|
|
397
|
+
}, [externalAnimatedHeight, initialHeight, isResizing]);
|
|
398
|
+
|
|
399
|
+
// Update refs when dimensions change
|
|
400
|
+
useEffect(() => {
|
|
401
|
+
currentDimensionsRef.current = dimensions;
|
|
402
|
+
}, [dimensions]);
|
|
403
|
+
|
|
404
|
+
// Floating mode animations - use initialFloatingPosition if provided
|
|
405
|
+
const floatingPosition = useRef(new Animated.ValueXY({
|
|
406
|
+
x: initialFloatingPosition?.x ?? 0,
|
|
407
|
+
// Flush with left edge
|
|
408
|
+
y: initialFloatingPosition?.y ?? (SCREEN.height - FLOATING_HEIGHT) / 2
|
|
409
|
+
})).current;
|
|
410
|
+
const floatingScale = useRef(new Animated.Value(0)).current;
|
|
411
|
+
const animatedWidth = useRef(new Animated.Value(FLOATING_WIDTH)).current;
|
|
412
|
+
const animatedFloatingHeight = useRef(new Animated.Value(FLOATING_HEIGHT)).current;
|
|
413
|
+
|
|
414
|
+
// Refs for resize handles
|
|
415
|
+
const currentDimensionsRef = useRef(dimensions);
|
|
416
|
+
const startDimensionsRef = useRef(dimensions);
|
|
417
|
+
const offsetX = useRef(0);
|
|
418
|
+
const offsetY = useRef(0);
|
|
419
|
+
const sHeight = useRef(0);
|
|
420
|
+
const sWidth = useRef(0);
|
|
421
|
+
|
|
422
|
+
// Load hint acknowledgment status on mount
|
|
423
|
+
useEffect(() => {
|
|
424
|
+
let mounted = true;
|
|
425
|
+
const loadHintStatus = async () => {
|
|
426
|
+
try {
|
|
427
|
+
const hintKey = devToolsStorageKeys.modal.hintAcknowledged();
|
|
428
|
+
const acknowledged = await safeGetItem(hintKey);
|
|
429
|
+
if (mounted) {
|
|
430
|
+
// Show hint if not acknowledged yet
|
|
431
|
+
setShowHint(acknowledged !== "true");
|
|
432
|
+
setHintLoaded(true);
|
|
433
|
+
}
|
|
434
|
+
} catch (error) {
|
|
435
|
+
// Failed to load hint status, default to showing hint
|
|
436
|
+
if (mounted) {
|
|
437
|
+
setShowHint(true);
|
|
438
|
+
setHintLoaded(true);
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
};
|
|
442
|
+
loadHintStatus();
|
|
443
|
+
return () => {
|
|
444
|
+
mounted = false;
|
|
445
|
+
};
|
|
446
|
+
}, []);
|
|
447
|
+
|
|
448
|
+
// Handle hint acknowledgment
|
|
449
|
+
const handleHintAcknowledge = useCallback(async () => {
|
|
450
|
+
try {
|
|
451
|
+
const hintKey = devToolsStorageKeys.modal.hintAcknowledged();
|
|
452
|
+
await safeSetItem(hintKey, "true");
|
|
453
|
+
setShowHint(false);
|
|
454
|
+
} catch (error) {
|
|
455
|
+
// Failed to save hint acknowledgment, just hide it locally
|
|
456
|
+
setShowHint(false);
|
|
457
|
+
}
|
|
458
|
+
}, []);
|
|
459
|
+
|
|
460
|
+
// Load persisted state on mount
|
|
461
|
+
useEffect(() => {
|
|
462
|
+
if (!enablePersistence || !persistenceKey) {
|
|
463
|
+
setIsStateLoaded(true);
|
|
464
|
+
return;
|
|
465
|
+
}
|
|
466
|
+
let mounted = true;
|
|
467
|
+
const loadState = async () => {
|
|
468
|
+
const savedState = await ModalStorage.load(persistenceKey);
|
|
469
|
+
if (mounted && savedState) {
|
|
470
|
+
// Restore mode
|
|
471
|
+
if (savedState.mode) {
|
|
472
|
+
setMode(savedState.mode);
|
|
473
|
+
// Notify parent of loaded mode
|
|
474
|
+
onModeChange?.(savedState.mode);
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
// Restore bottom sheet height
|
|
478
|
+
if (savedState.panelHeight) {
|
|
479
|
+
setPanelHeight(savedState.panelHeight);
|
|
480
|
+
currentHeightRef.current = savedState.panelHeight;
|
|
481
|
+
animatedBottomPosition.setValue(savedState.panelHeight);
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
// Restore floating dimensions and position
|
|
485
|
+
if (savedState.dimensions) {
|
|
486
|
+
setDimensions(savedState.dimensions);
|
|
487
|
+
floatingPosition.setValue({
|
|
488
|
+
x: savedState.dimensions.left,
|
|
489
|
+
y: savedState.dimensions.top
|
|
490
|
+
});
|
|
491
|
+
animatedWidth.setValue(savedState.dimensions.width);
|
|
492
|
+
animatedFloatingHeight.setValue(savedState.dimensions.height);
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
if (mounted) setIsStateLoaded(true);
|
|
496
|
+
};
|
|
497
|
+
loadState();
|
|
498
|
+
return () => {
|
|
499
|
+
mounted = false;
|
|
500
|
+
};
|
|
501
|
+
}, [persistenceKey, enablePersistence, onModeChange, animatedBottomPosition, animatedFloatingHeight, animatedWidth, floatingPosition]);
|
|
502
|
+
|
|
503
|
+
// Cleanup on unmount
|
|
504
|
+
useEffect(() => {
|
|
505
|
+
// Mount/Unmount effect
|
|
506
|
+
return () => {
|
|
507
|
+
// Stop all animations and reset when component unmounts
|
|
508
|
+
visibilityProgress.stopAnimation();
|
|
509
|
+
bottomSheetTranslateY.stopAnimation();
|
|
510
|
+
floatingScale.stopAnimation();
|
|
511
|
+
dragOffset.stopAnimation();
|
|
512
|
+
animatedBottomPosition.stopAnimation();
|
|
513
|
+
floatingPosition.stopAnimation();
|
|
514
|
+
animatedWidth.stopAnimation();
|
|
515
|
+
animatedFloatingHeight.stopAnimation();
|
|
516
|
+
|
|
517
|
+
// Reset to initial values
|
|
518
|
+
visibilityProgress.setValue(0);
|
|
519
|
+
bottomSheetTranslateY.setValue(SCREEN.height);
|
|
520
|
+
floatingScale.setValue(0);
|
|
521
|
+
dragOffset.setValue(0);
|
|
522
|
+
animatedBottomPosition.setValue(initialHeight);
|
|
523
|
+
currentHeightRef.current = initialHeight;
|
|
524
|
+
};
|
|
525
|
+
}, []);
|
|
526
|
+
|
|
527
|
+
// ============================================================================
|
|
528
|
+
// INTERPOLATIONS - All math done natively!
|
|
529
|
+
// ============================================================================
|
|
530
|
+
|
|
531
|
+
// Opacity interpolation for smooth fade
|
|
532
|
+
const modalOpacity = visibilityProgress.interpolate({
|
|
533
|
+
inputRange: [0, 1],
|
|
534
|
+
outputRange: [0, 1],
|
|
535
|
+
extrapolate: "clamp"
|
|
536
|
+
});
|
|
537
|
+
|
|
538
|
+
// ============================================================================
|
|
539
|
+
// REFS for values we need to track
|
|
540
|
+
// ============================================================================
|
|
541
|
+
const isExternallyControlled = !!externalAnimatedHeight;
|
|
542
|
+
const effectiveMaxHeight = maxHeight || SCREEN.height - insets.top;
|
|
543
|
+
|
|
544
|
+
// Mode toggle handler
|
|
545
|
+
/**
|
|
546
|
+
* Toggle between bottom sheet and floating modal modes
|
|
547
|
+
*
|
|
548
|
+
* Clears active dragging and resizing states to prevent visual artifacts
|
|
549
|
+
* when switching between modes with different interaction patterns.
|
|
550
|
+
*/
|
|
551
|
+
const toggleMode = useCallback(() => {
|
|
552
|
+
// Avoid carrying active styling across modes
|
|
553
|
+
setIsDragging(false);
|
|
554
|
+
setIsResizing(false);
|
|
555
|
+
const newMode = mode === "bottomSheet" ? "floating" : "bottomSheet";
|
|
556
|
+
setMode(newMode);
|
|
557
|
+
onModeChange?.(newMode);
|
|
558
|
+
}, [mode, onModeChange]);
|
|
559
|
+
|
|
560
|
+
// Belt-and-suspenders: also clear flags when mode changes
|
|
561
|
+
useEffect(() => {
|
|
562
|
+
setIsDragging(false);
|
|
563
|
+
setIsResizing(false);
|
|
564
|
+
}, [mode]);
|
|
565
|
+
|
|
566
|
+
// Minimize handler - captures current state and animates out
|
|
567
|
+
const handleMinimize = useCallback(() => {
|
|
568
|
+
if (!onMinimize) return;
|
|
569
|
+
|
|
570
|
+
// Capture current modal state for restoration
|
|
571
|
+
const currentState = {
|
|
572
|
+
mode,
|
|
573
|
+
panelHeight: currentHeightRef.current,
|
|
574
|
+
floatingPosition: {
|
|
575
|
+
x: currentDimensionsRef.current.left,
|
|
576
|
+
y: currentDimensionsRef.current.top
|
|
577
|
+
},
|
|
578
|
+
floatingDimensions: {
|
|
579
|
+
width: currentDimensionsRef.current.width,
|
|
580
|
+
height: currentDimensionsRef.current.height
|
|
581
|
+
}
|
|
582
|
+
};
|
|
583
|
+
|
|
584
|
+
// Animate modal shrinking toward target position
|
|
585
|
+
const targetX = minimizeTargetPosition?.x ?? SCREEN.width - 50;
|
|
586
|
+
const targetY = minimizeTargetPosition?.y ?? SCREEN.height - 150;
|
|
587
|
+
|
|
588
|
+
// Calculate animation based on current mode
|
|
589
|
+
if (mode === "bottomSheet") {
|
|
590
|
+
// Animate bottom sheet shrinking and moving toward target
|
|
591
|
+
Animated.parallel([Animated.timing(visibilityProgress, {
|
|
592
|
+
toValue: 0,
|
|
593
|
+
duration: 300,
|
|
594
|
+
useNativeDriver: true
|
|
595
|
+
}), Animated.timing(bottomSheetTranslateY, {
|
|
596
|
+
toValue: SCREEN.height,
|
|
597
|
+
duration: 300,
|
|
598
|
+
useNativeDriver: true
|
|
599
|
+
})]).start(() => {
|
|
600
|
+
onMinimize(currentState);
|
|
601
|
+
});
|
|
602
|
+
} else {
|
|
603
|
+
// Floating mode - animate scale and position toward icon
|
|
604
|
+
Animated.parallel([Animated.timing(floatingScale, {
|
|
605
|
+
toValue: 0,
|
|
606
|
+
duration: 300,
|
|
607
|
+
useNativeDriver: true
|
|
608
|
+
}), Animated.timing(visibilityProgress, {
|
|
609
|
+
toValue: 0,
|
|
610
|
+
duration: 300,
|
|
611
|
+
useNativeDriver: true
|
|
612
|
+
}), Animated.timing(floatingPosition, {
|
|
613
|
+
toValue: {
|
|
614
|
+
x: targetX,
|
|
615
|
+
y: targetY
|
|
616
|
+
},
|
|
617
|
+
duration: 300,
|
|
618
|
+
useNativeDriver: true
|
|
619
|
+
})]).start(() => {
|
|
620
|
+
onMinimize(currentState);
|
|
621
|
+
});
|
|
622
|
+
}
|
|
623
|
+
}, [mode, onMinimize, minimizeTargetPosition, visibilityProgress, bottomSheetTranslateY, floatingScale, floatingPosition]);
|
|
624
|
+
|
|
625
|
+
// Apply initial modal state when restoring from minimized
|
|
626
|
+
useEffect(() => {
|
|
627
|
+
if (!initialModalState) return;
|
|
628
|
+
|
|
629
|
+
// Restore mode
|
|
630
|
+
if (initialModalState.mode) {
|
|
631
|
+
setMode(initialModalState.mode);
|
|
632
|
+
onModeChange?.(initialModalState.mode);
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
// Restore bottom sheet height
|
|
636
|
+
if (initialModalState.panelHeight) {
|
|
637
|
+
setPanelHeight(initialModalState.panelHeight);
|
|
638
|
+
currentHeightRef.current = initialModalState.panelHeight;
|
|
639
|
+
animatedBottomPosition.setValue(initialModalState.panelHeight);
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
// Restore floating dimensions and position
|
|
643
|
+
if (initialModalState.floatingDimensions && initialModalState.floatingPosition) {
|
|
644
|
+
const newDimensions = {
|
|
645
|
+
width: initialModalState.floatingDimensions.width,
|
|
646
|
+
height: initialModalState.floatingDimensions.height,
|
|
647
|
+
top: initialModalState.floatingPosition.y,
|
|
648
|
+
left: initialModalState.floatingPosition.x
|
|
649
|
+
};
|
|
650
|
+
setDimensions(newDimensions);
|
|
651
|
+
floatingPosition.setValue({
|
|
652
|
+
x: initialModalState.floatingPosition.x,
|
|
653
|
+
y: initialModalState.floatingPosition.y
|
|
654
|
+
});
|
|
655
|
+
animatedWidth.setValue(initialModalState.floatingDimensions.width);
|
|
656
|
+
animatedFloatingHeight.setValue(initialModalState.floatingDimensions.height);
|
|
657
|
+
}
|
|
658
|
+
}, [initialModalState]);
|
|
659
|
+
|
|
660
|
+
// ============================================================================
|
|
661
|
+
// EFFECT: Visibility Animations - All using native driver!
|
|
662
|
+
// ============================================================================
|
|
663
|
+
useEffect(() => {
|
|
664
|
+
// Visibility effect
|
|
665
|
+
let openAnimation = null;
|
|
666
|
+
let closeAnimation = null;
|
|
667
|
+
if (visible) {
|
|
668
|
+
// Reset position if needed and then open
|
|
669
|
+
bottomSheetTranslateY.setValue(SCREEN.height);
|
|
670
|
+
visibilityProgress.setValue(0);
|
|
671
|
+
|
|
672
|
+
// Open animations
|
|
673
|
+
if (mode === "bottomSheet") {
|
|
674
|
+
// Parallel animations for smooth opening
|
|
675
|
+
openAnimation = Animated.parallel([
|
|
676
|
+
// Slide up from bottom
|
|
677
|
+
Animated.spring(bottomSheetTranslateY, {
|
|
678
|
+
toValue: 0,
|
|
679
|
+
tension: 180,
|
|
680
|
+
friction: 22,
|
|
681
|
+
useNativeDriver: true
|
|
682
|
+
}),
|
|
683
|
+
// Fade in backdrop
|
|
684
|
+
Animated.timing(visibilityProgress, {
|
|
685
|
+
toValue: 1,
|
|
686
|
+
duration: 200,
|
|
687
|
+
useNativeDriver: true
|
|
688
|
+
})]);
|
|
689
|
+
openAnimation.start();
|
|
690
|
+
} else {
|
|
691
|
+
// Floating mode entrance - simple fade without scale pop
|
|
692
|
+
floatingScale.setValue(1); // Set scale to 1 directly, no animation
|
|
693
|
+
openAnimation = Animated.timing(visibilityProgress, {
|
|
694
|
+
toValue: 1,
|
|
695
|
+
duration: 200,
|
|
696
|
+
useNativeDriver: true
|
|
697
|
+
});
|
|
698
|
+
openAnimation.start();
|
|
699
|
+
}
|
|
700
|
+
} else {
|
|
701
|
+
// Close animations
|
|
702
|
+
if (mode === "bottomSheet") {
|
|
703
|
+
closeAnimation = Animated.parallel([
|
|
704
|
+
// Slide down
|
|
705
|
+
Animated.spring(bottomSheetTranslateY, {
|
|
706
|
+
toValue: SCREEN.height,
|
|
707
|
+
tension: 180,
|
|
708
|
+
friction: 22,
|
|
709
|
+
useNativeDriver: true
|
|
710
|
+
}),
|
|
711
|
+
// Fade out backdrop
|
|
712
|
+
Animated.timing(visibilityProgress, {
|
|
713
|
+
toValue: 0,
|
|
714
|
+
duration: 200,
|
|
715
|
+
useNativeDriver: true
|
|
716
|
+
})]);
|
|
717
|
+
closeAnimation.start();
|
|
718
|
+
} else {
|
|
719
|
+
// Floating mode exit - simple fade without scale
|
|
720
|
+
closeAnimation = Animated.timing(visibilityProgress, {
|
|
721
|
+
toValue: 0,
|
|
722
|
+
duration: 200,
|
|
723
|
+
useNativeDriver: true
|
|
724
|
+
});
|
|
725
|
+
closeAnimation.start();
|
|
726
|
+
}
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
// Cleanup function - only stop animations, don't reset values
|
|
730
|
+
return () => {
|
|
731
|
+
// Cleanup animations
|
|
732
|
+
if (openAnimation) {
|
|
733
|
+
openAnimation.stop();
|
|
734
|
+
// Stopped open animation
|
|
735
|
+
}
|
|
736
|
+
if (closeAnimation) {
|
|
737
|
+
closeAnimation.stop();
|
|
738
|
+
// Stopped close animation
|
|
739
|
+
}
|
|
740
|
+
};
|
|
741
|
+
}, [visible, mode, visibilityProgress, bottomSheetTranslateY, floatingScale, externalAnimatedHeight]); // Removed initialHeight to prevent animation restarts on height changes
|
|
742
|
+
|
|
743
|
+
// ============================================================================
|
|
744
|
+
// OPTIMIZED PAN RESPONDER: Bottom Sheet Resize
|
|
745
|
+
// Following the documentation pattern for proper resize
|
|
746
|
+
// ============================================================================
|
|
747
|
+
const headerTouchOffsetRef = useRef(0);
|
|
748
|
+
const bottomSheetPanResponder = useMemo(() => PanResponder.create({
|
|
749
|
+
onStartShouldSetPanResponder: () => !isExternallyControlled && mode === "bottomSheet",
|
|
750
|
+
onMoveShouldSetPanResponder: (evt, gestureState) => !isExternallyControlled && mode === "bottomSheet" && Math.abs(gestureState.dy) > 3,
|
|
751
|
+
onPanResponderTerminationRequest: () => false,
|
|
752
|
+
onPanResponderGrant: evt => {
|
|
753
|
+
setIsResizing(true);
|
|
754
|
+
|
|
755
|
+
// Where inside the header the finger grabbed
|
|
756
|
+
headerTouchOffsetRef.current = evt.nativeEvent.locationY || 0;
|
|
757
|
+
|
|
758
|
+
// Stop any in-flight animations so we start from truth
|
|
759
|
+
animatedBottomPosition.stopAnimation(val => {
|
|
760
|
+
currentHeightRef.current = val;
|
|
761
|
+
});
|
|
762
|
+
bottomSheetTranslateY.stopAnimation();
|
|
763
|
+
},
|
|
764
|
+
onPanResponderMove: evt => {
|
|
765
|
+
// Absolute finger anchoring: sheet top should match finger (minus header offset)
|
|
766
|
+
const sheetTop = evt.nativeEvent.pageY - headerTouchOffsetRef.current;
|
|
767
|
+
// Height is from bottom of screen to sheetTop
|
|
768
|
+
let targetHeight = SCREEN.height - sheetTop;
|
|
769
|
+
|
|
770
|
+
// Clamp
|
|
771
|
+
targetHeight = Math.max(minHeight, Math.min(targetHeight, effectiveMaxHeight));
|
|
772
|
+
|
|
773
|
+
// Push to UI (no React state!)
|
|
774
|
+
animatedBottomPosition.setValue(targetHeight);
|
|
775
|
+
currentHeightRef.current = targetHeight;
|
|
776
|
+
if (externalAnimatedHeight) {
|
|
777
|
+
externalAnimatedHeight.setValue(targetHeight);
|
|
778
|
+
}
|
|
779
|
+
},
|
|
780
|
+
onPanResponderRelease: (evt, gestureState) => {
|
|
781
|
+
setIsResizing(false);
|
|
782
|
+
const finalHeight = currentHeightRef.current;
|
|
783
|
+
|
|
784
|
+
// Optional: close with fast downward swipe
|
|
785
|
+
const shouldClose = gestureState.vy > 0.8 && gestureState.dy > 50 || gestureState.dy > 150 && finalHeight <= minHeight;
|
|
786
|
+
if (shouldClose) {
|
|
787
|
+
Animated.parallel([Animated.timing(visibilityProgress, {
|
|
788
|
+
toValue: 0,
|
|
789
|
+
duration: 200,
|
|
790
|
+
useNativeDriver: true
|
|
791
|
+
}), Animated.spring(bottomSheetTranslateY, {
|
|
792
|
+
toValue: SCREEN.height,
|
|
793
|
+
tension: 180,
|
|
794
|
+
friction: 22,
|
|
795
|
+
useNativeDriver: true
|
|
796
|
+
})]).start(() => onClose());
|
|
797
|
+
return;
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
// We're already at the finger-tracked height; avoid re-animating it.
|
|
801
|
+
setPanelHeight(finalHeight);
|
|
802
|
+
if (externalAnimatedHeight) externalAnimatedHeight.setValue(finalHeight);
|
|
803
|
+
},
|
|
804
|
+
onPanResponderTerminate: () => {
|
|
805
|
+
setIsResizing(false);
|
|
806
|
+
// snap back to the last stable height if you want; otherwise no-op
|
|
807
|
+
}
|
|
808
|
+
}), [mode, isExternallyControlled, minHeight, effectiveMaxHeight, animatedBottomPosition, externalAnimatedHeight, bottomSheetTranslateY, visibilityProgress, onClose]);
|
|
809
|
+
|
|
810
|
+
// ============================================================================
|
|
811
|
+
// CREATE RESIZE HANDLER: For 4-corner resize in floating mode (fixed geometry)
|
|
812
|
+
// ============================================================================
|
|
813
|
+
/**
|
|
814
|
+
* Create a PanResponder for handling corner-based resizing in floating mode
|
|
815
|
+
*
|
|
816
|
+
* This function generates resize handlers for each corner that allow users to
|
|
817
|
+
* resize the floating modal by dragging from any corner. It includes boundary
|
|
818
|
+
* checking and minimum size constraints.
|
|
819
|
+
*
|
|
820
|
+
* @param corner - Which corner this handler is for
|
|
821
|
+
* @returns PanResponder configured for that corner's resize behavior
|
|
822
|
+
*
|
|
823
|
+
* @performance Uses direct animated value updates for smooth resizing
|
|
824
|
+
* @performance Includes safe area boundary checking for all corners
|
|
825
|
+
*/
|
|
826
|
+
const createResizeHandler = useCallback(corner => {
|
|
827
|
+
let didResize = false;
|
|
828
|
+
return PanResponder.create({
|
|
829
|
+
onStartShouldSetPanResponder: () => mode === "floating",
|
|
830
|
+
onMoveShouldSetPanResponder: () => mode === "floating",
|
|
831
|
+
onPanResponderGrant: () => {
|
|
832
|
+
didResize = false;
|
|
833
|
+
const currentDims = currentDimensionsRef.current;
|
|
834
|
+
|
|
835
|
+
// If any animation is in-flight, stop and capture final XY to keep math consistent
|
|
836
|
+
floatingPosition.stopAnimation(({
|
|
837
|
+
x,
|
|
838
|
+
y
|
|
839
|
+
}) => {
|
|
840
|
+
floatingPosition.setValue({
|
|
841
|
+
x,
|
|
842
|
+
y
|
|
843
|
+
});
|
|
844
|
+
});
|
|
845
|
+
setIsResizing(true);
|
|
846
|
+
// Snapshot starting rect
|
|
847
|
+
startDimensionsRef.current = {
|
|
848
|
+
...currentDims
|
|
849
|
+
};
|
|
850
|
+
|
|
851
|
+
// Keep your existing refs up-to-date (not strictly needed now, but harmless)
|
|
852
|
+
sHeight.current = currentDims.height;
|
|
853
|
+
sWidth.current = currentDims.width;
|
|
854
|
+
offsetX.current = currentDims.left;
|
|
855
|
+
offsetY.current = currentDims.top;
|
|
856
|
+
},
|
|
857
|
+
onPanResponderMove: (_evt, gestureState) => {
|
|
858
|
+
const {
|
|
859
|
+
dx,
|
|
860
|
+
dy
|
|
861
|
+
} = gestureState;
|
|
862
|
+
if (Math.abs(dx) < 0.5 && Math.abs(dy) < 0.5) return;
|
|
863
|
+
didResize = true;
|
|
864
|
+
// Safe-area–aware bounds
|
|
865
|
+
const minLeft = Math.max(0, insets.left || 0);
|
|
866
|
+
const maxRight = containerBounds.width - Math.max(0, insets.right || 0);
|
|
867
|
+
const minTop = Math.max(0, insets.top || 0);
|
|
868
|
+
const maxBottom = containerBounds.height - Math.max(0, insets.bottom || 0);
|
|
869
|
+
const start = startDimensionsRef.current;
|
|
870
|
+
const startRight = start.left + start.width;
|
|
871
|
+
const startBottom = start.top + start.height;
|
|
872
|
+
let left = start.left;
|
|
873
|
+
let top = start.top;
|
|
874
|
+
let right = startRight;
|
|
875
|
+
let bottom = startBottom;
|
|
876
|
+
switch (corner) {
|
|
877
|
+
case "topLeft":
|
|
878
|
+
{
|
|
879
|
+
// Move left & top; anchor right & bottom
|
|
880
|
+
const newLeft = Math.max(minLeft, Math.min(start.left + dx, startRight - FLOATING_MIN_WIDTH));
|
|
881
|
+
const newTop = Math.max(minTop, Math.min(start.top + dy, startBottom - FLOATING_MIN_HEIGHT));
|
|
882
|
+
left = newLeft;
|
|
883
|
+
top = newTop;
|
|
884
|
+
right = startRight;
|
|
885
|
+
bottom = startBottom;
|
|
886
|
+
break;
|
|
887
|
+
}
|
|
888
|
+
case "topRight":
|
|
889
|
+
{
|
|
890
|
+
// Move right & top; anchor left & bottom
|
|
891
|
+
const newRight = Math.min(maxRight, Math.max(startRight + dx, start.left + FLOATING_MIN_WIDTH));
|
|
892
|
+
const newTop = Math.max(minTop, Math.min(start.top + dy, startBottom - FLOATING_MIN_HEIGHT));
|
|
893
|
+
left = start.left;
|
|
894
|
+
top = newTop;
|
|
895
|
+
right = newRight;
|
|
896
|
+
bottom = startBottom;
|
|
897
|
+
break;
|
|
898
|
+
}
|
|
899
|
+
case "bottomLeft":
|
|
900
|
+
{
|
|
901
|
+
// Move left & bottom; anchor right & top
|
|
902
|
+
const newLeft = Math.max(minLeft, Math.min(start.left + dx, startRight - FLOATING_MIN_WIDTH));
|
|
903
|
+
const newBottom = Math.min(maxBottom, Math.max(startBottom + dy, start.top + FLOATING_MIN_HEIGHT));
|
|
904
|
+
left = newLeft;
|
|
905
|
+
top = start.top;
|
|
906
|
+
right = startRight;
|
|
907
|
+
bottom = newBottom;
|
|
908
|
+
break;
|
|
909
|
+
}
|
|
910
|
+
case "bottomRight":
|
|
911
|
+
{
|
|
912
|
+
// Move right & bottom; anchor left & top
|
|
913
|
+
const newRight = Math.min(maxRight, Math.max(startRight + dx, start.left + FLOATING_MIN_WIDTH));
|
|
914
|
+
const newBottom = Math.min(maxBottom, Math.max(startBottom + dy, start.top + FLOATING_MIN_HEIGHT));
|
|
915
|
+
left = start.left;
|
|
916
|
+
top = start.top;
|
|
917
|
+
right = newRight;
|
|
918
|
+
bottom = newBottom;
|
|
919
|
+
break;
|
|
920
|
+
}
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
// Derive width/height from the edges
|
|
924
|
+
const updatedWidth = Math.max(FLOATING_MIN_WIDTH, right - left);
|
|
925
|
+
const updatedHeight = Math.max(FLOATING_MIN_HEIGHT, bottom - top);
|
|
926
|
+
|
|
927
|
+
// Push to UI
|
|
928
|
+
setDimensions({
|
|
929
|
+
width: updatedWidth,
|
|
930
|
+
height: updatedHeight,
|
|
931
|
+
left,
|
|
932
|
+
top
|
|
933
|
+
});
|
|
934
|
+
|
|
935
|
+
// Keep animated values in sync for your transforms
|
|
936
|
+
animatedWidth.setValue(updatedWidth);
|
|
937
|
+
animatedFloatingHeight.setValue(updatedHeight);
|
|
938
|
+
floatingPosition.setValue({
|
|
939
|
+
x: left,
|
|
940
|
+
y: top
|
|
941
|
+
});
|
|
942
|
+
|
|
943
|
+
// Cache
|
|
944
|
+
currentDimensionsRef.current = {
|
|
945
|
+
width: updatedWidth,
|
|
946
|
+
height: updatedHeight,
|
|
947
|
+
left,
|
|
948
|
+
top
|
|
949
|
+
};
|
|
950
|
+
},
|
|
951
|
+
onPanResponderRelease: () => {
|
|
952
|
+
setIsResizing(false);
|
|
953
|
+
didResize = false;
|
|
954
|
+
// currentDimensionsRef already holds the last values
|
|
955
|
+
setDimensions(currentDimensionsRef.current);
|
|
956
|
+
},
|
|
957
|
+
onPanResponderTerminate: () => {
|
|
958
|
+
setIsResizing(false);
|
|
959
|
+
didResize = false;
|
|
960
|
+
}
|
|
961
|
+
});
|
|
962
|
+
}, [mode, containerBounds, insets.left, insets.right, insets.top, insets.bottom, floatingPosition, animatedWidth, animatedFloatingHeight, onClose, onBack]);
|
|
963
|
+
const resizeHandlers = useMemo(() => {
|
|
964
|
+
return {
|
|
965
|
+
topLeft: createResizeHandler("topLeft"),
|
|
966
|
+
topRight: createResizeHandler("topRight"),
|
|
967
|
+
bottomLeft: createResizeHandler("bottomLeft"),
|
|
968
|
+
bottomRight: createResizeHandler("bottomRight")
|
|
969
|
+
};
|
|
970
|
+
}, [createResizeHandler]);
|
|
971
|
+
|
|
972
|
+
// ============================================================================
|
|
973
|
+
// Floating Mode Drag Handlers for DraggableHeader
|
|
974
|
+
// ============================================================================
|
|
975
|
+
const handleFloatingDragStart = useCallback(() => {
|
|
976
|
+
setIsDragging(true);
|
|
977
|
+
}, []);
|
|
978
|
+
const handleFloatingDragEnd = useCallback(finalPosition => {
|
|
979
|
+
setIsDragging(false);
|
|
980
|
+
|
|
981
|
+
// Update dimensions state to match final position
|
|
982
|
+
const currentDims = currentDimensionsRef.current;
|
|
983
|
+
const newDimensions = {
|
|
984
|
+
...currentDims,
|
|
985
|
+
left: finalPosition.x,
|
|
986
|
+
top: finalPosition.y
|
|
987
|
+
};
|
|
988
|
+
setDimensions(newDimensions);
|
|
989
|
+
}, []);
|
|
990
|
+
|
|
991
|
+
// Track taps for double/triple tap functionality
|
|
992
|
+
const lastTapRef = useRef(0);
|
|
993
|
+
const tapCountRef = useRef(0);
|
|
994
|
+
const tapTimeoutRef = useRef(null);
|
|
995
|
+
const handleFloatingTap = useCallback(() => {
|
|
996
|
+
const now = Date.now();
|
|
997
|
+
const timeSinceLastTap = now - lastTapRef.current;
|
|
998
|
+
|
|
999
|
+
// Reset tap count if more than 500ms since last tap
|
|
1000
|
+
if (timeSinceLastTap > 500) {
|
|
1001
|
+
tapCountRef.current = 0;
|
|
1002
|
+
}
|
|
1003
|
+
tapCountRef.current++;
|
|
1004
|
+
lastTapRef.current = now;
|
|
1005
|
+
|
|
1006
|
+
// Clear existing timeout
|
|
1007
|
+
if (tapTimeoutRef.current) {
|
|
1008
|
+
clearTimeout(tapTimeoutRef.current);
|
|
1009
|
+
}
|
|
1010
|
+
|
|
1011
|
+
// Set timeout to process the tap gesture
|
|
1012
|
+
tapTimeoutRef.current = setTimeout(() => {
|
|
1013
|
+
if (tapCountRef.current === 2) {
|
|
1014
|
+
// Double tap - toggle mode
|
|
1015
|
+
toggleMode();
|
|
1016
|
+
} else if (tapCountRef.current >= 3) {
|
|
1017
|
+
// Triple tap - minimize modal (if available)
|
|
1018
|
+
if (onMinimize) {
|
|
1019
|
+
handleMinimize();
|
|
1020
|
+
}
|
|
1021
|
+
}
|
|
1022
|
+
tapCountRef.current = 0;
|
|
1023
|
+
}, 300);
|
|
1024
|
+
}, [toggleMode, onMinimize, handleMinimize]);
|
|
1025
|
+
|
|
1026
|
+
// Clean up timeout on unmount for main component tap handler
|
|
1027
|
+
useEffect(() => {
|
|
1028
|
+
return () => {
|
|
1029
|
+
if (tapTimeoutRef.current) {
|
|
1030
|
+
clearTimeout(tapTimeoutRef.current);
|
|
1031
|
+
}
|
|
1032
|
+
};
|
|
1033
|
+
}, []);
|
|
1034
|
+
|
|
1035
|
+
// ============================================================================
|
|
1036
|
+
// RENDER: Modal UI with transform-based animations
|
|
1037
|
+
// ============================================================================
|
|
1038
|
+
|
|
1039
|
+
// When not visible, render off-screen to keep children mounted (preserves state/listeners)
|
|
1040
|
+
// This is similar to how React Navigation keeps screens mounted
|
|
1041
|
+
if (!visible) {
|
|
1042
|
+
return /*#__PURE__*/_jsx(View, {
|
|
1043
|
+
style: styles.hiddenContainer,
|
|
1044
|
+
pointerEvents: "none",
|
|
1045
|
+
accessibilityElementsHidden: true,
|
|
1046
|
+
importantForAccessibility: "no-hide-descendants",
|
|
1047
|
+
children: children
|
|
1048
|
+
});
|
|
1049
|
+
}
|
|
1050
|
+
|
|
1051
|
+
// Render floating mode
|
|
1052
|
+
if (mode === "floating") {
|
|
1053
|
+
return /*#__PURE__*/_jsxs(Animated.View, {
|
|
1054
|
+
nativeID: "jsmodal-root",
|
|
1055
|
+
style: [styles.floatingModal, {
|
|
1056
|
+
width: dimensions.width,
|
|
1057
|
+
// Use state dimensions for real-time updates
|
|
1058
|
+
height: dimensions.height,
|
|
1059
|
+
opacity: modalOpacity,
|
|
1060
|
+
transform: [{
|
|
1061
|
+
translateX: floatingPosition.x
|
|
1062
|
+
}, {
|
|
1063
|
+
translateY: floatingPosition.y
|
|
1064
|
+
}],
|
|
1065
|
+
...(zIndex !== undefined && {
|
|
1066
|
+
zIndex
|
|
1067
|
+
})
|
|
1068
|
+
}, (isDragging || isResizing) && styles.floatingModalDragging, customStyles.container],
|
|
1069
|
+
children: [/*#__PURE__*/_jsx(DraggableHeader, {
|
|
1070
|
+
position: floatingPosition,
|
|
1071
|
+
onDragStart: handleFloatingDragStart,
|
|
1072
|
+
onDragEnd: handleFloatingDragEnd,
|
|
1073
|
+
onTap: handleFloatingTap,
|
|
1074
|
+
containerBounds: containerBounds,
|
|
1075
|
+
elementSize: dimensions,
|
|
1076
|
+
minPosition: {
|
|
1077
|
+
x: 0,
|
|
1078
|
+
y: insets.top
|
|
1079
|
+
},
|
|
1080
|
+
style: styles.floatingHeader,
|
|
1081
|
+
enabled: mode === "floating" && !isResizing,
|
|
1082
|
+
children: /*#__PURE__*/_jsx(ModalHeader, {
|
|
1083
|
+
header: header,
|
|
1084
|
+
onClose: onClose,
|
|
1085
|
+
onToggleMode: toggleMode,
|
|
1086
|
+
onMinimize: onMinimize ? handleMinimize : undefined,
|
|
1087
|
+
isResizing: isDragging || isResizing,
|
|
1088
|
+
mode: mode
|
|
1089
|
+
})
|
|
1090
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
1091
|
+
style: styles.windowControlsContainer,
|
|
1092
|
+
children: /*#__PURE__*/_jsx(WindowControls, {
|
|
1093
|
+
onClose: onClose,
|
|
1094
|
+
onMinimize: onMinimize ? handleMinimize : undefined,
|
|
1095
|
+
onToggleMode: toggleMode,
|
|
1096
|
+
mode: mode
|
|
1097
|
+
})
|
|
1098
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
1099
|
+
style: [styles.content, customStyles.content],
|
|
1100
|
+
children: [/*#__PURE__*/_jsx(ScrollView, {
|
|
1101
|
+
style: {
|
|
1102
|
+
flex: 1
|
|
1103
|
+
},
|
|
1104
|
+
contentContainerStyle: {
|
|
1105
|
+
flexGrow: 1,
|
|
1106
|
+
paddingBottom: footerHeight
|
|
1107
|
+
},
|
|
1108
|
+
showsVerticalScrollIndicator: true,
|
|
1109
|
+
nestedScrollEnabled: true,
|
|
1110
|
+
children: children
|
|
1111
|
+
}), footer ? /*#__PURE__*/_jsx(View, {
|
|
1112
|
+
style: footerStyles.footerContainer,
|
|
1113
|
+
children: footer
|
|
1114
|
+
}) : null]
|
|
1115
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
1116
|
+
...resizeHandlers.bottomLeft.panHandlers,
|
|
1117
|
+
style: [styles.cornerHandleWrapper, {
|
|
1118
|
+
bottom: 4,
|
|
1119
|
+
left: 4
|
|
1120
|
+
}],
|
|
1121
|
+
hitSlop: {
|
|
1122
|
+
top: 2,
|
|
1123
|
+
left: 2,
|
|
1124
|
+
right: 2,
|
|
1125
|
+
bottom: 2
|
|
1126
|
+
},
|
|
1127
|
+
children: /*#__PURE__*/_jsx(CornerHandle, {
|
|
1128
|
+
position: "bottomLeft",
|
|
1129
|
+
isActive: isDragging || isResizing
|
|
1130
|
+
})
|
|
1131
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
1132
|
+
...resizeHandlers.bottomRight.panHandlers,
|
|
1133
|
+
style: [styles.cornerHandleWrapper, {
|
|
1134
|
+
bottom: 4,
|
|
1135
|
+
right: 4
|
|
1136
|
+
}],
|
|
1137
|
+
hitSlop: {
|
|
1138
|
+
top: 2,
|
|
1139
|
+
left: 2,
|
|
1140
|
+
right: 2,
|
|
1141
|
+
bottom: 2
|
|
1142
|
+
},
|
|
1143
|
+
children: /*#__PURE__*/_jsx(CornerHandle, {
|
|
1144
|
+
position: "bottomRight",
|
|
1145
|
+
isActive: isDragging || isResizing
|
|
1146
|
+
})
|
|
1147
|
+
})]
|
|
1148
|
+
});
|
|
1149
|
+
}
|
|
1150
|
+
|
|
1151
|
+
// Render bottom sheet mode with proper height animation
|
|
1152
|
+
return /*#__PURE__*/_jsx(View, {
|
|
1153
|
+
style: [styles.fullScreenContainer, zIndex !== undefined && {
|
|
1154
|
+
zIndex
|
|
1155
|
+
}],
|
|
1156
|
+
pointerEvents: "box-none",
|
|
1157
|
+
children: /*#__PURE__*/_jsx(Animated.View, {
|
|
1158
|
+
nativeID: "jsmodal-root",
|
|
1159
|
+
style: [styles.bottomSheetWrapper, {
|
|
1160
|
+
opacity: modalOpacity,
|
|
1161
|
+
transform: [{
|
|
1162
|
+
translateY: bottomSheetTranslateY
|
|
1163
|
+
}]
|
|
1164
|
+
}],
|
|
1165
|
+
children: /*#__PURE__*/_jsxs(Animated.View, {
|
|
1166
|
+
style: [styles.bottomSheet, customStyles.container, {
|
|
1167
|
+
height: externalAnimatedHeight || animatedBottomPosition
|
|
1168
|
+
}],
|
|
1169
|
+
children: [/*#__PURE__*/_jsx(ModalHeader, {
|
|
1170
|
+
header: header,
|
|
1171
|
+
onClose: onClose,
|
|
1172
|
+
onToggleMode: toggleMode,
|
|
1173
|
+
onMinimize: onMinimize ? handleMinimize : undefined,
|
|
1174
|
+
isResizing: isResizing,
|
|
1175
|
+
mode: mode,
|
|
1176
|
+
panHandlers: bottomSheetPanResponder.panHandlers
|
|
1177
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
1178
|
+
style: styles.windowControlsContainer,
|
|
1179
|
+
children: /*#__PURE__*/_jsx(WindowControls, {
|
|
1180
|
+
onClose: onClose,
|
|
1181
|
+
onMinimize: onMinimize ? handleMinimize : undefined,
|
|
1182
|
+
onToggleMode: toggleMode,
|
|
1183
|
+
mode: mode
|
|
1184
|
+
})
|
|
1185
|
+
}), hintLoaded && showHint && mode === "bottomSheet" && !hintsDisabled && /*#__PURE__*/_jsx(ModalHintBanner, {
|
|
1186
|
+
onAcknowledge: handleHintAcknowledge
|
|
1187
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
1188
|
+
style: [styles.content, customStyles.content],
|
|
1189
|
+
children: [/*#__PURE__*/_jsx(ScrollView, {
|
|
1190
|
+
style: {
|
|
1191
|
+
flex: 1
|
|
1192
|
+
},
|
|
1193
|
+
contentContainerStyle: {
|
|
1194
|
+
flexGrow: 1,
|
|
1195
|
+
paddingBottom: footerHeight
|
|
1196
|
+
},
|
|
1197
|
+
showsVerticalScrollIndicator: true,
|
|
1198
|
+
nestedScrollEnabled: true,
|
|
1199
|
+
children: children
|
|
1200
|
+
}), footer ? /*#__PURE__*/_jsx(View, {
|
|
1201
|
+
style: footerStyles.footerContainer,
|
|
1202
|
+
children: footer
|
|
1203
|
+
}) : null]
|
|
1204
|
+
})]
|
|
1205
|
+
})
|
|
1206
|
+
})
|
|
1207
|
+
});
|
|
1208
|
+
};
|
|
1209
|
+
|
|
1210
|
+
// ============================================================================
|
|
1211
|
+
// STYLES - Visual styling for all modal components
|
|
1212
|
+
// ============================================================================
|
|
1213
|
+
const styles = StyleSheet.create({
|
|
1214
|
+
fullScreenContainer: {
|
|
1215
|
+
...StyleSheet.absoluteFillObject,
|
|
1216
|
+
zIndex: 1000
|
|
1217
|
+
},
|
|
1218
|
+
bottomSheetWrapper: {
|
|
1219
|
+
position: "absolute",
|
|
1220
|
+
bottom: 0,
|
|
1221
|
+
left: 0,
|
|
1222
|
+
right: 0
|
|
1223
|
+
},
|
|
1224
|
+
bottomSheet: {
|
|
1225
|
+
backgroundColor: buoyColors.card,
|
|
1226
|
+
// Buoy card
|
|
1227
|
+
borderTopLeftRadius: 6,
|
|
1228
|
+
borderTopRightRadius: 6,
|
|
1229
|
+
borderWidth: 1,
|
|
1230
|
+
borderColor: buoyColors.border,
|
|
1231
|
+
shadowColor: buoyColors.primary,
|
|
1232
|
+
shadowOffset: {
|
|
1233
|
+
width: 0,
|
|
1234
|
+
height: -4
|
|
1235
|
+
},
|
|
1236
|
+
shadowOpacity: 0.2,
|
|
1237
|
+
shadowRadius: 12,
|
|
1238
|
+
elevation: 20
|
|
1239
|
+
},
|
|
1240
|
+
hiddenContainer: {
|
|
1241
|
+
position: "absolute",
|
|
1242
|
+
left: -9999,
|
|
1243
|
+
top: -9999,
|
|
1244
|
+
opacity: 0
|
|
1245
|
+
},
|
|
1246
|
+
floatingModal: {
|
|
1247
|
+
position: "absolute",
|
|
1248
|
+
backgroundColor: buoyColors.card,
|
|
1249
|
+
borderRadius: 6,
|
|
1250
|
+
borderWidth: 1,
|
|
1251
|
+
borderColor: buoyColors.border,
|
|
1252
|
+
shadowColor: buoyColors.primary,
|
|
1253
|
+
shadowOffset: {
|
|
1254
|
+
width: 0,
|
|
1255
|
+
height: 0
|
|
1256
|
+
},
|
|
1257
|
+
shadowOpacity: 0.3,
|
|
1258
|
+
shadowRadius: 20,
|
|
1259
|
+
elevation: 24,
|
|
1260
|
+
zIndex: 1000,
|
|
1261
|
+
// Default dimensions, will be overridden by animated values
|
|
1262
|
+
width: FLOATING_WIDTH,
|
|
1263
|
+
height: FLOATING_HEIGHT
|
|
1264
|
+
},
|
|
1265
|
+
floatingModalDragging: {
|
|
1266
|
+
borderColor: buoyColors.primary,
|
|
1267
|
+
borderWidth: 2,
|
|
1268
|
+
shadowColor: buoyColors.primary + "99",
|
|
1269
|
+
shadowOpacity: 0.8,
|
|
1270
|
+
shadowRadius: 12
|
|
1271
|
+
},
|
|
1272
|
+
header: {
|
|
1273
|
+
borderTopLeftRadius: 6,
|
|
1274
|
+
borderTopRightRadius: 6,
|
|
1275
|
+
backgroundColor: buoyColors.card,
|
|
1276
|
+
// Buoy card color
|
|
1277
|
+
minHeight: 56,
|
|
1278
|
+
borderWidth: 1,
|
|
1279
|
+
borderColor: buoyColors.border,
|
|
1280
|
+
// Buoy border
|
|
1281
|
+
borderBottomWidth: 1,
|
|
1282
|
+
borderBottomColor: buoyColors.border
|
|
1283
|
+
},
|
|
1284
|
+
floatingHeader: {
|
|
1285
|
+
borderTopLeftRadius: 6,
|
|
1286
|
+
borderTopRightRadius: 6
|
|
1287
|
+
},
|
|
1288
|
+
windowControlsContainer: {
|
|
1289
|
+
position: "absolute",
|
|
1290
|
+
top: 4,
|
|
1291
|
+
right: 4,
|
|
1292
|
+
zIndex: 10
|
|
1293
|
+
},
|
|
1294
|
+
floatingModeHeader: {
|
|
1295
|
+
borderTopLeftRadius: 6,
|
|
1296
|
+
borderTopRightRadius: 6
|
|
1297
|
+
},
|
|
1298
|
+
headerInner: {
|
|
1299
|
+
flex: 1,
|
|
1300
|
+
justifyContent: "center"
|
|
1301
|
+
},
|
|
1302
|
+
dragIndicatorContainer: {
|
|
1303
|
+
alignItems: "center",
|
|
1304
|
+
paddingVertical: 8,
|
|
1305
|
+
backgroundColor: "transparent"
|
|
1306
|
+
},
|
|
1307
|
+
dragIndicatorContainerCustom: {
|
|
1308
|
+
paddingTop: 6,
|
|
1309
|
+
paddingBottom: 2,
|
|
1310
|
+
backgroundColor: "transparent"
|
|
1311
|
+
},
|
|
1312
|
+
dragIndicator: {
|
|
1313
|
+
width: 40,
|
|
1314
|
+
height: 3,
|
|
1315
|
+
backgroundColor: buoyColors.primary,
|
|
1316
|
+
// Buoy primary teal
|
|
1317
|
+
borderRadius: 2,
|
|
1318
|
+
shadowColor: buoyColors.primary,
|
|
1319
|
+
shadowOffset: {
|
|
1320
|
+
width: 0,
|
|
1321
|
+
height: 0
|
|
1322
|
+
},
|
|
1323
|
+
shadowOpacity: 0.6,
|
|
1324
|
+
shadowRadius: 4
|
|
1325
|
+
},
|
|
1326
|
+
floatingDragIndicator: {
|
|
1327
|
+
width: 50,
|
|
1328
|
+
height: 5,
|
|
1329
|
+
backgroundColor: buoyColors.textMuted
|
|
1330
|
+
},
|
|
1331
|
+
dragIndicatorActive: {
|
|
1332
|
+
backgroundColor: buoyColors.primary,
|
|
1333
|
+
width: 40
|
|
1334
|
+
},
|
|
1335
|
+
resizeGripContainer: {
|
|
1336
|
+
position: "absolute",
|
|
1337
|
+
flexDirection: "row",
|
|
1338
|
+
gap: 2,
|
|
1339
|
+
marginTop: 12
|
|
1340
|
+
},
|
|
1341
|
+
resizeGripLine: {
|
|
1342
|
+
width: 12,
|
|
1343
|
+
height: 1,
|
|
1344
|
+
backgroundColor: gameUIColors.success,
|
|
1345
|
+
opacity: 0.6
|
|
1346
|
+
},
|
|
1347
|
+
headerContent: {
|
|
1348
|
+
paddingHorizontal: 16,
|
|
1349
|
+
alignItems: "center"
|
|
1350
|
+
},
|
|
1351
|
+
headerControls: {
|
|
1352
|
+
position: "absolute",
|
|
1353
|
+
top: 8,
|
|
1354
|
+
right: 16,
|
|
1355
|
+
flexDirection: "row",
|
|
1356
|
+
alignItems: "center"
|
|
1357
|
+
},
|
|
1358
|
+
headerTitle: {
|
|
1359
|
+
fontSize: 16,
|
|
1360
|
+
fontWeight: "600",
|
|
1361
|
+
color: gameUIColors.primary
|
|
1362
|
+
},
|
|
1363
|
+
headerSubtitle: {
|
|
1364
|
+
fontSize: 12,
|
|
1365
|
+
color: gameUIColors.secondary,
|
|
1366
|
+
paddingTop: 4
|
|
1367
|
+
},
|
|
1368
|
+
headerHintText: {
|
|
1369
|
+
position: "absolute",
|
|
1370
|
+
top: 0,
|
|
1371
|
+
left: 0,
|
|
1372
|
+
right: 0,
|
|
1373
|
+
bottom: 0,
|
|
1374
|
+
justifyContent: "center",
|
|
1375
|
+
alignItems: "center"
|
|
1376
|
+
},
|
|
1377
|
+
hintText: {
|
|
1378
|
+
fontSize: 10,
|
|
1379
|
+
color: gameUIColors.muted,
|
|
1380
|
+
fontStyle: "italic"
|
|
1381
|
+
},
|
|
1382
|
+
controlButton: {
|
|
1383
|
+
width: 28,
|
|
1384
|
+
height: 28,
|
|
1385
|
+
borderRadius: 6,
|
|
1386
|
+
justifyContent: "center",
|
|
1387
|
+
alignItems: "center",
|
|
1388
|
+
marginLeft: 8
|
|
1389
|
+
},
|
|
1390
|
+
toggleButton: {
|
|
1391
|
+
backgroundColor: gameUIColors.info + "1A",
|
|
1392
|
+
borderWidth: 1,
|
|
1393
|
+
borderColor: gameUIColors.info + "33"
|
|
1394
|
+
},
|
|
1395
|
+
closeButton: {
|
|
1396
|
+
width: 28,
|
|
1397
|
+
height: 28,
|
|
1398
|
+
borderRadius: 6,
|
|
1399
|
+
justifyContent: "center",
|
|
1400
|
+
alignItems: "center",
|
|
1401
|
+
backgroundColor: gameUIColors.error + "1A",
|
|
1402
|
+
borderWidth: 1,
|
|
1403
|
+
borderColor: gameUIColors.error + "33",
|
|
1404
|
+
marginLeft: 8
|
|
1405
|
+
},
|
|
1406
|
+
iconLine: {
|
|
1407
|
+
position: "absolute",
|
|
1408
|
+
top: 7.25,
|
|
1409
|
+
left: 2,
|
|
1410
|
+
width: 12,
|
|
1411
|
+
height: 1.5,
|
|
1412
|
+
backgroundColor: gameUIColors.error
|
|
1413
|
+
},
|
|
1414
|
+
content: {
|
|
1415
|
+
flex: 1,
|
|
1416
|
+
backgroundColor: buoyColors.base,
|
|
1417
|
+
borderBottomLeftRadius: 16,
|
|
1418
|
+
borderBottomRightRadius: 16,
|
|
1419
|
+
overflow: "hidden"
|
|
1420
|
+
},
|
|
1421
|
+
cornerHandle: {
|
|
1422
|
+
position: "absolute",
|
|
1423
|
+
zIndex: 1
|
|
1424
|
+
},
|
|
1425
|
+
cornerHandleWrapper: {
|
|
1426
|
+
position: "absolute",
|
|
1427
|
+
width: 30,
|
|
1428
|
+
height: 30,
|
|
1429
|
+
zIndex: 1000
|
|
1430
|
+
},
|
|
1431
|
+
handler: {
|
|
1432
|
+
width: 20,
|
|
1433
|
+
height: 20,
|
|
1434
|
+
backgroundColor: "transparent",
|
|
1435
|
+
borderRadius: 10,
|
|
1436
|
+
borderWidth: 0,
|
|
1437
|
+
borderColor: "transparent"
|
|
1438
|
+
},
|
|
1439
|
+
handlerActive: {
|
|
1440
|
+
backgroundColor: gameUIColors.success + "1A",
|
|
1441
|
+
borderColor: gameUIColors.success,
|
|
1442
|
+
borderWidth: 2,
|
|
1443
|
+
shadowColor: gameUIColors.success + "99",
|
|
1444
|
+
shadowOffset: {
|
|
1445
|
+
width: 0,
|
|
1446
|
+
height: 0
|
|
1447
|
+
},
|
|
1448
|
+
shadowOpacity: 1,
|
|
1449
|
+
shadowRadius: 8
|
|
1450
|
+
}
|
|
1451
|
+
});
|
|
1452
|
+
|
|
1453
|
+
// Footer container styles (absolute within modal content area)
|
|
1454
|
+
const footerStyles = StyleSheet.create({
|
|
1455
|
+
footerContainer: {
|
|
1456
|
+
position: "absolute",
|
|
1457
|
+
left: 0,
|
|
1458
|
+
right: 0,
|
|
1459
|
+
bottom: 0,
|
|
1460
|
+
backgroundColor: buoyColors.base,
|
|
1461
|
+
borderBottomLeftRadius: 16,
|
|
1462
|
+
borderBottomRightRadius: 16
|
|
1463
|
+
}
|
|
1464
|
+
});
|
|
1465
|
+
|
|
1466
|
+
// ============================================================================
|
|
1467
|
+
// EXPORT - Memoized modal component for optimal performance
|
|
1468
|
+
// ============================================================================
|
|
1469
|
+
export const JsModal = /*#__PURE__*/memo(JsModalComponent);
|