@buoy-gg/highlight-updates 7.0.27 → 7.0.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/lib/commonjs/highlight-updates/components/HighlightFilterView.js +102 -0
  2. package/lib/commonjs/highlight-updates/components/HighlightUpdatesModal.js +5 -1
  3. package/lib/commonjs/highlight-updates/components/IdentifierBadge.js +7 -1
  4. package/lib/commonjs/highlight-updates/components/IsolatedRenderList.js +6 -0
  5. package/lib/commonjs/highlight-updates/components/ModalHeaderContent.js +26 -3
  6. package/lib/commonjs/highlight-updates/components/RenderCauseBadge.js +7 -1
  7. package/lib/commonjs/highlight-updates/components/RenderDetailView.js +40 -1
  8. package/lib/commonjs/highlight-updates/components/RenderHistoryViewer.js +29 -6
  9. package/lib/commonjs/highlight-updates/components/RenderListItem.js +15 -0
  10. package/lib/commonjs/highlight-updates/components/RendersCopySettingsView.js +11 -0
  11. package/lib/commonjs/highlight-updates/components/StatsDisplay.js +3 -0
  12. package/lib/commonjs/highlight-updates/utils/CommitProfiler.js +6 -1
  13. package/lib/commonjs/highlight-updates/utils/HighlightUpdatesController.js +65 -3
  14. package/lib/commonjs/highlight-updates/utils/RenderCauseDetector.js +15 -3
  15. package/lib/commonjs/highlight-updates/utils/RenderTracker.js +6 -1
  16. package/lib/commonjs/highlight-updates/utils/namedComposite.js +41 -0
  17. package/lib/commonjs/highlight-updates/utils/ownStateChanged.js +103 -0
  18. package/lib/commonjs/highlight-updates/utils/screenElements.js +50 -25
  19. package/lib/commonjs/highlight-updates/utils/tapMatch.js +58 -0
  20. package/lib/commonjs/highlight-updates/utils/testIDs.js +68 -0
  21. package/lib/commonjs/index.js +34 -0
  22. package/lib/module/highlight-updates/components/HighlightFilterView.js +102 -0
  23. package/lib/module/highlight-updates/components/HighlightUpdatesModal.js +5 -1
  24. package/lib/module/highlight-updates/components/IdentifierBadge.js +7 -1
  25. package/lib/module/highlight-updates/components/IsolatedRenderList.js +6 -0
  26. package/lib/module/highlight-updates/components/ModalHeaderContent.js +26 -3
  27. package/lib/module/highlight-updates/components/RenderCauseBadge.js +7 -1
  28. package/lib/module/highlight-updates/components/RenderDetailView.js +40 -1
  29. package/lib/module/highlight-updates/components/RenderHistoryViewer.js +29 -6
  30. package/lib/module/highlight-updates/components/RenderListItem.js +15 -0
  31. package/lib/module/highlight-updates/components/RendersCopySettingsView.js +11 -0
  32. package/lib/module/highlight-updates/components/StatsDisplay.js +3 -0
  33. package/lib/module/highlight-updates/utils/CommitProfiler.js +5 -1
  34. package/lib/module/highlight-updates/utils/HighlightUpdatesController.js +65 -3
  35. package/lib/module/highlight-updates/utils/RenderCauseDetector.js +15 -3
  36. package/lib/module/highlight-updates/utils/RenderTracker.js +6 -1
  37. package/lib/module/highlight-updates/utils/namedComposite.js +36 -0
  38. package/lib/module/highlight-updates/utils/ownStateChanged.js +98 -0
  39. package/lib/module/highlight-updates/utils/screenElements.js +50 -25
  40. package/lib/module/highlight-updates/utils/tapMatch.js +52 -0
  41. package/lib/module/highlight-updates/utils/testIDs.js +60 -0
  42. package/lib/module/index.js +5 -1
  43. package/lib/typescript/highlight-updates/components/HighlightFilterView.d.ts.map +1 -1
  44. package/lib/typescript/highlight-updates/components/HighlightUpdatesModal.d.ts.map +1 -1
  45. package/lib/typescript/highlight-updates/components/IdentifierBadge.d.ts +7 -1
  46. package/lib/typescript/highlight-updates/components/IdentifierBadge.d.ts.map +1 -1
  47. package/lib/typescript/highlight-updates/components/IsolatedRenderList.d.ts.map +1 -1
  48. package/lib/typescript/highlight-updates/components/ModalHeaderContent.d.ts.map +1 -1
  49. package/lib/typescript/highlight-updates/components/RenderCauseBadge.d.ts +8 -1
  50. package/lib/typescript/highlight-updates/components/RenderCauseBadge.d.ts.map +1 -1
  51. package/lib/typescript/highlight-updates/components/RenderDetailView.d.ts.map +1 -1
  52. package/lib/typescript/highlight-updates/components/RenderHistoryViewer.d.ts.map +1 -1
  53. package/lib/typescript/highlight-updates/components/RenderListItem.d.ts.map +1 -1
  54. package/lib/typescript/highlight-updates/components/RendersCopySettingsView.d.ts.map +1 -1
  55. package/lib/typescript/highlight-updates/components/StatsDisplay.d.ts.map +1 -1
  56. package/lib/typescript/highlight-updates/utils/CommitProfiler.d.ts.map +1 -1
  57. package/lib/typescript/highlight-updates/utils/HighlightUpdatesController.d.ts.map +1 -1
  58. package/lib/typescript/highlight-updates/utils/RenderCauseDetector.d.ts.map +1 -1
  59. package/lib/typescript/highlight-updates/utils/RenderTracker.d.ts +6 -0
  60. package/lib/typescript/highlight-updates/utils/RenderTracker.d.ts.map +1 -1
  61. package/lib/typescript/highlight-updates/utils/namedComposite.d.ts +17 -0
  62. package/lib/typescript/highlight-updates/utils/namedComposite.d.ts.map +1 -0
  63. package/lib/typescript/highlight-updates/utils/ownStateChanged.d.ts +66 -0
  64. package/lib/typescript/highlight-updates/utils/ownStateChanged.d.ts.map +1 -0
  65. package/lib/typescript/highlight-updates/utils/screenElements.d.ts.map +1 -1
  66. package/lib/typescript/highlight-updates/utils/tapMatch.d.ts +42 -0
  67. package/lib/typescript/highlight-updates/utils/tapMatch.d.ts.map +1 -0
  68. package/lib/typescript/highlight-updates/utils/testIDs.d.ts +44 -0
  69. package/lib/typescript/highlight-updates/utils/testIDs.d.ts.map +1 -0
  70. package/lib/typescript/index.d.ts +1 -0
  71. package/lib/typescript/index.d.ts.map +1 -1
  72. package/package.json +7 -7
