@buoy-gg/shared-ui 7.0.21 → 7.0.23

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 (178) hide show
  1. package/lib/commonjs/JsModal.js +39 -16
  2. package/lib/commonjs/dataViewer/JsonStringNotice.js +59 -0
  3. package/lib/commonjs/dataViewer/ThemedSplitView.js +20 -1
  4. package/lib/commonjs/dataViewer/TimestampDeltaBar.js +96 -0
  5. package/lib/commonjs/dataViewer/index.js +52 -0
  6. package/lib/commonjs/dataViewer/jsonStringValue.js +94 -0
  7. package/lib/commonjs/dataViewer/timestampDiff.js +146 -0
  8. package/lib/commonjs/hooks/safe-area-impl.js +1 -1
  9. package/lib/commonjs/index.js +64 -1
  10. package/lib/commonjs/license/FeatureGate.js +43 -10
  11. package/lib/commonjs/license/FreeAccountPrompt.js +181 -0
  12. package/lib/commonjs/license/index.js +57 -42
  13. package/lib/commonjs/license/licenseModule.js +99 -0
  14. package/lib/commonjs/license/tierLimits.js +165 -0
  15. package/lib/commonjs/ui/backgrounds/BackgroundSwitcher.js +180 -0
  16. package/lib/commonjs/ui/backgrounds/README.md +115 -0
  17. package/lib/commonjs/ui/backgrounds/ToolBackground.js +74 -0
  18. package/lib/commonjs/ui/backgrounds/backgroundStore.js +116 -0
  19. package/lib/commonjs/ui/backgrounds/index.js +70 -0
  20. package/lib/commonjs/ui/backgrounds/primitives.js +333 -0
  21. package/lib/commonjs/ui/backgrounds/registry.js +112 -0
  22. package/lib/commonjs/ui/backgrounds/rng.js +72 -0
  23. package/lib/commonjs/ui/backgrounds/types.js +1 -0
  24. package/lib/commonjs/ui/backgrounds/variants/deepField.js +351 -0
  25. package/lib/commonjs/ui/backgrounds/variants/lattice.js +579 -0
  26. package/lib/commonjs/ui/backgrounds/variants/starfield.js +210 -0
  27. package/lib/commonjs/ui/index.js +15 -3
  28. package/lib/commonjs/utils/devServer.js +62 -0
  29. package/lib/commonjs/utils/index.js +13 -0
  30. package/lib/commonjs/utils/renderCaptureRegistry.js +32 -3
  31. package/lib/commonjs/utils/safeExpoRouter.js +27 -2
  32. package/lib/module/JsModal.js +39 -16
  33. package/lib/module/dataViewer/JsonStringNotice.js +54 -0
  34. package/lib/module/dataViewer/ThemedSplitView.js +20 -1
  35. package/lib/module/dataViewer/TimestampDeltaBar.js +91 -0
  36. package/lib/module/dataViewer/index.js +4 -0
  37. package/lib/module/dataViewer/jsonStringValue.js +89 -0
  38. package/lib/module/dataViewer/timestampDiff.js +139 -0
  39. package/lib/module/hooks/safe-area-impl.js +1 -1
  40. package/lib/module/index.js +5 -3
  41. package/lib/module/license/FeatureGate.js +43 -10
  42. package/lib/module/license/FreeAccountPrompt.js +176 -0
  43. package/lib/module/license/index.js +5 -40
  44. package/lib/module/license/licenseModule.js +92 -0
  45. package/lib/module/license/tierLimits.js +158 -0
  46. package/lib/module/ui/backgrounds/BackgroundSwitcher.js +176 -0
  47. package/lib/module/ui/backgrounds/README.md +115 -0
  48. package/lib/module/ui/backgrounds/ToolBackground.js +70 -0
  49. package/lib/module/ui/backgrounds/backgroundStore.js +111 -0
  50. package/lib/module/ui/backgrounds/index.js +9 -0
  51. package/lib/module/ui/backgrounds/primitives.js +328 -0
  52. package/lib/module/ui/backgrounds/registry.js +105 -0
  53. package/lib/module/ui/backgrounds/rng.js +65 -0
  54. package/lib/module/ui/backgrounds/types.js +1 -0
  55. package/lib/module/ui/backgrounds/variants/deepField.js +347 -0
  56. package/lib/module/ui/backgrounds/variants/lattice.js +575 -0
  57. package/lib/module/ui/backgrounds/variants/starfield.js +206 -0
  58. package/lib/module/ui/index.js +3 -0
  59. package/lib/module/utils/devServer.js +58 -0
  60. package/lib/module/utils/index.js +2 -1
  61. package/lib/module/utils/renderCaptureRegistry.js +32 -3
  62. package/lib/module/utils/safeExpoRouter.js +26 -2
  63. package/lib/typescript/commonjs/JsModal.d.ts.map +1 -1
  64. package/lib/typescript/commonjs/dataViewer/JsonStringNotice.d.ts +6 -0
  65. package/lib/typescript/commonjs/dataViewer/JsonStringNotice.d.ts.map +1 -0
  66. package/lib/typescript/commonjs/dataViewer/ThemedSplitView.d.ts.map +1 -1
  67. package/lib/typescript/commonjs/dataViewer/TimestampDeltaBar.d.ts +7 -0
  68. package/lib/typescript/commonjs/dataViewer/TimestampDeltaBar.d.ts.map +1 -0
  69. package/lib/typescript/commonjs/dataViewer/index.d.ts +6 -0
  70. package/lib/typescript/commonjs/dataViewer/index.d.ts.map +1 -1
  71. package/lib/typescript/commonjs/dataViewer/jsonStringValue.d.ts +25 -0
  72. package/lib/typescript/commonjs/dataViewer/jsonStringValue.d.ts.map +1 -0
  73. package/lib/typescript/commonjs/dataViewer/timestampDiff.d.ts +55 -0
  74. package/lib/typescript/commonjs/dataViewer/timestampDiff.d.ts.map +1 -0
  75. package/lib/typescript/commonjs/hooks/safe-area-impl.d.ts +1 -1
  76. package/lib/typescript/commonjs/index.d.ts +4 -3
  77. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  78. package/lib/typescript/commonjs/license/FeatureGate.d.ts +19 -3
  79. package/lib/typescript/commonjs/license/FeatureGate.d.ts.map +1 -1
  80. package/lib/typescript/commonjs/license/FreeAccountPrompt.d.ts +23 -0
  81. package/lib/typescript/commonjs/license/FreeAccountPrompt.d.ts.map +1 -0
  82. package/lib/typescript/commonjs/license/index.d.ts +6 -15
  83. package/lib/typescript/commonjs/license/index.d.ts.map +1 -1
  84. package/lib/typescript/commonjs/license/licenseModule.d.ts +55 -0
  85. package/lib/typescript/commonjs/license/licenseModule.d.ts.map +1 -0
  86. package/lib/typescript/commonjs/license/tierLimits.d.ts +143 -0
  87. package/lib/typescript/commonjs/license/tierLimits.d.ts.map +1 -0
  88. package/lib/typescript/commonjs/ui/backgrounds/BackgroundSwitcher.d.ts +13 -0
  89. package/lib/typescript/commonjs/ui/backgrounds/BackgroundSwitcher.d.ts.map +1 -0
  90. package/lib/typescript/commonjs/ui/backgrounds/ToolBackground.d.ts +30 -0
  91. package/lib/typescript/commonjs/ui/backgrounds/ToolBackground.d.ts.map +1 -0
  92. package/lib/typescript/commonjs/ui/backgrounds/backgroundStore.d.ts +43 -0
  93. package/lib/typescript/commonjs/ui/backgrounds/backgroundStore.d.ts.map +1 -0
  94. package/lib/typescript/commonjs/ui/backgrounds/index.d.ts +7 -0
  95. package/lib/typescript/commonjs/ui/backgrounds/index.d.ts.map +1 -0
  96. package/lib/typescript/commonjs/ui/backgrounds/primitives.d.ts +106 -0
  97. package/lib/typescript/commonjs/ui/backgrounds/primitives.d.ts.map +1 -0
  98. package/lib/typescript/commonjs/ui/backgrounds/registry.d.ts +28 -0
  99. package/lib/typescript/commonjs/ui/backgrounds/registry.d.ts.map +1 -0
  100. package/lib/typescript/commonjs/ui/backgrounds/rng.d.ts +27 -0
  101. package/lib/typescript/commonjs/ui/backgrounds/rng.d.ts.map +1 -0
  102. package/lib/typescript/commonjs/ui/backgrounds/types.d.ts +14 -0
  103. package/lib/typescript/commonjs/ui/backgrounds/types.d.ts.map +1 -0
  104. package/lib/typescript/commonjs/ui/backgrounds/variants/deepField.d.ts +65 -0
  105. package/lib/typescript/commonjs/ui/backgrounds/variants/deepField.d.ts.map +1 -0
  106. package/lib/typescript/commonjs/ui/backgrounds/variants/lattice.d.ts +33 -0
  107. package/lib/typescript/commonjs/ui/backgrounds/variants/lattice.d.ts.map +1 -0
  108. package/lib/typescript/commonjs/ui/backgrounds/variants/starfield.d.ts +12 -0
  109. package/lib/typescript/commonjs/ui/backgrounds/variants/starfield.d.ts.map +1 -0
  110. package/lib/typescript/commonjs/ui/index.d.ts +1 -0
  111. package/lib/typescript/commonjs/ui/index.d.ts.map +1 -1
  112. package/lib/typescript/commonjs/utils/devServer.d.ts +24 -0
  113. package/lib/typescript/commonjs/utils/devServer.d.ts.map +1 -0
  114. package/lib/typescript/commonjs/utils/index.d.ts +3 -2
  115. package/lib/typescript/commonjs/utils/index.d.ts.map +1 -1
  116. package/lib/typescript/commonjs/utils/renderCaptureRegistry.d.ts +52 -2
  117. package/lib/typescript/commonjs/utils/renderCaptureRegistry.d.ts.map +1 -1
  118. package/lib/typescript/commonjs/utils/safeExpoRouter.d.ts +23 -0
  119. package/lib/typescript/commonjs/utils/safeExpoRouter.d.ts.map +1 -1
  120. package/lib/typescript/module/JsModal.d.ts.map +1 -1
  121. package/lib/typescript/module/dataViewer/JsonStringNotice.d.ts +6 -0
  122. package/lib/typescript/module/dataViewer/JsonStringNotice.d.ts.map +1 -0
  123. package/lib/typescript/module/dataViewer/ThemedSplitView.d.ts.map +1 -1
  124. package/lib/typescript/module/dataViewer/TimestampDeltaBar.d.ts +7 -0
  125. package/lib/typescript/module/dataViewer/TimestampDeltaBar.d.ts.map +1 -0
  126. package/lib/typescript/module/dataViewer/index.d.ts +6 -0
  127. package/lib/typescript/module/dataViewer/index.d.ts.map +1 -1
  128. package/lib/typescript/module/dataViewer/jsonStringValue.d.ts +25 -0
  129. package/lib/typescript/module/dataViewer/jsonStringValue.d.ts.map +1 -0
  130. package/lib/typescript/module/dataViewer/timestampDiff.d.ts +55 -0
  131. package/lib/typescript/module/dataViewer/timestampDiff.d.ts.map +1 -0
  132. package/lib/typescript/module/hooks/safe-area-impl.d.ts +1 -1
  133. package/lib/typescript/module/index.d.ts +4 -3
  134. package/lib/typescript/module/index.d.ts.map +1 -1
  135. package/lib/typescript/module/license/FeatureGate.d.ts +19 -3
  136. package/lib/typescript/module/license/FeatureGate.d.ts.map +1 -1
  137. package/lib/typescript/module/license/FreeAccountPrompt.d.ts +23 -0
  138. package/lib/typescript/module/license/FreeAccountPrompt.d.ts.map +1 -0
  139. package/lib/typescript/module/license/index.d.ts +6 -15
  140. package/lib/typescript/module/license/index.d.ts.map +1 -1
  141. package/lib/typescript/module/license/licenseModule.d.ts +55 -0
  142. package/lib/typescript/module/license/licenseModule.d.ts.map +1 -0
  143. package/lib/typescript/module/license/tierLimits.d.ts +143 -0
  144. package/lib/typescript/module/license/tierLimits.d.ts.map +1 -0
  145. package/lib/typescript/module/ui/backgrounds/BackgroundSwitcher.d.ts +13 -0
  146. package/lib/typescript/module/ui/backgrounds/BackgroundSwitcher.d.ts.map +1 -0
  147. package/lib/typescript/module/ui/backgrounds/ToolBackground.d.ts +30 -0
  148. package/lib/typescript/module/ui/backgrounds/ToolBackground.d.ts.map +1 -0
  149. package/lib/typescript/module/ui/backgrounds/backgroundStore.d.ts +43 -0
  150. package/lib/typescript/module/ui/backgrounds/backgroundStore.d.ts.map +1 -0
  151. package/lib/typescript/module/ui/backgrounds/index.d.ts +7 -0
  152. package/lib/typescript/module/ui/backgrounds/index.d.ts.map +1 -0
  153. package/lib/typescript/module/ui/backgrounds/primitives.d.ts +106 -0
  154. package/lib/typescript/module/ui/backgrounds/primitives.d.ts.map +1 -0
  155. package/lib/typescript/module/ui/backgrounds/registry.d.ts +28 -0
  156. package/lib/typescript/module/ui/backgrounds/registry.d.ts.map +1 -0
  157. package/lib/typescript/module/ui/backgrounds/rng.d.ts +27 -0
  158. package/lib/typescript/module/ui/backgrounds/rng.d.ts.map +1 -0
  159. package/lib/typescript/module/ui/backgrounds/types.d.ts +14 -0
  160. package/lib/typescript/module/ui/backgrounds/types.d.ts.map +1 -0
  161. package/lib/typescript/module/ui/backgrounds/variants/deepField.d.ts +65 -0
  162. package/lib/typescript/module/ui/backgrounds/variants/deepField.d.ts.map +1 -0
  163. package/lib/typescript/module/ui/backgrounds/variants/lattice.d.ts +33 -0
  164. package/lib/typescript/module/ui/backgrounds/variants/lattice.d.ts.map +1 -0
  165. package/lib/typescript/module/ui/backgrounds/variants/starfield.d.ts +12 -0
  166. package/lib/typescript/module/ui/backgrounds/variants/starfield.d.ts.map +1 -0
  167. package/lib/typescript/module/ui/index.d.ts +1 -0
  168. package/lib/typescript/module/ui/index.d.ts.map +1 -1
  169. package/lib/typescript/module/utils/devServer.d.ts +24 -0
  170. package/lib/typescript/module/utils/devServer.d.ts.map +1 -0
  171. package/lib/typescript/module/utils/index.d.ts +3 -2
  172. package/lib/typescript/module/utils/index.d.ts.map +1 -1
  173. package/lib/typescript/module/utils/renderCaptureRegistry.d.ts +52 -2
  174. package/lib/typescript/module/utils/renderCaptureRegistry.d.ts.map +1 -1
  175. package/lib/typescript/module/utils/safeExpoRouter.d.ts +23 -0
  176. package/lib/typescript/module/utils/safeExpoRouter.d.ts.map +1 -1
  177. package/package.json +4 -4
  178. package/scripts/detect-safe-area.js +1 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deepField.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/backgrounds/variants/deepField.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAOH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AA8BvD,gDAAgD;AAChD,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,OAAO,GAAG,KAAK,CAAC;AACpD,wEAAwE;AACxE,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAgOhD,MAAM,WAAW,eAAe;IAC9B,oEAAoE;IACpE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4CAA4C;IAC5C,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,6EAA6E;IAC7E,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,gFAAgF;IAChF,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,gFA+D3B,CAAC;AAEH,eAAO,MAAM,SAAS,8DAEpB,CAAC"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * The lattice family — quiet technical geometry.
