@vinena/knobs 0.0.0-stage → 0.5.0

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 (487) hide show
  1. package/CHANGELOG.md +224 -0
  2. package/LICENSE +21 -0
  3. package/README.md +110 -2
  4. package/THIRD_PARTY_NOTICES.md +429 -0
  5. package/dist/bezels/duo-fold/fold-000.webp +0 -0
  6. package/dist/bezels/duo-fold/fold-001.webp +0 -0
  7. package/dist/bezels/duo-fold/fold-002.webp +0 -0
  8. package/dist/bezels/duo-fold/fold-003.webp +0 -0
  9. package/dist/bezels/duo-fold/fold-004.webp +0 -0
  10. package/dist/bezels/duo-fold/fold-005.webp +0 -0
  11. package/dist/bezels/duo-fold/fold-006.webp +0 -0
  12. package/dist/bezels/duo-fold/fold-007.webp +0 -0
  13. package/dist/bezels/duo-fold/fold-008.webp +0 -0
  14. package/dist/bezels/duo-fold/fold-009.webp +0 -0
  15. package/dist/bezels/duo-fold/fold-010.webp +0 -0
  16. package/dist/bezels/duo-fold/fold-011.webp +0 -0
  17. package/dist/bezels/duo-fold/fold-012.webp +0 -0
  18. package/dist/bezels/duo-fold/fold-013.webp +0 -0
  19. package/dist/bezels/duo-fold/fold-014.webp +0 -0
  20. package/dist/bezels/duo-fold/fold-015.webp +0 -0
  21. package/dist/bezels/duo-fold/fold-016.webp +0 -0
  22. package/dist/bezels/duo-fold/fold-017.webp +0 -0
  23. package/dist/bezels/duo-fold/fold-018.webp +0 -0
  24. package/dist/bezels/duo-fold/fold-019.webp +0 -0
  25. package/dist/bezels/duo-fold/fold-020.webp +0 -0
  26. package/dist/bezels/duo-fold/fold-021.webp +0 -0
  27. package/dist/bezels/duo-fold/fold-022.webp +0 -0
  28. package/dist/bezels/duo-fold/fold-023.webp +0 -0
  29. package/dist/bezels/duo-fold/fold-024.webp +0 -0
  30. package/dist/bezels/duo-fold/fold-025.webp +0 -0
  31. package/dist/bezels/duo-fold/fold-026.webp +0 -0
  32. package/dist/bezels/duo-fold/fold-027.webp +0 -0
  33. package/dist/bezels/duo-fold/fold-028.webp +0 -0
  34. package/dist/bezels/duo-fold/fold-029.webp +0 -0
  35. package/dist/bezels/duo-fold/fold-030.webp +0 -0
  36. package/dist/bezels/duo-fold/fold-031.webp +0 -0
  37. package/dist/bezels/duo-fold/fold-032.webp +0 -0
  38. package/dist/bezels/duo-fold/fold-033.webp +0 -0
  39. package/dist/bezels/duo-fold/fold-034.webp +0 -0
  40. package/dist/bezels/duo-fold/fold-035.webp +0 -0
  41. package/dist/bezels/duo-fold/fold-036.webp +0 -0
  42. package/dist/bezels/duo-fold/fold-037.webp +0 -0
  43. package/dist/bezels/duo-fold/fold-038.webp +0 -0
  44. package/dist/bezels/duo-fold/fold-039.webp +0 -0
  45. package/dist/bezels/duo-fold/fold-040.webp +0 -0
  46. package/dist/bezels/duo-fold/fold-041.webp +0 -0
  47. package/dist/bezels/duo-fold/fold-042.webp +0 -0
  48. package/dist/bezels/duo-fold/fold-043.webp +0 -0
  49. package/dist/bezels/duo-fold/fold-044.webp +0 -0
  50. package/dist/bezels/duo-fold/fold-045.webp +0 -0
  51. package/dist/bezels/duo-fold/fold-046.webp +0 -0
  52. package/dist/bezels/duo-fold/fold-047.webp +0 -0
  53. package/dist/bezels/duo-fold/fold-048.webp +0 -0
  54. package/dist/bezels/duo-fold/fold-049.webp +0 -0
  55. package/dist/bezels/duo-fold/fold-050.webp +0 -0
  56. package/dist/bezels/duo-fold/fold-051.webp +0 -0
  57. package/dist/bezels/duo-fold/fold-052.webp +0 -0
  58. package/dist/bezels/duo-fold/fold-053.webp +0 -0
  59. package/dist/bezels/duo-fold/fold-054.webp +0 -0
  60. package/dist/bezels/duo-fold/fold-055.webp +0 -0
  61. package/dist/bezels/duo-fold/fold-056.webp +0 -0
  62. package/dist/bezels/duo-fold/fold-057.webp +0 -0
  63. package/dist/bezels/duo-fold/fold-058.webp +0 -0
  64. package/dist/bezels/duo-fold/fold-059.webp +0 -0
  65. package/dist/bezels/duo-fold/fold-060.webp +0 -0
  66. package/dist/bezels/duo-fold/fold-061.webp +0 -0
  67. package/dist/bezels/duo-fold/fold-062.webp +0 -0
  68. package/dist/bezels/duo-fold/fold-063.webp +0 -0
  69. package/dist/bezels/duo-fold/fold-064.webp +0 -0
  70. package/dist/bezels/duo-fold/fold-065.webp +0 -0
  71. package/dist/bezels/duo-fold/fold-066.webp +0 -0
  72. package/dist/bezels/duo-fold/fold-067.webp +0 -0
  73. package/dist/bezels/duo-fold/fold-068.webp +0 -0
  74. package/dist/bezels/duo-fold/fold-069.webp +0 -0
  75. package/dist/bezels/duo-fold/fold-070.webp +0 -0
  76. package/dist/bezels/duo-fold/fold-071.webp +0 -0
  77. package/dist/bezels/duo-fold/fold-072.webp +0 -0
  78. package/dist/bezels/duo-fold/fold-073.webp +0 -0
  79. package/dist/bezels/duo-fold/fold-074.webp +0 -0
  80. package/dist/bezels/duo-fold/fold-075.webp +0 -0
  81. package/dist/bezels/duo-fold/fold-076.webp +0 -0
  82. package/dist/bezels/duo-fold/fold-077.webp +0 -0
  83. package/dist/bezels/duo-fold/fold-078.webp +0 -0
  84. package/dist/bezels/duo-fold/fold-079.webp +0 -0
  85. package/dist/bezels/duo-fold/fold-080.webp +0 -0
  86. package/dist/bezels/duo-fold/fold-081.webp +0 -0
  87. package/dist/bezels/duo-fold/fold-082.webp +0 -0
  88. package/dist/bezels/duo-fold/fold-083.webp +0 -0
  89. package/dist/bezels/duo-fold/fold-084.webp +0 -0
  90. package/dist/bezels/duo-fold/fold-085.webp +0 -0
  91. package/dist/bezels/duo-fold/fold-086.webp +0 -0
  92. package/dist/bezels/duo-fold/fold-087.webp +0 -0
  93. package/dist/bezels/duo-fold/fold-088.webp +0 -0
  94. package/dist/bezels/duo-fold/fold-089.webp +0 -0
  95. package/dist/bezels/duo-fold/fold-090.webp +0 -0
  96. package/dist/bezels/duo-fold/fold-091.webp +0 -0
  97. package/dist/bezels/duo-fold/fold-092.webp +0 -0
  98. package/dist/bezels/duo-fold/fold-093.webp +0 -0
  99. package/dist/bezels/duo-fold/fold-094.webp +0 -0
  100. package/dist/bezels/duo-fold/fold-095.webp +0 -0
  101. package/dist/bezels/duo-fold/fold-096.webp +0 -0
  102. package/dist/bezels/duo-fold/fold-097.webp +0 -0
  103. package/dist/bezels/duo-fold/fold-098.webp +0 -0
  104. package/dist/bezels/duo-fold/fold-099.webp +0 -0
  105. package/dist/bezels/duo-fold/fold-100.webp +0 -0
  106. package/dist/bezels/duo-fold/fold-101.webp +0 -0
  107. package/dist/bezels/duo-fold/fold-102.webp +0 -0
  108. package/dist/bezels/duo-fold/fold-103.webp +0 -0
  109. package/dist/bezels/duo-fold/fold-104.webp +0 -0
  110. package/dist/bezels/duo-fold/fold-105.webp +0 -0
  111. package/dist/bezels/duo-fold/fold-106.webp +0 -0
  112. package/dist/bezels/duo-fold/fold-107.webp +0 -0
  113. package/dist/bezels/duo-fold/fold-108.webp +0 -0
  114. package/dist/bezels/duo-fold/fold-109.webp +0 -0
  115. package/dist/bezels/duo-fold/fold-110.webp +0 -0
  116. package/dist/bezels/duo-fold/fold-111.webp +0 -0
  117. package/dist/bezels/duo-fold/fold-112.webp +0 -0
  118. package/dist/bezels/duo-fold/fold-113.webp +0 -0
  119. package/dist/bezels/duo-fold/fold-114.webp +0 -0
  120. package/dist/bezels/duo-fold/fold-115.webp +0 -0
  121. package/dist/bezels/duo-fold/fold-116.webp +0 -0
  122. package/dist/bezels/duo-fold/fold-117.webp +0 -0
  123. package/dist/bezels/duo-fold/fold-118.webp +0 -0
  124. package/dist/bezels/duo-fold/fold-119.webp +0 -0
  125. package/dist/bezels/duo-fold/fold-120.webp +0 -0
  126. package/dist/bezels/duo-fold/fold-121.webp +0 -0
  127. package/dist/bezels/duo-fold/fold-122.webp +0 -0
  128. package/dist/bezels/duo-fold/fold-123.webp +0 -0
  129. package/dist/bezels/duo-fold/fold-124.webp +0 -0
  130. package/dist/bezels/duo-fold/fold-125.webp +0 -0
  131. package/dist/bezels/duo-fold/fold-126.webp +0 -0
  132. package/dist/bezels/duo-fold/fold-127.webp +0 -0
  133. package/dist/bezels/duo-fold/fold-128.webp +0 -0
  134. package/dist/bezels/duo-fold/fold-129.webp +0 -0
  135. package/dist/bezels/duo-fold/fold-130.webp +0 -0
  136. package/dist/bezels/duo-fold/fold-131.webp +0 -0
  137. package/dist/bezels/duo-fold/fold-132.webp +0 -0
  138. package/dist/bezels/duo-fold/fold-133.webp +0 -0
  139. package/dist/bezels/duo-fold/fold-134.webp +0 -0
  140. package/dist/bezels/duo-fold/fold-135.webp +0 -0
  141. package/dist/bezels/duo-fold/fold-136.webp +0 -0
  142. package/dist/bezels/duo-fold/fold-137.webp +0 -0
  143. package/dist/bezels/duo-fold/fold-138.webp +0 -0
  144. package/dist/bezels/duo-fold/fold-139.webp +0 -0
  145. package/dist/bezels/duo-fold/fold-140.webp +0 -0
  146. package/dist/bezels/duo-fold/fold-141.webp +0 -0
  147. package/dist/bezels/duo-fold/fold-142.webp +0 -0
  148. package/dist/bezels/duo-fold/fold-143.webp +0 -0
  149. package/dist/bezels/duo-fold/fold-144.webp +0 -0
  150. package/dist/bezels/duo-fold/fold-145.webp +0 -0
  151. package/dist/bezels/duo-fold/fold-146.webp +0 -0
  152. package/dist/bezels/duo-fold/fold-147.webp +0 -0
  153. package/dist/bezels/duo-fold/fold-148.webp +0 -0
  154. package/dist/bezels/duo-fold/fold-149.webp +0 -0
  155. package/dist/bezels/duo-fold/fold-150.webp +0 -0
  156. package/dist/bezels/duo-fold/fold-151.webp +0 -0
  157. package/dist/bezels/duo-fold/fold-152.webp +0 -0
  158. package/dist/bezels/duo-fold/fold-153.webp +0 -0
  159. package/dist/bezels/duo-fold/fold-154.webp +0 -0
  160. package/dist/bezels/duo-fold/fold-155.webp +0 -0
  161. package/dist/bezels/duo-fold/fold-156.webp +0 -0
  162. package/dist/bezels/duo-fold/fold-157.webp +0 -0
  163. package/dist/bezels/duo-fold/fold-158.webp +0 -0
  164. package/dist/bezels/duo-fold/fold-159.webp +0 -0
  165. package/dist/bezels/duo-fold/fold-160.webp +0 -0
  166. package/dist/bezels/duo-fold/fold-161.webp +0 -0
  167. package/dist/bezels/duo-fold/fold-162.webp +0 -0
  168. package/dist/bezels/duo-fold/fold-163.webp +0 -0
  169. package/dist/bezels/duo-fold/fold-164.webp +0 -0
  170. package/dist/bezels/duo-fold/fold-165.webp +0 -0
  171. package/dist/bezels/duo-fold/fold-166.webp +0 -0
  172. package/dist/bezels/duo-fold/fold-167.webp +0 -0
  173. package/dist/bezels/duo-fold/fold-168.webp +0 -0
  174. package/dist/bezels/duo-fold/fold-169.webp +0 -0
  175. package/dist/bezels/duo-fold/fold-170.webp +0 -0
  176. package/dist/bezels/duo-fold/fold-171.webp +0 -0
  177. package/dist/bezels/duo-fold/fold-172.webp +0 -0
  178. package/dist/bezels/duo-fold/fold-173.webp +0 -0
  179. package/dist/bezels/duo-fold/fold-174.webp +0 -0
  180. package/dist/bezels/duo-fold/fold-175.webp +0 -0
  181. package/dist/bezels/duo-fold/fold-176.webp +0 -0
  182. package/dist/bezels/duo-fold/fold-177.webp +0 -0
  183. package/dist/bezels/duo-fold/fold-178.webp +0 -0
  184. package/dist/bezels/duo-fold/fold-179.webp +0 -0
  185. package/dist/bezels/duo-fold/fold-180.webp +0 -0
  186. package/dist/bezels/duo-fold/still-000.webp +0 -0
  187. package/dist/bezels/duo-fold/still-161.webp +0 -0
  188. package/dist/bezels/duo-fold/still-162.webp +0 -0
  189. package/dist/bezels/duo-fold/still-163.webp +0 -0
  190. package/dist/bezels/duo-fold/still-164.webp +0 -0
  191. package/dist/bezels/duo-fold/still-165.webp +0 -0
  192. package/dist/bezels/duo-fold/still-166.webp +0 -0
  193. package/dist/bezels/duo-fold/still-167.webp +0 -0
  194. package/dist/bezels/duo-fold/still-168.webp +0 -0
  195. package/dist/bezels/duo-fold/still-169.webp +0 -0
  196. package/dist/bezels/duo-fold/still-170.webp +0 -0
  197. package/dist/bezels/duo-fold/still-171.webp +0 -0
  198. package/dist/bezels/duo-fold/still-172.webp +0 -0
  199. package/dist/bezels/duo-fold/still-173.webp +0 -0
  200. package/dist/bezels/duo-fold/still-174.webp +0 -0
  201. package/dist/bezels/duo-fold/still-175.webp +0 -0
  202. package/dist/bezels/duo-fold/still-176.webp +0 -0
  203. package/dist/bezels/duo-fold/still-177.webp +0 -0
  204. package/dist/bezels/duo-fold/still-178.webp +0 -0
  205. package/dist/bezels/duo-fold/still-179.webp +0 -0
  206. package/dist/bezels/duo-fold/still-180.webp +0 -0
  207. package/dist/bezels/iphone-16-plus.webp +0 -0
  208. package/dist/bezels/iphone-16-pro-max.webp +0 -0
  209. package/dist/bezels/iphone-16-pro.webp +0 -0
  210. package/dist/bezels/iphone-16.webp +0 -0
  211. package/dist/bezels/iphone-17-pro-max.webp +0 -0
  212. package/dist/bezels/iphone-17-pro.webp +0 -0
  213. package/dist/bezels/iphone-17.webp +0 -0
  214. package/dist/bezels/iphone-18-pro-max.webp +0 -0
  215. package/dist/bezels/iphone-18-pro.webp +0 -0
  216. package/dist/bezels/iphone-air.webp +0 -0
  217. package/dist/bezels/iphone-duo-inner-open-landscape.webp +0 -0
  218. package/dist/bezels/iphone-duo-inner-open-portrait.webp +0 -0
  219. package/dist/bezels/iphone-duo-outer-closed.webp +0 -0
  220. package/dist/bezels/iphone-se.webp +0 -0
  221. package/dist/bezels/pixel-10-pro-xl.webp +0 -0
  222. package/dist/bezels/pixel-10-pro.webp +0 -0
  223. package/dist/bezels/pixel-10.webp +0 -0
  224. package/dist/bezels/pixel-10a.webp +0 -0
  225. package/dist/bezels/pixel-9-pro-xl.webp +0 -0
  226. package/dist/bezels/pixel-9-pro.webp +0 -0
  227. package/dist/bezels/pixel-9.webp +0 -0
  228. package/dist/early.d.ts +1 -0
  229. package/dist/early.global.js +8 -0
  230. package/dist/elementsview-6g274ptr.js +2873 -0
  231. package/dist/elementsview-jnkbhzkj.js +2873 -0
  232. package/dist/elementsview-pkzp9kc6.js +2874 -0
  233. package/dist/elementsview-tf4qzmtw.js +2874 -0
  234. package/dist/engine/address.d.ts +31 -0
  235. package/dist/engine/animations.d.ts +13 -0
  236. package/dist/engine/barshot.d.ts +48 -0
  237. package/dist/engine/bezels.d.ts +140 -0
  238. package/dist/engine/bezelurls.d.ts +5 -0
  239. package/dist/engine/browserdraw.d.ts +57 -0
  240. package/dist/engine/browserkit.d.ts +59 -0
  241. package/dist/engine/browserui.d.ts +177 -0
  242. package/dist/engine/check.d.ts +8 -0
  243. package/dist/engine/chromedraw.d.ts +17 -0
  244. package/dist/engine/clock.d.ts +91 -0
  245. package/dist/engine/color.d.ts +37 -0
  246. package/dist/engine/describe.d.ts +49 -0
  247. package/dist/engine/devices.d.ts +96 -0
  248. package/dist/engine/dock.d.ts +53 -0
  249. package/dist/engine/endroom.d.ts +21 -0
  250. package/dist/engine/fit.d.ts +75 -0
  251. package/dist/engine/fold.d.ts +562 -0
  252. package/dist/engine/foldframes.d.ts +98 -0
  253. package/dist/engine/foldgl.d.ts +151 -0
  254. package/dist/engine/foldhand.d.ts +23 -0
  255. package/dist/engine/foldlook.d.ts +49 -0
  256. package/dist/engine/foldpage.d.ts +167 -0
  257. package/dist/engine/foldrun.d.ts +98 -0
  258. package/dist/engine/frame.d.ts +142 -0
  259. package/dist/engine/frameglide.d.ts +71 -0
  260. package/dist/engine/framekit.d.ts +7 -0
  261. package/dist/engine/frames.d.ts +42 -0
  262. package/dist/engine/fresh.d.ts +59 -0
  263. package/dist/engine/geo.d.ts +58 -0
  264. package/dist/engine/header.d.ts +16 -0
  265. package/dist/engine/identity.d.ts +27 -0
  266. package/dist/engine/index.d.ts +58 -0
  267. package/dist/engine/intl.d.ts +23 -0
  268. package/dist/engine/locale.d.ts +86 -0
  269. package/dist/engine/mat.d.ts +64 -0
  270. package/dist/engine/matchmedia.d.ts +25 -0
  271. package/dist/engine/matcolors.d.ts +45 -0
  272. package/dist/engine/matsplash.d.ts +81 -0
  273. package/dist/engine/media.d.ts +55 -0
  274. package/dist/engine/mock.d.ts +65 -0
  275. package/dist/engine/mockdata.d.ts +42 -0
  276. package/dist/engine/mockdraw.d.ts +21 -0
  277. package/dist/engine/morph.d.ts +214 -0
  278. package/dist/engine/morphrun.d.ts +49 -0
  279. package/dist/engine/native.d.ts +129 -0
  280. package/dist/engine/network.d.ts +8 -0
  281. package/dist/engine/notice.d.ts +15 -0
  282. package/dist/engine/objectfit.d.ts +35 -0
  283. package/dist/engine/outlines.d.ts +2 -0
  284. package/dist/engine/overflow.d.ts +11 -0
  285. package/dist/engine/owninline.d.ts +16 -0
  286. package/dist/engine/pagefonts.d.ts +21 -0
  287. package/dist/engine/pageshot.d.ts +127 -0
  288. package/dist/engine/placeholder.d.ts +89 -0
  289. package/dist/engine/pseudo.d.ts +15 -0
  290. package/dist/engine/ready.d.ts +9 -0
  291. package/dist/engine/reload.d.ts +35 -0
  292. package/dist/engine/remount.d.ts +30 -0
  293. package/dist/engine/replay.d.ts +7 -0
  294. package/dist/engine/safaridraw.d.ts +22 -0
  295. package/dist/engine/scrollbars.d.ts +17 -0
  296. package/dist/engine/scrollkeep.d.ts +124 -0
  297. package/dist/engine/spacing.d.ts +2 -0
  298. package/dist/engine/speed.d.ts +11 -0
  299. package/dist/engine/store.d.ts +68 -0
  300. package/dist/engine/stored.d.ts +17 -0
  301. package/dist/engine/style.d.ts +27 -0
  302. package/dist/engine/system.d.ts +15 -0
  303. package/dist/engine/text.d.ts +53 -0
  304. package/dist/engine/time.d.ts +32 -0
  305. package/dist/engine/touch.d.ts +20 -0
  306. package/dist/engine/touchdot.d.ts +71 -0
  307. package/dist/engine/touchmark.d.ts +27 -0
  308. package/dist/engine/touchpointer.d.ts +113 -0
  309. package/dist/engine/tree.d.ts +9 -0
  310. package/dist/engine/turnrun.d.ts +74 -0
  311. package/dist/engine/ua.d.ts +55 -0
  312. package/dist/engine/underneath.d.ts +7 -0
  313. package/dist/engine/viewportcss.d.ts +7 -0
  314. package/dist/engine/vision.d.ts +3 -0
  315. package/dist/engine/width.d.ts +56 -0
  316. package/dist/engine/zoom.d.ts +33 -0
  317. package/dist/framekit-095qevka.js +8838 -0
  318. package/dist/framekit-3n7p79ht.js +8839 -0
  319. package/dist/framekit-g96t6nmq.js +8838 -0
  320. package/dist/framekit-q5aad770.js +8839 -0
  321. package/dist/global.d.ts +1 -0
  322. package/dist/grab/boxmodel.d.ts +109 -0
  323. package/dist/grab/boxtext.d.ts +17 -0
  324. package/dist/grab/card.d.ts +45 -0
  325. package/dist/grab/cardread.d.ts +22 -0
  326. package/dist/grab/cardview.d.ts +18 -0
  327. package/dist/grab/clipboard.d.ts +8 -0
  328. package/dist/grab/colors.d.ts +31 -0
  329. package/dist/grab/colorvalue.d.ts +40 -0
  330. package/dist/grab/context.d.ts +25 -0
  331. package/dist/grab/control.d.ts +37 -0
  332. package/dist/grab/copy.d.ts +7 -0
  333. package/dist/grab/dwell.d.ts +29 -0
  334. package/dist/grab/fiber.d.ts +17 -0
  335. package/dist/grab/fontused.d.ts +23 -0
  336. package/dist/grab/hit.d.ts +19 -0
  337. package/dist/grab/hook.d.ts +7 -0
  338. package/dist/grab/index.d.ts +9 -0
  339. package/dist/grab/inspect.d.ts +31 -0
  340. package/dist/grab/keys.d.ts +84 -0
  341. package/dist/grab/locate.d.ts +63 -0
  342. package/dist/grab/mode.d.ts +56 -0
  343. package/dist/grab/navigate.d.ts +21 -0
  344. package/dist/grab/outline.d.ts +16 -0
  345. package/dist/grab/overlay.d.ts +135 -0
  346. package/dist/grab/paint.d.ts +7 -0
  347. package/dist/grab/paths.d.ts +27 -0
  348. package/dist/grab/picks.d.ts +9 -0
  349. package/dist/grab/place.d.ts +25 -0
  350. package/dist/grab/preview.d.ts +12 -0
  351. package/dist/grab/selector.d.ts +15 -0
  352. package/dist/grab/source.d.ts +68 -0
  353. package/dist/grab/stack.d.ts +49 -0
  354. package/dist/grab/theme.d.ts +85 -0
  355. package/dist/grab/types.d.ts +52 -0
  356. package/dist/host.d.ts +7 -0
  357. package/dist/index-0casarhy.js +324 -0
  358. package/dist/index-2d6wvs8h.js +528 -0
  359. package/dist/index-33x9hxe3.js +4563 -0
  360. package/dist/index-5baxvd3v.js +4424 -0
  361. package/dist/index-5d6qzte3.js +357 -0
  362. package/dist/index-64rd634h.js +686 -0
  363. package/dist/index-78r0f8pw.js +27 -0
  364. package/dist/index-d0cjxjsm.js +21 -0
  365. package/dist/index-dvr4x91q.js +4800 -0
  366. package/dist/index-hw56t3zy.js +4800 -0
  367. package/dist/index-k015tb6c.js +357 -0
  368. package/dist/index-ke6v7919.js +4801 -0
  369. package/dist/index-kzsb9drs.js +4801 -0
  370. package/dist/index-peh33xjv.js +346 -0
  371. package/dist/index-qxye1j73.js +528 -0
  372. package/dist/index-z5ytnj01.js +4563 -0
  373. package/dist/index-ztnjefrh.js +23 -0
  374. package/dist/index-zvze25nf.js +686 -0
  375. package/dist/index.d.ts +116 -0
  376. package/dist/index.global.js +2655 -0
  377. package/dist/index.js +9262 -0
  378. package/dist/instance.d.ts +29 -0
  379. package/dist/react-4kbj1t4h.js +687 -0
  380. package/dist/react-65tgdbs8.js +22 -0
  381. package/dist/react-71a9ypex.js +529 -0
  382. package/dist/react-adky72h9.js +29 -0
  383. package/dist/react-carf84xv.js +4420 -0
  384. package/dist/react-eygws6cx.js +358 -0
  385. package/dist/react-h9w04skh.js +25 -0
  386. package/dist/react-mv9y20jy.js +358 -0
  387. package/dist/react-pdvseef0.js +325 -0
  388. package/dist/react-qv0nykcv.js +4564 -0
  389. package/dist/react-sq9pkw4k.js +687 -0
  390. package/dist/react-vjm88w4t.js +4564 -0
  391. package/dist/react-xxfpfddf.js +347 -0
  392. package/dist/react-znfrjqk8.js +529 -0
  393. package/dist/react.d.ts +6 -0
  394. package/dist/react.js +9255 -0
  395. package/dist/requests/body.d.ts +44 -0
  396. package/dist/requests/eventsource.d.ts +14 -0
  397. package/dist/requests/fetch.d.ts +14 -0
  398. package/dist/requests/index.d.ts +35 -0
  399. package/dist/requests/patch.d.ts +17 -0
  400. package/dist/requests/quiet.d.ts +12 -0
  401. package/dist/requests/record.d.ts +40 -0
  402. package/dist/requests/resource.d.ts +28 -0
  403. package/dist/requests/shared.d.ts +34 -0
  404. package/dist/requests/stack.d.ts +7 -0
  405. package/dist/requests/store.d.ts +37 -0
  406. package/dist/requests/types.d.ts +140 -0
  407. package/dist/requests/xhr.d.ts +16 -0
  408. package/dist/storage/cache.d.ts +32 -0
  409. package/dist/storage/clear.d.ts +35 -0
  410. package/dist/storage/cookies.d.ts +71 -0
  411. package/dist/storage/format.d.ts +53 -0
  412. package/dist/storage/idb.d.ts +62 -0
  413. package/dist/storage/onload.d.ts +47 -0
  414. package/dist/storage/presets.d.ts +79 -0
  415. package/dist/storage/site.d.ts +51 -0
  416. package/dist/storage/web.d.ts +57 -0
  417. package/dist/storageview-j9d44f99.js +2729 -0
  418. package/dist/storageview-sb23henh.js +2729 -0
  419. package/dist/storageview-vdkbp6rt.js +2728 -0
  420. package/dist/storageview-vf8v8q8j.js +2728 -0
  421. package/dist/styles/cascade.d.ts +59 -0
  422. package/dist/styles/collect.d.ts +73 -0
  423. package/dist/styles/declarations.d.ts +30 -0
  424. package/dist/styles/index.d.ts +20 -0
  425. package/dist/styles/inherited.d.ts +5 -0
  426. package/dist/styles/match.d.ts +41 -0
  427. package/dist/styles/selector.d.ts +36 -0
  428. package/dist/styles/tree.d.ts +14 -0
  429. package/dist/styles/types.d.ts +117 -0
  430. package/dist/styles/varrefs.d.ts +35 -0
  431. package/dist/types.d.ts +221 -0
  432. package/dist/ui/actions.d.ts +26 -0
  433. package/dist/ui/bindings.d.ts +89 -0
  434. package/dist/ui/boxdiagram.d.ts +50 -0
  435. package/dist/ui/catalog.d.ts +195 -0
  436. package/dist/ui/colors.d.ts +51 -0
  437. package/dist/ui/column.d.ts +22 -0
  438. package/dist/ui/copytext.d.ts +6 -0
  439. package/dist/ui/deviceknobs.d.ts +20 -0
  440. package/dist/ui/dockslide.d.ts +100 -0
  441. package/dist/ui/dom.d.ts +68 -0
  442. package/dist/ui/domtree.d.ts +143 -0
  443. package/dist/ui/drag.d.ts +34 -0
  444. package/dist/ui/editors.d.ts +30 -0
  445. package/dist/ui/elementsview.d.ts +32 -0
  446. package/dist/ui/foldslider.d.ts +48 -0
  447. package/dist/ui/footer.d.ts +51 -0
  448. package/dist/ui/hold.d.ts +20 -0
  449. package/dist/ui/icons.d.ts +145 -0
  450. package/dist/ui/inspector.d.ts +59 -0
  451. package/dist/ui/keys.d.ts +180 -0
  452. package/dist/ui/kit.d.ts +336 -0
  453. package/dist/ui/knobs.d.ts +41 -0
  454. package/dist/ui/list.d.ts +68 -0
  455. package/dist/ui/palette.d.ts +59 -0
  456. package/dist/ui/pane.d.ts +151 -0
  457. package/dist/ui/panel.d.ts +56 -0
  458. package/dist/ui/pin.d.ts +28 -0
  459. package/dist/ui/place.d.ts +136 -0
  460. package/dist/ui/prefs.d.ts +53 -0
  461. package/dist/ui/radio.d.ts +37 -0
  462. package/dist/ui/requestdetail.d.ts +56 -0
  463. package/dist/ui/requestformat.d.ts +142 -0
  464. package/dist/ui/requestparts.d.ts +312 -0
  465. package/dist/ui/requests.d.ts +48 -0
  466. package/dist/ui/rows.d.ts +72 -0
  467. package/dist/ui/search.d.ts +29 -0
  468. package/dist/ui/settings.d.ts +69 -0
  469. package/dist/ui/size.d.ts +105 -0
  470. package/dist/ui/slide.d.ts +46 -0
  471. package/dist/ui/stage.d.ts +24 -0
  472. package/dist/ui/storageaction.d.ts +22 -0
  473. package/dist/ui/storagecookies.d.ts +5 -0
  474. package/dist/ui/storagedeep.d.ts +18 -0
  475. package/dist/ui/storageparts.d.ts +131 -0
  476. package/dist/ui/storagepresets.d.ts +19 -0
  477. package/dist/ui/storageview.d.ts +45 -0
  478. package/dist/ui/storageweb.d.ts +11 -0
  479. package/dist/ui/styles.d.ts +1 -0
  480. package/dist/ui/stylesapplied.d.ts +46 -0
  481. package/dist/ui/stylesformat.d.ts +78 -0
  482. package/dist/ui/stylesview.d.ts +118 -0
  483. package/dist/ui/swatches.d.ts +26 -0
  484. package/dist/ui/syntax.d.ts +34 -0
  485. package/dist/ui/tooltip.d.ts +64 -0
  486. package/package.json +60 -4
  487. package/skills/devknobs/SKILL.md +214 -0
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Where a jsx element is written, found in the source itself. A dev server can
3
+ * hand out a source map that is off, as a route split from its file is, and
4
+ * then the map has no place for the call, or a wrong one.
5
+ */
6
+ /** A place in a text. The line counts from 1 and the column from 0, as a source map's do. */
7
+ export interface Place {
8
+ line: number;
9
+ column: number;
10
+ }
11
+ /**
12
+ * The source with its comments and the insides of its strings blanked, every
13
+ * line where it was. A quote or double quote right after a letter is an
14
+ * apostrophe in jsx text, as is one with no closing quote on its line, and is
15
+ * blanked too, so the quotes left are all closed. A backtick after a letter
16
+ * is a tagged template's. `//` after a colon is a url's.
17
+ */
18
+ export declare function codeOnly(content: string): string;
19
+ /** Every place `<tag` is written in the source's code, in its order. Not in comments or strings. */
20
+ export declare function tagPlaces(content: string, tag: string): Place[];
21
+ interface Call {
22
+ start: number;
23
+ /** Just past the tag, inside the call's parentheses. */
24
+ end: number;
25
+ open: number;
26
+ /** A `createElement` call, which carries its place in its props. */
27
+ created: boolean;
28
+ }
29
+ /**
30
+ * The calls that make `tag` in transformed code: `jsxDEV("h1", ...)` or `jsxDEV(Row, ...)`,
31
+ * and `createElement("span", ...)`, which the dev transform writes for a key
32
+ * after a spread. A call's name starts where a run of name characters does, so
33
+ * the scan does not try again inside one, as in a long inline source map.
34
+ */
35
+ export declare function jsxCalls(code: string, tag: string, host: boolean): Call[];
36
+ /**
37
+ * The name the jsx call at `call` in transformed code makes its component
38
+ * under, as written in the source: `CopyIcon` in `jsxDEV(CopyIcon, ...)`,
39
+ * where the component's own name is `Copy`.
40
+ */
41
+ export declare function jsxCallee(code: string, call: Place): string | null;
42
+ /** The function a plain call at `call` in transformed code names: `list` in `list()`. */
43
+ export declare function calleeAt(code: string, call: Place): string | null;
44
+ /** Every place `name(` is called in the source's code, in its order. Not where it is declared. */
45
+ export declare function callPlaces(content: string, name: string): Place[];
46
+ /**
47
+ * The place a plain call, as `list()` among the jsx, is written in `content`,
48
+ * for the call at `call` in the transformed `code`. A function called once in
49
+ * the source has a place, and one called more than once has the place in the
50
+ * body of `within`, the function that makes the call, when it calls it once.
51
+ */
52
+ export declare function locateCall(content: string, code: string, call: Place, within?: string | null): Place | null;
53
+ /**
54
+ * The place `<tag` is written in `content`, for the jsx call at `call` in the
55
+ * transformed `code`. A tag written once is that one. Among several, the dev
56
+ * transform's notes of line and column put the calls in the source's order,
57
+ * even when the lines they name are off, and the call's rank picks the place.
58
+ * A component can be written under another name than its own, as an import
59
+ * alias is, and the call in the code gives that name. Null when the calls
60
+ * and the tags do not pair up.
61
+ */
62
+ export declare function locateJsx(content: string, tag: string, host: boolean, code: string | null, call: Place | null): Place | null;
63
+ export {};
@@ -0,0 +1,56 @@
1
+ import { copyGrab } from "./clipboard";
2
+ import { componentOf, grabEntry, quickEntry } from "./context";
3
+ import { grabTargetAt } from "./hit";
4
+ import { type Overlay } from "./overlay";
5
+ /** What a pick does where it is not grab's copy. */
6
+ export interface Purpose {
7
+ /** What the label says of an element, in place of its tag and its component. */
8
+ label(element: Element): {
9
+ tag: string;
10
+ name: string | null;
11
+ };
12
+ /** An element was picked. Nothing is copied, and the mode ends with the pick. */
13
+ pick(element: Element): void;
14
+ }
15
+ export interface ModeOptions {
16
+ /** Where the pointer was last, so the element under it shows straight away. */
17
+ pointer?: {
18
+ x: number;
19
+ y: number;
20
+ } | null;
21
+ /** The scheme the layer takes, where the page's own cannot be trusted. */
22
+ scheme?: "light" | "dark";
23
+ /** The grab key's own key, whatever modifiers are down. */
24
+ heldKey: (event: KeyboardEvent) => boolean;
25
+ /** Another use of the picking than grab's copy, as inspect is. */
26
+ purpose?: Purpose;
27
+ /** Grab ended from inside: a copy, a pick handed to a purpose, or escape. */
28
+ onExit(): void;
29
+ }
30
+ export interface Mode {
31
+ /** Keys come through the control, ahead of the panel's, so escape stops here. */
32
+ keydown(event: KeyboardEvent): void;
33
+ /** End grab without a word to anyone. */
34
+ stop(): void;
35
+ }
36
+ /** What the mode reads of the page and writes to it, so a test can stand in for each. */
37
+ export interface ModePage {
38
+ componentOf: typeof componentOf;
39
+ copyGrab: typeof copyGrab;
40
+ createOverlay: (quiet?: boolean, model?: boolean) => Overlay;
41
+ grabEntry: typeof grabEntry;
42
+ grabTargetAt: typeof grabTargetAt;
43
+ quickEntry: typeof quickEntry;
44
+ }
45
+ /**
46
+ * Grab, on: the element under the pointer gets a box and a label, a click
47
+ * copies it, shift and a click gather more, and the arrows walk the tree.
48
+ * The context of the element under the pointer is worked out while it rests
49
+ * there, so a click can copy it whole in the click itself, as Safari wants.
50
+ * The box goes to an element once the pointer settles on it, and not to those
51
+ * it only passes over. With a `purpose` the picking is the same and what a pick
52
+ * does is not: nothing is gathered or copied, the pick is handed over and ends
53
+ * the mode, and until then the box shows the element's margin, border, padding
54
+ * and content, with a card of what its text is set in by it.
55
+ */
56
+ export declare function startMode(options: ModeOptions, page?: ModePage): Mode;
@@ -0,0 +1,21 @@
1
+ /** Where an arrow key moves the selection. */
2
+ export type Step = "up" | "down" | "left" | "right";
3
+ /** The parts of a keydown that pick a step. */
4
+ export type StepKey = Pick<KeyboardEvent, "key" | "shiftKey">;
5
+ /** Arrows move the selection, and tab and shift-tab go along the siblings too. */
6
+ export declare function stepOf(event: StepKey): Step | null;
7
+ export interface Navigator {
8
+ /** The element a step leads to from `current`, or null where it leads nowhere. */
9
+ next(step: Step, current: Element): Element | null;
10
+ /** Forget the way back down, as a pointer move picks a new element. */
11
+ clear(): void;
12
+ }
13
+ /**
14
+ * Up goes to the parent, up to the body and never past it. Down goes back the
15
+ * way up came, else to the first child. Left and right go along the siblings,
16
+ * and where those run out, to the sibling of the nearest parent that has one:
17
+ * the element before or after in page order, under the body. Both forget the
18
+ * way back down, which would lead into the branch just left.
19
+ * What `accept` turns down is passed over: devknobs' own nodes and the root.
20
+ */
21
+ export declare function createNavigator(accept?: (element: Element) => boolean): Navigator;
@@ -0,0 +1,16 @@
1
+ import type { BoxRing } from "./boxmodel";
2
+ import { type BoxOverlay } from "./overlay";
3
+ /**
4
+ * The quiet box on an element the styles pane points at, for as long as it
5
+ * does: grab's gathered box, on a layer of its own with no glow and no mode
6
+ * on, over the tints of the element's margin, border, padding and content. It
7
+ * follows its element as the page scrolls and lays out, as grab's boxes do.
8
+ */
9
+ export interface Outline {
10
+ /** Box an element, or with null take the box off. */
11
+ show(element: Element | null): void;
12
+ /** Tint one area of the box alone, or with null all four again. */
13
+ area(ring: BoxRing | null): void;
14
+ destroy(): void;
15
+ }
16
+ export declare function createOutline(make?: (quiet: boolean, model: boolean) => BoxOverlay): Outline;
@@ -0,0 +1,135 @@
1
+ import { type BoxRing } from "./boxmodel";
2
+ /** How much of the way to its target the box goes in one frame at 60 a second. */
3
+ export declare const LERP = 0.3;
4
+ /** How long the box waits on its element once nothing is under the pointer, in ms. */
5
+ export declare const HIDE_WAIT = 100;
6
+ /** How long the toast stays, and the box with it, in ms. */
7
+ export declare const TOAST_TIME = 1500;
8
+ /**
9
+ * One frame of some numbers on their way to their targets, `elapsed` ms after
10
+ * the last. The same share of what is left goes each 60th of a second,
11
+ * whatever the frame rate. With reduced motion they are there at once.
12
+ */
13
+ export declare function tweenStep(from: readonly number[], to: readonly number[], elapsed: number, reduce: boolean): {
14
+ values: number[];
15
+ done: boolean;
16
+ };
17
+ /**
18
+ * Where the label goes by a box: under it, over it where there is no room,
19
+ * kept in the window. Sideways it is centered on the pointer, as far as the
20
+ * pointer is over the box, or on the box when the keys moved it.
21
+ */
22
+ export declare function labelPlace(box: {
23
+ top: number;
24
+ bottom: number;
25
+ left: number;
26
+ right: number;
27
+ }, pill: {
28
+ width: number;
29
+ height: number;
30
+ }, view: {
31
+ width: number;
32
+ height: number;
33
+ }, pointerX: number | null): {
34
+ x: number;
35
+ y: number;
36
+ };
37
+ /**
38
+ * Where inspect's card goes by a box: under it or over it as the label does,
39
+ * and sideways from the box's own left, kept in the window. It does not
40
+ * follow the pointer, so it stays put while the pointer moves over one element.
41
+ */
42
+ export declare function cardPlace(box: {
43
+ top: number;
44
+ bottom: number;
45
+ left: number;
46
+ right: number;
47
+ }, card: {
48
+ width: number;
49
+ height: number;
50
+ }, view: {
51
+ width: number;
52
+ height: number;
53
+ }): {
54
+ x: number;
55
+ y: number;
56
+ };
57
+ /** The first px length of a computed `border-radius`, or 0 where it has none. */
58
+ export declare function parseRadius(value: string): number;
59
+ /** The radius a box takes from its element: at most half its short side, at least the least. */
60
+ export declare function boxRadius(radius: number, width: number, height: number): number;
61
+ /** The corners of the box that move. The top left one stays where the box is. */
62
+ declare const CORNERS: readonly ["top right", "bottom left", "bottom right"];
63
+ /** The lines along the sides of the box. */
64
+ declare const LINES: readonly ["top", "bottom", "left", "right"];
65
+ /** The fill of the box: between the corners from top to bottom, and at each side of that. */
66
+ declare const FILLS: readonly ["middle", "west", "east"];
67
+ /** A piece of the box that is moved, and stretched where it is not a corner. */
68
+ export type Piece = (typeof CORNERS | typeof LINES | typeof FILLS)[number];
69
+ /**
70
+ * What the box is drawn with: where it is, the px in a device pixel, the size
71
+ * of its corners, and each piece's transform.
72
+ */
73
+ export interface BoxParts {
74
+ at: string;
75
+ unit: number;
76
+ corner: {
77
+ width: number;
78
+ height: number;
79
+ radius: number;
80
+ };
81
+ pieces: Record<Piece, string>;
82
+ }
83
+ /** A length on whole device pixels, `ratio` of them to a px. */
84
+ export declare function snap(value: number, ratio: number): number;
85
+ /**
86
+ * The box in pieces that only ever take a transform, so a glide is laid out
87
+ * and painted by nobody: a corner in each corner, a line along each side, and
88
+ * the fill between them in three. The corners keep their size and only move.
89
+ * The lines and the fills are one device pixel of one color, stretched by
90
+ * whole ones: the browser puts a box on device pixels before it scales it, so
91
+ * one px stretched leaves gaps where a px is not a whole number of them. No
92
+ * two pieces overlap, and every side is on a whole device pixel, so they meet
93
+ * with no seam. The radius is not the shape's own, which is on its way: each
94
+ * new one paints the corners again, so the box takes its element's at once.
95
+ */
96
+ export declare function boxParts(shape: readonly number[], radius: number, ratio: number): BoxParts;
97
+ export interface Overlay {
98
+ /**
99
+ * Box the current element, with its label, and every gathered one lighter.
100
+ * The box goes over to a new element on the frames after, and waits a
101
+ * moment on the last one when there is none.
102
+ */
103
+ draw(current: Element | null, label: {
104
+ tag: string;
105
+ name: string | null;
106
+ }, picked: Element[]): void;
107
+ /** Where the pointer is sideways, for the label. Null once the keys move the box. */
108
+ point(x: number | null): void;
109
+ /**
110
+ * Say something by an element for a moment, where its label was, after a
111
+ * check mark where it went well. The box stays on the element, fuller
112
+ * with the check, and goes with the toast.
113
+ */
114
+ toast(text: string, near: Element | null, check: boolean): void;
115
+ /** Fade out and go, once a toast is over where there is one. */
116
+ destroy(): void;
117
+ }
118
+ /** A layer that also draws the box of its element: its margin, border, padding and content. */
119
+ export interface BoxOverlay extends Overlay {
120
+ /** Draw one area alone, or with null all four again. */
121
+ area(ring: BoxRing | null): void;
122
+ }
123
+ /**
124
+ * The layer grab draws on, in a shadow root of its own on this document. A
125
+ * `quiet` one has no glow around the window, for a box that stays with no mode on.
126
+ * With `model`, as inspect asks, it tints the four areas of its element's box,
127
+ * the element under the pointer or else the first gathered one, and the label
128
+ * of the element under the pointer grows to a card. An element in one piece
129
+ * that no transform turns is tinted from its bounding box, and so is an inline
130
+ * one in several pieces. One a transform turns or scales is tinted by its own
131
+ * corners where the browser has `getBoxQuads`, and from its bounding box
132
+ * where it has not, which is then only near.
133
+ */
134
+ export declare function createOverlay(quiet?: boolean, model?: boolean): BoxOverlay;
135
+ export {};
@@ -0,0 +1,7 @@
1
+ import type { Color } from "../engine/color";
2
+ /**
3
+ * Reads a css color as channels, each text once: by the parser, or for a
4
+ * color it does not know, such as `oklch()`, painted on a pixel of a canvas
5
+ * and read back.
6
+ */
7
+ export declare function createColorReader(): (value: string) => Color | null;
@@ -0,0 +1,27 @@
1
+ import type { SourceOrigin } from "./types";
2
+ export interface SourceClass {
3
+ origin: SourceOrigin;
4
+ packageName: string | null;
5
+ }
6
+ /**
7
+ * The dev server's root on disk, from a source map's `file` and the url that
8
+ * serves it: `/repo/web/src/App.tsx` at `/src/App.tsx` is `/repo/web`.
9
+ */
10
+ export declare function rootOf(file: string | undefined, url: string): string | null;
11
+ export declare function rememberRoot(root: string | null): void;
12
+ /**
13
+ * A path as an editor wants it, from the project's root: the origin, bundler
14
+ * schemes, query strings, layers and the slash a url starts with gone.
15
+ */
16
+ export declare function normalizeFilePath(fileName: string, root?: string | null): string;
17
+ export declare function packageName(fileName: string | null | undefined): string | null;
18
+ /** App source, a package's, or neither, as a bundle or an anonymous script is. */
19
+ export declare function classifySourcePath(fileName: string | null | undefined): SourceClass;
20
+ /**
21
+ * A shadcn `components/ui`, a design system or headless primitives: app code,
22
+ * but wrapped around many features, so it says little about the one grabbed.
23
+ */
24
+ export declare function isSharedUiPath(fileName: string | null | undefined): boolean;
25
+ export declare function isBundlePath(fileName: string | null | undefined): boolean;
26
+ /** App source that is neither shared ui nor a bundle, and so names the feature. */
27
+ export declare function isTrustedAppPath(fileName: string | null | undefined): boolean;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Shift and a click gather elements, and a click again takes one back out.
3
+ * They are copied together once shift is let go, or with a plain click.
4
+ */
5
+ export declare function togglePick<T>(picked: readonly T[], item: T): T[];
6
+ /** What a copy takes: the gathered elements, in order, and the one clicked last if it is new. */
7
+ export declare function flushPicks<T>(picked: readonly T[], clicked: T | null): T[];
8
+ /** What the toast says: `Copied`, or `Copied 3` for more than one. */
9
+ export declare function copiedText(count: number): string;
@@ -0,0 +1,25 @@
1
+ /** Where grab runs for a page: nowhere, on the page itself, or in the width knob's frame. */
2
+ export type GrabPlace = "off" | "here" | "frame";
3
+ export type GrabEvent =
4
+ /** The page asks grab on or off: the key, the panel, escape. `frame` is whether its frame is up. */
5
+ {
6
+ type: "ask";
7
+ on: boolean;
8
+ frame: boolean;
9
+ }
10
+ /** The frame says grab went on or off in it, or that it loaded again without grab. */
11
+ | {
12
+ type: "frame";
13
+ on: boolean;
14
+ }
15
+ /** The frame came up or went down. */
16
+ | {
17
+ type: "framed";
18
+ frame: boolean;
19
+ };
20
+ /**
21
+ * Where grab goes next. It runs in one place at a time: with the frame up it
22
+ * is the frame's, and the page above only shows it as on. Whatever the frame
23
+ * says leaves nothing of grab running on the page above.
24
+ */
25
+ export declare function grabStep(place: GrabPlace, event: GrabEvent): GrabPlace;
@@ -0,0 +1,12 @@
1
+ export declare function escapeText(text: string): string;
2
+ /** Cut escaped html to `max` characters, the suffix included, never inside an entity. */
3
+ export declare function truncateEscaped(html: string, max: number): string;
4
+ export declare function isGeneratedClass(token: string): boolean;
5
+ /** The class names a person wrote, the generated ones dropped. */
6
+ export declare function readableClass(value: string): string;
7
+ /**
8
+ * One line of html for the element: its tag, up to 8 attributes, the identifying
9
+ * ones first, and its own text, or a link's or a button's whole text. Outside
10
+ * html, as in svg, only the priority attributes show.
11
+ */
12
+ export declare function htmlPreview(element: Element): string;
@@ -0,0 +1,15 @@
1
+ export interface Selector {
2
+ selector: string;
3
+ /** Built from an attribute that means something, as a test id or a label. */
4
+ semantic: boolean;
5
+ }
6
+ export declare function isStableId(id: string): boolean;
7
+ /** A selector for the element, through shadow roots (`>>>`) and frames (`>>iframe>>`). */
8
+ export declare function elementSelector(element: Element): Selector;
9
+ /**
10
+ * The element a selector should name: the element, or its nearest ancestor in
11
+ * the same root with an identifier or a control's tag, short of a broad one.
12
+ */
13
+ export declare function selectorTarget(element: Element, accept?: (candidate: Element) => boolean): Element;
14
+ /** The nearest semantic selector, up from the element, or null. */
15
+ export declare function nearestSemanticSelector(element: Element): Selector | null;
@@ -0,0 +1,68 @@
1
+ import type { Fiber } from "bippy";
2
+ import { type StackFrame } from "bippy/source";
3
+ import type { ResolvedSource } from "./types";
4
+ /** How long a grab waits on bundles and source maps before it goes without them. */
5
+ export declare const TIMEOUT = 1500;
6
+ export interface Resolution {
7
+ fiberSource: ResolvedSource | null;
8
+ stack: StackFrame[];
9
+ }
10
+ export declare const EMPTY: Resolution;
11
+ /**
12
+ * The fetch bippy reads bundles and source maps with. It only reaches the
13
+ * page's own origin, a dev server, and never anything else. A package's file
14
+ * is not read: its path already names it, and its bundle and map are large.
15
+ * One function for every grab, so bippy keeps its source map cache across
16
+ * them. The requests log leaves these out.
17
+ */
18
+ export declare function sourceFetch(url: string, init?: RequestInit): Promise<Response>;
19
+ /** Resolves to `fallback` once `ms` pass or `signal` aborts, whichever is first. */
20
+ export declare function settle<T>(work: Promise<T>, fallback: T, ms: number, signal?: AbortSignal): Promise<T>;
21
+ /** The parts of a frame a source map rewrites. */
22
+ interface Place {
23
+ fileName?: string;
24
+ functionName?: string;
25
+ columnNumber?: number;
26
+ }
27
+ /**
28
+ * A place a source map gave, set right against the frame it came from. The
29
+ * map's column counts from 0, where a stack and an editor count from 1. Its
30
+ * path can be relative to the script. And its name is the token at the call,
31
+ * `map` in `list.map(...)`, where the frame names the function itself.
32
+ */
33
+ export declare function mapped<T extends Place>(place: T, raw: Place | null | undefined, next?: boolean): T;
34
+ /** The element a frame of the raw owner stack made, where its fiber is known. */
35
+ export interface Site {
36
+ tag: string;
37
+ host: boolean;
38
+ }
39
+ /** A source map's one source, with its text, to check a place against. */
40
+ export interface MappedSource {
41
+ name: string;
42
+ content: string;
43
+ }
44
+ /**
45
+ * A frame set on the place its element is written, by a search of the source.
46
+ * The map can leave a frame without a place, or put it on another element's
47
+ * tag, even one of the same name. With nothing found, the frame stays as the
48
+ * map left it.
49
+ */
50
+ export declare function relocated(frame: StackFrame, raw: StackFrame, site: Site, source: MappedSource, code: string | null): StackFrame;
51
+ /**
52
+ * A frame that calls a function among the jsx, as `{list()}`, set on that
53
+ * call in the source when the function is called there once, or once in the
54
+ * frame's own function. Otherwise the frame stays as the map left it.
55
+ */
56
+ export declare function recalled(frame: StackFrame, raw: StackFrame, source: MappedSource, code: string): StackFrame;
57
+ /**
58
+ * An app frame as a source. A frame no map moved points into the transformed
59
+ * module, past the file's own lines, so it keeps its file and drops its line.
60
+ */
61
+ export declare function appSource(frame: StackFrame, fileName: string, componentName: string | null, next: boolean): ResolvedSource;
62
+ /**
63
+ * The fiber's own source and its owner stack, both symbolicated through the
64
+ * page's source maps where it serves them. Gives up after `TIMEOUT`, or when
65
+ * `signal` aborts, with an empty resolution.
66
+ */
67
+ export declare function resolve(fiber: Fiber, next: boolean, signal?: AbortSignal): Promise<Resolution>;
68
+ export {};
@@ -0,0 +1,49 @@
1
+ import type { StackFrame } from "bippy/source";
2
+ import type { ResolvedSource } from "./types";
3
+ /** App source lines a trace spends its budget on. */
4
+ export declare const DEFAULT_MAX_LINES = 3;
5
+ /** Lines a trace never goes past, library and shared ui lines included. */
6
+ export declare const HARD_MAX_LINES = 20;
7
+ export interface TraceOptions {
8
+ maxLines?: number;
9
+ /** Next.js, which gets its own internal names and path form. */
10
+ next?: boolean;
11
+ }
12
+ export interface Trace {
13
+ text: string;
14
+ /** No trusted app source made it in, so a selector has to point at the element. */
15
+ needsSelector: boolean;
16
+ /** An owner stack frame spent the budget, so fiber ancestors need not fill in. */
17
+ hasBudgetedFrame: boolean;
18
+ names: Set<string>;
19
+ /** Lines left under the hard cap. */
20
+ room: number;
21
+ }
22
+ export declare function isInternalName(name: string, next?: boolean): boolean;
23
+ /** Worth a line in a trace: not React's or a library's plumbing. */
24
+ export declare function isUsefulName(name: string, next?: boolean): boolean;
25
+ /** A capitalized component name of the app's own, or null. */
26
+ export declare function sourceName(name: string | null | undefined, next?: boolean): string | null;
27
+ /**
28
+ * `in Comp (at path:line:col)`, and nothing without a component: a bare path
29
+ * never stands where a name does. react-grab drops the line and column outside
30
+ * Next.js, where the owner stack points into transformed code. Here they show
31
+ * whenever a source map put them back, on Vite too.
32
+ */
33
+ export declare function sourceLine(source: ResolvedSource, next?: boolean): string;
34
+ export declare function resolveMaxLines(maxLines: number | undefined): number;
35
+ /**
36
+ * The owner stack as `in Comp (...)` lines, after a leading source line when
37
+ * there is one. Only the app's own frames show: a library's, React's and
38
+ * nameless ones stay out, so wrapper noise never crowds out the app's
39
+ * components, and so does a frame at the place of the line before it. Trusted app lines spend `maxLines`, and shared ui lines are free
40
+ * up to the hard cap of 20. With no line at all, the nearest named library
41
+ * component stands in as one hint.
42
+ */
43
+ export declare function formatStack(stack: StackFrame[], options?: TraceOptions, leading?: ResolvedSource | null): Trace;
44
+ export declare function nameLines(names: string[]): string;
45
+ /**
46
+ * The source that best names the element: trusted app source first, from the
47
+ * fiber or the stack, then shared ui, then a package's.
48
+ */
49
+ export declare function selectSource(fiberSource: ResolvedSource | null, stack: StackFrame[], next?: boolean): ResolvedSource | null;
@@ -0,0 +1,85 @@
1
+ import { type Color } from "../engine/color";
2
+ /** What the page looks like where grab draws: the bar takes the other one. */
3
+ export type Theme = "light" | "dark";
4
+ /** A background under this relative luminance is a dark one. */
5
+ export declare const DARK_BACKGROUND = 0.18;
6
+ /** Text over this relative luminance is only read on a dark page. */
7
+ export declare const LIGHT_TEXT = 0.6;
8
+ /** A color no more solid than this says nothing: what is behind it shows through. */
9
+ export declare const SOLID = 0.5;
10
+ /** The theme a painted background makes, or null where it is too clear to say. */
11
+ export declare function backgroundTheme(color: Color | null): Theme | null;
12
+ /**
13
+ * The theme the text gives away: light text is only there for a dark page.
14
+ * Dark text is the default on any page, so it says nothing.
15
+ */
16
+ export declare function textTheme(color: Color | null): Theme | null;
17
+ /**
18
+ * The theme an element is marked with: a `dark` or `light` class, one of the
19
+ * theme attributes, or a bare `data-dark` or `data-light`.
20
+ */
21
+ export declare function markerTheme(hasClass: (name: string) => boolean, attribute: (name: string) => string | null): Theme | null;
22
+ /**
23
+ * The theme a `color-scheme` forces: only one that lists a single scheme.
24
+ * With both, the system picks, and with neither, nothing is said.
25
+ */
26
+ export declare function schemeTheme(value: string): Theme | null;
27
+ /** What was read off the page, each null where it says nothing. */
28
+ export interface ThemeSignals {
29
+ /** The nearest painted background from the element up, short of the body. */
30
+ surface: Theme | null;
31
+ /** A theme marker on the html or the body. */
32
+ marker: Theme | null;
33
+ /** A `color-scheme` on the html, the body or in a meta. */
34
+ scheme: Theme | null;
35
+ /** The painted background of the body, or of the html. */
36
+ backdrop: Theme | null;
37
+ /** The text color of the html. */
38
+ text: Theme | null;
39
+ }
40
+ /**
41
+ * The theme where an element is. What is painted right behind it counts
42
+ * first, so a dark section on a light page is dark. Then what the page says
43
+ * it is, then what it paints, then its text. A page that says nothing is light.
44
+ */
45
+ export declare function decideTheme(signals: ThemeSignals): Theme;
46
+ /** The color grab draws in where it picks its own: blue, or green on a blue page. */
47
+ export type GrabTone = "blue" | "green";
48
+ /** A color in HSL: the hue in degrees, the saturation and the lightness from 0 to 1. */
49
+ export declare function toHsl(color: Color): {
50
+ hue: number;
51
+ saturation: number;
52
+ lightness: number;
53
+ };
54
+ /** Whether a color is a blue that grab's own blue would be lost on. Not a clear one. */
55
+ export declare function isBlue(color: Color | null): boolean;
56
+ /** The colors read where an element is, each null where there is none. */
57
+ export interface GrabSignals {
58
+ /** The nearest painted background from the element up, the page's too. */
59
+ surface: Color | null;
60
+ /** The element's own background. */
61
+ own: Color | null;
62
+ /** The element's border, where it has one. */
63
+ border: Color | null;
64
+ /** The element's text color. */
65
+ text: Color | null;
66
+ }
67
+ /**
68
+ * The tone grab takes on an element: green where what is behind it is blue,
69
+ * or where the element is clear and its border or its text is blue. Blue
70
+ * anywhere else.
71
+ */
72
+ export declare function decideGrab(signals: GrabSignals): GrabTone;
73
+ /** The other theme: the one a bar takes to stand out on a page. */
74
+ export declare function invertTheme(theme: Theme): Theme;
75
+ /** What a reader finds where an element is: the theme, and the tone grab takes. */
76
+ export interface Reading {
77
+ theme: Theme;
78
+ grab: GrabTone;
79
+ }
80
+ /**
81
+ * Reads the theme of this document where an element is, or of the page with
82
+ * none, and the tone grab takes there. The page is read once and each
83
+ * element once, so a reader is good for one run of grab.
84
+ */
85
+ export declare function createThemeReader(): (element: Element | null) => Reading;
@@ -0,0 +1,52 @@
1
+ /**
2
+ * The shapes a grab hands out. They live apart from the code that builds them,
3
+ * so the public types never reach into bippy.
4
+ */
5
+ export type SourceOrigin = "app" | "package" | "unknown";
6
+ export interface ResolvedSource {
7
+ filePath: string;
8
+ lineNumber: number | null;
9
+ columnNumber: number | null;
10
+ componentName: string | null;
11
+ origin: SourceOrigin;
12
+ /** The line and column came through a source map, or from React's own debug source. */
13
+ symbolicated: boolean;
14
+ }
15
+ export interface GrabOptions {
16
+ /** App source lines per element. Defaults to 3. */
17
+ maxLines?: number;
18
+ /** Stops waiting on source maps. What resolved by then is used. */
19
+ signal?: AbortSignal;
20
+ }
21
+ /** A stack frame as the clipboard carries it, without bippy's raw text. */
22
+ export interface GrabFrame {
23
+ functionName?: string;
24
+ fileName?: string;
25
+ lineNumber?: number;
26
+ columnNumber?: number;
27
+ isServer?: boolean;
28
+ isSymbolicated?: boolean;
29
+ }
30
+ export interface GrabEntry {
31
+ tagName: string;
32
+ componentName?: string;
33
+ /** The element's line, `[<html> in Comp (at path) ...]`. */
34
+ content: string;
35
+ /**
36
+ * A selector for the element. `content` shows it only when it is semantic. Steps into a
37
+ * shadow root (`>>>`) or a frame (`>>iframe>>`) make it more than a plain css selector.
38
+ */
39
+ selector: string;
40
+ source: ResolvedSource | null;
41
+ stackContext: string;
42
+ frames: GrabFrame[];
43
+ }
44
+ export interface GrabPayload {
45
+ /** Every entry's line, one per line. */
46
+ content: string;
47
+ entries: GrabEntry[];
48
+ }
49
+ /** What `grab` hands back: the payload, and whether it reached the clipboard. */
50
+ export interface GrabResult extends GrabPayload {
51
+ copied: boolean;
52
+ }
package/dist/host.d.ts ADDED
@@ -0,0 +1,7 @@
1
+ import type { MountOptions } from "./index";
2
+ /**
3
+ * What a page's own mount may choose on a host's panel: its keys, grab, its
4
+ * color and whether the panel starts open. The rest is the host's to say.
5
+ * Read field by field, as it comes from another copy, maybe of another version.
6
+ */
7
+ export declare function pageChoices(options: object): MountOptions;