@@ -0,0 +1,66 @@
1
+ /**
2
+ * "Did this component's own state actually change?" — one implementation.
3
+ *
4
+ * This package classifies render causes twice, on purpose. `RenderCauseDetector`
5
+ * serves the overlay and rides React DevTools' `traceUpdates`, which hands it
6
+ * fibers at an ambiguous moment — hence its WeakMap fallbacks and fiber-swap
7
+ * detection. `CommitProfiler` serves Bench's render capture from inside
8
+ * `onCommitFiberRoot`, where `fiber` is current and `fiber.alternate` is
9
+ * previous by definition, and where it runs on every composite fiber of every
10
+ * commit and so counts allocations. Those are genuinely different problems and
11
+ * the two classifiers should stay separate.
12
+ *
13
+ * This ONE question is not different between them, and it is the question they
14
+ * both got wrong:
15
+ *
16
+ * `prev.memoizedState !== next.memoizedState`
17
+ *
18
+ * For a function component `memoizedState` is the head of the hook linked list,
19
+ * and React rebuilds that list on every update — `updateWorkInProgressHook`
20
+ * clones each node — so the head is a fresh object whether or not a single
21
+ * hook's value moved. Read as "state changed" it makes "state"/"hooks" the
22
+ * answer for every component that uses ANY hook (a lone `useEffect` is enough)
23
+ * and leaves "parent" reachable only by the vanishingly rare component that
24
+ * uses none.
25
+ *
26
+ * That is the one distinction in either tool a developer acts on: "parent"
27
+ * means memoize it or lift the state, "state" means it genuinely updated and
28
+ * should be left alone. Backwards, it sends you to optimise the thing that was
29
+ * already fine — and in Bench it also silently shrank `wastedRenders`, the
30
+ * number that says whether there is anything to fix at all.
31
+ *
32
+ * Both tools reached that wrong line independently, which is exactly why the
33
+ * answer lives here now rather than in two places that happen to agree.
34
+ */
35
+ /**
36
+ * True when a STATE hook's value actually moved between two hook-list heads.
37
+ *
38
+ * `queue` is the marker: `useState` and `useReducer` — and everything built on
39
+ * them — own one; effects, memos, callbacks and refs do not. An effect's
40
+ * `memoizedState` is a brand-new object on every single render, which is the
41
+ * specific thing that broke the identity check.
42
+ *
43
+ * Note that a `useRef` mutation is deliberately NOT a state change here. It
44
+ * cannot cause a render, so a render attributed to one is a render blamed on
45
+ * something that did not do it.
46
+ *
47
+ * Conservative where it cannot tell: a class component, or a `memoizedState`
48
+ * that is not a recognisable hook list, falls back to the identity comparison.
49
+ * There the identity IS meaningful (or is the best signal available), so the
50
+ * old behaviour is the right behaviour.
51
+ *
52
+ * Takes the HEADS rather than the fibers because only one of the two callers
53
+ * has a previous fiber to hand — the overlay may be working from a WeakMap
54
+ * snapshot of the previous `memoizedState` instead. Use `ownStateChanged` when
55
+ * you do have both fibers.
56
+ */
57
+ export declare function hookStateChanged(prevHead: any, nextHead: any, options?: {
58
+ isClassComponent?: boolean;
59
+ }): boolean;
60
+ /**
61
+ * `hookStateChanged` for callers holding both fibers — the common case inside
62
+ * `onCommitFiberRoot`, where `fiber.alternate` is the previous fiber by
63
+ * definition.
64
+ */
65
+ export declare function ownStateChanged(prev: any, next: any): boolean;
66
+ //# sourceMappingURL=ownStateChanged.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ownStateChanged.d.ts","sourceRoot":"","sources":["../../../../src/highlight-updates/utils/ownStateChanged.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAiBH;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,GAAG,EACb,QAAQ,EAAE,GAAG,EACb,OAAO,CAAC,EAAE;IAAE,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAAE,GACvC,OAAO,CAiBT;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,GAAG,OAAO,CAI7D"}
@@ -1 +1 @@
1
- {"version":3,"file":"screenElements.d.ts","sourceRoot":"","sources":["../../../../src/highlight-updates/utils/screenElements.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAqaH,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,8EAA8E;IAC9E,WAAW,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,OAAO,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,MAAM,CAAC;IACvC,qDAAqD;IACrD,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;IAClC,iFAAiF;IACjF,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,IAAI,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAChG;AA8JD,wBAAsB,cAAc,IAAI,OAAO,CAAC,oBAAoB,CAAC,CAkEpE;AA8DD,wBAAsB,UAAU,CAAC,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CA2IpF"}
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Shared tap-target scoring for describe_screen / tap_element.
3
+ *
4
+ * Ranking used to be substring-on-testID only, so `tap: "ASSETS"` preferred
5
+ * `nav-assets-tool-test` (score 25) over a visible dial icon, and off-screen
6
+ * Expo Router screens (y > 1) stayed in the candidate list.
7
+ */
8
+ export interface TapMatchFields {
9
+ nativeTag?: number | null;
10
+ testID?: string;
11
+ label?: string;
12
+ text?: string;
13
+ name?: string;
14
+ /** Normalized [0,1] tap point, if measured. */
15
+ tap?: {
16
+ x: number;
17
+ y: number;
18
+ };
19
+ }
20
+ export interface TapMatchQuery {
21
+ nativeTag?: number;
22
+ testID?: string;
23
+ query?: string;
24
+ }
25
+ /** True when the measured center is inside the window (10% slack for home-indicator / portal hosts). */
26
+ export declare function isOnScreenTap(tap?: {
27
+ x: number;
28
+ y: number;
29
+ } | null): boolean;
30
+ /**
31
+ * Point-in-window test in *points* (measureInWindow coords), with slack so
32
+ * the floating menu and rows clipped at the home indicator still count.
33
+ * Previous Expo Router screens typically measure at y > 1.2× window height.
34
+ */
35
+ export declare function isRectCenterOnScreen(rect: {
36
+ x: number;
37
+ y: number;
38
+ width: number;
39
+ height: number;
40
+ } | null, screenW: number, screenH: number): boolean;
41
+ export declare function scoreTapMatch(c: TapMatchFields, params: TapMatchQuery): number;
42
+ //# sourceMappingURL=tapMatch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tapMatch.d.ts","sourceRoot":"","sources":["../../../../src/highlight-updates/utils/tapMatch.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,WAAW,cAAc;IAC7B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,+CAA+C;IAC/C,GAAG,CAAC,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAChC;AAED,MAAM,WAAW,aAAa;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wGAAwG;AACxG,wBAAgB,aAAa,CAAC,GAAG,CAAC,EAAE;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,GAAG,OAAO,CAG5E;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,EACpE,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,GACd,OAAO,CAOT;AAED,wBAAgB,aAAa,CAAC,CAAC,EAAE,cAAc,EAAE,MAAM,EAAE,aAAa,GAAG,MAAM,CA2B9E"}
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Stable e2e handles for the Render Highlighter (highlight-updates).
3
+ *
4
+ * This tool's list is the hardest thing in Buoy to address, because the thing
5
+ * it lists is a NATIVE VIEW and the only key it has for one is the fiber's
6
+ * `nativeTag` — a per-session counter that changes on every launch, on every
7
+ * remount, and (on a dynamic screen) between two runs of the same test. A
8
+ * handle built from it would name a different component every time.
9
+ *
10
+ * So rows are addressed by their IDENTIFIER, in exactly the priority the list
11
+ * item itself uses to label them: testID → nativeID → component name →
12
+ * accessibility label → nativeTag. That is the same string the developer sees
13
+ * on the row, it is stable as long as the component is, and it is what a test
14
+ * can name up front. `nativeTag` remains the last resort for an anonymous host
15
+ * view, which no test should be naming anyway.
16
+ *
17
+ * Slug rules are mirrored in `example-dev-build/utils/renderBench.js` so the
18
+ * fixture and the tool agree about what a row is called; the suite's
19
+ * `fixture.js` spot-checks that they still do.
20
+ */
21
+ /** Any identifier string → a testID-safe slug. */
22
+ export declare function identifierSlug(value: string | number): string;
23
+ /**
24
+ * `buoy-highlight-row-<slug>` for one row of the render list.
25
+ *
26
+ * Sub-handles hang off it: `-name`, `-count`, `-type`, `-cause`, `-identifier`,
27
+ * `-time`. The count is the tool's whole claim, so it gets its own handle
28
+ * rather than living inside the row's merged label.
29
+ */
30
+ export declare function renderRowTestID(identifier: string | number): string;
31
+ /**
32
+ * `buoy-highlight-detected-<type>-<slug>` for one chip in DETECTED ITEMS.
33
+ *
34
+ * The type is in the handle because the same string legitimately appears under
35
+ * two categories — a component called `Pressable` and a viewType called
36
+ * `Pressable` are different filters with the same name, and a suite that added
37
+ * the wrong one would still see "a pattern was added".
38
+ */
39
+ export declare function detectedItemTestID(type: string, value: string): string;
40
+ /** `buoy-highlight-<mode>-chip-<type>-<slug>` for an active filter pattern. */
41
+ export declare function patternChipTestID(mode: "include" | "exclude", type: string, value: string): string;
42
+ /** `buoy-highlight-setting-<key>` for a settings row's control. */
43
+ export declare function settingTestID(key: string): string;
44
+ //# sourceMappingURL=testIDs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"testIDs.d.ts","sourceRoot":"","sources":["../../../../src/highlight-updates/utils/testIDs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,kDAAkD;AAClD,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAO7D;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAEnE;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAEtE;AAED,+EAA+E;AAC/E,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,SAAS,GAAG,SAAS,EAC3B,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,GACZ,MAAM,CAER;AAED,mEAAmE;AACnE,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEjD"}
@@ -45,4 +45,5 @@ export { HighlightFilterView } from "./highlight-updates/components/HighlightFil
45
45
  export { RenderCauseBadge, TwoLevelCauseBadge, CAUSE_CONFIG, COMPONENT_CAUSE_CONFIG, } from "./highlight-updates/components/RenderCauseBadge";
46
46
  export { RenderHistoryViewer, RenderHistoryFooter, } from "./highlight-updates/components/RenderHistoryViewer";
47
47
  export { generateRendersJson, } from "./highlight-updates/utils/renderExportFormatter";
48
+ export { identifierSlug, renderRowTestID, detectedItemTestID, patternChipTestID, settingTestID, } from "./highlight-updates/utils/testIDs";
48
49
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAGH,OAAO,EACL,sBAAsB,EACtB,0BAA0B,EAC1B,2BAA2B,EAC3B,+BAA+B,GAChC,MAAM,UAAU,CAAC;AAGlB,OAAO,EAAE,OAAO,IAAI,0BAA0B,EAAE,MAAM,sDAAsD,CAAC;AAG7G,OAAO,EAAE,2BAA2B,EAAE,MAAM,oCAAoC,CAAC;AAGjF,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AAGtF,OAAO,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B,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,+CAA+C,CAAC;AAGvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,6CAA6C,CAAC;AAChF,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,6CAA6C,CAAC;AAG5F,OAAO,EACL,aAAa,EACb,uBAAuB,EACvB,iBAAiB,EACjB,eAAe,EACf,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,0CAA0C,CAAC;AAKlD,OAAO,EACL,qBAAqB,EACrB,iBAAiB,GAClB,MAAM,sDAAsD,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,+CAA+C,CAAC;AAC/E,OAAO,EAAE,gBAAgB,EAAE,MAAM,iDAAiD,CAAC;AACnF,OAAO,EAAE,mBAAmB,EAAE,MAAM,oDAAoD,CAAC;AACzF,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,YAAY,EACZ,sBAAsB,GACvB,MAAM,iDAAiD,CAAC;AACzD,OAAO,EACL,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,oDAAoD,CAAC;AAG5D,OAAO,EACL,mBAAmB,GACpB,MAAM,iDAAiD,CAAC;AAIzD,OAAO,EACL,cAAc,EACd,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,aAAa,GACd,MAAM,mCAAmC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@buoy-gg/highlight-updates",
3
- "version": "7.0.27",
3
+ "version": "7.0.29",
4
4
  "description": "Render highlighter for React Native — see every render with its cause: mount, state, props, or parent. Part of Buoy devtools.",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -26,14 +26,14 @@
26
26
  ],