3
+ *
4
+ * All eight share one register, set by Hex Mesh: a near-black base, one soft
5
+ * off-centre glow for depth, a rasterized hairline pattern at low alpha, a slow
6
+ * breath, and a vignette. They read as instrument panels and drafting paper
7
+ * rather than scenery, which is what keeps them legible under dense tool UI —
8
+ * the pattern never competes with the text on top of it.
9
+ *
10
+ * Cost follows from that: the geometry is static, so it rasterizes into ONE
11
+ * texture and the only animated node is the shared breath. See
12
+ * `../README.md` for the contract.
13
+ */
14
+ import type { BackgroundVariantProps } from "../types";
15
+ /**
16
+ * Squares rotated 45°, odd rows offset by half a step. RN has no polygon
17
+ * primitive, so this is the honest way to get a technical mesh out of bordered
18
+ * views; at this scale it reads the same as a hex grid.
19
+ */
20
+ export declare const HexMesh: import("react").NamedExoticComponent<BackgroundVariantProps>;
21
+ export declare const IsoGrid: import("react").NamedExoticComponent<BackgroundVariantProps>;
22
+ export declare const Crosshatch: import("react").NamedExoticComponent<BackgroundVariantProps>;
23
+ export declare const PerfBoard: import("react").NamedExoticComponent<BackgroundVariantProps>;
24
+ /**
25
+ * The only preset in the family with a gradient in it, and it's made of dot
26
+ * SIZE rather than colour: dots swell toward the light and shrink away from it.
27
+ * Cheaper than a real gradient and it survives any background colour.
28
+ */
29
+ export declare const Halftone: import("react").NamedExoticComponent<BackgroundVariantProps>;
30
+ export declare const Waffle: import("react").NamedExoticComponent<BackgroundVariantProps>;
31
+ export declare const Instrument: import("react").NamedExoticComponent<BackgroundVariantProps>;
32
+ export declare const Radar: import("react").NamedExoticComponent<BackgroundVariantProps>;
33
+ //# sourceMappingURL=lattice.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lattice.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/backgrounds/variants/lattice.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAOH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AA6HvD;;;;GAIG;AACH,eAAO,MAAM,OAAO,8DAgClB,CAAC;AAMH,eAAO,MAAM,OAAO,8DAWlB,CAAC;AAMH,eAAO,MAAM,UAAU,8DAQrB,CAAC;AAQH,eAAO,MAAM,SAAS,8DAgCpB,CAAC;AAQH;;;;GAIG;AACH,eAAO,MAAM,QAAQ,8DAkCnB,CAAC;AAQH,eAAO,MAAM,MAAM,8DA6BjB,CAAC;AAMH,eAAO,MAAM,UAAU,8DAgDrB,CAAC;AAmEH,eAAO,MAAM,KAAK,8DAmEhB,CAAC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Starfield — the RN-primitive port of the Everlights parallax-drift starfield.
3
+ *
4
+ * The original is a GPU-instanced Skia `<Atlas>` with a per-star worklet; Buoy
5
+ * can't depend on Skia, so the depth continuum is quantised into five discrete
6
+ * bands. Each band is one rasterized layer of dots sliding at its own speed —
7
+ * five native-driven loops instead of 160 per-frame transforms — and the eye
8
+ * reads five parallax speeds as depth just as well as it reads a continuum.
9
+ */
10
+ import type { BackgroundVariantProps } from "../types";
11
+ export declare const Starfield: import("react").NamedExoticComponent<BackgroundVariantProps>;
12
+ //# sourceMappingURL=starfield.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"starfield.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/backgrounds/variants/starfield.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAOH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAsHvD,eAAO,MAAM,SAAS,8DAyBpB,CAAC"}
@@ -1,4 +1,5 @@
1
1
  export * from "./components";
