@burdenoff/fe-libs 2026.525.2 → 2026.526.1
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/package.json +1 -1
- package/dist/button/Button.d.ts +0 -12
- package/dist/button/Button.d.ts.map +0 -1
- package/dist/button/index.d.ts +0 -3
- package/dist/button/index.d.ts.map +0 -1
- package/dist/button.d.ts +0 -2
- package/dist/chrome/AccountSwitcher.d.ts +0 -51
- package/dist/chrome/AccountSwitcher.d.ts.map +0 -1
- package/dist/chrome/AppShellLayout.d.ts +0 -67
- package/dist/chrome/AppShellLayout.d.ts.map +0 -1
- package/dist/chrome/AutoBreadcrumbs.d.ts +0 -22
- package/dist/chrome/AutoBreadcrumbs.d.ts.map +0 -1
- package/dist/chrome/Breadcrumb.d.ts +0 -47
- package/dist/chrome/Breadcrumb.d.ts.map +0 -1
- package/dist/chrome/Breadcrumbs.d.ts +0 -69
- package/dist/chrome/Breadcrumbs.d.ts.map +0 -1
- package/dist/chrome/CommandPalette.d.ts +0 -64
- package/dist/chrome/CommandPalette.d.ts.map +0 -1
- package/dist/chrome/ContextSwitcher.d.ts +0 -48
- package/dist/chrome/ContextSwitcher.d.ts.map +0 -1
- package/dist/chrome/DynamicFooter.d.ts +0 -21
- package/dist/chrome/DynamicFooter.d.ts.map +0 -1
- package/dist/chrome/Footer.d.ts +0 -128
- package/dist/chrome/Footer.d.ts.map +0 -1
- package/dist/chrome/FooterBar.d.ts +0 -79
- package/dist/chrome/FooterBar.d.ts.map +0 -1
- package/dist/chrome/GeographySwitcher.d.ts +0 -22
- package/dist/chrome/GeographySwitcher.d.ts.map +0 -1
- package/dist/chrome/GlobalSearch.d.ts +0 -49
- package/dist/chrome/GlobalSearch.d.ts.map +0 -1
- package/dist/chrome/HeaderBar.d.ts +0 -108
- package/dist/chrome/HeaderBar.d.ts.map +0 -1
- package/dist/chrome/LanguagePickerSheet.d.ts +0 -22
- package/dist/chrome/LanguagePickerSheet.d.ts.map +0 -1
- package/dist/chrome/LanguageSwitcher.d.ts +0 -23
- package/dist/chrome/LanguageSwitcher.d.ts.map +0 -1
- package/dist/chrome/NavLink.d.ts +0 -64
- package/dist/chrome/NavLink.d.ts.map +0 -1
- package/dist/chrome/NotificationCenter.d.ts +0 -16
- package/dist/chrome/NotificationCenter.d.ts.map +0 -1
- package/dist/chrome/PanelContainer.d.ts +0 -8
- package/dist/chrome/PanelContainer.d.ts.map +0 -1
- package/dist/chrome/PanelTabs.d.ts +0 -19
- package/dist/chrome/PanelTabs.d.ts.map +0 -1
- package/dist/chrome/PluginContextMenuTarget.d.ts +0 -8
- package/dist/chrome/PluginContextMenuTarget.d.ts.map +0 -1
- package/dist/chrome/PluginFooterStrip.d.ts +0 -3
- package/dist/chrome/PluginFooterStrip.d.ts.map +0 -1
- package/dist/chrome/PluginRoutes.d.ts +0 -9
- package/dist/chrome/PluginRoutes.d.ts.map +0 -1
- package/dist/chrome/PluginSettingsPage.d.ts +0 -3
- package/dist/chrome/PluginSettingsPage.d.ts.map +0 -1
- package/dist/chrome/PluginToolbar.d.ts +0 -9
- package/dist/chrome/PluginToolbar.d.ts.map +0 -1
- package/dist/chrome/PluginWidgetGrid.d.ts +0 -7
- package/dist/chrome/PluginWidgetGrid.d.ts.map +0 -1
- package/dist/chrome/ProductPickerSheet.d.ts +0 -24
- package/dist/chrome/ProductPickerSheet.d.ts.map +0 -1
- package/dist/chrome/ProductSideNav.d.ts +0 -22
- package/dist/chrome/ProductSideNav.d.ts.map +0 -1
- package/dist/chrome/ProductSwitcher.d.ts +0 -31
- package/dist/chrome/ProductSwitcher.d.ts.map +0 -1
- package/dist/chrome/ProfileSwitcher.d.ts +0 -49
- package/dist/chrome/ProfileSwitcher.d.ts.map +0 -1
- package/dist/chrome/ShortcutHelpDialog.d.ts +0 -33
- package/dist/chrome/ShortcutHelpDialog.d.ts.map +0 -1
- package/dist/chrome/SideNavigation.d.ts +0 -85
- package/dist/chrome/SideNavigation.d.ts.map +0 -1
- package/dist/chrome/Sidebar.d.ts +0 -108
- package/dist/chrome/Sidebar.d.ts.map +0 -1
- package/dist/chrome/StatusBar.d.ts +0 -3
- package/dist/chrome/StatusBar.d.ts.map +0 -1
- package/dist/chrome/Tabs.d.ts +0 -74
- package/dist/chrome/Tabs.d.ts.map +0 -1
- package/dist/chrome/index.d.ts +0 -108
- package/dist/chrome/index.d.ts.map +0 -1
- package/dist/chrome.d.ts +0 -2
- package/dist/config/eslint.config.d.ts +0 -12
- package/dist/config/eslint.config.d.ts.map +0 -1
- package/dist/config/index.d.ts +0 -19
- package/dist/config/index.d.ts.map +0 -1
- package/dist/config/prettier.config.d.ts +0 -7
- package/dist/config/prettier.config.d.ts.map +0 -1
- package/dist/form/Checkbox.d.ts +0 -60
- package/dist/form/Checkbox.d.ts.map +0 -1
- package/dist/form/Form.d.ts +0 -114
- package/dist/form/Form.d.ts.map +0 -1
- package/dist/form/FormDescription.d.ts +0 -33
- package/dist/form/FormDescription.d.ts.map +0 -1
- package/dist/form/FormField.d.ts +0 -96
- package/dist/form/FormField.d.ts.map +0 -1
- package/dist/form/FormLabel.d.ts +0 -41
- package/dist/form/FormLabel.d.ts.map +0 -1
- package/dist/form/FormMessage.d.ts +0 -35
- package/dist/form/FormMessage.d.ts.map +0 -1
- package/dist/form/Input.d.ts +0 -43
- package/dist/form/Input.d.ts.map +0 -1
- package/dist/form/Radio.d.ts +0 -99
- package/dist/form/Radio.d.ts.map +0 -1
- package/dist/form/Select.d.ts +0 -101
- package/dist/form/Select.d.ts.map +0 -1
- package/dist/form/Textarea.d.ts +0 -50
- package/dist/form/Textarea.d.ts.map +0 -1
- package/dist/form/index.d.ts +0 -24
- package/dist/form/index.d.ts.map +0 -1
- package/dist/form.d.ts +0 -2
- package/dist/index.d.ts +0 -2
- package/dist/index.d.ts.map +0 -1
- package/dist/lib/utils.d.ts +0 -3
- package/dist/lib/utils.d.ts.map +0 -1
- package/dist/shared/components/AccessDenied.d.ts +0 -117
- package/dist/shared/components/AccessDenied.d.ts.map +0 -1
- package/dist/shared/components/AppErrorBoundary.d.ts +0 -19
- package/dist/shared/components/AppErrorBoundary.d.ts.map +0 -1
- package/dist/shared/components/ConditionalShell.d.ts +0 -17
- package/dist/shared/components/ConditionalShell.d.ts.map +0 -1
- package/dist/shared/components/ContextConversationWidget.d.ts +0 -6
- package/dist/shared/components/ContextConversationWidget.d.ts.map +0 -1
- package/dist/shared/components/ErrorBoundary.d.ts +0 -19
- package/dist/shared/components/ErrorBoundary.d.ts.map +0 -1
- package/dist/shared/components/ErrorFallback.d.ts +0 -3
- package/dist/shared/components/ErrorFallback.d.ts.map +0 -1
- package/dist/shared/components/KeyboardHelpDialogWrapper.d.ts +0 -7
- package/dist/shared/components/KeyboardHelpDialogWrapper.d.ts.map +0 -1
- package/dist/shared/components/LegalPage.d.ts +0 -19
- package/dist/shared/components/LegalPage.d.ts.map +0 -1
- package/dist/shared/components/LoadingFallback.d.ts +0 -31
- package/dist/shared/components/LoadingFallback.d.ts.map +0 -1
- package/dist/shared/components/MicrofrontendErrorBoundary.d.ts +0 -20
- package/dist/shared/components/MicrofrontendErrorBoundary.d.ts.map +0 -1
- package/dist/shared/components/PWAInstallBanner.d.ts +0 -14
- package/dist/shared/components/PWAInstallBanner.d.ts.map +0 -1
- package/dist/shared/components/PermissionGate.d.ts +0 -202
- package/dist/shared/components/PermissionGate.d.ts.map +0 -1
- package/dist/shared/components/ProductAccessGuard.d.ts +0 -8
- package/dist/shared/components/ProductAccessGuard.d.ts.map +0 -1
- package/dist/shared/components/QuotaMeter.d.ts +0 -30
- package/dist/shared/components/QuotaMeter.d.ts.map +0 -1
- package/dist/shared/components/RequireAuth.d.ts +0 -76
- package/dist/shared/components/RequireAuth.d.ts.map +0 -1
- package/dist/shared/components/SSORedirectGuard.d.ts +0 -49
- package/dist/shared/components/SSORedirectGuard.d.ts.map +0 -1
- package/dist/shared/components/SearchPage.d.ts +0 -24
- package/dist/shared/components/SearchPage.d.ts.map +0 -1
- package/dist/shared/components/index.d.ts +0 -25
- package/dist/shared/components/index.d.ts.map +0 -1
- package/dist/shared/config/authBridgeUrls.d.ts +0 -27
- package/dist/shared/config/authBridgeUrls.d.ts.map +0 -1
- package/dist/shared/config/eslint.config.d.ts +0 -12
- package/dist/shared/config/eslint.config.d.ts.map +0 -1
- package/dist/shared/config/gatewayUrls.d.ts +0 -44
- package/dist/shared/config/gatewayUrls.d.ts.map +0 -1
- package/dist/shared/config/index.d.ts +0 -71
- package/dist/shared/config/index.d.ts.map +0 -1
- package/dist/shared/config/prettier.config.d.ts +0 -7
- package/dist/shared/config/prettier.config.d.ts.map +0 -1
- package/dist/shared/config/products.d.ts +0 -56
- package/dist/shared/config/products.d.ts.map +0 -1
- package/dist/shared/config/shellRoutes.d.ts +0 -52
- package/dist/shared/config/shellRoutes.d.ts.map +0 -1
- package/dist/shared/events/index.d.ts +0 -591
- package/dist/shared/events/index.d.ts.map +0 -1
- package/dist/shared/events/metadata.d.ts +0 -7
- package/dist/shared/events/metadata.d.ts.map +0 -1
- package/dist/shared/events/sinks/BackendAuditSink.d.ts +0 -18
- package/dist/shared/events/sinks/BackendAuditSink.d.ts.map +0 -1
- package/dist/shared/events/sinks/BroadcastChannelSink.d.ts +0 -10
- package/dist/shared/events/sinks/BroadcastChannelSink.d.ts.map +0 -1
- package/dist/shared/events/sinks/DevtoolsSink.d.ts +0 -10
- package/dist/shared/events/sinks/DevtoolsSink.d.ts.map +0 -1
- package/dist/shared/events/sinks/OtelBrowserSink.d.ts +0 -14
- package/dist/shared/events/sinks/OtelBrowserSink.d.ts.map +0 -1
- package/dist/shared/events/sinks/RybbitSink.d.ts +0 -19
- package/dist/shared/events/sinks/RybbitSink.d.ts.map +0 -1
- package/dist/shared/events/sinks/index.d.ts +0 -6
- package/dist/shared/events/sinks/index.d.ts.map +0 -1
- package/dist/shared/feature-flags/FeatureFlagProvider.d.ts +0 -47
- package/dist/shared/feature-flags/FeatureFlagProvider.d.ts.map +0 -1
- package/dist/shared/feature-flags/FeatureGate.d.ts +0 -27
- package/dist/shared/feature-flags/FeatureGate.d.ts.map +0 -1
- package/dist/shared/feature-flags/index.d.ts +0 -38
- package/dist/shared/feature-flags/index.d.ts.map +0 -1
- package/dist/shared/feature-flags/types.d.ts +0 -121
- package/dist/shared/feature-flags/types.d.ts.map +0 -1
- package/dist/shared/feature-flags/useFeatureFlag.d.ts +0 -41
- package/dist/shared/feature-flags/useFeatureFlag.d.ts.map +0 -1
- package/dist/shared/geography/GeographyProvider.d.ts +0 -40
- package/dist/shared/geography/GeographyProvider.d.ts.map +0 -1
- package/dist/shared/geography/countries.d.ts +0 -53
- package/dist/shared/geography/countries.d.ts.map +0 -1
- package/dist/shared/geography/index.d.ts +0 -5
- package/dist/shared/geography/index.d.ts.map +0 -1
- package/dist/shared/graphql/GatewayContext.d.ts +0 -55
- package/dist/shared/graphql/GatewayContext.d.ts.map +0 -1
- package/dist/shared/graphql/client.d.ts +0 -122
- package/dist/shared/graphql/client.d.ts.map +0 -1
- package/dist/shared/graphql/fetch.d.ts +0 -133
- package/dist/shared/graphql/fetch.d.ts.map +0 -1
- package/dist/shared/graphql/index.d.ts +0 -9
- package/dist/shared/graphql/index.d.ts.map +0 -1
- package/dist/shared/graphql/links/sse-link.d.ts +0 -48
- package/dist/shared/graphql/links/sse-link.d.ts.map +0 -1
- package/dist/shared/graphql/security.d.ts +0 -13
- package/dist/shared/graphql/security.d.ts.map +0 -1
- package/dist/shared/graphql/workspaceToken.d.ts +0 -13
- package/dist/shared/graphql/workspaceToken.d.ts.map +0 -1
- package/dist/shared/help/HelpButton.d.ts +0 -25
- package/dist/shared/help/HelpButton.d.ts.map +0 -1
- package/dist/shared/help/HelpPanel.d.ts +0 -10
- package/dist/shared/help/HelpPanel.d.ts.map +0 -1
- package/dist/shared/help/HelpProvider.d.ts +0 -40
- package/dist/shared/help/HelpProvider.d.ts.map +0 -1
- package/dist/shared/help/index.d.ts +0 -53
- package/dist/shared/help/index.d.ts.map +0 -1
- package/dist/shared/help/types.d.ts +0 -159
- package/dist/shared/help/types.d.ts.map +0 -1
- package/dist/shared/hooks/index.d.ts +0 -31
- package/dist/shared/hooks/index.d.ts.map +0 -1
- package/dist/shared/hooks/shell/index.d.ts +0 -22
- package/dist/shared/hooks/shell/index.d.ts.map +0 -1
- package/dist/shared/hooks/shell/useBreadcrumbs.d.ts +0 -50
- package/dist/shared/hooks/shell/useBreadcrumbs.d.ts.map +0 -1
- package/dist/shared/hooks/shell/useFooterRegistry.d.ts +0 -23
- package/dist/shared/hooks/shell/useFooterRegistry.d.ts.map +0 -1
- package/dist/shared/hooks/shell/useGlobalSearch.d.ts +0 -103
- package/dist/shared/hooks/shell/useGlobalSearch.d.ts.map +0 -1
- package/dist/shared/hooks/shell/useLanguages.d.ts +0 -43
- package/dist/shared/hooks/shell/useLanguages.d.ts.map +0 -1
- package/dist/shared/hooks/shell/useNavRegistry.d.ts +0 -25
- package/dist/shared/hooks/shell/useNavRegistry.d.ts.map +0 -1
- package/dist/shared/hooks/shell/useProductAccess.d.ts +0 -37
- package/dist/shared/hooks/shell/useProductAccess.d.ts.map +0 -1
- package/dist/shared/hooks/shell/useProducts.d.ts +0 -30
- package/dist/shared/hooks/shell/useProducts.d.ts.map +0 -1
- package/dist/shared/hooks/useAsync.d.ts +0 -151
- package/dist/shared/hooks/useAsync.d.ts.map +0 -1
- package/dist/shared/hooks/useBreakpoint.d.ts +0 -83
- package/dist/shared/hooks/useBreakpoint.d.ts.map +0 -1
- package/dist/shared/hooks/useCopyToClipboard.d.ts +0 -72
- package/dist/shared/hooks/useCopyToClipboard.d.ts.map +0 -1
- package/dist/shared/hooks/useDebounce.d.ts +0 -26
- package/dist/shared/hooks/useDebounce.d.ts.map +0 -1
- package/dist/shared/hooks/useHasAnimated.d.ts +0 -10
- package/dist/shared/hooks/useHasAnimated.d.ts.map +0 -1
- package/dist/shared/hooks/useKeyPress.d.ts +0 -116
- package/dist/shared/hooks/useKeyPress.d.ts.map +0 -1
- package/dist/shared/hooks/useLocalStorage.d.ts +0 -41
- package/dist/shared/hooks/useLocalStorage.d.ts.map +0 -1
- package/dist/shared/hooks/useMediaQuery.d.ts +0 -35
- package/dist/shared/hooks/useMediaQuery.d.ts.map +0 -1
- package/dist/shared/hooks/useOnClickOutside.d.ts +0 -76
- package/dist/shared/hooks/useOnClickOutside.d.ts.map +0 -1
- package/dist/shared/hooks/usePWA.d.ts +0 -57
- package/dist/shared/hooks/usePWA.d.ts.map +0 -1
- package/dist/shared/hooks/usePrevious.d.ts +0 -157
- package/dist/shared/hooks/usePrevious.d.ts.map +0 -1
- package/dist/shared/hooks/useQuotaErrorToast.d.ts +0 -50
- package/dist/shared/hooks/useQuotaErrorToast.d.ts.map +0 -1
- package/dist/shared/hooks/useRecordProductVisit.d.ts +0 -11
- package/dist/shared/hooks/useRecordProductVisit.d.ts.map +0 -1
- package/dist/shared/hooks/useReferralAttribution.d.ts +0 -2
- package/dist/shared/hooks/useReferralAttribution.d.ts.map +0 -1
- package/dist/shared/hooks/useSessionStorage.d.ts +0 -44
- package/dist/shared/hooks/useSessionStorage.d.ts.map +0 -1
- package/dist/shared/hooks/useThrottle.d.ts +0 -37
- package/dist/shared/hooks/useThrottle.d.ts.map +0 -1
- package/dist/shared/hooks/useToggle.d.ts +0 -152
- package/dist/shared/hooks/useToggle.d.ts.map +0 -1
- package/dist/shared/index.d.ts +0 -13
- package/dist/shared/index.d.ts.map +0 -1
- package/dist/shared/keyboard/globalShortcuts.d.ts +0 -58
- package/dist/shared/keyboard/globalShortcuts.d.ts.map +0 -1
- package/dist/shared/keyboard/index.d.ts +0 -40
- package/dist/shared/keyboard/index.d.ts.map +0 -1
- package/dist/shared/keyboard/types.d.ts +0 -85
- package/dist/shared/keyboard/types.d.ts.map +0 -1
- package/dist/shared/keyboard/useHotkeys.d.ts +0 -21
- package/dist/shared/keyboard/useHotkeys.d.ts.map +0 -1
- package/dist/shared/keyboard/useKeyboardShortcuts.d.ts +0 -94
- package/dist/shared/keyboard/useKeyboardShortcuts.d.ts.map +0 -1
- package/dist/shared/keyboard/useShortcutHelp.d.ts +0 -27
- package/dist/shared/keyboard/useShortcutHelp.d.ts.map +0 -1
- package/dist/shared/keyboard/utils.d.ts +0 -72
- package/dist/shared/keyboard/utils.d.ts.map +0 -1
- package/dist/shared/logger/ConsoleTransport.d.ts +0 -22
- package/dist/shared/logger/ConsoleTransport.d.ts.map +0 -1
- package/dist/shared/logger/LogManager.d.ts +0 -75
- package/dist/shared/logger/LogManager.d.ts.map +0 -1
- package/dist/shared/logger/Logger.d.ts +0 -86
- package/dist/shared/logger/Logger.d.ts.map +0 -1
- package/dist/shared/logger/index.d.ts +0 -42
- package/dist/shared/logger/index.d.ts.map +0 -1
- package/dist/shared/logger/types.d.ts +0 -70
- package/dist/shared/logger/types.d.ts.map +0 -1
- package/dist/shared/logger/useLogger.d.ts +0 -29
- package/dist/shared/logger/useLogger.d.ts.map +0 -1
- package/dist/shared/motion/AnimatedCounter.d.ts +0 -16
- package/dist/shared/motion/AnimatedCounter.d.ts.map +0 -1
- package/dist/shared/motion/MotionCard.d.ts +0 -18
- package/dist/shared/motion/MotionCard.d.ts.map +0 -1
- package/dist/shared/motion/MotionCollapse.d.ts +0 -14
- package/dist/shared/motion/MotionCollapse.d.ts.map +0 -1
- package/dist/shared/motion/MotionFade.d.ts +0 -16
- package/dist/shared/motion/MotionFade.d.ts.map +0 -1
- package/dist/shared/motion/MotionItem.d.ts +0 -25
- package/dist/shared/motion/MotionItem.d.ts.map +0 -1
- package/dist/shared/motion/MotionList.d.ts +0 -28
- package/dist/shared/motion/MotionList.d.ts.map +0 -1
- package/dist/shared/motion/MotionPage.d.ts +0 -18
- package/dist/shared/motion/MotionPage.d.ts.map +0 -1
- package/dist/shared/motion/index.d.ts +0 -9
- package/dist/shared/motion/index.d.ts.map +0 -1
- package/dist/shared/motion/variants.d.ts +0 -70
- package/dist/shared/motion/variants.d.ts.map +0 -1
- package/dist/shared/native/bridge.d.ts +0 -3
- package/dist/shared/native/bridge.d.ts.map +0 -1
- package/dist/shared/native/consumers.d.ts +0 -9
- package/dist/shared/native/consumers.d.ts.map +0 -1
- package/dist/shared/native/hooks/index.d.ts +0 -12
- package/dist/shared/native/hooks/index.d.ts.map +0 -1
- package/dist/shared/native/hooks/useAppState.d.ts +0 -3
- package/dist/shared/native/hooks/useAppState.d.ts.map +0 -1
- package/dist/shared/native/hooks/useDeviceInfo.d.ts +0 -3
- package/dist/shared/native/hooks/useDeviceInfo.d.ts.map +0 -1
- package/dist/shared/native/hooks/useHaptics.d.ts +0 -8
- package/dist/shared/native/hooks/useHaptics.d.ts.map +0 -1
- package/dist/shared/native/hooks/useNativeKeyboard.d.ts +0 -6
- package/dist/shared/native/hooks/useNativeKeyboard.d.ts.map +0 -1
- package/dist/shared/native/hooks/useNativePlatform.d.ts +0 -10
- package/dist/shared/native/hooks/useNativePlatform.d.ts.map +0 -1
- package/dist/shared/native/hooks/useSafeArea.d.ts +0 -3
- package/dist/shared/native/hooks/useSafeArea.d.ts.map +0 -1
- package/dist/shared/native/hooks/useStatusBar.d.ts +0 -6
- package/dist/shared/native/hooks/useStatusBar.d.ts.map +0 -1
- package/dist/shared/native/index.d.ts +0 -6
- package/dist/shared/native/index.d.ts.map +0 -1
- package/dist/shared/native/platform.d.ts +0 -7
- package/dist/shared/native/platform.d.ts.map +0 -1
- package/dist/shared/native/types.d.ts +0 -62
- package/dist/shared/native/types.d.ts.map +0 -1
- package/dist/shared/pages/AiPage.d.ts +0 -14
- package/dist/shared/pages/AiPage.d.ts.map +0 -1
- package/dist/shared/pages/LegalPage.d.ts +0 -19
- package/dist/shared/pages/LegalPage.d.ts.map +0 -1
- package/dist/shared/pages/SearchPage.d.ts +0 -28
- package/dist/shared/pages/SearchPage.d.ts.map +0 -1
- package/dist/shared/pages/index.d.ts +0 -7
- package/dist/shared/pages/index.d.ts.map +0 -1
- package/dist/shared/plugins/PluginRuntimeProvider.d.ts +0 -28
- package/dist/shared/plugins/PluginRuntimeProvider.d.ts.map +0 -1
- package/dist/shared/plugins/context.d.ts +0 -65
- package/dist/shared/plugins/context.d.ts.map +0 -1
- package/dist/shared/plugins/disposable.d.ts +0 -17
- package/dist/shared/plugins/disposable.d.ts.map +0 -1
- package/dist/shared/plugins/event-bus.d.ts +0 -112
- package/dist/shared/plugins/event-bus.d.ts.map +0 -1
- package/dist/shared/plugins/iframe-mount/PluginIframe.d.ts +0 -75
- package/dist/shared/plugins/iframe-mount/PluginIframe.d.ts.map +0 -1
- package/dist/shared/plugins/iframe-mount/PluginMount.d.ts +0 -59
- package/dist/shared/plugins/iframe-mount/PluginMount.d.ts.map +0 -1
- package/dist/shared/plugins/iframe-mount/client/index.d.ts +0 -3
- package/dist/shared/plugins/iframe-mount/client/index.d.ts.map +0 -1
- package/dist/shared/plugins/iframe-mount/client/message-bus.d.ts +0 -71
- package/dist/shared/plugins/iframe-mount/client/message-bus.d.ts.map +0 -1
- package/dist/shared/plugins/iframe-mount/client/rpc.d.ts +0 -25
- package/dist/shared/plugins/iframe-mount/client/rpc.d.ts.map +0 -1
- package/dist/shared/plugins/iframe-mount/index.d.ts +0 -6
- package/dist/shared/plugins/iframe-mount/index.d.ts.map +0 -1
- package/dist/shared/plugins/iframe-mount/protocol/contribution.d.ts +0 -83
- package/dist/shared/plugins/iframe-mount/protocol/contribution.d.ts.map +0 -1
- package/dist/shared/plugins/iframe-mount/protocol/envelope.d.ts +0 -136
- package/dist/shared/plugins/iframe-mount/protocol/envelope.d.ts.map +0 -1
- package/dist/shared/plugins/iframe-mount/protocol/index.d.ts +0 -3
- package/dist/shared/plugins/iframe-mount/protocol/index.d.ts.map +0 -1
- package/dist/shared/plugins/iframe-mount/sandbox.d.ts +0 -3
- package/dist/shared/plugins/iframe-mount/sandbox.d.ts.map +0 -1
- package/dist/shared/plugins/iframe-mount/types.d.ts +0 -64
- package/dist/shared/plugins/iframe-mount/types.d.ts.map +0 -1
- package/dist/shared/plugins/iframe-mount/useFetchContributions.d.ts +0 -31
- package/dist/shared/plugins/iframe-mount/useFetchContributions.d.ts.map +0 -1
- package/dist/shared/plugins/index.d.ts +0 -41
- package/dist/shared/plugins/index.d.ts.map +0 -1
- package/dist/shared/plugins/panels/usePanelManagerStore.d.ts +0 -68
- package/dist/shared/plugins/panels/usePanelManagerStore.d.ts.map +0 -1
- package/dist/shared/plugins/registries/createContributionRegistry.d.ts +0 -16
- package/dist/shared/plugins/registries/createContributionRegistry.d.ts.map +0 -1
- package/dist/shared/plugins/registries/index.d.ts +0 -15
- package/dist/shared/plugins/registries/index.d.ts.map +0 -1
- package/dist/shared/plugins/registries/useCommandRegistry.d.ts +0 -3
- package/dist/shared/plugins/registries/useCommandRegistry.d.ts.map +0 -1
- package/dist/shared/plugins/registries/useContextMenuRegistry.d.ts +0 -3
- package/dist/shared/plugins/registries/useContextMenuRegistry.d.ts.map +0 -1
- package/dist/shared/plugins/registries/usePanelRegistry.d.ts +0 -3
- package/dist/shared/plugins/registries/usePanelRegistry.d.ts.map +0 -1
- package/dist/shared/plugins/registries/useRouteRegistry.d.ts +0 -3
- package/dist/shared/plugins/registries/useRouteRegistry.d.ts.map +0 -1
- package/dist/shared/plugins/registries/useSettingsRegistry.d.ts +0 -3
- package/dist/shared/plugins/registries/useSettingsRegistry.d.ts.map +0 -1
- package/dist/shared/plugins/registries/useStatusBarRegistry.d.ts +0 -3
- package/dist/shared/plugins/registries/useStatusBarRegistry.d.ts.map +0 -1
- package/dist/shared/plugins/registries/useToolbarRegistry.d.ts +0 -3
- package/dist/shared/plugins/registries/useToolbarRegistry.d.ts.map +0 -1
- package/dist/shared/plugins/registries/useWidgetRegistry.d.ts +0 -3
- package/dist/shared/plugins/registries/useWidgetRegistry.d.ts.map +0 -1
- package/dist/shared/plugins/runtime.d.ts +0 -68
- package/dist/shared/plugins/runtime.d.ts.map +0 -1
- package/dist/shared/plugins/types.d.ts +0 -228
- package/dist/shared/plugins/types.d.ts.map +0 -1
- package/dist/shared/providers/AppShellProvider.d.ts +0 -96
- package/dist/shared/providers/AppShellProvider.d.ts.map +0 -1
- package/dist/shared/providers/MicrofrontendProvider.d.ts +0 -41
- package/dist/shared/providers/MicrofrontendProvider.d.ts.map +0 -1
- package/dist/shared/providers/index.d.ts +0 -12
- package/dist/shared/providers/index.d.ts.map +0 -1
- package/dist/shared/providers/shell/ActiveContextProvider.d.ts +0 -88
- package/dist/shared/providers/shell/ActiveContextProvider.d.ts.map +0 -1
- package/dist/shared/providers/shell/ActiveContextStorage.d.ts +0 -45
- package/dist/shared/providers/shell/ActiveContextStorage.d.ts.map +0 -1
- package/dist/shared/providers/shell/AppShellContext.d.ts +0 -19
- package/dist/shared/providers/shell/AppShellContext.d.ts.map +0 -1
- package/dist/shared/providers/shell/AuthBridgeClient.d.ts +0 -121
- package/dist/shared/providers/shell/AuthBridgeClient.d.ts.map +0 -1
- package/dist/shared/providers/shell/AuthProvider.d.ts +0 -58
- package/dist/shared/providers/shell/AuthProvider.d.ts.map +0 -1
- package/dist/shared/providers/shell/AuthTokenProvider.d.ts +0 -22
- package/dist/shared/providers/shell/AuthTokenProvider.d.ts.map +0 -1
- package/dist/shared/providers/shell/ContextManagerProvider.d.ts +0 -56
- package/dist/shared/providers/shell/ContextManagerProvider.d.ts.map +0 -1
- package/dist/shared/providers/shell/FeatureFlagsProvider.d.ts +0 -20
- package/dist/shared/providers/shell/FeatureFlagsProvider.d.ts.map +0 -1
- package/dist/shared/providers/shell/GatewayRouter.d.ts +0 -31
- package/dist/shared/providers/shell/GatewayRouter.d.ts.map +0 -1
- package/dist/shared/providers/shell/GlobalUiProvider.d.ts +0 -46
- package/dist/shared/providers/shell/GlobalUiProvider.d.ts.map +0 -1
- package/dist/shared/providers/shell/I18nProvider.d.ts +0 -65
- package/dist/shared/providers/shell/I18nProvider.d.ts.map +0 -1
- package/dist/shared/providers/shell/MultiGatewayProvider.d.ts +0 -25
- package/dist/shared/providers/shell/MultiGatewayProvider.d.ts.map +0 -1
- package/dist/shared/providers/shell/ObservabilityProvider.d.ts +0 -15
- package/dist/shared/providers/shell/ObservabilityProvider.d.ts.map +0 -1
- package/dist/shared/providers/shell/PageConversationContextProvider.d.ts +0 -22
- package/dist/shared/providers/shell/PageConversationContextProvider.d.ts.map +0 -1
- package/dist/shared/providers/shell/PermissionProvider.d.ts +0 -227
- package/dist/shared/providers/shell/PermissionProvider.d.ts.map +0 -1
- package/dist/shared/providers/shell/ProfileGeographyBridge.d.ts +0 -8
- package/dist/shared/providers/shell/ProfileGeographyBridge.d.ts.map +0 -1
- package/dist/shared/providers/shell/ProfileI18nBridge.d.ts +0 -15
- package/dist/shared/providers/shell/ProfileI18nBridge.d.ts.map +0 -1
- package/dist/shared/providers/shell/ProfileStorageManager.d.ts +0 -107
- package/dist/shared/providers/shell/ProfileStorageManager.d.ts.map +0 -1
- package/dist/shared/providers/shell/ShellUiProvider.d.ts +0 -47
- package/dist/shared/providers/shell/ShellUiProvider.d.ts.map +0 -1
- package/dist/shared/providers/shell/ThemeProvider.d.ts +0 -29
- package/dist/shared/providers/shell/ThemeProvider.d.ts.map +0 -1
- package/dist/shared/providers/shell/index.d.ts +0 -45
- package/dist/shared/providers/shell/index.d.ts.map +0 -1
- package/dist/shared/shims/assert.d.ts +0 -19
- package/dist/shared/shims/assert.d.ts.map +0 -1
- package/dist/shared/shims/index.d.ts +0 -25
- package/dist/shared/shims/index.d.ts.map +0 -1
- package/dist/shared/shims/process.d.ts +0 -20
- package/dist/shared/shims/process.d.ts.map +0 -1
- package/dist/shared/shims/use-sync-external-store-shim.d.ts +0 -7
- package/dist/shared/shims/use-sync-external-store-shim.d.ts.map +0 -1
- package/dist/shared/shims/use-sync-external-store-with-selector.d.ts +0 -17
- package/dist/shared/shims/use-sync-external-store-with-selector.d.ts.map +0 -1
- package/dist/shared/shims/util.d.ts +0 -135
- package/dist/shared/shims/util.d.ts.map +0 -1
- package/dist/shared/tours/TourInitializer.d.ts +0 -6
- package/dist/shared/tours/TourInitializer.d.ts.map +0 -1
- package/dist/shared/tours/TourPlayer.d.ts +0 -49
- package/dist/shared/tours/TourPlayer.d.ts.map +0 -1
- package/dist/shared/tours/TourPlayerProvider.d.ts +0 -26
- package/dist/shared/tours/TourPlayerProvider.d.ts.map +0 -1
- package/dist/shared/tours/TourSpotlight.d.ts +0 -8
- package/dist/shared/tours/TourSpotlight.d.ts.map +0 -1
- package/dist/shared/tours/TourTooltip.d.ts +0 -7
- package/dist/shared/tours/TourTooltip.d.ts.map +0 -1
- package/dist/shared/tours/TourTrigger.d.ts +0 -15
- package/dist/shared/tours/TourTrigger.d.ts.map +0 -1
- package/dist/shared/tours/ToursContext.d.ts +0 -42
- package/dist/shared/tours/ToursContext.d.ts.map +0 -1
- package/dist/shared/tours/index.d.ts +0 -53
- package/dist/shared/tours/index.d.ts.map +0 -1
- package/dist/shared/tours/progress.d.ts +0 -7
- package/dist/shared/tours/progress.d.ts.map +0 -1
- package/dist/shared/tours/routeCatalog.d.ts +0 -42
- package/dist/shared/tours/routeCatalog.d.ts.map +0 -1
- package/dist/shared/tours/types.d.ts +0 -215
- package/dist/shared/tours/types.d.ts.map +0 -1
- package/dist/shared/tours/useTourPlayer.d.ts +0 -38
- package/dist/shared/tours/useTourPlayer.d.ts.map +0 -1
- package/dist/shared/types/index.d.ts +0 -185
- package/dist/shared/types/index.d.ts.map +0 -1
- package/dist/shared/utils/apollo.d.ts +0 -26
- package/dist/shared/utils/apollo.d.ts.map +0 -1
- package/dist/shared/utils/appHelpers.d.ts +0 -34
- package/dist/shared/utils/appHelpers.d.ts.map +0 -1
- package/dist/shared/utils/authCookie.d.ts +0 -35
- package/dist/shared/utils/authCookie.d.ts.map +0 -1
- package/dist/shared/utils/authErrorHandling.d.ts +0 -65
- package/dist/shared/utils/authErrorHandling.d.ts.map +0 -1
- package/dist/shared/utils/cn.d.ts +0 -6
- package/dist/shared/utils/cn.d.ts.map +0 -1
- package/dist/shared/utils/format.d.ts +0 -98
- package/dist/shared/utils/format.d.ts.map +0 -1
- package/dist/shared/utils/gatewayFetchRewrite.d.ts +0 -53
- package/dist/shared/utils/gatewayFetchRewrite.d.ts.map +0 -1
- package/dist/shared/utils/index.d.ts +0 -26
- package/dist/shared/utils/index.d.ts.map +0 -1
- package/dist/shared/utils/lazyWithRetry.d.ts +0 -43
- package/dist/shared/utils/lazyWithRetry.d.ts.map +0 -1
- package/dist/shared/utils/loggerInit.d.ts +0 -15
- package/dist/shared/utils/loggerInit.d.ts.map +0 -1
- package/dist/shared/utils/mockData.d.ts +0 -40
- package/dist/shared/utils/mockData.d.ts.map +0 -1
- package/dist/shared/utils/profileScopedStorage.d.ts +0 -42
- package/dist/shared/utils/profileScopedStorage.d.ts.map +0 -1
- package/dist/shared/utils/quotaErrors.d.ts +0 -37
- package/dist/shared/utils/quotaErrors.d.ts.map +0 -1
- package/dist/shared/utils/tokens.d.ts +0 -166
- package/dist/shared/utils/tokens.d.ts.map +0 -1
- package/dist/shared-components.d.ts +0 -2
- package/dist/shared-config.d.ts +0 -2
- package/dist/shared-events.d.ts +0 -2
- package/dist/shared-feature-flags.d.ts +0 -2
- package/dist/shared-geography.d.ts +0 -2
- package/dist/shared-graphql.d.ts +0 -2
- package/dist/shared-hooks-shell.d.ts +0 -2
- package/dist/shared-hooks.d.ts +0 -2
- package/dist/shared-keyboard.d.ts +0 -2
- package/dist/shared-logger.d.ts +0 -2
- package/dist/shared-motion.d.ts +0 -2
- package/dist/shared-native.d.ts +0 -2
- package/dist/shared-pages.d.ts +0 -2
- package/dist/shared-plugins.d.ts +0 -2
- package/dist/shared-providers-shell.d.ts +0 -2
- package/dist/shared-providers.d.ts +0 -2
- package/dist/shared-shims.d.ts +0 -2
- package/dist/shared-tours.d.ts +0 -2
- package/dist/shared-types.d.ts +0 -1
- package/dist/shared-utils.d.ts +0 -2
- package/dist/shared.d.ts +0 -2
- package/dist/storage/SaveToFilesButton.d.ts +0 -55
- package/dist/storage/SaveToFilesButton.d.ts.map +0 -1
- package/dist/storage/SaveToFilesDialog.d.ts +0 -13
- package/dist/storage/SaveToFilesDialog.d.ts.map +0 -1
- package/dist/storage/StorageFolderPicker.d.ts +0 -23
- package/dist/storage/StorageFolderPicker.d.ts.map +0 -1
- package/dist/storage/index.d.ts +0 -10
- package/dist/storage/index.d.ts.map +0 -1
- package/dist/storage/uploadBlob.d.ts +0 -21
- package/dist/storage/uploadBlob.d.ts.map +0 -1
- package/dist/storage/useSaveToFiles.d.ts +0 -17
- package/dist/storage/useSaveToFiles.d.ts.map +0 -1
- package/dist/tag/TagBadge.d.ts +0 -17
- package/dist/tag/TagBadge.d.ts.map +0 -1
- package/dist/tag/TagsWidget.d.ts +0 -103
- package/dist/tag/TagsWidget.d.ts.map +0 -1
- package/dist/tag/index.d.ts +0 -3
- package/dist/tag/index.d.ts.map +0 -1
- package/dist/tag.d.ts +0 -2
- package/dist/ui/accordion.d.ts +0 -8
- package/dist/ui/accordion.d.ts.map +0 -1
- package/dist/ui/alert-dialog.d.ts +0 -15
- package/dist/ui/alert-dialog.d.ts.map +0 -1
- package/dist/ui/badge.d.ts +0 -10
- package/dist/ui/badge.d.ts.map +0 -1
- package/dist/ui/button.d.ts +0 -12
- package/dist/ui/button.d.ts.map +0 -1
- package/dist/ui/card.d.ts +0 -9
- package/dist/ui/card.d.ts.map +0 -1
- package/dist/ui/checkbox.d.ts +0 -5
- package/dist/ui/checkbox.d.ts.map +0 -1
- package/dist/ui/command.d.ts +0 -19
- package/dist/ui/command.d.ts.map +0 -1
- package/dist/ui/dialog.d.ts +0 -16
- package/dist/ui/dialog.d.ts.map +0 -1
- package/dist/ui/dropdown-menu.d.ts +0 -28
- package/dist/ui/dropdown-menu.d.ts.map +0 -1
- package/dist/ui/index.d.ts +0 -25
- package/dist/ui/index.d.ts.map +0 -1
- package/dist/ui/input.d.ts +0 -5
- package/dist/ui/input.d.ts.map +0 -1
- package/dist/ui/label.d.ts +0 -5
- package/dist/ui/label.d.ts.map +0 -1
- package/dist/ui/popover.d.ts +0 -8
- package/dist/ui/popover.d.ts.map +0 -1
- package/dist/ui/scroll-area.d.ts +0 -6
- package/dist/ui/scroll-area.d.ts.map +0 -1
- package/dist/ui/select.d.ts +0 -13
- package/dist/ui/select.d.ts.map +0 -1
- package/dist/ui/separator.d.ts +0 -5
- package/dist/ui/separator.d.ts.map +0 -1
- package/dist/ui/sheet.d.ts +0 -14
- package/dist/ui/sheet.d.ts.map +0 -1
- package/dist/ui/skeleton.d.ts +0 -4
- package/dist/ui/skeleton.d.ts.map +0 -1
- package/dist/ui/sonner.d.ts +0 -4
- package/dist/ui/sonner.d.ts.map +0 -1
- package/dist/ui/spinner.d.ts +0 -6
- package/dist/ui/spinner.d.ts.map +0 -1
- package/dist/ui/switch.d.ts +0 -5
- package/dist/ui/switch.d.ts.map +0 -1
- package/dist/ui/table.d.ts +0 -11
- package/dist/ui/table.d.ts.map +0 -1
- package/dist/ui/tabs.d.ts +0 -8
- package/dist/ui/tabs.d.ts.map +0 -1
- package/dist/ui/textarea.d.ts +0 -5
- package/dist/ui/textarea.d.ts.map +0 -1
- package/dist/ui/tooltip.d.ts +0 -7
- package/dist/ui/tooltip.d.ts.map +0 -1
- package/dist/ui.d.ts +0 -2
- package/dist/utils/cn.d.ts +0 -15
- package/dist/utils/cn.d.ts.map +0 -1
- package/dist/utils/index.d.ts +0 -3
- package/dist/utils/index.d.ts.map +0 -1
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Return type for the useAsync hook
|
|
3
|
-
*/
|
|
4
|
-
export interface UseAsyncReturn<T, Args extends unknown[] = unknown[]> {
|
|
5
|
-
/**
|
|
6
|
-
* Execute the async function with the provided arguments
|
|
7
|
-
*/
|
|
8
|
-
execute: (...args: Args) => Promise<T | undefined>;
|
|
9
|
-
/**
|
|
10
|
-
* Whether the async operation is currently in progress
|
|
11
|
-
*/
|
|
12
|
-
loading: boolean;
|
|
13
|
-
/**
|
|
14
|
-
* Error from the last failed async operation, or null if no error
|
|
15
|
-
*/
|
|
16
|
-
error: Error | null;
|
|
17
|
-
/**
|
|
18
|
-
* Data from the last successful async operation, or null if not yet executed
|
|
19
|
-
*/
|
|
20
|
-
data: T | null;
|
|
21
|
-
/**
|
|
22
|
-
* Reset the hook state to initial values
|
|
23
|
-
*/
|
|
24
|
-
reset: () => void;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Manages the state and lifecycle of async operations.
|
|
28
|
-
* Provides loading, error, and data states, with the ability to execute and reset.
|
|
29
|
-
*
|
|
30
|
-
* @template T - The return type of the async function
|
|
31
|
-
* @template Args - The argument types of the async function
|
|
32
|
-
* @param asyncFunction - The async function to manage
|
|
33
|
-
* @returns Object containing execute function and state values
|
|
34
|
-
*
|
|
35
|
-
* @example
|
|
36
|
-
* ```tsx
|
|
37
|
-
* function UserProfile({ userId }: { userId: string }) {
|
|
38
|
-
* const { execute, loading, error, data } = useAsync(fetchUser);
|
|
39
|
-
*
|
|
40
|
-
* useEffect(() => {
|
|
41
|
-
* execute(userId);
|
|
42
|
-
* }, [userId, execute]);
|
|
43
|
-
*
|
|
44
|
-
* if (loading) return <LoadingSpinner />;
|
|
45
|
-
* if (error) return <ErrorMessage error={error} />;
|
|
46
|
-
* if (!data) return null;
|
|
47
|
-
*
|
|
48
|
-
* return <div>{data.name}</div>;
|
|
49
|
-
* }
|
|
50
|
-
* ```
|
|
51
|
-
*
|
|
52
|
-
* @example
|
|
53
|
-
* ```tsx
|
|
54
|
-
* function SearchComponent() {
|
|
55
|
-
* const [query, setQuery] = useState('');
|
|
56
|
-
* const { execute, loading, error, data, reset } = useAsync(searchAPI);
|
|
57
|
-
*
|
|
58
|
-
* const handleSearch = async () => {
|
|
59
|
-
* if (query.trim()) {
|
|
60
|
-
* await execute(query);
|
|
61
|
-
* }
|
|
62
|
-
* };
|
|
63
|
-
*
|
|
64
|
-
* const handleClear = () => {
|
|
65
|
-
* setQuery('');
|
|
66
|
-
* reset();
|
|
67
|
-
* };
|
|
68
|
-
*
|
|
69
|
-
* return (
|
|
70
|
-
* <div>
|
|
71
|
-
* <input value={query} onChange={(e) => setQuery(e.target.value)} />
|
|
72
|
-
* <button onClick={handleSearch} disabled={loading}>
|
|
73
|
-
* {loading ? 'Searching...' : 'Search'}
|
|
74
|
-
* </button>
|
|
75
|
-
* <button onClick={handleClear}>Clear</button>
|
|
76
|
-
* {error && <ErrorDisplay error={error} />}
|
|
77
|
-
* {data && <ResultsList results={data} />}
|
|
78
|
-
* </div>
|
|
79
|
-
* );
|
|
80
|
-
* }
|
|
81
|
-
* ```
|
|
82
|
-
*
|
|
83
|
-
* @example
|
|
84
|
-
* ```tsx
|
|
85
|
-
* function FormSubmission() {
|
|
86
|
-
* const { execute, loading, error, data } = useAsync(submitForm);
|
|
87
|
-
* const [formData, setFormData] = useState({ name: '', email: '' });
|
|
88
|
-
*
|
|
89
|
-
* const handleSubmit = async (e: React.FormEvent) => {
|
|
90
|
-
* e.preventDefault();
|
|
91
|
-
* const result = await execute(formData);
|
|
92
|
-
* if (result) {
|
|
93
|
-
* console.log('Form submitted successfully:', result);
|
|
94
|
-
* }
|
|
95
|
-
* };
|
|
96
|
-
*
|
|
97
|
-
* return (
|
|
98
|
-
* <form onSubmit={handleSubmit}>
|
|
99
|
-
* <input
|
|
100
|
-
* value={formData.name}
|
|
101
|
-
* onChange={(e) => setFormData({ ...formData, name: e.target.value })}
|
|
102
|
-
* />
|
|
103
|
-
* <input
|
|
104
|
-
* value={formData.email}
|
|
105
|
-
* onChange={(e) => setFormData({ ...formData, email: e.target.value })}
|
|
106
|
-
* />
|
|
107
|
-
* <button type="submit" disabled={loading}>
|
|
108
|
-
* {loading ? 'Submitting...' : 'Submit'}
|
|
109
|
-
* </button>
|
|
110
|
-
* {error && <div className="error">{error.message}</div>}
|
|
111
|
-
* {data && <div className="success">Success!</div>}
|
|
112
|
-
* </form>
|
|
113
|
-
* );
|
|
114
|
-
* }
|
|
115
|
-
* ```
|
|
116
|
-
*/
|
|
117
|
-
export declare function useAsync<T, Args extends unknown[] = unknown[]>(asyncFunction: (...args: Args) => Promise<T>): UseAsyncReturn<T, Args>;
|
|
118
|
-
/**
|
|
119
|
-
* Alternative version that immediately executes the async function on mount.
|
|
120
|
-
* Useful for fetching data when a component mounts.
|
|
121
|
-
*
|
|
122
|
-
* @template T - The return type of the async function
|
|
123
|
-
* @param asyncFunction - The async function to execute
|
|
124
|
-
* @returns Object containing loading, error, data, and refetch function
|
|
125
|
-
*
|
|
126
|
-
* @example
|
|
127
|
-
* ```tsx
|
|
128
|
-
* function Dashboard() {
|
|
129
|
-
* const { loading, error, data, refetch } = useAsyncImmediate(() =>
|
|
130
|
-
* fetchDashboardData()
|
|
131
|
-
* );
|
|
132
|
-
*
|
|
133
|
-
* if (loading) return <LoadingSpinner />;
|
|
134
|
-
* if (error) return <ErrorMessage error={error} onRetry={refetch} />;
|
|
135
|
-
*
|
|
136
|
-
* return (
|
|
137
|
-
* <div>
|
|
138
|
-
* <DashboardView data={data} />
|
|
139
|
-
* <button onClick={refetch}>Refresh</button>
|
|
140
|
-
* </div>
|
|
141
|
-
* );
|
|
142
|
-
* }
|
|
143
|
-
* ```
|
|
144
|
-
*/
|
|
145
|
-
export declare function useAsyncImmediate<T>(asyncFunction: () => Promise<T>): {
|
|
146
|
-
loading: boolean;
|
|
147
|
-
error: Error | null;
|
|
148
|
-
data: T | null;
|
|
149
|
-
refetch: () => Promise<void>;
|
|
150
|
-
};
|
|
151
|
-
//# sourceMappingURL=useAsync.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useAsync.d.ts","sourceRoot":"","sources":["../../../src/shared/hooks/useAsync.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,WAAW,cAAc,CAAC,CAAC,EAAE,IAAI,SAAS,OAAO,EAAE,GAAG,OAAO,EAAE;IACnE;;OAEG;IACH,OAAO,EAAE,CAAC,GAAG,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC;IAEnD;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB;;OAEG;IACH,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IAEpB;;OAEG;IACH,IAAI,EAAE,CAAC,GAAG,IAAI,CAAC;IAEf;;OAEG;IACH,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0FG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,IAAI,SAAS,OAAO,EAAE,GAAG,OAAO,EAAE,EAC5D,aAAa,EAAE,CAAC,GAAG,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,GAC3C,cAAc,CAAC,CAAC,EAAE,IAAI,CAAC,CAiCzB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG;IACrE,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,IAAI,EAAE,CAAC,GAAG,IAAI,CAAC;IACf,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9B,CAiBA"}
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Standard breakpoint values matching common design system breakpoints
|
|
3
|
-
*/
|
|
4
|
-
export declare const BREAKPOINTS: {
|
|
5
|
-
readonly xs: 480;
|
|
6
|
-
readonly sm: 640;
|
|
7
|
-
readonly md: 768;
|
|
8
|
-
readonly lg: 1024;
|
|
9
|
-
readonly xl: 1280;
|
|
10
|
-
readonly '2xl': 1536;
|
|
11
|
-
};
|
|
12
|
-
export type Breakpoint = keyof typeof BREAKPOINTS;
|
|
13
|
-
/**
|
|
14
|
-
* Hook to detect the current responsive breakpoint.
|
|
15
|
-
* Returns an object with boolean flags for each breakpoint.
|
|
16
|
-
*
|
|
17
|
-
* @param customBreakpoints - Optional custom breakpoint values
|
|
18
|
-
* @returns Object with boolean flags for each breakpoint
|
|
19
|
-
*
|
|
20
|
-
* @example
|
|
21
|
-
* ```tsx
|
|
22
|
-
* function ResponsiveLayout() {
|
|
23
|
-
* const { isMobile, isTablet, isDesktop } = useBreakpoint();
|
|
24
|
-
*
|
|
25
|
-
* if (isMobile) return <MobileLayout />;
|
|
26
|
-
* if (isTablet) return <TabletLayout />;
|
|
27
|
-
* return <DesktopLayout />;
|
|
28
|
-
* }
|
|
29
|
-
* ```
|
|
30
|
-
*
|
|
31
|
-
* @example
|
|
32
|
-
* ```tsx
|
|
33
|
-
* function Navigation() {
|
|
34
|
-
* const { xs, sm, md, lg, xl } = useBreakpoint();
|
|
35
|
-
*
|
|
36
|
-
* return (
|
|
37
|
-
* <nav>
|
|
38
|
-
* {(xs || sm) && <MobileNav />}
|
|
39
|
-
* {md && <TabletNav />}
|
|
40
|
-
* {(lg || xl) && <DesktopNav />}
|
|
41
|
-
* </nav>
|
|
42
|
-
* );
|
|
43
|
-
* }
|
|
44
|
-
* ```
|
|
45
|
-
*
|
|
46
|
-
* @example
|
|
47
|
-
* ```tsx
|
|
48
|
-
* // Using custom breakpoints
|
|
49
|
-
* function CustomBreakpoint() {
|
|
50
|
-
* const breakpoints = useBreakpoint({
|
|
51
|
-
* mobile: 375,
|
|
52
|
-
* tablet: 768,
|
|
53
|
-
* desktop: 1440
|
|
54
|
-
* });
|
|
55
|
-
*
|
|
56
|
-
* return <div>Current breakpoint data: {JSON.stringify(breakpoints)}</div>;
|
|
57
|
-
* }
|
|
58
|
-
* ```
|
|
59
|
-
*/
|
|
60
|
-
export declare function useBreakpoint<T extends Record<string, number> = typeof BREAKPOINTS>(customBreakpoints?: T): Record<keyof T, boolean> & {
|
|
61
|
-
isMobile: boolean;
|
|
62
|
-
isTablet: boolean;
|
|
63
|
-
isDesktop: boolean;
|
|
64
|
-
current: keyof T | 'base';
|
|
65
|
-
};
|
|
66
|
-
/**
|
|
67
|
-
* Simple hook to check if viewport is below a specific breakpoint (mobile-first approach).
|
|
68
|
-
*
|
|
69
|
-
* @param breakpoint - The breakpoint value in pixels (default: 768)
|
|
70
|
-
* @returns Whether the viewport is below the breakpoint
|
|
71
|
-
*
|
|
72
|
-
* @example
|
|
73
|
-
* ```tsx
|
|
74
|
-
* function Component() {
|
|
75
|
-
* const isMobile = useMobileBreakpoint();
|
|
76
|
-
* const isSmall = useMobileBreakpoint(640);
|
|
77
|
-
*
|
|
78
|
-
* return isMobile ? <MobileView /> : <DesktopView />;
|
|
79
|
-
* }
|
|
80
|
-
* ```
|
|
81
|
-
*/
|
|
82
|
-
export declare function useMobileBreakpoint(breakpoint?: number): boolean;
|
|
83
|
-
//# sourceMappingURL=useBreakpoint.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useBreakpoint.d.ts","sourceRoot":"","sources":["../../../src/shared/hooks/useBreakpoint.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,eAAO,MAAM,WAAW;;;;;;;CAOd,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,WAAW,CAAC;AAElD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,WAAW,EACjF,iBAAiB,CAAC,EAAE,CAAC,GACpB,MAAM,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,GAAG;IAC5B,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC,GAAG,MAAM,CAAC;CAC3B,CAgCA;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,GAAE,MAAY,GAAG,OAAO,CAErE"}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Provides clipboard copy functionality with automatic timeout for the "copied" state.
|
|
3
|
-
* Uses the modern Clipboard API for secure, asynchronous copying.
|
|
4
|
-
*
|
|
5
|
-
* @param timeout - Duration in milliseconds to keep the "copied" state true (default: 2000ms)
|
|
6
|
-
* @returns Object containing the copied state and copy function
|
|
7
|
-
*
|
|
8
|
-
* @example
|
|
9
|
-
* ```tsx
|
|
10
|
-
* function CodeBlock({ code }: { code: string }) {
|
|
11
|
-
* const { copied, copy } = useCopyToClipboard();
|
|
12
|
-
*
|
|
13
|
-
* return (
|
|
14
|
-
* <div>
|
|
15
|
-
* <pre>{code}</pre>
|
|
16
|
-
* <button onClick={() => copy(code)}>
|
|
17
|
-
* {copied ? 'Copied!' : 'Copy'}
|
|
18
|
-
* </button>
|
|
19
|
-
* </div>
|
|
20
|
-
* );
|
|
21
|
-
* }
|
|
22
|
-
* ```
|
|
23
|
-
*
|
|
24
|
-
* @example
|
|
25
|
-
* ```tsx
|
|
26
|
-
* function ShareLink({ url }: { url: string }) {
|
|
27
|
-
* const { copied, copy, error } = useCopyToClipboard(3000);
|
|
28
|
-
*
|
|
29
|
-
* return (
|
|
30
|
-
* <div>
|
|
31
|
-
* <input value={url} readOnly />
|
|
32
|
-
* <button onClick={() => copy(url)} disabled={copied}>
|
|
33
|
-
* {copied ? 'Link Copied!' : 'Copy Link'}
|
|
34
|
-
* </button>
|
|
35
|
-
* {error && <p className="error">Failed to copy: {error.message}</p>}
|
|
36
|
-
* </div>
|
|
37
|
-
* );
|
|
38
|
-
* }
|
|
39
|
-
* ```
|
|
40
|
-
*
|
|
41
|
-
* @example
|
|
42
|
-
* ```tsx
|
|
43
|
-
* function ApiKeyDisplay({ apiKey }: { apiKey: string }) {
|
|
44
|
-
* const { copied, copy } = useCopyToClipboard();
|
|
45
|
-
* const [showKey, setShowKey] = useState(false);
|
|
46
|
-
*
|
|
47
|
-
* const handleCopy = async () => {
|
|
48
|
-
* await copy(apiKey);
|
|
49
|
-
* // Additional actions after successful copy
|
|
50
|
-
* trackEvent('api_key_copied');
|
|
51
|
-
* };
|
|
52
|
-
*
|
|
53
|
-
* return (
|
|
54
|
-
* <div>
|
|
55
|
-
* <code>{showKey ? apiKey : '••••••••••••'}</code>
|
|
56
|
-
* <button onClick={() => setShowKey(!showKey)}>
|
|
57
|
-
* {showKey ? 'Hide' : 'Show'}
|
|
58
|
-
* </button>
|
|
59
|
-
* <button onClick={handleCopy}>
|
|
60
|
-
* {copied ? 'Copied!' : 'Copy Key'}
|
|
61
|
-
* </button>
|
|
62
|
-
* </div>
|
|
63
|
-
* );
|
|
64
|
-
* }
|
|
65
|
-
* ```
|
|
66
|
-
*/
|
|
67
|
-
export declare function useCopyToClipboard(timeout?: number): {
|
|
68
|
-
copied: boolean;
|
|
69
|
-
copy: (text: string) => Promise<void>;
|
|
70
|
-
error: Error | null;
|
|
71
|
-
};
|
|
72
|
-
//# sourceMappingURL=useCopyToClipboard.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useCopyToClipboard.d.ts","sourceRoot":"","sources":["../../../src/shared/hooks/useCopyToClipboard.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiEG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,GAAE,MAAa,GAAG;IAC1D,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACtC,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;CACrB,CAmCA"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Debounces a rapidly changing value, only updating after the specified delay
|
|
3
|
-
* has passed without the value changing.
|
|
4
|
-
*
|
|
5
|
-
* @template T - The type of the value being debounced
|
|
6
|
-
* @param value - The value to debounce
|
|
7
|
-
* @param delay - The delay in milliseconds (default: 300ms)
|
|
8
|
-
* @returns The debounced value
|
|
9
|
-
*
|
|
10
|
-
* @example
|
|
11
|
-
* ```tsx
|
|
12
|
-
* function SearchComponent() {
|
|
13
|
-
* const [search, setSearch] = useState('');
|
|
14
|
-
* const debouncedSearch = useDebounce(search, 500);
|
|
15
|
-
*
|
|
16
|
-
* useEffect(() => {
|
|
17
|
-
* // Only triggers 500ms after user stops typing
|
|
18
|
-
* fetchResults(debouncedSearch);
|
|
19
|
-
* }, [debouncedSearch]);
|
|
20
|
-
*
|
|
21
|
-
* return <input value={search} onChange={(e) => setSearch(e.target.value)} />;
|
|
22
|
-
* }
|
|
23
|
-
* ```
|
|
24
|
-
*/
|
|
25
|
-
export declare function useDebounce<T>(value: T, delay?: number): T;
|
|
26
|
-
//# sourceMappingURL=useDebounce.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useDebounce.d.ts","sourceRoot":"","sources":["../../../src/shared/hooks/useDebounce.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,GAAE,MAAY,GAAG,CAAC,CAgB/D"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Returns `true` if the current page has already played its entrance
|
|
3
|
-
* animation. Marks the page as animated after the first paint.
|
|
4
|
-
*
|
|
5
|
-
* Unlike a ref-based approach, this survives unmount/remount within
|
|
6
|
-
* the same route — so loading-state guards that unmount MotionPage
|
|
7
|
-
* won't cause re-animation when MotionPage remounts.
|
|
8
|
-
*/
|
|
9
|
-
export declare function useHasAnimated(): boolean;
|
|
10
|
-
//# sourceMappingURL=useHasAnimated.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useHasAnimated.d.ts","sourceRoot":"","sources":["../../../src/shared/hooks/useHasAnimated.ts"],"names":[],"mappings":"AAUA;;;;;;;GAOG;AACH,wBAAgB,cAAc,IAAI,OAAO,CAexC"}
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Detects when a specific key is pressed.
|
|
3
|
-
* Returns a boolean indicating whether the key is currently pressed.
|
|
4
|
-
*
|
|
5
|
-
* @param targetKey - The key to detect (e.g., 'Enter', 'Escape', 'a', 'ArrowUp')
|
|
6
|
-
* @returns Whether the target key is currently pressed
|
|
7
|
-
*
|
|
8
|
-
* @example
|
|
9
|
-
* ```tsx
|
|
10
|
-
* function SearchInput() {
|
|
11
|
-
* const [query, setQuery] = useState('');
|
|
12
|
-
* const enterPressed = useKeyPress('Enter');
|
|
13
|
-
*
|
|
14
|
-
* useEffect(() => {
|
|
15
|
-
* if (enterPressed) {
|
|
16
|
-
* performSearch(query);
|
|
17
|
-
* }
|
|
18
|
-
* }, [enterPressed]);
|
|
19
|
-
*
|
|
20
|
-
* return <input value={query} onChange={(e) => setQuery(e.target.value)} />;
|
|
21
|
-
* }
|
|
22
|
-
* ```
|
|
23
|
-
*
|
|
24
|
-
* @example
|
|
25
|
-
* ```tsx
|
|
26
|
-
* function Modal({ onClose }: { onClose: () => void }) {
|
|
27
|
-
* const escapePressed = useKeyPress('Escape');
|
|
28
|
-
*
|
|
29
|
-
* useEffect(() => {
|
|
30
|
-
* if (escapePressed) {
|
|
31
|
-
* onClose();
|
|
32
|
-
* }
|
|
33
|
-
* }, [escapePressed, onClose]);
|
|
34
|
-
*
|
|
35
|
-
* return <div>Modal content</div>;
|
|
36
|
-
* }
|
|
37
|
-
* ```
|
|
38
|
-
*
|
|
39
|
-
* @example
|
|
40
|
-
* ```tsx
|
|
41
|
-
* function Game() {
|
|
42
|
-
* const wPressed = useKeyPress('w');
|
|
43
|
-
* const aPressed = useKeyPress('a');
|
|
44
|
-
* const sPressed = useKeyPress('s');
|
|
45
|
-
* const dPressed = useKeyPress('d');
|
|
46
|
-
*
|
|
47
|
-
* return (
|
|
48
|
-
* <div>
|
|
49
|
-
* <p>W: {wPressed ? 'Pressed' : 'Released'}</p>
|
|
50
|
-
* <p>A: {aPressed ? 'Pressed' : 'Released'}</p>
|
|
51
|
-
* <p>S: {sPressed ? 'Pressed' : 'Released'}</p>
|
|
52
|
-
* <p>D: {dPressed ? 'Pressed' : 'Released'}</p>
|
|
53
|
-
* </div>
|
|
54
|
-
* );
|
|
55
|
-
* }
|
|
56
|
-
* ```
|
|
57
|
-
*/
|
|
58
|
-
export declare function useKeyPress(targetKey: string): boolean;
|
|
59
|
-
/**
|
|
60
|
-
* Detects keyboard shortcuts with modifier keys (Ctrl, Alt, Shift, Meta).
|
|
61
|
-
* Returns whether the shortcut combination is currently active.
|
|
62
|
-
*
|
|
63
|
-
* @param options - Configuration object for the keyboard shortcut
|
|
64
|
-
* @returns Whether the shortcut is currently active
|
|
65
|
-
*
|
|
66
|
-
* @example
|
|
67
|
-
* ```tsx
|
|
68
|
-
* function Editor() {
|
|
69
|
-
* const saveShortcut = useKeyboardShortcut({ key: 's', ctrlKey: true });
|
|
70
|
-
* const boldShortcut = useKeyboardShortcut({ key: 'b', metaKey: true });
|
|
71
|
-
*
|
|
72
|
-
* useEffect(() => {
|
|
73
|
-
* if (saveShortcut) {
|
|
74
|
-
* handleSave();
|
|
75
|
-
* }
|
|
76
|
-
* }, [saveShortcut]);
|
|
77
|
-
*
|
|
78
|
-
* useEffect(() => {
|
|
79
|
-
* if (boldShortcut) {
|
|
80
|
-
* toggleBold();
|
|
81
|
-
* }
|
|
82
|
-
* }, [boldShortcut]);
|
|
83
|
-
*
|
|
84
|
-
* return <textarea />;
|
|
85
|
-
* }
|
|
86
|
-
* ```
|
|
87
|
-
*
|
|
88
|
-
* @example
|
|
89
|
-
* ```tsx
|
|
90
|
-
* function CommandPalette() {
|
|
91
|
-
* const commandPalette = useKeyboardShortcut({
|
|
92
|
-
* key: 'k',
|
|
93
|
-
* ctrlKey: true,
|
|
94
|
-
* shiftKey: true
|
|
95
|
-
* });
|
|
96
|
-
*
|
|
97
|
-
* const [isOpen, setIsOpen] = useState(false);
|
|
98
|
-
*
|
|
99
|
-
* useEffect(() => {
|
|
100
|
-
* if (commandPalette) {
|
|
101
|
-
* setIsOpen(true);
|
|
102
|
-
* }
|
|
103
|
-
* }, [commandPalette]);
|
|
104
|
-
*
|
|
105
|
-
* return isOpen ? <CommandPaletteModal onClose={() => setIsOpen(false)} /> : null;
|
|
106
|
-
* }
|
|
107
|
-
* ```
|
|
108
|
-
*/
|
|
109
|
-
export declare function useKeyboardShortcut(options: {
|
|
110
|
-
key: string;
|
|
111
|
-
ctrlKey?: boolean;
|
|
112
|
-
altKey?: boolean;
|
|
113
|
-
shiftKey?: boolean;
|
|
114
|
-
metaKey?: boolean;
|
|
115
|
-
}): boolean;
|
|
116
|
-
//# sourceMappingURL=useKeyPress.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useKeyPress.d.ts","sourceRoot":"","sources":["../../../src/shared/hooks/useKeyPress.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AACH,wBAAgB,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CA8BtD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE;IAC3C,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,GAAG,OAAO,CA+BV"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Synchronizes state with localStorage, providing persistent storage across sessions.
|
|
3
|
-
* Automatically serializes/deserializes JSON values.
|
|
4
|
-
*
|
|
5
|
-
* @template T - The type of the stored value
|
|
6
|
-
* @param key - The localStorage key
|
|
7
|
-
* @param initialValue - The initial value if no stored value exists
|
|
8
|
-
* @returns A tuple containing [storedValue, setValue, removeValue]
|
|
9
|
-
*
|
|
10
|
-
* @example
|
|
11
|
-
* ```tsx
|
|
12
|
-
* function ThemeSelector() {
|
|
13
|
-
* const [theme, setTheme, resetTheme] = useLocalStorage('theme', 'light');
|
|
14
|
-
*
|
|
15
|
-
* return (
|
|
16
|
-
* <div>
|
|
17
|
-
* <button onClick={() => setTheme('dark')}>Dark</button>
|
|
18
|
-
* <button onClick={() => setTheme('light')}>Light</button>
|
|
19
|
-
* <button onClick={resetTheme}>Reset</button>
|
|
20
|
-
* </div>
|
|
21
|
-
* );
|
|
22
|
-
* }
|
|
23
|
-
* ```
|
|
24
|
-
*
|
|
25
|
-
* @example
|
|
26
|
-
* ```tsx
|
|
27
|
-
* function UserPreferences() {
|
|
28
|
-
* const [prefs, setPrefs] = useLocalStorage('preferences', {
|
|
29
|
-
* notifications: true,
|
|
30
|
-
* autoSave: false
|
|
31
|
-
* });
|
|
32
|
-
*
|
|
33
|
-
* // Update with function
|
|
34
|
-
* const toggleNotifications = () => {
|
|
35
|
-
* setPrefs(prev => ({ ...prev, notifications: !prev.notifications }));
|
|
36
|
-
* };
|
|
37
|
-
* }
|
|
38
|
-
* ```
|
|
39
|
-
*/
|
|
40
|
-
export declare function useLocalStorage<T>(key: string, initialValue: T): [T, (value: T | ((prev: T) => T)) => void, () => void];
|
|
41
|
-
//# sourceMappingURL=useLocalStorage.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useLocalStorage.d.ts","sourceRoot":"","sources":["../../../src/shared/hooks/useLocalStorage.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAC/B,GAAG,EAAE,MAAM,EACX,YAAY,EAAE,CAAC,GACd,CAAC,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,IAAI,EAAE,MAAM,IAAI,CAAC,CA0DxD"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Evaluates a CSS media query and returns whether it matches.
|
|
3
|
-
* Automatically updates when the match status changes.
|
|
4
|
-
*
|
|
5
|
-
* @param query - The media query string to evaluate
|
|
6
|
-
* @returns Whether the media query currently matches
|
|
7
|
-
*
|
|
8
|
-
* @example
|
|
9
|
-
* ```tsx
|
|
10
|
-
* function ResponsiveComponent() {
|
|
11
|
-
* const isMobile = useMediaQuery('(max-width: 768px)');
|
|
12
|
-
* const prefersDark = useMediaQuery('(prefers-color-scheme: dark)');
|
|
13
|
-
* const isLandscape = useMediaQuery('(orientation: landscape)');
|
|
14
|
-
* const prefersReducedMotion = useMediaQuery('(prefers-reduced-motion: reduce)');
|
|
15
|
-
*
|
|
16
|
-
* return (
|
|
17
|
-
* <div>
|
|
18
|
-
* {isMobile ? <MobileView /> : <DesktopView />}
|
|
19
|
-
* {prefersDark && <DarkModeStyles />}
|
|
20
|
-
* </div>
|
|
21
|
-
* );
|
|
22
|
-
* }
|
|
23
|
-
* ```
|
|
24
|
-
*
|
|
25
|
-
* @example
|
|
26
|
-
* ```tsx
|
|
27
|
-
* function PrintableDocument() {
|
|
28
|
-
* const isPrinting = useMediaQuery('print');
|
|
29
|
-
*
|
|
30
|
-
* return isPrinting ? <PrintLayout /> : <ScreenLayout />;
|
|
31
|
-
* }
|
|
32
|
-
* ```
|
|
33
|
-
*/
|
|
34
|
-
export declare function useMediaQuery(query: string): boolean;
|
|
35
|
-
//# sourceMappingURL=useMediaQuery.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useMediaQuery.d.ts","sourceRoot":"","sources":["../../../src/shared/hooks/useMediaQuery.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAsCpD"}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { RefObject } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* Detects clicks outside of a specified element and triggers a callback.
|
|
4
|
-
* Useful for closing dropdowns, modals, and popovers when clicking outside.
|
|
5
|
-
*
|
|
6
|
-
* @template T - The HTML element type (extends HTMLElement)
|
|
7
|
-
* @param callback - Function to call when a click outside is detected
|
|
8
|
-
* @returns A ref to attach to the element
|
|
9
|
-
*
|
|
10
|
-
* @example
|
|
11
|
-
* ```tsx
|
|
12
|
-
* function Dropdown() {
|
|
13
|
-
* const [isOpen, setIsOpen] = useState(false);
|
|
14
|
-
* const dropdownRef = useOnClickOutside<HTMLDivElement>(() => setIsOpen(false));
|
|
15
|
-
*
|
|
16
|
-
* return (
|
|
17
|
-
* <div ref={dropdownRef}>
|
|
18
|
-
* <button onClick={() => setIsOpen(!isOpen)}>Toggle</button>
|
|
19
|
-
* {isOpen && (
|
|
20
|
-
* <div className="dropdown-menu">
|
|
21
|
-
* <p>Dropdown content</p>
|
|
22
|
-
* </div>
|
|
23
|
-
* )}
|
|
24
|
-
* </div>
|
|
25
|
-
* );
|
|
26
|
-
* }
|
|
27
|
-
* ```
|
|
28
|
-
*
|
|
29
|
-
* @example
|
|
30
|
-
* ```tsx
|
|
31
|
-
* function Modal({ onClose }: { onClose: () => void }) {
|
|
32
|
-
* const modalRef = useOnClickOutside<HTMLDivElement>(onClose);
|
|
33
|
-
*
|
|
34
|
-
* return (
|
|
35
|
-
* <div className="modal-overlay">
|
|
36
|
-
* <div ref={modalRef} className="modal-content">
|
|
37
|
-
* <h2>Modal Title</h2>
|
|
38
|
-
* <p>Modal content</p>
|
|
39
|
-
* </div>
|
|
40
|
-
* </div>
|
|
41
|
-
* );
|
|
42
|
-
* }
|
|
43
|
-
* ```
|
|
44
|
-
*/
|
|
45
|
-
export declare function useOnClickOutside<T extends HTMLElement = HTMLElement>(callback: (event: MouseEvent | TouchEvent) => void): RefObject<T | null>;
|
|
46
|
-
/**
|
|
47
|
-
* Alternative version that accepts an existing ref instead of creating one.
|
|
48
|
-
* Useful when you need to attach the ref to multiple elements or use it elsewhere.
|
|
49
|
-
*
|
|
50
|
-
* @template T - The HTML element type (extends HTMLElement)
|
|
51
|
-
* @param ref - The ref object to monitor
|
|
52
|
-
* @param callback - Function to call when a click outside is detected
|
|
53
|
-
*
|
|
54
|
-
* @example
|
|
55
|
-
* ```tsx
|
|
56
|
-
* function Popover() {
|
|
57
|
-
* const [isOpen, setIsOpen] = useState(false);
|
|
58
|
-
* const popoverRef = useRef<HTMLDivElement>(null);
|
|
59
|
-
*
|
|
60
|
-
* useOnClickOutsideWithRef(popoverRef, () => setIsOpen(false));
|
|
61
|
-
*
|
|
62
|
-
* return (
|
|
63
|
-
* <div>
|
|
64
|
-
* <button onClick={() => setIsOpen(true)}>Open</button>
|
|
65
|
-
* {isOpen && (
|
|
66
|
-
* <div ref={popoverRef} className="popover">
|
|
67
|
-
* Content
|
|
68
|
-
* </div>
|
|
69
|
-
* )}
|
|
70
|
-
* </div>
|
|
71
|
-
* );
|
|
72
|
-
* }
|
|
73
|
-
* ```
|
|
74
|
-
*/
|
|
75
|
-
export declare function useOnClickOutsideWithRef<T extends HTMLElement = HTMLElement>(ref: RefObject<T>, callback: (event: MouseEvent | TouchEvent) => void): void;
|
|
76
|
-
//# sourceMappingURL=useOnClickOutside.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useOnClickOutside.d.ts","sourceRoot":"","sources":["../../../src/shared/hooks/useOnClickOutside.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAE1D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW,EACnE,QAAQ,EAAE,CAAC,KAAK,EAAE,UAAU,GAAG,UAAU,KAAK,IAAI,GACjD,SAAS,CAAC,CAAC,GAAG,IAAI,CAAC,CAuBrB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,wBAAwB,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW,EAC1E,GAAG,EAAE,SAAS,CAAC,CAAC,CAAC,EACjB,QAAQ,EAAE,CAAC,KAAK,EAAE,UAAU,GAAG,UAAU,KAAK,IAAI,GACjD,IAAI,CAgBN"}
|