27
27
  "sideEffects": false,
28
28
  "dependencies": {
29
- "@buoy-gg/shared-ui": "^7.0.27",
30
- "@buoy-gg/floating-tools-core": "^7.0.27"
29
+ "@buoy-gg/shared-ui": "^7.0.29",
30
+ "@buoy-gg/floating-tools-core": "^7.0.29"
31
31
  },
32
32
  "peerDependencies": {
33
- "@buoy-gg/license": "7.0.27",
33
+ "@buoy-gg/license": "7.0.29",
34
34
  "react": "*",
35
35
  "react-native": "*",
36
- "@buoy-gg/core": "^7.0.27"
36
+ "@buoy-gg/core": "^7.0.29"
37
37
  },
38
38
  "peerDependenciesMeta": {
39
39
  "@buoy-gg/core": {
@@ -44,8 +44,8 @@
44
44
  "@types/react": "^19.1.0",
45
45
  "@types/react-native": "^0.73.0",
46
46
  "typescript": "~5.8.3",
47
- "@buoy-gg/license": "^7.0.27",
48
- "@buoy-gg/core": "^7.0.27"
47
+ "@buoy-gg/core": "^7.0.29",
48
+ "@buoy-gg/license": "^7.0.29"
49
49
  },
50
50
  "react-native-builder-bob": {
51
51
  "source": "src",