2
+ export * from "./backgrounds";
2
3
  export { toolTheme, type ToolTheme } from "./toolTheme";
3
4
  export { CyberpunkSectionButton } from "./console/CyberpunkSectionButton";
4
5
  export * from "./gameUI";
@@ -1 +1 @@
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"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ui/index.ts"],"names":[],"mappings":"AAGA,cAAc,cAAc,CAAC;AAG7B,cAAc,eAAe,CAAC;AAG9B,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,24 @@
1
+ /**
2
+ * devServer
3
+ *
4
+ * Origin of the Metro/Expo dev server that served this bundle, e.g.
5
+ * `http://192.168.1.20:8081`.
6
+ *
7
+ * Why a remote driver wants it: reloading the app normally runs IN the app
8
+ * (`DevSettings.reload()`), which is exactly what stops working when the app
9
+ * has crashed — a fatal render error unmounts the tree, so no JS action can be
10
+ * answered and the one command that would recover the app is unreachable. The
11
+ * dev server's message socket reloads through the NATIVE side instead (it is
12
+ * what the `r` key and the redbox's Reload button use), so a driver that knows
13
+ * this origin can recover an app that can no longer help itself.
14
+ *
15
+ * Reported once, while the app is healthy, so it is already known by the time
16
+ * it's needed.
17
+ */
18
+ /**
19
+ * `http://host:port` of the dev server, or null in production / on web (a
20
+ * release bundle's scriptURL is a `file://` path, which has no origin worth
21
+ * reporting).
22
+ */
23
+ export declare function getDevServerOrigin(): string | null;
24
+ //# sourceMappingURL=devServer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"devServer.d.ts","sourceRoot":"","sources":["../../../../src/utils/devServer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AA8BH;;;;GAIG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,GAAG,IAAI,CAIlD"}
@@ -6,11 +6,12 @@ export { safeStringify } from "./safeStringify";
6
6
  export { getValueType, isPrimitive, isJsonSerializable, isValidJson, getConstructorName, isEmpty, getValueSize, } from "./typeHelpers";
