@buoy-gg/shared-ui 3.0.2 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/hooks/safe-area-impl.js +1 -1
- package/lib/commonjs/icons/lucide-icons.js +28 -2
- package/lib/commonjs/index.js +7 -0
- package/lib/commonjs/license/FeatureGate.js +60 -11
- package/lib/commonjs/license/LicenseEntryModal.js +12 -2
- package/lib/commonjs/license/openPricing.js +36 -0
- package/lib/commonjs/storage/devToolsStorageKeys.js +1 -0
- package/lib/commonjs/stores/ignoredPatternsStore.js +229 -0
- package/lib/commonjs/stores/index.js +26 -1
- package/lib/commonjs/ui/components/CompactRow.js +14 -4
- package/lib/commonjs/ui/components/ExpandedInfoRow.js +13 -3
- package/lib/commonjs/utils/index.js +6 -0
- package/lib/commonjs/utils/safeExpoRouter.js +59 -4
- package/lib/module/hooks/safe-area-impl.js +1 -1
- package/lib/module/icons/lucide-icons.js +25 -0
- package/lib/module/index.js +1 -1
- package/lib/module/license/FeatureGate.js +61 -12
- package/lib/module/license/LicenseEntryModal.js +13 -3
- package/lib/module/license/openPricing.js +31 -0
- package/lib/module/storage/devToolsStorageKeys.js +1 -0
- package/lib/module/stores/ignoredPatternsStore.js +223 -0
- package/lib/module/stores/index.js +2 -1
- package/lib/module/ui/components/CompactRow.js +14 -4
- package/lib/module/ui/components/ExpandedInfoRow.js +13 -3
- package/lib/module/utils/index.js +1 -1
- package/lib/module/utils/safeExpoRouter.js +58 -4
- package/lib/typescript/commonjs/hooks/safe-area-impl.d.ts +1 -1
- package/lib/typescript/commonjs/icons/lucide-icons.d.ts +1 -0
- package/lib/typescript/commonjs/icons/lucide-icons.d.ts.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +1 -1
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/license/FeatureGate.d.ts +14 -1
- package/lib/typescript/commonjs/license/FeatureGate.d.ts.map +1 -1
- package/lib/typescript/commonjs/license/LicenseEntryModal.d.ts.map +1 -1
- package/lib/typescript/commonjs/license/openPricing.d.ts +14 -0
- package/lib/typescript/commonjs/license/openPricing.d.ts.map +1 -0
- package/lib/typescript/commonjs/storage/devToolsStorageKeys.d.ts +1 -0
- package/lib/typescript/commonjs/storage/devToolsStorageKeys.d.ts.map +1 -1
- package/lib/typescript/commonjs/stores/ignoredPatternsStore.d.ts +84 -0
- package/lib/typescript/commonjs/stores/ignoredPatternsStore.d.ts.map +1 -0
- package/lib/typescript/commonjs/stores/index.d.ts +1 -0
- package/lib/typescript/commonjs/stores/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/CompactRow.d.ts +3 -1
- package/lib/typescript/commonjs/ui/components/CompactRow.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/ExpandedInfoRow.d.ts +3 -1
- package/lib/typescript/commonjs/ui/components/ExpandedInfoRow.d.ts.map +1 -1
- package/lib/typescript/commonjs/utils/index.d.ts +1 -1
- package/lib/typescript/commonjs/utils/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/utils/safeExpoRouter.d.ts +9 -0
- package/lib/typescript/commonjs/utils/safeExpoRouter.d.ts.map +1 -1
- package/lib/typescript/module/hooks/safe-area-impl.d.ts +1 -1
- package/lib/typescript/module/icons/lucide-icons.d.ts +1 -0
- package/lib/typescript/module/icons/lucide-icons.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +1 -1
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/license/FeatureGate.d.ts +14 -1
- package/lib/typescript/module/license/FeatureGate.d.ts.map +1 -1
- package/lib/typescript/module/license/LicenseEntryModal.d.ts.map +1 -1
- package/lib/typescript/module/license/openPricing.d.ts +14 -0
- package/lib/typescript/module/license/openPricing.d.ts.map +1 -0
- package/lib/typescript/module/storage/devToolsStorageKeys.d.ts +1 -0
- package/lib/typescript/module/storage/devToolsStorageKeys.d.ts.map +1 -1
- package/lib/typescript/module/stores/ignoredPatternsStore.d.ts +84 -0
- package/lib/typescript/module/stores/ignoredPatternsStore.d.ts.map +1 -0
- package/lib/typescript/module/stores/index.d.ts +1 -0
- package/lib/typescript/module/stores/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/CompactRow.d.ts +3 -1
- package/lib/typescript/module/ui/components/CompactRow.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/ExpandedInfoRow.d.ts +3 -1
- package/lib/typescript/module/ui/components/ExpandedInfoRow.d.ts.map +1 -1
- package/lib/typescript/module/utils/index.d.ts +1 -1
- package/lib/typescript/module/utils/index.d.ts.map +1 -1
- package/lib/typescript/module/utils/safeExpoRouter.d.ts +9 -0
- package/lib/typescript/module/utils/safeExpoRouter.d.ts.map +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared "ignored patterns" store for network-style URL filtering.
|
|
3
|
+
*
|
|
4
|
+
* This is the SINGLE source of truth for the domains/URL patterns that the
|
|
5
|
+
* Network tool (and now the Events tool) hide from their lists. Both tools read
|
|
6
|
+
* and mutate this one singleton, so an ignore toggled in either place is shared
|
|
7
|
+
* everywhere and persisted to the same storage key.
|
|
8
|
+
*
|
|
9
|
+
* Lives in @buoy-gg/shared-ui (a hard dependency of both @buoy-gg/network and
|
|
10
|
+
* @buoy-gg/events) so the filter logic can be shared without @buoy-gg/events
|
|
11
|
+
* having to take a hard dependency on @buoy-gg/network (which is optional).
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* How an ignored-pattern entry should be compared against captured URLs.
|
|
15
|
+
*
|
|
16
|
+
* - `contains`: case-insensitive substring match on the full URL (legacy behavior).
|
|
17
|
+
* - `exact`: smart equality — if pattern starts with `/`, matches URL.pathname;
|
|
18
|
+
* if it starts with `http://`/`https://`, matches origin+pathname; otherwise
|
|
19
|
+
* matches URL.host.
|
|
20
|
+
*/
|
|
21
|
+
export type IgnoredPatternMatchMode = "contains" | "exact";
|
|
22
|
+
/** A single exclude pattern with its match mode. */
|
|
23
|
+
export interface IgnoredPattern {
|
|
24
|
+
value: string;
|
|
25
|
+
mode: IgnoredPatternMatchMode;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Returns true when `url` matches the ignored `pattern` according to its mode.
|
|
29
|
+
*
|
|
30
|
+
* `contains` → case-insensitive substring on the full URL (legacy behavior).
|
|
31
|
+
* `exact` → smart equality: pattern starting with `/` compares URL.pathname,
|
|
32
|
+
* full URLs compare origin+pathname (ignoring query/hash), bare
|
|
33
|
+
* values compare URL.host. Falls back to literal equality if URL
|
|
34
|
+
* parsing fails (e.g. relative URLs).
|
|
35
|
+
*/
|
|
36
|
+
export declare function urlMatchesIgnoredPattern(url: string, pattern: IgnoredPattern): boolean;
|
|
37
|
+
/** Convenience: does `url` match ANY of the ignored `patterns`? */
|
|
38
|
+
export declare function isUrlIgnored(url: string, patterns: ReadonlyArray<IgnoredPattern>): boolean;
|
|
39
|
+
type Listener = () => void;
|
|
40
|
+
/**
|
|
41
|
+
* Singleton store. One instance per JS runtime, so every consumer (Network tool,
|
|
42
|
+
* Events tool, on mobile or on the desktop dashboard) shares the same patterns.
|
|
43
|
+
*/
|
|
44
|
+
declare class IgnoredPatternsStore {
|
|
45
|
+
private patterns;
|
|
46
|
+
private readonly listeners;
|
|
47
|
+
private loaded;
|
|
48
|
+
private loadPromise;
|
|
49
|
+
/** Set once a mutation happens so a slow initial load can't clobber it. */
|
|
50
|
+
private dirty;
|
|
51
|
+
/** Current patterns (stable reference until a mutation occurs). */
|
|
52
|
+
getPatterns(): IgnoredPattern[];
|
|
53
|
+
subscribe(listener: Listener): () => void;
|
|
54
|
+
private emit;
|
|
55
|
+
private ensureLoaded;
|
|
56
|
+
private persist;
|
|
57
|
+
private commit;
|
|
58
|
+
/** Add a pattern (no-op if its value already exists). */
|
|
59
|
+
add(pattern: IgnoredPattern): void;
|
|
60
|
+
/** Remove a pattern by value. */
|
|
61
|
+
remove(value: string): void;
|
|
62
|
+
/** Add as `contains` if absent, otherwise remove (used by detail-view chips). */
|
|
63
|
+
toggle(value: string): void;
|
|
64
|
+
/** Flip an existing pattern between `contains` and `exact`. */
|
|
65
|
+
toggleMode(value: string): void;
|
|
66
|
+
}
|
|
67
|
+
export declare const ignoredPatternsStore: IgnoredPatternsStore;
|
|
68
|
+
export interface UseIgnoredPatternsResult {
|
|
69
|
+
/** The ordered list of ignored patterns. */
|
|
70
|
+
patterns: IgnoredPattern[];
|
|
71
|
+
/** Just the pattern values, as a Set (for presence checks in the UI). */
|
|
72
|
+
values: Set<string>;
|
|
73
|
+
add: (pattern: IgnoredPattern) => void;
|
|
74
|
+
remove: (value: string) => void;
|
|
75
|
+
toggle: (value: string) => void;
|
|
76
|
+
toggleMode: (value: string) => void;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Subscribe to the shared ignored-patterns store. All consumers in a runtime
|
|
80
|
+
* see the same patterns and the same mutations.
|
|
81
|
+
*/
|
|
82
|
+
export declare function useIgnoredPatterns(): UseIgnoredPatternsResult;
|
|
83
|
+
export {};
|
|
84
|
+
//# sourceMappingURL=ignoredPatternsStore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ignoredPatternsStore.d.ts","sourceRoot":"","sources":["../../../../src/stores/ignoredPatternsStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAMH;;;;;;;GAOG;AACH,MAAM,MAAM,uBAAuB,GAAG,UAAU,GAAG,OAAO,CAAC;AAE3D,oDAAoD;AACpD,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,uBAAuB,CAAC;CAC/B;AAOD;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,CACtC,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,cAAc,GACtB,OAAO,CAoBT;AAED,mEAAmE;AACnE,wBAAgB,YAAY,CAC1B,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,aAAa,CAAC,cAAc,CAAC,GACtC,OAAO,CAGT;AAmCD,KAAK,QAAQ,GAAG,MAAM,IAAI,CAAC;AAE3B;;;GAGG;AACH,cAAM,oBAAoB;IACxB,OAAO,CAAC,QAAQ,CAEd;IACF,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAuB;IACjD,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,WAAW,CAA8B;IACjD,2EAA2E;IAC3E,OAAO,CAAC,KAAK,CAAS;IAEtB,mEAAmE;IACnE,WAAW,IAAI,cAAc,EAAE;IAI/B,SAAS,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,IAAI;IASzC,OAAO,CAAC,IAAI;IAIZ,OAAO,CAAC,YAAY;IAyBpB,OAAO,CAAC,OAAO;IAWf,OAAO,CAAC,MAAM;IAOd,yDAAyD;IACzD,GAAG,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI;IAOlC,iCAAiC;IACjC,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAK3B,iFAAiF;IACjF,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAU3B,+DAA+D;IAC/D,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;CAUhC;AAED,eAAO,MAAM,oBAAoB,sBAA6B,CAAC;AAE/D,MAAM,WAAW,wBAAwB;IACvC,4CAA4C;IAC5C,QAAQ,EAAE,cAAc,EAAE,CAAC;IAC3B,yEAAyE;IACzE,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACpB,GAAG,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,IAAI,CAAC;IACvC,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,IAAI,wBAAwB,CAwB7D"}
|
|
@@ -2,4 +2,5 @@
|
|
|
2
2
|
* Shared store utilities and base classes
|
|
3
3
|
*/
|
|
4
4
|
export { BaseEventStore, type ArrayListener, type EventCallback, type BaseEventStoreOptions, } from "./BaseEventStore";
|
|
5
|
+
export { ignoredPatternsStore, useIgnoredPatterns, urlMatchesIgnoredPattern, isUrlIgnored, type IgnoredPattern, type IgnoredPatternMatchMode, type UseIgnoredPatternsResult, } from "./ignoredPatternsStore";
|
|
5
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/stores/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,cAAc,EACd,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,qBAAqB,GAC3B,MAAM,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/stores/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,cAAc,EACd,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,qBAAqB,GAC3B,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,oBAAoB,EACpB,kBAAkB,EAClB,wBAAwB,EACxB,YAAY,EACZ,KAAK,cAAc,EACnB,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,GAC9B,MAAM,wBAAwB,CAAC"}
|
|
@@ -5,6 +5,8 @@ export interface CompactRowProps {
|
|
|
5
5
|
statusSublabel?: string;
|
|
6
6
|
primaryText: string;
|
|
7
7
|
secondaryText?: string;
|
|
8
|
+
/** Optional node rendered inline next to secondaryText (e.g. a small badge). */
|
|
9
|
+
secondaryAccessory?: ReactNode;
|
|
8
10
|
expandedContent?: ReactNode;
|
|
9
11
|
isExpanded?: boolean;
|
|
10
12
|
badgeText?: string | number;
|
|
@@ -17,5 +19,5 @@ export interface CompactRowProps {
|
|
|
17
19
|
disabled?: boolean;
|
|
18
20
|
expandedGlowColor?: string;
|
|
19
21
|
}
|
|
20
|
-
export declare function CompactRow({ statusDotColor, statusLabel, statusSublabel, primaryText, secondaryText, expandedContent, isExpanded, badgeText, badgeColor, customBadge, showChevron, bottomRightText, isSelected, onPress, disabled, expandedGlowColor, }: CompactRowProps): import("react").JSX.Element;
|
|
22
|
+
export declare function CompactRow({ statusDotColor, statusLabel, statusSublabel, primaryText, secondaryText, secondaryAccessory, expandedContent, isExpanded, badgeText, badgeColor, customBadge, showChevron, bottomRightText, isSelected, onPress, disabled, expandedGlowColor, }: CompactRowProps): import("react").JSX.Element;
|
|
21
23
|
//# sourceMappingURL=CompactRow.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CompactRow.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/CompactRow.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIlC,MAAM,WAAW,eAAe;IAE9B,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IAGxB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,SAAS,CAAC;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAC;IAGrB,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;IAGzB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,wBAAgB,UAAU,CAAC,EACzB,cAAc,EACd,WAAW,EACX,cAAc,EACd,WAAW,EACX,aAAa,EACb,eAAe,EACf,UAAU,EACV,SAAS,EACT,UAAU,EACV,WAAW,EACX,WAAW,EACX,eAAe,EACf,UAAU,EACV,OAAO,EACP,QAAQ,EACR,iBAAiB,GAClB,EAAE,eAAe,+
|
|
1
|
+
{"version":3,"file":"CompactRow.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/CompactRow.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIlC,MAAM,WAAW,eAAe;IAE9B,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IAGxB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,gFAAgF;IAChF,kBAAkB,CAAC,EAAE,SAAS,CAAC;IAC/B,eAAe,CAAC,EAAE,SAAS,CAAC;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAC;IAGrB,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;IAGzB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,wBAAgB,UAAU,CAAC,EACzB,cAAc,EACd,WAAW,EACX,cAAc,EACd,WAAW,EACX,aAAa,EACb,kBAAkB,EAClB,eAAe,EACf,UAAU,EACV,SAAS,EACT,UAAU,EACV,WAAW,EACX,WAAW,EACX,eAAe,EACf,UAAU,EACV,OAAO,EACP,QAAQ,EACR,iBAAiB,GAClB,EAAE,eAAe,+BAmHjB"}
|
|
@@ -26,7 +26,9 @@ interface PillBadgeProps {
|
|
|
26
26
|
color: string;
|
|
27
27
|
children: ReactNode;
|
|
28
28
|
icon?: ReactNode;
|
|
29
|
+
/** "sm" renders a more compact pill for inline use next to text. */
|
|
30
|
+
size?: "sm" | "md";
|
|
29
31
|
}
|
|
30
|
-
export declare function PillBadge({ color, children, icon }: PillBadgeProps): import("react").JSX.Element;
|
|
32
|
+
export declare function PillBadge({ color, children, icon, size }: PillBadgeProps): import("react").JSX.Element;
|
|
31
33
|
export {};
|
|
32
34
|
//# sourceMappingURL=ExpandedInfoRow.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpandedInfoRow.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/ExpandedInfoRow.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,UAAU,oBAAoB;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,eAAe,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,oBAAoB,+BAOxE;AAED;;;GAGG;AACH,UAAU,cAAc;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,SAAS,CAAC;IACpB,IAAI,CAAC,EAAE,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"ExpandedInfoRow.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/ExpandedInfoRow.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,UAAU,oBAAoB;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,eAAe,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,oBAAoB,+BAOxE;AAED;;;GAGG;AACH,UAAU,cAAc;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,SAAS,CAAC;IACpB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,oEAAoE;IACpE,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;CACpB;AAED,wBAAgB,SAAS,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAW,EAAE,EAAE,cAAc,+BAgB/E"}
|
|
@@ -8,5 +8,5 @@ export { parseValue, formatValue, getTypeColor, truncateText, flattenObject, for
|
|
|
8
8
|
export { loadOptionalModule, getCachedOptionalModule } from "./loadOptionalModule";
|
|
9
9
|
export { Subscribable, type SubscribableListener } from "./subscribable";
|
|
10
10
|
export { subscriberCountNotifier, subscribeToSubscriberCountChanges, notifySubscriberCountChange, } from "./subscriberCountNotifier";
|
|
11
|
-
export { useSafeRouter, useSafePathname, useSafeSegments, useSafeGlobalSearchParams, getSafeRouter, isExpoRouterAvailable, } from "./safeExpoRouter";
|
|
11
|
+
export { useSafeRouter, useSafePathname, useSafeSegments, useSafeGlobalSearchParams, getSafeRouter, getSafeCurrentPathname, isExpoRouterAvailable, } from "./safeExpoRouter";
|
|
12
12
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -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,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,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,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"}
|
|
@@ -13,5 +13,14 @@ export declare function useSafePathname(): string;
|
|
|
13
13
|
export declare function useSafeSegments(): string[];
|
|
14
14
|
export declare function useSafeGlobalSearchParams(): Record<string, string | string[]>;
|
|
15
15
|
export declare function getSafeRouter(): any;
|
|
16
|
+
/**
|
|
17
|
+
* The current route pathname, read imperatively from expo-router's store.
|
|
18
|
+
*
|
|
19
|
+
* Unlike a route-events history lookup, this works even before any navigation
|
|
20
|
+
* has been recorded — e.g. right after a cold start while the app sits on its
|
|
21
|
+
* initial route. Returns null when expo-router isn't available or the store
|
|
22
|
+
* can't be reached.
|
|
23
|
+
*/
|
|
24
|
+
export declare function getSafeCurrentPathname(): string | null;
|
|
16
25
|
export declare function isExpoRouterAvailable(): boolean;
|
|
17
26
|
//# sourceMappingURL=safeExpoRouter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"safeExpoRouter.d.ts","sourceRoot":"","sources":["../../../../src/utils/safeExpoRouter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;
|
|
1
|
+
{"version":3,"file":"safeExpoRouter.d.ts","sourceRoot":"","sources":["../../../../src/utils/safeExpoRouter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAgHH,wBAAgB,aAAa,QAW5B;AAED,wBAAgB,eAAe,IAAI,MAAM,CAWxC;AAED,wBAAgB,eAAe,IAAI,MAAM,EAAE,CAW1C;AAED,wBAAgB,yBAAyB,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,CAW7E;AAMD,wBAAgB,aAAa,QAU5B;AAuBD;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,GAAG,IAAI,CAUtD;AAMD,wBAAgB,qBAAqB,IAAI,OAAO,CAE/C"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@buoy-gg/shared-ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.1",
|
|
4
4
|
"description": "Shared UI components, hooks, and utilities",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -115,10 +115,10 @@
|
|
|
115
115
|
],
|
|
116
116
|
"sideEffects": false,
|
|
117
117
|
"dependencies": {
|
|
118
|
-
"@buoy-gg/floating-tools-core": "
|
|
118
|
+
"@buoy-gg/floating-tools-core": "4.0.1"
|
|
119
119
|
},
|
|
120
120
|
"peerDependencies": {
|
|
121
|
-
"@buoy-gg/license": "
|
|
121
|
+
"@buoy-gg/license": "4.0.1",
|
|
122
122
|
"@react-native-clipboard/clipboard": "*",
|
|
123
123
|
"expo-clipboard": "*",
|
|
124
124
|
"expo-file-system": "*",
|
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
"expo-clipboard": "~7.1.5",
|
|
147
147
|
"react-native-safe-area-context": "^5.6.2",
|
|
148
148
|
"typescript": "~5.8.3",
|
|
149
|
-
"@buoy-gg/license": "
|
|
149
|
+
"@buoy-gg/license": "4.0.1"
|
|
150
150
|
},
|
|
151
151
|
"react-native-builder-bob": {
|
|
152
152
|
"source": "src",
|