@buoy-gg/shared-ui 2.1.9 → 2.1.11
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/DataViewer.js +1 -3
- package/lib/commonjs/dataViewer/VirtualizedDataExplorer.js +3 -4
- package/lib/commonjs/hooks/safe-area-impl.js +1 -1
- package/lib/commonjs/icons/ImageOverlayIcon.js +142 -0
- package/lib/commonjs/icons/index.js +8 -0
- package/lib/commonjs/ui/components/EventHistoryViewer/EventHistoryViewer.js +2 -1
- package/lib/commonjs/ui/components/WindowControls.js +307 -46
- package/lib/commonjs/ui/components/index.js +6 -0
- package/lib/commonjs/utils/time/TickContext.js +43 -0
- package/lib/commonjs/utils/time/index.js +21 -1
- package/lib/commonjs/utils/time/useRelativeTime.js +36 -0
- package/lib/module/dataViewer/DataViewer.js +1 -3
- package/lib/module/dataViewer/VirtualizedDataExplorer.js +3 -4
- package/lib/module/hooks/safe-area-impl.js +1 -1
- package/lib/module/icons/ImageOverlayIcon.js +137 -0
- package/lib/module/icons/index.js +1 -0
- package/lib/module/ui/components/EventHistoryViewer/EventHistoryViewer.js +3 -2
- package/lib/module/ui/components/WindowControls.js +308 -48
- package/lib/module/ui/components/index.js +1 -1
- package/lib/module/utils/time/TickContext.js +38 -0
- package/lib/module/utils/time/index.js +3 -1
- package/lib/module/utils/time/useRelativeTime.js +33 -0
- package/lib/typescript/commonjs/dataViewer/VirtualizedDataExplorer.d.ts.map +1 -1
- package/lib/typescript/commonjs/hooks/safe-area-impl.d.ts +1 -1
- package/lib/typescript/commonjs/icons/ImageOverlayIcon.d.ts +14 -0
- package/lib/typescript/commonjs/icons/ImageOverlayIcon.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/ui/components/WindowControls.d.ts +8 -3
- package/lib/typescript/commonjs/ui/components/WindowControls.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/index.d.ts +1 -1
- package/lib/typescript/commonjs/ui/components/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/utils/time/TickContext.d.ts +21 -0
- package/lib/typescript/commonjs/utils/time/TickContext.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/time/index.d.ts +2 -0
- package/lib/typescript/commonjs/utils/time/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/utils/time/useRelativeTime.d.ts +11 -0
- package/lib/typescript/commonjs/utils/time/useRelativeTime.d.ts.map +1 -0
- package/lib/typescript/module/dataViewer/VirtualizedDataExplorer.d.ts.map +1 -1
- package/lib/typescript/module/hooks/safe-area-impl.d.ts +1 -1
- package/lib/typescript/module/icons/ImageOverlayIcon.d.ts +14 -0
- package/lib/typescript/module/icons/ImageOverlayIcon.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/ui/components/WindowControls.d.ts +8 -3
- package/lib/typescript/module/ui/components/WindowControls.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/index.d.ts +1 -1
- package/lib/typescript/module/ui/components/index.d.ts.map +1 -1
- package/lib/typescript/module/utils/time/TickContext.d.ts +21 -0
- package/lib/typescript/module/utils/time/TickContext.d.ts.map +1 -0
- package/lib/typescript/module/utils/time/index.d.ts +2 -0
- package/lib/typescript/module/utils/time/index.d.ts.map +1 -1
- package/lib/typescript/module/utils/time/useRelativeTime.d.ts +11 -0
- package/lib/typescript/module/utils/time/useRelativeTime.d.ts.map +1 -0
- package/package.json +14 -13
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useRelativeTime.d.ts","sourceRoot":"","sources":["../../../../../src/utils/time/useRelativeTime.ts"],"names":[],"mappings":"AAIA;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAC7B,SAAS,EAAE,IAAI,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,GAC1C,MAAM,CA2BR"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VirtualizedDataExplorer.d.ts","sourceRoot":"","sources":["../../../../src/dataViewer/VirtualizedDataExplorer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,OAAO,EAOL,EAAE,EAEH,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"VirtualizedDataExplorer.d.ts","sourceRoot":"","sources":["../../../../src/dataViewer/VirtualizedDataExplorer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,OAAO,EAOL,EAAE,EAEH,MAAM,OAAO,CAAC;AAm+Bf,UAAU,4BAA4B;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,SAAS,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,eAAO,MAAM,uBAAuB,EAAE,EAAE,CAAC,4BAA4B,CAmQpE,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
interface ImageOverlayIconProps {
|
|
3
|
+
size?: number;
|
|
4
|
+
color?: string;
|
|
5
|
+
glowColor?: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* ImageOverlayIcon - Icon for the Image Overlay dev tool
|
|
9
|
+
* Shows layered image frames with a mountain/sun motif,
|
|
10
|
+
* representing design mockup overlay functionality.
|
|
11
|
+
*/
|
|
12
|
+
export declare const ImageOverlayIcon: FC<ImageOverlayIconProps>;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=ImageOverlayIcon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImageOverlayIcon.d.ts","sourceRoot":"","sources":["../../../../src/icons/ImageOverlayIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAG3B,UAAU,qBAAqB;IAC7B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CAmKtD,CAAC"}
|
|
@@ -10,6 +10,7 @@ export { RouteMapIcon, RouteIcon, NavigationIcon } from "./RouteMapIcon";
|
|
|
10
10
|
export { StackPulseIcon, RenderPulseIcon, HighlightUpdatesIcon, } from "./StackPulseIcon";
|
|
11
11
|
export { RenderCountIcon } from "./RenderCountIcon";
|
|
12
12
|
export { BenchmarkIcon } from "./BenchmarkIcon";
|
|
13
|
+
export { ImageOverlayIcon } from "./ImageOverlayIcon";
|
|
13
14
|
export { IconBackground } from "./IconBackground";
|
|
14
15
|
export * from "./lucide-icons";
|
|
15
16
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/icons/index.tsx"],"names":[],"mappings":"AACA,cAAc,cAAc,CAAC;AAG7B,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAC/E,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAGvE,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAA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Ac,gBAAgB,CAAC"}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import type { ModalMode } from "../../JsModal";
|
|
2
|
+
/**
|
|
3
|
+
* Set whether window controls use the expandable iPad-style behavior.
|
|
4
|
+
* Called by the floating-tools settings system when the setting changes.
|
|
5
|
+
*/
|
|
6
|
+
export declare function setExpandableWindowControls(enabled: boolean): void;
|
|
2
7
|
interface WindowControlsProps {
|
|
3
8
|
/** Handler for close button */
|
|
4
9
|
onClose: () => void;
|
|
@@ -10,9 +15,9 @@ interface WindowControlsProps {
|
|
|
10
15
|
mode?: ModalMode;
|
|
11
16
|
}
|
|
12
17
|
/**
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
18
|
+
* iPad-style expandable window controls.
|
|
19
|
+
* Default: small macOS-style colored dots. On tap, expands to reveal
|
|
20
|
+
* large, easy-to-press buttons. Auto-dismisses after timeout or tap outside.
|
|
16
21
|
*/
|
|
17
22
|
export declare function WindowControls({ onClose, onMinimize, onToggleMode, mode, }: WindowControlsProps): import("react").JSX.Element;
|
|
18
23
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WindowControls.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/WindowControls.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WindowControls.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/WindowControls.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAQ/C;;;GAGG;AACH,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,OAAO,QAE3D;AAMD,UAAU,mBAAmB;IAC3B,+BAA+B;IAC/B,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,4EAA4E;IAC5E,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,sFAAsF;IACtF,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,2EAA2E;IAC3E,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB;AA+BD;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,EAC7B,OAAO,EACP,UAAU,EACV,YAAY,EACZ,IAAI,GACL,EAAE,mBAAmB,+BAoDrB"}
|
|
@@ -28,7 +28,7 @@ export { DataInspector } from "./DataInspector";
|
|
|
28
28
|
export { SearchBar } from "./SearchBar";
|
|
29
29
|
export { DynamicFilterView, } from "./DynamicFilterView";
|
|
30
30
|
export type { DynamicFilterConfig, } from "./DynamicFilterView";
|
|
31
|
-
export { WindowControls } from "./WindowControls";
|
|
31
|
+
export { WindowControls, setExpandableWindowControls } from "./WindowControls";
|
|
32
32
|
export { EventStepperFooter } from "./EventStepperFooter";
|
|
33
33
|
export type { EventStepperFooterProps } from "./EventStepperFooter";
|
|
34
34
|
export { ExpandablePopover } from "./ExpandablePopover";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EACL,UAAU,EACV,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,GACnB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EACL,aAAa,EACb,WAAW,EACX,cAAc,EACd,eAAe,EACf,UAAU,GACX,MAAM,oBAAoB,CAAC;A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1,21 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
interface TickProviderProps {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
/** Interval in ms between ticks. Defaults to 5_000 (5 seconds). */
|
|
5
|
+
intervalMs?: number;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Provides a shared clock tick to all descendants.
|
|
9
|
+
* Wrap each devtools modal/screen in a single TickProvider so that all list items
|
|
10
|
+
* share one timer instead of each item creating its own interval.
|
|
11
|
+
*
|
|
12
|
+
* Only mounted (visible) items consume the context, so FlatList virtualization
|
|
13
|
+
* ensures off-screen items don't re-render.
|
|
14
|
+
*/
|
|
15
|
+
export declare function TickProvider({ children, intervalMs, }: TickProviderProps): import("react").JSX.Element;
|
|
16
|
+
/**
|
|
17
|
+
* Returns the current tick from the nearest TickProvider, or null if none exists.
|
|
18
|
+
*/
|
|
19
|
+
export declare function useTick(): number | null;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=TickContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TickContext.d.ts","sourceRoot":"","sources":["../../../../../src/utils/time/TickContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAIf,UAAU,iBAAiB;IACzB,QAAQ,EAAE,SAAS,CAAC;IACpB,mEAAmE;IACnE,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,EAC3B,QAAQ,EACR,UAAkB,GACnB,EAAE,iBAAiB,+BAcnB;AAED;;GAEG;AACH,wBAAgB,OAAO,IAAI,MAAM,GAAG,IAAI,CAEvC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/utils/time/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/utils/time/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook that returns a live-updating relative time string (e.g., "5s ago", "2m ago").
|
|
3
|
+
*
|
|
4
|
+
* When inside a `<TickProvider>`, uses the shared tick — no per-item timer.
|
|
5
|
+
* When used standalone (no provider), falls back to its own interval.
|
|
6
|
+
*
|
|
7
|
+
* @param timestamp - The timestamp to format (Date, number in ms, or nullish)
|
|
8
|
+
* @returns Formatted relative time string, or empty string if no timestamp
|
|
9
|
+
*/
|
|
10
|
+
export declare function useRelativeTime(timestamp: Date | number | null | undefined): string;
|
|
11
|
+
//# sourceMappingURL=useRelativeTime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useRelativeTime.d.ts","sourceRoot":"","sources":["../../../../../src/utils/time/useRelativeTime.ts"],"names":[],"mappings":"AAIA;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAC7B,SAAS,EAAE,IAAI,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,GAC1C,MAAM,CA2BR"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@buoy-gg/shared-ui",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.11",
|
|
4
4
|
"description": "Shared UI components, hooks, and utilities",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -114,11 +114,19 @@
|
|
|
114
114
|
"scripts"
|
|
115
115
|
],
|
|
116
116
|
"sideEffects": false,
|
|
117
|
+
"scripts": {
|
|
118
|
+
"postinstall": "node scripts/detect-clipboard.js && node scripts/detect-safe-area.js",
|
|
119
|
+
"build": "bob build",
|
|
120
|
+
"typecheck": "tsc --noEmit",
|
|
121
|
+
"prepublishOnly": "REACT_BUOY_FALLBACK=1 node scripts/detect-safe-area.js && bob build",
|
|
122
|
+
"clean": "rimraf lib",
|
|
123
|
+
"test": "pnpm run typecheck"
|
|
124
|
+
},
|
|
117
125
|
"dependencies": {
|
|
118
|
-
"@buoy-gg/floating-tools-core": "
|
|
126
|
+
"@buoy-gg/floating-tools-core": "workspace:*"
|
|
119
127
|
},
|
|
120
128
|
"peerDependencies": {
|
|
121
|
-
"@buoy-gg/license": "2.1.
|
|
129
|
+
"@buoy-gg/license": "2.1.11",
|
|
122
130
|
"@react-native-clipboard/clipboard": "*",
|
|
123
131
|
"expo-clipboard": "*",
|
|
124
132
|
"expo-file-system": "*",
|
|
@@ -141,12 +149,12 @@
|
|
|
141
149
|
}
|
|
142
150
|
},
|
|
143
151
|
"devDependencies": {
|
|
152
|
+
"@buoy-gg/license": "workspace:*",
|
|
144
153
|
"@types/react": "^19.1.0",
|
|
145
154
|
"@types/react-native": "^0.73.0",
|
|
146
155
|
"expo-clipboard": "~7.1.5",
|
|
147
156
|
"react-native-safe-area-context": "^5.6.2",
|
|
148
|
-
"typescript": "~5.8.3"
|
|
149
|
-
"@buoy-gg/license": "2.1.9"
|
|
157
|
+
"typescript": "~5.8.3"
|
|
150
158
|
},
|
|
151
159
|
"react-native-builder-bob": {
|
|
152
160
|
"source": "src",
|
|
@@ -181,12 +189,5 @@
|
|
|
181
189
|
"publishConfig": {
|
|
182
190
|
"access": "public",
|
|
183
191
|
"tag": "latest"
|
|
184
|
-
},
|
|
185
|
-
"scripts": {
|
|
186
|
-
"postinstall": "node scripts/detect-clipboard.js && node scripts/detect-safe-area.js",
|
|
187
|
-
"build": "bob build",
|
|
188
|
-
"typecheck": "tsc --noEmit",
|
|
189
|
-
"clean": "rimraf lib",
|
|
190
|
-
"test": "pnpm run typecheck"
|
|
191
192
|
}
|
|
192
|
-
}
|
|
193
|
+
}
|