7
7
  export { parseValue, formatValue, getTypeColor, truncateText, flattenObject, formatPath, } from "./valueFormatting";
8
8
  export { loadOptionalModule, getCachedOptionalModule } from "./loadOptionalModule";
9
- export { setRenderCaptureProvider, getRenderCaptureProvider, type RenderCaptureProvider, type RenderCaptureSummary, type RenderCaptureTopComponent, } from "./renderCaptureRegistry";
9
+ export { setRenderCaptureProvider, getRenderCaptureProvider, type RenderCaptureProvider, type RenderCaptureSummary, type RenderCaptureTopComponent, type RenderCauseCounts, } from "./renderCaptureRegistry";
10
10
  export { registerStateSnapshotProvider, getStateSnapshotProviders, getStateSnapshotProvider, subscribeToStateSnapshotProviders, type StateSnapshotProvider, type StateSnapshotProviderStatus, type StateSnapshotCapture, type StateSnapshotRestoreResult, type StateSnapshotPreview, type StateSnapshotPreviewItem, type StateSnapshotPreviewVerdict, } from "./stateSnapshotRegistry";
11
11
  export { serialize as superJsonSerialize, deserialize as superJsonDeserialize, type SuperJSONResult, } from "./minimalSuperJSON";
12
12
  export { reloadApp, scheduleReloadApp, resolveReloadStrategy, REMOTE_RELOAD_DELAY_MS, type ReloadStrategy, type ResolvedReloadStrategy, } from "./reloadApp";
