@vinena/knobs 0.0.0-stage → 0.5.1

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 (471) hide show
  1. package/CHANGELOG.md +228 -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-jnkbhzkj.js +2873 -0
  231. package/dist/elementsview-tf4qzmtw.js +2874 -0
  232. package/dist/engine/address.d.ts +31 -0
  233. package/dist/engine/animations.d.ts +13 -0
  234. package/dist/engine/barshot.d.ts +48 -0
  235. package/dist/engine/bezels.d.ts +140 -0
  236. package/dist/engine/bezelurls.d.ts +5 -0
  237. package/dist/engine/browserdraw.d.ts +57 -0
  238. package/dist/engine/browserkit.d.ts +59 -0
  239. package/dist/engine/browserui.d.ts +177 -0
  240. package/dist/engine/check.d.ts +8 -0
  241. package/dist/engine/chromedraw.d.ts +17 -0
  242. package/dist/engine/clock.d.ts +91 -0
  243. package/dist/engine/color.d.ts +37 -0
  244. package/dist/engine/describe.d.ts +49 -0
  245. package/dist/engine/devices.d.ts +96 -0
  246. package/dist/engine/dock.d.ts +53 -0
  247. package/dist/engine/endroom.d.ts +21 -0
  248. package/dist/engine/fit.d.ts +75 -0
  249. package/dist/engine/fold.d.ts +562 -0
  250. package/dist/engine/foldframes.d.ts +98 -0
  251. package/dist/engine/foldgl.d.ts +151 -0
  252. package/dist/engine/foldhand.d.ts +23 -0
  253. package/dist/engine/foldlook.d.ts +49 -0
  254. package/dist/engine/foldpage.d.ts +167 -0
  255. package/dist/engine/foldrun.d.ts +98 -0
  256. package/dist/engine/frame.d.ts +142 -0
  257. package/dist/engine/frameglide.d.ts +71 -0
  258. package/dist/engine/framekit.d.ts +7 -0
  259. package/dist/engine/frames.d.ts +42 -0
  260. package/dist/engine/fresh.d.ts +59 -0
  261. package/dist/engine/geo.d.ts +58 -0
  262. package/dist/engine/header.d.ts +16 -0
  263. package/dist/engine/identity.d.ts +27 -0
  264. package/dist/engine/index.d.ts +58 -0
  265. package/dist/engine/intl.d.ts +23 -0
  266. package/dist/engine/locale.d.ts +86 -0
  267. package/dist/engine/mat.d.ts +64 -0
  268. package/dist/engine/matchmedia.d.ts +25 -0
  269. package/dist/engine/matcolors.d.ts +45 -0
  270. package/dist/engine/matsplash.d.ts +81 -0
  271. package/dist/engine/media.d.ts +55 -0
  272. package/dist/engine/mock.d.ts +65 -0
  273. package/dist/engine/mockdata.d.ts +42 -0
  274. package/dist/engine/mockdraw.d.ts +21 -0
  275. package/dist/engine/morph.d.ts +214 -0
  276. package/dist/engine/morphrun.d.ts +49 -0
  277. package/dist/engine/native.d.ts +129 -0
  278. package/dist/engine/network.d.ts +8 -0
  279. package/dist/engine/notice.d.ts +15 -0
  280. package/dist/engine/objectfit.d.ts +35 -0
  281. package/dist/engine/outlines.d.ts +2 -0
  282. package/dist/engine/overflow.d.ts +11 -0
  283. package/dist/engine/owninline.d.ts +16 -0
  284. package/dist/engine/pagefonts.d.ts +21 -0
  285. package/dist/engine/pageshot.d.ts +127 -0
  286. package/dist/engine/placeholder.d.ts +89 -0
  287. package/dist/engine/pseudo.d.ts +15 -0
  288. package/dist/engine/ready.d.ts +9 -0
  289. package/dist/engine/reload.d.ts +35 -0
  290. package/dist/engine/remount.d.ts +30 -0
  291. package/dist/engine/replay.d.ts +7 -0
  292. package/dist/engine/safaridraw.d.ts +22 -0
  293. package/dist/engine/scrollbars.d.ts +17 -0
  294. package/dist/engine/scrollkeep.d.ts +124 -0
  295. package/dist/engine/spacing.d.ts +2 -0
  296. package/dist/engine/speed.d.ts +11 -0
  297. package/dist/engine/store.d.ts +68 -0
  298. package/dist/engine/stored.d.ts +17 -0
  299. package/dist/engine/style.d.ts +27 -0
  300. package/dist/engine/system.d.ts +15 -0
  301. package/dist/engine/text.d.ts +53 -0
  302. package/dist/engine/time.d.ts +32 -0
  303. package/dist/engine/touch.d.ts +20 -0
  304. package/dist/engine/touchdot.d.ts +71 -0
  305. package/dist/engine/touchmark.d.ts +27 -0
  306. package/dist/engine/touchpointer.d.ts +113 -0
  307. package/dist/engine/tree.d.ts +9 -0
  308. package/dist/engine/turnrun.d.ts +74 -0
  309. package/dist/engine/ua.d.ts +55 -0
  310. package/dist/engine/underneath.d.ts +7 -0
  311. package/dist/engine/viewportcss.d.ts +7 -0
  312. package/dist/engine/vision.d.ts +3 -0
  313. package/dist/engine/width.d.ts +56 -0
  314. package/dist/engine/zoom.d.ts +33 -0
  315. package/dist/framekit-3n7p79ht.js +8839 -0
  316. package/dist/framekit-g96t6nmq.js +8838 -0
  317. package/dist/global.d.ts +1 -0
  318. package/dist/grab/boxmodel.d.ts +109 -0
  319. package/dist/grab/boxtext.d.ts +17 -0
  320. package/dist/grab/card.d.ts +45 -0
  321. package/dist/grab/cardread.d.ts +22 -0
  322. package/dist/grab/cardview.d.ts +18 -0
  323. package/dist/grab/clipboard.d.ts +8 -0
  324. package/dist/grab/colors.d.ts +31 -0
  325. package/dist/grab/colorvalue.d.ts +40 -0
  326. package/dist/grab/context.d.ts +25 -0
  327. package/dist/grab/control.d.ts +37 -0
  328. package/dist/grab/copy.d.ts +7 -0
  329. package/dist/grab/dwell.d.ts +29 -0
  330. package/dist/grab/fiber.d.ts +17 -0
  331. package/dist/grab/fontused.d.ts +23 -0
  332. package/dist/grab/hit.d.ts +19 -0
  333. package/dist/grab/hook.d.ts +7 -0
  334. package/dist/grab/index.d.ts +9 -0
  335. package/dist/grab/inspect.d.ts +31 -0
  336. package/dist/grab/keys.d.ts +84 -0
  337. package/dist/grab/locate.d.ts +63 -0
  338. package/dist/grab/mode.d.ts +56 -0
  339. package/dist/grab/navigate.d.ts +21 -0
  340. package/dist/grab/outline.d.ts +16 -0
  341. package/dist/grab/overlay.d.ts +135 -0
  342. package/dist/grab/paint.d.ts +7 -0
  343. package/dist/grab/paths.d.ts +27 -0
  344. package/dist/grab/picks.d.ts +9 -0
  345. package/dist/grab/place.d.ts +25 -0
  346. package/dist/grab/preview.d.ts +12 -0
  347. package/dist/grab/selector.d.ts +15 -0
  348. package/dist/grab/source.d.ts +68 -0
  349. package/dist/grab/stack.d.ts +49 -0
  350. package/dist/grab/theme.d.ts +85 -0
  351. package/dist/grab/types.d.ts +52 -0
  352. package/dist/host.d.ts +7 -0
  353. package/dist/index-0casarhy.js +324 -0
  354. package/dist/index-2d6wvs8h.js +528 -0
  355. package/dist/index-33x9hxe3.js +4563 -0
  356. package/dist/index-5baxvd3v.js +4424 -0
  357. package/dist/index-78r0f8pw.js +27 -0
  358. package/dist/index-d0cjxjsm.js +21 -0
  359. package/dist/index-dvr4x91q.js +4800 -0
  360. package/dist/index-k015tb6c.js +357 -0
  361. package/dist/index-ke6v7919.js +4801 -0
  362. package/dist/index-peh33xjv.js +346 -0
  363. package/dist/index-ztnjefrh.js +23 -0
  364. package/dist/index-zvze25nf.js +686 -0
  365. package/dist/index.d.ts +116 -0
  366. package/dist/index.global.js +2655 -0
  367. package/dist/index.js +9262 -0
  368. package/dist/instance.d.ts +29 -0
  369. package/dist/react-65tgdbs8.js +22 -0
  370. package/dist/react-71a9ypex.js +529 -0
  371. package/dist/react-adky72h9.js +29 -0
  372. package/dist/react-carf84xv.js +4420 -0
  373. package/dist/react-eygws6cx.js +358 -0
  374. package/dist/react-h9w04skh.js +25 -0
  375. package/dist/react-pdvseef0.js +325 -0
  376. package/dist/react-qv0nykcv.js +4564 -0
  377. package/dist/react-sq9pkw4k.js +687 -0
  378. package/dist/react-xxfpfddf.js +347 -0
  379. package/dist/react.d.ts +6 -0
  380. package/dist/react.js +9255 -0
  381. package/dist/requests/body.d.ts +44 -0
  382. package/dist/requests/eventsource.d.ts +14 -0
  383. package/dist/requests/fetch.d.ts +14 -0
  384. package/dist/requests/index.d.ts +35 -0
  385. package/dist/requests/patch.d.ts +17 -0
  386. package/dist/requests/quiet.d.ts +12 -0
  387. package/dist/requests/record.d.ts +40 -0
  388. package/dist/requests/resource.d.ts +28 -0
  389. package/dist/requests/shared.d.ts +34 -0
  390. package/dist/requests/stack.d.ts +7 -0
  391. package/dist/requests/store.d.ts +37 -0
  392. package/dist/requests/types.d.ts +140 -0
  393. package/dist/requests/xhr.d.ts +16 -0
  394. package/dist/storage/cache.d.ts +32 -0
  395. package/dist/storage/clear.d.ts +35 -0
  396. package/dist/storage/cookies.d.ts +71 -0
  397. package/dist/storage/format.d.ts +53 -0
  398. package/dist/storage/idb.d.ts +62 -0
  399. package/dist/storage/onload.d.ts +47 -0
  400. package/dist/storage/presets.d.ts +79 -0
  401. package/dist/storage/site.d.ts +51 -0
  402. package/dist/storage/web.d.ts +57 -0
  403. package/dist/storageview-sb23henh.js +2729 -0
  404. package/dist/storageview-vf8v8q8j.js +2728 -0
  405. package/dist/styles/cascade.d.ts +59 -0
  406. package/dist/styles/collect.d.ts +73 -0
  407. package/dist/styles/declarations.d.ts +30 -0
  408. package/dist/styles/index.d.ts +20 -0
  409. package/dist/styles/inherited.d.ts +5 -0
  410. package/dist/styles/match.d.ts +41 -0
  411. package/dist/styles/selector.d.ts +36 -0
  412. package/dist/styles/tree.d.ts +14 -0
  413. package/dist/styles/types.d.ts +117 -0
  414. package/dist/styles/varrefs.d.ts +35 -0
  415. package/dist/types.d.ts +221 -0
  416. package/dist/ui/actions.d.ts +26 -0
  417. package/dist/ui/bindings.d.ts +89 -0
  418. package/dist/ui/boxdiagram.d.ts +50 -0
  419. package/dist/ui/catalog.d.ts +195 -0
  420. package/dist/ui/colors.d.ts +51 -0
  421. package/dist/ui/column.d.ts +22 -0
  422. package/dist/ui/copytext.d.ts +6 -0
  423. package/dist/ui/deviceknobs.d.ts +20 -0
  424. package/dist/ui/dockslide.d.ts +100 -0
  425. package/dist/ui/dom.d.ts +68 -0
  426. package/dist/ui/domtree.d.ts +143 -0
  427. package/dist/ui/drag.d.ts +34 -0
  428. package/dist/ui/editors.d.ts +30 -0
  429. package/dist/ui/elementsview.d.ts +32 -0
  430. package/dist/ui/foldslider.d.ts +48 -0
  431. package/dist/ui/footer.d.ts +51 -0
  432. package/dist/ui/hold.d.ts +20 -0
  433. package/dist/ui/icons.d.ts +145 -0
  434. package/dist/ui/inspector.d.ts +59 -0
  435. package/dist/ui/keys.d.ts +180 -0
  436. package/dist/ui/kit.d.ts +336 -0
  437. package/dist/ui/knobs.d.ts +41 -0
  438. package/dist/ui/list.d.ts +68 -0
  439. package/dist/ui/palette.d.ts +59 -0
  440. package/dist/ui/pane.d.ts +151 -0
  441. package/dist/ui/panel.d.ts +56 -0
  442. package/dist/ui/pin.d.ts +28 -0
  443. package/dist/ui/place.d.ts +136 -0
  444. package/dist/ui/prefs.d.ts +53 -0
  445. package/dist/ui/radio.d.ts +37 -0
  446. package/dist/ui/requestdetail.d.ts +56 -0
  447. package/dist/ui/requestformat.d.ts +142 -0
  448. package/dist/ui/requestparts.d.ts +312 -0
  449. package/dist/ui/requests.d.ts +48 -0
  450. package/dist/ui/rows.d.ts +72 -0
  451. package/dist/ui/search.d.ts +29 -0
  452. package/dist/ui/settings.d.ts +69 -0
  453. package/dist/ui/size.d.ts +105 -0
  454. package/dist/ui/slide.d.ts +46 -0
  455. package/dist/ui/stage.d.ts +24 -0
  456. package/dist/ui/storageaction.d.ts +22 -0
  457. package/dist/ui/storagecookies.d.ts +5 -0
  458. package/dist/ui/storagedeep.d.ts +18 -0
  459. package/dist/ui/storageparts.d.ts +131 -0
  460. package/dist/ui/storagepresets.d.ts +19 -0
  461. package/dist/ui/storageview.d.ts +45 -0
  462. package/dist/ui/storageweb.d.ts +11 -0
  463. package/dist/ui/styles.d.ts +1 -0
  464. package/dist/ui/stylesapplied.d.ts +46 -0
  465. package/dist/ui/stylesformat.d.ts +78 -0
  466. package/dist/ui/stylesview.d.ts +118 -0
  467. package/dist/ui/swatches.d.ts +26 -0
  468. package/dist/ui/syntax.d.ts +34 -0
  469. package/dist/ui/tooltip.d.ts +64 -0
  470. package/package.json +60 -4
  471. package/skills/devknobs/SKILL.md +214 -0
