@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,59 @@
1
+ import type { Conditional, Specificity, StyleDeclaration } from "./types";
2
+ /** Where a block of declarations stands in the cascade, apart from `!important`. */
3
+ export interface Source {
4
+ /**
5
+ * The tree the rule comes from: 0 for the element's own, higher for a shadow
6
+ * tree inside it (`:host` and `::slotted()` rules).
7
+ */
8
+ context: number;
9
+ /** The `style` attribute. */
10
+ inline: boolean;
11
+ /** The layer's place in its tree: a later layer is higher, and unlayered styles highest. */
12
+ layer: number;
13
+ specificity: Specificity;
14
+ /** Place among the rules of its tree: stylesheet order, then rule order. */
15
+ order: number;
16
+ }
17
+ /** A block in the running for an element's properties. */
18
+ export interface Candidate {
19
+ id: number;
20
+ source: Source;
21
+ declarations: StyleDeclaration[];
22
+ /** What the block sets a longhand to, as the browser parsed it. */
23
+ value(longhand: string): string;
24
+ conditional?: Conditional;
25
+ }
26
+ export interface Winner {
27
+ candidate: Candidate;
28
+ declaration: StyleDeclaration;
29
+ }
30
+ /**
31
+ * Above zero when `a` wins, below when `b` does. Importance first. Then the
32
+ * tree: the outer one wins, and the inner one once important. Then the `style`
33
+ * attribute. Then layers: the later one wins, with unlayered styles over all,
34
+ * and the other way round once important. Then specificity, then order.
35
+ */
36
+ export declare function compare(a: Source, aImportant: boolean, b: Source, bImportant: boolean): number;
37
+ /** The declaration that takes each longhand. In one block the later of two equals wins. */
38
+ export declare function winners(candidates: readonly Candidate[]): Map<string, Winner>;
39
+ /** Strike a declaration through once every longhand it sets went to another. */
40
+ export declare function markOwn(candidates: readonly Candidate[], won: ReadonlyMap<string, Winner>): void;
41
+ /**
42
+ * Settle what one ancestor hands down. Only declarations of inherited
43
+ * properties stay, and the candidates left with none are dropped. One is
44
+ * struck through when it lost on the ancestor itself, or when the element or
45
+ * a nearer ancestor sets the property: `taken` has those, by the block that
46
+ * set each, and gets this ancestor's added.
47
+ */
48
+ export declare function settleInherited<C extends Candidate>(candidates: readonly C[], taken: Map<string, number>, inherits: (property: string) => boolean): C[];
49
+ /**
50
+ * Decide the container queries the computed style can decide. Script cannot
51
+ * evaluate a container query, but where a rule inside one would win a
52
+ * property with a steady value, the computed style tells: another value there
53
+ * means the query does not hold, and the rule is dropped. The same value,
54
+ * where the next in line would have given a different steady one, confirms
55
+ * it. A rule with no such property stays, unconfirmed.
56
+ */
57
+ export declare function settleContainers<C extends Candidate>(candidates: readonly C[], computed: (property: string) => string): C[];
58
+ /** Strongest first, as the pane lists them: the order normal declarations win in. */
59
+ export declare function byStrength<C extends Candidate>(candidates: readonly C[]): C[];
@@ -0,0 +1,73 @@
1
+ import { type Subject } from "./selector";
2
+ import { type Scope } from "./tree";
3
+ import type { HiddenSheet, RuleOrigin, Specificity } from "./types";
4
+ /** Something around a rule that must hold now for it to apply. */
5
+ export type Condition =
6
+ /** The live list: devknobs rewrites its text, and the rewritten one is what applies. */
7
+ {
8
+ kind: "media";
9
+ list: MediaList;
10
+ } | {
11
+ kind: "supports";
12
+ text: string;
13
+ };
14
+ /** One selector of a rule's list, taken apart once so an inspection only has to match. */
15
+ export interface FlatPart extends Subject {
16
+ /** As the stylesheet has it. */
17
+ text: string;
18
+ specificity: Specificity;
19
+ }
20
+ /** Where an `@scope` starts and ends. */
21
+ export interface ScopeLimits {
22
+ start: string | null;
23
+ end: string | null;
24
+ /** The parent of the stylesheet's element, the root of an `@scope` that names none. */
25
+ around: Element | null;
26
+ }
27
+ /** A style rule lifted out of everything it sits in, with what that was. */
28
+ export interface FlatRule {
29
+ rule: CSSStyleRule | CSSNestedDeclarations;
30
+ selectorText: string;
31
+ parts: FlatPart[];
32
+ context: string[];
33
+ conditions: Condition[];
34
+ /** The layer it is in, as its path joined by dots. Empty for none. */
35
+ layer: string;
36
+ scope: ScopeLimits | null;
37
+ conditional: "container" | "scope" | null;
38
+ origin: RuleOrigin;
39
+ /** Its place among the rules of its tree. */
40
+ order: number;
41
+ /** Set once looked at: it has a declaration an ancestor could hand down. */
42
+ hands?: boolean;
43
+ }
44
+ /** A layer named at this point, which is where its place in the order is taken. */
45
+ export interface LayerMark {
46
+ path: string[];
47
+ conditions: Condition[];
48
+ }
49
+ /** All the style rules of one tree, in order. */
50
+ export interface Flat {
51
+ rules: FlatRule[];
52
+ layers: LayerMark[];
53
+ hidden: HiddenSheet[];
54
+ /** Custom properties `@property` registered, by whether they inherit. */
55
+ registered: Map<string, boolean>;
56
+ /** Rules that threw as they were read. */
57
+ skipped: number;
58
+ }
59
+ /**
60
+ * Drop every flattened rule list. One is rebuilt by itself when a stylesheet
61
+ * comes, goes, is switched off or gains or loses a top-level rule. An edit
62
+ * deeper than that, or to a selector, needs this.
63
+ */
64
+ export declare function invalidate(): void;
65
+ /** The style rules of a tree, flattened once and kept until its stylesheets change. */
66
+ export declare function rulesOf(scope: Scope): Flat;
67
+ /**
68
+ * Each layer's place in its tree's order. A layer is placed where it is first
69
+ * named, in a block, a statement or an import, and only where the conditions
70
+ * around that hold. A layer's own rules go over those of the layers in it,
71
+ * and unlayered rules, under the empty name, go over all.
72
+ */
73
+ export declare function layerRanks(marks: readonly LayerMark[], holds: (conditions: readonly Condition[]) => boolean): Map<string, number>;
@@ -0,0 +1,30 @@
1
+ /** A declaration as a rule's `cssText` has it. */
2
+ export interface Written {
3
+ name: string;
4
+ value: string;
5
+ important: boolean;
6
+ }
7
+ /**
8
+ * The declarations of a rule, read back from its `cssText`. That is where the
9
+ * browser keeps a shorthand as one declaration and a `var()` as written, where
10
+ * the declaration's own list of properties has only longhands.
11
+ */
12
+ export declare function parseDeclarations(cssText: string): Written[];
13
+ /** The custom properties a value reads through `var()`, those in fallbacks too, each once. */
14
+ export declare function variableNames(value: string): string[];
15
+ /** What reading a declaration block takes: the longhands it lists and what each is set to. */
16
+ export interface StyleLike {
17
+ readonly cssText: string;
18
+ readonly length: number;
19
+ item(index: number): string;
20
+ getPropertyValue(name: string): string;
21
+ }
22
+ /** The longhand names a declaration block lists. */
23
+ export declare function listed(style: StyleLike): string[];
24
+ /**
25
+ * The longhands a written declaration sets. One the block lists by name is a
26
+ * longhand. Any other is a shorthand: `expand` gives all it can set, and those
27
+ * the block lists are the ones it set here. Where `expand` knows nothing, the
28
+ * listed names under the shorthand's own (`margin-top` under `margin`) stand in.
29
+ */
30
+ export declare function longhandsOf(name: string, names: readonly string[], expand: (shorthand: string) => readonly string[]): string[];
@@ -0,0 +1,20 @@
1
+ /**
2
+ * The styles of one element, as the styles pane shows them: its `style`
3
+ * attribute, the rules that reach it in the order the cascade ranks them, its
4
+ * `::before` and `::after`, and what each ancestor hands down. To use it:
5
+ *
6
+ * const found = inspect(element); // or inspect(element, "::before")
7
+ * invalidate(); // after editing a stylesheet in place
8
+ *
9
+ * Nothing here draws or listens. It reads the page's stylesheets as they are,
10
+ * and leaves out devknobs' own, with what its knobs write in a `style` attribute.
11
+ */
12
+ import type { Inspection } from "./types";
13
+ export { invalidate } from "./collect";
14
+ export type * from "./types";
15
+ /**
16
+ * Inspect an element, or one of its pseudo-elements. Rules in a media query
17
+ * or `@supports` that does not hold now are left out. A rule in `@container`
18
+ * or `@scope` is marked `conditional`, as script cannot evaluate those for sure.
19
+ */
20
+ export declare function inspect(element: Element, pseudo?: string): Inspection;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Does a child take this property from its parent? A custom property does,
3
+ * unless `@property` registered it with `inherits: false`.
4
+ */
5
+ export declare function isInherited(property: string, registered: ReadonlyMap<string, boolean>): boolean;
@@ -0,0 +1,41 @@
1
+ import type { Condition, FlatRule, ScopeLimits } from "./collect";
2
+ import type { Specificity } from "./types";
3
+ /**
4
+ * Whose rules are matched: the element's own tree's, its shadow root's `:host`
5
+ * rules, or the `::slotted()` rules of the tree the slot it is assigned to is in.
6
+ */
7
+ export type Reach = {
8
+ kind: "own";
9
+ } | {
10
+ kind: "host";
11
+ } | {
12
+ kind: "slotted";
13
+ slot: Element;
14
+ };
15
+ /** A rule that reaches the element, or one of its pseudo-elements. */
16
+ export interface Hit {
17
+ flat: FlatRule;
18
+ /** Which selectors of the rule's list match, in their order. */
19
+ matched: boolean[];
20
+ /** The highest among those. */
21
+ specificity: Specificity;
22
+ }
23
+ /** What one inspection shares across its passes. */
24
+ export interface Checks {
25
+ holds(conditions: readonly Condition[]): boolean;
26
+ /** A selector threw and was left out. */
27
+ threw(): void;
28
+ }
29
+ /** Answers media queries and `@supports` conditions for a window, each once. */
30
+ export declare function conditionsFor(view: Window & typeof globalThis): Checks["holds"];
31
+ /**
32
+ * Is the element within the `@scope`: under the nearest root, and not at or
33
+ * under one of its limits? A limit is matched as written, not relative to the root.
34
+ */
35
+ export declare function inScope(element: Element, scope: ScopeLimits): boolean;
36
+ /**
37
+ * The rules that reach the element, in one pass, each selector matched once.
38
+ * They come by what they style: under the empty name for the element itself,
39
+ * under `::before` and the like for a pseudo-element. Only names in `wanted` are looked at.
40
+ */
41
+ export declare function matchRules(element: Element, rules: readonly FlatRule[], reach: Reach, wanted: ReadonlySet<string>, checks: Checks, skip?: (flat: FlatRule) => boolean): Map<string, Hit[]>;
@@ -0,0 +1,36 @@
1
+ import type { Specificity } from "./types";
2
+ /** Split a selector list on its top-level commas, past strings, brackets and escapes. */
3
+ export declare function splitList(text: string): string[];
4
+ /** Above zero when `a` is the more specific, below when `b` is. */
5
+ export declare function compareSpecificity(a: Specificity, b: Specificity): number;
6
+ /**
7
+ * A selector's specificity. A nested `&` is taken to be resolved by now (see
8
+ * `resolveNesting`): one still here stands for nothing and weighs nothing.
9
+ */
10
+ export declare function specificity(selector: string): Specificity;
11
+ /** A pseudo-element's name as it is compared: two colons, lower case, its brackets kept. */
12
+ export declare function normalizePseudo(pseudo: string): string;
13
+ /** A selector taken apart for `Element.matches`, which takes none with a pseudo-element in it. */
14
+ export interface Subject {
15
+ /** The selector without its pseudo-elements, to hand to `matches`. */
16
+ match: string;
17
+ /** The pseudo-element it styles, as `::before`, or null for the element itself. */
18
+ pseudo: string | null;
19
+ /** What `::slotted()` holds: `match` then names the slot, and this the element in it. */
20
+ slotted: string | null;
21
+ /**
22
+ * For a selector that is the shadow host alone, `:host(.open):hover` say: the
23
+ * same test written for the host as seen from outside, where `:host` matches nothing.
24
+ */
25
+ host: string | null;
26
+ }
27
+ export declare function parseSubject(selector: string): Subject;
28
+ /** Does the selector name its parent rule with `&`, outside of strings and attributes? */
29
+ export declare function hasNesting(selector: string): boolean;
30
+ /**
31
+ * A nested rule's selector as one that stands alone. Its `&` is the parent
32
+ * rule's selector list, in `:is()` so it weighs as its heaviest. Without `&`
33
+ * the selector is relative, and the parent goes in front. With no parent rule
34
+ * `&` is the scoping root.
35
+ */
36
+ export declare function resolveNesting(selector: string, parent: string | null): string;
@@ -0,0 +1,14 @@
1
+ /** A document or a shadow root: one tree, with stylesheets of its own. */
2
+ export type Scope = Document | ShadowRoot;
3
+ /** Told by its `host`, as `instanceof` fails for a node of the device frame's window. */
4
+ export declare function isShadowRoot(node: Node): node is ShadowRoot;
5
+ /** The tree an element is in. One that is not attached counts as in its document. */
6
+ export declare function scopeOf(element: Element): Scope;
7
+ /**
8
+ * The parent an element inherits from: the slot it is assigned to, else the
9
+ * element above, else the host of its shadow root. A document's root has none:
10
+ * nothing is inherited across a frame.
11
+ */
12
+ export declare function flatParent(element: Element): Element | null;
13
+ /** An element as devtools names it: `button#save.primary`. */
14
+ export declare function label(element: Element): string;
@@ -0,0 +1,117 @@
1
+ /**
2
+ * What an inspection hands the pane: plain data, in the order it is shown.
3
+ * The live rules ride along as handles, so a later edit goes to the right one.
4
+ */
5
+ /** Ids, then classes, attributes and pseudo-classes, then types and pseudo-elements. */
6
+ export type Specificity = readonly [number, number, number];
7
+ export interface StyleDeclaration {
8
+ /** As the stylesheet serializes it: a shorthand stays a shorthand. */
9
+ name: string;
10
+ /** As written, `var()` and all, without `!important`. */
11
+ value: string;
12
+ important: boolean;
13
+ /** The longhands it sets, which the cascade is settled by. Itself for a longhand. */
14
+ longhands: string[];
15
+ /** Every longhand it sets lost to another declaration. */
16
+ overridden: boolean;
17
+ /** The `id` of the block that took its first longhand, when overridden. */
18
+ overriddenBy?: number;
19
+ /** The custom properties its value reads through `var()`, fallbacks included. */
20
+ variables: string[];
21
+ }
22
+ /** One selector of a rule's list. */
23
+ export interface SelectorPart {
24
+ /** As the stylesheet has it, `&` and all for a nested rule. */
25
+ text: string;
26
+ /** This one reaches the element. */
27
+ matches: boolean;
28
+ }
29
+ export interface RuleOrigin {
30
+ /** The stylesheet's address, `<style>` for an inline one, `constructed` for an adopted one. */
31
+ sheet: string;
32
+ /** The element that brought the stylesheet in, as `link#theme`. Null for a constructed one. */
33
+ owner: string | null;
34
+ /**
35
+ * Where the rule sits: its index in the stylesheet, then in each rule around
36
+ * it, outermost first. An `@import` counts as the rule its stylesheet is in.
37
+ */
38
+ path: number[];
39
+ }
40
+ /** A condition around a rule that script cannot evaluate for sure. */
41
+ export interface Conditional {
42
+ kind: "container" | "scope";
43
+ /** The computed style showed that the rule applies. False where it could not tell. */
44
+ confirmed: boolean;
45
+ }
46
+ export interface InlineBlock {
47
+ kind: "inline";
48
+ /** Names the block within one inspection. */
49
+ id: number;
50
+ declarations: StyleDeclaration[];
51
+ /** The element whose `style` attribute this is. */
52
+ element: Element;
53
+ }
54
+ export interface RuleBlock {
55
+ kind: "rule";
56
+ id: number;
57
+ /** The rule's whole selector list, as the stylesheet has it. */
58
+ selectorText: string;
59
+ selector: SelectorPart[];
60
+ /** The highest among the selectors that match. */
61
+ specificity: Specificity;
62
+ origin: RuleOrigin;
63
+ /**
64
+ * What the rule sits in, outermost first: `@layer base`, `@media (min-width: 640px)`,
65
+ * the selector of a rule it is nested in.
66
+ */
67
+ context: string[];
68
+ conditional?: Conditional;
69
+ declarations: StyleDeclaration[];
70
+ /** The live rule, to toggle and edit its declarations on. */
71
+ rule: CSSStyleRule | CSSNestedDeclarations;
72
+ }
73
+ export type OwnBlock = InlineBlock | RuleBlock;
74
+ /** What an ancestor hands down: only its declarations of inherited properties. */
75
+ export interface InheritedGroup {
76
+ kind: "inherited";
77
+ /** The ancestor, as `div#app.shell`. */
78
+ from: string;
79
+ element: Element;
80
+ blocks: OwnBlock[];
81
+ }
82
+ /** The rules of one of the element's pseudo-elements. */
83
+ export interface PseudoGroup {
84
+ kind: "pseudo";
85
+ pseudo: string;
86
+ blocks: RuleBlock[];
87
+ }
88
+ export type StyleBlock = OwnBlock | InheritedGroup | PseudoGroup;
89
+ /** A stylesheet whose rules the page may not read, so none of them is shown. */
90
+ export interface HiddenSheet {
91
+ sheet: string;
92
+ reason: "cross-origin" | "unreadable";
93
+ }
94
+ export interface VariableValue {
95
+ /** What the element sees, from its computed style. Empty when it is not set. */
96
+ value: string;
97
+ /** The `id` of the block whose declaration it comes from, or null when none shown sets it. */
98
+ definedIn: number | null;
99
+ }
100
+ export interface Inspection {
101
+ target: {
102
+ /** As devtools names it: `button#save.primary`. */
103
+ label: string;
104
+ /** `::before` say, when a pseudo-element was asked for. */
105
+ pseudo: string | null;
106
+ };
107
+ /**
108
+ * Nearest first: the element's own, strongest first, then its pseudo-elements,
109
+ * then each ancestor's.
110
+ */
111
+ blocks: StyleBlock[];
112
+ hidden: HiddenSheet[];
113
+ /** Every custom property a winning declaration reads, by name. */
114
+ variables: Record<string, VariableValue>;
115
+ /** Rules and selectors that threw and were left out. */
116
+ skipped: number;
117
+ }
@@ -0,0 +1,35 @@
1
+ /**
2
+ * The custom properties a value reads through `var()`, found the way css
3
+ * reads the value: a string, a comment and a bare `url()` are skipped whole,
4
+ * so text in them that looks like a call is none. To use it:
5
+ *
6
+ * varReferences("calc(var(--a) + var(--b, var(--c, 4px)))"); // --a, --b, --c
7
+ * resolveVars("var(--gap, 4px)", (name) => seen[name] ?? ""); // "4px"
8
+ *
9
+ * Nothing here touches the page.
10
+ */
11
+ /** One `var()` of a value. */
12
+ export interface VarReference {
13
+ /** Where the whole call starts in the value, and where it ends, past its bracket. */
14
+ start: number;
15
+ end: number;
16
+ /** The custom property's name as written. Its case counts. */
17
+ name: string;
18
+ /** Where the name starts in the value. */
19
+ at: number;
20
+ /** What stands after the first comma, as written, or null where the call has none. */
21
+ fallback: string | null;
22
+ /** Its bracket closes. One the value's end leaves open is still read, as css reads it. */
23
+ closed: boolean;
24
+ }
25
+ /**
26
+ * Every `var()` of a value in the order they start, those in a fallback
27
+ * after the one whose fallback it is.
28
+ */
29
+ export declare function varReferences(value: string): VarReference[];
30
+ /**
31
+ * A value with each `var()` put as what `read` says its property is, an
32
+ * empty answer being one that is not set, which comes to its fallback. Null
33
+ * where one is not set and has no fallback to come to, or is left open.
34
+ */
35
+ export declare function resolveVars(value: string, read: (name: string) => string): string | null;
@@ -0,0 +1,221 @@
1
+ /** Emulated value for `prefers-color-scheme`. */
2
+ export type SchemeValue = "light" | "dark" | "system";
3
+ /** Emulated value for `prefers-reduced-motion`. */
4
+ export type MotionValue = "reduce" | "system";
5
+ /** Playback rate for every animation on the page. 1 is normal speed and 0 pauses. */
6
+ export type SpeedValue = number;
7
+ /** Emulated value for `prefers-contrast`. */
8
+ export type ContrastValue = "more" | "system";
9
+ /** Emulated value for `prefers-reduced-transparency`. */
10
+ export type TransparencyValue = "reduce" | "system";
11
+ /** Writing direction. `system` derives the direction from the language tag. */
12
+ export type DirValue = "ltr" | "rtl" | "system";
13
+ export interface LocaleValue {
14
+ /** BCP 47 tag, or `system` to stop emulating. */
15
+ lang: string;
16
+ dir: DirValue;
17
+ }
18
+ /** A failure to report instead of a position. `none` reports the position. */
19
+ export type GeoErrorValue = "none" | "denied" | "unavailable" | "timeout";
20
+ export interface GeoValue {
21
+ /**
22
+ * A preset id, `custom` to use the explicit fields, `route` to travel the
23
+ * route, or `system` to stop emulating.
24
+ */
25
+ preset: string;
26
+ lat: number;
27
+ lng: number;
28
+ accuracy: number;
29
+ /** The zone of a `custom` position, followed by a time zone knob set to `geo`. */
30
+ timeZone: string;
31
+ /** Works without a position too, so a page can be tested for refusals alone. */
32
+ error: GeoErrorValue;
33
+ /** The path of the `route` preset: `lat,lng` per line, or a pasted GPX file. */
34
+ route: string;
35
+ /** How fast the `route` preset travels its path, in km/h. */
36
+ speed: number;
37
+ }
38
+ /**
39
+ * An IANA zone such as `Asia/Kathmandu`, `geo` to follow the geolocation
40
+ * preset, or `system` to stop emulating.
41
+ */
42
+ export type TimeZoneValue = string;
43
+ /** The real clock, one that runs on from a set instant, or one stopped there. */
44
+ export type ClockMode = "system" | "offset" | "frozen";
45
+ export interface ClockValue {
46
+ mode: ClockMode;
47
+ /** The instant the clock read at `since`, in epoch ms. A frozen clock stays there. */
48
+ at: number;
49
+ /**
50
+ * The real instant `at` was set at, in epoch ms. The engine stamps it on
51
+ * every change, so a patch leaves it out.
52
+ */
53
+ since: number;
54
+ /** Clock ms per real ms while it runs. */
55
+ speed: number;
56
+ /** Send the clock's instant to the page's own origin, in an `x-devknobs-now` header. */
57
+ header: boolean;
58
+ }
59
+ /** Emulated `navigator.onLine`. Requests still go out: only the flag and its events change. */
60
+ export type OnlineValue = "offline" | "system";
61
+ /** Emulated `navigator.connection.effectiveType`, where the browser has a connection. */
62
+ export type ConnectionValue = "slow-2g" | "2g" | "3g" | "4g" | "system";
63
+ /** Emulated `navigator.connection.saveData`. */
64
+ export type SaveDataValue = "on" | "off" | "system";
65
+ export interface NetworkValue {
66
+ online: OnlineValue;
67
+ type: ConnectionValue;
68
+ saveData: SaveDataValue;
69
+ }
70
+ /** Root font size in px, or `system` to stop emulating. */
71
+ export type TextValue = number | "system";
72
+ /** Viewport width in px, rendered as a frame that wide, or `full` for the window. */
73
+ export type WidthValue = number | "full";
74
+ /** Viewport height in px, rendered as a frame that tall, or `full` for the window. */
75
+ export type HeightValue = number | "full";
76
+ /** Which way the frame is held. Landscape puts its long side across. */
77
+ export type OrientationValue = "portrait" | "landscape";
78
+ /** How a foldable stands: folded shut on its cover screen, or open on its inner one. */
79
+ export type PostureValue = "closed" | "open";
80
+ /**
81
+ * Where a phone's browser keeps its bars: `auto` for the browser's own
82
+ * default, Safari's compact or Chrome's top, or `off` for none.
83
+ */
84
+ export type BrowserValue = "auto" | "compact" | "bottom" | "top" | "off";
85
+ /**
86
+ * A phone's browser bars: `auto` minimizes them on a scroll down and brings
87
+ * them back on a scroll up, as the browser does, or they stay one way.
88
+ */
89
+ export type BarsValue = "auto" | "expanded" | "minimized";
90
+ /** Device pixel ratio inside the frame, or `system` for the screen's own. */
91
+ export type DprValue = number | "system";
92
+ /**
93
+ * How big the frame is drawn: `fit` for as big as the window allows, up to its
94
+ * own size, or a scale such as 1.25 for 125%. The page inside sees the same
95
+ * viewport and device pixel ratio either way.
96
+ */
97
+ export type ZoomValue = "fit" | number;
98
+ /** A vision deficiency drawn as a filter over the frame, or `none`. */
99
+ export type VisionValue = "none" | "protanopia" | "deuteranopia" | "tritanopia" | "achromatopsia" | "blur";
100
+ /** A color of the user's own, as the knobs keep it: a hex, `#rrggbb` in lower case. */
101
+ export type CustomColor = `#${string}`;
102
+ /** A color grab has a name for. */
103
+ export type GrabColorName = "blue" | "green" | "pink" | "orange" | "purple" | "cyan";
104
+ /**
105
+ * The color grab draws its boxes in. `auto` is blue, and green where the page
106
+ * behind the element is blue. One of the user's own is a hex, `#rrggbb` in
107
+ * lower case.
108
+ */
109
+ export type GrabColorValue = "auto" | GrabColorName | CustomColor;
110
+ /** A color the mat has a name for. */
111
+ export type MatColorName = "blue" | "green" | "magenta" | "purple" | "red" | "graphite";
112
+ /**
113
+ * The color of the cutting mat the frame lies on. One of the user's own is a
114
+ * hex, `#rrggbb` in lower case.
115
+ */
116
+ export type MatColorValue = MatColorName | CustomColor;
117
+ export interface UaValue {
118
+ /**
119
+ * A preset id such as `iphone-safari`, `custom` to use the custom string, or
120
+ * `system` to stop emulating.
121
+ */
122
+ preset: string;
123
+ /** The user agent of the `custom` preset. */
124
+ custom: string;
125
+ }
126
+ /** An edge a box sits flush with and follows when sizes change, or `none`. */
127
+ export type EdgeValue = "top" | "bottom" | "none";
128
+ /** The edge of the window the panel lives on. */
129
+ export type SideValue = "left" | "right";
130
+ export interface PanelValue {
131
+ open: boolean;
132
+ /** The edge of the window the panel and its handle live on. */
133
+ side: SideValue;
134
+ /** Handle offset from the top of the viewport, in px. */
135
+ y: number;
136
+ /** Panel offset from the top of the viewport, in px. */
137
+ top: number;
138
+ /** The edge of the window the panel sits flush with. */
139
+ edge: EdgeValue;
140
+ /** The corner of the panel the handle sits flush with. */
141
+ tab: EdgeValue;
142
+ /**
143
+ * Pinned to its side as a column the window's height, with the page in a
144
+ * frame beside it. `pinned` below is the rows, so this has a name of its own.
145
+ */
146
+ docked: boolean;
147
+ /**
148
+ * Show the handle while the panel is closed, for this tab. The mount's
149
+ * `handle` option and the user's setting can still hide it.
150
+ */
151
+ handle: boolean;
152
+ /**
153
+ * Ids of the rows set from the panel. Each stays in the list, back at its
154
+ * default too, until a hold on its `×` takes it off. Reset all lists the default rows
155
+ * again.
156
+ */
157
+ pinned: string[];
158
+ }
159
+ export interface DevknobsState {
160
+ scheme: SchemeValue;
161
+ motion: MotionValue;
162
+ speed: SpeedValue;
163
+ contrast: ContrastValue;
164
+ transparency: TransparencyValue;
165
+ locale: LocaleValue;
166
+ /** Pseudo-localize the page's text. */
167
+ pseudo: boolean;
168
+ geo: GeoValue;
169
+ timeZone: TimeZoneValue;
170
+ clock: ClockValue;
171
+ network: NetworkValue;
172
+ text: TextValue;
173
+ /** WCAG 1.4.12 text spacing. */
174
+ spacing: boolean;
175
+ width: WidthValue;
176
+ height: HeightValue;
177
+ /** A device preset id, or `none`. Picking one sets the width, height and dpr. */
178
+ device: string;
179
+ /**
180
+ * Follows the width and height. Setting it turns a frame that has both, and
181
+ * holds a device that way.
182
+ */
183
+ orientation: OrientationValue;
184
+ /** How a device that folds stands. Folding it sets the width and height. */
185
+ posture: PostureValue;
186
+ /** Draw a phone's or a tablet's body around its frame. */
187
+ mock: boolean;
188
+ /** On a device with a touch screen, the mouse acts as a finger inside its frame. */
189
+ touchPointer: boolean;
190
+ /** A phone's browser bars around the page, which take their room from the viewport. */
191
+ browser: BrowserValue;
192
+ /** The browser's bars following the page's scroll, or held expanded or minimized. */
193
+ bars: BarsValue;
194
+ /**
195
+ * Safari draws the page under its bars to the bottom of the screen, as the
196
+ * phone looks, where the page reads a taller viewport than Safari reports.
197
+ * Off, the page gets Safari's measured viewport.
198
+ */
199
+ edgeToEdge: boolean;
200
+ /** Render the page in a full-width frame even at full width, for the native scheme. */
201
+ frame: boolean;
202
+ dpr: DprValue;
203
+ zoom: ZoomValue;
204
+ mat: MatColorValue;
205
+ vision: VisionValue;
206
+ ua: UaValue;
207
+ /** Mark the boxes that stick out of the viewport sideways. */
208
+ overflow: boolean;
209
+ outlines: boolean;
210
+ grabColor: GrabColorValue;
211
+ panel: PanelValue;
212
+ }
213
+ /** A partial state update. Object knobs may be patched field by field. */
214
+ export type DevknobsStatePatch = {
215
+ [K in keyof DevknobsState]?: DevknobsState[K] extends object ? Partial<DevknobsState[K]> : DevknobsState[K];
216
+ };
217
+ /** Every knob module applies a value and can put the page back the way it was. */
218
+ export interface Knob<T> {
219
+ apply(value: T): void;
220
+ reset(): void;
221
+ }