@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,44 @@
1
+ import { type BodyRecord } from "./types";
2
+ export declare function isText(type: string): boolean;
3
+ /**
4
+ * `text` as a record, cut to the cap. Only the head of a long text is ever
5
+ * measured, so a body of megabytes costs no more than one of the cap, and its
6
+ * whole size stays unknown.
7
+ *
8
+ * What is kept of a long text is a copy, made by decoding the head's bytes.
9
+ * A `slice` would not do: the engines keep the whole parent string alive
10
+ * behind a slice of it, megabytes for a row's 64 KB.
11
+ */
12
+ export declare function clipText(text: string, type: string, cap?: number): BodyRecord;
13
+ /** Is `value` one of `kind`, where the browser has that kind at all? */
14
+ export declare function is<T>(kind: (new (...args: never[]) => T) | undefined, value: unknown): value is T;
15
+ /**
16
+ * What a script is about to send, read without touching it: text is cut to
17
+ * the cap, a form is listed, bytes are counted, and a stream is only named,
18
+ * since reading it would take it from the request.
19
+ */
20
+ export declare function describeBody(body: unknown, type: string, cap?: number): BodyRecord | null;
21
+ /** A body the log names and never reads, such as a stream or an opaque answer. */
22
+ export declare function unread(kind: "stream" | "opaque" | "binary", size: number | null, type: string): BodyRecord;
23
+ /** What `readText` needs of a request or a response: a copy of it, which nothing else reads. */
24
+ export interface Readable {
25
+ body?: ReadableStream<Uint8Array> | null;
26
+ blob(): Promise<Blob>;
27
+ }
28
+ /** A body read as text, and whether the read reached its end. */
29
+ export interface Read {
30
+ record: BodyRecord;
31
+ complete: boolean;
32
+ }
33
+ /** How long a body is read for, from its headers, before the read is given up, in ms. */
34
+ export declare const READ_MS = 2000;
35
+ /**
36
+ * Read `copy` as text up to the cap, then let the rest go unread. Where the
37
+ * browser gives no stream, the body is taken whole, as the browser holds it
38
+ * already, and only its head is decoded.
39
+ *
40
+ * A copy of a response holds the page's own cancel back until it is cancelled
41
+ * too, so a body that is still coming after `wait` ms is let go, with what
42
+ * came of it by then.
43
+ */
44
+ export declare function readText(copy: Readable, type: string, cap?: number, wait?: number): Promise<Read>;
@@ -0,0 +1,14 @@
1
+ import { type Patch } from "./patch";
2
+ import { type Log } from "./record";
3
+ /**
4
+ * `EventSource`, with each connection a row in the log and the messages it
5
+ * sends kept on it: `message` always, and every other type once the page
6
+ * listens for it, as a script hears no other. The page's object is the
7
+ * browser's own, made by the browser's own class, and a failure in the
8
+ * note-taking never reaches it.
9
+ *
10
+ * The browser connects again after the server closes a stream. Each
11
+ * connection is a row of its own, as each is a request, started once it is
12
+ * open: the browser says nothing of it before.
13
+ */
14
+ export declare function patchEventSource(patches: Patch[], log: Log): void;
@@ -0,0 +1,14 @@
1
+ import { type Log } from "./record";
2
+ import type { HeaderList } from "./types";
3
+ export type Fetch = (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
4
+ /**
5
+ * Headers in any of the shapes `fetch` takes: a `Headers`, a list of pairs, or
6
+ * a plain record. The last two keep their names as the page wrote them.
7
+ */
8
+ export declare function listHeaders(given: unknown): HeaderList;
9
+ /**
10
+ * `fetch`, with each request noted in the log. The page's arguments go to the
11
+ * browser as they came, and what comes back is the browser's own response or
12
+ * the browser's own error. A failure in the note-taking never reaches the page.
13
+ */
14
+ export declare function wrapFetch(native: Fetch, log: Log, wait?: number): Fetch;
@@ -0,0 +1,35 @@
1
+ import { type Clock } from "./record";
2
+ import { type Shared } from "./shared";
3
+ import { type RequestStore, type StoreOptions } from "./store";
4
+ import type { RequestSource } from "./types";
5
+ export type { RequestStore, StoreListener } from "./store";
6
+ export type { BodyRecord, HeaderList, RequestDetail, RequestEntry, RequestKind, RequestPhases, RequestSizes, RequestSource, RequestState, RequestTiming, StreamMessage, } from "./types";
7
+ export { BODY_CAP, MESSAGES_KEPT, RING_SIZE } from "./types";
8
+ /** The real time of this page, on the scale Resource Timing uses. */
9
+ export declare function pageClock(): Clock;
10
+ /** What a recorder is made of. The tests bring their own. */
11
+ export interface RecorderOptions {
12
+ source: RequestSource;
13
+ clock: Clock;
14
+ /** The page's own origin: sizes that read 0 from any other are hidden. */
15
+ origin: string;
16
+ schedule?: StoreOptions["schedule"];
17
+ /** How long an answer's body is read for before the read is given up, in ms. */
18
+ readFor?: number;
19
+ /** The log of the page above the device frame, which this copy sends its rows to. */
20
+ above?(): Shared | null;
21
+ }
22
+ /**
23
+ * Patch the page and start the log. The patches stay the same ones until
24
+ * `uninstall`: whoever finds this recorder on the window uses it as it is.
25
+ */
26
+ export declare function createRecorder(options: RecorderOptions): Shared;
27
+ /**
28
+ * Start recording, unless a copy of devknobs on this page already does: the
29
+ * early script, most often, whose patches and log the full script then uses.
30
+ */
31
+ export declare function start(): void;
32
+ /** Hand `fetch` and `XMLHttpRequest` back and drop the log, whichever copy started it. */
33
+ export declare function stop(): void;
34
+ /** The page's log, for the panel to read. Null while nothing records. */
35
+ export declare function requestLog(): RequestStore | null;
@@ -0,0 +1,17 @@
1
+ /** A function devknobs put in place of the browser's, and what it took the place of. */
2
+ export interface Patch {
3
+ target: object;
4
+ key: string;
5
+ original: unknown;
6
+ value: unknown;
7
+ /** Whether `target` had the function as its own, or took it from its prototype. */
8
+ own: boolean;
9
+ }
10
+ /** Put `make(original)` in place of the function at `key`, and note it in `patches`. */
11
+ export declare function install<T extends object>(patches: Patch[], target: object, key: string, make: (original: T) => T): void;
12
+ /**
13
+ * Put the browser's own back, last patch first. One that the page or another
14
+ * tool has wrapped since stays where it is, so their chain holds: it passes
15
+ * straight through from then on.
16
+ */
17
+ export declare function restore(patches: Patch[]): void;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * The requests devknobs makes for itself, which the log leaves out. Every
3
+ * `fetch` of devknobs' own goes through `quietFetch`, and every address it
4
+ * loads another way is hushed first. This file stays small: it is all the
5
+ * rest of devknobs needs of the log.
6
+ */
7
+ /** `fetch`, for devknobs' own use. The page's `fetch` makes it, so what the page put on `fetch` still runs. */
8
+ export declare function quietFetch(url: string, init?: RequestInit): Promise<Response>;
9
+ /** Devknobs loads `url` by other means than `fetch`, an image say, and may again. */
10
+ export declare function hush(url: string): void;
11
+ /** Devknobs is about to load `url` once, as the device frame loads the page. */
12
+ export declare function hushOnce(url: string): void;
@@ -0,0 +1,40 @@
1
+ import type { RequestStore } from "./store";
2
+ import { type BodyRecord, type HeaderList, type RequestEntry, type RequestKind, type RequestSource, type StreamMessage } from "./types";
3
+ /** The real time a page's requests are stamped with. */
4
+ export interface Clock {
5
+ /** Ms since the page began to load, as Resource Timing counts. */
6
+ now(): number;
7
+ /** When the page began to load, in epoch ms. */
8
+ origin: number;
9
+ }
10
+ /** What a patch knows of a request as it goes out. */
11
+ export interface Started {
12
+ method: string;
13
+ url: string;
14
+ headers: HeaderList;
15
+ body: BodyRecord | null;
16
+ initiator: string;
17
+ /** The referrer policy the script asked for, where it asked for one. */
18
+ referrerPolicy?: string;
19
+ }
20
+ /** What the `fetch` and `XMLHttpRequest` patches write the log through. */
21
+ export interface Log {
22
+ /** False once devknobs let the page go, and while a request of its own goes out. */
23
+ active(): boolean;
24
+ /** A request goes out. Returns its row's id. */
25
+ start(kind: "fetch" | "xhr" | "eventsource", request: Started): string;
26
+ set(id: string, patch: Partial<RequestEntry>): void;
27
+ /** The answer's headers are in. */
28
+ responded(id: string, patch: Partial<RequestEntry>): void;
29
+ /** The request is over, however it went. */
30
+ ended(id: string, patch: Partial<RequestEntry>): void;
31
+ /** An event stream sent a message. Its data is cut to `MESSAGE_CAP` bytes, and the oldest goes past `MESSAGES_KEPT`. */
32
+ message(id: string, message: Omit<StreamMessage, "time" | "truncated">): void;
33
+ }
34
+ /** `url` in full, from the page's own address. One that does not read stays as it is. */
35
+ export declare function absolute(url: string): string;
36
+ /** The header's value in `list`, whatever the case of its name, or empty. */
37
+ export declare function headerOf(list: HeaderList, name: string): string;
38
+ /** A row with nothing known but when it started. */
39
+ export declare function blank(id: string, kind: RequestKind, source: RequestSource, clock: Clock, at: number): RequestEntry;
40
+ export declare function createLog(store: RequestStore, clock: Clock, source: RequestSource, active: () => boolean): Log;
@@ -0,0 +1,28 @@
1
+ import { type Clock } from "./record";
2
+ import type { RequestEntry, RequestPhases, RequestSizes, RequestSource } from "./types";
3
+ /**
4
+ * How far before the browser's own start of a request the patch may have
5
+ * noted it, in ms: the time the call takes to reach the network.
6
+ */
7
+ export declare const MATCH_BEFORE = 250;
8
+ /** How far after, in ms: the two clocks round apart. */
9
+ export declare const MATCH_AFTER = 5;
10
+ /**
11
+ * The sizes of a timing entry. A server on another origin that does not allow
12
+ * timing has all three read 0: those are hidden, not empty.
13
+ */
14
+ export declare function sizesOf(entry: PerformanceEntry, origin: string): RequestSizes;
15
+ /** The phases of a timing entry, as Resource Timing gives them. */
16
+ export declare function phasesOf(entry: PerformanceEntry): RequestPhases;
17
+ /** A row for something the page loaded on its own, from the browser's timing of it. */
18
+ export declare function lightEntry(entry: PerformanceEntry, id: string, source: RequestSource, clock: Clock, origin: string): RequestEntry;
19
+ /**
20
+ * The full row the browser timed with `entry`, if any: the same address, made
21
+ * by the same api, noted just before the browser started it, and not timed
22
+ * yet. With several, the nearest in time. An `EventSource` that connects again
23
+ * is noted only once it is open, a round trip after the browser started it, so
24
+ * its row may start anywhere up to the end of the entry.
25
+ */
26
+ export declare function matchFull(rows: readonly RequestEntry[], entry: PerformanceEntry, source: RequestSource): RequestEntry | null;
27
+ /** What the browser's timing adds to the full row it belongs to. */
28
+ export declare function mergeTiming(row: RequestEntry, entry: PerformanceEntry, origin: string): Partial<RequestEntry>;
@@ -0,0 +1,34 @@
1
+ import type { RequestStore } from "./store";
2
+ import type { RequestEntry } from "./types";
3
+ /** The shape of what the copies of devknobs on a page share. A copy that finds another starts over. */
4
+ export declare const SHARED_VERSION = 2;
5
+ /**
6
+ * The one recorder on a page. The early script and the full one are two
7
+ * copies of this code, and the first to run patches the page and leaves the
8
+ * recorder here, on the window. The second finds it and patches nothing. The
9
+ * copy in the device frame reaches the page's log through it too.
10
+ */
11
+ export interface Shared {
12
+ version: typeof SHARED_VERSION;
13
+ store: RequestStore;
14
+ /** Run `request`, which asks for `url`, and keep it out of the log. */
15
+ quietly<T>(url: string, request: () => T): T;
16
+ /** Keep what loads from `url` out of the log: always, or the next load only. */
17
+ hush(url: string, once: boolean): void;
18
+ /** Take in rows of the copy in the device frame, marked as the frame's. */
19
+ adopt(rows: readonly RequestEntry[]): void;
20
+ /** Hand the page back to the browser and drop the log. */
21
+ uninstall(): void;
22
+ }
23
+ /**
24
+ * The mark on the init of a `fetch` of devknobs' own, which the log leaves
25
+ * out. It is on the one call, so it still tells where a wrapper the page put
26
+ * over `fetch` waits before it passes the call on. The browser reads only
27
+ * the fields it knows of an init, so the mark means nothing to it.
28
+ */
29
+ export declare const QUIET: unique symbol;
30
+ /** The recorder on `scope`, this window unless told. Null where there is none, or none to read. */
31
+ export declare function shared(scope?: object): Shared | null;
32
+ export declare function share(recorder: Shared | null): void;
33
+ /** Let a recorder of another version go, so this copy can start its own. */
34
+ export declare function evict(): void;
@@ -0,0 +1,7 @@
1
+ /** How many frames of the caller's stack a row keeps. */
2
+ export declare const STACK_FRAMES = 12;
3
+ /**
4
+ * The stack of the call that made a request, less the first `skip` frames,
5
+ * which are devknobs' own. Kept as the engine wrote it, a frame a line.
6
+ */
7
+ export declare function trimStack(stack: unknown, skip: number): string;
@@ -0,0 +1,37 @@
1
+ import { type RequestEntry } from "./types";
2
+ /** How long changes gather before the listeners hear of them, in ms. */
3
+ export declare const BATCH_MS = 50;
4
+ /** Hears the rows added or changed since it last heard. None after a clear. */
5
+ export type StoreListener = (changed: readonly RequestEntry[]) => void;
6
+ export interface RequestStore {
7
+ /** The rows, oldest start first. */
8
+ entries(): readonly RequestEntry[];
9
+ get(id: string): RequestEntry | undefined;
10
+ /** An id no other row has, the rows of the frame's store included. */
11
+ nextId(): string;
12
+ /** Add a row, or put it in place of the one with its id. */
13
+ put(entry: RequestEntry): void;
14
+ /** Change a row that is still in the log. */
15
+ update(id: string, patch: Partial<RequestEntry>): void;
16
+ clear(): void;
17
+ subscribe(listener: StoreListener): () => void;
18
+ /** Tell the listeners now what the batch holds. */
19
+ flush(): void;
20
+ /** Empty the log for good and let every listener go. */
21
+ close(): void;
22
+ }
23
+ export interface StoreOptions {
24
+ /** What every id of this store starts with. Each store on a page has its own. */
25
+ seed: string;
26
+ /** The real time, in epoch ms. */
27
+ now(): number;
28
+ /** Run `flush` a moment later. Returns the way to call that off. */
29
+ schedule?(flush: () => void): () => void;
30
+ }
31
+ /**
32
+ * The log: the last `RING_SIZE` requests, in the order they started. A change
33
+ * swaps the row for a new object, so a listener can tell a changed row by
34
+ * identity. Listeners hear of a burst of changes once, and with none of them
35
+ * nothing is gathered at all.
36
+ */
37
+ export declare function createStore(options: StoreOptions): RequestStore;
@@ -0,0 +1,140 @@
1
+ /** How many requests the log keeps. The oldest goes as one more comes in. */
2
+ export declare const RING_SIZE = 300;
3
+ /** How much of a body the log keeps, in bytes. What the panel shows of it is its own matter. */
4
+ export declare const BODY_CAP: number;
5
+ /** How many messages of an event stream the log keeps. The oldest goes as one more comes in. */
6
+ export declare const MESSAGES_KEPT = 200;
7
+ /** How much of a message's data the log keeps, in bytes. */
8
+ export declare const MESSAGE_CAP: number;
9
+ /** Who made the request: a script, through `fetch`, `XMLHttpRequest` or `EventSource`, or the page as it loaded. */
10
+ export type RequestKind = "fetch" | "xhr" | "eventsource" | "resource" | "navigation";
11
+ /**
12
+ * How much the log knows. A script's request is seen whole. What the page
13
+ * loads on its own is only known from the browser's timings: no headers, no
14
+ * bodies.
15
+ */
16
+ export type RequestDetail = "full" | "light";
17
+ /** `failed` is a request that never got an answer, or one answered 400 or above. */
18
+ export type RequestState = "pending" | "ok" | "failed" | "aborted";
19
+ /** The page itself, or its copy in the device frame. */
20
+ export type RequestSource = "top" | "frame";
21
+ /** Headers in the order they were read, names as the browser hands them back. */
22
+ export type HeaderList = [name: string, value: string][];
23
+ /** What the log keeps of a body: a capped preview where it is text, else what it is and how big. */
24
+ export interface BodyRecord {
25
+ /**
26
+ * `text` holds a preview, `form` a line per field, and the rest hold no
27
+ * content: `binary` is bytes, `stream` is a body the page streams, which is
28
+ * never read, and `opaque` is an answer the browser hides from scripts.
29
+ */
30
+ kind: "text" | "form" | "binary" | "stream" | "opaque";
31
+ /** The preview, at most `BODY_CAP` bytes of it. */
32
+ text: string;
33
+ /** The whole body in bytes, or null where finding out would mean reading it all. */
34
+ size: number | null;
35
+ /** There is more body than `text` holds. */
36
+ truncated: boolean;
37
+ /** The body was still coming when the read was given up, so `text` was cut by time and not at the cap. */
38
+ timedOut?: boolean;
39
+ /** The content type, or the kind of object a script sent, such as `ArrayBuffer`. */
40
+ type: string;
41
+ }
42
+ /** The sizes Resource Timing gives, in bytes. */
43
+ export interface RequestSizes {
44
+ transfer: number;
45
+ encoded: number;
46
+ decoded: number;
47
+ /** A server on another origin kept the sizes to itself: they read 0, and are not. */
48
+ hidden: boolean;
49
+ }
50
+ /** When the request ran, in real time, whatever the clock knob says. */
51
+ export interface RequestTiming {
52
+ /** When it started, in epoch ms. */
53
+ start: number;
54
+ /** The same instant in ms since its page began to load, as Resource Timing counts. */
55
+ at: number;
56
+ /** From the start to the answer's headers, in ms, or null before them. */
57
+ response: number | null;
58
+ /** When the body was all in, in epoch ms, or null while that is unknown. */
59
+ end: number | null;
60
+ /** From the start to the end, in ms. */
61
+ duration: number | null;
62
+ }
63
+ /**
64
+ * The phases of a request as Resource Timing gives them, each in ms since
65
+ * its page began to load, as `RequestTiming.at` counts. A phase the browser
66
+ * keeps to itself, as for a server on another origin that sends no
67
+ * `Timing-Allow-Origin`, or a connection used again, reads 0.
68
+ */
69
+ export interface RequestPhases {
70
+ startTime: number;
71
+ workerStart: number;
72
+ redirectStart: number;
73
+ redirectEnd: number;
74
+ fetchStart: number;
75
+ domainLookupStart: number;
76
+ domainLookupEnd: number;
77
+ connectStart: number;
78
+ secureConnectionStart: number;
79
+ connectEnd: number;
80
+ requestStart: number;
81
+ responseStart: number;
82
+ responseEnd: number;
83
+ }
84
+ /** One message of an event stream, as the page heard it. */
85
+ export interface StreamMessage {
86
+ /** The event's type: `message` unless the server named another. */
87
+ type: string;
88
+ /** Its data, at most `MESSAGE_CAP` bytes of it. */
89
+ data: string;
90
+ /** Whether the data was cut to the cap. */
91
+ truncated: boolean;
92
+ /** The last event id, or empty. */
93
+ id: string;
94
+ /** When it came, in epoch ms. */
95
+ time: number;
96
+ }
97
+ /** One request in the log. Plain data: it can be copied, posted and printed as it is. */
98
+ export interface RequestEntry {
99
+ /** Unlike any other in the log, the frame's included. */
100
+ id: string;
101
+ kind: RequestKind;
102
+ detail: RequestDetail;
103
+ source: RequestSource;
104
+ /** In upper case. Empty on a light row, where the browser does not say. */
105
+ method: string;
106
+ /** The address asked for, in full. */
107
+ url: string;
108
+ /** Where the answer came from, after redirects, or null where that is unknown. */
109
+ finalUrl: string | null;
110
+ redirected: boolean;
111
+ state: RequestState;
112
+ /** The answer's status. 0 on an opaque answer, null with no answer or where the browser does not say. */
113
+ status: number | null;
114
+ statusText: string;
115
+ /** Why it failed, where it never got an answer. */
116
+ error: string | null;
117
+ /** As the script set them. No value is hidden here: what to show is the panel's call. */
118
+ requestHeaders: HeaderList;
119
+ /** The ones the browser lets a script read. */
120
+ responseHeaders: HeaderList;
121
+ requestBody: BodyRecord | null;
122
+ responseBody: BodyRecord | null;
123
+ /** The answer's content type, or empty. */
124
+ contentType: string;
125
+ /** From Resource Timing, or null where the browser has given none yet. */
126
+ sizes: RequestSizes | null;
127
+ timing: RequestTiming;
128
+ /** From Resource Timing, or null where the browser has given none, as while the request runs. */
129
+ phases: RequestPhases | null;
130
+ /** What an event stream the log reads has sent so far, the last `MESSAGES_KEPT` of it. */
131
+ messages: StreamMessage[];
132
+ /** The call that made the request: stack frames, one a line. Empty on a light row. */
133
+ initiator: string;
134
+ /** What Resource Timing says loaded it, such as `img` or `css`. Empty on a full row it has not reached. */
135
+ initiatorType: string;
136
+ /** The protocol the browser spoke, such as `h2`, or empty. */
137
+ protocol: string;
138
+ /** The referrer policy the script asked for, such as `no-referrer`, or empty where it asked for none. */
139
+ referrerPolicy: string;
140
+ }
@@ -0,0 +1,16 @@
1
+ import { type Patch } from "./patch";
2
+ import { type Log } from "./record";
3
+ import { type HeaderList } from "./types";
4
+ /**
5
+ * The most bytes of a `json` answer the log turns back into text. A bigger
6
+ * one would stall the page for a preview, so it is only counted.
7
+ */
8
+ export declare const JSON_LIMIT: number;
9
+ /** `getAllResponseHeaders()` as a list. */
10
+ export declare function parseHeaders(raw: string): HeaderList;
11
+ /**
12
+ * Note every `XMLHttpRequest` in the log. The three methods are patched on
13
+ * the prototype and the rest is heard through events, so the constructor is
14
+ * the browser's own: `instanceof` and subclasses work as before.
15
+ */
16
+ export declare function patchXhr(patches: Patch[], log: Log): void;
@@ -0,0 +1,32 @@
1
+ import { type Site } from "./site";
2
+ /**
3
+ * Cache Storage, read only: the caches' names, and for a cache its requests
4
+ * with what the response's headers say. No body is read.
5
+ */
6
+ /** How many requests of a cache are read at a time. */
7
+ export declare const CACHE_PAGE = 100;
8
+ export interface CacheList {
9
+ names: string[];
10
+ error: string | null;
11
+ }
12
+ export interface CacheEntry {
13
+ method: string;
14
+ url: string;
15
+ /** The response's status, null where it is gone since the list was read. */
16
+ status: number | null;
17
+ type: string;
18
+ /** The response's size in bytes, where `content-length` says. */
19
+ size: number | null;
20
+ }
21
+ export interface CacheRead {
22
+ /** How many requests the cache holds in all. */
23
+ total: number;
24
+ entries: CacheEntry[];
25
+ error: string | null;
26
+ }
27
+ /** The caches of the origin, where the page is secure and has them. */
28
+ export declare function listCaches(site: Site): Promise<CacheList>;
29
+ /** `limit` requests of a cache from the `offset`th on, each with its response's status, type and size. */
30
+ export declare function readCache(site: Site, name: string, offset: number, limit?: number): Promise<CacheRead>;
31
+ /** Delete a whole cache. Says whether it went. */
32
+ export declare function deleteCache(site: Site, name: string): Promise<boolean>;
@@ -0,0 +1,35 @@
1
+ import type { Site } from "./site";
2
+ /**
3
+ * Clear site data: everything of the page's that page script can remove, in
4
+ * one go. What it cannot remove is counted and said, never hidden.
5
+ */
6
+ /** How many of each kind there are, or went. */
7
+ export interface SiteCounts {
8
+ local: number;
9
+ session: number;
10
+ cookies: number;
11
+ databases: number;
12
+ caches: number;
13
+ }
14
+ /** What is there to clear. devknobs' own items count only where `own` says they go too. */
15
+ export declare function countSite(site: Site, own: boolean): Promise<SiteCounts>;
16
+ /** Counts as they are said: `12 local, 3 session, 5 cookies, 2 databases, 1 cache`. Kinds with none are left out. */
17
+ export declare function countsText(counts: SiteCounts): string;
18
+ /** What a clear did, and what it could not. */
19
+ export interface ClearReport {
20
+ removed: SiteCounts;
21
+ /** Cookies the page still reads: set on another path, or not the page's to remove. */
22
+ cookiesLeft: number;
23
+ /** Databases the page holds open, which go once it lets go. */
24
+ blocked: string[];
25
+ /** Everything else that went wrong, a line each. */
26
+ errors: string[];
27
+ }
28
+ /**
29
+ * Remove the page's items in both storages, every cookie the page can
30
+ * delete, every database and every cache. devknobs' own items stay unless
31
+ * `own` says they go too.
32
+ */
33
+ export declare function clearSite(site: Site, own: boolean, ms?: number): Promise<ClearReport>;
34
+ /** What a clear came to, a line each: what went first, then what could not. */
35
+ export declare function reportLines(report: ClearReport): string[];
@@ -0,0 +1,71 @@
1
+ import { type Site } from "./site";
2
+ /**
3
+ * The cookies a page can read: what `document.cookie` gives, with the path,
4
+ * domain and expiry where the browser's cookie store tells them. A cookie
5
+ * marked HttpOnly is in neither, so it is never here. Writes go through
6
+ * `document.cookie`, and each is checked by reading back, as the browser
7
+ * says nothing when it refuses one.
8
+ */
9
+ /** What the cookies page always says where its list ends. */
10
+ export declare const HTTP_ONLY_NOTE = "cookies marked HttpOnly are not shown: a page cannot read them";
11
+ /** One cookie. A field the browser does not tell is null. */
12
+ export interface Cookie {
13
+ name: string;
14
+ value: string;
15
+ domain: string | null;
16
+ path: string | null;
17
+ /** When it expires, in epoch ms. Null for a session cookie, or where it is not told. */
18
+ expires: number | null;
19
+ secure: boolean | null;
20
+ sameSite: string | null;
21
+ /** The weight of its name and value in bytes. */
22
+ size: number;
23
+ /** Whether the cookie store told its path, so a write lands on it for sure. */
24
+ placed: boolean;
25
+ }
26
+ export interface CookieRead {
27
+ cookies: Cookie[];
28
+ error: string | null;
29
+ }
30
+ /** The names and values in a `document.cookie` text, in its order. */
31
+ export declare function parseCookies(text: string): {
32
+ name: string;
33
+ value: string;
34
+ }[];
35
+ /** The cookies as `document.cookie` alone gives them: names and values. */
36
+ export declare function readPlain(site: Site): CookieRead;
37
+ /**
38
+ * The cookies, with the fields the cookie store knows where there is one. A
39
+ * store that fails, as in a page that is not secure, leaves the plain read.
40
+ */
41
+ export declare function readCookies(site: Site): Promise<CookieRead>;
42
+ /** Whether two reads hold the same cookies, so the view draws nothing again. */
43
+ export declare function sameCookies(a: readonly Cookie[], b: readonly Cookie[]): boolean;
44
+ /**
45
+ * The paths a cookie this page reads may be set on: the page's own path and
46
+ * each folder above it, down to `/`.
47
+ */
48
+ export declare function pathsOf(pathname: string): string[];
49
+ /**
50
+ * The domains a cookie this page reads may be set on: the host, and each
51
+ * parent of it that has a dot. An address by number, or a host of one label,
52
+ * has only itself.
53
+ */
54
+ export declare function domainsOf(hostname: string): string[];
55
+ /**
56
+ * Delete a cookie by expiring it at each place it may sit, until the page
57
+ * reads one less of its name. Says whether it went: one set on a path this
58
+ * page is not under, or marked HttpOnly since, does not.
59
+ */
60
+ export declare function deleteCookie(site: Site, cookie: Cookie): boolean;
61
+ /**
62
+ * Give a cookie a new value where it sits, keeping what is known of it. With
63
+ * the place not known, each is tried: a write that made a second cookie of
64
+ * the name in place of changing this one is taken back. Says whether the
65
+ * page now reads the new value.
66
+ */
67
+ export declare function setCookie(site: Site, cookie: Cookie, value: string, now?: number): boolean;
68
+ /** A new cookie for the whole site, kept for the session. Says whether the page reads it. */
69
+ export declare function addCookie(site: Site, name: string, value: string): boolean;
70
+ /** The cookies a filter leaves: those whose name or value has the text, in any case. */
71
+ export declare function filterCookies(cookies: readonly Cookie[], query: string): Cookie[];
@@ -0,0 +1,53 @@
1
+ /**
2
+ * How the storage view words what it reads: sizes, one-line previews, json
3
+ * laid out only where that loses nothing, and the values a database holds.
4
+ * Everything here cuts before it works, so a huge value never holds the page.
5
+ */
6
+ /** The most of one value the view draws at once, in characters. */
7
+ export declare const RENDER_LIMIT = 100000;
8
+ /** The most of one value "show all" draws. Past it, a value can only be copied. */
9
+ export declare const SHOW_ALL_LIMIT = 1000000;
10
+ /** How long a one-line preview is at most, in characters. */
11
+ export declare const PREVIEW_LENGTH = 96;
12
+ /** How many bytes a text takes as UTF-8, as the browser counts a stored value's weight. */
13
+ export declare function byteSize(text: string): number;
14
+ /** A size as it is said: `12 B`, `3.4 KB`, `1.2 MB`. */
15
+ export declare function sizeLabel(bytes: number): string;
16
+ /**
17
+ * A value on one line, cut in the middle where it is long, so both its start
18
+ * and its end show. Only the ends of a long value are read.
19
+ */
20
+ export declare function preview(text: string, max?: number): string;
21
+ /**
22
+ * A json object or array laid out over lines, or null where the text is to be
23
+ * shown as it is. It is laid out only where that loses nothing: the text,
24
+ * less its white space, is exactly what the parsed value writes back. So a
25
+ * number too long for a double, a key said twice, or keys the engine would
26
+ * reorder all stay raw. A value past `RENDER_LIMIT` is never parsed.
27
+ */
28
+ export declare function pretty(text: string): string | null;
29
+ /** Whether a text reads as json at all, an object, an array or a plain value. */
30
+ export declare function isJson(text: string): boolean;
31
+ /** Whether a text looks meant as a json object or array, by how it starts. */
32
+ export declare function looksJson(text: string): boolean;
33
+ /** What of a value the view draws, and how much it left out. */
34
+ export interface Shown {
35
+ text: string;
36
+ /** Characters past the cut, 0 where all of it shows. */
37
+ more: number;
38
+ /** False past `SHOW_ALL_LIMIT`, where the rest can only be copied. */
39
+ canShowAll: boolean;
40
+ }
41
+ /** A value cut to what the view draws at once, or with `all` to what it draws at most. */
42
+ export declare function shown(text: string, all?: boolean): Shown;
43
+ /** How far a time is from now, in its largest whole unit: `in 3 days`, `2 hours ago`. */
44
+ export declare function relative(at: number, now: number): string;
45
+ /** How much of a database's value is written out before it is cut. */
46
+ export declare const DESCRIBE_LIMIT = 20000;
47
+ /**
48
+ * A value a database holds, as text that reads like json: dates, blobs,
49
+ * bytes, maps and sets by what they are. A value that holds itself is cut at
50
+ * the loop, and a huge one once `limit` characters are written. With `indent`
51
+ * it goes over lines.
52
+ */
53
+ export declare function describe(value: unknown, indent?: boolean, limit?: number): string;