@buoy-gg/floating-tools-core 7.0.41 → 7.0.42

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