@buoy-gg/floating-tools-core 7.0.38 → 7.0.39

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 (371) hide show
  1. package/lib/commonjs/FloatingToolsStore.js +512 -1
  2. package/lib/commonjs/colors.js +54 -1
  3. package/lib/commonjs/constants.js +31 -1
  4. package/lib/commonjs/devToolsState.js +325 -1
  5. package/lib/commonjs/dial.js +639 -1
  6. package/lib/commonjs/dialUsage.js +130 -1
  7. package/lib/commonjs/easing.js +69 -1
  8. package/lib/commonjs/floating.js +75 -1
  9. package/lib/commonjs/fonts.js +31 -1
  10. package/lib/commonjs/fonts.web.js +8 -1
  11. package/lib/commonjs/icons/ask-buoy-icon.js +17 -1
  12. package/lib/commonjs/icons/ask-buoy-icon.native.js +32 -1
  13. package/lib/commonjs/icons/assets-icon.js +19 -1
  14. package/lib/commonjs/icons/assets-icon.native.js +17 -1
  15. package/lib/commonjs/icons/benchmark-icon.js +19 -1
  16. package/lib/commonjs/icons/benchmark-icon.native.js +17 -1
  17. package/lib/commonjs/icons/bif-raster-icon.js +49 -1
  18. package/lib/commonjs/icons/bif-raster-icon.native.js +47 -1
  19. package/lib/commonjs/icons/camera-icon.js +19 -1
  20. package/lib/commonjs/icons/camera-icon.native.js +17 -1
  21. package/lib/commonjs/icons/console-icon.js +17 -1
  22. package/lib/commonjs/icons/console-icon.native.js +32 -1
  23. package/lib/commonjs/icons/env-icon.js +19 -1
  24. package/lib/commonjs/icons/env-icon.native.js +17 -1
  25. package/lib/commonjs/icons/events-icon.js +19 -1
  26. package/lib/commonjs/icons/events-icon.native.js +17 -1
  27. package/lib/commonjs/icons/generated/assets-raster.g.js +8 -1
  28. package/lib/commonjs/icons/generated/benchmark-raster.g.js +8 -1
  29. package/lib/commonjs/icons/generated/camera-raster.g.js +8 -1
  30. package/lib/commonjs/icons/generated/env-raster.g.js +8 -1
  31. package/lib/commonjs/icons/generated/events-raster.g.js +8 -1
  32. package/lib/commonjs/icons/generated/glyph-icons.g.js +299 -1
  33. package/lib/commonjs/icons/generated/highlight-raster.g.js +8 -1
  34. package/lib/commonjs/icons/generated/highlighter-raster.g.js +8 -1
  35. package/lib/commonjs/icons/generated/icon-data.g.js +33855 -1
  36. package/lib/commonjs/icons/generated/image-overlay-raster.g.js +8 -1
  37. package/lib/commonjs/icons/generated/images-raster.g.js +8 -1
  38. package/lib/commonjs/icons/generated/network-raster.g.js +8 -1
  39. package/lib/commonjs/icons/generated/raster-icons.g.js +19 -1
  40. package/lib/commonjs/icons/generated/riverpod-raster.g.js +8 -1
  41. package/lib/commonjs/icons/generated/routes-raster.g.js +8 -1
  42. package/lib/commonjs/icons/generated/settings-raster.g.js +8 -1
  43. package/lib/commonjs/icons/generated/storage-raster.g.js +8 -1
  44. package/lib/commonjs/icons/generated/wifi-raster.g.js +8 -1
  45. package/lib/commonjs/icons/highlight-icon.js +19 -1
  46. package/lib/commonjs/icons/highlight-icon.native.js +17 -1
  47. package/lib/commonjs/icons/highlighter-icon.js +27 -1
  48. package/lib/commonjs/icons/highlighter-icon.native.js +25 -1
  49. package/lib/commonjs/icons/icon-factories.js +173 -1
  50. package/lib/commonjs/icons/icon-primitives.js +676 -1
  51. package/lib/commonjs/icons/icon-primitives.native.js +904 -1
  52. package/lib/commonjs/icons/icon-renderer.js +307 -1
  53. package/lib/commonjs/icons/iconGlow.js +32 -1
  54. package/lib/commonjs/icons/image-overlay-icon.js +19 -1
  55. package/lib/commonjs/icons/image-overlay-icon.native.js +17 -1
  56. package/lib/commonjs/icons/images-icon.js +19 -1
  57. package/lib/commonjs/icons/images-icon.native.js +17 -1
  58. package/lib/commonjs/icons/impersonate-icon.js +17 -1
  59. package/lib/commonjs/icons/impersonate-icon.native.js +32 -1
  60. package/lib/commonjs/icons/jotai-icon.js +17 -1
  61. package/lib/commonjs/icons/jotai-icon.native.js +34 -1
  62. package/lib/commonjs/icons/network-icon.js +19 -1
  63. package/lib/commonjs/icons/network-icon.native.js +17 -1
  64. package/lib/commonjs/icons/query-icon.js +17 -1
  65. package/lib/commonjs/icons/query-icon.native.js +34 -1
  66. package/lib/commonjs/icons/raster-icon.js +51 -1
  67. package/lib/commonjs/icons/redux-icon.js +17 -1
  68. package/lib/commonjs/icons/redux-icon.native.js +35 -1
  69. package/lib/commonjs/icons/renders-icon.js +30 -1
  70. package/lib/commonjs/icons/renders-icon.native.js +30 -1
  71. package/lib/commonjs/icons/riverpod-icon.js +19 -1
  72. package/lib/commonjs/icons/riverpod-icon.native.js +17 -1
  73. package/lib/commonjs/icons/routes-icon.js +35 -1
  74. package/lib/commonjs/icons/routes-icon.native.js +33 -1
  75. package/lib/commonjs/icons/routes-parts.js +47 -1
  76. package/lib/commonjs/icons/scenarios-icon.js +17 -1
  77. package/lib/commonjs/icons/scenarios-icon.native.js +32 -1
  78. package/lib/commonjs/icons/sentry-icon.js +17 -1
  79. package/lib/commonjs/icons/sentry-icon.native.js +36 -1
  80. package/lib/commonjs/icons/settings-icon.js +13 -1
  81. package/lib/commonjs/icons/settings-icon.native.js +11 -1
  82. package/lib/commonjs/icons/storage-icon.js +19 -1
  83. package/lib/commonjs/icons/storage-icon.native.js +17 -1
  84. package/lib/commonjs/icons/time-machine-icon.js +17 -1
  85. package/lib/commonjs/icons/time-machine-icon.native.js +32 -1
  86. package/lib/commonjs/icons/wifi-icon.js +19 -1
  87. package/lib/commonjs/icons/wifi-icon.native.js +17 -1
  88. package/lib/commonjs/icons/zustand-icon.js +17 -1
  89. package/lib/commonjs/icons/zustand-icon.native.js +34 -1
  90. package/lib/commonjs/index.js +1099 -1
  91. package/lib/commonjs/settings.js +601 -1
  92. package/lib/commonjs/utils.js +72 -1
  93. package/lib/module/FloatingToolsStore.js +507 -1
  94. package/lib/module/colors.js +49 -1
  95. package/lib/module/constants.js +27 -1
  96. package/lib/module/devToolsState.js +318 -1
  97. package/lib/module/dial.js +624 -1
  98. package/lib/module/dialUsage.js +122 -1
  99. package/lib/module/easing.js +62 -1
  100. package/lib/module/floating.js +9 -1
  101. package/lib/module/fonts.js +28 -1
  102. package/lib/module/fonts.web.js +4 -1
  103. package/lib/module/icons/ask-buoy-icon.js +6 -1
  104. package/lib/module/icons/ask-buoy-icon.native.js +23 -1
  105. package/lib/module/icons/assets-icon.js +8 -1
  106. package/lib/module/icons/assets-icon.native.js +7 -1
  107. package/lib/module/icons/benchmark-icon.js +8 -1
  108. package/lib/module/icons/benchmark-icon.native.js +7 -1
  109. package/lib/module/icons/bif-raster-icon.js +46 -1
  110. package/lib/module/icons/bif-raster-icon.native.js +44 -1
  111. package/lib/module/icons/camera-icon.js +8 -1
  112. package/lib/module/icons/camera-icon.native.js +7 -1
  113. package/lib/module/icons/console-icon.js +6 -1
  114. package/lib/module/icons/console-icon.native.js +23 -1
  115. package/lib/module/icons/env-icon.js +8 -1
  116. package/lib/module/icons/env-icon.native.js +7 -1
  117. package/lib/module/icons/events-icon.js +8 -1
  118. package/lib/module/icons/events-icon.native.js +7 -1
  119. package/lib/module/icons/generated/assets-raster.g.js +4 -1
  120. package/lib/module/icons/generated/benchmark-raster.g.js +4 -1
  121. package/lib/module/icons/generated/camera-raster.g.js +4 -1
  122. package/lib/module/icons/generated/env-raster.g.js +4 -1
  123. package/lib/module/icons/generated/events-raster.g.js +4 -1
  124. package/lib/module/icons/generated/glyph-icons.g.js +296 -1
  125. package/lib/module/icons/generated/highlight-raster.g.js +4 -1
  126. package/lib/module/icons/generated/highlighter-raster.g.js +4 -1
  127. package/lib/module/icons/generated/icon-data.g.js +33850 -1
  128. package/lib/module/icons/generated/image-overlay-raster.g.js +4 -1
  129. package/lib/module/icons/generated/images-raster.g.js +4 -1
  130. package/lib/module/icons/generated/network-raster.g.js +4 -1
  131. package/lib/module/icons/generated/raster-icons.g.js +15 -1
  132. package/lib/module/icons/generated/riverpod-raster.g.js +4 -1
  133. package/lib/module/icons/generated/routes-raster.g.js +4 -1
  134. package/lib/module/icons/generated/settings-raster.g.js +4 -1
  135. package/lib/module/icons/generated/storage-raster.g.js +4 -1
  136. package/lib/module/icons/generated/wifi-raster.g.js +4 -1
  137. package/lib/module/icons/highlight-icon.js +8 -1
  138. package/lib/module/icons/highlight-icon.native.js +7 -1
  139. package/lib/module/icons/highlighter-icon.js +10 -1
  140. package/lib/module/icons/highlighter-icon.native.js +9 -1
  141. package/lib/module/icons/icon-factories.js +163 -1
  142. package/lib/module/icons/icon-primitives.js +673 -1
  143. package/lib/module/icons/icon-primitives.native.js +899 -1
  144. package/lib/module/icons/icon-renderer.js +302 -1
  145. package/lib/module/icons/iconGlow.js +28 -1
  146. package/lib/module/icons/image-overlay-icon.js +8 -1
  147. package/lib/module/icons/image-overlay-icon.native.js +7 -1
  148. package/lib/module/icons/images-icon.js +8 -1
  149. package/lib/module/icons/images-icon.native.js +7 -1
  150. package/lib/module/icons/impersonate-icon.js +6 -1
  151. package/lib/module/icons/impersonate-icon.native.js +23 -1
  152. package/lib/module/icons/jotai-icon.js +6 -1
  153. package/lib/module/icons/jotai-icon.native.js +25 -1
  154. package/lib/module/icons/network-icon.js +8 -1
  155. package/lib/module/icons/network-icon.native.js +7 -1
  156. package/lib/module/icons/query-icon.js +6 -1
  157. package/lib/module/icons/query-icon.native.js +25 -1
  158. package/lib/module/icons/raster-icon.js +48 -1
  159. package/lib/module/icons/redux-icon.js +6 -1
  160. package/lib/module/icons/redux-icon.native.js +26 -1
  161. package/lib/module/icons/renders-icon.js +3 -1
  162. package/lib/module/icons/renders-icon.native.js +3 -1
  163. package/lib/module/icons/riverpod-icon.js +8 -1
  164. package/lib/module/icons/riverpod-icon.native.js +7 -1
  165. package/lib/module/icons/routes-icon.js +9 -1
  166. package/lib/module/icons/routes-icon.native.js +8 -1
  167. package/lib/module/icons/routes-parts.js +40 -1
  168. package/lib/module/icons/scenarios-icon.js +6 -1
  169. package/lib/module/icons/scenarios-icon.native.js +23 -1
  170. package/lib/module/icons/sentry-icon.js +6 -1
  171. package/lib/module/icons/sentry-icon.native.js +27 -1
  172. package/lib/module/icons/settings-icon.js +7 -1
  173. package/lib/module/icons/settings-icon.native.js +6 -1
  174. package/lib/module/icons/storage-icon.js +8 -1
  175. package/lib/module/icons/storage-icon.native.js +7 -1
  176. package/lib/module/icons/time-machine-icon.js +6 -1
  177. package/lib/module/icons/time-machine-icon.native.js +23 -1
  178. package/lib/module/icons/wifi-icon.js +8 -1
  179. package/lib/module/icons/wifi-icon.native.js +7 -1
  180. package/lib/module/icons/zustand-icon.js +6 -1
  181. package/lib/module/icons/zustand-icon.native.js +25 -1
  182. package/lib/module/index.js +128 -1
  183. package/lib/module/settings.js +589 -1
  184. package/lib/module/utils.js +66 -1
  185. package/lib/typescript/commonjs/FloatingToolsStore.d.ts.map +1 -0
  186. package/lib/typescript/commonjs/colors.d.ts.map +1 -0
  187. package/lib/typescript/commonjs/constants.d.ts.map +1 -0
  188. package/lib/typescript/commonjs/devToolsState.d.ts.map +1 -0
  189. package/lib/typescript/commonjs/dial.d.ts.map +1 -0
  190. package/lib/typescript/commonjs/dialUsage.d.ts.map +1 -0
  191. package/lib/typescript/commonjs/easing.d.ts.map +1 -0
  192. package/lib/typescript/commonjs/floating.d.ts.map +1 -0
  193. package/lib/typescript/commonjs/fonts.d.ts.map +1 -0
  194. package/lib/typescript/commonjs/fonts.web.d.ts.map +1 -0
  195. package/lib/typescript/commonjs/icons/ask-buoy-icon.d.ts.map +1 -0
  196. package/lib/typescript/commonjs/icons/ask-buoy-icon.native.d.ts.map +1 -0
  197. package/lib/typescript/commonjs/icons/assets-icon.d.ts.map +1 -0
  198. package/lib/typescript/commonjs/icons/assets-icon.native.d.ts.map +1 -0
  199. package/lib/typescript/commonjs/icons/benchmark-icon.d.ts.map +1 -0
  200. package/lib/typescript/commonjs/icons/benchmark-icon.native.d.ts.map +1 -0
  201. package/lib/typescript/commonjs/icons/bif-raster-icon.d.ts.map +1 -0
  202. package/lib/typescript/commonjs/icons/bif-raster-icon.native.d.ts.map +1 -0
  203. package/lib/typescript/commonjs/icons/camera-icon.d.ts.map +1 -0
  204. package/lib/typescript/commonjs/icons/camera-icon.native.d.ts.map +1 -0
  205. package/lib/typescript/commonjs/icons/console-icon.d.ts.map +1 -0
  206. package/lib/typescript/commonjs/icons/console-icon.native.d.ts.map +1 -0
  207. package/lib/typescript/commonjs/icons/env-icon.d.ts.map +1 -0
  208. package/lib/typescript/commonjs/icons/env-icon.native.d.ts.map +1 -0
  209. package/lib/typescript/commonjs/icons/events-icon.d.ts.map +1 -0
  210. package/lib/typescript/commonjs/icons/events-icon.native.d.ts.map +1 -0
  211. package/lib/typescript/commonjs/icons/generated/assets-raster.g.d.ts.map +1 -0
  212. package/lib/typescript/commonjs/icons/generated/benchmark-raster.g.d.ts.map +1 -0
  213. package/lib/typescript/commonjs/icons/generated/camera-raster.g.d.ts.map +1 -0
  214. package/lib/typescript/commonjs/icons/generated/env-raster.g.d.ts.map +1 -0
  215. package/lib/typescript/commonjs/icons/generated/events-raster.g.d.ts.map +1 -0
  216. package/lib/typescript/commonjs/icons/generated/glyph-icons.g.d.ts.map +1 -0
  217. package/lib/typescript/commonjs/icons/generated/highlight-raster.g.d.ts.map +1 -0
  218. package/lib/typescript/commonjs/icons/generated/highlighter-raster.g.d.ts.map +1 -0
  219. package/lib/typescript/commonjs/icons/generated/icon-data.g.d.ts.map +1 -0
  220. package/lib/typescript/commonjs/icons/generated/image-overlay-raster.g.d.ts.map +1 -0
  221. package/lib/typescript/commonjs/icons/generated/images-raster.g.d.ts.map +1 -0
  222. package/lib/typescript/commonjs/icons/generated/network-raster.g.d.ts.map +1 -0
  223. package/lib/typescript/commonjs/icons/generated/raster-icons.g.d.ts.map +1 -0
  224. package/lib/typescript/commonjs/icons/generated/riverpod-raster.g.d.ts.map +1 -0
  225. package/lib/typescript/commonjs/icons/generated/routes-raster.g.d.ts.map +1 -0
  226. package/lib/typescript/commonjs/icons/generated/settings-raster.g.d.ts.map +1 -0
  227. package/lib/typescript/commonjs/icons/generated/storage-raster.g.d.ts.map +1 -0
  228. package/lib/typescript/commonjs/icons/generated/wifi-raster.g.d.ts.map +1 -0
  229. package/lib/typescript/commonjs/icons/highlight-icon.d.ts.map +1 -0
  230. package/lib/typescript/commonjs/icons/highlight-icon.native.d.ts.map +1 -0
  231. package/lib/typescript/commonjs/icons/highlighter-icon.d.ts.map +1 -0
  232. package/lib/typescript/commonjs/icons/highlighter-icon.native.d.ts.map +1 -0
  233. package/lib/typescript/commonjs/icons/icon-factories.d.ts.map +1 -0
  234. package/lib/typescript/commonjs/icons/icon-primitives.d.ts.map +1 -0
  235. package/lib/typescript/commonjs/icons/icon-primitives.native.d.ts.map +1 -0
  236. package/lib/typescript/commonjs/icons/icon-renderer.d.ts.map +1 -0
  237. package/lib/typescript/commonjs/icons/iconGlow.d.ts.map +1 -0
  238. package/lib/typescript/commonjs/icons/image-overlay-icon.d.ts.map +1 -0
  239. package/lib/typescript/commonjs/icons/image-overlay-icon.native.d.ts.map +1 -0
  240. package/lib/typescript/commonjs/icons/images-icon.d.ts.map +1 -0
  241. package/lib/typescript/commonjs/icons/images-icon.native.d.ts.map +1 -0
  242. package/lib/typescript/commonjs/icons/impersonate-icon.d.ts.map +1 -0
  243. package/lib/typescript/commonjs/icons/impersonate-icon.native.d.ts.map +1 -0
  244. package/lib/typescript/commonjs/icons/jotai-icon.d.ts.map +1 -0
  245. package/lib/typescript/commonjs/icons/jotai-icon.native.d.ts.map +1 -0
  246. package/lib/typescript/commonjs/icons/network-icon.d.ts.map +1 -0
  247. package/lib/typescript/commonjs/icons/network-icon.native.d.ts.map +1 -0
  248. package/lib/typescript/commonjs/icons/query-icon.d.ts.map +1 -0
  249. package/lib/typescript/commonjs/icons/query-icon.native.d.ts.map +1 -0
  250. package/lib/typescript/commonjs/icons/raster-icon.d.ts.map +1 -0
  251. package/lib/typescript/commonjs/icons/redux-icon.d.ts.map +1 -0
  252. package/lib/typescript/commonjs/icons/redux-icon.native.d.ts.map +1 -0
  253. package/lib/typescript/commonjs/icons/renders-icon.d.ts.map +1 -0
  254. package/lib/typescript/commonjs/icons/renders-icon.native.d.ts.map +1 -0
  255. package/lib/typescript/commonjs/icons/riverpod-icon.d.ts.map +1 -0
  256. package/lib/typescript/commonjs/icons/riverpod-icon.native.d.ts.map +1 -0
  257. package/lib/typescript/commonjs/icons/routes-icon.d.ts.map +1 -0
  258. package/lib/typescript/commonjs/icons/routes-icon.native.d.ts.map +1 -0
  259. package/lib/typescript/commonjs/icons/routes-parts.d.ts.map +1 -0
  260. package/lib/typescript/commonjs/icons/scenarios-icon.d.ts.map +1 -0
  261. package/lib/typescript/commonjs/icons/scenarios-icon.native.d.ts.map +1 -0
  262. package/lib/typescript/commonjs/icons/sentry-icon.d.ts.map +1 -0
  263. package/lib/typescript/commonjs/icons/sentry-icon.native.d.ts.map +1 -0
  264. package/lib/typescript/commonjs/icons/settings-icon.d.ts.map +1 -0
  265. package/lib/typescript/commonjs/icons/settings-icon.native.d.ts.map +1 -0
  266. package/lib/typescript/commonjs/icons/storage-icon.d.ts.map +1 -0
  267. package/lib/typescript/commonjs/icons/storage-icon.native.d.ts.map +1 -0
  268. package/lib/typescript/commonjs/icons/time-machine-icon.d.ts.map +1 -0
  269. package/lib/typescript/commonjs/icons/time-machine-icon.native.d.ts.map +1 -0
  270. package/lib/typescript/commonjs/icons/wifi-icon.d.ts.map +1 -0
  271. package/lib/typescript/commonjs/icons/wifi-icon.native.d.ts.map +1 -0
  272. package/lib/typescript/commonjs/icons/zustand-icon.d.ts.map +1 -0
  273. package/lib/typescript/commonjs/icons/zustand-icon.native.d.ts.map +1 -0
  274. package/lib/typescript/commonjs/index.d.ts.map +1 -0
  275. package/lib/typescript/commonjs/settings.d.ts.map +1 -0
  276. package/lib/typescript/commonjs/types.d.ts.map +1 -0
  277. package/lib/typescript/commonjs/utils.d.ts.map +1 -0
  278. package/lib/typescript/module/FloatingToolsStore.d.ts.map +1 -0
  279. package/lib/typescript/module/colors.d.ts.map +1 -0
  280. package/lib/typescript/module/constants.d.ts.map +1 -0
  281. package/lib/typescript/module/devToolsState.d.ts.map +1 -0
  282. package/lib/typescript/module/dial.d.ts.map +1 -0
  283. package/lib/typescript/module/dialUsage.d.ts.map +1 -0
  284. package/lib/typescript/module/easing.d.ts.map +1 -0
  285. package/lib/typescript/module/floating.d.ts.map +1 -0
  286. package/lib/typescript/module/fonts.d.ts.map +1 -0
  287. package/lib/typescript/module/fonts.web.d.ts.map +1 -0
  288. package/lib/typescript/module/icons/ask-buoy-icon.d.ts.map +1 -0
  289. package/lib/typescript/module/icons/ask-buoy-icon.native.d.ts.map +1 -0
  290. package/lib/typescript/module/icons/assets-icon.d.ts.map +1 -0
  291. package/lib/typescript/module/icons/assets-icon.native.d.ts.map +1 -0
  292. package/lib/typescript/module/icons/benchmark-icon.d.ts.map +1 -0
  293. package/lib/typescript/module/icons/benchmark-icon.native.d.ts.map +1 -0
  294. package/lib/typescript/module/icons/bif-raster-icon.d.ts.map +1 -0
  295. package/lib/typescript/module/icons/bif-raster-icon.native.d.ts.map +1 -0
  296. package/lib/typescript/module/icons/camera-icon.d.ts.map +1 -0
  297. package/lib/typescript/module/icons/camera-icon.native.d.ts.map +1 -0
  298. package/lib/typescript/module/icons/console-icon.d.ts.map +1 -0
  299. package/lib/typescript/module/icons/console-icon.native.d.ts.map +1 -0
  300. package/lib/typescript/module/icons/env-icon.d.ts.map +1 -0
  301. package/lib/typescript/module/icons/env-icon.native.d.ts.map +1 -0
  302. package/lib/typescript/module/icons/events-icon.d.ts.map +1 -0
  303. package/lib/typescript/module/icons/events-icon.native.d.ts.map +1 -0
  304. package/lib/typescript/module/icons/generated/assets-raster.g.d.ts.map +1 -0
  305. package/lib/typescript/module/icons/generated/benchmark-raster.g.d.ts.map +1 -0
  306. package/lib/typescript/module/icons/generated/camera-raster.g.d.ts.map +1 -0
  307. package/lib/typescript/module/icons/generated/env-raster.g.d.ts.map +1 -0
  308. package/lib/typescript/module/icons/generated/events-raster.g.d.ts.map +1 -0
  309. package/lib/typescript/module/icons/generated/glyph-icons.g.d.ts.map +1 -0
  310. package/lib/typescript/module/icons/generated/highlight-raster.g.d.ts.map +1 -0
  311. package/lib/typescript/module/icons/generated/highlighter-raster.g.d.ts.map +1 -0
  312. package/lib/typescript/module/icons/generated/icon-data.g.d.ts.map +1 -0
  313. package/lib/typescript/module/icons/generated/image-overlay-raster.g.d.ts.map +1 -0
  314. package/lib/typescript/module/icons/generated/images-raster.g.d.ts.map +1 -0
  315. package/lib/typescript/module/icons/generated/network-raster.g.d.ts.map +1 -0
  316. package/lib/typescript/module/icons/generated/raster-icons.g.d.ts.map +1 -0
  317. package/lib/typescript/module/icons/generated/riverpod-raster.g.d.ts.map +1 -0
  318. package/lib/typescript/module/icons/generated/routes-raster.g.d.ts.map +1 -0
  319. package/lib/typescript/module/icons/generated/settings-raster.g.d.ts.map +1 -0
  320. package/lib/typescript/module/icons/generated/storage-raster.g.d.ts.map +1 -0
  321. package/lib/typescript/module/icons/generated/wifi-raster.g.d.ts.map +1 -0
  322. package/lib/typescript/module/icons/highlight-icon.d.ts.map +1 -0
  323. package/lib/typescript/module/icons/highlight-icon.native.d.ts.map +1 -0
  324. package/lib/typescript/module/icons/highlighter-icon.d.ts.map +1 -0
  325. package/lib/typescript/module/icons/highlighter-icon.native.d.ts.map +1 -0
  326. package/lib/typescript/module/icons/icon-factories.d.ts.map +1 -0
  327. package/lib/typescript/module/icons/icon-primitives.d.ts.map +1 -0
  328. package/lib/typescript/module/icons/icon-primitives.native.d.ts.map +1 -0
  329. package/lib/typescript/module/icons/icon-renderer.d.ts.map +1 -0
  330. package/lib/typescript/module/icons/iconGlow.d.ts.map +1 -0
  331. package/lib/typescript/module/icons/image-overlay-icon.d.ts.map +1 -0
  332. package/lib/typescript/module/icons/image-overlay-icon.native.d.ts.map +1 -0
  333. package/lib/typescript/module/icons/images-icon.d.ts.map +1 -0
  334. package/lib/typescript/module/icons/images-icon.native.d.ts.map +1 -0
  335. package/lib/typescript/module/icons/impersonate-icon.d.ts.map +1 -0
  336. package/lib/typescript/module/icons/impersonate-icon.native.d.ts.map +1 -0
  337. package/lib/typescript/module/icons/jotai-icon.d.ts.map +1 -0
  338. package/lib/typescript/module/icons/jotai-icon.native.d.ts.map +1 -0
  339. package/lib/typescript/module/icons/network-icon.d.ts.map +1 -0
  340. package/lib/typescript/module/icons/network-icon.native.d.ts.map +1 -0
  341. package/lib/typescript/module/icons/query-icon.d.ts.map +1 -0
  342. package/lib/typescript/module/icons/query-icon.native.d.ts.map +1 -0
  343. package/lib/typescript/module/icons/raster-icon.d.ts.map +1 -0
  344. package/lib/typescript/module/icons/redux-icon.d.ts.map +1 -0
  345. package/lib/typescript/module/icons/redux-icon.native.d.ts.map +1 -0
  346. package/lib/typescript/module/icons/renders-icon.d.ts.map +1 -0
  347. package/lib/typescript/module/icons/renders-icon.native.d.ts.map +1 -0
  348. package/lib/typescript/module/icons/riverpod-icon.d.ts.map +1 -0
  349. package/lib/typescript/module/icons/riverpod-icon.native.d.ts.map +1 -0
  350. package/lib/typescript/module/icons/routes-icon.d.ts.map +1 -0
  351. package/lib/typescript/module/icons/routes-icon.native.d.ts.map +1 -0
  352. package/lib/typescript/module/icons/routes-parts.d.ts.map +1 -0
  353. package/lib/typescript/module/icons/scenarios-icon.d.ts.map +1 -0
  354. package/lib/typescript/module/icons/scenarios-icon.native.d.ts.map +1 -0
  355. package/lib/typescript/module/icons/sentry-icon.d.ts.map +1 -0
  356. package/lib/typescript/module/icons/sentry-icon.native.d.ts.map +1 -0
  357. package/lib/typescript/module/icons/settings-icon.d.ts.map +1 -0
  358. package/lib/typescript/module/icons/settings-icon.native.d.ts.map +1 -0
  359. package/lib/typescript/module/icons/storage-icon.d.ts.map +1 -0
  360. package/lib/typescript/module/icons/storage-icon.native.d.ts.map +1 -0
  361. package/lib/typescript/module/icons/time-machine-icon.d.ts.map +1 -0
  362. package/lib/typescript/module/icons/time-machine-icon.native.d.ts.map +1 -0
  363. package/lib/typescript/module/icons/wifi-icon.d.ts.map +1 -0
  364. package/lib/typescript/module/icons/wifi-icon.native.d.ts.map +1 -0
  365. package/lib/typescript/module/icons/zustand-icon.d.ts.map +1 -0
  366. package/lib/typescript/module/icons/zustand-icon.native.d.ts.map +1 -0
  367. package/lib/typescript/module/index.d.ts.map +1 -0
  368. package/lib/typescript/module/settings.d.ts.map +1 -0
  369. package/lib/typescript/module/types.d.ts.map +1 -0
  370. package/lib/typescript/module/utils.d.ts.map +1 -0
  371. package/package.json +1 -1
