@buoy-gg/core 1.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. package/README.md +43 -0
  2. package/lib/commonjs/floatingMenu/AppHost.js +410 -0
  3. package/lib/commonjs/floatingMenu/AppHostLogic.js +44 -0
  4. package/lib/commonjs/floatingMenu/DefaultConfigContext.js +45 -0
  5. package/lib/commonjs/floatingMenu/DevToolsSettingsModal.js +2274 -0
  6. package/lib/commonjs/floatingMenu/DevToolsVisibilityContext.js +49 -0
  7. package/lib/commonjs/floatingMenu/DraggableHeader.js +114 -0
  8. package/lib/commonjs/floatingMenu/FloatingDevTools.js +254 -0
  9. package/lib/commonjs/floatingMenu/FloatingMenu.js +364 -0
  10. package/lib/commonjs/floatingMenu/MinimizedToolsContext.js +247 -0
  11. package/lib/commonjs/floatingMenu/MinimizedToolsStack.js +206 -0
  12. package/lib/commonjs/floatingMenu/ToggleStateManager.js +36 -0
  13. package/lib/commonjs/floatingMenu/autoDiscoverPresets.js +241 -0
  14. package/lib/commonjs/floatingMenu/defaultConfig.js +160 -0
  15. package/lib/commonjs/floatingMenu/dial/DialDevTools.js +835 -0
  16. package/lib/commonjs/floatingMenu/dial/DialIcon.js +246 -0
  17. package/lib/commonjs/floatingMenu/dial/OnboardingTooltip.js +249 -0
  18. package/lib/commonjs/floatingMenu/dial/onboardingConstants.js +70 -0
  19. package/lib/commonjs/floatingMenu/floatingTools.js +771 -0
  20. package/lib/commonjs/floatingMenu/settingsBus.js +23 -0
  21. package/lib/commonjs/floatingMenu/types.js +5 -0
  22. package/lib/commonjs/index.js +240 -0
  23. package/lib/commonjs/package.json +1 -0
  24. package/lib/module/floatingMenu/AppHost.js +402 -0
  25. package/lib/module/floatingMenu/AppHostLogic.js +39 -0
  26. package/lib/module/floatingMenu/DefaultConfigContext.js +39 -0
  27. package/lib/module/floatingMenu/DevToolsSettingsModal.js +2273 -0
  28. package/lib/module/floatingMenu/DevToolsVisibilityContext.js +44 -0
  29. package/lib/module/floatingMenu/DraggableHeader.js +110 -0
  30. package/lib/module/floatingMenu/FloatingDevTools.js +249 -0
  31. package/lib/module/floatingMenu/FloatingMenu.js +358 -0
  32. package/lib/module/floatingMenu/MinimizedToolsContext.js +239 -0
  33. package/lib/module/floatingMenu/MinimizedToolsStack.js +202 -0
  34. package/lib/module/floatingMenu/ToggleStateManager.js +32 -0
  35. package/lib/module/floatingMenu/autoDiscoverPresets.js +236 -0
  36. package/lib/module/floatingMenu/defaultConfig.js +151 -0
  37. package/lib/module/floatingMenu/dial/DialDevTools.js +829 -0
  38. package/lib/module/floatingMenu/dial/DialIcon.js +241 -0
  39. package/lib/module/floatingMenu/dial/OnboardingTooltip.js +244 -0
  40. package/lib/module/floatingMenu/dial/onboardingConstants.js +64 -0
  41. package/lib/module/floatingMenu/floatingTools.js +767 -0
  42. package/lib/module/floatingMenu/settingsBus.js +19 -0
  43. package/lib/module/floatingMenu/types.js +3 -0
  44. package/lib/module/index.js +29 -0
  45. package/lib/module/package.json +1 -0
  46. package/lib/typescript/commonjs/floatingMenu/AppHost.d.ts +39 -0
  47. package/lib/typescript/commonjs/floatingMenu/AppHost.d.ts.map +1 -0
  48. package/lib/typescript/commonjs/floatingMenu/AppHostLogic.d.ts +37 -0
  49. package/lib/typescript/commonjs/floatingMenu/AppHostLogic.d.ts.map +1 -0
  50. package/lib/typescript/commonjs/floatingMenu/DefaultConfigContext.d.ts +27 -0
  51. package/lib/typescript/commonjs/floatingMenu/DefaultConfigContext.d.ts.map +1 -0
  52. package/lib/typescript/commonjs/floatingMenu/DevToolsSettingsModal.d.ts +57 -0
  53. package/lib/typescript/commonjs/floatingMenu/DevToolsSettingsModal.d.ts.map +1 -0
  54. package/lib/typescript/commonjs/floatingMenu/DevToolsVisibilityContext.d.ts +25 -0
  55. package/lib/typescript/commonjs/floatingMenu/DevToolsVisibilityContext.d.ts.map +1 -0
  56. package/lib/typescript/commonjs/floatingMenu/DraggableHeader.d.ts +30 -0
  57. package/lib/typescript/commonjs/floatingMenu/DraggableHeader.d.ts.map +1 -0
  58. package/lib/typescript/commonjs/floatingMenu/FloatingDevTools.d.ts +226 -0
  59. package/lib/typescript/commonjs/floatingMenu/FloatingDevTools.d.ts.map +1 -0
  60. package/lib/typescript/commonjs/floatingMenu/FloatingMenu.d.ts +39 -0
  61. package/lib/typescript/commonjs/floatingMenu/FloatingMenu.d.ts.map +1 -0
  62. package/lib/typescript/commonjs/floatingMenu/MinimizedToolsContext.d.ts +95 -0
  63. package/lib/typescript/commonjs/floatingMenu/MinimizedToolsContext.d.ts.map +1 -0
  64. package/lib/typescript/commonjs/floatingMenu/MinimizedToolsStack.d.ts +10 -0
  65. package/lib/typescript/commonjs/floatingMenu/MinimizedToolsStack.d.ts.map +1 -0
  66. package/lib/typescript/commonjs/floatingMenu/ToggleStateManager.d.ts +21 -0
  67. package/lib/typescript/commonjs/floatingMenu/ToggleStateManager.d.ts.map +1 -0
  68. package/lib/typescript/commonjs/floatingMenu/autoDiscoverPresets.d.ts +75 -0
  69. package/lib/typescript/commonjs/floatingMenu/autoDiscoverPresets.d.ts.map +1 -0
  70. package/lib/typescript/commonjs/floatingMenu/defaultConfig.d.ts +120 -0
  71. package/lib/typescript/commonjs/floatingMenu/defaultConfig.d.ts.map +1 -0
  72. package/lib/typescript/commonjs/floatingMenu/dial/DialDevTools.d.ts +35 -0
  73. package/lib/typescript/commonjs/floatingMenu/dial/DialDevTools.d.ts.map +1 -0
  74. package/lib/typescript/commonjs/floatingMenu/dial/DialIcon.d.ts +14 -0
  75. package/lib/typescript/commonjs/floatingMenu/dial/DialIcon.d.ts.map +1 -0
  76. package/lib/typescript/commonjs/floatingMenu/dial/OnboardingTooltip.d.ts +12 -0
  77. package/lib/typescript/commonjs/floatingMenu/dial/OnboardingTooltip.d.ts.map +1 -0
  78. package/lib/typescript/commonjs/floatingMenu/dial/onboardingConstants.d.ts +30 -0
  79. package/lib/typescript/commonjs/floatingMenu/dial/onboardingConstants.d.ts.map +1 -0
  80. package/lib/typescript/commonjs/floatingMenu/floatingTools.d.ts +56 -0
  81. package/lib/typescript/commonjs/floatingMenu/floatingTools.d.ts.map +1 -0
  82. package/lib/typescript/commonjs/floatingMenu/settingsBus.d.ts +10 -0
  83. package/lib/typescript/commonjs/floatingMenu/settingsBus.d.ts.map +1 -0
  84. package/lib/typescript/commonjs/floatingMenu/types.d.ts +56 -0
  85. package/lib/typescript/commonjs/floatingMenu/types.d.ts.map +1 -0
  86. package/lib/typescript/commonjs/index.d.ts +18 -0
  87. package/lib/typescript/commonjs/index.d.ts.map +1 -0
  88. package/lib/typescript/commonjs/package.json +1 -0
  89. package/lib/typescript/module/floatingMenu/AppHost.d.ts +39 -0
  90. package/lib/typescript/module/floatingMenu/AppHost.d.ts.map +1 -0
  91. package/lib/typescript/module/floatingMenu/AppHostLogic.d.ts +37 -0
  92. package/lib/typescript/module/floatingMenu/AppHostLogic.d.ts.map +1 -0
  93. package/lib/typescript/module/floatingMenu/DefaultConfigContext.d.ts +27 -0
  94. package/lib/typescript/module/floatingMenu/DefaultConfigContext.d.ts.map +1 -0
  95. package/lib/typescript/module/floatingMenu/DevToolsSettingsModal.d.ts +57 -0
  96. package/lib/typescript/module/floatingMenu/DevToolsSettingsModal.d.ts.map +1 -0
  97. package/lib/typescript/module/floatingMenu/DevToolsVisibilityContext.d.ts +25 -0
  98. package/lib/typescript/module/floatingMenu/DevToolsVisibilityContext.d.ts.map +1 -0
  99. package/lib/typescript/module/floatingMenu/DraggableHeader.d.ts +30 -0
  100. package/lib/typescript/module/floatingMenu/DraggableHeader.d.ts.map +1 -0
  101. package/lib/typescript/module/floatingMenu/FloatingDevTools.d.ts +226 -0
  102. package/lib/typescript/module/floatingMenu/FloatingDevTools.d.ts.map +1 -0
  103. package/lib/typescript/module/floatingMenu/FloatingMenu.d.ts +39 -0
  104. package/lib/typescript/module/floatingMenu/FloatingMenu.d.ts.map +1 -0
  105. package/lib/typescript/module/floatingMenu/MinimizedToolsContext.d.ts +95 -0
  106. package/lib/typescript/module/floatingMenu/MinimizedToolsContext.d.ts.map +1 -0
  107. package/lib/typescript/module/floatingMenu/MinimizedToolsStack.d.ts +10 -0
  108. package/lib/typescript/module/floatingMenu/MinimizedToolsStack.d.ts.map +1 -0
  109. package/lib/typescript/module/floatingMenu/ToggleStateManager.d.ts +21 -0
  110. package/lib/typescript/module/floatingMenu/ToggleStateManager.d.ts.map +1 -0
  111. package/lib/typescript/module/floatingMenu/autoDiscoverPresets.d.ts +75 -0
  112. package/lib/typescript/module/floatingMenu/autoDiscoverPresets.d.ts.map +1 -0
  113. package/lib/typescript/module/floatingMenu/defaultConfig.d.ts +120 -0
  114. package/lib/typescript/module/floatingMenu/defaultConfig.d.ts.map +1 -0
  115. package/lib/typescript/module/floatingMenu/dial/DialDevTools.d.ts +35 -0
  116. package/lib/typescript/module/floatingMenu/dial/DialDevTools.d.ts.map +1 -0
  117. package/lib/typescript/module/floatingMenu/dial/DialIcon.d.ts +14 -0
  118. package/lib/typescript/module/floatingMenu/dial/DialIcon.d.ts.map +1 -0
  119. package/lib/typescript/module/floatingMenu/dial/OnboardingTooltip.d.ts +12 -0
  120. package/lib/typescript/module/floatingMenu/dial/OnboardingTooltip.d.ts.map +1 -0
  121. package/lib/typescript/module/floatingMenu/dial/onboardingConstants.d.ts +30 -0
  122. package/lib/typescript/module/floatingMenu/dial/onboardingConstants.d.ts.map +1 -0
  123. package/lib/typescript/module/floatingMenu/floatingTools.d.ts +56 -0
  124. package/lib/typescript/module/floatingMenu/floatingTools.d.ts.map +1 -0
  125. package/lib/typescript/module/floatingMenu/settingsBus.d.ts +10 -0
  126. package/lib/typescript/module/floatingMenu/settingsBus.d.ts.map +1 -0
  127. package/lib/typescript/module/floatingMenu/types.d.ts +56 -0
  128. package/lib/typescript/module/floatingMenu/types.d.ts.map +1 -0
  129. package/lib/typescript/module/index.d.ts +18 -0
  130. package/lib/typescript/module/index.d.ts.map +1 -0
  131. package/lib/typescript/module/package.json +1 -0
  132. package/package.json +79 -0
