@buoy-gg/shared-ui 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/dataViewer/ThemedSplitView.js +622 -0
- package/lib/commonjs/dataViewer/index.js +32 -0
- package/lib/commonjs/dataViewer/objectDiff.js +304 -0
- package/lib/commonjs/hooks/index.js +7 -0
- package/lib/commonjs/hooks/safe-area-impl.js +1 -1
- package/lib/commonjs/hooks/usePersistedState.js +71 -0
- package/lib/commonjs/icons/index.js +14 -0
- package/lib/commonjs/index.js +61 -0
- package/lib/commonjs/storage/devToolsStorageKeys.js +31 -0
- package/lib/commonjs/sync/wireBudget.js +97 -0
- package/lib/commonjs/ui/components/HeaderSearchButton.js +6 -1
- package/lib/commonjs/ui/components/ModalHeader.js +69 -0
- package/lib/commonjs/ui/components/ToolButton.js +90 -0
- package/lib/commonjs/ui/components/index.js +7 -0
- package/lib/commonjs/ui/index.js +8 -0
- package/lib/commonjs/ui/toolTheme.js +96 -0
- package/lib/commonjs/utils/index.js +38 -0
- package/lib/commonjs/utils/persistentStorage.js +6 -3
- package/lib/commonjs/utils/stateSnapshotRegistry.js +71 -0
- package/lib/module/dataViewer/ThemedSplitView.js +617 -0
- package/lib/module/dataViewer/index.js +7 -1
- package/lib/module/dataViewer/objectDiff.js +297 -0
- package/lib/module/hooks/index.js +1 -0
- package/lib/module/hooks/safe-area-impl.js +1 -1
- package/lib/module/hooks/usePersistedState.js +68 -0
- package/lib/module/icons/index.js +1 -0
- package/lib/module/index.js +6 -1
- package/lib/module/storage/devToolsStorageKeys.js +31 -0
- package/lib/module/sync/wireBudget.js +92 -0
- package/lib/module/ui/components/HeaderSearchButton.js +6 -1
- package/lib/module/ui/components/ModalHeader.js +70 -2
- package/lib/module/ui/components/ToolButton.js +86 -0
- package/lib/module/ui/components/index.js +1 -0
- package/lib/module/ui/index.js +3 -0
- package/lib/module/ui/toolTheme.js +93 -0
- package/lib/module/utils/index.js +2 -0
- package/lib/module/utils/persistentStorage.js +6 -3
- package/lib/module/utils/stateSnapshotRegistry.js +64 -0
- package/lib/typescript/commonjs/dataViewer/ThemedSplitView.d.ts +28 -0
- package/lib/typescript/commonjs/dataViewer/ThemedSplitView.d.ts.map +1 -0
- package/lib/typescript/commonjs/dataViewer/index.d.ts +2 -0
- package/lib/typescript/commonjs/dataViewer/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/dataViewer/objectDiff.d.ts +67 -0
- package/lib/typescript/commonjs/dataViewer/objectDiff.d.ts.map +1 -0
- package/lib/typescript/commonjs/hooks/index.d.ts +1 -0
- package/lib/typescript/commonjs/hooks/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/hooks/safe-area-impl.d.ts +1 -1
- package/lib/typescript/commonjs/hooks/usePersistedState.d.ts +16 -0
- package/lib/typescript/commonjs/hooks/usePersistedState.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/index.d.ts +1 -0
- package/lib/typescript/commonjs/icons/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +3 -2
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/storage/devToolsStorageKeys.d.ts +28 -0
- package/lib/typescript/commonjs/storage/devToolsStorageKeys.d.ts.map +1 -1
- package/lib/typescript/commonjs/sync/wireBudget.d.ts +50 -0
- package/lib/typescript/commonjs/sync/wireBudget.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/HeaderSearchButton.d.ts +3 -1
- package/lib/typescript/commonjs/ui/components/HeaderSearchButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/ModalHeader.d.ts +13 -1
- package/lib/typescript/commonjs/ui/components/ModalHeader.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/ToolButton.d.ts +24 -0
- package/lib/typescript/commonjs/ui/components/ToolButton.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/index.d.ts +4 -0
- package/lib/typescript/commonjs/ui/components/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/index.d.ts +1 -0
- package/lib/typescript/commonjs/ui/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/toolTheme.d.ts +68 -0
- package/lib/typescript/commonjs/ui/toolTheme.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/index.d.ts +2 -0
- package/lib/typescript/commonjs/utils/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/utils/persistentStorage.d.ts.map +1 -1
- package/lib/typescript/commonjs/utils/stateSnapshotRegistry.d.ts +111 -0
- package/lib/typescript/commonjs/utils/stateSnapshotRegistry.d.ts.map +1 -0
- package/lib/typescript/module/dataViewer/ThemedSplitView.d.ts +28 -0
- package/lib/typescript/module/dataViewer/ThemedSplitView.d.ts.map +1 -0
- package/lib/typescript/module/dataViewer/index.d.ts +2 -0
- package/lib/typescript/module/dataViewer/index.d.ts.map +1 -1
- package/lib/typescript/module/dataViewer/objectDiff.d.ts +67 -0
- package/lib/typescript/module/dataViewer/objectDiff.d.ts.map +1 -0
- package/lib/typescript/module/hooks/index.d.ts +1 -0
- package/lib/typescript/module/hooks/index.d.ts.map +1 -1
- package/lib/typescript/module/hooks/safe-area-impl.d.ts +1 -1
- package/lib/typescript/module/hooks/usePersistedState.d.ts +16 -0
- package/lib/typescript/module/hooks/usePersistedState.d.ts.map +1 -0
- package/lib/typescript/module/icons/index.d.ts +1 -0
- package/lib/typescript/module/icons/index.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +3 -2
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/storage/devToolsStorageKeys.d.ts +28 -0
- package/lib/typescript/module/storage/devToolsStorageKeys.d.ts.map +1 -1
- package/lib/typescript/module/sync/wireBudget.d.ts +50 -0
- package/lib/typescript/module/sync/wireBudget.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/HeaderSearchButton.d.ts +3 -1
- package/lib/typescript/module/ui/components/HeaderSearchButton.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/ModalHeader.d.ts +13 -1
- package/lib/typescript/module/ui/components/ModalHeader.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/ToolButton.d.ts +24 -0
- package/lib/typescript/module/ui/components/ToolButton.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/index.d.ts +4 -0
- package/lib/typescript/module/ui/components/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/index.d.ts +1 -0
- package/lib/typescript/module/ui/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/toolTheme.d.ts +68 -0
- package/lib/typescript/module/ui/toolTheme.d.ts.map +1 -0
- package/lib/typescript/module/utils/index.d.ts +2 -0
- package/lib/typescript/module/utils/index.d.ts.map +1 -1
- package/lib/typescript/module/utils/persistentStorage.d.ts.map +1 -1
- package/lib/typescript/module/utils/stateSnapshotRegistry.d.ts +111 -0
- package/lib/typescript/module/utils/stateSnapshotRegistry.d.ts.map +1 -0
- package/package.json +4 -4
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Size guards for anything a tool puts on the sync wire.
|
|
3
|
+
*
|
|
4
|
+
* Every adapter faces the same problem: a snapshot is rebuilt and serialized
|
|
5
|
+
* on the device's JS thread ~5x/sec while a dashboard watches, and one fat or
|
|
6
|
+
* unserializable field can either freeze that thread or blow the emit layer's
|
|
7
|
+
* budget — which drops the WHOLE snapshot and leaves the panel stale.
|
|
8
|
+
*
|
|
9
|
+
* Two rules make that safe, and both are easy to get subtly wrong, which is
|
|
10
|
+
* why they live here instead of being copied per adapter:
|
|
11
|
+
*
|
|
12
|
+
* 1. NEVER measure by serializing. `JSON.stringify(value).length` is
|
|
13
|
+
* O(payload) and allocates the whole string — an unbounded cost to
|
|
14
|
+
* enforce a 16KB cap, i.e. the protection becomes the freeze. Walk with
|
|
15
|
+
* an early abort instead: the cost is O(limit) no matter how big the
|
|
16
|
+
* value, and a string costs a length read rather than a scan.
|
|
17
|
+
*
|
|
18
|
+
* 2. Only reach for `JSON.stringify` when the walk saw something that could
|
|
19
|
+
* actually make it throw. A value straight out of `JSON.parse` — which is
|
|
20
|
+
* what a network body or a stored string is — is a finite tree of plain
|
|
21
|
+
* values and can never throw, so the check is pure waste on the common
|
|
22
|
+
* path.
|
|
23
|
+
*/
|
|
24
|
+
export interface SizeWalk {
|
|
25
|
+
/** Bytes counted before the walk finished or passed `limit`. */
|
|
26
|
+
bytes: number;
|
|
27
|
+
/**
|
|
28
|
+
* An object/array was reached by more than one path. A cycle always causes
|
|
29
|
+
* this, so `false` PROVES the value is a tree and therefore cycle-free.
|
|
30
|
+
* (`true` does not prove a cycle — plain structural sharing sets it too.)
|
|
31
|
+
*/
|
|
32
|
+
sawRepeat: boolean;
|
|
33
|
+
/** A bigint was reached. `JSON.stringify` THROWS on those, unlike functions. */
|
|
34
|
+
sawBigInt: boolean;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Approximate JSON size, aborting as soon as `limit` is passed — O(limit),
|
|
38
|
+
* never O(payload). Returns the bytes counted so far, so one walk can both
|
|
39
|
+
* threshold ("over the per-field cap?") and accumulate ("how much of the
|
|
40
|
+
* snapshot budget is left?").
|
|
41
|
+
*/
|
|
42
|
+
export declare function approxJsonSize(value: unknown, limit: number): SizeWalk;
|
|
43
|
+
/**
|
|
44
|
+
* Should this value be withheld from the wire — too big, or unserializable?
|
|
45
|
+
*
|
|
46
|
+
* The ordering is the point: measure with the early-abort walk, and only pay
|
|
47
|
+
* for `JSON.stringify` when the walk found a reason it might throw.
|
|
48
|
+
*/
|
|
49
|
+
export declare function isOverWireBudget(value: unknown, limit: number): boolean;
|
|
50
|
+
//# sourceMappingURL=wireBudget.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wireBudget.d.ts","sourceRoot":"","sources":["../../../../src/sync/wireBudget.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAIH,MAAM,WAAW,QAAQ;IACvB,gEAAgE;IAChE,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,SAAS,EAAE,OAAO,CAAC;IACnB,gFAAgF;IAChF,SAAS,EAAE,OAAO,CAAC;CACpB;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,QAAQ,CAmCtE;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAUvE"}
|
|
@@ -3,7 +3,9 @@ interface HeaderSearchButtonProps {
|
|
|
3
3
|
size?: number;
|
|
4
4
|
color?: string;
|
|
5
5
|
style?: any;
|
|
6
|
+
accessibilityLabel?: string;
|
|
7
|
+
testID?: string;
|
|
6
8
|
}
|
|
7
|
-
export declare function HeaderSearchButton({ onPress, size, color, style, }: HeaderSearchButtonProps): import("react").JSX.Element;
|
|
9
|
+
export declare function HeaderSearchButton({ onPress, size, color, style, accessibilityLabel, testID, }: HeaderSearchButtonProps): import("react").JSX.Element;
|
|
8
10
|
export {};
|
|
9
11
|
//# sourceMappingURL=HeaderSearchButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeaderSearchButton.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/HeaderSearchButton.tsx"],"names":[],"mappings":"AAIA,UAAU,uBAAuB;IAC/B,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,GAAG,CAAC;
|
|
1
|
+
{"version":3,"file":"HeaderSearchButton.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/HeaderSearchButton.tsx"],"names":[],"mappings":"AAIA,UAAU,uBAAuB;IAC/B,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,kBAAkB,CAAC,EACjC,OAAO,EACP,IAAS,EACT,KAA8B,EAC9B,KAAK,EACL,kBAA6B,EAC7B,MAAM,GACP,EAAE,uBAAuB,+BAazB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
2
|
interface ModalHeaderProps {
|
|
3
3
|
children: ReactNode;
|
|
4
4
|
}
|
|
@@ -7,6 +7,7 @@ export declare namespace ModalHeader {
|
|
|
7
7
|
var Navigation: typeof import("./ModalHeader").Navigation;
|
|
8
8
|
var Content: typeof import("./ModalHeader").Content;
|
|
9
9
|
var Actions: typeof import("./ModalHeader").Actions;
|
|
10
|
+
var Search: typeof HeaderSearch;
|
|
10
11
|
}
|
|
11
12
|
interface NavigationProps {
|
|
12
13
|
onBack?: () => void;
|
|
@@ -30,5 +31,16 @@ export declare function Actions({ children }: ActionsProps): import("react").JSX
|
|
|
30
31
|
export declare namespace Actions {
|
|
31
32
|
var displayName: string;
|
|
32
33
|
}
|
|
34
|
+
interface SearchProps {
|
|
35
|
+
value: string;
|
|
36
|
+
onChangeText: (text: string) => void;
|
|
37
|
+
/** Called when the user dismisses search (the inline ✕). Clear your query
|
|
38
|
+
* and flip your `isSearchActive` state here. */
|
|
39
|
+
onCancel: () => void;
|
|
40
|
+
placeholder?: string;
|
|
41
|
+
/** Focus the input as soon as it appears (default true). */
|
|
42
|
+
autoFocus?: boolean;
|
|
43
|
+
}
|
|
44
|
+
export declare function HeaderSearch({ value, onChangeText, onCancel, placeholder, autoFocus, }: SearchProps): import("react").JSX.Element;
|
|
33
45
|
export {};
|
|
34
46
|
//# sourceMappingURL=ModalHeader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModalHeader.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/ModalHeader.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"ModalHeader.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/ModalHeader.tsx"],"names":[],"mappings":"AACA,OAAO,EAAqB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAM1D,UAAU,gBAAgB;IACxB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,WAAW,CAAC,EAAE,QAAQ,EAAE,EAAE,gBAAgB,+BAEzD;yBAFe,WAAW;;;;;;AAK3B,UAAU,eAAe;IACvB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB;AAED,wBAAgB,UAAU,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,eAAe,sCAiCnF;AAGD,UAAU,YAAY;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,wBAAgB,OAAO,CAAC,EACtB,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,QAAQ,GACT,EAAE,YAAY,+BAoCd;AAID,UAAU,YAAY;IACpB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,wBAAgB,OAAO,CAAC,EAAE,QAAQ,EAAE,EAAE,YAAY,+BAMjD;yBANe,OAAO;;;AAYvB,UAAU,WAAW;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC;oDACgD;IAChD,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,4DAA4D;IAC5D,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,YAAY,EACZ,QAAQ,EACR,WAAyB,EACzB,SAAgB,GACjB,EAAE,WAAW,+BAyBb"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import { type ViewStyle } from "react-native";
|
|
3
|
+
export interface ToolButtonProps {
|
|
4
|
+
label: string;
|
|
5
|
+
onPress: () => void;
|
|
6
|
+
/**
|
|
7
|
+
* - primary: filled teal — the screen's main action
|
|
8
|
+
* - danger: outlined red — destructive actions (clear, delete)
|
|
9
|
+
* - warning: outlined amber — revert/override actions
|
|
10
|
+
* - ghost: borderless — secondary actions
|
|
11
|
+
*/
|
|
12
|
+
variant?: "primary" | "danger" | "warning" | "ghost";
|
|
13
|
+
size?: "small" | "medium";
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
/** Optional leading icon element. */
|
|
16
|
+
icon?: ReactNode;
|
|
17
|
+
style?: ViewStyle;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* The shared action button for dev-tool surfaces. Fills the gap where every
|
|
21
|
+
* tool hand-styled its own TouchableOpacity for "Clear", "Apply", "Reset".
|
|
22
|
+
*/
|
|
23
|
+
export declare function ToolButton({ label, onPress, variant, size, disabled, icon, style, }: ToolButtonProps): import("react").JSX.Element;
|
|
24
|
+
//# sourceMappingURL=ToolButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToolButton.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/ToolButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAIL,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAGtB,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,SAAS,GAAG,OAAO,CAAC;IACrD,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,qCAAqC;IACrC,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,OAAO,EACP,OAAmB,EACnB,IAAe,EACf,QAAgB,EAChB,IAAI,EACJ,KAAK,GACN,EAAE,eAAe,+BAgCjB"}
|
|
@@ -12,9 +12,13 @@ export { CompactFilterChips, } from "./CompactFilterChips";
|
|
|
12
12
|
export type { FilterChipGroup } from "./CompactFilterChips";
|
|
13
13
|
export { Badge, StatusBadge, CountBadge, TypeBadge, MethodBadge, } from "./Badge";
|
|
14
14
|
export { TabSelector } from "./TabSelector";
|
|
15
|
+
export type { Tab } from "./TabSelector";
|
|
16
|
+
export { ToolButton } from "./ToolButton";
|
|
17
|
+
export type { ToolButtonProps } from "./ToolButton";
|
|
15
18
|
export { EventListItem } from "./EventListItem";
|
|
16
19
|
export { StatsCard } from "./StatsCard";
|
|
17
20
|
export { CompactRow } from "./CompactRow";
|
|
21
|
+
export type { CompactRowProps } from "./CompactRow";
|
|
18
22
|
export { DevToolsCard, DEVTOOLS_CARD_CONSTANTS } from "./DevToolsCard";
|
|
19
23
|
export type { DevToolsCardProps } from "./DevToolsCard";
|
|
20
24
|
export { HeaderSearchButton } from "./HeaderSearchButton";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,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MAAM,mBAAmB,CAAC;AAG/D,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,YAAY,EACZ,UAAU,EACV,gBAAgB,GACjB,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EACV,QAAQ,EACR,WAAW,EACX,gBAAgB,EAChB,aAAa,EACb,oBAAoB,EACpB,eAAe,EACf,iBAAiB,EACjB,eAAe,EACf,qBAAqB,EACrB,uBAAuB,GACxB,MAAM,sBAAsB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ui/index.ts"],"names":[],"mappings":"AAGA,cAAc,cAAc,CAAC;AAG7B,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAG1E,cAAc,UAAU,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ui/index.ts"],"names":[],"mappings":"AAGA,cAAc,cAAc,CAAC;AAG7B,OAAO,EAAE,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAGxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAG1E,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import type { TextStyle } from "react-native";
|
|
2
|
+
/**
|
|
3
|
+
* Semantic design tokens for dev-tool surfaces — the single documented entry
|
|
4
|
+
* point for custom-tool authors (and, over time, internal tools).
|
|
5
|
+
*
|
|
6
|
+
* Buoy historically grew three color systems (`buoyColors`, `gameUIColors`,
|
|
7
|
+
* `macOSColors`) with tribal knowledge about which to use where. `toolTheme`
|
|
8
|
+
* encodes that knowledge: surfaces/text come from the brand palette, semantic
|
|
9
|
+
* status colors from the gameUI palette. Consumers should not need to know
|
|
10
|
+
* that split exists.
|
|
11
|
+
*/
|
|
12
|
+
export declare const toolTheme: {
|
|
13
|
+
readonly colors: {
|
|
14
|
+
/** Modal/page background. */
|
|
15
|
+
readonly surface: "#121212";
|
|
16
|
+
/** Card / row background, one step above surface. */
|
|
17
|
+
readonly card: "#1A1A1A";
|
|
18
|
+
/** Pressed/hover background. */
|
|
19
|
+
readonly hover: "#242424";
|
|
20
|
+
/** Text-input background. */
|
|
21
|
+
readonly input: "#2A2A2A";
|
|
22
|
+
readonly border: "#333333";
|
|
23
|
+
readonly borderStrong: "#444444";
|
|
24
|
+
readonly text: "#E0E0E0";
|
|
25
|
+
readonly textSecondary: "#A0A0A0";
|
|
26
|
+
readonly textMuted: "#888888";
|
|
27
|
+
/** Buoy teal — primary accent. */
|
|
28
|
+
readonly accent: "#20C997";
|
|
29
|
+
readonly success: string;
|
|
30
|
+
readonly warning: string;
|
|
31
|
+
readonly error: string;
|
|
32
|
+
readonly info: string;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Text presets matching the styles internal tools re-declare per file.
|
|
36
|
+
* Spread into a style: `style={[toolTheme.text.label, { color: ... }]}`.
|
|
37
|
+
*/
|
|
38
|
+
readonly text: {
|
|
39
|
+
/** Modal/section titles. */
|
|
40
|
+
readonly title: TextStyle;
|
|
41
|
+
/** Default body copy. */
|
|
42
|
+
readonly body: TextStyle;
|
|
43
|
+
/** Secondary copy under a primary line. */
|
|
44
|
+
readonly subtitle: TextStyle;
|
|
45
|
+
/** ALL-CAPS section labels ("LOCAL OVERRIDES"). */
|
|
46
|
+
readonly label: TextStyle;
|
|
47
|
+
/** Monospace values (keys, ids, payload snippets). */
|
|
48
|
+
readonly mono: TextStyle;
|
|
49
|
+
/** Timestamps and fine print. */
|
|
50
|
+
readonly small: TextStyle;
|
|
51
|
+
};
|
|
52
|
+
/** 4-based spacing scale used across tool surfaces. */
|
|
53
|
+
readonly spacing: {
|
|
54
|
+
readonly xs: 4;
|
|
55
|
+
readonly sm: 8;
|
|
56
|
+
readonly md: 12;
|
|
57
|
+
readonly lg: 16;
|
|
58
|
+
readonly xl: 24;
|
|
59
|
+
};
|
|
60
|
+
readonly radius: {
|
|
61
|
+
readonly sm: 6;
|
|
62
|
+
readonly md: 8;
|
|
63
|
+
readonly lg: 12;
|
|
64
|
+
readonly pill: 9999;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
export type ToolTheme = typeof toolTheme;
|
|
68
|
+
//# sourceMappingURL=toolTheme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toolTheme.d.ts","sourceRoot":"","sources":["../../../../src/ui/toolTheme.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAG9C;;;;;;;;;GASG;AACH,eAAO,MAAM,SAAS;;QAElB,6BAA6B;;QAE7B,qDAAqD;;QAErD,gCAAgC;;QAEhC,6BAA6B;;;;;;;QAS7B,kCAAkC;;;;;;;IAQpC;;;OAGG;;QAED,4BAA4B;wBAKvB,SAAS;QACd,yBAAyB;uBAIpB,SAAS;QACd,2CAA2C;2BAItC,SAAS;QACd,mDAAmD;wBAO9C,SAAS;QACd,sDAAsD;uBAKjD,SAAS;QACd,iCAAiC;wBAK5B,SAAS;;IAGhB,uDAAuD;;;;;;;;;;;;;;CAe/C,CAAC;AAEX,MAAM,MAAM,SAAS,GAAG,OAAO,SAAS,CAAC"}
|
|
@@ -7,6 +7,8 @@ export { getValueType, isPrimitive, isJsonSerializable, isValidJson, getConstruc
|
|
|
7
7
|
export { parseValue, formatValue, getTypeColor, truncateText, flattenObject, formatPath, } from "./valueFormatting";
|
|
8
8
|
export { loadOptionalModule, getCachedOptionalModule } from "./loadOptionalModule";
|
|
9
9
|
export { setRenderCaptureProvider, getRenderCaptureProvider, type RenderCaptureProvider, type RenderCaptureSummary, type RenderCaptureTopComponent, } from "./renderCaptureRegistry";
|
|
10
|
+
export { registerStateSnapshotProvider, getStateSnapshotProviders, getStateSnapshotProvider, subscribeToStateSnapshotProviders, type StateSnapshotProvider, type StateSnapshotProviderStatus, type StateSnapshotCapture, type StateSnapshotRestoreResult, type StateSnapshotPreview, type StateSnapshotPreviewItem, type StateSnapshotPreviewVerdict, } from "./stateSnapshotRegistry";
|
|
11
|
+
export { serialize as superJsonSerialize, deserialize as superJsonDeserialize, type SuperJSONResult, } from "./minimalSuperJSON";
|
|
10
12
|
export { reloadApp, scheduleReloadApp, resolveReloadStrategy, REMOTE_RELOAD_DELAY_MS, type ReloadStrategy, type ResolvedReloadStrategy, } from "./reloadApp";
|
|
11
13
|
export { Subscribable, type SubscribableListener } from "./subscribable";
|
|
12
14
|
export { subscriberCountNotifier, subscribeToSubscriberCountChanges, notifySubscriberCountChange, } from "./subscriberCountNotifier";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EACL,iBAAiB,EACjB,wBAAwB,EACxB,qBAAqB,EACrB,KAAK,eAAe,GACrB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EACL,YAAY,EACZ,WAAW,EACX,kBAAkB,EAClB,WAAW,EACX,kBAAkB,EAClB,OAAO,EACP,YAAY,GACb,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,UAAU,EACV,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,UAAU,GACX,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AACnF,OAAO,EACL,wBAAwB,EACxB,wBAAwB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,GAC/B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,SAAS,EACT,iBAAiB,EACjB,qBAAqB,EACrB,sBAAsB,EACtB,KAAK,cAAc,EACnB,KAAK,sBAAsB,GAC5B,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,YAAY,EAAE,KAAK,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACzE,OAAO,EACL,uBAAuB,EACvB,iCAAiC,EACjC,2BAA2B,GAC5B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,aAAa,EACb,eAAe,EACf,eAAe,EACf,yBAAyB,EACzB,aAAa,EACb,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EACL,iBAAiB,EACjB,wBAAwB,EACxB,qBAAqB,EACrB,KAAK,eAAe,GACrB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EACL,YAAY,EACZ,WAAW,EACX,kBAAkB,EAClB,WAAW,EACX,kBAAkB,EAClB,OAAO,EACP,YAAY,GACb,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,UAAU,EACV,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,UAAU,GACX,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AACnF,OAAO,EACL,wBAAwB,EACxB,wBAAwB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,GAC/B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,6BAA6B,EAC7B,yBAAyB,EACzB,wBAAwB,EACxB,iCAAiC,EACjC,KAAK,qBAAqB,EAC1B,KAAK,2BAA2B,EAChC,KAAK,oBAAoB,EACzB,KAAK,0BAA0B,EAC/B,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,2BAA2B,GACjC,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,SAAS,IAAI,kBAAkB,EAC/B,WAAW,IAAI,oBAAoB,EACnC,KAAK,eAAe,GACrB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,SAAS,EACT,iBAAiB,EACjB,qBAAqB,EACrB,sBAAsB,EACtB,KAAK,cAAc,EACnB,KAAK,sBAAsB,GAC5B,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,YAAY,EAAE,KAAK,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACzE,OAAO,EACL,uBAAuB,EACvB,iCAAiC,EACjC,2BAA2B,GAC5B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,aAAa,EACb,eAAe,EACf,eAAe,EACf,yBAAyB,EACzB,aAAa,EACb,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,kBAAkB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"persistentStorage.d.ts","sourceRoot":"","sources":["../../../../src/utils/persistentStorage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AA2CH,MAAM,WAAW,eAAe;IAC9B,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAC7C,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnD,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACvC,UAAU,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAChC,QAAQ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CAGjE;AAED;;GAEG;AACH,wBAAsB,qBAAqB,IAAI,OAAO,CAAC,cAAc,CAAC,CAGrE;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAIvC"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cross-package bridge for app-state snapshot & restore (Time Machine).
|
|
3
|
+
*
|
|
4
|
+
* Each state tool (`@buoy-gg/storage`, `@buoy-gg/redux`, `@buoy-gg/zustand`,
|
|
5
|
+
* `@buoy-gg/jotai`, `@buoy-gg/react-query`) registers a provider here at
|
|
6
|
+
* module init (or from its app-lifetime sync hook); `@buoy-gg/time-machine`
|
|
7
|
+
* consumes the registry. Neither side imports the other — same
|
|
8
|
+
* optional-capability pattern as renderCaptureRegistry.
|
|
9
|
+
*
|
|
10
|
+
* Apps can also register custom providers for state Buoy doesn't know about.
|
|
11
|
+
*/
|
|
12
|
+
export interface StateSnapshotProviderStatus {
|
|
13
|
+
canCapture: boolean;
|
|
14
|
+
canRestore: boolean;
|
|
15
|
+
/** Human-actionable reason when a capability is unavailable. */
|
|
16
|
+
detail?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface StateSnapshotCapture {
|
|
19
|
+
/**
|
|
20
|
+
* Raw JS value tree. May contain Date/Map/Set/etc. (the vault serializes
|
|
21
|
+
* with superjson) but MUST NOT contain functions — providers strip them
|
|
22
|
+
* and record how to re-graft on restore inside their own data envelope.
|
|
23
|
+
*/
|
|
24
|
+
data: unknown;
|
|
25
|
+
warnings: string[];
|
|
26
|
+
}
|
|
27
|
+
export interface StateSnapshotRestoreResult {
|
|
28
|
+
/** True when the state verifiably changed (or was verified already-equal). */
|
|
29
|
+
ok: boolean;
|
|
30
|
+
/** Keys / stores / atoms / queries written. */
|
|
31
|
+
applied: number;
|
|
32
|
+
/** Items that could not be restored, with a reason each. */
|
|
33
|
+
skipped: {
|
|
34
|
+
id: string;
|
|
35
|
+
reason: string;
|
|
36
|
+
}[];
|
|
37
|
+
warnings: string[];
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Per-item verdict in a Restore Preview. The critical distinction:
|
|
41
|
+
* "changed" means the restore WILL apply this difference; "wont-apply" means
|
|
42
|
+
* a difference exists (or an item does) that restore can NOT apply, with the
|
|
43
|
+
* reason. A preview that shows raw diffs without this distinction lies.
|
|
44
|
+
*/
|
|
45
|
+
export type StateSnapshotPreviewVerdict = "added" | "removed" | "changed" | "unchanged" | "wont-apply" | "recomputes" | "too-large";
|
|
46
|
+
export interface StateSnapshotPreviewItem {
|
|
47
|
+
/** Stable id within the source, e.g. "async:@cart", "mmkv:default/theme". */
|
|
48
|
+
key: string;
|
|
49
|
+
/** Display name (usually the bare key/store/atom/queryKey). */
|
|
50
|
+
label: string;
|
|
51
|
+
verdict: StateSnapshotPreviewVerdict;
|
|
52
|
+
/** Required for wont-apply/recomputes/too-large — shown to the user. */
|
|
53
|
+
reason?: string;
|
|
54
|
+
/** RAW values (UI normalizes via toDiffable at render time). */
|
|
55
|
+
oldValue?: unknown;
|
|
56
|
+
newValue?: unknown;
|
|
57
|
+
}
|
|
58
|
+
export interface StateSnapshotPreview {
|
|
59
|
+
items: StateSnapshotPreviewItem[];
|
|
60
|
+
/** Source-level annotations, e.g. "4 store actions preserved (not diffed)". */
|
|
61
|
+
notes: string[];
|
|
62
|
+
}
|
|
63
|
+
export interface StateSnapshotProvider {
|
|
64
|
+
/** Stable source id, e.g. "storage" | "redux" | "zustand" | "jotai" | "query". */
|
|
65
|
+
id: string;
|
|
66
|
+
/** Display name, e.g. "Storage", "React Query". */
|
|
67
|
+
label: string;
|
|
68
|
+
/** Cheap capability probe — drives UI gating and restore-mode suggestions. */
|
|
69
|
+
status(): StateSnapshotProviderStatus;
|
|
70
|
+
capture(): Promise<StateSnapshotCapture>;
|
|
71
|
+
/**
|
|
72
|
+
* Apply `data` to live state. Both option lists use preview item keys (the
|
|
73
|
+
* same `key` values previewItems emits), and both mean "leave everything
|
|
74
|
+
* else untouched in BOTH directions" — not written from the snapshot, and
|
|
75
|
+
* not deleted for being absent from it:
|
|
76
|
+
* - `excludeKeys`: items the user opted OUT of (touch all but these).
|
|
77
|
+
* - `includeKeys`: a positive scope (touch ONLY these) — used by scoped
|
|
78
|
+
* restore points. When present it wins; excludeKeys still applies on top.
|
|
79
|
+
*/
|
|
80
|
+
restore(data: unknown, options?: {
|
|
81
|
+
excludeKeys?: readonly string[];
|
|
82
|
+
includeKeys?: readonly string[];
|
|
83
|
+
}): Promise<StateSnapshotRestoreResult>;
|
|
84
|
+
/**
|
|
85
|
+
* Optional: wipe this source to fresh-install state. Used by the
|
|
86
|
+
* "restore baseline" flow (typically followed by a JS reload so in-memory
|
|
87
|
+
* stores rebuild themselves from the wiped persisted state).
|
|
88
|
+
*/
|
|
89
|
+
clear?(): Promise<StateSnapshotRestoreResult>;
|
|
90
|
+
/**
|
|
91
|
+
* Optional: decompose "what would restoring `target` change?" into
|
|
92
|
+
* item-level verdicts. `base` is another snapshot's data for this source;
|
|
93
|
+
* omitted = compare against LIVE state (the only mode where restore
|
|
94
|
+
* semantics — wont-apply etc. — are meaningful).
|
|
95
|
+
* Providers without it get a whole-source fallback via objectDiff.
|
|
96
|
+
*/
|
|
97
|
+
previewItems?(target: unknown, base?: unknown): Promise<StateSnapshotPreview>;
|
|
98
|
+
}
|
|
99
|
+
type Listener = () => void;
|
|
100
|
+
/**
|
|
101
|
+
* Register a provider. Last registration wins for a given id.
|
|
102
|
+
* Returns an unregister function (only removes the provider if it is still
|
|
103
|
+
* the registered one for that id).
|
|
104
|
+
*/
|
|
105
|
+
export declare function registerStateSnapshotProvider(provider: StateSnapshotProvider): () => void;
|
|
106
|
+
export declare function getStateSnapshotProviders(): StateSnapshotProvider[];
|
|
107
|
+
export declare function getStateSnapshotProvider(id: string): StateSnapshotProvider | null;
|
|
108
|
+
/** Notifies when providers register/unregister (query registers late). */
|
|
109
|
+
export declare function subscribeToStateSnapshotProviders(listener: Listener): () => void;
|
|
110
|
+
export {};
|
|
111
|
+
//# sourceMappingURL=stateSnapshotRegistry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stateSnapshotRegistry.d.ts","sourceRoot":"","sources":["../../../../src/utils/stateSnapshotRegistry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,MAAM,WAAW,2BAA2B;IAC1C,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,gEAAgE;IAChE,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,oBAAoB;IACnC;;;;OAIG;IACH,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,MAAM,WAAW,0BAA0B;IACzC,8EAA8E;IAC9E,EAAE,EAAE,OAAO,CAAC;IACZ,+CAA+C;IAC/C,OAAO,EAAE,MAAM,CAAC;IAChB,4DAA4D;IAC5D,OAAO,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC1C,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED;;;;;GAKG;AACH,MAAM,MAAM,2BAA2B,GACnC,OAAO,GACP,SAAS,GACT,SAAS,GACT,WAAW,GACX,YAAY,GACZ,YAAY,GACZ,WAAW,CAAC;AAEhB,MAAM,WAAW,wBAAwB;IACvC,6EAA6E;IAC7E,GAAG,EAAE,MAAM,CAAC;IACZ,+DAA+D;IAC/D,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,2BAA2B,CAAC;IACrC,wEAAwE;IACxE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gEAAgE;IAChE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,wBAAwB,EAAE,CAAC;IAClC,+EAA+E;IAC/E,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,MAAM,WAAW,qBAAqB;IACpC,kFAAkF;IAClF,EAAE,EAAE,MAAM,CAAC;IACX,mDAAmD;IACnD,KAAK,EAAE,MAAM,CAAC;IACd,8EAA8E;IAC9E,MAAM,IAAI,2BAA2B,CAAC;IACtC,OAAO,IAAI,OAAO,CAAC,oBAAoB,CAAC,CAAC;IACzC;;;;;;;;OAQG;IACH,OAAO,CACL,IAAI,EAAE,OAAO,EACb,OAAO,CAAC,EAAE;QACR,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;QAChC,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;KACjC,GACA,OAAO,CAAC,0BAA0B,CAAC,CAAC;IACvC;;;;OAIG;IACH,KAAK,CAAC,IAAI,OAAO,CAAC,0BAA0B,CAAC,CAAC;IAC9C;;;;;;OAMG;IACH,YAAY,CAAC,CACX,MAAM,EAAE,OAAO,EACf,IAAI,CAAC,EAAE,OAAO,GACb,OAAO,CAAC,oBAAoB,CAAC,CAAC;CAClC;AAED,KAAK,QAAQ,GAAG,MAAM,IAAI,CAAC;AAe3B;;;;GAIG;AACH,wBAAgB,6BAA6B,CAC3C,QAAQ,EAAE,qBAAqB,GAC9B,MAAM,IAAI,CASZ;AAED,wBAAgB,yBAAyB,IAAI,qBAAqB,EAAE,CAEnE;AAED,wBAAgB,wBAAwB,CACtC,EAAE,EAAE,MAAM,GACT,qBAAqB,GAAG,IAAI,CAE9B;AAED,0EAA0E;AAC1E,wBAAgB,iCAAiC,CAC/C,QAAQ,EAAE,QAAQ,GACjB,MAAM,IAAI,CAKZ"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@buoy-gg/shared-ui",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.18",
|
|
4
4
|
"description": "Shared UI components, hooks, and utilities",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -136,10 +136,10 @@
|
|
|
136
136
|
],
|
|
137
137
|
"sideEffects": false,
|
|
138
138
|
"dependencies": {
|
|
139
|
-
"@buoy-gg/floating-tools-core": "^7.0.
|
|
139
|
+
"@buoy-gg/floating-tools-core": "^7.0.18"
|
|
140
140
|
},
|
|
141
141
|
"peerDependencies": {
|
|
142
|
-
"@buoy-gg/license": "7.0.
|
|
142
|
+
"@buoy-gg/license": "7.0.18",
|
|
143
143
|
"@react-native-clipboard/clipboard": "*",
|
|
144
144
|
"expo-clipboard": "*",
|
|
145
145
|
"expo-file-system": "*",
|
|
@@ -167,7 +167,7 @@
|
|
|
167
167
|
"expo-clipboard": "~7.1.5",
|
|
168
168
|
"react-native-safe-area-context": "^5.6.2",
|
|
169
169
|
"typescript": "~5.8.3",
|
|
170
|
-
"@buoy-gg/license": "^7.0.
|
|
170
|
+
"@buoy-gg/license": "^7.0.18"
|
|
171
171
|
},
|
|
172
172
|
"react-native-builder-bob": {
|
|
173
173
|
"source": "src",
|