@buoy-gg/shared-ui 7.0.40 → 7.0.42
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 +6 -0
- package/dataViewer.js +1 -9
- package/floating.js +1 -2
- package/history.js +1 -7
- package/hooks.js +1 -7
- package/lib/commonjs/JsModal.js +1 -1814
- package/lib/commonjs/JsModal.web.js +1 -1652
- package/lib/commonjs/clipboard/autoDetectClipboard.js +1 -67
- package/lib/commonjs/clipboard/clipboard-impl.js +1 -128
- package/lib/commonjs/clipboard/clipboard-impl.web.js +1 -0
- package/lib/commonjs/clipboard/copyToClipboard.js +1 -64
- package/lib/commonjs/clipboard/index.js +1 -25
- package/lib/commonjs/colors/index.js +1 -49
- package/lib/commonjs/context/HintsContext.js +1 -49
- package/lib/commonjs/context/index.js +1 -24
- package/lib/commonjs/dataViewer/CyberpunkInput.js +1 -388
- package/lib/commonjs/dataViewer/DataTreeActionBar.js +1 -390
- package/lib/commonjs/dataViewer/DataTreeActionDock.js +1 -226
- package/lib/commonjs/dataViewer/DataViewer.js +1 -158
- package/lib/commonjs/dataViewer/DiffSummary.js +1 -134
- package/lib/commonjs/dataViewer/IndentGuides.js +1 -128
- package/lib/commonjs/dataViewer/IndentGuidesOverlay.js +1 -104
- package/lib/commonjs/dataViewer/JsonStringNotice.js +1 -59
- package/lib/commonjs/dataViewer/LiveExplorer.js +1 -943
- package/lib/commonjs/dataViewer/SplitDiffViewer.js +1 -421
- package/lib/commonjs/dataViewer/ThemedSplitView.js +1 -642
- package/lib/commonjs/dataViewer/TimestampDeltaBar.js +1 -96
- package/lib/commonjs/dataViewer/TypeLegend.js +1 -111
- package/lib/commonjs/dataViewer/ValueEditModal.js +1 -386
- package/lib/commonjs/dataViewer/VirtualizedDataExplorer.js +1 -1270
- package/lib/commonjs/dataViewer/diffThemes.js +1 -113
- package/lib/commonjs/dataViewer/index.js +1 -320
- package/lib/commonjs/dataViewer/jsonOps.js +1 -320
- package/lib/commonjs/dataViewer/jsonStringValue.js +1 -94
- package/lib/commonjs/dataViewer/lineDiff.js +1 -568
- package/lib/commonjs/dataViewer/nestedPath.js +1 -115
- package/lib/commonjs/dataViewer/objectDiff.js +1 -304
- package/lib/commonjs/dataViewer/timestampDiff.js +1 -146
- package/lib/commonjs/dataViewer/tree/TreeDiffViewer.js +1 -913
- package/lib/commonjs/dataViewer/treeActions.js +1 -168
- package/lib/commonjs/dataViewer/useTreeDraft.js +1 -125
- package/lib/commonjs/dataViewer/useTreeEditor.js +1 -105
- package/lib/commonjs/env/EnvironmentIndicator.js +1 -129
- package/lib/commonjs/env/EnvironmentIndicator.web.js +1 -114
- package/lib/commonjs/env/EnvironmentSelector.js +1 -205
- package/lib/commonjs/env/EnvironmentSelectorInline.js +1 -299
- package/lib/commonjs/env/EnvironmentSelectorInline.web.js +1 -178
- package/lib/commonjs/history/HistoryProvider.js +1 -246
- package/lib/commonjs/history/components/HistoryEntryRow.js +1 -146
- package/lib/commonjs/history/components/HistoryList.js +1 -174
- package/lib/commonjs/history/components/index.js +1 -25
- package/lib/commonjs/history/index.js +1 -61
- package/lib/commonjs/history/types.js +1 -5
- package/lib/commonjs/hooks/index.js +1 -77
- package/lib/commonjs/hooks/safe-area-impl.js +1 -28
- package/lib/commonjs/hooks/useChangeLog.js +1 -55
- package/lib/commonjs/hooks/useDeviceInfo.js +1 -524
- package/lib/commonjs/hooks/useEventStoreEvents.js +1 -65
- package/lib/commonjs/hooks/useFilterManager.js +1 -136
- package/lib/commonjs/hooks/usePersistedState.js +1 -106
- package/lib/commonjs/hooks/useSafeAreaInsets.js +1 -250
- package/lib/commonjs/hooks/useSafeAreaInsets.web.js +1 -0
- package/lib/commonjs/icons/BenchmarkIcon.js +1 -109
- package/lib/commonjs/icons/EnvLaptopIcon.js +1 -204
- package/lib/commonjs/icons/IconBackground.js +1 -279
- package/lib/commonjs/icons/ReactQueryIcon.js +1 -17
- package/lib/commonjs/icons/RenderCountIcon.js +1 -147
- package/lib/commonjs/icons/RouteMapIcon.js +1 -250
- package/lib/commonjs/icons/SentryBugIcon.js +1 -19
- package/lib/commonjs/icons/StackPulseIcon.js +1 -158
- package/lib/commonjs/icons/StorageStackIcon.js +1 -156
- package/lib/commonjs/icons/WifiCircuitIcon.js +1 -169
- package/lib/commonjs/icons/index.js +1 -826
- package/lib/commonjs/icons/lucide-icons-original-full.js +1 -3248
- package/lib/commonjs/icons/lucide-icons.js +1 -2476
- package/lib/commonjs/icons/primitives/GlobeIcon.js +1 -66
- package/lib/commonjs/icons/primitives/icon-primitives.js +1 -169
- package/lib/commonjs/icons/primitives/index.js +1 -49
- package/lib/commonjs/index.js +1 -1098
- package/lib/commonjs/license/AccountSetup.js +1 -56
- package/lib/commonjs/license/AccountSetup.web.js +14 -81
- package/lib/commonjs/license/AccountSetupContent.js +1 -0
- package/lib/commonjs/license/FeatureGate.js +1 -788
- package/lib/commonjs/license/FreeAccountPrompt.js +1 -205
- package/lib/commonjs/license/LicenseEntryModal.js +2 -394
- package/lib/commonjs/license/accountRuntime.js +1 -0
- package/lib/commonjs/license/accountRuntime.web.js +1 -0
- package/lib/commonjs/license/index.js +1 -106
- package/lib/commonjs/license/licenseModule.js +1 -119
- package/lib/commonjs/license/openPricing.js +1 -36
- package/lib/commonjs/license/tierLimits.js +1 -128
- package/lib/commonjs/logger/index-sentry.js +1 -245
- package/lib/commonjs/logger/index.js +1 -62
- package/lib/commonjs/logger/logDump.js +1 -19
- package/lib/commonjs/logger/types.js +1 -38
- package/lib/commonjs/settings/components/BubbleSettingsSection.js +1 -384
- package/lib/commonjs/settings/index.js +1 -24
- package/lib/commonjs/storage/definePersistedSetting.js +1 -67
- package/lib/commonjs/storage/devToolsStorageKeys.js +1 -359
- package/lib/commonjs/storage/index.js +1 -25
- package/lib/commonjs/stores/BaseEventStore.js +1 -343
- package/lib/commonjs/stores/ChangeLog.js +1 -197
- package/lib/commonjs/stores/createToolStore.js +1 -193
- package/lib/commonjs/stores/floatingToolStore.js +1 -71
- package/lib/commonjs/stores/floatingToolStore.test.js +1 -112
- package/lib/commonjs/stores/ignoredPatternsCore.js +1 -75
- package/lib/commonjs/stores/ignoredPatternsStore.js +1 -205
- package/lib/commonjs/stores/ignoredPatternsStore.shared.js +1 -0
- package/lib/commonjs/stores/ignoredPatternsStore.web.js +1 -236
- package/lib/commonjs/stores/index.js +1 -51
- package/lib/commonjs/sync/keyedArrays.js +1 -209
- package/lib/commonjs/sync/toolActionRegistry.js +1 -249
- package/lib/commonjs/sync/toolAttention.test.js +1 -51
- package/lib/commonjs/sync/toolSyncAdapter.js +1 -63
- package/lib/commonjs/sync/toolUiBridge.js +1 -132
- package/lib/commonjs/sync/typedEdit.js +1 -228
- package/lib/commonjs/sync/valuePath.js +1 -337
- package/lib/commonjs/sync/valueShape.js +1 -161
- package/lib/commonjs/sync/wireBudget.js +1 -97
- package/lib/commonjs/sync/wireForm.js +1 -172
- package/lib/commonjs/tools/defineTool.js +1 -79
- package/lib/commonjs/types/types.d.js +1 -1
- package/lib/commonjs/types/types.js +1 -37
- package/lib/commonjs/ui/backgrounds/BackgroundSwitcher.js +1 -354
- package/lib/commonjs/ui/backgrounds/ToolBackground.js +1 -76
- package/lib/commonjs/ui/backgrounds/backgroundStore.js +1 -130
- package/lib/commonjs/ui/backgrounds/index.js +1 -167
- package/lib/commonjs/ui/backgrounds/primitives.js +1 -369
- package/lib/commonjs/ui/backgrounds/registry.js +1 -98
- package/lib/commonjs/ui/backgrounds/rng.js +1 -93
- package/lib/commonjs/ui/backgrounds/skyClock.js +1 -45
- package/lib/commonjs/ui/backgrounds/types.js +1 -1
- package/lib/commonjs/ui/backgrounds/variants/daylight.js +1 -453
- package/lib/commonjs/ui/backgrounds/variants/deepField.js +1 -381
- package/lib/commonjs/ui/backgrounds/variants/hyperspace.js +1 -218
- package/lib/commonjs/ui/backgrounds/variants/liveSky.js +1 -898
- package/lib/commonjs/ui/backgrounds/variants/meteors.js +1 -401
- package/lib/commonjs/ui/backgrounds/variants/moonlight.js +1 -472
- package/lib/commonjs/ui/backgrounds/variants/underwater.js +1 -757
- package/lib/commonjs/ui/backgrounds/variants/wormhole/motion.js +1 -48
- package/lib/commonjs/ui/backgrounds/variants/wormhole/textures.js +1 -3
- package/lib/commonjs/ui/backgrounds/variants/wormhole.js +1 -133
- package/lib/commonjs/ui/components/BackButton.js +1 -47
- package/lib/commonjs/ui/components/Badge.js +1 -226
- package/lib/commonjs/ui/components/ChangeRow.js +1 -111
- package/lib/commonjs/ui/components/ChipStrip.js +1 -94
- package/lib/commonjs/ui/components/ClipboardHintBanner.js +1 -149
- package/lib/commonjs/ui/components/CollapsibleSection.js +1 -170
- package/lib/commonjs/ui/components/CompactFilterChips.js +1 -114
- package/lib/commonjs/ui/components/CompactRow.js +1 -295
- package/lib/commonjs/ui/components/CopyButton.js +1 -307
- package/lib/commonjs/ui/components/DataInspector.js +1 -323
- package/lib/commonjs/ui/components/DetailView.js +1 -358
- package/lib/commonjs/ui/components/DetailViewToggle.js +1 -130
- package/lib/commonjs/ui/components/DevToolsCard.js +1 -126
- package/lib/commonjs/ui/components/DraggableHeader.js +1 -215
- package/lib/commonjs/ui/components/DynamicFilterView.js +1 -758
- package/lib/commonjs/ui/components/EmptyState.js +1 -151
- package/lib/commonjs/ui/components/EntityFilterView.js +1 -355
- package/lib/commonjs/ui/components/EventHistoryViewer/CompareBar.js +1 -211
- package/lib/commonjs/ui/components/EventHistoryViewer/DiffModeTabs.js +1 -99
- package/lib/commonjs/ui/components/EventHistoryViewer/EventHistoryViewer.js +1 -184
- package/lib/commonjs/ui/components/EventHistoryViewer/EventPickerModal.js +1 -208
- package/lib/commonjs/ui/components/EventHistoryViewer/ViewToggleCards.js +1 -137
- package/lib/commonjs/ui/components/EventHistoryViewer/index.js +1 -40
- package/lib/commonjs/ui/components/EventHistoryViewer/types.js +1 -5
- package/lib/commonjs/ui/components/EventListItem.js +1 -247
- package/lib/commonjs/ui/components/EventStepperFooter.js +1 -185
- package/lib/commonjs/ui/components/ExpandablePopover.js +1 -381
- package/lib/commonjs/ui/components/ExpandedInfoRow.js +1 -108
- package/lib/commonjs/ui/components/ExportPreview.js +1 -174
- package/lib/commonjs/ui/components/FilterComponents.js +1 -291
- package/lib/commonjs/ui/components/GripVerticalIcon.js +1 -65
- package/lib/commonjs/ui/components/HeaderSearchButton.js +1 -50
- package/lib/commonjs/ui/components/InfoRow.js +1 -91
- package/lib/commonjs/ui/components/ListItem.js +1 -173
- package/lib/commonjs/ui/components/ModalHeader.js +1 -305
- package/lib/commonjs/ui/components/ModalHintBanner.js +1 -147
- package/lib/commonjs/ui/components/Pill.js +1 -115
- package/lib/commonjs/ui/components/PowerToggleButton.js +1 -78
- package/lib/commonjs/ui/components/SearchBar.js +1 -165
- package/lib/commonjs/ui/components/SectionHeader.js +1 -129
- package/lib/commonjs/ui/components/StatsCard.js +1 -198
- package/lib/commonjs/ui/components/StatusIndicator.js +1 -231
- package/lib/commonjs/ui/components/StorageTypeBadge.js +1 -97
- package/lib/commonjs/ui/components/TabSelector.js +1 -102
- package/lib/commonjs/ui/components/TimeDisplay.js +1 -142
- package/lib/commonjs/ui/components/ToggleRow.js +1 -116
- package/lib/commonjs/ui/components/ToolButton.js +1 -93
- package/lib/commonjs/ui/components/ToolEmptyState.js +1 -154
- package/lib/commonjs/ui/components/ToolFooter.js +1 -205
- package/lib/commonjs/ui/components/ValueTypeBadge.js +1 -147
- package/lib/commonjs/ui/components/WindowControls.js +1 -387
- package/lib/commonjs/ui/components/index.js +1 -507
- package/lib/commonjs/ui/components/windowDrag.js +1 -45
- package/lib/commonjs/ui/console/CyberpunkButtonOutline.js +1 -261
- package/lib/commonjs/ui/console/CyberpunkIconContainer.js +1 -186
- package/lib/commonjs/ui/console/CyberpunkSectionButton.js +1 -123
- package/lib/commonjs/ui/floating/FloatingTool.js +1 -1010
- package/lib/commonjs/ui/floating/FloatingTool.web.js +1 -591
- package/lib/commonjs/ui/floating/FloatingToolHost.js +1 -32
- package/lib/commonjs/ui/floating/FloatingToolHost.web.js +1 -28
- package/lib/commonjs/ui/floating/index.js +1 -105
- package/lib/commonjs/ui/floating/index.web.js +1 -105
- package/lib/commonjs/ui/floating/onboardingConstants.js +1 -70
- package/lib/commonjs/ui/floating/onboardingConstants.web.js +1 -34
- package/lib/commonjs/ui/fonts.js +1 -12
- package/lib/commonjs/ui/gameUI/components/GameUICollapsibleSection.js +1 -121
- package/lib/commonjs/ui/gameUI/components/GameUICompactStats.js +1 -336
- package/lib/commonjs/ui/gameUI/components/GameUIIssuesList.js +1 -284
- package/lib/commonjs/ui/gameUI/components/GameUIStatusHeader.js +1 -145
- package/lib/commonjs/ui/gameUI/constants/gameUIColors.js +1 -224
- package/lib/commonjs/ui/gameUI/constants/macOSDesignSystemColors.js +1 -224
- package/lib/commonjs/ui/gameUI/hooks/useGameUIAlertState.js +1 -110
- package/lib/commonjs/ui/gameUI/index.js +1 -72
- package/lib/commonjs/ui/index.js +1 -217
- package/lib/commonjs/ui/listPresets.js +1 -43
- package/lib/commonjs/ui/night/nightTheme.js +1 -130
- package/lib/commonjs/ui/night/primitives.js +1 -517
- package/lib/commonjs/ui/otto/OttoSceneView.js +1 -69
- package/lib/commonjs/ui/otto/OttoSprite.js +1 -510
- package/lib/commonjs/ui/otto/index.js +1 -60
- package/lib/commonjs/ui/otto/ottoEngine.js +1 -2737
- package/lib/commonjs/ui/otto/ottoScenes.js +1 -949
- package/lib/commonjs/ui/otto/ottoSheet.js +1 -191
- package/lib/commonjs/ui/toolTheme.js +1 -97
- package/lib/commonjs/utils/absoluteFill.js +1 -28
- package/lib/commonjs/utils/browserAsyncStorage.js +1 -0
- package/lib/commonjs/utils/browserNavigation.js +1 -0
- package/lib/commonjs/utils/devServer.js +1 -62
- package/lib/commonjs/utils/devServer.web.js +1 -0
- package/lib/commonjs/utils/displayValue.js +1 -41
- package/lib/commonjs/utils/domRuntime.js +1 -0
- package/lib/commonjs/utils/expoRouterModule.js +1 -0
- package/lib/commonjs/utils/expoRouterModule.web.js +1 -0
- package/lib/commonjs/utils/formatting/dataFormatting.js +1 -102
- package/lib/commonjs/utils/formatting/httpFormatting.js +1 -147
- package/lib/commonjs/utils/formatting/index.js +1 -27
- package/lib/commonjs/utils/getSafeAreaInsets.js +1 -40
- package/lib/commonjs/utils/getSafeAreaInsets.web.js +1 -0
- package/lib/commonjs/utils/index.js +1 -309
- package/lib/commonjs/utils/loadOptionalModule.js +1 -94
- package/lib/commonjs/utils/loadToolModule.js +1 -0
- package/lib/commonjs/utils/loadToolModule.web.js +1 -0
- package/lib/commonjs/utils/minimalSuperJSON.js +1 -347
- package/lib/commonjs/utils/modalStorage.js +1 -0
- package/lib/commonjs/utils/nativeWeb.js +1 -0
- package/lib/commonjs/utils/persistentStorage.js +1 -609
- package/lib/commonjs/utils/persistentStorage.web.js +1 -0
- package/lib/commonjs/utils/realNow.js +1 -0
- package/lib/commonjs/utils/reloadApp.js +1 -144
- package/lib/commonjs/utils/reloadPlatform.js +1 -0
- package/lib/commonjs/utils/reloadPlatform.web.js +1 -0
- package/lib/commonjs/utils/renderCaptureRegistry.js +1 -59
- package/lib/commonjs/utils/safeExpoRouter.js +1 -250
- package/lib/commonjs/utils/safeExpoRouter.web.js +1 -0
- package/lib/commonjs/utils/safeStringify.js +1 -229
- package/lib/commonjs/utils/snapshotProviderKit.js +1 -167
- package/lib/commonjs/utils/stateSnapshotRegistry.js +1 -71
- package/lib/commonjs/utils/stateTools.js +1 -160
- package/lib/commonjs/utils/subscribable.js +1 -113
- package/lib/commonjs/utils/subscriberCountNotifier.js +1 -72
- package/lib/commonjs/utils/time/RelativeTime.js +1 -31
- package/lib/commonjs/utils/time/TickContext.js +1 -43
- package/lib/commonjs/utils/time/formatRelativeTime.js +1 -34
- package/lib/commonjs/utils/time/index.js +1 -39
- package/lib/commonjs/utils/time/useRelativeTime.js +1 -36
- package/lib/commonjs/utils/toolModules.js +1 -0
- package/lib/commonjs/utils/typeHelpers.js +1 -142
- package/lib/commonjs/utils/valueFormatting.js +1 -140
- package/lib/module/JsModal.js +1 -1810
- package/lib/module/JsModal.web.js +1 -1648
- package/lib/module/clipboard/autoDetectClipboard.js +1 -45
- package/lib/module/clipboard/clipboard-impl.js +1 -121
- package/lib/module/clipboard/clipboard-impl.web.js +1 -0
- package/lib/module/clipboard/copyToClipboard.js +1 -60
- package/lib/module/clipboard/index.js +1 -5
- package/lib/module/colors/index.js +1 -21
- package/lib/module/context/HintsContext.js +1 -43
- package/lib/module/context/index.js +1 -3
- package/lib/module/dataViewer/CyberpunkInput.js +1 -384
- package/lib/module/dataViewer/DataTreeActionBar.js +1 -385
- package/lib/module/dataViewer/DataTreeActionDock.js +1 -222
- package/lib/module/dataViewer/DataViewer.js +1 -153
- package/lib/module/dataViewer/DiffSummary.js +1 -129
- package/lib/module/dataViewer/IndentGuides.js +1 -124
- package/lib/module/dataViewer/IndentGuidesOverlay.js +1 -99
- package/lib/module/dataViewer/JsonStringNotice.js +1 -54
- package/lib/module/dataViewer/LiveExplorer.js +1 -937
- package/lib/module/dataViewer/SplitDiffViewer.js +1 -416
- package/lib/module/dataViewer/ThemedSplitView.js +1 -637
- package/lib/module/dataViewer/TimestampDeltaBar.js +1 -91
- package/lib/module/dataViewer/TypeLegend.js +1 -105
- package/lib/module/dataViewer/ValueEditModal.js +1 -382
- package/lib/module/dataViewer/VirtualizedDataExplorer.js +1 -1265
- package/lib/module/dataViewer/diffThemes.js +1 -109
- package/lib/module/dataViewer/index.js +1 -57
- package/lib/module/dataViewer/jsonOps.js +1 -311
- package/lib/module/dataViewer/jsonStringValue.js +1 -89
- package/lib/module/dataViewer/lineDiff.js +1 -564
- package/lib/module/dataViewer/nestedPath.js +1 -109
- package/lib/module/dataViewer/objectDiff.js +1 -297
- package/lib/module/dataViewer/timestampDiff.js +1 -139
- package/lib/module/dataViewer/tree/TreeDiffViewer.js +1 -907
- package/lib/module/dataViewer/treeActions.js +1 -162
- package/lib/module/dataViewer/useTreeDraft.js +1 -121
- package/lib/module/dataViewer/useTreeEditor.js +1 -101
- package/lib/module/env/EnvironmentIndicator.js +1 -125
- package/lib/module/env/EnvironmentIndicator.web.js +1 -108
- package/lib/module/env/EnvironmentSelector.js +1 -201
- package/lib/module/env/EnvironmentSelectorInline.js +1 -295
- package/lib/module/env/EnvironmentSelectorInline.web.js +1 -173
- package/lib/module/history/HistoryProvider.js +1 -237
- package/lib/module/history/components/HistoryEntryRow.js +1 -142
- package/lib/module/history/components/HistoryList.js +1 -169
- package/lib/module/history/components/index.js +1 -8
- package/lib/module/history/index.js +1 -15
- package/lib/module/history/types.js +1 -3
- package/lib/module/hooks/index.js +1 -9
- package/lib/module/hooks/safe-area-impl.js +1 -23
- package/lib/module/hooks/useChangeLog.js +1 -50
- package/lib/module/hooks/useDeviceInfo.js +1 -519
- package/lib/module/hooks/useEventStoreEvents.js +1 -61
- package/lib/module/hooks/useFilterManager.js +1 -132
- package/lib/module/hooks/usePersistedState.js +1 -102
- package/lib/module/hooks/useSafeAreaInsets.js +1 -245
- package/lib/module/hooks/useSafeAreaInsets.web.js +1 -0
- package/lib/module/icons/BenchmarkIcon.js +1 -104
- package/lib/module/icons/EnvLaptopIcon.js +1 -199
- package/lib/module/icons/IconBackground.js +1 -274
- package/lib/module/icons/ReactQueryIcon.js +1 -12
- package/lib/module/icons/RenderCountIcon.js +1 -142
- package/lib/module/icons/RouteMapIcon.js +1 -245
- package/lib/module/icons/SentryBugIcon.js +1 -14
- package/lib/module/icons/StackPulseIcon.js +1 -153
- package/lib/module/icons/StorageStackIcon.js +1 -151
- package/lib/module/icons/WifiCircuitIcon.js +1 -164
- package/lib/module/icons/index.js +1 -62
- package/lib/module/icons/lucide-icons-original-full.js +1 -3178
- package/lib/module/icons/lucide-icons.js +1 -2420
- package/lib/module/icons/primitives/GlobeIcon.js +1 -61
- package/lib/module/icons/primitives/icon-primitives.js +1 -161
- package/lib/module/icons/primitives/index.js +1 -15
- package/lib/module/index.js +1 -108
- package/lib/module/license/AccountSetup.js +1 -52
- package/lib/module/license/AccountSetup.web.js +14 -77
- package/lib/module/license/AccountSetupContent.js +1 -0
- package/lib/module/license/FeatureGate.js +1 -778
- package/lib/module/license/FreeAccountPrompt.js +1 -199
- package/lib/module/license/LicenseEntryModal.js +2 -388
- package/lib/module/license/accountRuntime.js +1 -0
- package/lib/module/license/accountRuntime.web.js +1 -0
- package/lib/module/license/index.js +1 -9
- package/lib/module/license/licenseModule.js +1 -107
- package/lib/module/license/openPricing.js +1 -31
- package/lib/module/license/tierLimits.js +1 -122
- package/lib/module/logger/index-sentry.js +1 -230
- package/lib/module/logger/index.js +1 -13
- package/lib/module/logger/logDump.js +1 -13
- package/lib/module/logger/types.js +1 -37
- package/lib/module/settings/components/BubbleSettingsSection.js +1 -378
- package/lib/module/settings/index.js +1 -3
- package/lib/module/storage/definePersistedSetting.js +1 -63
- package/lib/module/storage/devToolsStorageKeys.js +1 -352
- package/lib/module/storage/index.js +1 -4
- package/lib/module/stores/BaseEventStore.js +1 -339
- package/lib/module/stores/ChangeLog.js +1 -192
- package/lib/module/stores/createToolStore.js +1 -189
- package/lib/module/stores/floatingToolStore.js +1 -61
- package/lib/module/stores/floatingToolStore.test.js +1 -111
- package/lib/module/stores/ignoredPatternsCore.js +1 -69
- package/lib/module/stores/ignoredPatternsStore.js +1 -189
- package/lib/module/stores/ignoredPatternsStore.shared.js +1 -0
- package/lib/module/stores/ignoredPatternsStore.web.js +1 -221
- package/lib/module/stores/index.js +1 -10
- package/lib/module/sync/keyedArrays.js +1 -204
- package/lib/module/sync/toolActionRegistry.js +1 -236
- package/lib/module/sync/toolAttention.test.js +1 -50
- package/lib/module/sync/toolSyncAdapter.js +1 -58
- package/lib/module/sync/toolUiBridge.js +1 -123
- package/lib/module/sync/typedEdit.js +1 -220
- package/lib/module/sync/valuePath.js +1 -330
- package/lib/module/sync/valueShape.js +1 -153
- package/lib/module/sync/wireBudget.js +1 -92
- package/lib/module/sync/wireForm.js +1 -159
- package/lib/module/tools/defineTool.js +1 -74
- package/lib/module/types/types.d.js +1 -1
- package/lib/module/types/types.js +1 -32
- package/lib/module/ui/backgrounds/BackgroundSwitcher.js +1 -350
- package/lib/module/ui/backgrounds/ToolBackground.js +1 -72
- package/lib/module/ui/backgrounds/backgroundStore.js +1 -125
- package/lib/module/ui/backgrounds/index.js +1 -19
- package/lib/module/ui/backgrounds/primitives.js +1 -365
- package/lib/module/ui/backgrounds/registry.js +1 -91
- package/lib/module/ui/backgrounds/rng.js +1 -85
- package/lib/module/ui/backgrounds/skyClock.js +1 -39
- package/lib/module/ui/backgrounds/types.js +1 -1
- package/lib/module/ui/backgrounds/variants/daylight.js +1 -449
- package/lib/module/ui/backgrounds/variants/deepField.js +1 -378
- package/lib/module/ui/backgrounds/variants/hyperspace.js +1 -214
- package/lib/module/ui/backgrounds/variants/liveSky.js +1 -893
- package/lib/module/ui/backgrounds/variants/meteors.js +1 -397
- package/lib/module/ui/backgrounds/variants/moonlight.js +1 -468
- package/lib/module/ui/backgrounds/variants/underwater.js +1 -753
- package/lib/module/ui/backgrounds/variants/wormhole/motion.js +1 -44
- package/lib/module/ui/backgrounds/variants/wormhole/textures.js +1 -3
- package/lib/module/ui/backgrounds/variants/wormhole.js +1 -129
- package/lib/module/ui/components/BackButton.js +1 -43
- package/lib/module/ui/components/Badge.js +1 -218
- package/lib/module/ui/components/ChangeRow.js +1 -106
- package/lib/module/ui/components/ChipStrip.js +1 -91
- package/lib/module/ui/components/ClipboardHintBanner.js +1 -145
- package/lib/module/ui/components/CollapsibleSection.js +1 -166
- package/lib/module/ui/components/CompactFilterChips.js +1 -110
- package/lib/module/ui/components/CompactRow.js +1 -291
- package/lib/module/ui/components/CopyButton.js +1 -303
- package/lib/module/ui/components/DataInspector.js +1 -319
- package/lib/module/ui/components/DetailView.js +1 -354
- package/lib/module/ui/components/DetailViewToggle.js +1 -125
- package/lib/module/ui/components/DevToolsCard.js +1 -122
- package/lib/module/ui/components/DraggableHeader.js +1 -211
- package/lib/module/ui/components/DynamicFilterView.js +1 -754
- package/lib/module/ui/components/EmptyState.js +1 -144
- package/lib/module/ui/components/EntityFilterView.js +1 -351
- package/lib/module/ui/components/EventHistoryViewer/CompareBar.js +1 -206
- package/lib/module/ui/components/EventHistoryViewer/DiffModeTabs.js +1 -94
- package/lib/module/ui/components/EventHistoryViewer/EventHistoryViewer.js +1 -179
- package/lib/module/ui/components/EventHistoryViewer/EventPickerModal.js +1 -203
- package/lib/module/ui/components/EventHistoryViewer/ViewToggleCards.js +1 -132
- package/lib/module/ui/components/EventHistoryViewer/index.js +1 -19
- package/lib/module/ui/components/EventHistoryViewer/types.js +1 -3
- package/lib/module/ui/components/EventListItem.js +1 -243
- package/lib/module/ui/components/EventStepperFooter.js +1 -180
- package/lib/module/ui/components/ExpandablePopover.js +1 -378
- package/lib/module/ui/components/ExpandedInfoRow.js +1 -103
- package/lib/module/ui/components/ExportPreview.js +1 -169
- package/lib/module/ui/components/FilterComponents.js +1 -282
- package/lib/module/ui/components/GripVerticalIcon.js +1 -61
- package/lib/module/ui/components/HeaderSearchButton.js +1 -46
- package/lib/module/ui/components/InfoRow.js +1 -87
- package/lib/module/ui/components/ListItem.js +1 -169
- package/lib/module/ui/components/ModalHeader.js +1 -297
- package/lib/module/ui/components/ModalHintBanner.js +1 -143
- package/lib/module/ui/components/Pill.js +1 -111
- package/lib/module/ui/components/PowerToggleButton.js +1 -74
- package/lib/module/ui/components/SearchBar.js +1 -161
- package/lib/module/ui/components/SectionHeader.js +1 -125
- package/lib/module/ui/components/StatsCard.js +1 -194
- package/lib/module/ui/components/StatusIndicator.js +1 -227
- package/lib/module/ui/components/StorageTypeBadge.js +1 -93
- package/lib/module/ui/components/TabSelector.js +1 -98
- package/lib/module/ui/components/TimeDisplay.js +1 -138
- package/lib/module/ui/components/ToggleRow.js +1 -112
- package/lib/module/ui/components/ToolButton.js +1 -89
- package/lib/module/ui/components/ToolEmptyState.js +1 -149
- package/lib/module/ui/components/ToolFooter.js +1 -197
- package/lib/module/ui/components/ValueTypeBadge.js +1 -143
- package/lib/module/ui/components/WindowControls.js +1 -383
- package/lib/module/ui/components/index.js +1 -52
- package/lib/module/ui/components/windowDrag.js +1 -41
- package/lib/module/ui/console/CyberpunkButtonOutline.js +1 -257
- package/lib/module/ui/console/CyberpunkIconContainer.js +1 -182
- package/lib/module/ui/console/CyberpunkSectionButton.js +1 -119
- package/lib/module/ui/floating/FloatingTool.js +1 -1003
- package/lib/module/ui/floating/FloatingTool.web.js +1 -590
- package/lib/module/ui/floating/FloatingToolHost.js +1 -29
- package/lib/module/ui/floating/FloatingToolHost.web.js +1 -25
- package/lib/module/ui/floating/index.js +1 -6
- package/lib/module/ui/floating/index.web.js +1 -6
- package/lib/module/ui/floating/onboardingConstants.js +1 -64
- package/lib/module/ui/floating/onboardingConstants.web.js +1 -27
- package/lib/module/ui/fonts.js +1 -8
- package/lib/module/ui/gameUI/components/GameUICollapsibleSection.js +1 -117
- package/lib/module/ui/gameUI/components/GameUICompactStats.js +1 -332
- package/lib/module/ui/gameUI/components/GameUIIssuesList.js +1 -280
- package/lib/module/ui/gameUI/components/GameUIStatusHeader.js +1 -141
- package/lib/module/ui/gameUI/constants/gameUIColors.js +1 -220
- package/lib/module/ui/gameUI/constants/macOSDesignSystemColors.js +1 -219
- package/lib/module/ui/gameUI/hooks/useGameUIAlertState.js +1 -105
- package/lib/module/ui/gameUI/index.js +1 -19
- package/lib/module/ui/index.js +1 -31
- package/lib/module/ui/listPresets.js +1 -39
- package/lib/module/ui/night/nightTheme.js +1 -126
- package/lib/module/ui/night/primitives.js +1 -504
- package/lib/module/ui/otto/OttoSceneView.js +1 -64
- package/lib/module/ui/otto/OttoSprite.js +1 -496
- package/lib/module/ui/otto/index.js +1 -22
- package/lib/module/ui/otto/ottoEngine.js +1 -2729
- package/lib/module/ui/otto/ottoScenes.js +1 -942
- package/lib/module/ui/otto/ottoSheet.js +1 -180
- package/lib/module/ui/toolTheme.js +1 -93
- package/lib/module/utils/absoluteFill.js +1 -24
- package/lib/module/utils/browserAsyncStorage.js +1 -0
- package/lib/module/utils/browserNavigation.js +1 -0
- package/lib/module/utils/devServer.js +1 -58
- package/lib/module/utils/devServer.web.js +1 -0
- package/lib/module/utils/displayValue.js +1 -36
- package/lib/module/utils/domRuntime.js +1 -0
- package/lib/module/utils/expoRouterModule.js +1 -0
- package/lib/module/utils/expoRouterModule.web.js +1 -0
- package/lib/module/utils/formatting/dataFormatting.js +1 -93
- package/lib/module/utils/formatting/httpFormatting.js +1 -142
- package/lib/module/utils/formatting/index.js +1 -8
- package/lib/module/utils/getSafeAreaInsets.js +1 -36
- package/lib/module/utils/getSafeAreaInsets.web.js +1 -0
- package/lib/module/utils/index.js +1 -18
- package/lib/module/utils/loadOptionalModule.js +1 -89
- package/lib/module/utils/loadToolModule.js +1 -0
- package/lib/module/utils/loadToolModule.web.js +1 -0
- package/lib/module/utils/minimalSuperJSON.js +1 -342
- package/lib/module/utils/modalStorage.js +1 -0
- package/lib/module/utils/nativeWeb.js +1 -0
- package/lib/module/utils/persistentStorage.js +1 -603
- package/lib/module/utils/persistentStorage.web.js +1 -0
- package/lib/module/utils/realNow.js +1 -0
- package/lib/module/utils/reloadApp.js +1 -137
- package/lib/module/utils/reloadPlatform.js +1 -0
- package/lib/module/utils/reloadPlatform.web.js +1 -0
- package/lib/module/utils/renderCaptureRegistry.js +1 -54
- package/lib/module/utils/safeExpoRouter.js +1 -239
- package/lib/module/utils/safeExpoRouter.web.js +1 -0
- package/lib/module/utils/safeStringify.js +1 -225
- package/lib/module/utils/snapshotProviderKit.js +1 -156
- package/lib/module/utils/stateSnapshotRegistry.js +1 -64
- package/lib/module/utils/stateTools.js +1 -154
- package/lib/module/utils/subscribable.js +1 -108
- package/lib/module/utils/subscriberCountNotifier.js +1 -66
- package/lib/module/utils/time/RelativeTime.js +1 -28
- package/lib/module/utils/time/TickContext.js +1 -38
- package/lib/module/utils/time/formatRelativeTime.js +1 -30
- package/lib/module/utils/time/index.js +1 -6
- package/lib/module/utils/time/useRelativeTime.js +1 -33
- package/lib/module/utils/toolModules.js +1 -0
- package/lib/module/utils/typeHelpers.js +1 -130
- package/lib/module/utils/valueFormatting.js +1 -131
- package/lib/typescript/commonjs/JsModal.web.d.ts +7 -18
- package/lib/typescript/commonjs/clipboard/clipboard-impl.web.d.ts +5 -0
- package/lib/typescript/commonjs/hooks/safe-area-impl.d.ts +1 -1
- package/lib/typescript/commonjs/hooks/useSafeAreaInsets.web.d.ts +6 -0
- package/lib/typescript/commonjs/icons/index.d.ts +2 -0
- package/lib/typescript/commonjs/index.d.ts +3 -1
- package/lib/typescript/commonjs/license/AccountSetup.web.d.ts +1 -1
- package/lib/typescript/commonjs/license/AccountSetupContent.d.ts +11 -0
- package/lib/typescript/commonjs/license/FreeAccountPrompt.d.ts +3 -15
- package/lib/typescript/commonjs/license/accountRuntime.d.ts +2 -0
- package/lib/typescript/commonjs/license/accountRuntime.web.d.ts +2 -0
- package/lib/typescript/commonjs/license/licenseModule.d.ts +3 -1
- package/lib/typescript/commonjs/storage/devToolsStorageKeys.d.ts +8 -0
- package/lib/typescript/commonjs/stores/ignoredPatternsStore.d.ts +1 -59
- package/lib/typescript/commonjs/stores/ignoredPatternsStore.shared.d.ts +60 -0
- package/lib/typescript/commonjs/stores/ignoredPatternsStore.web.d.ts +1 -71
- package/lib/typescript/commonjs/ui/night/primitives.d.ts +9 -3
- package/lib/typescript/commonjs/ui/otto/ottoEngine.d.ts +1 -1
- package/lib/typescript/commonjs/utils/browserAsyncStorage.d.ts +25 -0
- package/lib/typescript/commonjs/utils/browserNavigation.d.ts +31 -0
- package/lib/typescript/commonjs/utils/devServer.web.d.ts +2 -0
- package/lib/typescript/commonjs/utils/domRuntime.d.ts +27 -0
- package/lib/typescript/commonjs/utils/expoRouterModule.d.ts +3 -0
- package/lib/typescript/commonjs/utils/expoRouterModule.web.d.ts +3 -0
- package/lib/typescript/commonjs/utils/getSafeAreaInsets.web.d.ts +8 -0
- package/lib/typescript/commonjs/utils/index.d.ts +6 -0
- package/lib/typescript/commonjs/utils/loadToolModule.d.ts +3 -0
- package/lib/typescript/commonjs/utils/loadToolModule.web.d.ts +2 -0
- package/lib/typescript/commonjs/utils/modalStorage.d.ts +21 -0
- package/lib/typescript/commonjs/utils/nativeWeb.d.ts +22 -0
- package/lib/typescript/commonjs/utils/persistentStorage.web.d.ts +6 -0
- package/lib/typescript/commonjs/utils/realNow.d.ts +11 -0
- package/lib/typescript/commonjs/utils/reloadApp.d.ts +7 -25
- package/lib/typescript/commonjs/utils/reloadPlatform.d.ts +8 -0
- package/lib/typescript/commonjs/utils/reloadPlatform.web.d.ts +4 -0
- package/lib/typescript/commonjs/utils/safeExpoRouter.web.d.ts +43 -0
- package/lib/typescript/commonjs/utils/toolModules.d.ts +5 -0
- package/lib/typescript/module/JsModal.web.d.ts +7 -18
- package/lib/typescript/module/clipboard/clipboard-impl.web.d.ts +5 -0
- package/lib/typescript/module/hooks/safe-area-impl.d.ts +1 -1
- package/lib/typescript/module/hooks/useSafeAreaInsets.web.d.ts +6 -0
- package/lib/typescript/module/icons/index.d.ts +2 -0
- package/lib/typescript/module/index.d.ts +3 -1
- package/lib/typescript/module/license/AccountSetup.web.d.ts +1 -1
- package/lib/typescript/module/license/AccountSetupContent.d.ts +11 -0
- package/lib/typescript/module/license/FreeAccountPrompt.d.ts +3 -15
- package/lib/typescript/module/license/accountRuntime.d.ts +2 -0
- package/lib/typescript/module/license/accountRuntime.web.d.ts +2 -0
- package/lib/typescript/module/license/licenseModule.d.ts +3 -1
- package/lib/typescript/module/storage/devToolsStorageKeys.d.ts +8 -0
- package/lib/typescript/module/stores/ignoredPatternsStore.d.ts +1 -59
- package/lib/typescript/module/stores/ignoredPatternsStore.shared.d.ts +60 -0
- package/lib/typescript/module/stores/ignoredPatternsStore.web.d.ts +1 -71
- package/lib/typescript/module/ui/night/primitives.d.ts +9 -3
- package/lib/typescript/module/ui/otto/ottoEngine.d.ts +1 -1
- package/lib/typescript/module/utils/browserAsyncStorage.d.ts +25 -0
- package/lib/typescript/module/utils/browserNavigation.d.ts +31 -0
- package/lib/typescript/module/utils/devServer.web.d.ts +2 -0
- package/lib/typescript/module/utils/domRuntime.d.ts +27 -0
- package/lib/typescript/module/utils/expoRouterModule.d.ts +3 -0
- package/lib/typescript/module/utils/expoRouterModule.web.d.ts +3 -0
- package/lib/typescript/module/utils/getSafeAreaInsets.web.d.ts +8 -0
- package/lib/typescript/module/utils/index.d.ts +6 -0
- package/lib/typescript/module/utils/loadToolModule.d.ts +3 -0
- package/lib/typescript/module/utils/loadToolModule.web.d.ts +2 -0
- package/lib/typescript/module/utils/modalStorage.d.ts +21 -0
- package/lib/typescript/module/utils/nativeWeb.d.ts +22 -0
- package/lib/typescript/module/utils/persistentStorage.web.d.ts +6 -0
- package/lib/typescript/module/utils/realNow.d.ts +11 -0
- package/lib/typescript/module/utils/reloadApp.d.ts +7 -25
- package/lib/typescript/module/utils/reloadPlatform.d.ts +8 -0
- package/lib/typescript/module/utils/reloadPlatform.web.d.ts +4 -0
- package/lib/typescript/module/utils/safeExpoRouter.web.d.ts +43 -0
- package/lib/typescript/module/utils/toolModules.d.ts +5 -0
- package/lib/web/asyncStorage.mjs +1 -0
- package/lib/web/chunks/chunk-26OV3QDY.mjs +1 -0
- package/lib/web/chunks/chunk-3UTMGIUG.mjs +1 -0
- package/lib/web/chunks/chunk-53J2FMUD.mjs +1 -0
- package/lib/web/chunks/chunk-5KWAGM5V.mjs +1 -0
- package/lib/web/chunks/chunk-5NZOQR6Q.mjs +1 -0
- package/lib/web/chunks/chunk-7PRKERDN.mjs +1 -0
- package/lib/web/chunks/chunk-CE5U3CSQ.mjs +1 -0
- package/lib/web/chunks/chunk-D4RXBAOO.mjs +15 -0
- package/lib/web/chunks/chunk-ER3T3IDI.mjs +1 -0
- package/lib/web/chunks/chunk-GF5C5DVX.mjs +1 -0
- package/lib/web/chunks/chunk-K7CGIEFU.mjs +1 -0
- package/lib/web/chunks/chunk-L3AFTHWX.mjs +14 -0
- package/lib/web/chunks/chunk-LZ7FZZ7R.mjs +1 -0
- package/lib/web/chunks/chunk-PTK5FO6C.mjs +1 -0
- package/lib/web/chunks/chunk-TJUBBXXK.mjs +1 -0
- package/lib/web/chunks/chunk-UKYVRCMZ.mjs +1 -0
- package/lib/web/chunks/chunk-XYUAUO57.mjs +1 -0
- package/lib/web/chunks/persistentStorage.web-6OAJAVRK.mjs +1 -0
- package/lib/web/colors.mjs +1 -0
- package/lib/web/dataViewer.mjs +2 -0
- package/lib/web/floating.mjs +1 -0
- package/lib/web/history.mjs +1 -0
- package/lib/web/hooks.mjs +1 -0
- package/lib/web/index.mjs +14 -0
- package/lib/web/native.mjs +1 -0
- package/lib/web/ui.mjs +1 -0
- package/lib/web/utils.mjs +1 -0
- package/package.json +121 -38
- package/scripts/detect-clipboard.js +5 -121
- package/scripts/detect-safe-area.js +3 -127
- package/ui.js +1 -7
- package/utils.js +1 -7
- package/lib/typescript/commonjs/JsModal.d.ts.map +0 -1
- package/lib/typescript/commonjs/JsModal.web.d.ts.map +0 -1
- package/lib/typescript/commonjs/clipboard/autoDetectClipboard.d.ts.map +0 -1
- package/lib/typescript/commonjs/clipboard/clipboard-impl.d.ts.map +0 -1
- package/lib/typescript/commonjs/clipboard/copyToClipboard.d.ts.map +0 -1
- package/lib/typescript/commonjs/clipboard/index.d.ts.map +0 -1
- package/lib/typescript/commonjs/colors/index.d.ts.map +0 -1
- package/lib/typescript/commonjs/context/HintsContext.d.ts.map +0 -1
- package/lib/typescript/commonjs/context/index.d.ts.map +0 -1
- package/lib/typescript/commonjs/dataViewer/CyberpunkInput.d.ts.map +0 -1
- package/lib/typescript/commonjs/dataViewer/DataTreeActionBar.d.ts.map +0 -1
- package/lib/typescript/commonjs/dataViewer/DataTreeActionDock.d.ts.map +0 -1
- package/lib/typescript/commonjs/dataViewer/DataViewer.d.ts.map +0 -1
- package/lib/typescript/commonjs/dataViewer/DiffSummary.d.ts.map +0 -1
- package/lib/typescript/commonjs/dataViewer/IndentGuides.d.ts.map +0 -1
- package/lib/typescript/commonjs/dataViewer/IndentGuidesOverlay.d.ts.map +0 -1
- package/lib/typescript/commonjs/dataViewer/JsonStringNotice.d.ts.map +0 -1
- package/lib/typescript/commonjs/dataViewer/LiveExplorer.d.ts.map +0 -1
- package/lib/typescript/commonjs/dataViewer/SplitDiffViewer.d.ts.map +0 -1
- package/lib/typescript/commonjs/dataViewer/ThemedSplitView.d.ts.map +0 -1
- package/lib/typescript/commonjs/dataViewer/TimestampDeltaBar.d.ts.map +0 -1
- package/lib/typescript/commonjs/dataViewer/TypeLegend.d.ts.map +0 -1
- package/lib/typescript/commonjs/dataViewer/ValueEditModal.d.ts.map +0 -1
- package/lib/typescript/commonjs/dataViewer/VirtualizedDataExplorer.d.ts.map +0 -1
- package/lib/typescript/commonjs/dataViewer/diffThemes.d.ts.map +0 -1
- package/lib/typescript/commonjs/dataViewer/index.d.ts.map +0 -1
- package/lib/typescript/commonjs/dataViewer/jsonOps.d.ts.map +0 -1
- package/lib/typescript/commonjs/dataViewer/jsonStringValue.d.ts.map +0 -1
- package/lib/typescript/commonjs/dataViewer/lineDiff.d.ts.map +0 -1
- package/lib/typescript/commonjs/dataViewer/nestedPath.d.ts.map +0 -1
- package/lib/typescript/commonjs/dataViewer/objectDiff.d.ts.map +0 -1
- package/lib/typescript/commonjs/dataViewer/timestampDiff.d.ts.map +0 -1
- package/lib/typescript/commonjs/dataViewer/tree/TreeDiffViewer.d.ts.map +0 -1
- package/lib/typescript/commonjs/dataViewer/treeActions.d.ts.map +0 -1
- package/lib/typescript/commonjs/dataViewer/useTreeDraft.d.ts.map +0 -1
- package/lib/typescript/commonjs/dataViewer/useTreeEditor.d.ts.map +0 -1
- package/lib/typescript/commonjs/env/EnvironmentIndicator.d.ts.map +0 -1
- package/lib/typescript/commonjs/env/EnvironmentIndicator.web.d.ts.map +0 -1
- package/lib/typescript/commonjs/env/EnvironmentSelector.d.ts.map +0 -1
- package/lib/typescript/commonjs/env/EnvironmentSelectorInline.d.ts.map +0 -1
- package/lib/typescript/commonjs/env/EnvironmentSelectorInline.web.d.ts.map +0 -1
- package/lib/typescript/commonjs/history/HistoryProvider.d.ts.map +0 -1
- package/lib/typescript/commonjs/history/components/HistoryEntryRow.d.ts.map +0 -1
- package/lib/typescript/commonjs/history/components/HistoryList.d.ts.map +0 -1
- package/lib/typescript/commonjs/history/components/index.d.ts.map +0 -1
- package/lib/typescript/commonjs/history/index.d.ts.map +0 -1
- package/lib/typescript/commonjs/history/types.d.ts.map +0 -1
- package/lib/typescript/commonjs/hooks/index.d.ts.map +0 -1
- package/lib/typescript/commonjs/hooks/safe-area-impl.d.ts.map +0 -1
- package/lib/typescript/commonjs/hooks/useChangeLog.d.ts.map +0 -1
- package/lib/typescript/commonjs/hooks/useDeviceInfo.d.ts.map +0 -1
- package/lib/typescript/commonjs/hooks/useEventStoreEvents.d.ts.map +0 -1
- package/lib/typescript/commonjs/hooks/useFilterManager.d.ts.map +0 -1
- package/lib/typescript/commonjs/hooks/usePersistedState.d.ts.map +0 -1
- package/lib/typescript/commonjs/hooks/useSafeAreaInsets.d.ts.map +0 -1
- package/lib/typescript/commonjs/icons/BenchmarkIcon.d.ts.map +0 -1
- package/lib/typescript/commonjs/icons/EnvLaptopIcon.d.ts.map +0 -1
- package/lib/typescript/commonjs/icons/IconBackground.d.ts.map +0 -1
- package/lib/typescript/commonjs/icons/ReactQueryIcon.d.ts.map +0 -1
- package/lib/typescript/commonjs/icons/RenderCountIcon.d.ts.map +0 -1
- package/lib/typescript/commonjs/icons/RouteMapIcon.d.ts.map +0 -1
- package/lib/typescript/commonjs/icons/SentryBugIcon.d.ts.map +0 -1
- package/lib/typescript/commonjs/icons/StackPulseIcon.d.ts.map +0 -1
- package/lib/typescript/commonjs/icons/StorageStackIcon.d.ts.map +0 -1
- package/lib/typescript/commonjs/icons/WifiCircuitIcon.d.ts.map +0 -1
- package/lib/typescript/commonjs/icons/index.d.ts.map +0 -1
- package/lib/typescript/commonjs/icons/lucide-icons-original-full.d.ts.map +0 -1
- package/lib/typescript/commonjs/icons/lucide-icons.d.ts.map +0 -1
- package/lib/typescript/commonjs/icons/primitives/GlobeIcon.d.ts.map +0 -1
- package/lib/typescript/commonjs/icons/primitives/icon-primitives.d.ts.map +0 -1
- package/lib/typescript/commonjs/icons/primitives/index.d.ts.map +0 -1
- package/lib/typescript/commonjs/index.d.ts.map +0 -1
- package/lib/typescript/commonjs/license/AccountSetup.d.ts.map +0 -1
- package/lib/typescript/commonjs/license/AccountSetup.web.d.ts.map +0 -1
- package/lib/typescript/commonjs/license/FeatureGate.d.ts.map +0 -1
- package/lib/typescript/commonjs/license/FreeAccountPrompt.d.ts.map +0 -1
- package/lib/typescript/commonjs/license/LicenseEntryModal.d.ts.map +0 -1
- package/lib/typescript/commonjs/license/index.d.ts.map +0 -1
- package/lib/typescript/commonjs/license/licenseModule.d.ts.map +0 -1
- package/lib/typescript/commonjs/license/openPricing.d.ts.map +0 -1
- package/lib/typescript/commonjs/license/tierLimits.d.ts.map +0 -1
- package/lib/typescript/commonjs/logger/index-sentry.d.ts.map +0 -1
- package/lib/typescript/commonjs/logger/index.d.ts.map +0 -1
- package/lib/typescript/commonjs/logger/logDump.d.ts.map +0 -1
- package/lib/typescript/commonjs/logger/types.d.ts.map +0 -1
- package/lib/typescript/commonjs/settings/components/BubbleSettingsSection.d.ts.map +0 -1
- package/lib/typescript/commonjs/settings/index.d.ts.map +0 -1
- package/lib/typescript/commonjs/storage/definePersistedSetting.d.ts.map +0 -1
- package/lib/typescript/commonjs/storage/devToolsStorageKeys.d.ts.map +0 -1
- package/lib/typescript/commonjs/storage/index.d.ts.map +0 -1
- package/lib/typescript/commonjs/stores/BaseEventStore.d.ts.map +0 -1
- package/lib/typescript/commonjs/stores/ChangeLog.d.ts.map +0 -1
- package/lib/typescript/commonjs/stores/createToolStore.d.ts.map +0 -1
- package/lib/typescript/commonjs/stores/floatingToolStore.d.ts.map +0 -1
- package/lib/typescript/commonjs/stores/floatingToolStore.test.d.ts.map +0 -1
- package/lib/typescript/commonjs/stores/ignoredPatternsCore.d.ts.map +0 -1
- package/lib/typescript/commonjs/stores/ignoredPatternsStore.d.ts.map +0 -1
- package/lib/typescript/commonjs/stores/ignoredPatternsStore.web.d.ts.map +0 -1
- package/lib/typescript/commonjs/stores/index.d.ts.map +0 -1
- package/lib/typescript/commonjs/sync/keyedArrays.d.ts.map +0 -1
- package/lib/typescript/commonjs/sync/toolActionRegistry.d.ts.map +0 -1
- package/lib/typescript/commonjs/sync/toolAttention.test.d.ts.map +0 -1
- package/lib/typescript/commonjs/sync/toolSyncAdapter.d.ts.map +0 -1
- package/lib/typescript/commonjs/sync/toolUiBridge.d.ts.map +0 -1
- package/lib/typescript/commonjs/sync/typedEdit.d.ts.map +0 -1
- package/lib/typescript/commonjs/sync/valuePath.d.ts.map +0 -1
- package/lib/typescript/commonjs/sync/valueShape.d.ts.map +0 -1
- package/lib/typescript/commonjs/sync/wireBudget.d.ts.map +0 -1
- package/lib/typescript/commonjs/sync/wireForm.d.ts.map +0 -1
- package/lib/typescript/commonjs/tools/defineTool.d.ts.map +0 -1
- package/lib/typescript/commonjs/types/types.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/backgrounds/BackgroundSwitcher.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/backgrounds/ToolBackground.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/backgrounds/backgroundStore.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/backgrounds/index.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/backgrounds/primitives.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/backgrounds/registry.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/backgrounds/rng.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/backgrounds/skyClock.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/backgrounds/types.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/backgrounds/variants/daylight.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/backgrounds/variants/deepField.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/backgrounds/variants/hyperspace.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/backgrounds/variants/liveSky.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/backgrounds/variants/meteors.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/backgrounds/variants/moonlight.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/backgrounds/variants/underwater.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/backgrounds/variants/wormhole/motion.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/backgrounds/variants/wormhole/textures.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/backgrounds/variants/wormhole.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/BackButton.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/Badge.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/ChangeRow.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/ChipStrip.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/ClipboardHintBanner.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/CollapsibleSection.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/CompactFilterChips.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/CompactRow.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/CopyButton.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/DataInspector.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/DetailView.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/DetailViewToggle.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/DevToolsCard.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/DraggableHeader.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/DynamicFilterView.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/EmptyState.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/EntityFilterView.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/EventHistoryViewer/CompareBar.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/EventHistoryViewer/DiffModeTabs.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/EventHistoryViewer/EventHistoryViewer.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/EventHistoryViewer/EventPickerModal.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/EventHistoryViewer/ViewToggleCards.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/EventHistoryViewer/index.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/EventHistoryViewer/types.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/EventListItem.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/EventStepperFooter.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/ExpandablePopover.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/ExpandedInfoRow.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/ExportPreview.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/FilterComponents.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/GripVerticalIcon.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/HeaderSearchButton.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/InfoRow.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/ListItem.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/ModalHeader.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/ModalHintBanner.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/Pill.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/PowerToggleButton.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/SearchBar.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/SectionHeader.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/StatsCard.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/StatusIndicator.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/StorageTypeBadge.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/TabSelector.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/TimeDisplay.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/ToggleRow.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/ToolButton.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/ToolEmptyState.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/ToolFooter.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/ValueTypeBadge.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/WindowControls.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/index.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/windowDrag.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/console/CyberpunkButtonOutline.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/console/CyberpunkIconContainer.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/console/CyberpunkSectionButton.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/floating/FloatingTool.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/floating/FloatingTool.web.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/floating/FloatingToolHost.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/floating/FloatingToolHost.web.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/floating/index.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/floating/index.web.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/floating/onboardingConstants.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/floating/onboardingConstants.web.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/fonts.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/gameUI/components/GameUICollapsibleSection.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/gameUI/components/GameUICompactStats.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/gameUI/components/GameUIIssuesList.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/gameUI/components/GameUIStatusHeader.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/gameUI/constants/gameUIColors.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/gameUI/constants/macOSDesignSystemColors.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/gameUI/hooks/useGameUIAlertState.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/gameUI/index.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/index.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/listPresets.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/night/nightTheme.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/night/primitives.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/otto/OttoSceneView.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/otto/OttoSprite.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/otto/index.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/otto/ottoEngine.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/otto/ottoScenes.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/otto/ottoSheet.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/toolTheme.d.ts.map +0 -1
- package/lib/typescript/commonjs/utils/absoluteFill.d.ts.map +0 -1
- package/lib/typescript/commonjs/utils/devServer.d.ts.map +0 -1
- package/lib/typescript/commonjs/utils/displayValue.d.ts.map +0 -1
- package/lib/typescript/commonjs/utils/formatting/dataFormatting.d.ts.map +0 -1
- package/lib/typescript/commonjs/utils/formatting/httpFormatting.d.ts.map +0 -1
- package/lib/typescript/commonjs/utils/formatting/index.d.ts.map +0 -1
- package/lib/typescript/commonjs/utils/getSafeAreaInsets.d.ts.map +0 -1
- package/lib/typescript/commonjs/utils/index.d.ts.map +0 -1
- package/lib/typescript/commonjs/utils/loadOptionalModule.d.ts.map +0 -1
- package/lib/typescript/commonjs/utils/minimalSuperJSON.d.ts.map +0 -1
- package/lib/typescript/commonjs/utils/persistentStorage.d.ts.map +0 -1
- package/lib/typescript/commonjs/utils/reloadApp.d.ts.map +0 -1
- package/lib/typescript/commonjs/utils/renderCaptureRegistry.d.ts.map +0 -1
- package/lib/typescript/commonjs/utils/safeExpoRouter.d.ts.map +0 -1
- package/lib/typescript/commonjs/utils/safeStringify.d.ts.map +0 -1
- package/lib/typescript/commonjs/utils/snapshotProviderKit.d.ts.map +0 -1
- package/lib/typescript/commonjs/utils/stateSnapshotRegistry.d.ts.map +0 -1
- package/lib/typescript/commonjs/utils/stateTools.d.ts.map +0 -1
- package/lib/typescript/commonjs/utils/subscribable.d.ts.map +0 -1
- package/lib/typescript/commonjs/utils/subscriberCountNotifier.d.ts.map +0 -1
- package/lib/typescript/commonjs/utils/time/RelativeTime.d.ts.map +0 -1
- package/lib/typescript/commonjs/utils/time/TickContext.d.ts.map +0 -1
- package/lib/typescript/commonjs/utils/time/formatRelativeTime.d.ts.map +0 -1
- package/lib/typescript/commonjs/utils/time/index.d.ts.map +0 -1
- package/lib/typescript/commonjs/utils/time/useRelativeTime.d.ts.map +0 -1
- package/lib/typescript/commonjs/utils/typeHelpers.d.ts.map +0 -1
- package/lib/typescript/commonjs/utils/valueFormatting.d.ts.map +0 -1
- package/lib/typescript/module/JsModal.d.ts.map +0 -1
- package/lib/typescript/module/JsModal.web.d.ts.map +0 -1
- package/lib/typescript/module/clipboard/autoDetectClipboard.d.ts.map +0 -1
- package/lib/typescript/module/clipboard/clipboard-impl.d.ts.map +0 -1
- package/lib/typescript/module/clipboard/copyToClipboard.d.ts.map +0 -1
- package/lib/typescript/module/clipboard/index.d.ts.map +0 -1
- package/lib/typescript/module/colors/index.d.ts.map +0 -1
- package/lib/typescript/module/context/HintsContext.d.ts.map +0 -1
- package/lib/typescript/module/context/index.d.ts.map +0 -1
- package/lib/typescript/module/dataViewer/CyberpunkInput.d.ts.map +0 -1
- package/lib/typescript/module/dataViewer/DataTreeActionBar.d.ts.map +0 -1
- package/lib/typescript/module/dataViewer/DataTreeActionDock.d.ts.map +0 -1
- package/lib/typescript/module/dataViewer/DataViewer.d.ts.map +0 -1
- package/lib/typescript/module/dataViewer/DiffSummary.d.ts.map +0 -1
- package/lib/typescript/module/dataViewer/IndentGuides.d.ts.map +0 -1
- package/lib/typescript/module/dataViewer/IndentGuidesOverlay.d.ts.map +0 -1
- package/lib/typescript/module/dataViewer/JsonStringNotice.d.ts.map +0 -1
- package/lib/typescript/module/dataViewer/LiveExplorer.d.ts.map +0 -1
- package/lib/typescript/module/dataViewer/SplitDiffViewer.d.ts.map +0 -1
- package/lib/typescript/module/dataViewer/ThemedSplitView.d.ts.map +0 -1
- package/lib/typescript/module/dataViewer/TimestampDeltaBar.d.ts.map +0 -1
- package/lib/typescript/module/dataViewer/TypeLegend.d.ts.map +0 -1
- package/lib/typescript/module/dataViewer/ValueEditModal.d.ts.map +0 -1
- package/lib/typescript/module/dataViewer/VirtualizedDataExplorer.d.ts.map +0 -1
- package/lib/typescript/module/dataViewer/diffThemes.d.ts.map +0 -1
- package/lib/typescript/module/dataViewer/index.d.ts.map +0 -1
- package/lib/typescript/module/dataViewer/jsonOps.d.ts.map +0 -1
- package/lib/typescript/module/dataViewer/jsonStringValue.d.ts.map +0 -1
- package/lib/typescript/module/dataViewer/lineDiff.d.ts.map +0 -1
- package/lib/typescript/module/dataViewer/nestedPath.d.ts.map +0 -1
- package/lib/typescript/module/dataViewer/objectDiff.d.ts.map +0 -1
- package/lib/typescript/module/dataViewer/timestampDiff.d.ts.map +0 -1
- package/lib/typescript/module/dataViewer/tree/TreeDiffViewer.d.ts.map +0 -1
- package/lib/typescript/module/dataViewer/treeActions.d.ts.map +0 -1
- package/lib/typescript/module/dataViewer/useTreeDraft.d.ts.map +0 -1
- package/lib/typescript/module/dataViewer/useTreeEditor.d.ts.map +0 -1
- package/lib/typescript/module/env/EnvironmentIndicator.d.ts.map +0 -1
- package/lib/typescript/module/env/EnvironmentIndicator.web.d.ts.map +0 -1
- package/lib/typescript/module/env/EnvironmentSelector.d.ts.map +0 -1
- package/lib/typescript/module/env/EnvironmentSelectorInline.d.ts.map +0 -1
- package/lib/typescript/module/env/EnvironmentSelectorInline.web.d.ts.map +0 -1
- package/lib/typescript/module/history/HistoryProvider.d.ts.map +0 -1
- package/lib/typescript/module/history/components/HistoryEntryRow.d.ts.map +0 -1
- package/lib/typescript/module/history/components/HistoryList.d.ts.map +0 -1
- package/lib/typescript/module/history/components/index.d.ts.map +0 -1
- package/lib/typescript/module/history/index.d.ts.map +0 -1
- package/lib/typescript/module/history/types.d.ts.map +0 -1
- package/lib/typescript/module/hooks/index.d.ts.map +0 -1
- package/lib/typescript/module/hooks/safe-area-impl.d.ts.map +0 -1
- package/lib/typescript/module/hooks/useChangeLog.d.ts.map +0 -1
- package/lib/typescript/module/hooks/useDeviceInfo.d.ts.map +0 -1
- package/lib/typescript/module/hooks/useEventStoreEvents.d.ts.map +0 -1
- package/lib/typescript/module/hooks/useFilterManager.d.ts.map +0 -1
- package/lib/typescript/module/hooks/usePersistedState.d.ts.map +0 -1
- package/lib/typescript/module/hooks/useSafeAreaInsets.d.ts.map +0 -1
- package/lib/typescript/module/icons/BenchmarkIcon.d.ts.map +0 -1
- package/lib/typescript/module/icons/EnvLaptopIcon.d.ts.map +0 -1
- package/lib/typescript/module/icons/IconBackground.d.ts.map +0 -1
- package/lib/typescript/module/icons/ReactQueryIcon.d.ts.map +0 -1
- package/lib/typescript/module/icons/RenderCountIcon.d.ts.map +0 -1
- package/lib/typescript/module/icons/RouteMapIcon.d.ts.map +0 -1
- package/lib/typescript/module/icons/SentryBugIcon.d.ts.map +0 -1
- package/lib/typescript/module/icons/StackPulseIcon.d.ts.map +0 -1
- package/lib/typescript/module/icons/StorageStackIcon.d.ts.map +0 -1
- package/lib/typescript/module/icons/WifiCircuitIcon.d.ts.map +0 -1
- package/lib/typescript/module/icons/index.d.ts.map +0 -1
- package/lib/typescript/module/icons/lucide-icons-original-full.d.ts.map +0 -1
- package/lib/typescript/module/icons/lucide-icons.d.ts.map +0 -1
- package/lib/typescript/module/icons/primitives/GlobeIcon.d.ts.map +0 -1
- package/lib/typescript/module/icons/primitives/icon-primitives.d.ts.map +0 -1
- package/lib/typescript/module/icons/primitives/index.d.ts.map +0 -1
- package/lib/typescript/module/index.d.ts.map +0 -1
- package/lib/typescript/module/license/AccountSetup.d.ts.map +0 -1
- package/lib/typescript/module/license/AccountSetup.web.d.ts.map +0 -1
- package/lib/typescript/module/license/FeatureGate.d.ts.map +0 -1
- package/lib/typescript/module/license/FreeAccountPrompt.d.ts.map +0 -1
- package/lib/typescript/module/license/LicenseEntryModal.d.ts.map +0 -1
- package/lib/typescript/module/license/index.d.ts.map +0 -1
- package/lib/typescript/module/license/licenseModule.d.ts.map +0 -1
- package/lib/typescript/module/license/openPricing.d.ts.map +0 -1
- package/lib/typescript/module/license/tierLimits.d.ts.map +0 -1
- package/lib/typescript/module/logger/index-sentry.d.ts.map +0 -1
- package/lib/typescript/module/logger/index.d.ts.map +0 -1
- package/lib/typescript/module/logger/logDump.d.ts.map +0 -1
- package/lib/typescript/module/logger/types.d.ts.map +0 -1
- package/lib/typescript/module/settings/components/BubbleSettingsSection.d.ts.map +0 -1
- package/lib/typescript/module/settings/index.d.ts.map +0 -1
- package/lib/typescript/module/storage/definePersistedSetting.d.ts.map +0 -1
- package/lib/typescript/module/storage/devToolsStorageKeys.d.ts.map +0 -1
- package/lib/typescript/module/storage/index.d.ts.map +0 -1
- package/lib/typescript/module/stores/BaseEventStore.d.ts.map +0 -1
- package/lib/typescript/module/stores/ChangeLog.d.ts.map +0 -1
- package/lib/typescript/module/stores/createToolStore.d.ts.map +0 -1
- package/lib/typescript/module/stores/floatingToolStore.d.ts.map +0 -1
- package/lib/typescript/module/stores/floatingToolStore.test.d.ts.map +0 -1
- package/lib/typescript/module/stores/ignoredPatternsCore.d.ts.map +0 -1
- package/lib/typescript/module/stores/ignoredPatternsStore.d.ts.map +0 -1
- package/lib/typescript/module/stores/ignoredPatternsStore.web.d.ts.map +0 -1
- package/lib/typescript/module/stores/index.d.ts.map +0 -1
- package/lib/typescript/module/sync/keyedArrays.d.ts.map +0 -1
- package/lib/typescript/module/sync/toolActionRegistry.d.ts.map +0 -1
- package/lib/typescript/module/sync/toolAttention.test.d.ts.map +0 -1
- package/lib/typescript/module/sync/toolSyncAdapter.d.ts.map +0 -1
- package/lib/typescript/module/sync/toolUiBridge.d.ts.map +0 -1
- package/lib/typescript/module/sync/typedEdit.d.ts.map +0 -1
- package/lib/typescript/module/sync/valuePath.d.ts.map +0 -1
- package/lib/typescript/module/sync/valueShape.d.ts.map +0 -1
- package/lib/typescript/module/sync/wireBudget.d.ts.map +0 -1
- package/lib/typescript/module/sync/wireForm.d.ts.map +0 -1
- package/lib/typescript/module/tools/defineTool.d.ts.map +0 -1
- package/lib/typescript/module/types/types.d.ts.map +0 -1
- package/lib/typescript/module/ui/backgrounds/BackgroundSwitcher.d.ts.map +0 -1
- package/lib/typescript/module/ui/backgrounds/ToolBackground.d.ts.map +0 -1
- package/lib/typescript/module/ui/backgrounds/backgroundStore.d.ts.map +0 -1
- package/lib/typescript/module/ui/backgrounds/index.d.ts.map +0 -1
- package/lib/typescript/module/ui/backgrounds/primitives.d.ts.map +0 -1
- package/lib/typescript/module/ui/backgrounds/registry.d.ts.map +0 -1
- package/lib/typescript/module/ui/backgrounds/rng.d.ts.map +0 -1
- package/lib/typescript/module/ui/backgrounds/skyClock.d.ts.map +0 -1
- package/lib/typescript/module/ui/backgrounds/types.d.ts.map +0 -1
- package/lib/typescript/module/ui/backgrounds/variants/daylight.d.ts.map +0 -1
- package/lib/typescript/module/ui/backgrounds/variants/deepField.d.ts.map +0 -1
- package/lib/typescript/module/ui/backgrounds/variants/hyperspace.d.ts.map +0 -1
- package/lib/typescript/module/ui/backgrounds/variants/liveSky.d.ts.map +0 -1
- package/lib/typescript/module/ui/backgrounds/variants/meteors.d.ts.map +0 -1
- package/lib/typescript/module/ui/backgrounds/variants/moonlight.d.ts.map +0 -1
- package/lib/typescript/module/ui/backgrounds/variants/underwater.d.ts.map +0 -1
- package/lib/typescript/module/ui/backgrounds/variants/wormhole/motion.d.ts.map +0 -1
- package/lib/typescript/module/ui/backgrounds/variants/wormhole/textures.d.ts.map +0 -1
- package/lib/typescript/module/ui/backgrounds/variants/wormhole.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/BackButton.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/Badge.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/ChangeRow.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/ChipStrip.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/ClipboardHintBanner.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/CollapsibleSection.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/CompactFilterChips.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/CompactRow.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/CopyButton.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/DataInspector.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/DetailView.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/DetailViewToggle.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/DevToolsCard.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/DraggableHeader.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/DynamicFilterView.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/EmptyState.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/EntityFilterView.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/EventHistoryViewer/CompareBar.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/EventHistoryViewer/DiffModeTabs.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/EventHistoryViewer/EventHistoryViewer.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/EventHistoryViewer/EventPickerModal.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/EventHistoryViewer/ViewToggleCards.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/EventHistoryViewer/index.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/EventHistoryViewer/types.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/EventListItem.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/EventStepperFooter.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/ExpandablePopover.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/ExpandedInfoRow.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/ExportPreview.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/FilterComponents.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/GripVerticalIcon.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/HeaderSearchButton.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/InfoRow.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/ListItem.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/ModalHeader.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/ModalHintBanner.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/Pill.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/PowerToggleButton.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/SearchBar.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/SectionHeader.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/StatsCard.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/StatusIndicator.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/StorageTypeBadge.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/TabSelector.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/TimeDisplay.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/ToggleRow.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/ToolButton.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/ToolEmptyState.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/ToolFooter.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/ValueTypeBadge.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/WindowControls.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/index.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/windowDrag.d.ts.map +0 -1
- package/lib/typescript/module/ui/console/CyberpunkButtonOutline.d.ts.map +0 -1
- package/lib/typescript/module/ui/console/CyberpunkIconContainer.d.ts.map +0 -1
- package/lib/typescript/module/ui/console/CyberpunkSectionButton.d.ts.map +0 -1
- package/lib/typescript/module/ui/floating/FloatingTool.d.ts.map +0 -1
- package/lib/typescript/module/ui/floating/FloatingTool.web.d.ts.map +0 -1
- package/lib/typescript/module/ui/floating/FloatingToolHost.d.ts.map +0 -1
- package/lib/typescript/module/ui/floating/FloatingToolHost.web.d.ts.map +0 -1
- package/lib/typescript/module/ui/floating/index.d.ts.map +0 -1
- package/lib/typescript/module/ui/floating/index.web.d.ts.map +0 -1
- package/lib/typescript/module/ui/floating/onboardingConstants.d.ts.map +0 -1
- package/lib/typescript/module/ui/floating/onboardingConstants.web.d.ts.map +0 -1
- package/lib/typescript/module/ui/fonts.d.ts.map +0 -1
- package/lib/typescript/module/ui/gameUI/components/GameUICollapsibleSection.d.ts.map +0 -1
- package/lib/typescript/module/ui/gameUI/components/GameUICompactStats.d.ts.map +0 -1
- package/lib/typescript/module/ui/gameUI/components/GameUIIssuesList.d.ts.map +0 -1
- package/lib/typescript/module/ui/gameUI/components/GameUIStatusHeader.d.ts.map +0 -1
- package/lib/typescript/module/ui/gameUI/constants/gameUIColors.d.ts.map +0 -1
- package/lib/typescript/module/ui/gameUI/constants/macOSDesignSystemColors.d.ts.map +0 -1
- package/lib/typescript/module/ui/gameUI/hooks/useGameUIAlertState.d.ts.map +0 -1
- package/lib/typescript/module/ui/gameUI/index.d.ts.map +0 -1
- package/lib/typescript/module/ui/index.d.ts.map +0 -1
- package/lib/typescript/module/ui/listPresets.d.ts.map +0 -1
- package/lib/typescript/module/ui/night/nightTheme.d.ts.map +0 -1
- package/lib/typescript/module/ui/night/primitives.d.ts.map +0 -1
- package/lib/typescript/module/ui/otto/OttoSceneView.d.ts.map +0 -1
- package/lib/typescript/module/ui/otto/OttoSprite.d.ts.map +0 -1
- package/lib/typescript/module/ui/otto/index.d.ts.map +0 -1
- package/lib/typescript/module/ui/otto/ottoEngine.d.ts.map +0 -1
- package/lib/typescript/module/ui/otto/ottoScenes.d.ts.map +0 -1
- package/lib/typescript/module/ui/otto/ottoSheet.d.ts.map +0 -1
- package/lib/typescript/module/ui/toolTheme.d.ts.map +0 -1
- package/lib/typescript/module/utils/absoluteFill.d.ts.map +0 -1
- package/lib/typescript/module/utils/devServer.d.ts.map +0 -1
- package/lib/typescript/module/utils/displayValue.d.ts.map +0 -1
- package/lib/typescript/module/utils/formatting/dataFormatting.d.ts.map +0 -1
- package/lib/typescript/module/utils/formatting/httpFormatting.d.ts.map +0 -1
- package/lib/typescript/module/utils/formatting/index.d.ts.map +0 -1
- package/lib/typescript/module/utils/getSafeAreaInsets.d.ts.map +0 -1
- package/lib/typescript/module/utils/index.d.ts.map +0 -1
- package/lib/typescript/module/utils/loadOptionalModule.d.ts.map +0 -1
- package/lib/typescript/module/utils/minimalSuperJSON.d.ts.map +0 -1
- package/lib/typescript/module/utils/persistentStorage.d.ts.map +0 -1
- package/lib/typescript/module/utils/reloadApp.d.ts.map +0 -1
- package/lib/typescript/module/utils/renderCaptureRegistry.d.ts.map +0 -1
- package/lib/typescript/module/utils/safeExpoRouter.d.ts.map +0 -1
- package/lib/typescript/module/utils/safeStringify.d.ts.map +0 -1
- package/lib/typescript/module/utils/snapshotProviderKit.d.ts.map +0 -1
- package/lib/typescript/module/utils/stateSnapshotRegistry.d.ts.map +0 -1
- package/lib/typescript/module/utils/stateTools.d.ts.map +0 -1
- package/lib/typescript/module/utils/subscribable.d.ts.map +0 -1
- package/lib/typescript/module/utils/subscriberCountNotifier.d.ts.map +0 -1
- package/lib/typescript/module/utils/time/RelativeTime.d.ts.map +0 -1
- package/lib/typescript/module/utils/time/TickContext.d.ts.map +0 -1
- package/lib/typescript/module/utils/time/formatRelativeTime.d.ts.map +0 -1
- package/lib/typescript/module/utils/time/index.d.ts.map +0 -1
- package/lib/typescript/module/utils/time/useRelativeTime.d.ts.map +0 -1
- package/lib/typescript/module/utils/typeHelpers.d.ts.map +0 -1
- package/lib/typescript/module/utils/valueFormatting.d.ts.map +0 -1
- package/scripts/generate-wormhole-textures.cjs +0 -261
- package/scripts/test-wormhole-motion.cjs +0 -59
package/lib/module/JsModal.js
CHANGED
|
@@ -1,1810 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import { getUseAccountAccess } from "./license/licenseModule.js";
|
|
4
|
-
import { AccountSetup } from "./license/AccountSetup";
|
|
5
|
-
/**
|
|
6
|
-
* JsModal - Ultra-optimized for true 60FPS performance
|
|
7
|
-
*
|
|
8
|
-
* Achieves 60FPS by following the principles from the dial menu:
|
|
9
|
-
* 1. ALWAYS use native driver (useNativeDriver: true)
|
|
10
|
-
* 2. Use transforms instead of layout properties (translateY instead of height)
|
|
11
|
-
* 3. Use interpolation for all calculations (no JS thread math)
|
|
12
|
-
* 4. Minimize PanResponder JS work (direct setValue, no state updates)
|
|
13
|
-
*
|
|
14
|
-
* Structure follows SRP with each function doing ONE thing only.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
import { useState, useRef, useEffect, useMemo, useCallback, memo, isValidElement, cloneElement } from "react";
|
|
18
|
-
import { View, StyleSheet, TouchableWithoutFeedback, Dimensions, PanResponder, Animated, ScrollView, Text } from "react-native";
|
|
19
|
-
import { absoluteFill } from "./utils/absoluteFill.js";
|
|
20
|
-
import { useSafeAreaInsets } from "./hooks/useSafeAreaInsets.js";
|
|
21
|
-
import { gameUIColors, buoyColors } from "./ui/gameUI/index.js";
|
|
22
|
-
import { DraggableHeader, ModalHintBanner, WindowControls } from "./ui/components/index.js";
|
|
23
|
-
import { ToolBackground } from "./ui/backgrounds/ToolBackground.js";
|
|
24
|
-
import { night } from "./ui/night/nightTheme.js";
|
|
25
|
-
import { persistentStorage } from "./utils/persistentStorage.js";
|
|
26
|
-
import { devToolsStorageKeys } from "./storage/devToolsStorageKeys.js";
|
|
27
|
-
import { useHintsDisabled } from "./context/index.js";
|
|
28
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
29
|
-
// ============================================================================
|
|
30
|
-
// CONSTANTS - Modal dimensions and configuration
|
|
31
|
-
// ============================================================================
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Tool modals open and close without an entrance animation.
|
|
35
|
-
*
|
|
36
|
-
* The animated entrance was `parallel([spring(tension:180, friction:22),
|
|
37
|
-
* timing(200ms)])`. Two measured problems: the modal mounts at opacity 0 and
|
|
38
|
-
* the fade only starts once its content has committed, so a tap left the screen
|
|
39
|
-
* unchanged for ~240ms; and the spring's completion did not land until ~1s,
|
|
40
|
-
* creeping long after it looked settled. Snapping to the final state made the
|
|
41
|
-
* whole devtools UI feel markedly faster.
|
|
42
|
-
*
|
|
43
|
-
* Setting this to `false` restores the animation for every tool modal — this is
|
|
44
|
-
* shared chrome, not settings-specific.
|
|
45
|
-
*/
|
|
46
|
-
const INSTANT_MODAL_ENTRANCE = true;
|
|
47
|
-
const SCREEN = Dimensions.get("window");
|
|
48
|
-
const MIN_HEIGHT = 100;
|
|
49
|
-
const DEFAULT_HEIGHT = 400;
|
|
50
|
-
const FLOATING_WIDTH = SCREEN.width; // Full width
|
|
51
|
-
const FLOATING_HEIGHT = 500;
|
|
52
|
-
const FLOATING_MIN_WIDTH = SCREEN.width * 0.25; // 1/4 of screen width
|
|
53
|
-
const FLOATING_MIN_HEIGHT = 80; // Just a bit more than header height (60px header + 20px content)
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* Vertical band the absolutely-positioned window controls occupy at the top
|
|
57
|
-
* right of the chrome: `windowControlsContainer` top 4 + the expandable
|
|
58
|
-
* trigger's 2pt padding + a 12pt dot + 2 = 20. The drag-indicator strip above
|
|
59
|
-
* custom header content reserves exactly this, which is what lets a tool's
|
|
60
|
-
* header row below run the FULL width instead of buying its clearance with a
|
|
61
|
-
* right inset (that inset read as a hole on the right of every tool's nav).
|
|
62
|
-
*/
|
|
63
|
-
const WINDOW_CONTROLS_BAND = 20;
|
|
64
|
-
|
|
65
|
-
// ============================================================================
|
|
66
|
-
// STORAGE - Modal state persistence with AsyncStorage
|
|
67
|
-
// ============================================================================
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* Utility class for persisting modal state to AsyncStorage
|
|
71
|
-
*
|
|
72
|
-
* Handles saving and loading modal state including mode, dimensions,
|
|
73
|
-
* and position with memory caching for performance.
|
|
74
|
-
*/
|
|
75
|
-
class ModalStorage {
|
|
76
|
-
static memoryCache = {};
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* Save modal state to AsyncStorage with memory caching
|
|
80
|
-
*
|
|
81
|
-
* @param key - Storage key for the modal state
|
|
82
|
-
* @param value - Modal state to persist
|
|
83
|
-
*/
|
|
84
|
-
static async save(key, value) {
|
|
85
|
-
try {
|
|
86
|
-
this.memoryCache[key] = value;
|
|
87
|
-
await persistentStorage.setItem(key, JSON.stringify(value));
|
|
88
|
-
} catch (error) {
|
|
89
|
-
// Failed to save modal state
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* Load modal state from AsyncStorage with memory cache fallback
|
|
95
|
-
*
|
|
96
|
-
* @param key - Storage key for the modal state
|
|
97
|
-
* @returns Persisted modal state or null if not found
|
|
98
|
-
*/
|
|
99
|
-
static async load(key) {
|
|
100
|
-
try {
|
|
101
|
-
// Try memory cache first
|
|
102
|
-
if (this.memoryCache[key]) {
|
|
103
|
-
return this.memoryCache[key];
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
// Load from storage (AsyncStorage or memory fallback)
|
|
107
|
-
const stored = await persistentStorage.getItem(key);
|
|
108
|
-
if (stored) {
|
|
109
|
-
const parsed = JSON.parse(stored);
|
|
110
|
-
this.memoryCache[key] = parsed;
|
|
111
|
-
return parsed;
|
|
112
|
-
}
|
|
113
|
-
} catch (error) {
|
|
114
|
-
// Failed to load modal state
|
|
115
|
-
}
|
|
116
|
-
return null;
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
// ============================================================================
|
|
121
|
-
// TYPE DEFINITIONS - Interface contracts for the modal
|
|
122
|
-
// ============================================================================
|
|
123
|
-
|
|
124
|
-
/**
|
|
125
|
-
* Chrome variant. "night" (the default since the suite-wide theme move) is
|
|
126
|
-
* the Everlights-style sheet (see ui/night): near-black `#050505` surfaces at
|
|
127
|
-
* radius 16, a hairline accent border, a neutral drag handle instead of the
|
|
128
|
-
* teal bar, a transparent header, and the ToolBackground hoisted to the sheet
|
|
129
|
-
* root so the star field runs through the header instead of stopping under
|
|
130
|
-
* it. "default" is the legacy card-grey chrome, kept as an escape hatch.
|
|
131
|
-
*/
|
|
132
|
-
|
|
133
|
-
/**
|
|
134
|
-
* Modal state that can be saved and restored when minimizing/restoring
|
|
135
|
-
*/
|
|
136
|
-
|
|
137
|
-
// ============================================================================
|
|
138
|
-
// ICON COMPONENTS - Visual indicators for modal controls
|
|
139
|
-
// ============================================================================
|
|
140
|
-
|
|
141
|
-
/**
|
|
142
|
-
* DragIndicator - Visual feedback for draggable areas
|
|
143
|
-
*/
|
|
144
|
-
const DragIndicator = /*#__PURE__*/memo(function DragIndicator({
|
|
145
|
-
isResizing,
|
|
146
|
-
mode,
|
|
147
|
-
hasCustomContent = false,
|
|
148
|
-
variant = "default"
|
|
149
|
-
}) {
|
|
150
|
-
return /*#__PURE__*/_jsxs(View, {
|
|
151
|
-
style: [styles.dragIndicatorContainer, hasCustomContent && styles.dragIndicatorContainerCustom],
|
|
152
|
-
children: [/*#__PURE__*/_jsx(View, {
|
|
153
|
-
style: [styles.dragIndicator, mode === "floating" && styles.floatingDragIndicator, isResizing && styles.dragIndicatorActive,
|
|
154
|
-
// Night: the neutral Everlights sheet handle, no glow, both modes.
|
|
155
|
-
variant === "night" && styles.nightDragIndicator]
|
|
156
|
-
}), isResizing && mode === "bottomSheet" && /*#__PURE__*/_jsxs(View, {
|
|
157
|
-
style: styles.resizeGripContainer,
|
|
158
|
-
children: [/*#__PURE__*/_jsx(View, {
|
|
159
|
-
style: styles.resizeGripLine
|
|
160
|
-
}), /*#__PURE__*/_jsx(View, {
|
|
161
|
-
style: styles.resizeGripLine
|
|
162
|
-
}), /*#__PURE__*/_jsx(View, {
|
|
163
|
-
style: styles.resizeGripLine
|
|
164
|
-
})]
|
|
165
|
-
})]
|
|
166
|
-
});
|
|
167
|
-
});
|
|
168
|
-
|
|
169
|
-
/**
|
|
170
|
-
* CornerHandle - Resize handle for floating mode corners
|
|
171
|
-
*/
|
|
172
|
-
const CornerHandle = /*#__PURE__*/memo(function CornerHandle({
|
|
173
|
-
position,
|
|
174
|
-
isActive
|
|
175
|
-
}) {
|
|
176
|
-
return /*#__PURE__*/_jsx(View, {
|
|
177
|
-
style: [styles.cornerHandle],
|
|
178
|
-
children: /*#__PURE__*/_jsx(View, {
|
|
179
|
-
style: [styles.handler, isActive && styles.handlerActive]
|
|
180
|
-
})
|
|
181
|
-
});
|
|
182
|
-
});
|
|
183
|
-
|
|
184
|
-
/**
|
|
185
|
-
* ModalHeader - Header bar with title, controls, and drag area
|
|
186
|
-
*/
|
|
187
|
-
|
|
188
|
-
const ModalHeader = /*#__PURE__*/memo(function ModalHeader({
|
|
189
|
-
header,
|
|
190
|
-
onClose,
|
|
191
|
-
onToggleMode,
|
|
192
|
-
onMinimize,
|
|
193
|
-
isResizing,
|
|
194
|
-
mode,
|
|
195
|
-
panHandlers,
|
|
196
|
-
variant = "default"
|
|
197
|
-
}) {
|
|
198
|
-
const lastTapRef = useRef(0);
|
|
199
|
-
const tapCountRef = useRef(0);
|
|
200
|
-
const tapTimeoutRef = useRef(null);
|
|
201
|
-
const handleHeaderTap = useCallback(() => {
|
|
202
|
-
const now = Date.now();
|
|
203
|
-
const timeSinceLastTap = now - lastTapRef.current;
|
|
204
|
-
|
|
205
|
-
// Reset tap count if more than 500ms since last tap
|
|
206
|
-
if (timeSinceLastTap > 500) {
|
|
207
|
-
tapCountRef.current = 0;
|
|
208
|
-
}
|
|
209
|
-
tapCountRef.current++;
|
|
210
|
-
lastTapRef.current = now;
|
|
211
|
-
|
|
212
|
-
// Clear existing timeout
|
|
213
|
-
if (tapTimeoutRef.current) {
|
|
214
|
-
clearTimeout(tapTimeoutRef.current);
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
// Set timeout to process the tap gesture
|
|
218
|
-
tapTimeoutRef.current = setTimeout(() => {
|
|
219
|
-
if (tapCountRef.current === 2) {
|
|
220
|
-
// Double tap - toggle mode
|
|
221
|
-
onToggleMode();
|
|
222
|
-
} else if (tapCountRef.current >= 3) {
|
|
223
|
-
// Triple tap - minimize modal (if available)
|
|
224
|
-
if (onMinimize) {
|
|
225
|
-
onMinimize();
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
tapCountRef.current = 0;
|
|
229
|
-
}, 300);
|
|
230
|
-
}, [onToggleMode, onMinimize]);
|
|
231
|
-
|
|
232
|
-
// Clean up timeout on unmount
|
|
233
|
-
useEffect(() => {
|
|
234
|
-
return () => {
|
|
235
|
-
if (tapTimeoutRef.current) {
|
|
236
|
-
clearTimeout(tapTimeoutRef.current);
|
|
237
|
-
}
|
|
238
|
-
};
|
|
239
|
-
}, []);
|
|
240
|
-
const headerProps = panHandlers ? panHandlers : {};
|
|
241
|
-
// Disable tap handling when no panHandlers (i.e., when using DraggableHeader in floating mode)
|
|
242
|
-
const shouldHandleTap = !!panHandlers;
|
|
243
|
-
|
|
244
|
-
// If custom content is provided, check if it's a complete replacement
|
|
245
|
-
if (header?.customContent) {
|
|
246
|
-
// Check if the custom content is a complete header replacement (like CyberpunkModalHeader)
|
|
247
|
-
// by checking if it's a React element with specific props
|
|
248
|
-
const isCompleteReplacement = /*#__PURE__*/isValidElement(header.customContent) && typeof header.customContent.type === "function" && header.customContent.type.name === "CyberpunkModalHeader";
|
|
249
|
-
if (isCompleteReplacement) {
|
|
250
|
-
// Clone the element and pass the necessary props
|
|
251
|
-
return /*#__PURE__*/cloneElement(header.customContent, {
|
|
252
|
-
onToggleMode,
|
|
253
|
-
onClose,
|
|
254
|
-
mode,
|
|
255
|
-
panHandlers: headerProps,
|
|
256
|
-
showToggleButton: header?.showToggleButton !== false,
|
|
257
|
-
hideCloseButton: header?.hideCloseButton
|
|
258
|
-
});
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
// Otherwise, render custom content within the standard header structure
|
|
262
|
-
// Apply pan handlers to the outer View for dragging in floating mode
|
|
263
|
-
// If the custom content is a React element, inject onMinimize so it can trigger minimize
|
|
264
|
-
let customContentWithMinimize = header.customContent;
|
|
265
|
-
if (/*#__PURE__*/isValidElement(header.customContent) && onMinimize) {
|
|
266
|
-
customContentWithMinimize = /*#__PURE__*/cloneElement(header.customContent, {
|
|
267
|
-
onMinimize
|
|
268
|
-
});
|
|
269
|
-
}
|
|
270
|
-
const headerContent = /*#__PURE__*/_jsxs(View, {
|
|
271
|
-
style: styles.headerInner,
|
|
272
|
-
children: [/*#__PURE__*/_jsx(DragIndicator, {
|
|
273
|
-
isResizing: isResizing,
|
|
274
|
-
mode: mode,
|
|
275
|
-
hasCustomContent: true,
|
|
276
|
-
variant: variant
|
|
277
|
-
}), customContentWithMinimize]
|
|
278
|
-
});
|
|
279
|
-
return /*#__PURE__*/_jsx(View, {
|
|
280
|
-
style: [styles.header, variant === "night" && styles.nightHeader],
|
|
281
|
-
...headerProps,
|
|
282
|
-
children: shouldHandleTap ? /*#__PURE__*/_jsx(TouchableWithoutFeedback, {
|
|
283
|
-
onPress: handleHeaderTap,
|
|
284
|
-
children: headerContent
|
|
285
|
-
}) : headerContent
|
|
286
|
-
});
|
|
287
|
-
}
|
|
288
|
-
const headerContent = /*#__PURE__*/_jsxs(View, {
|
|
289
|
-
style: styles.headerInner,
|
|
290
|
-
children: [/*#__PURE__*/_jsx(DragIndicator, {
|
|
291
|
-
isResizing: isResizing,
|
|
292
|
-
mode: mode,
|
|
293
|
-
variant: variant
|
|
294
|
-
}), /*#__PURE__*/_jsxs(View, {
|
|
295
|
-
style: styles.headerContent,
|
|
296
|
-
children: [header?.title && /*#__PURE__*/_jsx(Text, {
|
|
297
|
-
style: styles.headerTitle,
|
|
298
|
-
children: header.title
|
|
299
|
-
}), header?.subtitle && /*#__PURE__*/_jsx(Text, {
|
|
300
|
-
style: styles.headerSubtitle,
|
|
301
|
-
children: header.subtitle
|
|
302
|
-
})]
|
|
303
|
-
}), /*#__PURE__*/_jsx(View, {
|
|
304
|
-
style: styles.headerHintText,
|
|
305
|
-
children: /*#__PURE__*/_jsx(Text, {
|
|
306
|
-
style: styles.hintText,
|
|
307
|
-
children: "Double tap: Toggle \u2022 Triple tap: Close"
|
|
308
|
-
})
|
|
309
|
-
})]
|
|
310
|
-
});
|
|
311
|
-
return /*#__PURE__*/_jsx(View, {
|
|
312
|
-
style: [styles.header, mode === "floating" && styles.floatingModeHeader, variant === "night" && styles.nightHeader],
|
|
313
|
-
...headerProps,
|
|
314
|
-
children: shouldHandleTap ? /*#__PURE__*/_jsx(TouchableWithoutFeedback, {
|
|
315
|
-
onPress: handleHeaderTap,
|
|
316
|
-
children: headerContent
|
|
317
|
-
}) : headerContent
|
|
318
|
-
});
|
|
319
|
-
});
|
|
320
|
-
|
|
321
|
-
// ============================================================================
|
|
322
|
-
// MAIN COMPONENT - Optimized for 60FPS with transforms and interpolation
|
|
323
|
-
// ============================================================================
|
|
324
|
-
/**
|
|
325
|
-
* JsModal - Ultra-optimized modal component for true 60FPS performance
|
|
326
|
-
*
|
|
327
|
-
* This modal component is designed for maximum performance using native driver
|
|
328
|
-
* animations, transforms instead of layout properties, and minimal JavaScript
|
|
329
|
-
* thread work. It supports two modes: bottom sheet and floating window.
|
|
330
|
-
*
|
|
331
|
-
* Key Performance Features:
|
|
332
|
-
* - Uses native driver for all animations (useNativeDriver: true)
|
|
333
|
-
* - Transform-based positioning instead of layout changes
|
|
334
|
-
* - Interpolation for all calculations on the native thread
|
|
335
|
-
* - Minimal PanResponder JavaScript work
|
|
336
|
-
* - State persistence with AsyncStorage
|
|
337
|
-
* - Drag and resize functionality in both modes
|
|
338
|
-
*
|
|
339
|
-
* @param props - Modal configuration and content
|
|
340
|
-
* @returns JSX.Element representing the modal
|
|
341
|
-
*
|
|
342
|
-
* @example
|
|
343
|
-
* ```typescript
|
|
344
|
-
* <JsModal
|
|
345
|
-
* visible={isVisible}
|
|
346
|
-
* onClose={() => setVisible(false)}
|
|
347
|
-
* header={{
|
|
348
|
-
* title: "Settings",
|
|
349
|
-
* subtitle: "Configure your preferences"
|
|
350
|
-
* }}
|
|
351
|
-
* persistenceKey="settings-modal"
|
|
352
|
-
* enablePersistence={true}
|
|
353
|
-
* >
|
|
354
|
-
* <SettingsContent />
|
|
355
|
-
* </JsModal>
|
|
356
|
-
* ```
|
|
357
|
-
*
|
|
358
|
-
* @performance All animations use native driver for 60FPS performance
|
|
359
|
-
* @performance Uses transform-based positioning for optimal rendering
|
|
360
|
-
* @performance Includes state persistence and restoration capabilities
|
|
361
|
-
*/
|
|
362
|
-
const JsModalComponent = ({
|
|
363
|
-
visible,
|
|
364
|
-
onClose,
|
|
365
|
-
children,
|
|
366
|
-
header,
|
|
367
|
-
styles: customStyles = {},
|
|
368
|
-
minHeight = MIN_HEIGHT,
|
|
369
|
-
maxHeight,
|
|
370
|
-
initialHeight = DEFAULT_HEIGHT,
|
|
371
|
-
animatedHeight: externalAnimatedHeight,
|
|
372
|
-
benchMotion,
|
|
373
|
-
initialMode = "bottomSheet",
|
|
374
|
-
onModeChange,
|
|
375
|
-
persistenceKey,
|
|
376
|
-
enablePersistence = true,
|
|
377
|
-
initialFloatingPosition,
|
|
378
|
-
footer,
|
|
379
|
-
footerHeight = 0,
|
|
380
|
-
onBack,
|
|
381
|
-
onMinimize,
|
|
382
|
-
minimizeRequest = 0,
|
|
383
|
-
minimizeTargetPosition,
|
|
384
|
-
initialModalState,
|
|
385
|
-
zIndex,
|
|
386
|
-
disableScrollWrapper = false,
|
|
387
|
-
background = true,
|
|
388
|
-
variant = "night"
|
|
389
|
-
}) => {
|
|
390
|
-
const insets = useSafeAreaInsets();
|
|
391
|
-
const [isStateLoaded, setIsStateLoaded] = useState(!enablePersistence);
|
|
392
|
-
const [mode, setMode] = useState(initialMode);
|
|
393
|
-
const [isResizing, setIsResizing] = useState(false);
|
|
394
|
-
const [isDragging, setIsDragging] = useState(false);
|
|
395
|
-
const [panelHeight, setPanelHeight] = useState(initialHeight);
|
|
396
|
-
const [dimensions, setDimensions] = useState({
|
|
397
|
-
width: FLOATING_WIDTH,
|
|
398
|
-
height: FLOATING_HEIGHT,
|
|
399
|
-
top: (SCREEN.height - FLOATING_HEIGHT) / 2,
|
|
400
|
-
left: 0 // Flush with left edge
|
|
401
|
-
});
|
|
402
|
-
const [containerBounds] = useState({
|
|
403
|
-
width: SCREEN.width,
|
|
404
|
-
height: SCREEN.height
|
|
405
|
-
});
|
|
406
|
-
const [showHint, setShowHint] = useState(false);
|
|
407
|
-
const [hintLoaded, setHintLoaded] = useState(false);
|
|
408
|
-
const hintsDisabled = useHintsDisabled();
|
|
409
|
-
|
|
410
|
-
// ============================================================================
|
|
411
|
-
// ANIMATED VALUES - All using native driver
|
|
412
|
-
// ============================================================================
|
|
413
|
-
|
|
414
|
-
// Main visibility progress (0 = hidden, 1 = visible)
|
|
415
|
-
const visibilityProgress = useRef(new Animated.Value(0)).current;
|
|
416
|
-
|
|
417
|
-
// Bottom sheet specific - using translateY for performance!
|
|
418
|
-
const bottomSheetTranslateY = useRef(new Animated.Value(SCREEN.height)).current;
|
|
419
|
-
const dragOffset = useRef(new Animated.Value(0)).current;
|
|
420
|
-
|
|
421
|
-
// Height tracking for resize - actual position from bottom
|
|
422
|
-
const animatedBottomPosition = useRef(new Animated.Value(initialHeight)).current;
|
|
423
|
-
const currentHeightRef = useRef(initialHeight);
|
|
424
|
-
|
|
425
|
-
// Save state with debounce
|
|
426
|
-
useEffect(() => {
|
|
427
|
-
if (!enablePersistence || !persistenceKey || !isStateLoaded) return;
|
|
428
|
-
const timeoutId = setTimeout(() => {
|
|
429
|
-
ModalStorage.save(persistenceKey, {
|
|
430
|
-
mode,
|
|
431
|
-
panelHeight: currentHeightRef.current,
|
|
432
|
-
dimensions,
|
|
433
|
-
isVisible: visible
|
|
434
|
-
});
|
|
435
|
-
}, 500);
|
|
436
|
-
return () => clearTimeout(timeoutId);
|
|
437
|
-
}, [mode, panelHeight, dimensions, visible, persistenceKey, enablePersistence, isStateLoaded]);
|
|
438
|
-
|
|
439
|
-
// Seed the external height ONCE. This used to re-run when `isResizing`
|
|
440
|
-
// flipped, which snapped an externally-controlled sheet back to
|
|
441
|
-
// initialHeight the moment a drag-resize ended (the release handler had
|
|
442
|
-
// just written the real height). The host owns the value after the seed;
|
|
443
|
-
// persistence restore above may overwrite the seed, which is correct.
|
|
444
|
-
const externalHeightSeeded = useRef(false);
|
|
445
|
-
useEffect(() => {
|
|
446
|
-
if (externalAnimatedHeight && !externalHeightSeeded.current) {
|
|
447
|
-
externalHeightSeeded.current = true;
|
|
448
|
-
currentHeightRef.current = initialHeight;
|
|
449
|
-
externalAnimatedHeight.setValue(initialHeight);
|
|
450
|
-
}
|
|
451
|
-
}, [externalAnimatedHeight, initialHeight]);
|
|
452
|
-
|
|
453
|
-
// Update refs when dimensions change
|
|
454
|
-
useEffect(() => {
|
|
455
|
-
currentDimensionsRef.current = dimensions;
|
|
456
|
-
}, [dimensions]);
|
|
457
|
-
|
|
458
|
-
// Floating mode animations - use initialFloatingPosition if provided
|
|
459
|
-
const floatingPosition = useRef(new Animated.ValueXY({
|
|
460
|
-
x: initialFloatingPosition?.x ?? 0,
|
|
461
|
-
// Flush with left edge
|
|
462
|
-
y: initialFloatingPosition?.y ?? (SCREEN.height - FLOATING_HEIGHT) / 2
|
|
463
|
-
})).current;
|
|
464
|
-
const floatingScale = useRef(new Animated.Value(0)).current;
|
|
465
|
-
const animatedWidth = useRef(new Animated.Value(FLOATING_WIDTH)).current;
|
|
466
|
-
const animatedFloatingHeight = useRef(new Animated.Value(FLOATING_HEIGHT)).current;
|
|
467
|
-
|
|
468
|
-
// Refs for resize handles
|
|
469
|
-
const currentDimensionsRef = useRef(dimensions);
|
|
470
|
-
const startDimensionsRef = useRef(dimensions);
|
|
471
|
-
const offsetX = useRef(0);
|
|
472
|
-
const offsetY = useRef(0);
|
|
473
|
-
const sHeight = useRef(0);
|
|
474
|
-
const sWidth = useRef(0);
|
|
475
|
-
|
|
476
|
-
// Load hint acknowledgment status on mount
|
|
477
|
-
useEffect(() => {
|
|
478
|
-
let mounted = true;
|
|
479
|
-
const loadHintStatus = async () => {
|
|
480
|
-
try {
|
|
481
|
-
const hintKey = devToolsStorageKeys.modal.hintAcknowledged();
|
|
482
|
-
const acknowledged = await persistentStorage.getItem(hintKey);
|
|
483
|
-
if (mounted) {
|
|
484
|
-
// Show hint if not acknowledged yet
|
|
485
|
-
setShowHint(acknowledged !== "true");
|
|
486
|
-
setHintLoaded(true);
|
|
487
|
-
}
|
|
488
|
-
} catch (error) {
|
|
489
|
-
// Failed to load hint status, default to showing hint
|
|
490
|
-
if (mounted) {
|
|
491
|
-
setShowHint(true);
|
|
492
|
-
setHintLoaded(true);
|
|
493
|
-
}
|
|
494
|
-
}
|
|
495
|
-
};
|
|
496
|
-
loadHintStatus();
|
|
497
|
-
return () => {
|
|
498
|
-
mounted = false;
|
|
499
|
-
};
|
|
500
|
-
}, []);
|
|
501
|
-
|
|
502
|
-
// Handle hint acknowledgment
|
|
503
|
-
const handleHintAcknowledge = useCallback(async () => {
|
|
504
|
-
try {
|
|
505
|
-
const hintKey = devToolsStorageKeys.modal.hintAcknowledged();
|
|
506
|
-
await persistentStorage.setItem(hintKey, "true");
|
|
507
|
-
setShowHint(false);
|
|
508
|
-
} catch (error) {
|
|
509
|
-
// Failed to save hint acknowledgment, just hide it locally
|
|
510
|
-
setShowHint(false);
|
|
511
|
-
}
|
|
512
|
-
}, []);
|
|
513
|
-
|
|
514
|
-
// Parents routinely pass an inline `onModeChange` (a new identity every
|
|
515
|
-
// render). The persisted-state load below is mount/key-scoped — if the
|
|
516
|
-
// callback identity re-triggered it, every parent re-render would reload
|
|
517
|
-
// the OLD persisted mode and stomp a live toggleMode() before the 500ms
|
|
518
|
-
// save debounce could write the new one (mode flipped to floating, then
|
|
519
|
-
// snapped back ~50ms later). So the callback rides in a ref instead of
|
|
520
|
-
// the dependency list.
|
|
521
|
-
const onModeChangeRef = useRef(onModeChange);
|
|
522
|
-
onModeChangeRef.current = onModeChange;
|
|
523
|
-
|
|
524
|
-
// Load persisted state on mount
|
|
525
|
-
useEffect(() => {
|
|
526
|
-
if (!enablePersistence || !persistenceKey) {
|
|
527
|
-
setIsStateLoaded(true);
|
|
528
|
-
return;
|
|
529
|
-
}
|
|
530
|
-
let mounted = true;
|
|
531
|
-
const loadState = async () => {
|
|
532
|
-
const savedState = await ModalStorage.load(persistenceKey);
|
|
533
|
-
if (mounted && savedState) {
|
|
534
|
-
// Restore mode
|
|
535
|
-
if (savedState.mode) {
|
|
536
|
-
setMode(savedState.mode);
|
|
537
|
-
// Notify parent of loaded mode
|
|
538
|
-
onModeChangeRef.current?.(savedState.mode);
|
|
539
|
-
}
|
|
540
|
-
|
|
541
|
-
// Restore bottom sheet height. The external animated height (when a
|
|
542
|
-
// host passes one) IS the rendered height, so it must be restored
|
|
543
|
-
// too or a persisted sheet always reopens at initialHeight.
|
|
544
|
-
if (savedState.panelHeight) {
|
|
545
|
-
setPanelHeight(savedState.panelHeight);
|
|
546
|
-
currentHeightRef.current = savedState.panelHeight;
|
|
547
|
-
animatedBottomPosition.setValue(savedState.panelHeight);
|
|
548
|
-
externalAnimatedHeight?.setValue(savedState.panelHeight);
|
|
549
|
-
}
|
|
550
|
-
|
|
551
|
-
// Restore floating dimensions and position
|
|
552
|
-
if (savedState.dimensions) {
|
|
553
|
-
setDimensions(savedState.dimensions);
|
|
554
|
-
floatingPosition.setValue({
|
|
555
|
-
x: savedState.dimensions.left,
|
|
556
|
-
y: savedState.dimensions.top
|
|
557
|
-
});
|
|
558
|
-
animatedWidth.setValue(savedState.dimensions.width);
|
|
559
|
-
animatedFloatingHeight.setValue(savedState.dimensions.height);
|
|
560
|
-
}
|
|
561
|
-
}
|
|
562
|
-
if (mounted) setIsStateLoaded(true);
|
|
563
|
-
};
|
|
564
|
-
loadState();
|
|
565
|
-
return () => {
|
|
566
|
-
mounted = false;
|
|
567
|
-
};
|
|
568
|
-
}, [persistenceKey, enablePersistence, animatedBottomPosition, animatedFloatingHeight, animatedWidth, floatingPosition]);
|
|
569
|
-
|
|
570
|
-
// Cleanup on unmount
|
|
571
|
-
useEffect(() => {
|
|
572
|
-
// Mount/Unmount effect
|
|
573
|
-
return () => {
|
|
574
|
-
// Stop all animations and reset when component unmounts
|
|
575
|
-
visibilityProgress.stopAnimation();
|
|
576
|
-
bottomSheetTranslateY.stopAnimation();
|
|
577
|
-
floatingScale.stopAnimation();
|
|
578
|
-
dragOffset.stopAnimation();
|
|
579
|
-
animatedBottomPosition.stopAnimation();
|
|
580
|
-
floatingPosition.stopAnimation();
|
|
581
|
-
animatedWidth.stopAnimation();
|
|
582
|
-
animatedFloatingHeight.stopAnimation();
|
|
583
|
-
|
|
584
|
-
// Reset to initial values
|
|
585
|
-
visibilityProgress.setValue(0);
|
|
586
|
-
bottomSheetTranslateY.setValue(SCREEN.height);
|
|
587
|
-
floatingScale.setValue(0);
|
|
588
|
-
dragOffset.setValue(0);
|
|
589
|
-
animatedBottomPosition.setValue(initialHeight);
|
|
590
|
-
currentHeightRef.current = initialHeight;
|
|
591
|
-
};
|
|
592
|
-
}, []);
|
|
593
|
-
|
|
594
|
-
// ============================================================================
|
|
595
|
-
// INTERPOLATIONS - All math done natively!
|
|
596
|
-
// ============================================================================
|
|
597
|
-
|
|
598
|
-
// Opacity interpolation for smooth fade
|
|
599
|
-
const modalOpacity = visibilityProgress.interpolate({
|
|
600
|
-
inputRange: [0, 1],
|
|
601
|
-
outputRange: [0, 1],
|
|
602
|
-
extrapolate: "clamp"
|
|
603
|
-
});
|
|
604
|
-
|
|
605
|
-
// ============================================================================
|
|
606
|
-
// REFS for values we need to track
|
|
607
|
-
// ============================================================================
|
|
608
|
-
const effectiveMaxHeight = maxHeight || SCREEN.height - insets.top;
|
|
609
|
-
|
|
610
|
-
// Mode toggle handler
|
|
611
|
-
/**
|
|
612
|
-
* Toggle between bottom sheet and floating modal modes
|
|
613
|
-
*
|
|
614
|
-
* Clears active dragging and resizing states to prevent visual artifacts
|
|
615
|
-
* when switching between modes with different interaction patterns.
|
|
616
|
-
*/
|
|
617
|
-
const toggleMode = useCallback(() => {
|
|
618
|
-
// Avoid carrying active styling across modes
|
|
619
|
-
setIsDragging(false);
|
|
620
|
-
setIsResizing(false);
|
|
621
|
-
const newMode = mode === "bottomSheet" ? "floating" : "bottomSheet";
|
|
622
|
-
setMode(newMode);
|
|
623
|
-
onModeChange?.(newMode);
|
|
624
|
-
}, [mode, onModeChange]);
|
|
625
|
-
|
|
626
|
-
// Belt-and-suspenders: also clear flags when mode changes
|
|
627
|
-
useEffect(() => {
|
|
628
|
-
setIsDragging(false);
|
|
629
|
-
setIsResizing(false);
|
|
630
|
-
}, [mode]);
|
|
631
|
-
|
|
632
|
-
// Minimize handler - captures current state and animates out
|
|
633
|
-
const handleMinimize = useCallback(() => {
|
|
634
|
-
if (!onMinimize) return;
|
|
635
|
-
|
|
636
|
-
// Capture current modal state for restoration
|
|
637
|
-
const currentState = {
|
|
638
|
-
mode,
|
|
639
|
-
panelHeight: currentHeightRef.current,
|
|
640
|
-
floatingPosition: {
|
|
641
|
-
x: currentDimensionsRef.current.left,
|
|
642
|
-
y: currentDimensionsRef.current.top
|
|
643
|
-
},
|
|
644
|
-
floatingDimensions: {
|
|
645
|
-
width: currentDimensionsRef.current.width,
|
|
646
|
-
height: currentDimensionsRef.current.height
|
|
647
|
-
}
|
|
648
|
-
};
|
|
649
|
-
|
|
650
|
-
// Animate modal shrinking toward target position
|
|
651
|
-
const targetX = minimizeTargetPosition?.x ?? SCREEN.width - 50;
|
|
652
|
-
const targetY = minimizeTargetPosition?.y ?? SCREEN.height - 150;
|
|
653
|
-
|
|
654
|
-
// Calculate animation based on current mode
|
|
655
|
-
if (mode === "bottomSheet") {
|
|
656
|
-
// Animate bottom sheet shrinking and moving toward target
|
|
657
|
-
Animated.parallel([Animated.timing(visibilityProgress, {
|
|
658
|
-
toValue: 0,
|
|
659
|
-
duration: 300,
|
|
660
|
-
useNativeDriver: true
|
|
661
|
-
}), Animated.timing(bottomSheetTranslateY, {
|
|
662
|
-
toValue: SCREEN.height,
|
|
663
|
-
duration: 300,
|
|
664
|
-
useNativeDriver: true
|
|
665
|
-
})]).start(() => {
|
|
666
|
-
onMinimize(currentState);
|
|
667
|
-
});
|
|
668
|
-
} else {
|
|
669
|
-
// Floating mode - animate scale and position toward icon
|
|
670
|
-
Animated.parallel([Animated.timing(floatingScale, {
|
|
671
|
-
toValue: 0,
|
|
672
|
-
duration: 300,
|
|
673
|
-
useNativeDriver: true
|
|
674
|
-
}), Animated.timing(visibilityProgress, {
|
|
675
|
-
toValue: 0,
|
|
676
|
-
duration: 300,
|
|
677
|
-
useNativeDriver: true
|
|
678
|
-
}), Animated.timing(floatingPosition, {
|
|
679
|
-
toValue: {
|
|
680
|
-
x: targetX,
|
|
681
|
-
y: targetY
|
|
682
|
-
},
|
|
683
|
-
duration: 300,
|
|
684
|
-
useNativeDriver: true
|
|
685
|
-
})]).start(() => {
|
|
686
|
-
onMinimize(currentState);
|
|
687
|
-
});
|
|
688
|
-
}
|
|
689
|
-
}, [mode, onMinimize, minimizeTargetPosition, visibilityProgress, bottomSheetTranslateY, floatingScale, floatingPosition]);
|
|
690
|
-
const lastMinimizeRequest = useRef(minimizeRequest);
|
|
691
|
-
useEffect(() => {
|
|
692
|
-
if (lastMinimizeRequest.current === minimizeRequest) return;
|
|
693
|
-
lastMinimizeRequest.current = minimizeRequest;
|
|
694
|
-
handleMinimize();
|
|
695
|
-
}, [minimizeRequest, handleMinimize]);
|
|
696
|
-
|
|
697
|
-
// Apply initial modal state when restoring from minimized
|
|
698
|
-
useEffect(() => {
|
|
699
|
-
if (!initialModalState) return;
|
|
700
|
-
|
|
701
|
-
// Restore mode
|
|
702
|
-
if (initialModalState.mode) {
|
|
703
|
-
setMode(initialModalState.mode);
|
|
704
|
-
onModeChange?.(initialModalState.mode);
|
|
705
|
-
}
|
|
706
|
-
|
|
707
|
-
// Restore bottom sheet height
|
|
708
|
-
if (initialModalState.panelHeight) {
|
|
709
|
-
setPanelHeight(initialModalState.panelHeight);
|
|
710
|
-
currentHeightRef.current = initialModalState.panelHeight;
|
|
711
|
-
animatedBottomPosition.setValue(initialModalState.panelHeight);
|
|
712
|
-
}
|
|
713
|
-
|
|
714
|
-
// Restore floating dimensions and position
|
|
715
|
-
if (initialModalState.floatingDimensions && initialModalState.floatingPosition) {
|
|
716
|
-
const newDimensions = {
|
|
717
|
-
width: initialModalState.floatingDimensions.width,
|
|
718
|
-
height: initialModalState.floatingDimensions.height,
|
|
719
|
-
top: initialModalState.floatingPosition.y,
|
|
720
|
-
left: initialModalState.floatingPosition.x
|
|
721
|
-
};
|
|
722
|
-
setDimensions(newDimensions);
|
|
723
|
-
floatingPosition.setValue({
|
|
724
|
-
x: initialModalState.floatingPosition.x,
|
|
725
|
-
y: initialModalState.floatingPosition.y
|
|
726
|
-
});
|
|
727
|
-
animatedWidth.setValue(initialModalState.floatingDimensions.width);
|
|
728
|
-
animatedFloatingHeight.setValue(initialModalState.floatingDimensions.height);
|
|
729
|
-
}
|
|
730
|
-
}, [initialModalState]);
|
|
731
|
-
|
|
732
|
-
// ============================================================================
|
|
733
|
-
// EFFECT: Visibility Animations - All using native driver!
|
|
734
|
-
// ============================================================================
|
|
735
|
-
const snapVisibility = shown => {
|
|
736
|
-
if (shown) {
|
|
737
|
-
if (mode === "bottomSheet") {
|
|
738
|
-
bottomSheetTranslateY.setValue(0);
|
|
739
|
-
} else {
|
|
740
|
-
floatingScale.setValue(1);
|
|
741
|
-
floatingPosition.setValue({
|
|
742
|
-
x: currentDimensionsRef.current.left,
|
|
743
|
-
y: currentDimensionsRef.current.top
|
|
744
|
-
});
|
|
745
|
-
}
|
|
746
|
-
visibilityProgress.setValue(1);
|
|
747
|
-
} else {
|
|
748
|
-
if (mode === "bottomSheet") {
|
|
749
|
-
bottomSheetTranslateY.setValue(SCREEN.height);
|
|
750
|
-
}
|
|
751
|
-
visibilityProgress.setValue(0);
|
|
752
|
-
}
|
|
753
|
-
};
|
|
754
|
-
|
|
755
|
-
/**
|
|
756
|
-
* Snap DURING RENDER when `visible` flips, not only in the effect below.
|
|
757
|
-
*
|
|
758
|
-
* These values drive the sheet's opacity/translate through the native
|
|
759
|
-
* driver. The React commit for a `visible` change carries whatever the
|
|
760
|
-
* JS-side values are at render time — the OLD, hidden ones when the snap
|
|
761
|
-
* only happens in the effect — and on Fabric that commit's mount can land
|
|
762
|
-
* on the main thread AFTER the effect's native `setValue`, overwriting it.
|
|
763
|
-
* The Animated node then says "shown" while the UIView sits at opacity 0,
|
|
764
|
-
* until some unrelated re-render commits the JS-side values again. That
|
|
765
|
-
* is how "restore tool A: nothing; restore tool B: A appears; hide B: now
|
|
766
|
-
* B appears" happened — every restore was one commit behind.
|
|
767
|
-
*
|
|
768
|
-
* Setting the values before the render's props are computed makes the
|
|
769
|
-
* commit and the native node agree, whichever lands last. `setValue` is
|
|
770
|
-
* idempotent, so a re-run render is harmless.
|
|
771
|
-
*/
|
|
772
|
-
const snappedVisibleRef = useRef(null);
|
|
773
|
-
if (INSTANT_MODAL_ENTRANCE && snappedVisibleRef.current !== visible) {
|
|
774
|
-
snappedVisibleRef.current = visible;
|
|
775
|
-
snapVisibility(visible);
|
|
776
|
-
}
|
|
777
|
-
useEffect(() => {
|
|
778
|
-
// Visibility effect
|
|
779
|
-
let openAnimation = null;
|
|
780
|
-
let closeAnimation = null;
|
|
781
|
-
if (INSTANT_MODAL_ENTRANCE) {
|
|
782
|
-
// Snap to the final state — no animation in either direction. The
|
|
783
|
-
// render-phase snap above already did this for a `visible` flip; this
|
|
784
|
-
// re-applies it for a `mode` change while shown.
|
|
785
|
-
snapVisibility(visible);
|
|
786
|
-
return;
|
|
787
|
-
}
|
|
788
|
-
if (visible) {
|
|
789
|
-
// Reset position if needed and then open
|
|
790
|
-
bottomSheetTranslateY.setValue(SCREEN.height);
|
|
791
|
-
visibilityProgress.setValue(0);
|
|
792
|
-
|
|
793
|
-
// Open animations
|
|
794
|
-
if (mode === "bottomSheet") {
|
|
795
|
-
// Parallel animations for smooth opening
|
|
796
|
-
openAnimation = Animated.parallel([
|
|
797
|
-
// Slide up from bottom
|
|
798
|
-
Animated.spring(bottomSheetTranslateY, {
|
|
799
|
-
toValue: 0,
|
|
800
|
-
tension: 180,
|
|
801
|
-
friction: 22,
|
|
802
|
-
useNativeDriver: true
|
|
803
|
-
}),
|
|
804
|
-
// Fade in backdrop
|
|
805
|
-
Animated.timing(visibilityProgress, {
|
|
806
|
-
toValue: 1,
|
|
807
|
-
duration: 200,
|
|
808
|
-
useNativeDriver: true
|
|
809
|
-
})]);
|
|
810
|
-
openAnimation.start();
|
|
811
|
-
} else {
|
|
812
|
-
// Floating mode entrance - simple fade without scale pop
|
|
813
|
-
floatingScale.setValue(1); // Set scale to 1 directly, no animation
|
|
814
|
-
// Minimizing animated the window to the dock icon's corner. Put it
|
|
815
|
-
// back where it actually lives, or reopening leaves it parked
|
|
816
|
-
// off-screen — `initialModalState` only covers the dock's restore
|
|
817
|
-
// path, and the dial opens the same tool without one.
|
|
818
|
-
floatingPosition.setValue({
|
|
819
|
-
x: currentDimensionsRef.current.left,
|
|
820
|
-
y: currentDimensionsRef.current.top
|
|
821
|
-
});
|
|
822
|
-
openAnimation = Animated.timing(visibilityProgress, {
|
|
823
|
-
toValue: 1,
|
|
824
|
-
duration: 200,
|
|
825
|
-
useNativeDriver: true
|
|
826
|
-
});
|
|
827
|
-
openAnimation.start();
|
|
828
|
-
}
|
|
829
|
-
} else {
|
|
830
|
-
// Close animations
|
|
831
|
-
if (mode === "bottomSheet") {
|
|
832
|
-
closeAnimation = Animated.parallel([
|
|
833
|
-
// Slide down
|
|
834
|
-
Animated.spring(bottomSheetTranslateY, {
|
|
835
|
-
toValue: SCREEN.height,
|
|
836
|
-
tension: 180,
|
|
837
|
-
friction: 22,
|
|
838
|
-
useNativeDriver: true
|
|
839
|
-
}),
|
|
840
|
-
// Fade out backdrop
|
|
841
|
-
Animated.timing(visibilityProgress, {
|
|
842
|
-
toValue: 0,
|
|
843
|
-
duration: 200,
|
|
844
|
-
useNativeDriver: true
|
|
845
|
-
})]);
|
|
846
|
-
closeAnimation.start();
|
|
847
|
-
} else {
|
|
848
|
-
// Floating mode exit - simple fade without scale
|
|
849
|
-
closeAnimation = Animated.timing(visibilityProgress, {
|
|
850
|
-
toValue: 0,
|
|
851
|
-
duration: 200,
|
|
852
|
-
useNativeDriver: true
|
|
853
|
-
});
|
|
854
|
-
closeAnimation.start();
|
|
855
|
-
}
|
|
856
|
-
}
|
|
857
|
-
|
|
858
|
-
// Cleanup function - only stop animations, don't reset values
|
|
859
|
-
return () => {
|
|
860
|
-
// Cleanup animations
|
|
861
|
-
if (openAnimation) {
|
|
862
|
-
openAnimation.stop();
|
|
863
|
-
// Stopped open animation
|
|
864
|
-
}
|
|
865
|
-
if (closeAnimation) {
|
|
866
|
-
closeAnimation.stop();
|
|
867
|
-
// Stopped close animation
|
|
868
|
-
}
|
|
869
|
-
};
|
|
870
|
-
}, [visible, mode, visibilityProgress, bottomSheetTranslateY, floatingScale, floatingPosition, externalAnimatedHeight]); // Removed initialHeight to prevent animation restarts on height changes
|
|
871
|
-
|
|
872
|
-
// ============================================================================
|
|
873
|
-
// OPTIMIZED PAN RESPONDER: Bottom Sheet Resize
|
|
874
|
-
// Following the documentation pattern for proper resize
|
|
875
|
-
// ============================================================================
|
|
876
|
-
const headerTouchOffsetRef = useRef(0);
|
|
877
|
-
|
|
878
|
-
// DEV-ONLY scripted resize motion (see benchMotion prop). Mirrors
|
|
879
|
-
// onPanResponderMove exactly: direct setValue, no per-frame state. Every
|
|
880
|
-
// ~2.5s it simulates a grab/release (setIsResizing toggles) so the
|
|
881
|
-
// benchmark includes the gesture-boundary re-render cost.
|
|
882
|
-
useEffect(() => {
|
|
883
|
-
if (!__DEV__ || !benchMotion || !visible) return undefined;
|
|
884
|
-
let rafId = null;
|
|
885
|
-
let intervalId = null;
|
|
886
|
-
let running = true;
|
|
887
|
-
const start = Date.now();
|
|
888
|
-
let grabbed = false;
|
|
889
|
-
const setGrab = on => {
|
|
890
|
-
grabbed = on;
|
|
891
|
-
if (benchMotion === "resize" || benchMotion === "float-resize") {
|
|
892
|
-
setIsResizing(on);
|
|
893
|
-
} else if (benchMotion === "float-drag") {
|
|
894
|
-
setIsDragging(on);
|
|
895
|
-
}
|
|
896
|
-
};
|
|
897
|
-
if (benchMotion === "mode-cycle") {
|
|
898
|
-
intervalId = setInterval(() => toggleMode(), 2200);
|
|
899
|
-
} else {
|
|
900
|
-
const min = minHeight;
|
|
901
|
-
const max = effectiveMaxHeight;
|
|
902
|
-
const tick = () => {
|
|
903
|
-
if (!running) return;
|
|
904
|
-
const t = (Date.now() - start) / 1000;
|
|
905
|
-
const phase = t % 2.5; // grab 2s, release 0.5s
|
|
906
|
-
if (phase < 2 && !grabbed) setGrab(true);else if (phase >= 2 && grabbed) setGrab(false);
|
|
907
|
-
if (grabbed) {
|
|
908
|
-
const wave = (Math.sin(t * 2.2) + 1) / 2;
|
|
909
|
-
if (benchMotion === "resize") {
|
|
910
|
-
const targetHeight = min + wave * (max - min);
|
|
911
|
-
animatedBottomPosition.setValue(targetHeight);
|
|
912
|
-
currentHeightRef.current = targetHeight;
|
|
913
|
-
if (externalAnimatedHeight) {
|
|
914
|
-
externalAnimatedHeight.setValue(targetHeight);
|
|
915
|
-
}
|
|
916
|
-
} else if (benchMotion === "float-drag") {
|
|
917
|
-
// Same write DraggableHeader makes per move event.
|
|
918
|
-
const wave2 = (Math.sin(t * 1.7) + 1) / 2;
|
|
919
|
-
floatingPosition.setValue({
|
|
920
|
-
x: 10 + wave * Math.max(SCREEN.width - FLOATING_WIDTH - 20, 0),
|
|
921
|
-
y: 70 + wave2 * 260
|
|
922
|
-
});
|
|
923
|
-
} else if (benchMotion === "float-resize") {
|
|
924
|
-
// Same writes as the bottom-right corner resize handler.
|
|
925
|
-
const width = FLOATING_WIDTH + wave * Math.max(SCREEN.width - FLOATING_WIDTH - 40, 0);
|
|
926
|
-
const height = FLOATING_HEIGHT + wave * 240;
|
|
927
|
-
animatedWidth.setValue(width);
|
|
928
|
-
animatedFloatingHeight.setValue(height);
|
|
929
|
-
currentDimensionsRef.current = {
|
|
930
|
-
...currentDimensionsRef.current,
|
|
931
|
-
width,
|
|
932
|
-
height
|
|
933
|
-
};
|
|
934
|
-
}
|
|
935
|
-
}
|
|
936
|
-
rafId = requestAnimationFrame(tick);
|
|
937
|
-
};
|
|
938
|
-
rafId = requestAnimationFrame(tick);
|
|
939
|
-
}
|
|
940
|
-
return () => {
|
|
941
|
-
running = false;
|
|
942
|
-
if (rafId != null) cancelAnimationFrame(rafId);
|
|
943
|
-
if (intervalId != null) clearInterval(intervalId);
|
|
944
|
-
setIsResizing(false);
|
|
945
|
-
setIsDragging(false);
|
|
946
|
-
};
|
|
947
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
948
|
-
}, [benchMotion, visible]);
|
|
949
|
-
const bottomSheetPanResponder = useMemo(() => PanResponder.create({
|
|
950
|
-
// An external `animatedHeight` used to disable this responder
|
|
951
|
-
// outright ("externally controlled"), which left Ask Buoy's sheet —
|
|
952
|
-
// the one host that passes one, for its peek animation — with a
|
|
953
|
-
// header that could not be dragged in bottom-sheet mode. The move
|
|
954
|
-
// and release handlers below already write every height into the
|
|
955
|
-
// external value, so the host and the finger share one number; the
|
|
956
|
-
// grab just has to stop whatever the host is animating first.
|
|
957
|
-
onStartShouldSetPanResponder: () => mode === "bottomSheet",
|
|
958
|
-
onMoveShouldSetPanResponder: (evt, gestureState) => mode === "bottomSheet" && Math.abs(gestureState.dy) > 3,
|
|
959
|
-
onPanResponderTerminationRequest: () => false,
|
|
960
|
-
onPanResponderGrant: evt => {
|
|
961
|
-
setIsResizing(true);
|
|
962
|
-
|
|
963
|
-
// Where inside the header the finger grabbed
|
|
964
|
-
headerTouchOffsetRef.current = evt.nativeEvent.locationY || 0;
|
|
965
|
-
|
|
966
|
-
// Stop any in-flight animations so we start from truth
|
|
967
|
-
animatedBottomPosition.stopAnimation(val => {
|
|
968
|
-
currentHeightRef.current = val;
|
|
969
|
-
});
|
|
970
|
-
externalAnimatedHeight?.stopAnimation();
|
|
971
|
-
bottomSheetTranslateY.stopAnimation();
|
|
972
|
-
},
|
|
973
|
-
onPanResponderMove: evt => {
|
|
974
|
-
// Absolute finger anchoring: sheet top should match finger (minus header offset)
|
|
975
|
-
const sheetTop = evt.nativeEvent.pageY - headerTouchOffsetRef.current;
|
|
976
|
-
// Height is from bottom of screen to sheetTop
|
|
977
|
-
let targetHeight = SCREEN.height - sheetTop;
|
|
978
|
-
|
|
979
|
-
// Clamp
|
|
980
|
-
targetHeight = Math.max(minHeight, Math.min(targetHeight, effectiveMaxHeight));
|
|
981
|
-
|
|
982
|
-
// Push to UI (no React state!)
|
|
983
|
-
animatedBottomPosition.setValue(targetHeight);
|
|
984
|
-
currentHeightRef.current = targetHeight;
|
|
985
|
-
if (externalAnimatedHeight) {
|
|
986
|
-
externalAnimatedHeight.setValue(targetHeight);
|
|
987
|
-
}
|
|
988
|
-
},
|
|
989
|
-
onPanResponderRelease: (evt, gestureState) => {
|
|
990
|
-
setIsResizing(false);
|
|
991
|
-
const finalHeight = currentHeightRef.current;
|
|
992
|
-
|
|
993
|
-
// Optional: close with fast downward swipe
|
|
994
|
-
const shouldClose = gestureState.vy > 0.8 && gestureState.dy > 50 || gestureState.dy > 150 && finalHeight <= minHeight;
|
|
995
|
-
if (shouldClose) {
|
|
996
|
-
Animated.parallel([Animated.timing(visibilityProgress, {
|
|
997
|
-
toValue: 0,
|
|
998
|
-
duration: 200,
|
|
999
|
-
useNativeDriver: true
|
|
1000
|
-
}), Animated.spring(bottomSheetTranslateY, {
|
|
1001
|
-
toValue: SCREEN.height,
|
|
1002
|
-
tension: 180,
|
|
1003
|
-
friction: 22,
|
|
1004
|
-
useNativeDriver: true
|
|
1005
|
-
})]).start(() => onClose());
|
|
1006
|
-
return;
|
|
1007
|
-
}
|
|
1008
|
-
|
|
1009
|
-
// We're already at the finger-tracked height; avoid re-animating it.
|
|
1010
|
-
setPanelHeight(finalHeight);
|
|
1011
|
-
if (externalAnimatedHeight) externalAnimatedHeight.setValue(finalHeight);
|
|
1012
|
-
},
|
|
1013
|
-
onPanResponderTerminate: () => {
|
|
1014
|
-
setIsResizing(false);
|
|
1015
|
-
// snap back to the last stable height if you want; otherwise no-op
|
|
1016
|
-
}
|
|
1017
|
-
}), [mode, minHeight, effectiveMaxHeight, animatedBottomPosition, externalAnimatedHeight, bottomSheetTranslateY, visibilityProgress, onClose]);
|
|
1018
|
-
|
|
1019
|
-
// ============================================================================
|
|
1020
|
-
// CREATE RESIZE HANDLER: For 4-corner resize in floating mode (fixed geometry)
|
|
1021
|
-
// ============================================================================
|
|
1022
|
-
/**
|
|
1023
|
-
* Create a PanResponder for handling corner-based resizing in floating mode
|
|
1024
|
-
*
|
|
1025
|
-
* This function generates resize handlers for each corner that allow users to
|
|
1026
|
-
* resize the floating modal by dragging from any corner. It includes boundary
|
|
1027
|
-
* checking and minimum size constraints.
|
|
1028
|
-
*
|
|
1029
|
-
* @param corner - Which corner this handler is for
|
|
1030
|
-
* @returns PanResponder configured for that corner's resize behavior
|
|
1031
|
-
*
|
|
1032
|
-
* @performance Uses direct animated value updates for smooth resizing
|
|
1033
|
-
* @performance Includes safe area boundary checking for all corners
|
|
1034
|
-
*/
|
|
1035
|
-
const createResizeHandler = useCallback(corner => {
|
|
1036
|
-
let didResize = false;
|
|
1037
|
-
return PanResponder.create({
|
|
1038
|
-
onStartShouldSetPanResponder: () => mode === "floating",
|
|
1039
|
-
onMoveShouldSetPanResponder: () => mode === "floating",
|
|
1040
|
-
onPanResponderGrant: () => {
|
|
1041
|
-
didResize = false;
|
|
1042
|
-
const currentDims = currentDimensionsRef.current;
|
|
1043
|
-
|
|
1044
|
-
// If any animation is in-flight, stop and capture final XY to keep math consistent
|
|
1045
|
-
floatingPosition.stopAnimation(({
|
|
1046
|
-
x,
|
|
1047
|
-
y
|
|
1048
|
-
}) => {
|
|
1049
|
-
floatingPosition.setValue({
|
|
1050
|
-
x,
|
|
1051
|
-
y
|
|
1052
|
-
});
|
|
1053
|
-
});
|
|
1054
|
-
setIsResizing(true);
|
|
1055
|
-
// Snapshot starting rect
|
|
1056
|
-
startDimensionsRef.current = {
|
|
1057
|
-
...currentDims
|
|
1058
|
-
};
|
|
1059
|
-
|
|
1060
|
-
// Keep your existing refs up-to-date (not strictly needed now, but harmless)
|
|
1061
|
-
sHeight.current = currentDims.height;
|
|
1062
|
-
sWidth.current = currentDims.width;
|
|
1063
|
-
offsetX.current = currentDims.left;
|
|
1064
|
-
offsetY.current = currentDims.top;
|
|
1065
|
-
},
|
|
1066
|
-
onPanResponderMove: (_evt, gestureState) => {
|
|
1067
|
-
const {
|
|
1068
|
-
dx,
|
|
1069
|
-
dy
|
|
1070
|
-
} = gestureState;
|
|
1071
|
-
if (Math.abs(dx) < 0.5 && Math.abs(dy) < 0.5) return;
|
|
1072
|
-
didResize = true;
|
|
1073
|
-
// Safe-area–aware bounds
|
|
1074
|
-
const minLeft = Math.max(0, insets.left || 0);
|
|
1075
|
-
const maxRight = containerBounds.width - Math.max(0, insets.right || 0);
|
|
1076
|
-
const minTop = Math.max(0, insets.top || 0);
|
|
1077
|
-
const maxBottom = containerBounds.height - Math.max(0, insets.bottom || 0);
|
|
1078
|
-
const start = startDimensionsRef.current;
|
|
1079
|
-
const startRight = start.left + start.width;
|
|
1080
|
-
const startBottom = start.top + start.height;
|
|
1081
|
-
let left = start.left;
|
|
1082
|
-
let top = start.top;
|
|
1083
|
-
let right = startRight;
|
|
1084
|
-
let bottom = startBottom;
|
|
1085
|
-
switch (corner) {
|
|
1086
|
-
case "topLeft":
|
|
1087
|
-
{
|
|
1088
|
-
// Move left & top; anchor right & bottom
|
|
1089
|
-
const newLeft = Math.max(minLeft, Math.min(start.left + dx, startRight - FLOATING_MIN_WIDTH));
|
|
1090
|
-
const newTop = Math.max(minTop, Math.min(start.top + dy, startBottom - FLOATING_MIN_HEIGHT));
|
|
1091
|
-
left = newLeft;
|
|
1092
|
-
top = newTop;
|
|
1093
|
-
right = startRight;
|
|
1094
|
-
bottom = startBottom;
|
|
1095
|
-
break;
|
|
1096
|
-
}
|
|
1097
|
-
case "topRight":
|
|
1098
|
-
{
|
|
1099
|
-
// Move right & top; anchor left & bottom
|
|
1100
|
-
const newRight = Math.min(maxRight, Math.max(startRight + dx, start.left + FLOATING_MIN_WIDTH));
|
|
1101
|
-
const newTop = Math.max(minTop, Math.min(start.top + dy, startBottom - FLOATING_MIN_HEIGHT));
|
|
1102
|
-
left = start.left;
|
|
1103
|
-
top = newTop;
|
|
1104
|
-
right = newRight;
|
|
1105
|
-
bottom = startBottom;
|
|
1106
|
-
break;
|
|
1107
|
-
}
|
|
1108
|
-
case "bottomLeft":
|
|
1109
|
-
{
|
|
1110
|
-
// Move left & bottom; anchor right & top
|
|
1111
|
-
const newLeft = Math.max(minLeft, Math.min(start.left + dx, startRight - FLOATING_MIN_WIDTH));
|
|
1112
|
-
const newBottom = Math.min(maxBottom, Math.max(startBottom + dy, start.top + FLOATING_MIN_HEIGHT));
|
|
1113
|
-
left = newLeft;
|
|
1114
|
-
top = start.top;
|
|
1115
|
-
right = startRight;
|
|
1116
|
-
bottom = newBottom;
|
|
1117
|
-
break;
|
|
1118
|
-
}
|
|
1119
|
-
case "bottomRight":
|
|
1120
|
-
{
|
|
1121
|
-
// Move right & bottom; anchor left & top
|
|
1122
|
-
const newRight = Math.min(maxRight, Math.max(startRight + dx, start.left + FLOATING_MIN_WIDTH));
|
|
1123
|
-
const newBottom = Math.min(maxBottom, Math.max(startBottom + dy, start.top + FLOATING_MIN_HEIGHT));
|
|
1124
|
-
left = start.left;
|
|
1125
|
-
top = start.top;
|
|
1126
|
-
right = newRight;
|
|
1127
|
-
bottom = newBottom;
|
|
1128
|
-
break;
|
|
1129
|
-
}
|
|
1130
|
-
}
|
|
1131
|
-
|
|
1132
|
-
// Derive width/height from the edges
|
|
1133
|
-
const updatedWidth = Math.max(FLOATING_MIN_WIDTH, right - left);
|
|
1134
|
-
const updatedHeight = Math.max(FLOATING_MIN_HEIGHT, bottom - top);
|
|
1135
|
-
|
|
1136
|
-
// Push to UI
|
|
1137
|
-
setDimensions({
|
|
1138
|
-
width: updatedWidth,
|
|
1139
|
-
height: updatedHeight,
|
|
1140
|
-
left,
|
|
1141
|
-
top
|
|
1142
|
-
});
|
|
1143
|
-
|
|
1144
|
-
// Keep animated values in sync for your transforms
|
|
1145
|
-
animatedWidth.setValue(updatedWidth);
|
|
1146
|
-
animatedFloatingHeight.setValue(updatedHeight);
|
|
1147
|
-
floatingPosition.setValue({
|
|
1148
|
-
x: left,
|
|
1149
|
-
y: top
|
|
1150
|
-
});
|
|
1151
|
-
|
|
1152
|
-
// Cache
|
|
1153
|
-
currentDimensionsRef.current = {
|
|
1154
|
-
width: updatedWidth,
|
|
1155
|
-
height: updatedHeight,
|
|
1156
|
-
left,
|
|
1157
|
-
top
|
|
1158
|
-
};
|
|
1159
|
-
},
|
|
1160
|
-
onPanResponderRelease: () => {
|
|
1161
|
-
setIsResizing(false);
|
|
1162
|
-
didResize = false;
|
|
1163
|
-
// currentDimensionsRef already holds the last values
|
|
1164
|
-
setDimensions(currentDimensionsRef.current);
|
|
1165
|
-
},
|
|
1166
|
-
onPanResponderTerminate: () => {
|
|
1167
|
-
setIsResizing(false);
|
|
1168
|
-
didResize = false;
|
|
1169
|
-
}
|
|
1170
|
-
});
|
|
1171
|
-
}, [mode, containerBounds, insets.left, insets.right, insets.top, insets.bottom, floatingPosition, animatedWidth, animatedFloatingHeight, onClose, onBack]);
|
|
1172
|
-
const resizeHandlers = useMemo(() => {
|
|
1173
|
-
return {
|
|
1174
|
-
topLeft: createResizeHandler("topLeft"),
|
|
1175
|
-
topRight: createResizeHandler("topRight"),
|
|
1176
|
-
bottomLeft: createResizeHandler("bottomLeft"),
|
|
1177
|
-
bottomRight: createResizeHandler("bottomRight")
|
|
1178
|
-
};
|
|
1179
|
-
}, [createResizeHandler]);
|
|
1180
|
-
|
|
1181
|
-
// ============================================================================
|
|
1182
|
-
// Floating Mode Drag Handlers for DraggableHeader
|
|
1183
|
-
// ============================================================================
|
|
1184
|
-
const handleFloatingDragStart = useCallback(() => {
|
|
1185
|
-
setIsDragging(true);
|
|
1186
|
-
}, []);
|
|
1187
|
-
const handleFloatingDragEnd = useCallback(finalPosition => {
|
|
1188
|
-
setIsDragging(false);
|
|
1189
|
-
|
|
1190
|
-
// Update dimensions state to match final position
|
|
1191
|
-
const currentDims = currentDimensionsRef.current;
|
|
1192
|
-
const newDimensions = {
|
|
1193
|
-
...currentDims,
|
|
1194
|
-
left: finalPosition.x,
|
|
1195
|
-
top: finalPosition.y
|
|
1196
|
-
};
|
|
1197
|
-
setDimensions(newDimensions);
|
|
1198
|
-
}, []);
|
|
1199
|
-
|
|
1200
|
-
// Track taps for double/triple tap functionality
|
|
1201
|
-
const lastTapRef = useRef(0);
|
|
1202
|
-
const tapCountRef = useRef(0);
|
|
1203
|
-
const tapTimeoutRef = useRef(null);
|
|
1204
|
-
const handleFloatingTap = useCallback(() => {
|
|
1205
|
-
const now = Date.now();
|
|
1206
|
-
const timeSinceLastTap = now - lastTapRef.current;
|
|
1207
|
-
|
|
1208
|
-
// Reset tap count if more than 500ms since last tap
|
|
1209
|
-
if (timeSinceLastTap > 500) {
|
|
1210
|
-
tapCountRef.current = 0;
|
|
1211
|
-
}
|
|
1212
|
-
tapCountRef.current++;
|
|
1213
|
-
lastTapRef.current = now;
|
|
1214
|
-
|
|
1215
|
-
// Clear existing timeout
|
|
1216
|
-
if (tapTimeoutRef.current) {
|
|
1217
|
-
clearTimeout(tapTimeoutRef.current);
|
|
1218
|
-
}
|
|
1219
|
-
|
|
1220
|
-
// Set timeout to process the tap gesture
|
|
1221
|
-
tapTimeoutRef.current = setTimeout(() => {
|
|
1222
|
-
if (tapCountRef.current === 2) {
|
|
1223
|
-
// Double tap - toggle mode
|
|
1224
|
-
toggleMode();
|
|
1225
|
-
} else if (tapCountRef.current >= 3) {
|
|
1226
|
-
// Triple tap - minimize modal (if available)
|
|
1227
|
-
if (onMinimize) {
|
|
1228
|
-
handleMinimize();
|
|
1229
|
-
}
|
|
1230
|
-
}
|
|
1231
|
-
tapCountRef.current = 0;
|
|
1232
|
-
}, 300);
|
|
1233
|
-
}, [toggleMode, onMinimize, handleMinimize]);
|
|
1234
|
-
|
|
1235
|
-
// Clean up timeout on unmount for main component tap handler
|
|
1236
|
-
useEffect(() => {
|
|
1237
|
-
return () => {
|
|
1238
|
-
if (tapTimeoutRef.current) {
|
|
1239
|
-
clearTimeout(tapTimeoutRef.current);
|
|
1240
|
-
}
|
|
1241
|
-
};
|
|
1242
|
-
}, []);
|
|
1243
|
-
|
|
1244
|
-
// ============================================================================
|
|
1245
|
-
// RENDER: Modal UI with transform-based animations
|
|
1246
|
-
// ============================================================================
|
|
1247
|
-
|
|
1248
|
-
// When not visible the SAME tree is rendered, just parked off-screen. It has
|
|
1249
|
-
// to be the same tree: React reconciles by position, so a separate "hidden"
|
|
1250
|
-
// branch would unmount and rebuild every child on each minimize AND each
|
|
1251
|
-
// restore — which is the whole cost minimizing is supposed to avoid.
|
|
1252
|
-
|
|
1253
|
-
// Render floating mode
|
|
1254
|
-
if (mode === "floating") {
|
|
1255
|
-
return /*#__PURE__*/_jsxs(Animated.View, {
|
|
1256
|
-
nativeID: "jsmodal-root",
|
|
1257
|
-
pointerEvents: visible ? "auto" : "none",
|
|
1258
|
-
accessibilityElementsHidden: !visible,
|
|
1259
|
-
importantForAccessibility: visible ? "auto" : "no-hide-descendants",
|
|
1260
|
-
style: [styles.floatingModal, {
|
|
1261
|
-
width: dimensions.width,
|
|
1262
|
-
// Use state dimensions for real-time updates
|
|
1263
|
-
height: dimensions.height,
|
|
1264
|
-
opacity: modalOpacity,
|
|
1265
|
-
transform: [{
|
|
1266
|
-
translateX: floatingPosition.x
|
|
1267
|
-
}, {
|
|
1268
|
-
translateY: floatingPosition.y
|
|
1269
|
-
}],
|
|
1270
|
-
...(zIndex !== undefined && {
|
|
1271
|
-
zIndex
|
|
1272
|
-
})
|
|
1273
|
-
}, variant === "night" && styles.nightFloatingModal, (isDragging || isResizing) && styles.floatingModalDragging, customStyles.container, !visible && styles.parkedOffscreen],
|
|
1274
|
-
children: [background && variant === "night" ? /*#__PURE__*/_jsx(View, {
|
|
1275
|
-
style: styles.nightBackdropFloating,
|
|
1276
|
-
pointerEvents: "none",
|
|
1277
|
-
children: /*#__PURE__*/_jsx(ToolBackground, {})
|
|
1278
|
-
}) : null, /*#__PURE__*/_jsx(DraggableHeader, {
|
|
1279
|
-
position: floatingPosition,
|
|
1280
|
-
onDragStart: handleFloatingDragStart,
|
|
1281
|
-
onDragEnd: handleFloatingDragEnd,
|
|
1282
|
-
onTap: handleFloatingTap,
|
|
1283
|
-
containerBounds: containerBounds,
|
|
1284
|
-
elementSize: dimensions,
|
|
1285
|
-
minPosition: {
|
|
1286
|
-
x: 0,
|
|
1287
|
-
y: insets.top
|
|
1288
|
-
},
|
|
1289
|
-
style: styles.floatingHeader,
|
|
1290
|
-
enabled: mode === "floating" && !isResizing,
|
|
1291
|
-
children: /*#__PURE__*/_jsx(ModalHeader, {
|
|
1292
|
-
header: header,
|
|
1293
|
-
onClose: onClose,
|
|
1294
|
-
onToggleMode: toggleMode,
|
|
1295
|
-
onMinimize: onMinimize ? handleMinimize : undefined,
|
|
1296
|
-
isResizing: isDragging || isResizing,
|
|
1297
|
-
mode: mode,
|
|
1298
|
-
variant: variant
|
|
1299
|
-
})
|
|
1300
|
-
}), /*#__PURE__*/_jsx(View, {
|
|
1301
|
-
style: styles.windowControlsContainer,
|
|
1302
|
-
children: /*#__PURE__*/_jsx(WindowControls, {
|
|
1303
|
-
onClose: onClose,
|
|
1304
|
-
onMinimize: onMinimize ? handleMinimize : undefined,
|
|
1305
|
-
onToggleMode: toggleMode,
|
|
1306
|
-
mode: mode,
|
|
1307
|
-
variant: variant
|
|
1308
|
-
})
|
|
1309
|
-
}), /*#__PURE__*/_jsxs(View, {
|
|
1310
|
-
style: [styles.content, variant === "night" && styles.nightContent, customStyles.content],
|
|
1311
|
-
children: [background && variant !== "night" ? /*#__PURE__*/_jsx(ToolBackground, {}) : null, disableScrollWrapper ?
|
|
1312
|
-
/*#__PURE__*/
|
|
1313
|
-
// Render children directly when they manage their own scrolling (FlatList, etc.)
|
|
1314
|
-
_jsx(View, {
|
|
1315
|
-
style: {
|
|
1316
|
-
flex: 1,
|
|
1317
|
-
paddingBottom: footerHeight
|
|
1318
|
-
},
|
|
1319
|
-
children: children
|
|
1320
|
-
}) :
|
|
1321
|
-
/*#__PURE__*/
|
|
1322
|
-
// Wrap in ScrollView for content that needs scrolling
|
|
1323
|
-
_jsx(ScrollView, {
|
|
1324
|
-
style: {
|
|
1325
|
-
flex: 1
|
|
1326
|
-
},
|
|
1327
|
-
contentContainerStyle: {
|
|
1328
|
-
flexGrow: 1,
|
|
1329
|
-
paddingBottom: footerHeight
|
|
1330
|
-
},
|
|
1331
|
-
showsVerticalScrollIndicator: true,
|
|
1332
|
-
nestedScrollEnabled: true,
|
|
1333
|
-
children: children
|
|
1334
|
-
}), footer ? /*#__PURE__*/_jsx(View, {
|
|
1335
|
-
style: footerStyles.footerContainer,
|
|
1336
|
-
children: footer
|
|
1337
|
-
}) : null]
|
|
1338
|
-
}), /*#__PURE__*/_jsx(View, {
|
|
1339
|
-
...resizeHandlers.bottomLeft.panHandlers,
|
|
1340
|
-
style: [styles.cornerHandleWrapper, {
|
|
1341
|
-
bottom: 4,
|
|
1342
|
-
left: 4
|
|
1343
|
-
}],
|
|
1344
|
-
hitSlop: {
|
|
1345
|
-
top: 2,
|
|
1346
|
-
left: 2,
|
|
1347
|
-
right: 2,
|
|
1348
|
-
bottom: 2
|
|
1349
|
-
},
|
|
1350
|
-
children: /*#__PURE__*/_jsx(CornerHandle, {
|
|
1351
|
-
position: "bottomLeft",
|
|
1352
|
-
isActive: isDragging || isResizing
|
|
1353
|
-
})
|
|
1354
|
-
}), /*#__PURE__*/_jsx(View, {
|
|
1355
|
-
...resizeHandlers.bottomRight.panHandlers,
|
|
1356
|
-
style: [styles.cornerHandleWrapper, {
|
|
1357
|
-
bottom: 4,
|
|
1358
|
-
right: 4
|
|
1359
|
-
}],
|
|
1360
|
-
hitSlop: {
|
|
1361
|
-
top: 2,
|
|
1362
|
-
left: 2,
|
|
1363
|
-
right: 2,
|
|
1364
|
-
bottom: 2
|
|
1365
|
-
},
|
|
1366
|
-
children: /*#__PURE__*/_jsx(CornerHandle, {
|
|
1367
|
-
position: "bottomRight",
|
|
1368
|
-
isActive: isDragging || isResizing
|
|
1369
|
-
})
|
|
1370
|
-
})]
|
|
1371
|
-
});
|
|
1372
|
-
}
|
|
1373
|
-
|
|
1374
|
-
// Render bottom sheet mode with proper height animation
|
|
1375
|
-
return /*#__PURE__*/_jsx(View, {
|
|
1376
|
-
style: [
|
|
1377
|
-
// Same box either way — parking it off-screen instead of resizing it
|
|
1378
|
-
// keeps the sheet's layout intact, so coming back is a translate and
|
|
1379
|
-
// not a full relayout.
|
|
1380
|
-
visible ? styles.fullScreenContainer : styles.parkedFullScreen, visible && zIndex !== undefined && {
|
|
1381
|
-
zIndex
|
|
1382
|
-
}],
|
|
1383
|
-
pointerEvents: visible ? "box-none" : "none",
|
|
1384
|
-
accessibilityElementsHidden: !visible,
|
|
1385
|
-
importantForAccessibility: visible ? "auto" : "no-hide-descendants",
|
|
1386
|
-
children: /*#__PURE__*/_jsx(Animated.View, {
|
|
1387
|
-
nativeID: "jsmodal-root",
|
|
1388
|
-
style: [styles.bottomSheetWrapper, {
|
|
1389
|
-
opacity: modalOpacity,
|
|
1390
|
-
transform: [{
|
|
1391
|
-
translateY: bottomSheetTranslateY
|
|
1392
|
-
}]
|
|
1393
|
-
}],
|
|
1394
|
-
children: /*#__PURE__*/_jsxs(Animated.View, {
|
|
1395
|
-
style: [styles.bottomSheet, variant === "night" && styles.nightBottomSheet, customStyles.container, {
|
|
1396
|
-
height: externalAnimatedHeight || animatedBottomPosition
|
|
1397
|
-
}],
|
|
1398
|
-
children: [background && variant === "night" ? /*#__PURE__*/_jsx(View, {
|
|
1399
|
-
style: styles.nightBackdropSheet,
|
|
1400
|
-
pointerEvents: "none",
|
|
1401
|
-
children: /*#__PURE__*/_jsx(ToolBackground, {})
|
|
1402
|
-
}) : null, /*#__PURE__*/_jsx(ModalHeader, {
|
|
1403
|
-
header: header,
|
|
1404
|
-
onClose: onClose,
|
|
1405
|
-
onToggleMode: toggleMode,
|
|
1406
|
-
onMinimize: onMinimize ? handleMinimize : undefined,
|
|
1407
|
-
isResizing: isResizing,
|
|
1408
|
-
mode: mode,
|
|
1409
|
-
panHandlers: bottomSheetPanResponder.panHandlers,
|
|
1410
|
-
variant: variant
|
|
1411
|
-
}), /*#__PURE__*/_jsx(View, {
|
|
1412
|
-
style: styles.windowControlsContainer,
|
|
1413
|
-
children: /*#__PURE__*/_jsx(WindowControls, {
|
|
1414
|
-
onClose: onClose,
|
|
1415
|
-
onMinimize: onMinimize ? handleMinimize : undefined,
|
|
1416
|
-
onToggleMode: toggleMode,
|
|
1417
|
-
mode: mode,
|
|
1418
|
-
variant: variant
|
|
1419
|
-
})
|
|
1420
|
-
}), hintLoaded && showHint && mode === "bottomSheet" && !hintsDisabled && /*#__PURE__*/_jsx(ModalHintBanner, {
|
|
1421
|
-
onAcknowledge: handleHintAcknowledge
|
|
1422
|
-
}), /*#__PURE__*/_jsxs(View, {
|
|
1423
|
-
style: [styles.content, variant === "night" && styles.nightContent, customStyles.content],
|
|
1424
|
-
children: [background && variant !== "night" ? /*#__PURE__*/_jsx(ToolBackground, {}) : null, disableScrollWrapper ?
|
|
1425
|
-
/*#__PURE__*/
|
|
1426
|
-
// Render children directly when they manage their own scrolling (FlatList, etc.)
|
|
1427
|
-
_jsx(View, {
|
|
1428
|
-
style: {
|
|
1429
|
-
flex: 1,
|
|
1430
|
-
paddingBottom: footerHeight
|
|
1431
|
-
},
|
|
1432
|
-
children: children
|
|
1433
|
-
}) :
|
|
1434
|
-
/*#__PURE__*/
|
|
1435
|
-
// Wrap in ScrollView for content that needs scrolling
|
|
1436
|
-
_jsx(ScrollView, {
|
|
1437
|
-
style: {
|
|
1438
|
-
flex: 1
|
|
1439
|
-
},
|
|
1440
|
-
contentContainerStyle: {
|
|
1441
|
-
flexGrow: 1,
|
|
1442
|
-
paddingBottom: footerHeight
|
|
1443
|
-
},
|
|
1444
|
-
showsVerticalScrollIndicator: true,
|
|
1445
|
-
nestedScrollEnabled: true,
|
|
1446
|
-
children: children
|
|
1447
|
-
}), footer ? /*#__PURE__*/_jsx(View, {
|
|
1448
|
-
style: footerStyles.footerContainer,
|
|
1449
|
-
children: footer
|
|
1450
|
-
}) : null]
|
|
1451
|
-
})]
|
|
1452
|
-
})
|
|
1453
|
-
})
|
|
1454
|
-
});
|
|
1455
|
-
};
|
|
1456
|
-
|
|
1457
|
-
// ============================================================================
|
|
1458
|
-
// STYLES - Visual styling for all modal components
|
|
1459
|
-
// ============================================================================
|
|
1460
|
-
const styles = StyleSheet.create({
|
|
1461
|
-
fullScreenContainer: {
|
|
1462
|
-
...absoluteFill,
|
|
1463
|
-
zIndex: 1000
|
|
1464
|
-
},
|
|
1465
|
-
bottomSheetWrapper: {
|
|
1466
|
-
position: "absolute",
|
|
1467
|
-
bottom: 0,
|
|
1468
|
-
left: 0,
|
|
1469
|
-
right: 0
|
|
1470
|
-
},
|
|
1471
|
-
bottomSheet: {
|
|
1472
|
-
backgroundColor: buoyColors.card,
|
|
1473
|
-
// Buoy card
|
|
1474
|
-
borderTopLeftRadius: 6,
|
|
1475
|
-
borderTopRightRadius: 6,
|
|
1476
|
-
borderWidth: 1,
|
|
1477
|
-
borderColor: buoyColors.border,
|
|
1478
|
-
shadowColor: buoyColors.primary,
|
|
1479
|
-
shadowOffset: {
|
|
1480
|
-
width: 0,
|
|
1481
|
-
height: -4
|
|
1482
|
-
},
|
|
1483
|
-
shadowOpacity: 0.2,
|
|
1484
|
-
shadowRadius: 12,
|
|
1485
|
-
elevation: 20
|
|
1486
|
-
},
|
|
1487
|
-
/** Off-screen park for a minimized floating modal — same box, moved away. */
|
|
1488
|
-
parkedOffscreen: {
|
|
1489
|
-
left: -9999,
|
|
1490
|
-
top: -9999,
|
|
1491
|
-
opacity: 0
|
|
1492
|
-
},
|
|
1493
|
-
/**
|
|
1494
|
-
* Off-screen park for a minimized bottom sheet. Screen-sized on purpose:
|
|
1495
|
-
* `fullScreenContainer` is an absolute fill, and shrinking it here would
|
|
1496
|
-
* relayout the whole sheet on every minimize/restore.
|
|
1497
|
-
*/
|
|
1498
|
-
parkedFullScreen: {
|
|
1499
|
-
position: "absolute",
|
|
1500
|
-
left: -9999,
|
|
1501
|
-
top: -9999,
|
|
1502
|
-
width: SCREEN.width,
|
|
1503
|
-
height: SCREEN.height,
|
|
1504
|
-
opacity: 0
|
|
1505
|
-
},
|
|
1506
|
-
floatingModal: {
|
|
1507
|
-
position: "absolute",
|
|
1508
|
-
backgroundColor: buoyColors.card,
|
|
1509
|
-
borderRadius: 6,
|
|
1510
|
-
borderWidth: 1,
|
|
1511
|
-
borderColor: buoyColors.border,
|
|
1512
|
-
shadowColor: buoyColors.primary,
|
|
1513
|
-
shadowOffset: {
|
|
1514
|
-
width: 0,
|
|
1515
|
-
height: 0
|
|
1516
|
-
},
|
|
1517
|
-
shadowOpacity: 0.3,
|
|
1518
|
-
shadowRadius: 20,
|
|
1519
|
-
elevation: 24,
|
|
1520
|
-
zIndex: 1000,
|
|
1521
|
-
// Default dimensions, will be overridden by animated values
|
|
1522
|
-
width: FLOATING_WIDTH,
|
|
1523
|
-
height: FLOATING_HEIGHT
|
|
1524
|
-
},
|
|
1525
|
-
floatingModalDragging: {
|
|
1526
|
-
borderColor: buoyColors.primary,
|
|
1527
|
-
borderWidth: 2,
|
|
1528
|
-
shadowColor: buoyColors.primary + "99",
|
|
1529
|
-
shadowOpacity: 0.8,
|
|
1530
|
-
shadowRadius: 12
|
|
1531
|
-
},
|
|
1532
|
-
header: {
|
|
1533
|
-
borderTopLeftRadius: 6,
|
|
1534
|
-
borderTopRightRadius: 6,
|
|
1535
|
-
backgroundColor: buoyColors.card,
|
|
1536
|
-
// Buoy card color
|
|
1537
|
-
minHeight: 56,
|
|
1538
|
-
borderWidth: 1,
|
|
1539
|
-
borderColor: buoyColors.border,
|
|
1540
|
-
// Buoy border
|
|
1541
|
-
borderBottomWidth: 1,
|
|
1542
|
-
borderBottomColor: buoyColors.border
|
|
1543
|
-
},
|
|
1544
|
-
// ── Night variant (Everlights sheet — see ui/night/nightTheme.ts) ────────
|
|
1545
|
-
// NO `overflow: "hidden"` on the sheets: Fabric clips children to the
|
|
1546
|
-
// square rect, so the star-field layer's corner painted OVER the rounded
|
|
1547
|
-
// corner (it read as chopped off) — and iOS suppresses a layer's own shadow
|
|
1548
|
-
// when it clips. The backdrop clips itself instead (nightBackdrop* below).
|
|
1549
|
-
nightBottomSheet: {
|
|
1550
|
-
backgroundColor: night.color.bg,
|
|
1551
|
-
borderTopLeftRadius: night.radius.sheet,
|
|
1552
|
-
borderTopRightRadius: night.radius.sheet,
|
|
1553
|
-
borderWidth: StyleSheet.hairlineWidth,
|
|
1554
|
-
borderColor: night.color.accent + "55",
|
|
1555
|
-
shadowColor: night.color.accent,
|
|
1556
|
-
shadowOffset: {
|
|
1557
|
-
width: 0,
|
|
1558
|
-
height: -4
|
|
1559
|
-
},
|
|
1560
|
-
shadowOpacity: 0.22,
|
|
1561
|
-
shadowRadius: 10
|
|
1562
|
-
},
|
|
1563
|
-
nightFloatingModal: {
|
|
1564
|
-
backgroundColor: night.color.bg,
|
|
1565
|
-
borderRadius: night.radius.sheet,
|
|
1566
|
-
borderWidth: StyleSheet.hairlineWidth,
|
|
1567
|
-
borderColor: night.color.accent + "55",
|
|
1568
|
-
shadowColor: night.color.accent,
|
|
1569
|
-
shadowOffset: {
|
|
1570
|
-
width: 0,
|
|
1571
|
-
height: 0
|
|
1572
|
-
},
|
|
1573
|
-
shadowOpacity: 0.22,
|
|
1574
|
-
shadowRadius: 14
|
|
1575
|
-
},
|
|
1576
|
-
/** The header is glass — the sheet-level star field runs through it. */
|
|
1577
|
-
nightHeader: {
|
|
1578
|
-
backgroundColor: "transparent",
|
|
1579
|
-
borderWidth: 0,
|
|
1580
|
-
borderBottomWidth: 0,
|
|
1581
|
-
borderTopLeftRadius: night.radius.sheet,
|
|
1582
|
-
borderTopRightRadius: night.radius.sheet
|
|
1583
|
-
},
|
|
1584
|
-
nightContent: {
|
|
1585
|
-
backgroundColor: "transparent"
|
|
1586
|
-
},
|
|
1587
|
-
/**
|
|
1588
|
-
* The hoisted star field clips ITSELF to the sheet's corners (matching
|
|
1589
|
-
* radii + overflow hidden) — see the note on the sheet styles above. It
|
|
1590
|
-
* also keeps scenes that animate outside their own bounds (Hyperspace's
|
|
1591
|
-
* scaled shells) from bleeding past the window.
|
|
1592
|
-
*/
|
|
1593
|
-
nightBackdropSheet: {
|
|
1594
|
-
...absoluteFill,
|
|
1595
|
-
borderTopLeftRadius: night.radius.sheet,
|
|
1596
|
-
borderTopRightRadius: night.radius.sheet,
|
|
1597
|
-
overflow: "hidden"
|
|
1598
|
-
},
|
|
1599
|
-
nightBackdropFloating: {
|
|
1600
|
-
...absoluteFill,
|
|
1601
|
-
borderRadius: night.radius.sheet,
|
|
1602
|
-
overflow: "hidden"
|
|
1603
|
-
},
|
|
1604
|
-
/** Neutral Everlights handle instead of the glowing teal bar. */
|
|
1605
|
-
nightDragIndicator: {
|
|
1606
|
-
width: 36,
|
|
1607
|
-
height: 5,
|
|
1608
|
-
borderRadius: 2.5,
|
|
1609
|
-
backgroundColor: night.color.placeholder,
|
|
1610
|
-
shadowOpacity: 0,
|
|
1611
|
-
elevation: 0
|
|
1612
|
-
},
|
|
1613
|
-
floatingHeader: {
|
|
1614
|
-
borderTopLeftRadius: 6,
|
|
1615
|
-
borderTopRightRadius: 6
|
|
1616
|
-
},
|
|
1617
|
-
windowControlsContainer: {
|
|
1618
|
-
position: "absolute",
|
|
1619
|
-
top: 4,
|
|
1620
|
-
right: 4,
|
|
1621
|
-
zIndex: 10
|
|
1622
|
-
},
|
|
1623
|
-
floatingModeHeader: {
|
|
1624
|
-
borderTopLeftRadius: 6,
|
|
1625
|
-
borderTopRightRadius: 6
|
|
1626
|
-
},
|
|
1627
|
-
headerInner: {
|
|
1628
|
-
flex: 1,
|
|
1629
|
-
justifyContent: "center"
|
|
1630
|
-
},
|
|
1631
|
-
dragIndicatorContainer: {
|
|
1632
|
-
alignItems: "center",
|
|
1633
|
-
paddingVertical: 8,
|
|
1634
|
-
backgroundColor: "transparent"
|
|
1635
|
-
},
|
|
1636
|
-
/**
|
|
1637
|
-
* With custom header content the pill shares the top band with the window
|
|
1638
|
-
* controls, so the strip claims that band (and centres the pill in it)
|
|
1639
|
-
* rather than the header row below paying for the clearance sideways.
|
|
1640
|
-
*/
|
|
1641
|
-
dragIndicatorContainerCustom: {
|
|
1642
|
-
minHeight: WINDOW_CONTROLS_BAND,
|
|
1643
|
-
justifyContent: "center",
|
|
1644
|
-
paddingVertical: 0,
|
|
1645
|
-
backgroundColor: "transparent"
|
|
1646
|
-
},
|
|
1647
|
-
dragIndicator: {
|
|
1648
|
-
width: 40,
|
|
1649
|
-
height: 3,
|
|
1650
|
-
backgroundColor: buoyColors.primary,
|
|
1651
|
-
// Buoy primary teal
|
|
1652
|
-
borderRadius: 2,
|
|
1653
|
-
shadowColor: buoyColors.primary,
|
|
1654
|
-
shadowOffset: {
|
|
1655
|
-
width: 0,
|
|
1656
|
-
height: 0
|
|
1657
|
-
},
|
|
1658
|
-
shadowOpacity: 0.6,
|
|
1659
|
-
shadowRadius: 4
|
|
1660
|
-
},
|
|
1661
|
-
floatingDragIndicator: {
|
|
1662
|
-
width: 50,
|
|
1663
|
-
height: 5,
|
|
1664
|
-
backgroundColor: buoyColors.textMuted
|
|
1665
|
-
},
|
|
1666
|
-
dragIndicatorActive: {
|
|
1667
|
-
backgroundColor: buoyColors.primary,
|
|
1668
|
-
width: 40
|
|
1669
|
-
},
|
|
1670
|
-
resizeGripContainer: {
|
|
1671
|
-
position: "absolute",
|
|
1672
|
-
flexDirection: "row",
|
|
1673
|
-
gap: 2,
|
|
1674
|
-
marginTop: 12
|
|
1675
|
-
},
|
|
1676
|
-
resizeGripLine: {
|
|
1677
|
-
width: 12,
|
|
1678
|
-
height: 1,
|
|
1679
|
-
backgroundColor: gameUIColors.success,
|
|
1680
|
-
opacity: 0.6
|
|
1681
|
-
},
|
|
1682
|
-
headerContent: {
|
|
1683
|
-
paddingHorizontal: 16,
|
|
1684
|
-
alignItems: "center"
|
|
1685
|
-
},
|
|
1686
|
-
headerControls: {
|
|
1687
|
-
position: "absolute",
|
|
1688
|
-
top: 8,
|
|
1689
|
-
right: 16,
|
|
1690
|
-
flexDirection: "row",
|
|
1691
|
-
alignItems: "center"
|
|
1692
|
-
},
|
|
1693
|
-
headerTitle: {
|
|
1694
|
-
fontSize: 16,
|
|
1695
|
-
fontWeight: "600",
|
|
1696
|
-
color: gameUIColors.primary
|
|
1697
|
-
},
|
|
1698
|
-
headerSubtitle: {
|
|
1699
|
-
fontSize: 12,
|
|
1700
|
-
color: gameUIColors.secondary,
|
|
1701
|
-
paddingTop: 4
|
|
1702
|
-
},
|
|
1703
|
-
headerHintText: {
|
|
1704
|
-
position: "absolute",
|
|
1705
|
-
top: 0,
|
|
1706
|
-
left: 0,
|
|
1707
|
-
right: 0,
|
|
1708
|
-
bottom: 0,
|
|
1709
|
-
justifyContent: "center",
|
|
1710
|
-
alignItems: "center"
|
|
1711
|
-
},
|
|
1712
|
-
hintText: {
|
|
1713
|
-
fontSize: 10,
|
|
1714
|
-
color: gameUIColors.muted,
|
|
1715
|
-
fontStyle: "italic"
|
|
1716
|
-
},
|
|
1717
|
-
controlButton: {
|
|
1718
|
-
width: 28,
|
|
1719
|
-
height: 28,
|
|
1720
|
-
borderRadius: 6,
|
|
1721
|
-
justifyContent: "center",
|
|
1722
|
-
alignItems: "center",
|
|
1723
|
-
marginLeft: 8
|
|
1724
|
-
},
|
|
1725
|
-
toggleButton: {
|
|
1726
|
-
backgroundColor: gameUIColors.info + "1A",
|
|
1727
|
-
borderWidth: 1,
|
|
1728
|
-
borderColor: gameUIColors.info + "33"
|
|
1729
|
-
},
|
|
1730
|
-
closeButton: {
|
|
1731
|
-
width: 28,
|
|
1732
|
-
height: 28,
|
|
1733
|
-
borderRadius: 6,
|
|
1734
|
-
justifyContent: "center",
|
|
1735
|
-
alignItems: "center",
|
|
1736
|
-
backgroundColor: gameUIColors.error + "1A",
|
|
1737
|
-
borderWidth: 1,
|
|
1738
|
-
borderColor: gameUIColors.error + "33",
|
|
1739
|
-
marginLeft: 8
|
|
1740
|
-
},
|
|
1741
|
-
iconLine: {
|
|
1742
|
-
position: "absolute",
|
|
1743
|
-
top: 7.25,
|
|
1744
|
-
left: 2,
|
|
1745
|
-
width: 12,
|
|
1746
|
-
height: 1.5,
|
|
1747
|
-
backgroundColor: gameUIColors.error
|
|
1748
|
-
},
|
|
1749
|
-
content: {
|
|
1750
|
-
flex: 1,
|
|
1751
|
-
backgroundColor: buoyColors.base,
|
|
1752
|
-
borderBottomLeftRadius: 16,
|
|
1753
|
-
borderBottomRightRadius: 16,
|
|
1754
|
-
overflow: "hidden"
|
|
1755
|
-
},
|
|
1756
|
-
cornerHandle: {
|
|
1757
|
-
position: "absolute",
|
|
1758
|
-
zIndex: 1
|
|
1759
|
-
},
|
|
1760
|
-
cornerHandleWrapper: {
|
|
1761
|
-
position: "absolute",
|
|
1762
|
-
width: 30,
|
|
1763
|
-
height: 30,
|
|
1764
|
-
zIndex: 1000
|
|
1765
|
-
},
|
|
1766
|
-
handler: {
|
|
1767
|
-
width: 20,
|
|
1768
|
-
height: 20,
|
|
1769
|
-
backgroundColor: "transparent",
|
|
1770
|
-
borderRadius: 10,
|
|
1771
|
-
borderWidth: 0,
|
|
1772
|
-
borderColor: "transparent"
|
|
1773
|
-
},
|
|
1774
|
-
handlerActive: {
|
|
1775
|
-
backgroundColor: gameUIColors.success + "1A",
|
|
1776
|
-
borderColor: gameUIColors.success,
|
|
1777
|
-
borderWidth: 2,
|
|
1778
|
-
shadowColor: gameUIColors.success + "99",
|
|
1779
|
-
shadowOffset: {
|
|
1780
|
-
width: 0,
|
|
1781
|
-
height: 0
|
|
1782
|
-
},
|
|
1783
|
-
shadowOpacity: 1,
|
|
1784
|
-
shadowRadius: 8
|
|
1785
|
-
}
|
|
1786
|
-
});
|
|
1787
|
-
|
|
1788
|
-
// Footer container styles (absolute within modal content area)
|
|
1789
|
-
const footerStyles = StyleSheet.create({
|
|
1790
|
-
footerContainer: {
|
|
1791
|
-
position: "absolute",
|
|
1792
|
-
left: 0,
|
|
1793
|
-
right: 0,
|
|
1794
|
-
bottom: 0,
|
|
1795
|
-
backgroundColor: buoyColors.base,
|
|
1796
|
-
borderBottomLeftRadius: 16,
|
|
1797
|
-
borderBottomRightRadius: 16
|
|
1798
|
-
}
|
|
1799
|
-
});
|
|
1800
|
-
|
|
1801
|
-
// ============================================================================
|
|
1802
|
-
// EXPORT - Memoized modal component for optimal performance
|
|
1803
|
-
// ============================================================================
|
|
1804
|
-
export const JsModal = /*#__PURE__*/memo(props => {
|
|
1805
|
-
const access = getUseAccountAccess()();
|
|
1806
|
-
if (access.status !== "admitted") return props.visible ? /*#__PURE__*/_jsx(AccountSetup, {}) : null;
|
|
1807
|
-
return /*#__PURE__*/_jsx(JsModalComponent, {
|
|
1808
|
-
...props
|
|
1809
|
-
});
|
|
1810
|
-
});
|
|
1
|
+
"use strict";import{getUseAccountAccess as ke}from"./license/licenseModule.js";import{AccountSetup as Le}from"./license/AccountSetup";import{useState as j,useRef as d,useEffect as V,useMemo as ne,useCallback as Q,memo as kt,isValidElement as re,cloneElement as ie}from"react";import{View as s,StyleSheet as Lt,TouchableWithoutFeedback as ae,Dimensions as Be,PanResponder as se,Animated as i,ScrollView as le,Text as Ft}from"react-native";import{absoluteFill as Pt}from"./utils/absoluteFill.js";import{useSafeAreaInsets as Ae}from"./hooks/useSafeAreaInsets";import{gameUIColors as L,buoyColors as m}from"./ui/gameUI/index.js";import{DraggableHeader as We,ModalHintBanner as Me,WindowControls as de}from"./ui/components/index.js";import{ToolBackground as Bt}from"./ui/backgrounds/ToolBackground.js";import{night as C}from"./ui/night/nightTheme.js";import{persistentStorage as ce}from"./utils/persistentStorage";import{ModalStorage as Gt}from"./utils/modalStorage.js";import{devToolsStorageKeys as ue}from"./storage/devToolsStorageKeys.js";import{useHintsDisabled as Ne}from"./context/index.js";import{jsx as o,jsxs as Y}from"react/jsx-runtime";const he=true;const h=Be.get("window");const Oe=100;const Ee=400;const ut=h.width;const ht=500;const Rt=h.width*.25;const Tt=80;const Fe=20;const fe=kt(function c({isResizing:a,mode:B,hasCustomContent:X=false,variant:D="default"}){return Y(s,{style:[e.dragIndicatorContainer,X&&e.dragIndicatorContainerCustom],children:[o(s,{style:[e.dragIndicator,B==="floating"&&e.floatingDragIndicator,a&&e.dragIndicatorActive,D==="night"&&e.nightDragIndicator]}),a&&B==="bottomSheet"&&Y(s,{style:e.resizeGripContainer,children:[o(s,{style:e.resizeGripLine}),o(s,{style:e.resizeGripLine}),o(s,{style:e.resizeGripLine})]})]})});const ge=kt(function c({position:a,isActive:B}){return o(s,{style:[e.cornerHandle],children:o(s,{style:[e.handler,B&&e.handlerActive]})})});const pe=kt(function c({header:a,onClose:B,onToggleMode:X,onMinimize:D,isResizing:Z,mode:at,panHandlers:I,variant:f="default"}){const S=d(0);const $=d(0);const A=d(null);const x=Q(()=>{const P=Date.now();const st=P-S.current;if(st>500){$.current=0}$.current++;S.current=P;if(A.current){clearTimeout(A.current)}A.current=setTimeout(()=>{if($.current===2){X()}else if($.current>=3){if(D){D()}}$.current=0},300)},[X,D]);V(()=>{return()=>{if(A.current){clearTimeout(A.current)}}},[]);const W=I?I:{};const ft=!!I;if(a?.customContent){const P=re(a.customContent)&&typeof a.customContent.type==="function"&&a.customContent.type.name==="CyberpunkModalHeader";if(P){return ie(a.customContent,{onToggleMode:X,onClose:B,mode:at,panHandlers:W,showToggleButton:a?.showToggleButton!==false,hideCloseButton:a?.hideCloseButton})}let st=a.customContent;if(re(a.customContent)&&D){st=ie(a.customContent,{onMinimize:D})}const T=Y(s,{style:e.headerInner,children:[o(fe,{isResizing:Z,mode:at,hasCustomContent:true,variant:f}),st]});return o(s,{style:[e.header,f==="night"&&e.nightHeader],...W,children:ft?o(ae,{onPress:x,children:T}):T})}const K=Y(s,{style:e.headerInner,children:[o(fe,{isResizing:Z,mode:at,variant:f}),Y(s,{style:e.headerContent,children:[a?.title&&o(Ft,{style:e.headerTitle,children:a.title}),a?.subtitle&&o(Ft,{style:e.headerSubtitle,children:a.subtitle})]}),o(s,{style:e.headerHintText,children:o(Ft,{style:e.hintText,children:"Double tap: Toggle \u2022 Triple tap: Close"})})]});return o(s,{style:[e.header,at==="floating"&&e.floatingModeHeader,f==="night"&&e.nightHeader],...W,children:ft?o(ae,{onPress:x,children:K}):K})});const Pe=({visible:c,onClose:a,children:B,header:X,styles:D={},minHeight:Z=Oe,maxHeight:at,initialHeight:I=Ee,animatedHeight:f,benchMotion:S,initialMode:$="bottomSheet",onModeChange:A,persistenceKey:x,enablePersistence:W=true,initialFloatingPosition:ft,footer:K,footerHeight:P=0,onBack:st,onMinimize:T,minimizeRequest:Vt=0,minimizeTargetPosition:At,initialModalState:g,zIndex:Dt,disableScrollWrapper:_t=false,background:It=true,variant:H="night"})=>{const N=Ae();const[zt,jt]=j(!W);const[l,Wt]=j($);const[lt,O]=j(false);const[St,dt]=j(false);const[we,Mt]=j(I);const[G,gt]=j({width:ut,height:ht,top:(h.height-ht)/2,left:0});const[xt]=j({width:h.width,height:h.height});const[be,Ht]=j(false);const[ye,Yt]=j(false);const Ce=Ne();const w=d(new i.Value(0)).current;const R=d(new i.Value(h.height)).current;const Xt=d(new i.Value(0)).current;const E=d(new i.Value(I)).current;const F=d(I);V(()=>{if(!W||!x||!zt)return;const t=setTimeout(()=>{Gt.save(x,{mode:l,panelHeight:F.current,dimensions:G,isVisible:c})},500);return()=>clearTimeout(t)},[l,we,G,c,x,W,zt]);const Ut=d(false);V(()=>{if(f&&!Ut.current){Ut.current=true;F.current=I;f.setValue(I)}},[f,I]);V(()=>{y.current=G},[G]);const p=d(new i.ValueXY({x:ft?.x??0,y:ft?.y??(h.height-ht)/2})).current;const tt=d(new i.Value(0)).current;const et=d(new i.Value(ut)).current;const ot=d(new i.Value(ht)).current;const y=d(G);const Jt=d(G);const Re=d(0);const Te=d(0);const Ve=d(0);const De=d(0);V(()=>{let t=true;const r=async()=>{try{const n=ue.modal.hintAcknowledged();const _=await ce.getItem(n);if(t){Ht(_!=="true");Yt(true)}}catch(n){if(t){Ht(true);Yt(true)}}};r();return()=>{t=false}},[]);const Ie=Q(async()=>{try{const t=ue.modal.hintAcknowledged();await ce.setItem(t,"true");Ht(false)}catch(t){Ht(false)}},[]);const qt=d(A);qt.current=A;V(()=>{if(!W||!x){jt(true);return}let t=true;const r=async()=>{const n=await Gt.load(x);if(t&&n){if(n.mode){Wt(n.mode);qt.current?.(n.mode)}if(n.panelHeight){Mt(n.panelHeight);F.current=n.panelHeight;E.setValue(n.panelHeight);f?.setValue(n.panelHeight)}if(n.dimensions){gt(n.dimensions);p.setValue({x:n.dimensions.left,y:n.dimensions.top});et.setValue(n.dimensions.width);ot.setValue(n.dimensions.height)}}if(t)jt(true)};r();return()=>{t=false}},[x,W,E,ot,et,p]);V(()=>{return()=>{w.stopAnimation();R.stopAnimation();tt.stopAnimation();Xt.stopAnimation();E.stopAnimation();p.stopAnimation();et.stopAnimation();ot.stopAnimation();w.setValue(0);R.setValue(h.height);tt.setValue(0);Xt.setValue(0);E.setValue(I);F.current=I}},[]);const Qt=w.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"});const Nt=at||h.height-N.top;const nt=Q(()=>{dt(false);O(false);const t=l==="bottomSheet"?"floating":"bottomSheet";Wt(t);A?.(t)},[l,A]);V(()=>{dt(false);O(false)},[l]);const U=Q(()=>{if(!T)return;const t={mode:l,panelHeight:F.current,floatingPosition:{x:y.current.left,y:y.current.top},floatingDimensions:{width:y.current.width,height:y.current.height}};if(W&&x)void Gt.saveMinimized(x,t);const r=At?.x??h.width-50;const n=At?.y??h.height-150;if(l==="bottomSheet"){i.parallel([i.timing(w,{toValue:0,duration:300,useNativeDriver:true}),i.timing(R,{toValue:h.height,duration:300,useNativeDriver:true})]).start(()=>{T(t)})}else{i.parallel([i.timing(tt,{toValue:0,duration:300,useNativeDriver:true}),i.timing(w,{toValue:0,duration:300,useNativeDriver:true}),i.timing(p,{toValue:{x:r,y:n},duration:300,useNativeDriver:true})]).start(()=>{T(t)})}},[l,T,At,W,x,w,R,tt,p]);const Zt=d(Vt);V(()=>{if(Zt.current===Vt)return;Zt.current=Vt;U()},[Vt,U]);V(()=>{if(!g)return;if(g.mode){Wt(g.mode);A?.(g.mode)}if(g.panelHeight){Mt(g.panelHeight);F.current=g.panelHeight;E.setValue(g.panelHeight)}if(g.floatingDimensions&&g.floatingPosition){const t={width:g.floatingDimensions.width,height:g.floatingDimensions.height,top:g.floatingPosition.y,left:g.floatingPosition.x};gt(t);p.setValue({x:g.floatingPosition.x,y:g.floatingPosition.y});et.setValue(g.floatingDimensions.width);ot.setValue(g.floatingDimensions.height)}},[g]);const $t=t=>{if(t){if(l==="bottomSheet"){R.setValue(0)}else{tt.setValue(1);p.setValue({x:y.current.left,y:y.current.top})}w.setValue(1)}else{if(l==="bottomSheet"){R.setValue(h.height)}w.setValue(0)}};const Kt=d(null);if(he&&Kt.current!==c){Kt.current=c;$t(c)}V(()=>{let t=null;let r=null;if(he){$t(c);return}if(c){R.setValue(h.height);w.setValue(0);if(l==="bottomSheet"){t=i.parallel([i.spring(R,{toValue:0,tension:180,friction:22,useNativeDriver:true}),i.timing(w,{toValue:1,duration:200,useNativeDriver:true})]);t.start()}else{tt.setValue(1);p.setValue({x:y.current.left,y:y.current.top});t=i.timing(w,{toValue:1,duration:200,useNativeDriver:true});t.start()}}else{if(l==="bottomSheet"){r=i.parallel([i.spring(R,{toValue:h.height,tension:180,friction:22,useNativeDriver:true}),i.timing(w,{toValue:0,duration:200,useNativeDriver:true})]);r.start()}else{r=i.timing(w,{toValue:0,duration:200,useNativeDriver:true});r.start()}}return()=>{if(t){t.stop()}if(r){r.stop()}}},[c,l,w,R,tt,p,f]);const te=d(0);V(()=>{if(!__DEV__||!S||!c)return void 0;let t=null;let r=null;let n=true;const _=Date.now();let v=false;const J=z=>{v=z;if(S==="resize"||S==="float-resize"){O(z)}else if(S==="float-drag"){dt(z)}};if(S==="mode-cycle"){r=setInterval(()=>nt(),2200)}else{const z=Z;const vt=Nt;const bt=()=>{if(!n)return;const ct=(Date.now()-_)/1e3;const u=ct%2.5;if(u<2&&!v)J(true);else if(u>=2&&v)J(false);if(v){const k=(Math.sin(ct*2.2)+1)/2;if(S==="resize"){const b=z+k*(vt-z);E.setValue(b);F.current=b;if(f){f.setValue(b)}}else if(S==="float-drag"){const b=(Math.sin(ct*1.7)+1)/2;p.setValue({x:10+k*Math.max(h.width-ut-20,0),y:70+b*260})}else if(S==="float-resize"){const b=ut+k*Math.max(h.width-ut-40,0);const M=ht+k*240;et.setValue(b);ot.setValue(M);y.current={...y.current,width:b,height:M}}}t=requestAnimationFrame(bt)};t=requestAnimationFrame(bt)}return()=>{n=false;if(t!=null)cancelAnimationFrame(t);if(r!=null)clearInterval(r);O(false);dt(false)}},[S,c]);const Se=ne(()=>se.create({onStartShouldSetPanResponder:()=>l==="bottomSheet",onMoveShouldSetPanResponder:(t,r)=>l==="bottomSheet"&&Math.abs(r.dy)>3,onPanResponderTerminationRequest:()=>false,onPanResponderGrant:t=>{O(true);te.current=t.nativeEvent.locationY||0;E.stopAnimation(r=>{F.current=r});f?.stopAnimation();R.stopAnimation()},onPanResponderMove:t=>{const r=t.nativeEvent.pageY-te.current;let n=h.height-r;n=Math.max(Z,Math.min(n,Nt));E.setValue(n);F.current=n;if(f){f.setValue(n)}},onPanResponderRelease:(t,r)=>{O(false);const n=F.current;const _=r.vy>.8&&r.dy>50||r.dy>150&&n<=Z;if(_){i.parallel([i.timing(w,{toValue:0,duration:200,useNativeDriver:true}),i.spring(R,{toValue:h.height,tension:180,friction:22,useNativeDriver:true})]).start(()=>a());return}Mt(n);if(f)f.setValue(n)},onPanResponderTerminate:()=>{O(false)}}),[l,Z,Nt,E,f,R,w,a]);const pt=Q(t=>{let r=false;return se.create({onStartShouldSetPanResponder:()=>l==="floating",onMoveShouldSetPanResponder:()=>l==="floating",onPanResponderGrant:()=>{r=false;const n=y.current;p.stopAnimation(({x:_,y:v})=>{p.setValue({x:_,y:v})});O(true);Jt.current={...n};Ve.current=n.height;De.current=n.width;Re.current=n.left;Te.current=n.top},onPanResponderMove:(n,_)=>{const{dx:v,dy:J}=_;if(Math.abs(v)<.5&&Math.abs(J)<.5)return;r=true;const z=Math.max(0,N.left||0);const vt=xt.width-Math.max(0,N.right||0);const bt=Math.max(0,N.top||0);const ct=xt.height-Math.max(0,N.bottom||0);const u=Jt.current;const k=u.left+u.width;const b=u.top+u.height;let M=u.left;let q=u.top;let yt=k;let Ct=b;switch(t){case"topLeft":{const rt=Math.max(z,Math.min(u.left+v,k-Rt));const it=Math.max(bt,Math.min(u.top+J,b-Tt));M=rt;q=it;yt=k;Ct=b;break}case"topRight":{const rt=Math.min(vt,Math.max(k+v,u.left+Rt));const it=Math.max(bt,Math.min(u.top+J,b-Tt));M=u.left;q=it;yt=rt;Ct=b;break}case"bottomLeft":{const rt=Math.max(z,Math.min(u.left+v,k-Rt));const it=Math.min(ct,Math.max(b+J,u.top+Tt));M=rt;q=u.top;yt=k;Ct=it;break}case"bottomRight":{const rt=Math.min(vt,Math.max(k+v,u.left+Rt));const it=Math.min(ct,Math.max(b+J,u.top+Tt));M=u.left;q=u.top;yt=rt;Ct=it;break}}const Ot=Math.max(Rt,yt-M);const Et=Math.max(Tt,Ct-q);gt({width:Ot,height:Et,left:M,top:q});et.setValue(Ot);ot.setValue(Et);p.setValue({x:M,y:q});y.current={width:Ot,height:Et,left:M,top:q}},onPanResponderRelease:()=>{O(false);r=false;gt(y.current)},onPanResponderTerminate:()=>{O(false);r=false}})},[l,xt,N.left,N.right,N.top,N.bottom,p,et,ot,a,st]);const ee=ne(()=>{return{topLeft:pt("topLeft"),topRight:pt("topRight"),bottomLeft:pt("bottomLeft"),bottomRight:pt("bottomRight")}},[pt]);const xe=Q(()=>{dt(true)},[]);const He=Q(t=>{dt(false);const r=y.current;const n={...r,left:t.x,top:t.y};gt(n)},[]);const oe=d(0);const mt=d(0);const wt=d(null);const ve=Q(()=>{const t=Date.now();const r=t-oe.current;if(r>500){mt.current=0}mt.current++;oe.current=t;if(wt.current){clearTimeout(wt.current)}wt.current=setTimeout(()=>{if(mt.current===2){nt()}else if(mt.current>=3){if(T){U()}}mt.current=0},300)},[nt,T,U]);V(()=>{return()=>{if(wt.current){clearTimeout(wt.current)}}},[]);if(l==="floating"){return Y(i.View,{nativeID:"jsmodal-root",pointerEvents:c?"auto":"none",accessibilityElementsHidden:!c,importantForAccessibility:c?"auto":"no-hide-descendants",style:[e.floatingModal,{width:G.width,height:G.height,opacity:Qt,transform:[{translateX:p.x},{translateY:p.y}],...Dt!==void 0&&{zIndex:Dt}},H==="night"&&e.nightFloatingModal,(St||lt)&&e.floatingModalDragging,D.container,!c&&e.parkedOffscreen],children:[It&&H==="night"?o(s,{style:e.nightBackdropFloating,pointerEvents:"none",children:o(Bt,{})}):null,o(We,{position:p,onDragStart:xe,onDragEnd:He,onTap:ve,containerBounds:xt,elementSize:G,minPosition:{x:0,y:N.top},style:e.floatingHeader,enabled:l==="floating"&&!lt,children:o(pe,{header:X,onClose:a,onToggleMode:nt,onMinimize:T?U:void 0,isResizing:St||lt,mode:l,variant:H})}),o(s,{style:e.windowControlsContainer,children:o(de,{onClose:a,onMinimize:T?U:void 0,onToggleMode:nt,mode:l,variant:H})}),Y(s,{style:[e.content,H==="night"&&e.nightContent,D.content],children:[It&&H!=="night"?o(Bt,{}):null,_t?o(s,{style:{flex:1,paddingBottom:P},children:B}):o(le,{style:{flex:1},contentContainerStyle:{flexGrow:1,paddingBottom:P},showsVerticalScrollIndicator:true,nestedScrollEnabled:true,keyboardShouldPersistTaps:"handled",children:B}),K?o(s,{style:me.footerContainer,children:K}):null]}),o(s,{...ee.bottomLeft.panHandlers,style:[e.cornerHandleWrapper,{bottom:4,left:4}],hitSlop:{top:2,left:2,right:2,bottom:2},children:o(ge,{position:"bottomLeft",isActive:St||lt})}),o(s,{...ee.bottomRight.panHandlers,style:[e.cornerHandleWrapper,{bottom:4,right:4}],hitSlop:{top:2,left:2,right:2,bottom:2},children:o(ge,{position:"bottomRight",isActive:St||lt})})]})}return o(s,{style:[c?e.fullScreenContainer:e.parkedFullScreen,c&&Dt!==void 0&&{zIndex:Dt}],pointerEvents:c?"box-none":"none",accessibilityElementsHidden:!c,importantForAccessibility:c?"auto":"no-hide-descendants",children:o(i.View,{nativeID:"jsmodal-root",style:[e.bottomSheetWrapper,{opacity:Qt,transform:[{translateY:R}]}],children:Y(i.View,{style:[e.bottomSheet,H==="night"&&e.nightBottomSheet,D.container,{height:f||E}],children:[It&&H==="night"?o(s,{style:e.nightBackdropSheet,pointerEvents:"none",children:o(Bt,{})}):null,o(pe,{header:X,onClose:a,onToggleMode:nt,onMinimize:T?U:void 0,isResizing:lt,mode:l,panHandlers:Se.panHandlers,variant:H}),o(s,{style:e.windowControlsContainer,children:o(de,{onClose:a,onMinimize:T?U:void 0,onToggleMode:nt,mode:l,variant:H})}),ye&&be&&l==="bottomSheet"&&!Ce&&o(Me,{onAcknowledge:Ie}),Y(s,{style:[e.content,H==="night"&&e.nightContent,D.content],children:[It&&H!=="night"?o(Bt,{}):null,_t?o(s,{style:{flex:1,paddingBottom:P},children:B}):o(le,{style:{flex:1},contentContainerStyle:{flexGrow:1,paddingBottom:P},showsVerticalScrollIndicator:true,nestedScrollEnabled:true,keyboardShouldPersistTaps:"handled",children:B}),K?o(s,{style:me.footerContainer,children:K}):null]})]})})})};const e=Lt.create({fullScreenContainer:{...Pt,zIndex:1e3},bottomSheetWrapper:{position:"absolute",bottom:0,left:0,right:0},bottomSheet:{backgroundColor:m.card,borderTopLeftRadius:6,borderTopRightRadius:6,borderWidth:1,borderColor:m.border,shadowColor:m.primary,shadowOffset:{width:0,height:-4},shadowOpacity:.2,shadowRadius:12,elevation:20},parkedOffscreen:{left:-9999,top:-9999,opacity:0},parkedFullScreen:{position:"absolute",left:-9999,top:-9999,width:h.width,height:h.height,opacity:0},floatingModal:{position:"absolute",backgroundColor:m.card,borderRadius:6,borderWidth:1,borderColor:m.border,shadowColor:m.primary,shadowOffset:{width:0,height:0},shadowOpacity:.3,shadowRadius:20,elevation:24,zIndex:1e3,width:ut,height:ht},floatingModalDragging:{borderColor:m.primary,borderWidth:2,shadowColor:m.primary+"99",shadowOpacity:.8,shadowRadius:12},header:{borderTopLeftRadius:6,borderTopRightRadius:6,backgroundColor:m.card,minHeight:56,borderWidth:1,borderColor:m.border,borderBottomWidth:1,borderBottomColor:m.border},nightBottomSheet:{backgroundColor:C.color.bg,borderTopLeftRadius:C.radius.sheet,borderTopRightRadius:C.radius.sheet,borderWidth:Lt.hairlineWidth,borderColor:C.color.accent+"55",shadowColor:C.color.accent,shadowOffset:{width:0,height:-4},shadowOpacity:.22,shadowRadius:10},nightFloatingModal:{backgroundColor:C.color.bg,borderRadius:C.radius.sheet,borderWidth:Lt.hairlineWidth,borderColor:C.color.accent+"55",shadowColor:C.color.accent,shadowOffset:{width:0,height:0},shadowOpacity:.22,shadowRadius:14},nightHeader:{backgroundColor:"transparent",borderWidth:0,borderBottomWidth:0,borderTopLeftRadius:C.radius.sheet,borderTopRightRadius:C.radius.sheet},nightContent:{backgroundColor:"transparent"},nightBackdropSheet:{...Pt,borderTopLeftRadius:C.radius.sheet,borderTopRightRadius:C.radius.sheet,overflow:"hidden"},nightBackdropFloating:{...Pt,borderRadius:C.radius.sheet,overflow:"hidden"},nightDragIndicator:{width:36,height:5,borderRadius:2.5,backgroundColor:C.color.placeholder,shadowOpacity:0,elevation:0},floatingHeader:{borderTopLeftRadius:6,borderTopRightRadius:6},windowControlsContainer:{position:"absolute",top:4,right:4,zIndex:10},floatingModeHeader:{borderTopLeftRadius:6,borderTopRightRadius:6},headerInner:{flex:1,justifyContent:"center"},dragIndicatorContainer:{alignItems:"center",paddingVertical:8,backgroundColor:"transparent"},dragIndicatorContainerCustom:{minHeight:Fe,justifyContent:"center",paddingVertical:0,backgroundColor:"transparent"},dragIndicator:{width:40,height:3,backgroundColor:m.primary,borderRadius:2,shadowColor:m.primary,shadowOffset:{width:0,height:0},shadowOpacity:.6,shadowRadius:4},floatingDragIndicator:{width:50,height:5,backgroundColor:m.textMuted},dragIndicatorActive:{backgroundColor:m.primary,width:40},resizeGripContainer:{position:"absolute",flexDirection:"row",gap:2,marginTop:12},resizeGripLine:{width:12,height:1,backgroundColor:L.success,opacity:.6},headerContent:{paddingHorizontal:16,alignItems:"center"},headerControls:{position:"absolute",top:8,right:16,flexDirection:"row",alignItems:"center"},headerTitle:{fontSize:16,fontWeight:"600",color:L.primary},headerSubtitle:{fontSize:12,color:L.secondary,paddingTop:4},headerHintText:{position:"absolute",top:0,left:0,right:0,bottom:0,justifyContent:"center",alignItems:"center"},hintText:{fontSize:10,color:L.muted,fontStyle:"italic"},controlButton:{width:28,height:28,borderRadius:6,justifyContent:"center",alignItems:"center",marginLeft:8},toggleButton:{backgroundColor:L.info+"1A",borderWidth:1,borderColor:L.info+"33"},closeButton:{width:28,height:28,borderRadius:6,justifyContent:"center",alignItems:"center",backgroundColor:L.error+"1A",borderWidth:1,borderColor:L.error+"33",marginLeft:8},iconLine:{position:"absolute",top:7.25,left:2,width:12,height:1.5,backgroundColor:L.error},content:{flex:1,backgroundColor:m.base,borderBottomLeftRadius:16,borderBottomRightRadius:16,overflow:"hidden"},cornerHandle:{position:"absolute",zIndex:1},cornerHandleWrapper:{position:"absolute",width:30,height:30,zIndex:1e3},handler:{width:20,height:20,backgroundColor:"transparent",borderRadius:10,borderWidth:0,borderColor:"transparent"},handlerActive:{backgroundColor:L.success+"1A",borderColor:L.success,borderWidth:2,shadowColor:L.success+"99",shadowOffset:{width:0,height:0},shadowOpacity:1,shadowRadius:8}});const me=Lt.create({footerContainer:{position:"absolute",left:0,right:0,bottom:0,backgroundColor:m.base,borderBottomLeftRadius:16,borderBottomRightRadius:16}});export const JsModal=kt(c=>{const a=ke()();if(a.status!=="admitted")return c.visible?o(Le,{}):null;return o(Pe,{...c})});
|