@@ -0,0 +1,39 @@
1
+ import React, { ReactNode } from "react";
2
+ import { AppInstance } from "./AppHostLogic";
3
+ import { ModalRestoreState } from "./MinimizedToolsContext";
4
+ type AppHostContextValue = {
5
+ openApps: AppInstance[];
6
+ isAnyOpen: boolean;
7
+ open: (def: Omit<AppInstance, "instanceId">) => string;
8
+ close: (instanceId?: string) => void;
9
+ closeAll: () => void;
10
+ registerApps?: (apps: any[]) => void;
11
+ /** Minimize a tool - hides the modal but keeps state */
12
+ minimize: (instanceId: string) => void;
13
+ /** Restore a minimized tool to visible state, optionally with saved modal state */
14
+ restore: (instanceId: string, restoreState?: ModalRestoreState) => void;
15
+ /** Check if a specific tool is minimized */
16
+ isMinimized: (instanceId: string) => boolean;
17
+ };
18
+ /**
19
+ * Provides the floating dev tools application host. Tracks open tool instances, restores
20
+ * persisted state, and exposes imperative helpers used by `FloatingMenu` and friends.
21
+ */
22
+ export declare const AppHostProvider: ({ children }: {
23
+ children: ReactNode;
24
+ }) => React.JSX.Element;
25
+ /**
26
+ * Accessor hook for the dev tools app host. Components can open/close tools or inspect
27
+ * the active stack. Falls back to a no-op implementation when rendered outside the provider.
28
+ */
29
+ export declare const useAppHost: () => AppHostContextValue;
30
+ /**
31
+ * Renders all dev tool surfaces. Keeps minimized apps mounted but hidden
32
+ * so their state and listeners are preserved (similar to React Navigation screens).
33
+ *
34
+ * Supports multiple simultaneous modals - each modal gets a z-index based on
35
+ * its position in the stack (later opened modals appear on top).
36
+ */
37
+ export declare const AppOverlay: () => React.JSX.Element | null;
38
+ export {};
39
+ //# sourceMappingURL=AppHost.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AppHost.d.ts","sourceRoot":"","sources":["../../../../src/floatingMenu/AppHost.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAQZ,SAAS,EACV,MAAM,OAAO,CAAC;AAEf,OAAO,EACL,WAAW,EAIZ,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAEL,iBAAiB,EAClB,MAAM,yBAAyB,CAAC;AAGjC,KAAK,mBAAmB,GAAG;IACzB,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,SAAS,EAAE,OAAO,CAAC;IACnB,IAAI,EAAE,CAAC,GAAG,EAAE,IAAI,CAAC,WAAW,EAAE,YAAY,CAAC,KAAK,MAAM,CAAC;IACvD,KAAK,EAAE,CAAC,UAAU,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;IACrC,wDAAwD;IACxD,QAAQ,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,mFAAmF;IACnF,OAAO,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACxE,4CAA4C;IAC5C,WAAW,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC;CAC9C,CAAC;AAaF;;;GAGG;AACH,eAAO,MAAM,eAAe,GAAI,cAAc;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,sBA2NpE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,UAAU,2BAgBtB,CAAC;AAgGF;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,gCAgFtB,CAAC"}
@@ -0,0 +1,37 @@
1
+ import type { ComponentType, ReactNode } from "react";
2
+ import type { ModalRestoreState } from "./MinimizedToolsContext";
3
+ export type LaunchMode = "self-modal" | "host-modal" | "inline" | "toggle-only";
4
+ export type AppInstance = {
5
+ instanceId: string;
6
+ id: string;
7
+ title?: string;
8
+ component: ComponentType<any>;
9
+ props?: Record<string, unknown>;
10
+ launchMode: LaunchMode;
11
+ singleton?: boolean;
12
+ /** Whether this app instance is currently minimized */
13
+ minimized?: boolean;
14
+ /** Icon to display when minimized */
15
+ icon?: ReactNode;
16
+ /** Accent color for the tool */
17
+ color?: string;
18
+ /** Modal state to restore when un-minimizing */
19
+ restoreState?: ModalRestoreState;
20
+ };
21
+ export type OpenDefinition = Omit<AppInstance, "instanceId">;
22
+ /**
23
+ * Computes the new list of open tool instances when a user launches a dev app. Singleton
24
+ * tools reuse their existing instance while non-singletons create a new entry using the
25
+ * provided `generateId` helper.
26
+ *
27
+ * @param current - Current stack of open app instances.
28
+ * @param def - Descriptor of the tool to launch (without runtime instance id).
29
+ * @param generateId - Callback used to generate a unique instance identifier.
30
+ * @returns Updated instance list alongside the resolved instance id.
31
+ */
32
+ export declare const resolveOpenAppsState: (current: AppInstance[], def: OpenDefinition, generateId: () => string) => {
33
+ apps: AppInstance[];
34
+ instanceId: string;
35
+ wasMinimized: boolean;
36
+ };
37
+ //# sourceMappingURL=AppHostLogic.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AppHostLogic.d.ts","sourceRoot":"","sources":["../../../../src/floatingMenu/AppHostLogic.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAEjE,MAAM,MAAM,UAAU,GAAG,YAAY,GAAG,YAAY,GAAG,QAAQ,GAAG,aAAa,CAAC;AAEhF,MAAM,MAAM,WAAW,GAAG;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,aAAa,CAAC,GAAG,CAAC,CAAC;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,UAAU,EAAE,UAAU,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,uDAAuD;IACvD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,qCAAqC;IACrC,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,gCAAgC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gDAAgD;IAChD,YAAY,CAAC,EAAE,iBAAiB,CAAC;CAClC,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,WAAW,EAAE,YAAY,CAAC,CAAC;AAE7D;;;;;;;;;GASG;AACH,eAAO,MAAM,oBAAoB,GAC/B,SAAS,WAAW,EAAE,EACtB,KAAK,cAAc,EACnB,YAAY,MAAM,MAAM,KACvB;IAAE,IAAI,EAAE,WAAW,EAAE,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,OAAO,CAAA;CAuBlE,CAAC"}
@@ -0,0 +1,27 @@
1
+ import React, { ReactNode } from 'react';
2
+ import type { DefaultFloatingConfig, DefaultDialConfig } from './defaultConfig';
3
+ /**
4
+ * Context value for default configuration settings.
5
+ */
6
+ export interface DefaultConfigContextValue {
7
+ /** Default tools to enable in the floating bubble when no user settings exist. */
8
+ defaultFloatingTools?: DefaultFloatingConfig;
9
+ /** Default tools to enable in the dial menu when no user settings exist (max 6). */
10
+ defaultDialTools?: DefaultDialConfig;
11
+ }
12
+ /**
13
+ * Provider for default configuration that can be consumed by the settings system.
14
+ * This allows teams to set default tool configurations without prop drilling.
15
+ *
16
+ * @internal Used by FloatingDevTools to provide defaults to the settings hook.
17
+ */
18
+ export declare function DefaultConfigProvider({ children, defaultFloatingTools, defaultDialTools, }: DefaultConfigContextValue & {
19
+ children: ReactNode;
20
+ }): React.JSX.Element;
21
+ /**
22
+ * Hook to access the default configuration from context.
23
+ *
24
+ * @internal Used by useDevToolsSettings to apply defaults.
25
+ */
26
+ export declare function useDefaultConfig(): DefaultConfigContextValue;
27
+ //# sourceMappingURL=DefaultConfigContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DefaultConfigContext.d.ts","sourceRoot":"","sources":["../../../../src/floatingMenu/DefaultConfigContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAA6B,SAAS,EAAE,MAAM,OAAO,CAAC;AACpE,OAAO,KAAK,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEhF;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC,kFAAkF;IAClF,oBAAoB,CAAC,EAAE,qBAAqB,CAAC;IAC7C,oFAAoF;IACpF,gBAAgB,CAAC,EAAE,iBAAiB,CAAC;CACtC;AAID;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,QAAQ,EACR,oBAAoB,EACpB,gBAAgB,GACjB,EAAE,yBAAyB,GAAG;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,qBAcrD;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,IAAI,yBAAyB,CAE5D"}
@@ -0,0 +1,57 @@
1
+ import { FC } from "react";
2
+ /**
3
+ * Global settings that apply to all dev tools.
4
+ * These settings override individual tool configurations.
5
+ */
6
+ export interface GlobalDevToolsSettings {
7
+ /**
8
+ * When true, all modals share the same dimensions/position.
9
+ * When false (default), each modal has its own independent persistence.
10
+ * Priority: Settings UI > Prop override > Default (false)
11
+ */
12
+ enableSharedModalDimensions?: boolean;
13
+ }
14
+ /**
15
+ * Serialized preferences that power the floating dev tools UI. Values persist across sessions
16
+ * via AsyncStorage so teams can tailor which tools appear in the dial or floating row.
17
+ */
18
+ export interface DevToolsSettings {
19
+ /** Map of dial tool ids to enabled state (max slots enforced elsewhere). */
20
+ dialTools: Record<string, boolean>;
21
+ /** Map of floating tool ids to enabled state plus the environment indicator toggle. */
22
+ floatingTools: Record<string, boolean> & {
23
+ environment: boolean;
24
+ };
25
+ /** Global settings that apply to all dev tools */
26
+ globalSettings?: GlobalDevToolsSettings;
27
+ }
28
+ interface DevToolsSettingsModalProps {
29
+ visible: boolean;
30
+ onClose: () => void;
31
+ onSettingsChange?: (settings: DevToolsSettings) => void;
32
+ initialSettings?: DevToolsSettings;
33
+ availableApps?: {
34
+ id: string;
35
+ name: string;
36
+ description?: string;
37
+ slot?: "dial" | "row" | "both";
38
+ }[];
39
+ }
40
+ /**
41
+ * Configurable modal surface that lets engineers pick which dev tools appear in the dial and
42
+ * floating row. Persists preferences and enforces slot limits for a consistent UX.
43
+ */
44
+ export declare const DevToolsSettingsModal: FC<DevToolsSettingsModalProps>;
45
+ /**
46
+ * Convenience hook for accessing persisted dev tools settings. Subscribes to the internal
47
+ * event bus so all surfaces stay in sync when the modal saves new preferences.
48
+ *
49
+ * When no saved settings exist, the hook uses the default configuration from
50
+ * the DefaultConfigProvider (if available) to determine initial tool states.
51
+ */
52
+ export declare const useDevToolsSettings: () => {
53
+ settings: DevToolsSettings;
54
+ refreshSettings: () => void;
55
+ };
56
+ export {};
57
+ //# sourceMappingURL=DevToolsSettingsModal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DevToolsSettingsModal.d.ts","sourceRoot":"","sources":["../../../../src/floatingMenu/DevToolsSettingsModal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA6C,EAAE,EAAE,MAAM,OAAO,CAAC;AA8MtE;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACrC;;;;OAIG;IACH,2BAA2B,CAAC,EAAE,OAAO,CAAC;CACvC;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,4EAA4E;IAC5E,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,uFAAuF;IACvF,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;QACvC,WAAW,EAAE,OAAO,CAAC;KACtB,CAAC;IACF,kDAAkD;IAClD,cAAc,CAAC,EAAE,sBAAsB,CAAC;CACzC;AAED,UAAU,0BAA0B;IAClC,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,gBAAgB,KAAK,IAAI,CAAC;IACxD,eAAe,CAAC,EAAE,gBAAgB,CAAC;IACnC,aAAa,CAAC,EAAE;QACd,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,IAAI,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,MAAM,CAAC;KAChC,EAAE,CAAC;CACL;AAsDD;;;GAGG;AACH,eAAO,MAAM,qBAAqB,EAAE,EAAE,CAAC,0BAA0B,CAgrChE,CAAC;AAiDF;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB;;;CAuD/B,CAAC"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * DevToolsVisibilityContext
3
+ *
4
+ * Tracks when DevTools UI is visible (dial menu, modals, etc.)
5
+ * Used by other tools (like debug borders) to hide when DevTools are active
6
+ */
7
+ import { ReactNode } from "react";
8
+ interface DevToolsVisibilityContextValue {
9
+ /** True when dial menu is open */
10
+ isDialOpen: boolean;
11
+ /** True when any DevTools modal/tool is open */
12
+ isToolOpen: boolean;
13
+ /** True when either dial or any tool is open */
14
+ isDevToolsActive: boolean;
15
+ /** Set dial open state */
16
+ setDialOpen: (open: boolean) => void;
17
+ /** Set tool open state */
18
+ setToolOpen: (open: boolean) => void;
19
+ }
20
+ export declare function DevToolsVisibilityProvider({ children, }: {
21
+ children: ReactNode;
22
+ }): import("react").JSX.Element;
23
+ export declare function useDevToolsVisibility(): DevToolsVisibilityContextValue;
24
+ export {};
25
+ //# sourceMappingURL=DevToolsVisibilityContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DevToolsVisibilityContext.d.ts","sourceRoot":"","sources":["../../../../src/floatingMenu/DevToolsVisibilityContext.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAGL,SAAS,EAKV,MAAM,OAAO,CAAC;AAEf,UAAU,8BAA8B;IACtC,kCAAkC;IAClC,UAAU,EAAE,OAAO,CAAC;IACpB,gDAAgD;IAChD,UAAU,EAAE,OAAO,CAAC;IACpB,gDAAgD;IAChD,gBAAgB,EAAE,OAAO,CAAC;IAC1B,0BAA0B;IAC1B,WAAW,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACrC,0BAA0B;IAC1B,WAAW,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CACtC;AAKD,wBAAgB,0BAA0B,CAAC,EACzC,QAAQ,GACT,EAAE;IACD,QAAQ,EAAE,SAAS,CAAC;CACrB,+BAyBA;AAED,wBAAgB,qBAAqB,mCAapC"}
@@ -0,0 +1,30 @@
1
+ import { type ReactNode } from 'react';
2
+ import { Animated, type ViewStyle, type StyleProp } from 'react-native';
3
+ interface DraggableHeaderProps {
4
+ children: ReactNode;
5
+ position: Animated.ValueXY;
6
+ onDragStart?: () => void;
7
+ onDragEnd?: (finalPosition: {
8
+ x: number;
9
+ y: number;
10
+ }) => void;
11
+ onTap?: () => void;
12
+ containerBounds?: {
13
+ width: number;
14
+ height: number;
15
+ };
16
+ elementSize?: {
17
+ width: number;
18
+ height: number;
19
+ };
20
+ minPosition?: {
21
+ x: number;
22
+ y: number;
23
+ };
24
+ style?: StyleProp<ViewStyle>;
25
+ enabled?: boolean;
26
+ maxOverflowX?: number;
27
+ }
28
+ export declare const DraggableHeader: import("react").NamedExoticComponent<DraggableHeaderProps>;
29
+ export {};
30
+ //# sourceMappingURL=DraggableHeader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DraggableHeader.d.ts","sourceRoot":"","sources":["../../../../src/floatingMenu/DraggableHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAyB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC9D,OAAO,EAAsB,QAAQ,EAAc,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAExG,UAAU,oBAAoB;IAC5B,QAAQ,EAAE,SAAS,CAAC;IACpB,QAAQ,EAAE,QAAQ,CAAC,OAAO,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,SAAS,CAAC,EAAE,CAAC,aAAa,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IAC9D,KAAK,CAAC,EAAE,MAAM,IAAI,CAAC;IACnB,eAAe,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IACpD,WAAW,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAChD,WAAW,CAAC,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACvC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,eAAe,4DA4F1B,CAAC"}
@@ -0,0 +1,226 @@
1
+ import React from "react";
2
+ import { type FloatingMenuProps } from "./FloatingMenu";
3
+ import type { InstalledApp } from "./types";
4
+ import { type DefaultFloatingConfig, type DefaultDialConfig } from "./defaultConfig";
5
+ /**
6
+ * Environment variable configuration
7
+ *
8
+ * This type is compatible with RequiredEnvVar from @buoy-gg/env
9
+ *
10
+ * @example
11
+ * ```tsx
12
+ * // Simple string (just check existence)
13
+ * "API_URL"
14
+ *
15
+ * // Check for specific type
16
+ * { key: "DEBUG_MODE", expectedType: "boolean" }
17
+ *
18
+ * // Check for specific value
19
+ * { key: "ENVIRONMENT", expectedValue: "development" }
20
+ * ```
21
+ */
22
+ export type EnvVarConfig = string | {
23
+ key: string;
24
+ expectedValue: string;
25
+ description?: string;
26
+ } | {
27
+ key: string;
28
+ expectedType: "string" | "number" | "boolean" | "object" | "array" | "url";
29
+ description?: string;
30
+ };
31
+ /**
32
+ * Storage key configuration for monitoring
33
+ */
34
+ export interface StorageKeyConfig {
35
+ key: string;
36
+ expectedType?: "string" | "number" | "boolean" | "object";
37
+ expectedValue?: string;
38
+ description?: string;
39
+ storageType: "async" | "secure" | "mmkv";
40
+ }
41
+ /**
42
+ * Props for FloatingDevTools component.
43
+ * Apps prop is optional - if not provided, all installed dev tools are auto-discovered.
44
+ */
45
+ export interface FloatingDevToolsProps extends Omit<FloatingMenuProps, "apps"> {
46
+ /**
47
+ * Optional array of custom dev tool apps or overrides.
48
+ * Use this ONLY for custom tools or to override built-in tool behavior.
49
+ * Auto-discovered tools will be merged with these apps.
50
+ * Apps with matching IDs will override auto-discovered ones.
51
+ */
52
+ apps?: InstalledApp[];
53
+ /**
54
+ * Optional environment variables to validate.
55
+ * Just pass the array directly - no wrapper function needed!
56
+ *
57
+ * @example
58
+ * ```tsx
59
+ * <FloatingDevTools
60
+ * requiredEnvVars={[
61
+ * "API_URL", // Just check if exists
62
+ * { key: "DEBUG_MODE", expectedType: "boolean" },
63
+ * { key: "ENVIRONMENT", expectedValue: "development" },
64
+ * ]}
65
+ * />
66
+ * ```
67
+ */
68
+ requiredEnvVars?: EnvVarConfig[];
69
+ /**
70
+ * Optional storage keys to monitor.
71
+ * Just pass the array directly!
72
+ *
73
+ * @example
74
+ * ```tsx
75
+ * <FloatingDevTools
76
+ * requiredStorageKeys={[
77
+ * { key: "@app/session", expectedType: "string", storageType: "async" },
78
+ * ]}
79
+ * />
80
+ * ```
81
+ */
82
+ requiredStorageKeys?: StorageKeyConfig[];
83
+ /**
84
+ * Optional children to render within the DevToolsVisibilityProvider context.
85
+ * Useful for tools that need to react to DevTools visibility (like DebugBordersStandaloneOverlay).
86
+ *
87
+ * @example
88
+ * ```tsx
89
+ * <FloatingDevTools>
90
+ * <DebugBordersStandaloneOverlay />
91
+ * </FloatingDevTools>
92
+ * ```
93
+ */
94
+ children?: React.ReactNode;
95
+ /**
96
+ * Disable all onboarding hints and tooltips.
97
+ * Set to true if you don't want to show any first-time user hints.
98
+ *
99
+ * @default false
100
+ * @example
101
+ * ```tsx
102
+ * <FloatingDevTools disableHints />
103
+ * ```
104
+ */
105
+ disableHints?: boolean;
106
+ /**
107
+ * Default tools to enable in the floating bubble row when no user settings exist.
108
+ * Teams can use this to pre-configure which tools appear by default.
109
+ * User settings (once saved) will override these defaults.
110
+ *
111
+ * Type-safe: Only valid tool IDs are allowed with full autocomplete support.
112
+ *
113
+ * @example
114
+ * ```tsx
115
+ * <FloatingDevTools
116
+ * defaultFloatingTools={['env', 'environment', 'network', 'query-wifi-toggle']}
117
+ * />
118
+ * ```
119
+ */
120
+ defaultFloatingTools?: DefaultFloatingConfig;
121
+ /**
122
+ * Default tools to enable in the dial menu when no user settings exist.
123
+ * Teams can use this to pre-configure which tools appear by default.
124
+ * User settings (once saved) will override these defaults.
125
+ *
126
+ * Type-safe: Only valid tool IDs are allowed with full autocomplete support.
127
+ * Maximum 6 tools allowed - validation will throw a helpful error if exceeded.
128
+ *
129
+ * @example
130
+ * ```tsx
131
+ * <FloatingDevTools
132
+ * defaultDialTools={['env', 'network', 'storage', 'query', 'route-events', 'debug-borders']}
133
+ * />
134
+ * ```
135
+ */
136
+ defaultDialTools?: DefaultDialConfig;
137
+ /**
138
+ * List of environments available for switching.
139
+ * When provided along with onEnvironmentSwitch, the environment badge becomes
140
+ * interactive and allows users to switch between environments.
141
+ *
142
+ * @example
143
+ * ```tsx
144
+ * <FloatingDevTools
145
+ * environment="dev"
146
+ * availableEnvironments={['dev', 'qa', 'staging', 'prod']}
147
+ * onEnvironmentSwitch={(env) => {
148
+ * // Handle environment switch - update your app's environment
149
+ * setCurrentEnvironment(env);
150
+ * }}
151
+ * />
152
+ * ```
153
+ */
154
+ availableEnvironments?: import("@buoy-gg/shared-ui").Environment[];
155
+ /**
156
+ * Callback fired when the user selects an environment from the switcher.
157
+ * The app is responsible for actually switching environments and updating
158
+ * the `environment` prop - we just notify you of the user's selection.
159
+ *
160
+ * @example
161
+ * ```tsx
162
+ * onEnvironmentSwitch={(env) => {
163
+ * // Your logic here - e.g., update API base URL, clear caches, etc.
164
+ * console.log(`User wants to switch to ${env}`);
165
+ * setCurrentEnvironment(env);
166
+ * }}
167
+ * ```
168
+ */
169
+ onEnvironmentSwitch?: (environment: import("@buoy-gg/shared-ui").Environment) => void;
170
+ }
171
+ /**
172
+ * Unified floating development tools component with automatic preset discovery.
173
+ *
174
+ * This component combines AppHostProvider, FloatingMenu, and AppOverlay
175
+ * into a single component for simplified setup and better developer experience.
176
+ *
177
+ * **Zero-Config Usage:**
178
+ * ```tsx
179
+ * <FloatingDevTools environment="local" userRole="admin" />
180
+ * // All installed dev tools automatically appear!
181
+ * ```
182
+ *
183
+ * **With Team Default Configuration (Type-Safe!):**
184
+ * ```tsx
185
+ * // Set which tools are enabled by default for your team
186
+ * <FloatingDevTools
187
+ * // Floating bubble: ENV badge + WiFi toggle
188
+ * defaultFloatingTools={['env', 'environment', 'query-wifi-toggle']}
189
+ * // Dial menu: your team's 6 favorite tools (max 6!)
190
+ * defaultDialTools={['env', 'network', 'storage', 'query', 'route-events', 'debug-borders']}
191
+ * environment="local"
192
+ * userRole="admin"
193
+ * />
194
+ * ```
195
+ *
196
+ * **With Validation (Super Simple!):**
197
+ * ```tsx
198
+ * <FloatingDevTools
199
+ * requiredEnvVars={[
200
+ * "API_URL", // Just check existence
201
+ * { key: "DEBUG_MODE", expectedType: "boolean" },
202
+ * ]}
203
+ * requiredStorageKeys={[
204
+ * { key: "@app/session", storageType: "async" },
205
+ * ]}
206
+ * environment="local"
207
+ * userRole="admin"
208
+ * />
209
+ * ```
210
+ *
211
+ * **With Custom Tools:**
212
+ * ```tsx
213
+ * <FloatingDevTools
214
+ * apps={[myCustomTool]}
215
+ * environment="local"
216
+ * userRole="admin"
217
+ * />
218
+ * ```
219
+ *
220
+ * The component is absolutely positioned to float on top of your application
221
+ * regardless of where it's placed in the component tree.
222
+ *
223
+ * @param props - FloatingDevTools props
224
+ */
225
+ export declare const FloatingDevTools: ({ apps, requiredEnvVars, requiredStorageKeys, children, disableHints, defaultFloatingTools, defaultDialTools, ...props }: FloatingDevToolsProps) => React.JSX.Element;
226
+ //# sourceMappingURL=FloatingDevTools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FloatingDevTools.d.ts","sourceRoot":"","sources":["../../../../src/floatingMenu/FloatingDevTools.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqD,MAAM,OAAO,CAAC;AAG1E,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAMtE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAI5C,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EAEvB,MAAM,iBAAiB,CAAC;AAIzB;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,MAAM,YAAY,GACpB,MAAM,GACN;IACE,GAAG,EAAE,MAAM,CAAC;IACZ,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,GACD;IACE,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,EACR,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,QAAQ,GACR,OAAO,GACP,KAAK,CAAC;IACV,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEN;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,CAAC;IAC1D,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;CAC1C;AAED;;;GAGG;AACH,MAAM,WAAW,qBAAsB,SAAQ,IAAI,CAAC,iBAAiB,EAAE,MAAM,CAAC;IAC5E;;;;;OAKG;IACH,IAAI,CAAC,EAAE,YAAY,EAAE,CAAC;IAEtB;;;;;;;;;;;;;;OAcG;IACH,eAAe,CAAC,EAAE,YAAY,EAAE,CAAC;IAEjC;;;;;;;;;;;;OAYG;IACH,mBAAmB,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAEzC;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE3B;;;;;;;;;OASG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB;;;;;;;;;;;;;OAaG;IACH,oBAAoB,CAAC,EAAE,qBAAqB,CAAC;IAE7C;;;;;;;;;;;;;;OAcG;IACH,gBAAgB,CAAC,EAAE,iBAAiB,CAAC;IAErC;;;;;;;;;;;;;;;;OAgBG;IACH,qBAAqB,CAAC,EAAE,OAAO,oBAAoB,EAAE,WAAW,EAAE,CAAC;IAEnE;;;;;;;;;;;;;OAaG;IACH,mBAAmB,CAAC,EAAE,CAAC,WAAW,EAAE,OAAO,oBAAoB,EAAE,WAAW,KAAK,IAAI,CAAC;CAEvF;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,eAAO,MAAM,gBAAgB,GAAI,0HAS9B,qBAAqB,sBAuIvB,CAAC"}
@@ -0,0 +1,39 @@
1
+ import { FC } from "react";
2
+ import { UserRole } from "./floatingTools";
3
+ import type { InstalledApp, FloatingMenuActions, FloatingMenuState } from "./types";
4
+ import type { DefaultFloatingConfig, DefaultDialConfig } from "./defaultConfig";
5
+ import type { Environment } from "@buoy-gg/shared-ui";
6
+ /**
7
+ * Props for the floating developer tools launcher. Controls which apps are shown and
8
+ * how the menu integrates with the current host environment.
9
+ */
10
+ export interface FloatingMenuProps {
11
+ /** Dev tool apps that can be opened from the floating menu. */
12
+ apps: InstalledApp[];
13
+ /** Shared state object passed to app renderers (e.g. icons) and the dial. */
14
+ state?: FloatingMenuState;
15
+ /** Shared action callbacks exposed to app renderers for interacting with the menu. */
16
+ actions?: FloatingMenuActions;
17
+ /** When true, hides the floating row (used when another dev app takes focus). */
18
+ hidden?: boolean;
19
+ /** Active environment metadata displayed via the environment indicator, if enabled. */
20
+ environment?: Environment;
21
+ /** Optional role that determines which user status badge is rendered. */
22
+ userRole?: UserRole;
23
+ /** Default tools to enable in the floating bubble when no user settings exist. */
24
+ defaultFloatingTools?: DefaultFloatingConfig;
25
+ /** Default tools to enable in the dial menu when no user settings exist (max 6). */
26
+ defaultDialTools?: DefaultDialConfig;
27
+ /**
28
+ * List of environments available for switching.
29
+ * When provided along with onEnvironmentSwitch, the environment badge becomes interactive.
30
+ */
31
+ availableEnvironments?: Environment[];
32
+ /**
33
+ * Callback fired when the user selects an environment from the switcher.
34
+ * The app is responsible for actually switching environments and updating the `environment` prop.
35
+ */
36
+ onEnvironmentSwitch?: (environment: Environment) => void;
37
+ }
38
+ export declare const FloatingMenu: FC<FloatingMenuProps>;
39
+ //# sourceMappingURL=FloatingMenu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FloatingMenu.d.ts","sourceRoot":"","sources":["../../../../src/floatingMenu/FloatingMenu.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAqD,MAAM,OAAO,CAAC;AASrF,OAAO,EAAiB,QAAQ,EAAc,MAAM,iBAAiB,CAAC;AACtE,OAAO,KAAK,EACV,YAAY,EACZ,mBAAmB,EACnB,iBAAiB,EAClB,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEhF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAetD;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,+DAA+D;IAC/D,IAAI,EAAE,YAAY,EAAE,CAAC;IACrB,6EAA6E;IAC7E,KAAK,CAAC,EAAE,iBAAiB,CAAC;IAC1B,sFAAsF;IACtF,OAAO,CAAC,EAAE,mBAAmB,CAAC;IAC9B,iFAAiF;IACjF,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,uFAAuF;IACvF,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,yEAAyE;IACzE,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,kFAAkF;IAClF,oBAAoB,CAAC,EAAE,qBAAqB,CAAC;IAC7C,oFAAoF;IACpF,gBAAgB,CAAC,EAAE,iBAAiB,CAAC;IACrC;;;OAGG;IACH,qBAAqB,CAAC,EAAE,WAAW,EAAE,CAAC;IACtC;;;OAGG;IACH,mBAAmB,CAAC,EAAE,CAAC,WAAW,EAAE,WAAW,KAAK,IAAI,CAAC;CAC1D;AAYD,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CAoU9C,CAAC"}
@@ -0,0 +1,95 @@
1
+ import React, { ReactNode } from "react";
2
+ /**
3
+ * Modal state to restore when reopening a minimized tool
4
+ */
5
+ export interface ModalRestoreState {
6
+ /** Modal display mode */
7
+ mode: "bottomSheet" | "floating";
8
+ /** Panel height for bottom sheet mode */
9
+ panelHeight?: number;
10
+ /** Position for floating mode */
11
+ floatingPosition?: {
12
+ x: number;
13
+ y: number;
14
+ };
15
+ /** Dimensions for floating mode */
16
+ floatingDimensions?: {
17
+ width: number;
18
+ height: number;
19
+ };
20
+ }
21
+ /**
22
+ * Represents a minimized tool that can be restored
23
+ */
24
+ export interface MinimizedTool {
25
+ /** Unique instance ID for this minimized tool */
26
+ instanceId: string;
27
+ /** Tool identifier (e.g., "storage", "network") */
28
+ id: string;
29
+ /** Display name for the tool */
30
+ title: string;
31
+ /** Icon component or element to display in the minimized stack */
32
+ icon: ReactNode;
33
+ /** Accent color for the tool */
34
+ color?: string;
35
+ /** Timestamp when the tool was minimized */
36
+ minimizedAt: number;
37
+ /** Modal state to restore when reopening */
38
+ modalState?: ModalRestoreState;
39
+ }
40
+ /**
41
+ * Position for a minimized tool icon in the stack
42
+ */
43
+ export interface IconPosition {
44
+ x: number;
45
+ y: number;
46
+ }
47
+ /**
48
+ * Calculate the position of a minimized tool icon in the stack
49
+ * Icons stack upward from bottom-right corner
50
+ */
51
+ export declare function getIconPosition(index: number): IconPosition;
52
+ /**
53
+ * Get the icon size constant
54
+ */
55
+ export declare function getIconSize(): number;
56
+ /**
57
+ * Context value for minimized tools management
58
+ */
59
+ interface MinimizedToolsContextValue {
60
+ /** List of currently minimized tools */
61
+ minimizedTools: MinimizedTool[];
62
+ /** Minimize a tool - removes from open apps and adds to minimized stack */
63
+ minimize: (tool: Omit<MinimizedTool, "minimizedAt">) => void;
64
+ /** Restore a minimized tool - removes from stack and triggers reopen */
65
+ restore: (instanceId: string) => MinimizedTool | null;
66
+ /** Check if a tool is currently minimized */
67
+ isMinimized: (id: string) => boolean;
68
+ /** Get a minimized tool by its instance ID */
69
+ getMinimizedTool: (instanceId: string) => MinimizedTool | undefined;
70
+ /** Clear all minimized tools */
71
+ clearAll: () => void;
72
+ /** Number of minimized tools */
73
+ count: number;
74
+ /** Get the target position for a new minimized icon (for animation) */
75
+ getNextIconPosition: () => IconPosition;
76
+ /** Get position of an existing minimized tool's icon */
77
+ getToolIconPosition: (instanceId: string) => IconPosition | null;
78
+ }
79
+ interface MinimizedToolsProviderProps {
80
+ children: ReactNode;
81
+ /** Callback to get icon for a tool by its id (used for restoration from storage) */
82
+ getToolIcon?: (id: string) => ReactNode;
83
+ }
84
+ /**
85
+ * Provider component for minimized tools management.
86
+ * Handles state, persistence, and provides context to children.
87
+ */
88
+ export declare function MinimizedToolsProvider({ children, getToolIcon, }: MinimizedToolsProviderProps): React.JSX.Element;
89
+ /**
90
+ * Hook to access minimized tools context.
91
+ * Must be used within a MinimizedToolsProvider.
92
+ */
93
+ export declare function useMinimizedTools(): MinimizedToolsContextValue;
94
+ export {};
95
+ //# sourceMappingURL=MinimizedToolsContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MinimizedToolsContext.d.ts","sourceRoot":"","sources":["../../../../src/floatingMenu/MinimizedToolsContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAOZ,SAAS,EAEV,MAAM,OAAO,CAAC;AAQf;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,yBAAyB;IACzB,IAAI,EAAE,aAAa,GAAG,UAAU,CAAC;IACjC,yCAAyC;IACzC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iCAAiC;IACjC,gBAAgB,CAAC,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC5C,mCAAmC;IACnC,kBAAkB,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;CACxD;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,iDAAiD;IACjD,UAAU,EAAE,MAAM,CAAC;IACnB,mDAAmD;IACnD,EAAE,EAAE,MAAM,CAAC;IACX,gCAAgC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,kEAAkE;IAClE,IAAI,EAAE,SAAS,CAAC;IAChB,gCAAgC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4CAA4C;IAC5C,WAAW,EAAE,MAAM,CAAC;IACpB,4CAA4C;IAC5C,UAAU,CAAC,EAAE,iBAAiB,CAAC;CAChC;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAWD;;;GAGG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,YAAY,CAY3D;AAED;;GAEG;AACH,wBAAgB,WAAW,IAAI,MAAM,CAEpC;AAED;;GAEG;AACH,UAAU,0BAA0B;IAClC,wCAAwC;IACxC,cAAc,EAAE,aAAa,EAAE,CAAC;IAChC,2EAA2E;IAC3E,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,aAAa,EAAE,aAAa,CAAC,KAAK,IAAI,CAAC;IAC7D,wEAAwE;IACxE,OAAO,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,aAAa,GAAG,IAAI,CAAC;IACtD,6CAA6C;IAC7C,WAAW,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC;IACrC,8CAA8C;IAC9C,gBAAgB,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,aAAa,GAAG,SAAS,CAAC;IACpE,gCAAgC;IAChC,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,gCAAgC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,uEAAuE;IACvE,mBAAmB,EAAE,MAAM,YAAY,CAAC;IACxC,wDAAwD;IACxD,mBAAmB,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,YAAY,GAAG,IAAI,CAAC;CAClE;AAkCD,UAAU,2BAA2B;IACnC,QAAQ,EAAE,SAAS,CAAC;IACpB,oFAAoF;IACpF,WAAW,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,SAAS,CAAC;CACzC;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,EACrC,QAAQ,EACR,WAAW,GACZ,EAAE,2BAA2B,qBAwJ7B;AAMD;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,0BAA0B,CAmB9D"}
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ import { MinimizedTool } from "./MinimizedToolsContext";
3
+ export interface MinimizedToolsStackProps {
4
+ /** Callback when a tool should be restored */
5
+ onRestore?: (tool: MinimizedTool) => void;
6
+ /** Width of the parent container (for matching widths) */
7
+ containerWidth?: number;
8
+ }
9
+ export declare function MinimizedToolsStack({ onRestore, containerWidth, }: MinimizedToolsStackProps): React.JSX.Element;
10
+ //# sourceMappingURL=MinimizedToolsStack.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MinimizedToolsStack.d.ts","sourceRoot":"","sources":["../../../../src/floatingMenu/MinimizedToolsStack.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAS9D,OAAO,EAAqB,aAAa,EAAE,MAAM,yBAAyB,CAAC;AA+K3E,MAAM,WAAW,wBAAwB;IACvC,8CAA8C;IAC9C,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;IAC1C,0DAA0D;IAC1D,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAMD,wBAAgB,mBAAmB,CAAC,EAClC,SAAS,EACT,cAA8B,GAC/B,EAAE,wBAAwB,qBA8C1B"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * ToggleStateManager
3
+ *
4
+ * Global event emitter for toggle-only dev tools to notify when their state changes.
5
+ * This allows FloatingMenu to re-render and update icon colors.
6
+ */
7
+ type Listener = () => void;
8
+ declare class ToggleStateManager {
9
+ private listeners;
10
+ /**
11
+ * Subscribe to any toggle state change
12
+ */
13
+ subscribe(listener: Listener): () => void;
14
+ /**
15
+ * Notify all subscribers that a toggle state changed
16
+ */
17
+ notify(): void;
18
+ }
19
+ export declare const toggleStateManager: ToggleStateManager;
20
+ export {};
21
+ //# sourceMappingURL=ToggleStateManager.d.ts.map