@@ -0,0 +1,118 @@
1
+ /**
2
+ * The styles view of the panel: the rules that reach one element, as the
3
+ * engine in `../styles` ranks them, read only. A line of crumbs heads it, a
4
+ * bar with a filter stays on top, and under them a block for each rule, the
5
+ * element's own first, then its pseudo-elements', then what each ancestor
6
+ * hands down. That is its advanced mode. Its simple mode lists only what
7
+ * applies to the element, with no rule around it, and what it inherits folded
8
+ * under that. In both modes the element's box heads the styles, in a fold of
9
+ * its own. Its bar starts with the select button, which turns the picking on
10
+ * and off. With no element there is no bar, and the empty line is the button
11
+ * that starts the picking, while that is off. Its bar, toggle, filter, modes,
12
+ * folds and empty lines are the kit's, and only the crumbs, the box and the
13
+ * css are its own. Nothing of it is drawn on
14
+ * the page, but for a box on the element a crumb or the box's diagram stands
15
+ * for, while the pointer is on that. To use it:
16
+ *
17
+ * const view = createStylesView({ tips, title, outline, held, area, mode, box, select });
18
+ * body.append(view.node); view.show(element); view.destroy();
19
+ *
20
+ * The view is built once for each inspection, and the filter only hides what
21
+ * is built, and all of it wraps or is cut short at whatever width the panel
22
+ * is dragged to. It reads the styles again when what they depend on changes: the
23
+ * element or an ancestor of it, the stylesheets in the head, the window's
24
+ * size and the knobs, and the box alone when the element's size does. The
25
+ * element may be one of the device frame's page.
26
+ */
27
+ import { inspect, invalidate } from "../styles";
28
+ import type { BoxRing } from "../grab/boxmodel";
29
+ import type { DevknobsState } from "../types";
30
+ import { type BoxReading } from "./boxdiagram";
31
+ import type { StylesMode } from "./prefs";
32
+ import type { Tips } from "./tooltip";
33
+ /** How long the page is left to settle after a change before its styles are read again, in ms. */
34
+ export declare const SETTLE = 120;
35
+ /** What the view says before an element is picked, when one left, and when nothing is to show. */
36
+ export declare const EMPTY = "pick an element to see its styles";
37
+ export declare const GONE = "the element left the page";
38
+ /** What the same two lines say as a button, with the picking off: what a press does. */
39
+ export declare const PICK = "select an element to see its styles";
40
+ export declare const GONE_PICK = "the element left the page, select another";
41
+ export declare const NO_RULES = "no rule reaches this element";
42
+ export declare const NO_MATCH = "no declaration matches";
43
+ /** What the view needs from the panel. */
44
+ export interface StylesContext {
45
+ tips: Tips;
46
+ /** Say what is shown in the view's head. */
47
+ title(text: string): void;
48
+ /** Put a quiet box on an element the view points at, or with null take it off. */
49
+ outline(element: Element | null): void;
50
+ /** The element the view holds now, or null once it holds none: another was shown, or it left. */
51
+ held?(element: Element | null): void;
52
+ /**
53
+ * The mode the view starts in, and where the one the user picks is kept.
54
+ * Without it the view is the advanced one, with no control to change it.
55
+ */
56
+ mode?: {
57
+ get(): StylesMode;
58
+ set(mode: StylesMode): void;
59
+ };
60
+ /** Tint one area of the outlined element's box alone on the page, or with null all four. */
61
+ area?(ring: BoxRing | null): void;
62
+ /** Whether the box starts folded out, and where the way the user leaves it is kept. */
63
+ box?: {
64
+ get(): boolean;
65
+ set(open: boolean): void;
66
+ };
67
+ /**
68
+ * The picking, for the select button the bar starts with, and for the
69
+ * empty line, which starts it with no element shown and the picking off.
70
+ * Without it the bar has no such button, and the line is only words.
71
+ */
72
+ select?: {
73
+ /** What the button is called. */
74
+ label: string;
75
+ /** What its tooltip says after the label: the key that does the same, as it is now. */
76
+ hint?(): string;
77
+ /** Whether the picking is on. */
78
+ on(): boolean;
79
+ /** The button was pressed. */
80
+ run(): void;
81
+ /** Hear the picking go on or off, however it did. Returns the way to stop. */
82
+ watch(listener: () => void): () => void;
83
+ };
84
+ }
85
+ /** What the view reads the page through, so a test can stand in for each. */
86
+ export interface StylesPage {
87
+ inspect: typeof inspect;
88
+ invalidate: typeof invalidate;
89
+ getState(): DevknobsState;
90
+ subscribe(listener: (state: DevknobsState) => void): () => void;
91
+ /** The browser's word on whether a text is a color. */
92
+ isColor(text: string): boolean;
93
+ /** The element's box, or null where it has none to read. */
94
+ box(element: Element): BoxReading | null;
95
+ /** What an element, or one of its pseudo-elements, sees for a custom property now. Empty for one not set. */
96
+ variable(element: Element, pseudo: string | null, name: string): string;
97
+ }
98
+ /**
99
+ * A custom property as the element's computed style has it: the computed
100
+ * value of one `@property` registered, and for any other its text with the
101
+ * properties it reads in turn put in. It is asked of the element's own
102
+ * window, the device frame's for a page shown in it.
103
+ */
104
+ export declare function readVariable(element: Element, pseudo: string | null, name: string): string;
105
+ export interface StylesView {
106
+ /** The view's node, which goes in the body of the panel's view. */
107
+ node: HTMLElement;
108
+ /** Show an element's styles, or those of one of its pseudo-elements. Null shows the empty state. */
109
+ show(element: Element | null, pseudo?: string): void;
110
+ /** Read the styles again now, as after the frame loaded another page. */
111
+ refresh(): void;
112
+ /** Escape clears the filter where it has text, and says whether it did. */
113
+ escape(): boolean;
114
+ /** Take the focus, on no control, so the keys of the picking stay its own. */
115
+ focus(): void;
116
+ destroy(): void;
117
+ }
118
+ export declare function createStylesView(context: StylesContext, page?: StylesPage): StylesView;
@@ -0,0 +1,26 @@
1
+ import type { DevknobsState } from "../types";
2
+ import type { Knob } from "./catalog";
3
+ import { type LiveColors } from "./colors";
4
+ /**
5
+ * The one swatch list every color knob is drawn with: the knob's own colors
6
+ * as a radio group, the one that is on with a ring around it. A knob that
7
+ * takes colors of the user's own lists them after its own, each with an x
8
+ * that takes it off the list, and ends with a plus that opens the browser's
9
+ * color picker, with a field under the list for a color typed out.
10
+ */
11
+ /** What says no to a color that does not read. */
12
+ export declare const NOT_A_COLOR = "use a hex such as #1e90ff, or rgb()";
13
+ /** What the swatch list needs from the editors. */
14
+ export interface SwatchesContext {
15
+ /** The panel's shadow root, which knows the focus. */
16
+ root: Pick<ShadowRoot, "activeElement">;
17
+ /** The colors the user added. */
18
+ colors: LiveColors;
19
+ /** Set the knob from the panel. */
20
+ set(knob: Knob, value: string): void;
21
+ /** Put the knob back to its default. */
22
+ reset(knob: Knob): void;
23
+ /** Say no to what a control was given, and why. */
24
+ refuse(node: HTMLElement, reason: string): void;
25
+ }
26
+ export declare function swatchList(knob: Knob, context: SwatchesContext): [HTMLElement, (state: DevknobsState) => void];
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Code as the browsers' own tools color it, small and with no parser: a
3
+ * scan that tells strings, numbers, keywords, names and comments apart,
4
+ * enough to read a body by. And json as a tree, a node at a time. All of it
5
+ * from text alone, so none of it needs a page.
6
+ */
7
+ /** What a piece of code is, which picks its color. */
8
+ export type TokenKind = "key" | "str" | "num" | "kw" | "tag" | "attr" | "com";
9
+ /** A piece of code and what it is, or "" for plain text. */
10
+ export type Token = [kind: TokenKind | "", text: string];
11
+ /** The kinds of code that are colored. Any other text is plain. */
12
+ export type Lang = "json" | "html" | "css" | "js" | "text";
13
+ /** The kind of code a content type holds. */
14
+ export declare function langOf(type: string): Lang;
15
+ /** The pieces of a text, in order, colored for its kind of code. */
16
+ export declare function tokens(text: string, lang: Lang): Token[];
17
+ /** A text's pieces a line at a time, a piece over lines cut where they end. */
18
+ export declare function tokenLines(text: string, lang: Lang): Token[][];
19
+ /** How far in a line starts, in characters, a tab as two. */
20
+ export declare function indentOf(line: string): number;
21
+ /** A value of json as a leaf of a tree shows it: its text and what it is. */
22
+ export declare function jsonLeaf(value: unknown): Token;
23
+ /** Whether a value of json opens to more: an object or an array. */
24
+ export declare function jsonOpens(value: unknown): value is object;
25
+ /** What a node of json holds, a key and a value each: an array's by index. */
26
+ export declare function jsonEntries(value: object): [key: string, value: unknown][];
27
+ /** How much of a node a preview shows, in characters. */
28
+ export declare const PREVIEW_CHARS = 100;
29
+ /**
30
+ * A node of json in a line, as the browsers' tools show it before it opens:
31
+ * `{id: 7, name: "Ada"}` and `[1, 2, 3]`, what is inside a level down in
32
+ * short, and cut with `…` past `PREVIEW_CHARS`.
33
+ */
34
+ export declare function jsonPreview(value: object, max?: number): string;
@@ -0,0 +1,64 @@
1
+ /**
2
+ * The tooltip the panel's icon-only controls share: where it goes, and when
3
+ * it shows and hides. One shows at a time.
4
+ */
5
+ /** How long the pointer rests on a control before its tooltip shows, in ms. */
6
+ export declare const TIP_DELAY = 400;
7
+ /** Space between a tooltip and its control, and between a tooltip and the window's edge, in px. */
8
+ export declare const TIP_GAP = 6;
9
+ export declare const TIP_MARGIN = 8;
10
+ /**
11
+ * Where a tooltip goes, in window px: centered over its control, under it
12
+ * where there is no room above, and kept inside the window either way.
13
+ */
14
+ export declare function tipAt(control: {
15
+ left: number;
16
+ top: number;
17
+ width: number;
18
+ bottom: number;
19
+ }, tip: {
20
+ width: number;
21
+ height: number;
22
+ }, view: {
23
+ width: number;
24
+ height: number;
25
+ }): {
26
+ x: number;
27
+ y: number;
28
+ };
29
+ /** The shared tooltip, and the controls it shows for. */
30
+ export interface Tips {
31
+ /** Show the tooltip over a control now, red with `hot`. What it says is words, or a node built for it. */
32
+ show(node: HTMLElement, text: string | Node, hot?: boolean): void;
33
+ /** Hide the tooltip, and say whether one showed. */
34
+ hide(): boolean;
35
+ /** Hide the tooltip once a while has passed, in ms. */
36
+ hideAfter(delay: number): void;
37
+ /** Whether the tooltip shows, or is about to, for a control. */
38
+ isFor(node: HTMLElement): boolean;
39
+ /**
40
+ * Give a control a tooltip, its words asked for each time it shows where
41
+ * they change. What is asked for may be a node, for more than one line of words.
42
+ */
43
+ tooltip(node: HTMLElement, text: string | (() => string | Node)): void;
44
+ destroy(): void;
45
+ }
46
+ /** Drive the tooltip node `tip`, placed in `wrap`. */
47
+ export declare function createTips(tip: HTMLElement, wrap: HTMLElement): Tips;
48
+ /** How long a control stays red, and its reason shows, after a value it cannot take, in ms. */
49
+ export declare const REFUSED_RED = 1000;
50
+ export declare const REFUSED_TIP = 1800;
51
+ /** The one way a control says no to a value. */
52
+ export interface Refusal {
53
+ /**
54
+ * A value the control cannot take: it shakes and goes red for a moment, and
55
+ * the tooltip over it says why, as the live region does. A second one
56
+ * starts it all again.
57
+ */
58
+ refuse(node: HTMLElement, reason: string): void;
59
+ /** Take the red and the reason off a control. */
60
+ unrefuse(node: HTMLElement): void;
61
+ destroy(): void;
62
+ }
63
+ /** The refusals of a view, their reason in `tips` and in the live region `said`. */
64
+ export declare function createRefusal(tips: Tips, said: HTMLElement): Refusal;
package/package.json CHANGED
@@ -1,6 +1,62 @@
1
1
  {
2
2
  "name": "@vinena/knobs",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.5.1",
4
+ "private": false,
5
+ "license": "MIT",
6
+ "author": "Mert Düzgün",
7
+ "description": "drop-in dev panel for emulating browser preferences, locale, geolocation and layout knobs from inside the page",
8
+ "homepage": "https://knobs.dev",
9
+ "bugs": "https://github.com/vinenastudio/knobs/issues",
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "git+https://github.com/vinenastudio/knobs.git",
13
+ "directory": "packages/devknobs"
14
+ },
15
+ "publishConfig": {
16
+ "access": "public"
17
+ },
18
+ "type": "module",
19
+ "types": "./dist/index.d.ts",
20
+ "main": "./dist/index.js",
21
+ "files": [
22
+ "dist",
23
+ "skills",
24
+ "CHANGELOG.md",
25
+ "THIRD_PARTY_NOTICES.md"
26
+ ],
27
+ "exports": {
28
+ ".": {
29
+ "types": "./dist/index.d.ts",
30
+ "import": "./dist/index.js"
31
+ },
32
+ "./react": {
33
+ "types": "./dist/react.d.ts",
34
+ "import": "./dist/react.js"
35
+ },
36
+ "./global": "./dist/index.global.js",
37
+ "./early": "./dist/early.global.js",
38
+ "./bezels/*": "./dist/bezels/*"
39
+ },
40
+ "scripts": {
41
+ "build": "bun scripts/bezelurls.ts && bun -e 'require(\"fs\").rmSync(\"dist.tmp\",{recursive:true,force:true})' && bun build src/index.ts --outdir dist.tmp --format esm --splitting --define DEVKNOBS_TUNE=false && bun build src/react.tsx --outdir dist.tmp --format esm --splitting --external react --banner '\"use client\";' --define DEVKNOBS_TUNE=false && bun build src/global.ts --outfile dist.tmp/index.global.js --format iife --minify --define 'import.meta.url=\"\"' --define DEVKNOBS_TUNE=false && bun build src/early.ts --outfile dist.tmp/early.global.js --format iife --minify --define DEVKNOBS_TUNE=false && tsc --emitDeclarationOnly --project tsconfig.build.json --outDir dist.tmp && rm -f dist.tmp/engine/foldtune.d.ts && if [ -d assets/bezels ]; then cp -R assets/bezels dist.tmp/bezels; fi && bun scripts/useclient.ts && bun scripts/tunefree.ts && bun -e 'const fs=require(\"fs\");fs.rmSync(\"dist\",{recursive:true,force:true});fs.renameSync(\"dist.tmp\",\"dist\")'",
42
+ "link": "bun scripts/link.ts link",
43
+ "unlink": "bun scripts/link.ts unlink",
44
+ "test": "bun test",
45
+ "typecheck": "tsc --noEmit"
46
+ },
47
+ "peerDependencies": {
48
+ "react": ">=18"
49
+ },
50
+ "peerDependenciesMeta": {
51
+ "react": {
52
+ "optional": true
53
+ }
54
+ },
55
+ "devDependencies": {
56
+ "@types/bun": "^1.3.1",
57
+ "@types/react": "^19.2.14",
58
+ "bippy": "^0.7.3",
59
+ "react": "^19.2.4",
60
+ "typescript": "^5.9.3"
61
+ }
62
+ }
@@ -0,0 +1,214 @@
1
+ ---
2
+ name: devknobs
3
+ description: Test a web page under different conditions with devknobs and fix what breaks. Use when an agent needs to check a page in dark mode, with reduced motion or more contrast, in another locale or right to left, with larger text, offline or on a slow connection, on another device or width, in another time zone or at another time, and then find and fix the code behind anything that looks wrong.
4
+ ---
5
+
6
+ # devknobs
7
+
8
+ devknobs is a dev panel that emulates browser conditions from inside the page.
9
+ You drive it from any browser tool that can run JavaScript in the page:
10
+ Playwright `page.evaluate`, Chrome DevTools MCP `evaluate_script`, or similar.
11
+
12
+ ## Before you start
13
+
14
+ devknobs must be installed in the app. See the install section of the
15
+ devknobs README (`node_modules/@vinena/knobs/README.md`).
16
+
17
+ Check that devknobs is mounted:
18
+
19
+ ```js
20
+ await window.devknobs.ready();
21
+ ```
22
+
23
+ Every way of mounting devknobs puts the api on `window.devknobs`: the script
24
+ tag, `mount()` and `<DevKnobs />`. Inside the width knob's frame the frame's own
25
+ copy has it too. If `window.devknobs` is undefined, devknobs is not on this
26
+ page. The script tag build keeps the api after `unmount()`, so the api alone
27
+ does not prove a mount. `ready()` does: it rejects at once with
28
+ `devknobs: not mounted` when nothing is mounted.
29
+
30
+ Then note the panel as the user left it. Keep the result in your notes, as a
31
+ later evaluate or a reload loses page variables:
32
+
33
+ ```js
34
+ JSON.stringify(window.devknobs.getState().panel);
35
+ ```
36
+
37
+ This note comes from the tab's `sessionStorage`, so it is the user's layout
38
+ only in a fresh tab. In a tab an earlier agent may have used, also read
39
+ `localStorage.getItem("devknobs:place")`. It holds the place the user last
40
+ gave the panel (`side`, `y`, `top`, `edge`, `tab`, `docked`). Use those fields
41
+ over the ones in the note.
42
+
43
+ ## Learn the knobs
44
+
45
+ Call `describe()` first. Never guess a key or a value.
46
+
47
+ ```js
48
+ window.devknobs.describe();
49
+ ```
50
+
51
+ It returns one entry per knob:
52
+
53
+ - `key`: the key in a `setState` patch.
54
+ - `description`: what the knob does.
55
+ - `value`: the values it takes. `enum` lists them. `number` has `min`, `max`
56
+ and keywords in `or`. `string` has `examples` and keywords in `or`. `object`
57
+ lists its `fields`, and you can patch one field at a time. In `clock`, a new
58
+ `mode` or `speed` starts from what the clock reads now, so set `mode` and
59
+ `at` in one patch.
60
+ - `default`: the value `reset()` goes back to. `reset()` leaves `panel` as it
61
+ is: open or closed, docked or not, handle shown or hidden.
62
+ - `reload`: what applying it takes. `none`, `frame` or `page`.
63
+
64
+ `getState()` holds some internal fields that `describe()` does not list, such
65
+ as `grabColor` and the panel's place. Do not compare the two key for key.
66
+
67
+ ## Set a condition
68
+
69
+ 1. Call `setState(patch)`. It is sync and returns the new state.
70
+ A wrong key or value throws a TypeError, and then nothing changes:
71
+ `devknobs: unknown knob <key>[.<field>]` or
72
+ `devknobs: bad value for <key>[.<field>]: <value>`. Fix the patch from
73
+ `describe()`. Combinations are not checked: `orientation` is dropped
74
+ without a numeric width and height, and `posture` without a device that
75
+ folds. Compare `getState()` with what you set.
76
+ 2. Wait for it to apply:
77
+ - `reload` is `none` or `frame`: `await window.devknobs.ready()`.
78
+ - `reload` is `page`: the page may reload, or it may not. devknobs skips a
79
+ reload that comes less than 5 seconds after the last one. Call
80
+ `await window.devknobs.ready()` either way. If the page navigates
81
+ instead, wait for the load in your browser tool and call
82
+ `await window.devknobs.ready()` on the new page. A `ready()` from the old
83
+ page never settles. In Playwright or a DevTools tool, the reload ends the
84
+ evaluate with an error such as `Execution context was destroyed` or
85
+ `Inspected target navigated or closed`. That error is the expected sign
86
+ of the reload.
87
+
88
+ `ready()` resolves with the state once the device frame has caught up, the
89
+ pseudo text is in and the panel has finished its slide. After 10 seconds it rejects with the error
90
+ `devknobs: not settled after 10 seconds`. A rejection is not success: check the
91
+ page before you trust it.
92
+
93
+ To leave a device, call `reset()` or set
94
+ `{ device: "none", width: "full", height: "full", dpr: "system" }`.
95
+ `device: "none"` alone keeps the device's width, height and dpr, so the frame
96
+ stays up.
97
+
98
+ ```js
99
+ window.devknobs.setState({ scheme: "dark", motion: "reduce" });
100
+ await window.devknobs.ready();
101
+ ```
102
+
103
+ ```js
104
+ window.devknobs.setState({ device: "iphone-17", locale: { lang: "ar", dir: "rtl" } });
105
+ await window.devknobs.ready();
106
+ // If the page navigates, the evaluate ends with it. Wait for the load, then on the new page:
107
+ await window.devknobs.ready();
108
+ ```
109
+
110
+ ## Check the page
111
+
112
+ 1. Close the panel, hide its handle and unpin it, so it stays out of
113
+ screenshots and out of the page's width, then wait for it to slide away:
114
+ `window.devknobs.setState({ panel: { open: false, handle: false, docked: false } })`,
115
+ then `await window.devknobs.ready()`. `reset()` keeps this. Patch only
116
+ `open`, `docked` and `handle`. The other panel fields are the user's
117
+ layout. `panel.handle` is your layer. The user's own "show handle" setting
118
+ can hide the handle too, and `getState()` does not show that setting.
119
+ 2. Take a screenshot, or read the DOM.
120
+ 3. A numeric width or height, a device, a numeric dpr, a vision other than
121
+ `none`, `frame: true`, or a panel pinned to its side (`panel.docked`) render
122
+ the page in an iframe. `ua` does not bring
123
+ the frame up. It only reloads the frame while one is up. The iframe is in
124
+ a shadow root, so reach it through its host. Then wait for the frame's own
125
+ `ready()`, which can come a second after the top one:
126
+
127
+ ```js
128
+ const frame = document
129
+ .querySelector('[data-devknobs="viewport"]')
130
+ ?.shadowRoot?.querySelector("iframe[data-devknobs-frame]");
131
+ await frame?.contentWindow?.devknobs?.ready();
132
+ frame?.contentDocument;
133
+ ```
134
+
135
+ Read the DOM there. The page in the frame runs its own devknobs, so call
136
+ `grab` on `frame.contentWindow.devknobs` for elements in the frame. The top
137
+ page's `grab` on such an element gives component names with no file or line.
138
+ After `ready()` the frame's devknobs is there if the app mounts devknobs on
139
+ that page.
140
+
141
+ ## Find the code
142
+
143
+ For an element that looks wrong, call `grab`:
144
+
145
+ ```js
146
+ const payload = await window.devknobs.grab(document.querySelector("h1"));
147
+ payload?.content;
148
+ ```
149
+
150
+ `grab` takes an element, an array or a NodeList, as `querySelectorAll` gives.
151
+
152
+ `content` is one line per element: its html, the components that rendered it
153
+ and their source files with line and column. `entries[i].source?.filePath`
154
+ holds the file, relative to the app's dev server root (the vite root), not the
155
+ repo. In a monorepo, find the app first. `source` is null when devknobs cannot
156
+ find one. `source.lineNumber` and `columnNumber` are null when devknobs finds
157
+ the file but not the line, and `content` then names the file alone. Search
158
+ that file for the element's tag and class names. A line that is there points
159
+ at the element's tag in the file. Open that file and fix the code.
160
+ `entries[i].selector` finds the element in the page. It is a css selector unless it has `>>>` (a shadow root) or `>>iframe>>` (a frame) steps; then query each part in turn.
161
+
162
+ `grab` also copies the result to the clipboard. The payload comes back even
163
+ when the copy fails, as it often does in headless browsers; `copied` says
164
+ whether it reached the clipboard. `grab` skips entries that are not elements,
165
+ such as a `querySelector` that found nothing, and returns `null` when nothing
166
+ is left or the elements give nothing.
167
+
168
+ After a fix, reload the page. The knobs stay set across reloads. Call
169
+ `await window.devknobs.ready()` and check again.
170
+
171
+ ## Loop over conditions
172
+
173
+ ```js
174
+ const conditions = [
175
+ { scheme: "dark" },
176
+ { motion: "reduce" },
177
+ { contrast: "more" },
178
+ { text: 24 },
179
+ { spacing: true },
180
+ { network: { online: "offline" } },
181
+ { timeZone: "Asia/Kathmandu" },
182
+ { width: 390 },
183
+ ];
184
+ ```
185
+
186
+ For each condition:
187
+
188
+ 1. `window.devknobs.reset()`.
189
+ 2. `window.devknobs.setState(condition)`. The panel stays as you set it in
190
+ "Check the page".
191
+ 3. Wait as in "Set a condition".
192
+ 4. Screenshot or read the DOM. Note what breaks.
193
+ 5. `grab` the broken elements, fix the code, check again.
194
+
195
+ Test locale apart, as it can reload the page: `{ locale: { lang: "ar" } }`. The
196
+ `reset()` after it can reload the page too, so wait for the load. Also try
197
+ `{ pseudo: true }` to find text that is cut off or not translated. It also
198
+ changes data values, such as numbers and names. That is not a bug.
199
+
200
+ ## Finish
201
+
202
+ Put the knobs back, and the panel as you noted it at the start:
203
+
204
+ ```js
205
+ window.devknobs.reset();
206
+ window.devknobs.setState({ panel: NOTED_PANEL }); // the panel json you noted
207
+ await window.devknobs.ready();
208
+ ```
209
+
210
+ The knobs are kept in `sessionStorage` and stay set across reloads in the tab
211
+ until a reset. The panel's place, docked or not with it, is also kept in
212
+ `localStorage` under `devknobs:place`, which every tab of the origin reads
213
+ when it opens. Your `setState` does not write it, but the user's next drag
214
+ or pin in this tab does, with what you left. So put the panel back.