@buoy-gg/core 7.0.16 → 7.0.18
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/lib/commonjs/floatingMenu/AppHost.js +23 -3
- package/lib/commonjs/floatingMenu/AppHost.web.js +6 -1
- package/lib/commonjs/floatingMenu/AppIcon.js +91 -0
- package/lib/commonjs/floatingMenu/FloatingDevTools.js +15 -9
- package/lib/commonjs/floatingMenu/FloatingMenu.js +14 -7
- package/lib/commonjs/floatingMenu/ToolHost.js +274 -0
- package/lib/commonjs/floatingMenu/allToolsRegistry.js +7 -0
- package/lib/commonjs/floatingMenu/autoDiscoverPresets.js +16 -0
- package/lib/commonjs/floatingMenu/autoExternalSync.js +21 -2
- package/lib/commonjs/floatingMenu/dial/DialDevTools.js +15 -7
- package/lib/commonjs/index.js +27 -0
- package/lib/commonjs/toolkit.js +584 -0
- package/lib/commonjs/toolkitComponents.js +241 -0
- package/lib/module/floatingMenu/AppHost.js +23 -3
- package/lib/module/floatingMenu/AppHost.web.js +6 -1
- package/lib/module/floatingMenu/AppIcon.js +84 -0
- package/lib/module/floatingMenu/FloatingDevTools.js +15 -9
- package/lib/module/floatingMenu/FloatingMenu.js +14 -7
- package/lib/module/floatingMenu/ToolHost.js +266 -0
- package/lib/module/floatingMenu/allToolsRegistry.js +8 -1
- package/lib/module/floatingMenu/autoDiscoverPresets.js +16 -0
- package/lib/module/floatingMenu/autoExternalSync.js +21 -2
- package/lib/module/floatingMenu/dial/DialDevTools.js +15 -7
- package/lib/module/index.js +6 -0
- package/lib/module/toolkit.js +62 -0
- package/lib/module/toolkitComponents.js +230 -0
- package/lib/typescript/commonjs/floatingMenu/AppHost.d.ts.map +1 -1
- package/lib/typescript/commonjs/floatingMenu/AppHost.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/floatingMenu/AppHostLogic.d.ts +3 -0
- package/lib/typescript/commonjs/floatingMenu/AppHostLogic.d.ts.map +1 -1
- package/lib/typescript/commonjs/floatingMenu/AppIcon.d.ts +30 -0
- package/lib/typescript/commonjs/floatingMenu/AppIcon.d.ts.map +1 -0
- package/lib/typescript/commonjs/floatingMenu/FloatingDevTools.d.ts.map +1 -1
- package/lib/typescript/commonjs/floatingMenu/FloatingMenu.d.ts.map +1 -1
- package/lib/typescript/commonjs/floatingMenu/ToolHost.d.ts +77 -0
- package/lib/typescript/commonjs/floatingMenu/ToolHost.d.ts.map +1 -0
- package/lib/typescript/commonjs/floatingMenu/allToolsRegistry.d.ts.map +1 -1
- package/lib/typescript/commonjs/floatingMenu/autoDiscoverPresets.d.ts.map +1 -1
- package/lib/typescript/commonjs/floatingMenu/autoExternalSync.d.ts +8 -1
- package/lib/typescript/commonjs/floatingMenu/autoExternalSync.d.ts.map +1 -1
- package/lib/typescript/commonjs/floatingMenu/defaultConfig.d.ts +1 -1
- package/lib/typescript/commonjs/floatingMenu/defaultConfig.d.ts.map +1 -1
- package/lib/typescript/commonjs/floatingMenu/dial/DialDevTools.d.ts.map +1 -1
- package/lib/typescript/commonjs/floatingMenu/types.d.ts +62 -2
- package/lib/typescript/commonjs/floatingMenu/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +2 -0
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/toolkit.d.ts +31 -0
- package/lib/typescript/commonjs/toolkit.d.ts.map +1 -0
- package/lib/typescript/commonjs/toolkitComponents.d.ts +61 -0
- package/lib/typescript/commonjs/toolkitComponents.d.ts.map +1 -0
- package/lib/typescript/module/floatingMenu/AppHost.d.ts.map +1 -1
- package/lib/typescript/module/floatingMenu/AppHost.web.d.ts.map +1 -1
- package/lib/typescript/module/floatingMenu/AppHostLogic.d.ts +3 -0
- package/lib/typescript/module/floatingMenu/AppHostLogic.d.ts.map +1 -1
- package/lib/typescript/module/floatingMenu/AppIcon.d.ts +30 -0
- package/lib/typescript/module/floatingMenu/AppIcon.d.ts.map +1 -0
- package/lib/typescript/module/floatingMenu/FloatingDevTools.d.ts.map +1 -1
- package/lib/typescript/module/floatingMenu/FloatingMenu.d.ts.map +1 -1
- package/lib/typescript/module/floatingMenu/ToolHost.d.ts +77 -0
- package/lib/typescript/module/floatingMenu/ToolHost.d.ts.map +1 -0
- package/lib/typescript/module/floatingMenu/allToolsRegistry.d.ts.map +1 -1
- package/lib/typescript/module/floatingMenu/autoDiscoverPresets.d.ts.map +1 -1
- package/lib/typescript/module/floatingMenu/autoExternalSync.d.ts +8 -1
- package/lib/typescript/module/floatingMenu/autoExternalSync.d.ts.map +1 -1
- package/lib/typescript/module/floatingMenu/defaultConfig.d.ts +1 -1
- package/lib/typescript/module/floatingMenu/defaultConfig.d.ts.map +1 -1
- package/lib/typescript/module/floatingMenu/dial/DialDevTools.d.ts.map +1 -1
- package/lib/typescript/module/floatingMenu/types.d.ts +62 -2
- package/lib/typescript/module/floatingMenu/types.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +2 -0
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/toolkit.d.ts +31 -0
- package/lib/typescript/module/toolkit.d.ts.map +1 -0
- package/lib/typescript/module/toolkitComponents.d.ts +61 -0
- package/lib/typescript/module/toolkitComponents.d.ts.map +1 -0
- package/package.json +19 -5
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Facade primitives for the public custom-tools toolkit (see toolkit.ts).
|
|
3
|
+
*
|
|
4
|
+
* shared-ui grew several overlapping treatments of the same jobs (seven badge
|
|
5
|
+
* variants, four copy buttons, two diff viewers...). The public surface merges
|
|
6
|
+
* each job into ONE component with variants, implemented here on toolTheme —
|
|
7
|
+
* shared-ui's internals stay unchanged for first-party tools.
|
|
8
|
+
*/
|
|
9
|
+
import React, { type ReactNode } from "react";
|
|
10
|
+
import { type StyleProp, type ViewStyle } from "react-native";
|
|
11
|
+
/** Map a status word ("success", "pending", "stale"...) to a semantic color. */
|
|
12
|
+
export declare function statusColor(status: string): string;
|
|
13
|
+
/** Map an HTTP method to its conventional color. */
|
|
14
|
+
export declare function methodColor(method: string): string;
|
|
15
|
+
/** Map a JS value-type name to its display color. */
|
|
16
|
+
export declare function typeColor(type: string): string;
|
|
17
|
+
export interface BadgeProps {
|
|
18
|
+
children: ReactNode;
|
|
19
|
+
/** Text/border tint — pair with statusColor()/methodColor()/typeColor(). */
|
|
20
|
+
color?: string;
|
|
21
|
+
/** Optional leading icon (size it ~1× the font size). */
|
|
22
|
+
icon?: ReactNode;
|
|
23
|
+
size?: "small" | "medium";
|
|
24
|
+
/** Fully-rounded capsule (counts, tags) instead of the rounded rect. */
|
|
25
|
+
pill?: boolean;
|
|
26
|
+
/** Monospace label (keys, paths, hashes). */
|
|
27
|
+
mono?: boolean;
|
|
28
|
+
style?: StyleProp<ViewStyle>;
|
|
29
|
+
}
|
|
30
|
+
export declare function Badge({ children, color, icon, size, pill, mono, style, }: BadgeProps): React.JSX.Element;
|
|
31
|
+
export interface StatusDotProps {
|
|
32
|
+
/** Status word mapped via statusColor(). */
|
|
33
|
+
status?: string;
|
|
34
|
+
/** Explicit color override. */
|
|
35
|
+
color?: string;
|
|
36
|
+
size?: number;
|
|
37
|
+
style?: StyleProp<ViewStyle>;
|
|
38
|
+
}
|
|
39
|
+
export declare function StatusDot({ status, color, size, style }: StatusDotProps): React.JSX.Element;
|
|
40
|
+
export interface InfoRowProps {
|
|
41
|
+
label: string;
|
|
42
|
+
value?: string | number | ReactNode;
|
|
43
|
+
/** Show a small copy button for the value. */
|
|
44
|
+
copyable?: boolean;
|
|
45
|
+
style?: StyleProp<ViewStyle>;
|
|
46
|
+
}
|
|
47
|
+
export declare function InfoRow({ label, value, copyable, style }: InfoRowProps): React.JSX.Element;
|
|
48
|
+
export interface DiffViewerProps {
|
|
49
|
+
oldValue: unknown;
|
|
50
|
+
newValue: unknown;
|
|
51
|
+
/** "tree" (default) diffs object structure; "text" is a side-by-side line diff. */
|
|
52
|
+
mode?: "tree" | "text";
|
|
53
|
+
/** tree mode: include unchanged keys. */
|
|
54
|
+
showUnchanged?: boolean;
|
|
55
|
+
/** tree mode: let the tree scroll itself (off when a parent scrolls). */
|
|
56
|
+
scrollEnabled?: boolean;
|
|
57
|
+
/** text mode: viewer height. */
|
|
58
|
+
height?: number;
|
|
59
|
+
}
|
|
60
|
+
export declare function DiffViewer({ oldValue, newValue, mode, showUnchanged, scrollEnabled, height, }: DiffViewerProps): React.JSX.Element;
|
|
61
|
+
//# sourceMappingURL=toolkitComponents.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toolkitComponents.d.ts","sourceRoot":"","sources":["../../../src/toolkitComponents.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC9C,OAAO,EAIL,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AA4BtB,gFAAgF;AAChF,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAElD;AAUD,oDAAoD;AACpD,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAElD;AAaD,qDAAqD;AACrD,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE9C;AAOD,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,SAAS,CAAC;IACpB,4EAA4E;IAC5E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yDAAyD;IACzD,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAC1B,wEAAwE;IACxE,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,6CAA6C;IAC7C,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,wBAAgB,KAAK,CAAC,EACpB,QAAQ,EACR,KAAsC,EACtC,IAA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ot":"","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;
|
|
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;AAExB,OAAO,EAEL,iBAAiB,EAClB,MAAM,yBAAyB,CAAC;AAIjC,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,sBA6NpE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,UAAU,2BAgBtB,CAAC;AAkHF;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,gCAsFtB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppHost.web.d.ts","sourceRoot":"","sources":["../../../../src/floatingMenu/AppHost.web.tsx"],"names":[],"mappings":"AAuBA,OAAO,EASL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EACL,WAAW,EACX,cAAc,EAEf,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"AppHost.web.d.ts","sourceRoot":"","sources":["../../../../src/floatingMenu/AppHost.web.tsx"],"names":[],"mappings":"AAuBA,OAAO,EASL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EACL,WAAW,EACX,cAAc,EAEf,MAAM,gBAAgB,CAAC;AAIxB,KAAK,mBAAmB,GAAG;IACzB,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,SAAS,EAAE,OAAO,CAAC;IACnB,IAAI,EAAE,CAAC,GAAG,EAAE,cAAc,KAAK,MAAM,CAAC;IACtC,KAAK,EAAE,CAAC,UAAU,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,YAAY,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;IACpC,wDAAwD;IACxD,QAAQ,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,gDAAgD;IAChD,OAAO,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,4CAA4C;IAC5C,WAAW,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC;CAC9C,CAAC;AAuBF;;;;GAIG;AACH,eAAO,MAAM,eAAe,GAAI,cAAc;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,gCAuNpE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,UAAU,QAAO,mBAgB7B,CAAC;AAmGF;;;;;GAKG;AACH,eAAO,MAAM,UAAU,0CA8BtB,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ComponentType, ReactNode } from "react";
|
|
2
|
+
import type { ToolModalConfig } from "./types";
|
|
2
3
|
/**
|
|
3
4
|
* Modal state to restore when reopening a minimized tool. Defined here (the
|
|
4
5
|
* platform-free logic module) so the web host doesn't pull in the native
|
|
@@ -37,6 +38,8 @@ export type AppInstance = {
|
|
|
37
38
|
color?: string;
|
|
38
39
|
/** Modal state to restore when un-minimizing */
|
|
39
40
|
restoreState?: ModalRestoreState;
|
|
41
|
+
/** Declarative chrome config — when set, AppHost wraps the component in the shared modal shell. */
|
|
42
|
+
modal?: ToolModalConfig;
|
|
40
43
|
};
|
|
41
44
|
export type OpenDefinition = Omit<AppInstance, "instanceId">;
|
|
42
45
|
/**
|
|
@@ -1 +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;
|
|
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,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C;;;;GAIG;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,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;IACjC,mGAAmG;IACnG,KAAK,CAAC,EAAE,eAAe,CAAC;CACzB,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,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Icon resolution for `InstalledApp.icon`.
|
|
3
|
+
*
|
|
4
|
+
* Custom tools may provide an icon three ways:
|
|
5
|
+
* - a component `({ slot, size }) => node` (dynamic, hook-capable)
|
|
6
|
+
* - a pre-built ReactNode
|
|
7
|
+
* - a PLAIN STRING — "AUTH", "KIT", "🗑️" — rendered as an auto-fitting text
|
|
8
|
+
* icon so simple tools never need an icon library.
|
|
9
|
+
*
|
|
10
|
+
* Every menu surface (dial, row, minimize stack, restore path) resolves icons
|
|
11
|
+
* through `renderAppIcon` so all three forms behave identically.
|
|
12
|
+
*/
|
|
13
|
+
import React from "react";
|
|
14
|
+
import type { FloatingMenuRenderCtx, InstalledApp } from "./types";
|
|
15
|
+
export declare function AppTextIcon({ label, size, color, }: {
|
|
16
|
+
label: string;
|
|
17
|
+
size: number;
|
|
18
|
+
color?: string;
|
|
19
|
+
}): React.JSX.Element;
|
|
20
|
+
/**
|
|
21
|
+
* Resolve any `InstalledApp.icon` form to a renderable node. Function icons
|
|
22
|
+
* become elements (createElement — hooks keep working); strings become
|
|
23
|
+
* auto-fitting text icons; nodes pass through.
|
|
24
|
+
*/
|
|
25
|
+
export declare function renderAppIcon(icon: InstalledApp["icon"], ctx: Partial<FloatingMenuRenderCtx> & {
|
|
26
|
+
slot: FloatingMenuRenderCtx["slot"];
|
|
27
|
+
size: number;
|
|
28
|
+
color?: string;
|
|
29
|
+
}): React.ReactNode;
|
|
30
|
+
//# sourceMappingURL=AppIcon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppIcon.d.ts","sourceRoot":"","sources":["../../../../src/floatingMenu/AppIcon.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AASnE,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,IAAI,EACJ,KAA6B,GAC9B,EAAE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,qBAqCA;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAC3B,IAAI,EAAE,YAAY,CAAC,MAAM,CAAC,EAC1B,GAAG,EAAE,OAAO,CAAC,qBAAqB,CAAC,GAAG;IACpC,IAAI,EAAE,qBAAqB,CAAC,MAAM,CAAC,CAAC;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GACA,KAAK,CAAC,SAAS,CAcjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FloatingDevTools.d.ts","sourceRoot":"","sources":["../../../../src/floatingMenu/FloatingDevTools.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+D,MAAM,OAAO,CAAC;AAGpF,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAMtE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"FloatingDevTools.d.ts","sourceRoot":"","sources":["../../../../src/floatingMenu/FloatingDevTools.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+D,MAAM,OAAO,CAAC;AAGpF,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAMtE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAM5C,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EAEvB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAGL,KAAK,mBAAmB,EACzB,MAAM,oBAAoB,CAAC;AAE5B;;;;;;;;;;;;;;;;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,MA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OAkBG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAEpC;;;;;;;;;;;;;;;;;OAiBG;IACH,YAAY,CAAC,EAAE,OAAO,GAAG,mBAAmB,CAAC;IAE7C;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,eAAO,MAAM,gBAAgB,GAAI,0NAe9B,qBAAqB,6BAmWvB,CAAC"}
|
|
@@ -1 +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;
|
|
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;AAEjB,OAAO,KAAK,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEhF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AActD;;;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;AAWD,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CA8U9C,CAAC"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ToolHost — the declarative chrome layer for custom tools.
|
|
3
|
+
*
|
|
4
|
+
* When an `InstalledApp` declares `modal: {...}`, the AppHost renders its
|
|
5
|
+
* component inside `ToolModalShell` instead of raw: the shared JsModal
|
|
6
|
+
* (drag/resize, floating⇄bottom-sheet, minimize, dimension persistence) plus
|
|
7
|
+
* a managed header (title/subtitle, back navigation, search, actions) and a
|
|
8
|
+
* lightweight toast layer. The tool body talks back to the shell through
|
|
9
|
+
* `useToolHost()` / `useToolHeader()`.
|
|
10
|
+
*/
|
|
11
|
+
import React, { type DependencyList, type ReactNode } from "react";
|
|
12
|
+
import type { AppInstance, ModalRestoreState } from "./AppHostLogic";
|
|
13
|
+
import type { ToolModalConfig } from "./types";
|
|
14
|
+
/** Per-screen header overrides a tool body can apply (see `useToolHeader`). */
|
|
15
|
+
export interface ToolHeaderOverride {
|
|
16
|
+
title?: string;
|
|
17
|
+
subtitle?: string;
|
|
18
|
+
/** Replaces the preset's static `headerActions` while active. */
|
|
19
|
+
actions?: ReactNode;
|
|
20
|
+
/** Shows the back chevron (and wires JsModal's top-left tap zone). */
|
|
21
|
+
onBack?: () => void;
|
|
22
|
+
/**
|
|
23
|
+
* Overrides the preset's `searchable` while active — a detail screen with
|
|
24
|
+
* no searchable content passes `false` to hide the header search button.
|
|
25
|
+
*/
|
|
26
|
+
searchable?: boolean;
|
|
27
|
+
}
|
|
28
|
+
export type ToolToastType = "success" | "error" | "info";
|
|
29
|
+
export interface ToolHostContextValue {
|
|
30
|
+
/** Current header-search query ("" while search is closed). */
|
|
31
|
+
search: string;
|
|
32
|
+
isSearchActive: boolean;
|
|
33
|
+
/** Close and clear the header search. */
|
|
34
|
+
clearSearch: () => void;
|
|
35
|
+
/** Close this tool. */
|
|
36
|
+
close: () => void;
|
|
37
|
+
/** Show a transient toast inside the tool modal. */
|
|
38
|
+
showToast: (message: string, type?: ToolToastType) => void;
|
|
39
|
+
/** Low-level header override setter — prefer `useToolHeader`. */
|
|
40
|
+
setHeaderOverride: (override: ToolHeaderOverride | null) => void;
|
|
41
|
+
/** Instance id assigned by the AppHost. */
|
|
42
|
+
instanceId?: string;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Access the hosting shell from a custom tool body: search query, toasts,
|
|
46
|
+
* close. Safe to call outside the shell (returns inert no-ops) so tool
|
|
47
|
+
* components can also be mounted standalone.
|
|
48
|
+
*/
|
|
49
|
+
export declare function useToolHost(): ToolHostContextValue;
|
|
50
|
+
/**
|
|
51
|
+
* Declare per-screen header state (title/subtitle/actions/back) from inside a
|
|
52
|
+
* tool body. Applies while the calling component is mounted and reverts to
|
|
53
|
+
* the preset's static config on unmount — so a detail screen simply mounts
|
|
54
|
+
* with its own header and the list header returns when it unmounts.
|
|
55
|
+
*
|
|
56
|
+
* ```tsx
|
|
57
|
+
* useToolHeader(
|
|
58
|
+
* { title: flag.key, onBack: () => setScreen("list"), actions: <CopyButton value={flag} /> },
|
|
59
|
+
* [flag.key]
|
|
60
|
+
* );
|
|
61
|
+
* ```
|
|
62
|
+
*/
|
|
63
|
+
export declare function useToolHeader(override: ToolHeaderOverride | null, deps: DependencyList): void;
|
|
64
|
+
interface ToolModalShellProps {
|
|
65
|
+
app: AppInstance;
|
|
66
|
+
config: ToolModalConfig;
|
|
67
|
+
visible: boolean;
|
|
68
|
+
zIndex: number;
|
|
69
|
+
onClose: () => void;
|
|
70
|
+
onMinimize: (modalState?: ModalRestoreState) => void;
|
|
71
|
+
initialModalState?: ModalRestoreState;
|
|
72
|
+
enableSharedModalDimensions?: boolean;
|
|
73
|
+
bodyProps: Record<string, unknown>;
|
|
74
|
+
}
|
|
75
|
+
export declare function ToolModalShell({ app, config, visible, zIndex, onClose, onMinimize, initialModalState, enableSharedModalDimensions, bodyProps, }: ToolModalShellProps): React.JSX.Element;
|
|
76
|
+
export {};
|
|
77
|
+
//# sourceMappingURL=ToolHost.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToolHost.d.ts","sourceRoot":"","sources":["../../../../src/floatingMenu/ToolHost.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,EAAE,EAQZ,KAAK,cAAc,EACnB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAWf,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACrE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C,+EAA+E;AAC/E,MAAM,WAAW,kBAAkB;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iEAAiE;IACjE,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,sEAAsE;IACtE,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;AAEzD,MAAM,WA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ts","sourceRoot":"","sources":["../../../../src/floatingMenu/allToolsRegistry.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"allToolsRegistry.d.ts","sourceRoot":"","sources":["../../../../src/floatingMenu/allToolsRegistry.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AA0C1B,MAAM,WAAW,aAAa;IAC5B,wEAAwE;IACxE,EAAE,EAAE,MAAM,CAAC;IACX,2DAA2D;IAC3D,IAAI,EAAE,MAAM,CAAC;IACb,mBAAmB;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,+DAA+D;IAC/D,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,KAAK,CAAC,SAAS,CAAC;CAC/C;AAID;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,kBAAkB,EAAE,aAAa,EA+E7C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"autoDiscoverPresets.d.ts","sourceRoot":"","sources":["../../../../src/floatingMenu/autoDiscoverPresets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAG5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,wBAAgB,mBAAmB,IAAI,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"autoDiscoverPresets.d.ts","sourceRoot":"","sources":["../../../../src/floatingMenu/autoDiscoverPresets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAG5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,wBAAgB,mBAAmB,IAAI,YAAY,EAAE,CAkSpD;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,6BAA6B,CAC3C,WAAW,EAAE,YAAY,EAAE,GAC1B,YAAY,EAAE,CAahB"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { EnvVarConfig } from "./FloatingDevTools";
|
|
2
|
+
import type { InstalledApp } from "./types";
|
|
2
3
|
/** Whether zero-config sync can run (the external-sync package is installed). */
|
|
3
4
|
export declare function isExternalSyncAvailable(): boolean;
|
|
4
5
|
export interface ExternalSyncOptions {
|
|
@@ -25,7 +26,13 @@ interface AutoExternalSyncProps {
|
|
|
25
26
|
isPro?: boolean;
|
|
26
27
|
/** Pro license key, forwarded into the handshake alongside `isPro`. */
|
|
27
28
|
licenseKey?: string | null;
|
|
29
|
+
/**
|
|
30
|
+
* Custom tools (from FloatingDevTools' `apps`) that declared a `sync`
|
|
31
|
+
* adapter. Registered under `custom:<id>` so they can't shadow first-party
|
|
32
|
+
* toolIds. Pass a memoized array — the tools map rebuilds when it changes.
|
|
33
|
+
*/
|
|
34
|
+
customApps?: InstalledApp[];
|
|
28
35
|
}
|
|
29
|
-
export declare function AutoExternalSync({ options, requiredEnvVars, isPro, licenseKey, }: AutoExternalSyncProps): null;
|
|
36
|
+
export declare function AutoExternalSync({ options, requiredEnvVars, isPro, licenseKey, customApps, }: AutoExternalSyncProps): null;
|
|
30
37
|
export {};
|
|
31
38
|
//# sourceMappingURL=autoExternalSync.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"autoExternalSync.d.ts","sourceRoot":"","sources":["../../../../src/floatingMenu/autoExternalSync.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"autoExternalSync.d.ts","sourceRoot":"","sources":["../../../../src/floatingMenu/autoExternalSync.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AA4I5C,iFAAiF;AACjF,wBAAgB,uBAAuB,IAAI,OAAO,CAEjD;AAED,MAAM,WAAW,mBAAmB;IAClC;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2EAA2E;IAC3E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qBAAqB;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAuBD,UAAU,qBAAqB;IAC7B,OAAO,CAAC,EAAE,mBAAmB,CAAC;IAC9B,6EAA6E;IAC7E,eAAe,CAAC,EAAE,YAAY,EAAE,CAAC;IACjC,8EAA8E;IAC9E,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,uEAAuE;IACvE,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B;;;;OAIG;IACH,UAAU,CAAC,EAAE,YAAY,EAAE,CAAC;CAC7B;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,OAAO,EACP,eAAe,EACf,KAAK,EACL,UAAU,EACV,UAAU,GACX,EAAE,qBAAqB,QAkIvB"}
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* All known tool IDs that can appear in the floating menu or dial menu.
|
|
20
20
|
* This is a union type of all auto-discovered tool IDs.
|
|
21
21
|
*/
|
|
22
|
-
export type BuiltInToolId = 'env' | 'network' | 'storage' | 'query' | 'query-wifi-toggle' | 'route-events' | 'debug-borders' | 'highlight-updates' | 'highlight-updates-modal' | 'redux' | 'zustand' | 'jotai' | 'events' | 'image-overlay' | 'perf-monitor' | 'perf-monitor-modal';
|
|
22
|
+
export type BuiltInToolId = 'env' | 'network' | 'storage' | 'query' | 'query-wifi-toggle' | 'route-events' | 'debug-borders' | 'highlight-updates' | 'highlight-updates-modal' | 'redux' | 'zustand' | 'jotai' | 'events' | 'time-machine' | 'image-overlay' | 'perf-monitor' | 'perf-monitor-modal';
|
|
23
23
|
/**
|
|
24
24
|
* Special floating-only tool IDs that only appear in the floating bubble row.
|
|
25
25
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultConfig.d.ts","sourceRoot":"","sources":["../../../../src/floatingMenu/defaultConfig.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH;;;GAGG;AACH,MAAM,MAAM,aAAa,GACrB,KAAK,GACL,SAAS,GACT,SAAS,GACT,OAAO,GACP,mBAAmB,GACnB,cAAc,GACd,eAAe,GACf,mBAAmB,GACnB,yBAAyB,GACzB,OAAO,GACP,SAAS,GACT,OAAO,GACP,QAAQ,GACR,eAAe,GACf,cAAc,GACd,oBAAoB,CAAC;AAEzB;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,aAAa,CAAC;AAE/C;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,aAAa,GAAG,kBAAkB,CAAC;AAEhE;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,aAAa,CAAC;AAEvC;;GAEG;AACH,eAAO,MAAM,cAAc,IAAI,CAAC;AAEhC;;;;;;;;GAQG;AACH,MAAM,MAAM,qBAAqB,GAAG,cAAc,EAAE,CAAC;AAErD;;;;;;;;GAQG;AACH,MAAM,MAAM,iBAAiB,GAAG,UAAU,EAAE,CAAC;AAE7C;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,iBAAiB,GAAG,iBAAiB,CAW9E;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,mBAAmB,CACjC,CAAC,SAAS,cAAc,EAAE,EAC1B,CAAC,SAAS,UAAU,EAAE,EACtB,MAAM,EAAE;IACR,QAAQ,CAAC,EAAE,CAAC,CAAC;IACb,IAAI,CAAC,EAAE,CAAC,CAAC;CACV,GAAG;IACF,QAAQ,EAAE,CAAC,GAAG,SAAS,CAAC;IACxB,IAAI,EAAE,CAAC,GAAG,SAAS,CAAC;CACrB,CAUA;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,EAAE,IAAI,cAAc,CAcjE;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,EAAE,IAAI,UAAU,CAazD;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,CAAC,SAAS,MAAM,EAC9C,GAAG,EAAE,CAAC,EAAE,EACR,cAAc,EAAE,CAAC,EAAE,GAClB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CASzB"}
|
|
1
|
+
{"version":3,"file":"defaultConfig.d.ts","sourceRoot":"","sources":["../../../../src/floatingMenu/defaultConfig.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH;;;GAGG;AACH,MAAM,MAAM,aAAa,GACrB,KAAK,GACL,SAAS,GACT,SAAS,GACT,OAAO,GACP,mBAAmB,GACnB,cAAc,GACd,eAAe,GACf,mBAAmB,GACnB,yBAAyB,GACzB,OAAO,GACP,SAAS,GACT,OAAO,GACP,QAAQ,GACR,cAAc,GACd,eAAe,GACf,cAAc,GACd,oBAAoB,CAAC;AAEzB;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,aAAa,CAAC;AAE/C;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,aAAa,GAAG,kBAAkB,CAAC;AAEhE;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,aAAa,CAAC;AAEvC;;GAEG;AACH,eAAO,MAAM,cAAc,IAAI,CAAC;AAEhC;;;;;;;;GAQG;AACH,MAAM,MAAM,qBAAqB,GAAG,cAAc,EAAE,CAAC;AAErD;;;;;;;;GAQG;AACH,MAAM,MAAM,iBAAiB,GAAG,UAAU,EAAE,CAAC;AAE7C;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,iBAAiB,GAAG,iBAAiB,CAW9E;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,mBAAmB,CACjC,CAAC,SAAS,cAAc,EAAE,EAC1B,CAAC,SAAS,UAAU,EAAE,EACtB,MAAM,EAAE;IACR,QAAQ,CAAC,EAAE,CAAC,CAAC;IACb,IAAI,CAAC,EAAE,CAAC,CAAC;CACV,GAAG;IACF,QAAQ,EAAE,CAAC,GAAG,SAAS,CAAC;IACxB,IAAI,EAAE,CAAC,GAAG,SAAS,CAAC;CACrB,CAUA;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,EAAE,IAAI,cAAc,CAcjE;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,EAAE,IAAI,UAAU,CAazD;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,CAAC,SAAS,MAAM,EAC9C,GAAG,EAAE,CAAC,EAAE,EACR,cAAc,EAAE,CAAC,EAAE,GAClB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CASzB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DialDevTools.d.ts","sourceRoot":"","sources":["../../../../../src/floatingMenu/dial/DialDevTools.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAwC,SAAS,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAgC5E,OAAO,KAAK,EACV,YAAY,EACZ,mBAAmB,EACnB,iBAAiB,EAClB,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"DialDevTools.d.ts","sourceRoot":"","sources":["../../../../../src/floatingMenu/dial/DialDevTools.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAwC,SAAS,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAgC5E,OAAO,KAAK,EACV,YAAY,EACZ,mBAAmB,EACnB,iBAAiB,EAClB,MAAM,UAAU,CAAC;AAsBlB,MAAM,MAAM,QAAQ,GAAG;IACrB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,SAAS,CAAC;IAChB;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,CAAC,GAAG,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,iBAAiB,CAAC;QAAC,OAAO,CAAC,EAAE,mBAAmB,CAAA;KAAE,KAAK,SAAS,CAAC;IAC/H,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAWF,UAAU,iBAAiB;IACzB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;IAC7B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,IAAI,EAAE,YAAY,EAAE,CAAC;IACrB,KAAK,CAAC,EAAE,iBAAiB,CAAC;IAC1B,OAAO,CAAC,EAAE,mBAAmB,CAAC;CAC/B;AAED,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CAgsB9C,CAAC"}
|
|
@@ -1,4 +1,27 @@
|
|
|
1
|
-
import { ComponentType } from "react";
|
|
1
|
+
import { ComponentType, ReactNode } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Declarative modal chrome for a custom tool. When present (with the default
|
|
4
|
+
* `self-modal` launch mode), the AppHost wraps `component` in the shared
|
|
5
|
+
* JsModal + header shell — drag/resize, floating⇄bottom-sheet, minimize,
|
|
6
|
+
* window controls, dimension persistence, header search and toasts all come
|
|
7
|
+
* for free, and `component` renders just the tool BODY.
|
|
8
|
+
*
|
|
9
|
+
* Without `modal`, `self-modal` components are rendered raw and must provide
|
|
10
|
+
* their own chrome (this is what Buoy's first-party tools do).
|
|
11
|
+
*/
|
|
12
|
+
export interface ToolModalConfig {
|
|
13
|
+
/** Header title; defaults to the app's `name`. */
|
|
14
|
+
title?: string;
|
|
15
|
+
/** Secondary line under the title. */
|
|
16
|
+
subtitle?: string;
|
|
17
|
+
/** Show the header search button; the query is read via `useToolHost().search`. */
|
|
18
|
+
searchable?: boolean;
|
|
19
|
+
searchPlaceholder?: string;
|
|
20
|
+
/** Static header action buttons (elements may be stateful components). */
|
|
21
|
+
headerActions?: ReactNode;
|
|
22
|
+
/** Starting presentation; users can toggle and it persists. Default "bottomSheet". */
|
|
23
|
+
initialMode?: "bottomSheet" | "floating";
|
|
24
|
+
}
|
|
2
25
|
/** Where a tool should render within the floating menu surface. */
|
|
3
26
|
export type AppSlot = "row" | "dial" | "both";
|
|
4
27
|
/** Generic, dynamic context shared with floating tools. */
|
|
@@ -19,6 +42,25 @@ export type FloatingMenuRenderCtx = {
|
|
|
19
42
|
/** Optional shared action callbacks supplied by the host. */
|
|
20
43
|
actions?: FloatingMenuActions;
|
|
21
44
|
};
|
|
45
|
+
/**
|
|
46
|
+
* Sync adapter a custom tool can attach via `InstalledApp.sync` to appear in
|
|
47
|
+
* Buoy Desktop and be drivable over MCP (`get_snapshot` / `call_action`).
|
|
48
|
+
* Structurally matches `ToolSyncAdapter` from `@buoy-gg/external-sync` so
|
|
49
|
+
* neither core nor tool authors need a dependency on that package.
|
|
50
|
+
*
|
|
51
|
+
* Registered under the `custom:<id>` toolId namespace so third-party tools
|
|
52
|
+
* can never shadow a first-party toolId on the broker.
|
|
53
|
+
*/
|
|
54
|
+
export interface ToolSyncAdapter {
|
|
55
|
+
/** Payload-shape version, bumped when `getSnapshot`'s shape changes. */
|
|
56
|
+
version: number;
|
|
57
|
+
/** JSON-serializable snapshot of the tool's state (keep it small — the emit budget is 2 MB). */
|
|
58
|
+
getSnapshot: () => unknown;
|
|
59
|
+
/** Notify on state change; only called while a dashboard is watching. Return an unsubscribe. */
|
|
60
|
+
subscribe: (onChange: () => void) => () => void;
|
|
61
|
+
/** Remotely callable actions (desktop buttons, MCP call_action). */
|
|
62
|
+
actions?: Record<string, (params: unknown) => unknown | Promise<unknown>>;
|
|
63
|
+
}
|
|
22
64
|
/** Declarative description of an app that can be launched from the floating menu. */
|
|
23
65
|
export interface InstalledApp {
|
|
24
66
|
/** Unique identifier used for persistence and settings. */
|
|
@@ -27,7 +69,13 @@ export interface InstalledApp {
|
|
|
27
69
|
name: string;
|
|
28
70
|
/** Brief description of what this tool does, shown in settings. */
|
|
29
71
|
description?: string;
|
|
30
|
-
/**
|
|
72
|
+
/**
|
|
73
|
+
* Icon to render in the floating menu. Three forms:
|
|
74
|
+
* - a plain string — `"AUTH"`, `"🗑️"` — rendered as an auto-fitting text
|
|
75
|
+
* icon (the simplest option; no icon library needed)
|
|
76
|
+
* - a pre-built ReactNode
|
|
77
|
+
* - a component `({ slot, size }) => node` for dynamic icons
|
|
78
|
+
*/
|
|
31
79
|
icon: React.ReactNode | ((ctx: FloatingMenuRenderCtx) => React.ReactNode);
|
|
32
80
|
/** Preferred layout slot; defaults to `"both"` when unspecified. */
|
|
33
81
|
slot?: AppSlot;
|
|
@@ -35,6 +83,18 @@ export interface InstalledApp {
|
|
|
35
83
|
color?: string;
|
|
36
84
|
/** Plug-and-play launching component handled by the AppHost. */
|
|
37
85
|
component: ComponentType<any>;
|
|
86
|
+
/**
|
|
87
|
+
* Declarative chrome: when set, `component` is rendered as a plain body
|
|
88
|
+
* inside the shared modal shell (JsModal + header + search + toasts).
|
|
89
|
+
* See {@link ToolModalConfig}.
|
|
90
|
+
*/
|
|
91
|
+
modal?: ToolModalConfig;
|
|
92
|
+
/**
|
|
93
|
+
* Sync adapter: when set, the tool syncs to Buoy Desktop and is drivable
|
|
94
|
+
* over MCP as `custom:<id>`, whether or not its modal is open. See
|
|
95
|
+
* {@link ToolSyncAdapter}.
|
|
96
|
+
*/
|
|
97
|
+
sync?: ToolSyncAdapter;
|
|
38
98
|
/** Props to pass to the launched component (e.g. requiredEnvVars). */
|
|
39
99
|
props?: Record<string, unknown>;
|
|
40
100
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/floatingMenu/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/floatingMenu/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEjD;;;;;;;;;GASG;AACH,MAAM,WAAW,eAAe;IAC9B,kDAAkD;IAClD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sCAAsC;IACtC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,mFAAmF;IACnF,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,0EAA0E;IAC1E,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B,sFAAsF;IACtF,WAAW,CAAC,EAAE,aAAa,GAAG,UAAU,CAAC;CAC1C;AAED,mEAAmE;AACnE,MAAM,MAAM,OAAO,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;AAE9C,2DAA2D;AAC3D,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AACxD,sDAAsD;AACtD,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC,CAAC;AAE3E;;;GAGG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC,2DAA2D;IAC3D,IAAI,EAAE,OAAO,CAAC;IACd,yDAAyD;IACzD,IAAI,EAAE,MAAM,CAAC;IACb,yDAAyD;IACzD,KAAK,CAAC,EAAE,iBAAiB,CAAC;IAC1B,6DAA6D;IAC7D,OAAO,CAAC,EAAE,mBAAmB,CAAC;CAC/B,CAAC;AAEF;;;;;;;;GAQG;AACH,M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;CACnD"}
|
|
@@ -12,6 +12,8 @@ export * from "./floatingMenu/types";
|
|
|
12
12
|
export { DevToolsSettingsModal, useDevToolsSettings, } from "./floatingMenu/DevToolsSettingsModal";
|
|
13
13
|
export type { DevToolsSettings, GlobalDevToolsSettings } from "./floatingMenu/DevToolsSettingsModal";
|
|
14
14
|
export { AppHostProvider, AppOverlay, useAppHost, } from "./floatingMenu/AppHost";
|
|
15
|
+
export { useToolHost, useToolHeader, type ToolHostContextValue, type ToolHeaderOverride, type ToolToastType, } from "./floatingMenu/ToolHost";
|
|
16
|
+
export * from "./toolkit";
|
|
15
17
|
export { DevToolsVisibilityProvider, useDevToolsVisibility, } from "./floatingMenu/DevToolsVisibilityContext";
|
|
16
18
|
export { toggleStateManager } from "./floatingMenu/ToggleStateManager";
|
|
17
19
|
export { MinimizedToolsProvider, useMinimizedTools, getIconPosition, getIconSize, } from "./floatingMenu/MinimizedToolsContext";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,QAAQ,CAAC;AACtD,YAAY,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAGzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,YAAY,EACV,qBAAqB,EACrB,YAAY,EACZ,gBAAgB,GACjB,MAAM,iCAAiC,CAAC;AACzC,YAAY,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAI3E,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAGpE,OAAO,EACL,mBAAmB,EACnB,6BAA6B,GAC9B,MAAM,oCAAoC,CAAC;AAG5C,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,gBAAgB,EAChB,YAAY,EACZ,cAAc,GACf,MAAM,8BAA8B,CAAC;AACtC,YAAY,EACV,aAAa,EACb,c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c,EACd,uBAAuB,EACvB,UAAU,EACV,gBAAgB,EAChB,QAAQ,EACR,aAAa,EACb,KAAK,EACL,cAAc,GACf,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EACV,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,sBAAsB,EACtB,0BAA0B,GAC3B,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The public custom-tools toolkit — the blessed subset of Buoy's shared UI
|
|
3
|
+
* re-exported from `@buoy-gg/core`, so third-party tool authors need exactly
|
|
4
|
+
* one dependency and never touch `@buoy-gg/shared-ui` (which stays internal
|
|
5
|
+
* and free to churn).
|
|
6
|
+
*
|
|
7
|
+
* Design rules for this surface (keep it Tailwind-small):
|
|
8
|
+
* - Variants over components: a styling difference is a prop, not an export.
|
|
9
|
+
* - Behavior earns a component (CopyButton); a size preset does not.
|
|
10
|
+
* - The tool shell owns chrome — header/back/search buttons are not user API.
|
|
11
|
+
*
|
|
12
|
+
* Everything here is considered API: additions are minor bumps, removals are
|
|
13
|
+
* major. If a component you want is missing, that's deliberate — request it
|
|
14
|
+
* rather than deep-importing.
|
|
15
|
+
*/
|
|
16
|
+
export { toolTheme, type ToolTheme } from "@buoy-gg/shared-ui";
|
|
17
|
+
export { Badge, type BadgeProps, StatusDot, type StatusDotProps, statusColor, methodColor, typeColor, } from "./toolkitComponents";
|
|
18
|
+
export { ToolButton as Button, type ToolButtonProps as ButtonProps, CopyButton, PowerToggleButton as PowerToggle, type PowerToggleButtonProps as PowerToggleProps, } from "@buoy-gg/shared-ui";
|
|
19
|
+
export { CompactRow as Row, type CompactRowProps as RowProps, DevToolsCard as Card, } from "@buoy-gg/shared-ui";
|
|
20
|
+
export { InfoRow, type InfoRowProps } from "./toolkitComponents";
|
|
21
|
+
export { SectionHeader, CollapsibleSection, TabSelector, type Tab, EmptyState, SearchBar, EventStepperFooter, type EventStepperFooterProps, } from "@buoy-gg/shared-ui";
|
|
22
|
+
export { DataViewer, type JsonValue } from "@buoy-gg/shared-ui/dataViewer";
|
|
23
|
+
export { DiffViewer, type DiffViewerProps } from "./toolkitComponents";
|
|
24
|
+
export { BaseEventStore, type BaseEventStoreOptions, type ArrayListener, type EventCallback, } from "@buoy-gg/shared-ui";
|
|
25
|
+
export { RelativeTime } from "@buoy-gg/shared-ui";
|
|
26
|
+
export { formatBytes, formatDuration, formatNumber, truncateMiddle, safeStringify, } from "@buoy-gg/shared-ui";
|
|
27
|
+
export { usePersistedState, persistentStorage, devToolsStorageKeys, } from "@buoy-gg/shared-ui";
|
|
28
|
+
export { useSafeAreaInsets, copyToClipboard } from "@buoy-gg/shared-ui";
|
|
29
|
+
export { JsModal, type ModalMode } from "@buoy-gg/shared-ui";
|
|
30
|
+
export { Activity, AlertTriangle, Bug, Check, CheckCircle, ChevronDown, ChevronLeft, ChevronRight, ChevronUp, Clock, Copy, Database, Eye, EyeOff, FileJson, FileText, Filter, FlaskConical, Globe, Hash, Info, Key, Layers, Lock, Pause, Play, Plus, Power, RefreshCw, Search, Settings, Shield, Trash2, User, Wifi, X, Zap, AlertCircle, BarChart3, Bookmark, Cloud, Download, Edit3, GitBranch, HardDrive, HelpCircle, Home, Image, Link, Maximize2, Minus, Palette, Pin, Route, Server, Smartphone, Square, CheckSquare, Timer, Unlock, Upload, Users, XCircle, } from "@buoy-gg/shared-ui";
|
|
31
|
+
//# sourceMappingURL=toolkit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toolkit.d.ts","sourceRoot":"","sources":["../../../src/toolkit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAI/D,OAAO,EACL,KAAK,EACL,KAAK,UAAU,EACf,SAAS,EACT,KAAK,cAAc,EACnB,WAAW,EACX,WAAW,EACX,SAAS,GACV,MAAM,qBAAqB,CAAC;AAG7B,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,IAAI,EACJ,QAAQ,EACR,GAAG,EACH,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,YAAY,EACZ,KAAK,EACL,IAAI,EACJ,IAAI,EACJ,GAAG,EACH,MAAM,EACN,IAAI,EACJ,KAAK,EACL,IAAI,EACJ,IAAI,EACJ,KAAK,EACL,SAAS,EACT,MAAM,EACN,QAAQ,EACR,MAAM,EACN,MAAM,EACN,IAAI,EACJ,IAAI,EACJ,CAAC,EACD,GAAG,EACH,WAAW,EACX,SAAS,EACT,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,KAAK,EACL,SAAS,EACT,SAAS,EACT,UAAU,EACV,IAAI,EACJ,KAAK,EACL,IAAI,EACJ,SAAS,EACT,KAAK,EACL,OAAO,EACP,GAAG,EACH,KAAK,EACL,MAAM,EACN,UAAU,EACV,MAAM,EACN,WAAW,EACX,KAAK,EACL,MAAM,EACN,MAAM,EACN,KAAK,EACL,OAAO,GACR,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Facade primitives for the public custom-tools toolkit (see toolkit.ts).
|
|
3
|
+
*
|
|
4
|
+
* shared-ui grew several overlapping treatments of the same jobs (seven badge
|
|
5
|
+
* variants, four copy buttons, two diff viewers...). The public surface merges
|
|
6
|
+
* each job into ONE component with variants, implemented here on toolTheme —
|
|
7
|
+
* shared-ui's internals stay unchanged for first-party tools.
|
|
8
|
+
*/
|
|
9
|
+
import React, { type ReactNode } from "react";
|
|
10
|
+
import { type StyleProp, type ViewStyle } from "react-native";
|
|
11
|
+
/** Map a status word ("success", "pending", "stale"...) to a semantic color. */
|
|
12
|
+
export declare function statusColor(status: string): string;
|
|
13
|
+
/** Map an HTTP method to its conventional color. */
|
|
14
|
+
export declare function methodColor(method: string): string;
|
|
15
|
+
/** Map a JS value-type name to its display color. */
|
|
16
|
+
export declare function typeColor(type: string): string;
|
|
17
|
+
export interface BadgeProps {
|
|
18
|
+
children: ReactNode;
|
|
19
|
+
/** Text/border tint — pair with statusColor()/methodColor()/typeColor(). */
|
|
20
|
+
color?: string;
|
|
21
|
+
/** Optional leading icon (size it ~1× the font size). */
|
|
22
|
+
icon?: ReactNode;
|
|
23
|
+
size?: "small" | "medium";
|
|
24
|
+
/** Fully-rounded capsule (counts, tags) instead of the rounded rect. */
|
|
25
|
+
pill?: boolean;
|
|
26
|
+
/** Monospace label (keys, paths, hashes). */
|
|
27
|
+
mono?: boolean;
|
|
28
|
+
style?: StyleProp<ViewStyle>;
|
|
29
|
+
}
|
|
30
|
+
export declare function Badge({ children, color, icon, size, pill, mono, style, }: BadgeProps): React.JSX.Element;
|
|
31
|
+
export interface StatusDotProps {
|
|
32
|
+
/** Status word mapped via statusColor(). */
|
|
33
|
+
status?: string;
|
|
34
|
+
/** Explicit color override. */
|
|
35
|
+
color?: string;
|
|
36
|
+
size?: number;
|
|
37
|
+
style?: StyleProp<ViewStyle>;
|
|
38
|
+
}
|
|
39
|
+
export declare function StatusDot({ status, color, size, style }: StatusDotProps): React.JSX.Element;
|
|
40
|
+
export interface InfoRowProps {
|
|
41
|
+
label: string;
|
|
42
|
+
value?: string | number | ReactNode;
|
|
43
|
+
/** Show a small copy button for the value. */
|
|
44
|
+
copyable?: boolean;
|
|
45
|
+
style?: StyleProp<ViewStyle>;
|
|
46
|
+
}
|
|
47
|
+
export declare function InfoRow({ label, value, copyable, style }: InfoRowProps): React.JSX.Element;
|
|
48
|
+
export interface DiffViewerProps {
|
|
49
|
+
oldValue: unknown;
|
|
50
|
+
newValue: unknown;
|
|
51
|
+
/** "tree" (default) diffs object structure; "text" is a side-by-side line diff. */
|
|
52
|
+
mode?: "tree" | "text";
|
|
53
|
+
/** tree mode: include unchanged keys. */
|
|
54
|
+
showUnchanged?: boolean;
|
|
55
|
+
/** tree mode: let the tree scroll itself (off when a parent scrolls). */
|
|
56
|
+
scrollEnabled?: boolean;
|
|
57
|
+
/** text mode: viewer height. */
|
|
58
|
+
height?: number;
|
|
59
|
+
}
|
|
60
|
+
export declare function DiffViewer({ oldValue, newValue, mode, showUnchanged, scrollEnabled, height, }: DiffViewerProps): React.JSX.Element;
|
|
61
|
+
//# sourceMappingURL=toolkitComponents.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toolkitComponents.d.ts","sourceRoot":"","sources":["../../../src/toolkitComponents.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC9C,OAAO,EAIL,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AA4BtB,gFAAgF;AAChF,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAElD;AAUD,oDAAoD;AACpD,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAElD;AAaD,qDAAqD;AACrD,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE9C;AAOD,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,SAAS,CAAC;IACpB,4EAA4E;IAC5E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yDAAyD;IACzD,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAC1B,wEAAwE;IACxE,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,6CAA6C;IAC7C,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,wBAAgB,KAAK,CAAC,EACpB,QAAQ,EACR,KAAsC,EACtC,IAAI,EACJ,IAAc,EACd,IAAY,EACZ,IAAY,EACZ,KAAK,GACN,EAAE,UAAU,qBA8BZ;AAuCD,MAAM,WAAW,cAAc;IAC7B,4CAA4C;IAC5C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,+BAA+B;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,wBAAgB,SAAS,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAQ,EAAE,KAAK,EAAE,EAAE,cAAc,qBAW3E;AAMD,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IACpC,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,wBAAgB,OAAO,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,QAAgB,EAAE,KAAK,EAAE,EAAE,YAAY,qBAmB9E;AA6BD,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,mFAAmF;IACnF,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,yCAAyC;IACzC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,yEAAyE;IACzE,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,gCAAgC;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,UAAU,CAAC,EACzB,QAAQ,EACR,QAAQ,EACR,IAAa,EACb,aAAoB,EACpB,aAAqB,EACrB,MAAY,GACb,EAAE,eAAe,qBAcjB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@buoy-gg/core",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.18",
|
|
4
4
|
"description": "Buoy devtools for React Native — a floating in-app dev menu; every tool streams live to your phone, desktop, and AI agent.",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -15,17 +15,31 @@
|
|
|
15
15
|
"require": "./lib/commonjs/index.js",
|
|
16
16
|
"default": "./lib/commonjs/index.js"
|
|
17
17
|
},
|
|
18
|
+
"./toolkit": {
|
|
19
|
+
"types": "./lib/typescript/module/toolkit.d.ts",
|
|
20
|
+
"react-native": "./lib/module/toolkit.js",
|
|
21
|
+
"import": "./lib/module/toolkit.js",
|
|
22
|
+
"require": "./lib/commonjs/toolkit.js",
|
|
23
|
+
"default": "./lib/commonjs/toolkit.js"
|
|
24
|
+
},
|
|
18
25
|
"./package.json": "./package.json"
|
|
19
26
|
},
|
|
27
|
+
"typesVersions": {
|
|
28
|
+
"*": {
|
|
29
|
+
"toolkit": [
|
|
30
|
+
"lib/typescript/module/toolkit.d.ts"
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
},
|
|
20
34
|
"files": [
|
|
21
35
|
"lib"
|
|
22
36
|
],
|
|
23
37
|
"sideEffects": false,
|
|
24
38
|
"dependencies": {
|
|
25
|
-
"@buoy-gg/
|
|
26
|
-
"@buoy-gg/
|
|
27
|
-
"@buoy-gg/
|
|
28
|
-
"@buoy-gg/floating-tools-react": "^7.0.
|
|
39
|
+
"@buoy-gg/shared-ui": "^7.0.18",
|
|
40
|
+
"@buoy-gg/license": "^7.0.18",
|
|
41
|
+
"@buoy-gg/floating-tools-core": "^7.0.18",
|
|
42
|
+
"@buoy-gg/floating-tools-react": "^7.0.18"
|
|
29
43
|
},
|
|
30
44
|
"peerDependencies": {
|
|
31
45
|
"react": "*",
|