13
+ export { getDevServerOrigin } from "./devServer";
13
14
  export { Subscribable, type SubscribableListener } from "./subscribable";
14
15
  export { subscriberCountNotifier, subscribeToSubscriberCountChanges, notifySubscriberCountChange, } from "./subscriberCountNotifier";
15
- export { useSafeRouter, useSafePathname, useSafeSegments, useSafeGlobalSearchParams, getSafeRouter, getSafeCurrentPathname, isExpoRouterAvailable, } from "./safeExpoRouter";
16
+ export { useSafeRouter, useSafePathname, useSafeSegments, useSafeGlobalSearchParams, getSafeRouter, getSafeCurrentPathname, getSafeCurrentRoute, isExpoRouterAvailable, type SafeRouteLocation, } from "./safeExpoRouter";
16
17
  //# 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,M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AAiC,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,EAC9B,KAAK,iBAAiB,GACvB,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,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,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,mBAAmB,EACnB,qBAAqB,EACrB,KAAK,iBAAiB,GACvB,MAAM,kBAAkB,CAAC"}
@@ -7,6 +7,30 @@
7
7
  * other — same optional-capability pattern as PerfMonitorController's
8
8
  * `installReaFpsGetter`.
9
9
  */
10
+ /**
11
+ * Why a component rendered, counted across a capture window.
12
+ *
13
+ * The split between `props` and `propsUnstable` is the one that matters in
14
+ * practice. Both mean "my props changed", but they send you to different
15
+ * files: `props` is a genuine update (a value differs) and belongs to the
16
+ * component; `propsUnstable` means the values are equal and only the
17
+ * IDENTITY changed — a fresh arrow or object literal handed down by the
18
+ * parent every render — and the fix is always upstream. Reporting that as
19
+ * plain "props" is technically true and sends people into the wrong file,
20
+ * which is why it gets its own bucket.
21
+ */
22
+ export interface RenderCauseCounts {
23
+ /** First render — nothing to compare against. */
24
+ mount?: number;
25
+ /** Props changed and at least one VALUE differs. A real update. */
26
+ props?: number;
27
+ /** Props changed by identity only; every changed value is equivalent. */
28
+ propsUnstable?: number;
29
+ /** Own state/hooks changed (useState, useReducer, context read). */
30
+ hooks?: number;
31
+ /** Rendered with no change of its own — a parent cascade. */
32
+ parent?: number;
33
+ }
10
34
  /** One component's aggregated renders across a capture window. */