@@ -1 +1,512 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.FloatingToolsStore=void 0;var _constants=require("./constants.js");class FloatingToolsStore{isDragging=!1;isHidden=!1;dragStartPos={x:0,y:0};dragStartMouse={x:0,y:0};hasMoved=!1;savedPosition=null;saveTimeout=null;isInitialized=!1;listeners=new Set;constructor(i){this.screenWidth=i.screenWidth,this.screenHeight=i.screenHeight,this.bubbleSize=i.initialBubbleSize??{width:100,height:32},this.minPosition=i.minPosition??{x:_constants.EDGE_PADDING,y:_constants.EDGE_PADDING},this.visibleHandleWidth=i.visibleHandleWidth??_constants.VISIBLE_HANDLE_WIDTH,this.dragThreshold=i.dragThreshold??_constants.DRAG_THRESHOLD,this.edgePadding=i.edgePadding??_constants.EDGE_PADDING,this.enablePositionPersistence=i.enablePositionPersistence??!0,this.storage=i.storage,this.onPositionChange=i.onPositionChange,this.onHiddenChange=i.onHiddenChange,this.onDraggingChange=i.onDraggingChange,this.position=i.initialPosition??{x:this.screenWidth-this.bubbleSize.width-20,y:Math.max(this.minPosition.y,Math.min(100,this.screenHeight-this.bubbleSize.height-this.edgePadding))},this.stateSnapshot=this.createSnapshot()}subscribe=i=>(this.listeners.add(i),()=>this.listeners.delete(i));getSnapshot=()=>this.stateSnapshot;createSnapshot(){return{position:{...this.position},isDragging:this.isDragging,isHidden:this.isHidden,bubbleSize:{...this.bubbleSize}}}notify(){this.stateSnapshot=this.createSnapshot(),this.listeners.forEach(i=>i())}async initialize(){if(!this.isInitialized&&this.enablePositionPersistence&&this.storage){try{const[i,t]=await Promise.all([this.storage.getItem(_constants.STORAGE_KEYS.POSITION_X),this.storage.getItem(_constants.STORAGE_KEYS.POSITION_Y)]);if(null!==i&&null!==t){const s=parseFloat(i),e=parseFloat(t);if(!Number.isNaN(s)&&!Number.isNaN(e)){const i={x:s,y:e},t=this.validatePosition(i);(Math.abs(i.x-t.x)>5||Math.abs(i.y-t.y)>5)&&this.savePosition(t.x,t.y),this.position=t,t.x>=this.screenWidth-this.visibleHandleWidth-5&&(this.isHidden=!0),this.notify()}}}catch{}this.isInitialized=!0}else this.isInitialized=!0}getBounds(){return{minX:this.minPosition.x,maxX:this.screenWidth-this.visibleHandleWidth,minY:this.minPosition.y,maxY:this.screenHeight-this.bubbleSize.height-this.edgePadding}}validatePosition(i){const t=this.getBounds();return{x:Math.max(t.minX,Math.min(i.x,t.maxX)),y:Math.max(t.minY,Math.min(i.y,t.maxY))}}setPosition(i){this.position=i,this.onPositionChange?.(i),this.notify()}setBubbleSize(i){this.bubbleSize.width===i.width&&this.bubbleSize.height===i.height||(this.bubbleSize=i,this.isDragging||this.reconcileBounds(),this.notify())}setScreenSize(i,t){this.screenWidth=i,this.screenHeight=t,this.reconcileBounds(),this.notify()}reconcileBounds(){const i=i=>({x:Math.max(this.minPosition.x,Math.min(i.x,this.screenWidth-this.bubbleSize.width-this.edgePadding)),y:Math.max(this.minPosition.y,Math.min(i.y,this.screenHeight-this.bubbleSize.height-this.edgePadding))}),t=i(this.position);this.position=this.isHidden?{...t,x:this.screenWidth-this.visibleHandleWidth}:t,this.savedPosition&&(this.savedPosition=i(this.savedPosition))}setMinPosition(i){this.minPosition=i}async savePosition(i,t){if(this.enablePositionPersistence&&this.storage)try{await Promise.all([this.storage.setItem(_constants.STORAGE_KEYS.POSITION_X,i.toString()),this.storage.setItem(_constants.STORAGE_KEYS.POSITION_Y,t.toString())])}catch{}}debouncedSavePosition(i,t){this.saveTimeout&&clearTimeout(this.saveTimeout),this.saveTimeout=setTimeout(()=>this.savePosition(i,t),_constants.SAVE_DEBOUNCE_MS)}toggleHideShow(){const i=this.position.x>this.screenWidth-this.bubbleSize.width/2;if(this.isHidden||i){let i,t;return this.savedPosition&&this.savedPosition.x<this.screenWidth-this.bubbleSize.width/2?(i=this.savedPosition.x,t=this.savedPosition.y):(i=this.screenWidth-this.bubbleSize.width-20,t=this.position.y),this.isHidden=!1,this.onHiddenChange?.(!1),this.notify(),{targetPosition:{x:i,y:t},isHiding:!1}}{this.savedPosition={...this.position};const i=this.screenWidth-this.visibleHandleWidth;return this.isHidden=!0,this.onHiddenChange?.(!0),this.notify(),{targetPosition:{x:i,y:this.position.y},isHiding:!0}}}forceHide(){if(this.isHidden)return{targetPosition:this.position};this.savedPosition={...this.position};const i=this.screenWidth-this.visibleHandleWidth;return this.isHidden=!0,this.onHiddenChange?.(!0),this.notify(),{targetPosition:{x:i,y:this.position.y}}}forceShow(){if(!this.isHidden)return{targetPosition:this.position};let i,t;return this.savedPosition?(i=this.savedPosition.x,t=this.savedPosition.y):(i=this.screenWidth-this.bubbleSize.width-20,t=this.position.y),this.isHidden=!1,this.onHiddenChange?.(!1),this.notify(),{targetPosition:{x:i,y:t}}}handleDragStart(i){this.hasMoved=!1,this.dragStartPos={...this.position},this.dragStartMouse={x:i.clientX,y:i.clientY}}handleDragMove(i){const t=i.clientX-this.dragStartMouse.x,s=i.clientY-this.dragStartMouse.y,e=Math.abs(t)+Math.abs(s);if(!this.hasMoved&&e>this.dragThreshold&&(this.hasMoved=!0,this.isDragging=!0,this.onDraggingChange?.(!0),this.notify()),this.hasMoved){const i=this.dragStartPos.x+t,e=this.dragStartPos.y+s,n=this.getBounds(),h=Math.max(n.minX,Math.min(i,this.screenWidth-this.visibleHandleWidth+this.bubbleSize.width)),o=Math.max(n.minY,Math.min(e,n.maxY));return this.position={x:h,y:o},this.onPositionChange?.(this.position),this.notify(),{position:this.position,isDragging:!0}}return{position:this.position,isDragging:!1}}handleDragEnd(i){if(!this.hasMoved)return this.isDragging=!1,this.onDraggingChange?.(!1),this.notify(),{position:this.position,shouldHide:!1,wasTap:!0};const t=i.clientX-this.dragStartMouse.x,s=i.clientY-this.dragStartMouse.y,e=this.dragStartPos.x+t,n=this.dragStartPos.y+s,h=e+this.bubbleSize.width/2>this.screenWidth,o=this.getBounds();if(h){const i=this.screenWidth-this.visibleHandleWidth,t=Math.max(o.minY,Math.min(n,o.maxY));return this.isHidden=!0,this.onHiddenChange?.(!0),this.isDragging=!1,this.onDraggingChange?.(!1),this.notify(),{position:{x:i,y:t},shouldHide:!0,wasTap:!1}}{this.isHidden&&e<this.screenWidth-this.visibleHandleWidth-10&&(this.isHidden=!1,this.onHiddenChange?.(!1));const i=Math.max(o.minX,Math.min(e,this.screenWidth-this.bubbleSize.width-this.edgePadding)),t=Math.max(o.minY,Math.min(n,o.maxY));return i<this.screenWidth-this.bubbleSize.width/2&&(this.savedPosition={x:i,y:t}),this.position={x:i,y:t},this.isDragging=!1,this.onDraggingChange?.(!1),this.debouncedSavePosition(i,t),this.notify(),{position:{x:i,y:t},shouldHide:!1,wasTap:!1}}}commitPosition(i){this.position=i,this.savePosition(i.x,i.y),this.notify()}destroy(){this.saveTimeout&&(clearTimeout(this.saveTimeout),this.saveTimeout=null),this.listeners.clear()}}exports.FloatingToolsStore=FloatingToolsStore;
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.FloatingToolsStore = void 0;
7
+ var _constants = require("./constants.js");
8
+ /**
9
+ * FloatingToolsStore - Headless state management for floating tools.
10
+ *
11
+ * This class manages all the business logic for the floating tools bubble:
12
+ * - Position state and validation
13
+ * - Drag detection (tap vs drag)
14
+ * - Hide/show toggle
15
+ * - Auto-hide when dragged past edge
16
+ * - Position persistence
17
+ *
18
+ * Platform-specific code (animation, event handling) is NOT included here.
19
+ * Use this with platform-specific hooks/bindings.
20
+ */
21
+
22
+ class FloatingToolsStore {
23
+ // State
24
+
25
+ isDragging = false;
26
+ isHidden = false;
27
+
28
+ // Configuration
29
+
30
+ // Callbacks
31
+
32
+ // Drag tracking
33
+ dragStartPos = {
34
+ x: 0,
35
+ y: 0
36
+ };
37
+ dragStartMouse = {
38
+ x: 0,
39
+ y: 0
40
+ };
41
+ hasMoved = false;
42
+ savedPosition = null;
43
+
44
+ // Persistence
45
+ saveTimeout = null;
46
+ isInitialized = false;
47
+
48
+ // Subscribers (for useSyncExternalStore)
49
+ listeners = new Set();
50
+ constructor(options) {
51
+ this.screenWidth = options.screenWidth;
52
+ this.screenHeight = options.screenHeight;
53
+ this.bubbleSize = options.initialBubbleSize ?? {
54
+ width: 100,
55
+ height: 32
56
+ };
57
+ this.minPosition = options.minPosition ?? {
58
+ x: _constants.EDGE_PADDING,
59
+ y: _constants.EDGE_PADDING
60
+ };
61
+ this.visibleHandleWidth = options.visibleHandleWidth ?? _constants.VISIBLE_HANDLE_WIDTH;
62
+ this.dragThreshold = options.dragThreshold ?? _constants.DRAG_THRESHOLD;
63
+ this.edgePadding = options.edgePadding ?? _constants.EDGE_PADDING;
64
+ this.enablePositionPersistence = options.enablePositionPersistence ?? true;
65
+ this.storage = options.storage;
66
+ this.onPositionChange = options.onPositionChange;
67
+ this.onHiddenChange = options.onHiddenChange;
68
+ this.onDraggingChange = options.onDraggingChange;
69
+
70
+ // Default position
71
+ this.position = options.initialPosition ?? {
72
+ x: this.screenWidth - this.bubbleSize.width - 20,
73
+ y: Math.max(this.minPosition.y, Math.min(100, this.screenHeight - this.bubbleSize.height - this.edgePadding))
74
+ };
75
+
76
+ // Initialize snapshot
77
+ this.stateSnapshot = this.createSnapshot();
78
+ }
79
+
80
+ // =============================
81
+ // Subscription (for React hooks)
82
+ // =============================
83
+
84
+ subscribe = listener => {
85
+ this.listeners.add(listener);
86
+ return () => this.listeners.delete(listener);
87
+ };
88
+ getSnapshot = () => {
89
+ return this.stateSnapshot;
90
+ };
91
+ createSnapshot() {
92
+ return {
93
+ position: {
94
+ ...this.position
95
+ },
96
+ isDragging: this.isDragging,
97
+ isHidden: this.isHidden,
98
+ bubbleSize: {
99
+ ...this.bubbleSize
100
+ }
101
+ };
102
+ }
103
+ notify() {
104
+ this.stateSnapshot = this.createSnapshot();
105
+ this.listeners.forEach(listener => listener());
106
+ }
107
+
108
+ // =============================
109
+ // Initialization
110
+ // =============================
111
+
112
+ /**
113
+ * Initialize the store by loading persisted position.
114
+ * Call this after setting up storage adapter.
115
+ */
116
+ async initialize() {
117
+ if (this.isInitialized || !this.enablePositionPersistence || !this.storage) {
118
+ this.isInitialized = true;
119
+ return;
120
+ }
121
+ try {
122
+ const [xStr, yStr] = await Promise.all([this.storage.getItem(_constants.STORAGE_KEYS.POSITION_X), this.storage.getItem(_constants.STORAGE_KEYS.POSITION_Y)]);
123
+ if (xStr !== null && yStr !== null) {
124
+ const x = parseFloat(xStr);
125
+ const y = parseFloat(yStr);
126
+ if (!Number.isNaN(x) && !Number.isNaN(y)) {
127
+ const saved = {
128
+ x,
129
+ y
130
+ };
131
+ const validated = this.validatePosition(saved);
132
+
133
+ // Save corrected position if out of bounds
134
+ if (Math.abs(saved.x - validated.x) > 5 || Math.abs(saved.y - validated.y) > 5) {
135
+ this.savePosition(validated.x, validated.y);
136
+ }
137
+ this.position = validated;
138
+
139
+ // Check if loaded in hidden state
140
+ if (validated.x >= this.screenWidth - this.visibleHandleWidth - 5) {
141
+ this.isHidden = true;
142
+ }
143
+ this.notify();
144
+ }
145
+ }
146
+ } catch {
147
+ // Failed to load - use default position
148
+ }
149
+ this.isInitialized = true;
150
+ }
151
+
152
+ // =============================
153
+ // Position Management
154
+ // =============================
155
+
156
+ /**
157
+ * Get current bounds for position validation.
158
+ */
159
+ getBounds() {
160
+ return {
161
+ minX: this.minPosition.x,
162
+ maxX: this.screenWidth - this.visibleHandleWidth,
163
+ minY: this.minPosition.y,
164
+ maxY: this.screenHeight - this.bubbleSize.height - this.edgePadding
165
+ };
166
+ }
167
+
168
+ /**
169
+ * Validate and clamp a position to screen boundaries.
170
+ */
171
+ validatePosition(pos) {
172
+ const bounds = this.getBounds();
173
+ return {
174
+ x: Math.max(bounds.minX, Math.min(pos.x, bounds.maxX)),
175
+ y: Math.max(bounds.minY, Math.min(pos.y, bounds.maxY))
176
+ };
177
+ }
178
+
179
+ /**
180
+ * Set position directly (for animation callbacks).
181
+ */
182
+ setPosition(pos) {
183
+ this.position = pos;
184
+ this.onPositionChange?.(pos);
185
+ this.notify();
186
+ }
187
+
188
+ /**
189
+ * Update bubble size (call on layout).
190
+ * Only notifies if size actually changed.
191
+ */
192
+ setBubbleSize(size) {
193
+ if (this.bubbleSize.width === size.width && this.bubbleSize.height === size.height) {
194
+ return;
195
+ }
196
+ this.bubbleSize = size;
197
+ if (!this.isDragging) this.reconcileBounds();
198
+ this.notify();
199
+ }
200
+
201
+ /**
202
+ * Update screen dimensions (call on resize).
203
+ */
204
+ setScreenSize(width, height) {
205
+ this.screenWidth = width;
206
+ this.screenHeight = height;
207
+ this.reconcileBounds();
208
+ this.notify();
209
+ }
210
+
211
+ /** Keep the whole visible tool reachable after its content or viewport changes. */
212
+ reconcileBounds() {
213
+ const clampVisible = position => ({
214
+ x: Math.max(this.minPosition.x, Math.min(position.x, this.screenWidth - this.bubbleSize.width - this.edgePadding)),
215
+ y: Math.max(this.minPosition.y, Math.min(position.y, this.screenHeight - this.bubbleSize.height - this.edgePadding))
216
+ });
217
+ const visible = clampVisible(this.position);
218
+ this.position = this.isHidden ? {
219
+ ...visible,
220
+ x: this.screenWidth - this.visibleHandleWidth
221
+ } : visible;
222
+ if (this.savedPosition) this.savedPosition = clampVisible(this.savedPosition);
223
+ }
224
+
225
+ /**
226
+ * Update min position (e.g., for safe area insets).
227
+ */
228
+ setMinPosition(minPos) {
229
+ this.minPosition = minPos;
230
+ }
231
+
232
+ // =============================
233
+ // Persistence
234
+ // =============================
235
+
236
+ async savePosition(x, y) {
237
+ if (!this.enablePositionPersistence || !this.storage) return;
238
+ try {
239
+ await Promise.all([this.storage.setItem(_constants.STORAGE_KEYS.POSITION_X, x.toString()), this.storage.setItem(_constants.STORAGE_KEYS.POSITION_Y, y.toString())]);
240
+ } catch {
241
+ // Failed to save - continue without persistence
242
+ }
243
+ }
244
+ debouncedSavePosition(x, y) {
245
+ if (this.saveTimeout) clearTimeout(this.saveTimeout);
246
+ this.saveTimeout = setTimeout(() => this.savePosition(x, y), _constants.SAVE_DEBOUNCE_MS);
247
+ }
248
+
249
+ // =============================
250
+ // Hide/Show Toggle
251
+ // =============================
252
+
253
+ /**
254
+ * Toggle between hidden and visible states.
255
+ * Returns the target position for animation.
256
+ */
257
+ toggleHideShow() {
258
+ const isVisuallyOffScreen = this.position.x > this.screenWidth - this.bubbleSize.width / 2;
259
+ if (this.isHidden || isVisuallyOffScreen) {
260
+ // Show the bubble
261
+ let targetX;
262
+ let targetY;
263
+ if (this.savedPosition && this.savedPosition.x < this.screenWidth - this.bubbleSize.width / 2) {
264
+ targetX = this.savedPosition.x;
265
+ targetY = this.savedPosition.y;
266
+ } else {
267
+ targetX = this.screenWidth - this.bubbleSize.width - 20;
268
+ targetY = this.position.y;
269
+ }
270
+ this.isHidden = false;
271
+ this.onHiddenChange?.(false);
272
+ this.notify();
273
+ return {
274
+ targetPosition: {
275
+ x: targetX,
276
+ y: targetY
277
+ },
278
+ isHiding: false
279
+ };
280
+ } else {
281
+ // Hide the bubble
282
+ this.savedPosition = {
283
+ ...this.position
284
+ };
285
+ const hiddenX = this.screenWidth - this.visibleHandleWidth;
286
+ this.isHidden = true;
287
+ this.onHiddenChange?.(true);
288
+ this.notify();
289
+ return {
290
+ targetPosition: {
291
+ x: hiddenX,
292
+ y: this.position.y
293
+ },
294
+ isHiding: true
295
+ };
296
+ }
297
+ }
298
+
299
+ /**
300
+ * Force hide (for pushToSide behavior).
301
+ */
302
+ forceHide() {
303
+ if (this.isHidden) {
304
+ return {
305
+ targetPosition: this.position
306
+ };
307
+ }
308
+ this.savedPosition = {
309
+ ...this.position
310
+ };
311
+ const hiddenX = this.screenWidth - this.visibleHandleWidth;
312
+ this.isHidden = true;
313
+ this.onHiddenChange?.(true);
314
+ this.notify();
315
+ return {
316
+ targetPosition: {
317
+ x: hiddenX,
318
+ y: this.position.y
319
+ }
320
+ };
321
+ }
322
+
323
+ /**
324
+ * Force show (restore from pushToSide).
325
+ */
326
+ forceShow() {
327
+ if (!this.isHidden) {
328
+ return {
329
+ targetPosition: this.position
330
+ };
331
+ }
332
+ let targetX;
333
+ let targetY;
334
+ if (this.savedPosition) {
335
+ targetX = this.savedPosition.x;
336
+ targetY = this.savedPosition.y;
337
+ } else {
338
+ targetX = this.screenWidth - this.bubbleSize.width - 20;
339
+ targetY = this.position.y;
340
+ }
341
+ this.isHidden = false;
342
+ this.onHiddenChange?.(false);
343
+ this.notify();
344
+ return {
345
+ targetPosition: {
346
+ x: targetX,
347
+ y: targetY
348
+ }
349
+ };
350
+ }
351
+
352
+ // =============================
353
+ // Drag Handling
354
+ // =============================
355
+
356
+ /**
357
+ * Start a drag operation.
358
+ */
359
+ handleDragStart(event) {
360
+ this.hasMoved = false;
361
+ this.dragStartPos = {
362
+ ...this.position
363
+ };
364
+ this.dragStartMouse = {
365
+ x: event.clientX,
366
+ y: event.clientY
367
+ };
368
+ }
369
+
370
+ /**
371
+ * Process drag movement.
372
+ * Returns the new position (for animation) and whether drag threshold was exceeded.
373
+ */
374
+ handleDragMove(event) {
375
+ const dx = event.clientX - this.dragStartMouse.x;
376
+ const dy = event.clientY - this.dragStartMouse.y;
377
+ const totalDistance = Math.abs(dx) + Math.abs(dy);
378
+
379
+ // Check if moved enough to be considered a drag
380
+ if (!this.hasMoved && totalDistance > this.dragThreshold) {
381
+ this.hasMoved = true;
382
+ this.isDragging = true;
383
+ this.onDraggingChange?.(true);
384
+ this.notify();
385
+ }
386
+ if (this.hasMoved) {
387
+ const newX = this.dragStartPos.x + dx;
388
+ const newY = this.dragStartPos.y + dy;
389
+
390
+ // Allow overflow to right for hide detection, but clamp Y
391
+ const bounds = this.getBounds();
392
+ const clampedX = Math.max(bounds.minX, Math.min(newX, this.screenWidth - this.visibleHandleWidth + this.bubbleSize.width));
393
+ const clampedY = Math.max(bounds.minY, Math.min(newY, bounds.maxY));
394
+ this.position = {
395
+ x: clampedX,
396
+ y: clampedY
397
+ };
398
+ this.onPositionChange?.(this.position);
399
+ this.notify();
400
+ return {
401
+ position: this.position,
402
+ isDragging: true
403
+ };
404
+ }
405
+ return {
406
+ position: this.position,
407
+ isDragging: false
408
+ };
409
+ }
410
+
411
+ /**
412
+ * End a drag operation.
413
+ * Returns the result including whether to animate to hidden state.
414
+ */
415
+ handleDragEnd(event) {
416
+ const wasTap = !this.hasMoved;
417
+ if (wasTap) {
418
+ this.isDragging = false;
419
+ this.onDraggingChange?.(false);
420
+ this.notify();
421
+ return {
422
+ position: this.position,
423
+ shouldHide: false,
424
+ wasTap: true
425
+ };
426
+ }
427
+
428
+ // Calculate final position
429
+ const dx = event.clientX - this.dragStartMouse.x;
430
+ const dy = event.clientY - this.dragStartMouse.y;
431
+ const currentX = this.dragStartPos.x + dx;
432
+ const currentY = this.dragStartPos.y + dy;
433
+
434
+ // Check if should auto-hide (bubble midpoint past right edge)
435
+ const bubbleMidpoint = currentX + this.bubbleSize.width / 2;
436
+ const shouldHide = bubbleMidpoint > this.screenWidth;
437
+ const bounds = this.getBounds();
438
+ if (shouldHide) {
439
+ const hiddenX = this.screenWidth - this.visibleHandleWidth;
440
+ const clampedY = Math.max(bounds.minY, Math.min(currentY, bounds.maxY));
441
+ this.isHidden = true;
442
+ this.onHiddenChange?.(true);
443
+ this.isDragging = false;
444
+ this.onDraggingChange?.(false);
445
+ this.notify();
446
+ return {
447
+ position: {
448
+ x: hiddenX,
449
+ y: clampedY
450
+ },
451
+ shouldHide: true,
452
+ wasTap: false
453
+ };
454
+ } else {
455
+ // Check if pulling back from hidden
456
+ if (this.isHidden && currentX < this.screenWidth - this.visibleHandleWidth - 10) {
457
+ this.isHidden = false;
458
+ this.onHiddenChange?.(false);
459
+ }
460
+
461
+ // Clamp to visible area
462
+ const clampedX = Math.max(bounds.minX, Math.min(currentX, this.screenWidth - this.bubbleSize.width - this.edgePadding));
463
+ const clampedY = Math.max(bounds.minY, Math.min(currentY, bounds.maxY));
464
+
465
+ // Save position if visible
466
+ if (clampedX < this.screenWidth - this.bubbleSize.width / 2) {
467
+ this.savedPosition = {
468
+ x: clampedX,
469
+ y: clampedY
470
+ };
471
+ }
472
+ this.position = {
473
+ x: clampedX,
474
+ y: clampedY
475
+ };
476
+ this.isDragging = false;
477
+ this.onDraggingChange?.(false);
478
+ this.debouncedSavePosition(clampedX, clampedY);
479
+ this.notify();
480
+ return {
481
+ position: {
482
+ x: clampedX,
483
+ y: clampedY
484
+ },
485
+ shouldHide: false,
486
+ wasTap: false
487
+ };
488
+ }
489
+ }
490
+
491
+ /**
492
+ * Commit position after animation completes.
493
+ */
494
+ commitPosition(pos) {
495
+ this.position = pos;
496
+ this.savePosition(pos.x, pos.y);
497
+ this.notify();
498
+ }
499
+
500
+ // =============================
501
+ // Cleanup
502
+ // =============================
503
+
504
+ destroy() {
505
+ if (this.saveTimeout) {
506
+ clearTimeout(this.saveTimeout);
507
+ this.saveTimeout = null;
508
+ }
509
+ this.listeners.clear();
510
+ }
511
+ }
512
+ exports.FloatingToolsStore = FloatingToolsStore;
@@ -1 +1,54 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.floatingToolsColors=void 0,exports.withAlpha=withAlpha;const floatingToolsColors=exports.floatingToolsColors={panel:"#1A1A1A",muted:"#888888",secondary:"#E0E0E0",info:"#20C997",success:"#20C997",optional:"#FFA94D",error:"#EF4444",primary:"#20C997",dragActive:"#20C997"};function withAlpha(o,t){return"number"==typeof t?`${o}${Math.round(255*t).toString(16).padStart(2,"0")}`:`${o}${t}`}
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.floatingToolsColors = void 0;
7
+ exports.withAlpha = withAlpha;
8
+ /**
9
+ * Shared color palette for floating tools.
10
+ * Matches the gameUIColors from @buoy-gg/shared-ui.
11
+ *
12
+ * These are duplicated here to avoid requiring @buoy-gg/shared-ui
13
+ * as a dependency (which has React Native dependencies).
14
+ *
15
+ * TODO: Consider extracting colors to a truly platform-agnostic package
16
+ * that both shared-ui and floating-tools-core can depend on.
17
+ */
18
+
19
+ /**
20
+ * Buoy brand colors - EXACT values from web docs site dark theme
21
+ */
22
+ const floatingToolsColors = exports.floatingToolsColors = {
23
+ /** Dark panel background */
24
+ panel: '#1A1A1A',
25
+ /** Muted gray for secondary elements */
26
+ muted: '#888888',
27
+ /** Primary text color */
28
+ secondary: '#E0E0E0',
29
+ /** Info/active state color (Buoy teal) */
30
+ info: '#20C997',
31
+ /** Success/admin color (Buoy teal) */
32
+ success: '#20C997',
33
+ /** Warning/optional color (Buoy orange) */
34
+ optional: '#FFA94D',
35
+ /** Error color (Buoy red) */
36
+ error: '#EF4444',
37
+ /** Primary accent color (Buoy teal) */
38
+ primary: '#20C997',
39
+ /** Color used when dragging the floating tools (Buoy teal) */
40
+ dragActive: '#20C997'
41
+ };
42
+ /**
43
+ * Get a color with optional alpha.
44
+ * @param color - The base color (hex)
45
+ * @param alpha - Alpha value as hex string (00-FF) or number (0-1)
46
+ */
47
+ function withAlpha(color, alpha) {
48
+ if (typeof alpha === 'number') {
49
+ // Convert 0-1 to hex
50
+ const hex = Math.round(alpha * 255).toString(16).padStart(2, '0');
51
+ return `${color}${hex}`;
52
+ }
53
+ return `${color}${alpha}`;
54
+ }
@@ -1 +1,31 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.VISIBLE_HANDLE_WIDTH=exports.STORAGE_KEYS=exports.SAVE_DEBOUNCE_MS=exports.EDGE_PADDING=exports.DRAG_THRESHOLD=exports.ANIMATION_DURATION=void 0;const VISIBLE_HANDLE_WIDTH=exports.VISIBLE_HANDLE_WIDTH=32,DRAG_THRESHOLD=exports.DRAG_THRESHOLD=5,ANIMATION_DURATION=exports.ANIMATION_DURATION=200,EDGE_PADDING=exports.EDGE_PADDING=10,SAVE_DEBOUNCE_MS=exports.SAVE_DEBOUNCE_MS=500,STORAGE_KEYS=exports.STORAGE_KEYS={POSITION_X:"@react_buoy_bubble_position_x",POSITION_Y:"@react_buoy_bubble_position_y"};
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.VISIBLE_HANDLE_WIDTH = exports.STORAGE_KEYS = exports.SAVE_DEBOUNCE_MS = exports.EDGE_PADDING = exports.DRAG_THRESHOLD = exports.ANIMATION_DURATION = void 0;
7
+ /**
8
+ * Shared constants for floating tools behavior.
9
+ * These values ensure consistent behavior across platforms.
10
+ */
11
+
12
+ /** Width of the visible grip handle when bubble is hidden (pixels) */
13
+ const VISIBLE_HANDLE_WIDTH = exports.VISIBLE_HANDLE_WIDTH = 32;
14
+
15
+ /** Minimum movement to distinguish drag from tap (pixels) */
16
+ const DRAG_THRESHOLD = exports.DRAG_THRESHOLD = 5;
17
+
18
+ /** Animation duration for hide/show transitions (milliseconds) */
19
+ const ANIMATION_DURATION = exports.ANIMATION_DURATION = 200;
20
+
21
+ /** Padding from screen edges (pixels) */
22
+ const EDGE_PADDING = exports.EDGE_PADDING = 10;
23
+
24
+ /** Debounce delay for position persistence (milliseconds) */
25
+ const SAVE_DEBOUNCE_MS = exports.SAVE_DEBOUNCE_MS = 500;
26
+
27
+ /** Storage keys for position persistence */
28
+ const STORAGE_KEYS = exports.STORAGE_KEYS = {
29
+ POSITION_X: '@react_buoy_bubble_position_x',
30
+ POSITION_Y: '@react_buoy_bubble_position_y'
31
+ };