11
35
  export interface RenderCaptureTopComponent {
12
36
  name: string;
@@ -18,6 +42,16 @@ export interface RenderCaptureTopComponent {
18
42
  maxMs: number;
19
43
  /** totalMs / renders. */
20
44
  avgMs: number;
45
+ /** Why it rendered. Present whenever capture ran. */
46
+ causes?: RenderCauseCounts;
47
+ /**
48
+ * Prop keys most often seen changing. Detail tier — only populated when
49
+ * `captureRenderDetail` is on, because collecting key names allocates on
50
+ * every render.
51
+ */
52
+ changedProps?: string[];
53
+ /** Nearest composite ancestor that rendered with it. Detail tier. */
54
+ parentName?: string;
21
55
  }
22
56
  /** Result of a capture window (one benchmark recording). */
23
57
  export interface RenderCaptureSummary {
@@ -32,14 +66,30 @@ export interface RenderCaptureSummary {
32
66
  capturedDurations: boolean;
33
67
  /** Sum of all self durations in ms across the capture. */
34
68
  totalRenderMs?: number;
69
+ /**
70
+ * Renders that produced nothing new: parent cascades plus identity-only
71
+ * prop changes. Both are removable without changing behaviour, so this is
72
+ * the recoverable share of `totalRenders` — the number to lead with.
73
+ */
74
+ wastedRenders?: number;
75
+ /** Cause totals across every component, including ones outside topComponents. */
76
+ causes?: RenderCauseCounts;
35
77
  /** Heaviest components by total self duration, capped by the provider. */
36
78
  topComponents: RenderCaptureTopComponent[];
37
79
  }
38
80
  export interface RenderCaptureProvider {
39
81
  /** Whether capture can work right now (dev build, DevTools hook present). */
40
82
  isSupported(): boolean;
41
- /** Begin a capture window. Resets any previous unclaimed data. */
42
- start(): void;
83
+ /**
84
+ * Begin a capture window. Resets any previous unclaimed data.
85
+ *
86
+ * `detail` opts into the allocating tier (changed prop keys, parent names).
87
+ * Causes and `wastedRenders` come back either way — older providers that
88
+ * ignore the argument simply return a summary without them.
89
+ */
90
+ start(opts?: {
91
+ detail?: boolean;
92
+ }): void;
43
93
  /** End the window and return the aggregate, or null if never started. */
44
94
  stop(): RenderCaptureSummary | null;
45
95
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"renderCaptureRegistry.d.ts","sourceRoot":"","sources":["../../../../src/utils/renderCaptureRegistry.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,kEAAkE;AAClE,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,yEAAyE;IACzE,OAAO,EAAE,MAAM,CAAC;IAChB,mEAAmE;IACnE,OAAO,EAAE,MAAM,CAAC;IAChB,+CAA+C;IAC/C,KAAK,EAAE,MAAM,CAAC;IACd,yBAAyB;IACzB,KAAK,EAAE,MAAM,CAAC;CAGf;AAED,4DAA4D;AAC5D,MAAM,WAAW,oBAAoB;IACnC,0EAA0E;IAC1E,YAAY,EAAE,MAAM,CAAC;IACrB,kDAAkD;IAClD,YAAY,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,iBAAiB,EAAE,OAAO,CAAC;IAC3B,0DAA0D;IAC1D,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,0EAA0E;IAC1E,aAAa,EAAE,yBAAyB,EAAE,CAAC;CAC5C;AAED,MAAM,WAAW,qBAAqB;IACpC,6EAA6E;IAC7E,WAAW,IAAI,OAAO,CAAC;IACvB,kEAAkE;IAClE,KAAK,IAAI,IAAI,CAAC;IACd,yEAAyE;IACzE,IAAI,IAAI,oBAAoB,GAAG,IAAI,CAAC;IACpC;;;;;OAKG;IACH,mBAAmB,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,CAAC;CAC7C;AAID,iFAAiF;AACjF,wBAAgB,wBAAwB,CAAC,CAAC,EAAE,qBAAqB,GAAG,IAAI,GAAG,IAAI,CAE9E;AAED,wBAAgB,wBAAwB,IAAI,qBAAqB,GAAG,IAAI,CAEvE"}
1
+ {"version":3,"file":"renderCaptureRegistry.d.ts","sourceRoot":"","sources":["../../../../src/utils/renderCaptureRegistry.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;;;;;;;;;GAWG;AACH,MAAM,WA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AAA;KAAE,GAAG,IAAI,CAAC;IACzC,yEAAyE;IACzE,IAAI,IAAI,oBAAoB,GAAG,IAAI,CAAC;IACpC;;;;;OAKG;IACH,mBAAmB,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,CAAC;CAC7C;AAyBD,iFAAiF;AACjF,wBAAgB,wBAAwB,CAAC,CAAC,EAAE,qBAAqB,GAAG,IAAI,GAAG,IAAI,CAE9E;AAED,wBAAgB,wBAAwB,IAAI,qBAAqB,GAAG,IAAI,CAEvE"}
@@ -22,5 +22,28 @@ export declare function getSafeRouter(): any;
22
22
  * can't be reached.
23
23
  */
24
24
  export declare function getSafeCurrentPathname(): string | null;
25
+ /** A route location that can be re-visited later via {@link getSafeRouter}. */
26
+ export interface SafeRouteLocation {
27
+ /** Pathname with dynamic segments resolved, e.g. `/pokemon/25`. */
28
+ pathname: string;
29
+ /**
30
+ * What to actually navigate to: the pathname WITH its search params
31
+ * (`/pokemon/25?tab=stats`). Falls back to `pathname` on router builds that
32
+ * don't expose it. Non-serializable params passed imperatively through
33
+ * `navigate(path, params)` are NOT part of this — only the URL is.
34
+ */
35
+ href: string;
36
+ /** Route segments, when the router exposes them (display only). */
37
+ segments?: string[];
38
+ }
39
+ /**
40
+ * The current route as a re-visitable location, read imperatively from
41
+ * expo-router's store.
42
+ *
43
+ * Like {@link getSafeCurrentPathname} this works before any navigation has
44
+ * been recorded (cold start on the initial route), and returns null when
45
+ * expo-router isn't available or the store can't be reached.
46
+ */
47
+ export declare function getSafeCurrentRoute(): SafeRouteLocation | null;
25
48
  export declare function isExpoRouterAvailable(): boolean;
26
49
  //# sourceMappingURL=safeExpoRouter.d.ts.map
@@ -1 +1 @@
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"}
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;AAiCD;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,GAAG,IAAI,CAEtD;AAED,+EAA+E;AAC/E,MAAM,WAAW,iBAAiB;IAChC,mEAAmE;IACnE,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;;OAKG;IACH,IAAI,EAAE,MAAM,CAAC;IACb,mEAAmE;IACnE,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,IAAI,iBAAiB,GAAG,IAAI,CAoB9D;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": "7.0.21",
3
+ "version": "7.0.23",
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.21"
139
+ "@buoy-gg/floating-tools-core": "^7.0.23"
140
140
  },
141
141
  "peerDependencies": {
142
- "@buoy-gg/license": "7.0.21",
142
+ "@buoy-gg/license": "7.0.23",
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.21"
170
+ "@buoy-gg/license": "^7.0.23"
171
171
  },
172
172
  "react-native-builder-bob": {
173
173
  "source": "src",
@@ -30,6 +30,7 @@ const OUTPUT_FILE = path.join(__dirname, "..", "src", "hooks", "safe-area-impl.t
30
30
  // Check for explicit fallback override (used during publishing)
31
31
  const forceFallback = process.env.REACT_BUOY_FALLBACK === "1";
32
32
 
33
+
33
34
  /**
34
35
  * Find the monorepo/project root by looking for pnpm-workspace.yaml or package.json with workspaces
35
36
  */