@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,81 @@
1
+ import type { MatColorValue } from "../types";
2
+ import type { Point } from "./mat";
3
+ import type { Rect } from "./mock";
4
+ /**
5
+ * A new mat color splashes out from behind the device: a layer of the mat in
6
+ * the new color over the old, revealed by a blob that grows from the middle of
7
+ * the screen until it covers the letterbox, then the new color is the mat's
8
+ * own and the layer goes. Each blob is drawn from its own seed, so no two
9
+ * splashes look the same.
10
+ */
11
+ /** How long a splash takes to cover the letterbox, in ms. */
12
+ export declare const SPLASH_TIME = 1200;
13
+ /** One wave on a rim: how many times it goes round, how far out it reaches as a share of the radius, where it starts, and how far it drifts by the end, in radians. */
14
+ export interface Wave {
15
+ k: number;
16
+ amp: number;
17
+ phase: number;
18
+ drift: number;
19
+ }
20
+ /**
21
+ * A smaller blob that flies out ahead of the main one and is swallowed by it:
22
+ * the direction it flies in, how far out it starts and ends as a share of the
23
+ * main radius, its own size as a share, and its own rim.
24
+ */
25
+ export interface Drop {
26
+ angle: number;
27
+ from: number;
28
+ to: number;
29
+ size: number;
30
+ waves: Wave[];
31
+ }
32
+ /** The shape of one splash: the main blob's rim and its drops. */
33
+ export interface Splash {
34
+ waves: Wave[];
35
+ drops: Drop[];
36
+ }
37
+ /** Where a splash starts and how big its main blob is at the end, in px in the letterbox. */
38
+ export interface Plan {
39
+ x: number;
40
+ y: number;
41
+ radius: number;
42
+ }
43
+ /** A closed curve as cubic segments: each a start, two control points and an end. */
44
+ export type Segment = readonly [Point, Point, Point, Point];
45
+ /** Numbers from 0 to 1 that only `seed` decides (mulberry32). */
46
+ export declare function seeded(seed: number): () => number;
47
+ /** The shape of a splash from `seed`: a main blob with four waves on its rim, and two to four drops. */
48
+ export declare function splashOf(seed: number): Splash;
49
+ /**
50
+ * Where a splash starts, the middle of `screen`, and how big its main blob
51
+ * ends, so that even where its rim dips in it is past every corner of a
52
+ * letterbox `size` px, by `MARGIN`.
53
+ */
54
+ export declare function planOf(splash: Splash, screen: Rect, size: {
55
+ width: number;
56
+ height: number;
57
+ }): Plan;
58
+ /** A smooth closed curve through `points`, as a Catmull-Rom spline in cubic segments. */
59
+ export declare function segments(points: Point[]): Segment[];
60
+ /**
61
+ * The rims of a splash `time` of the way through, 0 to 1: the main blob first,
62
+ * grown on the splash's curve, then its drops, which fly out ahead of it and fall
63
+ * back into it as it catches up. All go round the same way, so they add up.
64
+ */
65
+ export declare function rimsAt(splash: Splash, plan: Plan, time: number): Point[][];
66
+ /** The rims as css path data, each a closed smooth curve. */
67
+ export declare function pathOf(rims: Point[][]): string;
68
+ /** What a splash needs of the frame: the mat's paint and its lines, and where the screen is. */
69
+ export interface MatScene {
70
+ letterbox: HTMLElement;
71
+ back: HTMLElement;
72
+ paper: SVGSVGElement | null;
73
+ screen: () => Rect;
74
+ }
75
+ /**
76
+ * Give the mat `mat` as its color: at once on the first paint, with less
77
+ * motion, and while a device moves, or else splashed out from the screen.
78
+ */
79
+ export declare function spreadMat(scene: MatScene, mat: MatColorValue): void;
80
+ /** Land every splash at once: the mat takes the letterbox's color, and no layer or frame is left. */
81
+ export declare function landSplash(): void;
@@ -0,0 +1,55 @@
1
+ import type { ContrastValue, MotionValue, SchemeValue, TransparencyValue } from "../types";
2
+ export type MediaFeature = "prefers-color-scheme" | "prefers-reduced-motion" | "prefers-contrast" | "prefers-reduced-transparency" | "pointer" | "any-pointer" | "hover" | "any-hover";
3
+ export interface MediaValue {
4
+ scheme: SchemeValue;
5
+ motion: MotionValue;
6
+ contrast: ContrastValue;
7
+ transparency: TransparencyValue;
8
+ /** A device's touch screen, and no mouse. */
9
+ touch: boolean;
10
+ }
11
+ export declare const SYSTEM_MEDIA: MediaValue;
12
+ /** Does the emulated value satisfy the value asked for in the query? */
13
+ export declare function featureMatches(queryValue: string | undefined, emulated: string): boolean;
14
+ /** Split a media query list on top-level commas. */
15
+ export declare function splitQueryList(text: string): string[];
16
+ /**
17
+ * Rewrite a media query list so that `feature` reads as `value`. Returns the
18
+ * text untouched when the value is `system` or the feature is not mentioned.
19
+ */
20
+ export declare function rewriteMediaText(text: string, feature: MediaFeature, value: string): string;
21
+ /** Rewrite for every emulated feature at once. */
22
+ export declare function rewriteAll(text: string, value: MediaValue): string;
23
+ export declare function mentionsFeature(text: string): boolean;
24
+ type MediaBearingRule = CSSRule & {
25
+ media: MediaList;
26
+ };
27
+ /**
28
+ * A rule's media text as the page wrote it, whatever the prefers knobs or text
29
+ * size made of it since. The rewritten text is what the browser matches, and
30
+ * this is what the styles pane shows.
31
+ */
32
+ export declare function authoredQuery(rule: MediaBearingRule): string;
33
+ /**
34
+ * Make another window on this origin's `matchMedia` answer as a touch screen
35
+ * with no mouse, from the page above its frame before the window's own
36
+ * scripts run. A copy of devknobs there layers its own patch over this one.
37
+ * The window keeps it until its next load.
38
+ */
39
+ export declare function coarse(view: Window): void;
40
+ export declare function apply(value: MediaValue): void;
41
+ export declare function reset(): void;
42
+ /**
43
+ * Put `matchMedia` and `matches` back and stop watching for new stylesheets.
44
+ * The lists stay tracked and keep their guards, which only note what the page
45
+ * hears while nothing is emulated, so the next mount tells each where it stands.
46
+ * A list the page has not listened to yet gets its guard now, while it can
47
+ * still be first.
48
+ */
49
+ export declare function destroy(): void;
50
+ /**
51
+ * The early script's whole job: patch right away, before any page script reads
52
+ * a media query, and leave the patches for the full script to take over.
53
+ */
54
+ export declare function early(value: MediaValue): void;
55
+ export {};
@@ -0,0 +1,65 @@
1
+ import type { OrientationValue } from "../types";
2
+ /** A length on each side of a box, in css px of the screen. */
3
+ export interface Sides {
4
+ top: number;
5
+ right: number;
6
+ bottom: number;
7
+ left: number;
8
+ }
9
+ export interface Rect {
10
+ x: number;
11
+ y: number;
12
+ width: number;
13
+ height: number;
14
+ }
15
+ /**
16
+ * A corner radius, or one for each corner where they differ: top left, top
17
+ * right, bottom right, bottom left.
18
+ */
19
+ export type Radius = number | readonly [number, number, number, number];
20
+ /**
21
+ * A shape on the body: a button on its edge, drawn under it, the island or a
22
+ * punch hole, a receiver slot, a camera lens, or a home button and its key.
23
+ */
24
+ export interface Part extends Rect {
25
+ kind: "button" | "sensor" | "slot" | "lens" | "home" | "key";
26
+ radius: number;
27
+ }
28
+ /**
29
+ * A picture of the whole body, in the mock: where it goes, how big it is
30
+ * drawn, and for an upright one turned with the device, how wide the upright
31
+ * mock is.
32
+ */
33
+ export interface MockImage extends Rect {
34
+ file: string;
35
+ turn: number | null;
36
+ }
37
+ /** A device's body around its screen, in css px of the screen. */
38
+ export interface Mock {
39
+ /** The whole mock, buttons included. */
40
+ width: number;
41
+ height: number;
42
+ /** Where the screen sits in the mock: the room the mock takes on each side of it. */
43
+ inset: Sides;
44
+ /** The body, in the mock. */
45
+ body: Rect;
46
+ screenRadius: Radius;
47
+ bodyRadius: Radius;
48
+ parts: Part[];
49
+ /** The body as a picture, which then has every part in it, in place of the drawn one. */
50
+ image?: MockImage;
51
+ }
52
+ export declare function turnSides(sides: Sides, clockwise?: boolean): Sides;
53
+ /** The corners after the same turn: the top right one comes to the top left, or the bottom left one, clockwise. */
54
+ export declare function turnRadius(radius: Radius, clockwise?: boolean): Radius;
55
+ /**
56
+ * A mock drawn in the room another one takes, its screen where that one has
57
+ * it, so the frame stays put when one takes the other's place.
58
+ */
59
+ export declare function placeIn(mock: Mock, room: Mock): Mock;
60
+ /**
61
+ * The mock of a device, or a foldable's screen, held one way, or null for one
62
+ * that has none. A turn puts the top of the phone on the left, island and all,
63
+ * or on the right for one that turns clockwise.
64
+ */
65
+ export declare function mockOf(id: string, orientation: OrientationValue): Mock | null;
@@ -0,0 +1,42 @@
1
+ import type { Radius, Rect, Sides } from "./mock";
2
+ /**
3
+ * A shape on the front, relative to the screen's top left in portrait: the
4
+ * island or a punch hole over the screen, a receiver slot, a camera lens or a
5
+ * home button on the bezel. Its ends are fully round.
6
+ */
7
+ export interface Front extends Rect {
8
+ kind: "sensor" | "slot" | "lens" | "home";
9
+ /** A home button's key inside its ring. */
10
+ key?: number;
11
+ }
12
+ /** A button on the body's edge, `at` px from its top, or from its left on the top edge. */
13
+ export interface Button {
14
+ side: "left" | "right" | "top";
15
+ at: number;
16
+ length: number;
17
+ /** How far it stands out of the band, when not the device's own. */
18
+ out?: number;
19
+ }
20
+ /** One device's body around its screen, held upright, in css px of the screen. */
21
+ export interface Body {
22
+ bezel: Sides;
23
+ screenRadius: Radius;
24
+ bodyRadius: Radius;
25
+ /** How far its buttons stand out of the band. */
26
+ out: number;
27
+ front: Front[];
28
+ buttons: Button[];
29
+ }
30
+ /**
31
+ * The front of each phone and tablet, from Apple's dimensional drawings, the
32
+ * AOSP display config and measured window insets. Android bodies have no
33
+ * drawing: their body radius and buttons are estimates. The iPhone 16 Plus,
34
+ * 17, Air, 18 and Duo are measured from Apple's product bezel images, at 3
35
+ * image px per css px: the bezel, the island or camera hole, and the buttons
36
+ * that stand out. Their body radius is an estimate, the screen's radius and
37
+ * the bezel, and Camera Control is left out where it sits flush. The Pixels
38
+ * but the 9 are measured the same way from Google's emulator frames, at their
39
+ * own density: the bezel, the corner, the punch hole and the right side's
40
+ * buttons, with the body radius an estimate as on the iPhones.
41
+ */
42
+ export declare const BODIES: Record<string, Body>;
@@ -0,0 +1,21 @@
1
+ import type { Mock, Radius } from "./mock";
2
+ /**
3
+ * How far black runs past the screen's edge under a picture of the body, in
4
+ * css px of the screen. The picture's opening and the screen share an edge,
5
+ * and where it falls between device pixels both are drawn part way, so the
6
+ * mat would show through as a light line. The rim of the body there is black.
7
+ */
8
+ export declare const UNDER = 2;
9
+ /** A device's body over the frame, drawn by `drawMock`, in the letterbox's shadow root. */
10
+ export declare const MOCK_CSS = "\n/* Clips the frame to the screen's corners in a mock, in the body's color so\n no blue shows at the seam. */\n.glass.mocked {\n position: absolute;\n overflow: hidden;\n background: #111112;\n}\n/* Over the frame, and never in the way of a pointer. */\n.mock {\n position: absolute;\n top: 0;\n left: 0;\n overflow: visible;\n pointer-events: none;\n}\n.mock .band { fill: #48484a; fill-rule: evenodd; }\n.mock .body { fill: #111112; fill-rule: evenodd; }\n.mock .button { fill: #48484a; }\n.mock .sensor { fill: #000; }\n.mock .slot { fill: #2a2a2c; }\n.mock .lens { fill: #000; stroke: #2a2a2c; stroke-width: 1; }\n.mock .home { fill: #2a2a2c; }\n.mock .key { fill: #111112; }";
11
+ /** The radius of each corner, from the top left round by the right, `by` added to each. */
12
+ export declare function corners(radius: Radius, by?: number): [number, number, number, number];
13
+ /**
14
+ * The device's body, in css px of the frame: the buttons under it, the band,
15
+ * the front glass inside it with the screen cut out, and the island, holes,
16
+ * lens, slot and home button on top.
17
+ */
18
+ export declare function drawMock(mock: Mock, screenSize: {
19
+ width: number;
20
+ height: number;
21
+ }, href: string | null): SVGSVGElement;
@@ -0,0 +1,214 @@
1
+ import type { DevknobsState } from "../types";
2
+ import { type Framing } from "./frame";
3
+ import type { Rect } from "./mock";
4
+ /**
5
+ * The move from one device to another: the page fades out, the corners of the
6
+ * mat's opening round, the mat closes in from the window's edges to the new
7
+ * screen, and the case and the page fade in. A device that turns stays in view
8
+ * and turns as one, and a foldable folds in view, as fold.ts lays it out.
9
+ * Everything here is pure: the plan, the curves and the shapes. The frame
10
+ * runs it.
11
+ */
12
+ /** How long each part takes, in ms, and how long the page in the frame may keep the fade in waiting. */
13
+ export declare const MORPH_TIME: {
14
+ /** The page, or the case and the page in it, fade out. */
15
+ readonly out: 140;
16
+ /** The mat's opening goes from one screen to the next. */
17
+ readonly mat: 280;
18
+ /** The corners of the window's opening round before it closes in, or square off once it is the window again. */
19
+ readonly round: 110;
20
+ /** The case and the page fade in, or the window's own page comes back. */
21
+ readonly in: 180;
22
+ /** A device turns a quarter, to be held the other way. */
23
+ readonly turn: 400;
24
+ /** The page on the screen of a device that turned comes out of the dark, laid out the other way. */
25
+ readonly uncover: 160;
26
+ readonly wait: 1200;
27
+ };
28
+ /** How round the corners of the window's opening go before it closes in, in px. */
29
+ export declare const ROUND = 20;
30
+ /** A radius for each corner, in px: top left, top right, bottom right, bottom left. */
31
+ export type Corners = readonly [number, number, number, number];
32
+ /** The mat's opening: where it is, and how round each of its corners is. */
33
+ export interface Hole extends Rect {
34
+ radius: Corners;
35
+ }
36
+ /** A cubic bezier's two control points, as css takes them. */
37
+ export type Curve = readonly [number, number, number, number];
38
+ /** The mat moves on an iOS spring's curve, quick to start and long to settle. */
39
+ export declare const MAT_CURVE: Curve;
40
+ /** Fades ease out, as the panel's own do. */
41
+ export declare const FADE_CURVE: Curve;
42
+ /** A device turns slowly out and slowly in, as a hand turns it. */
43
+ export declare const TURN_CURVE: Curve;
44
+ export declare function bezier(curve: Curve): string;
45
+ /** How far along a curve is at `time`, 0 to 1 of the way through. */
46
+ export declare function ease(curve: Curve, time: number): number;
47
+ export declare function lerp(from: number, to: number, share: number): number;
48
+ export declare function lerpRect(from: Rect, to: Rect, share: number): Rect;
49
+ /** Where the mat's opening is `elapsed` ms into a move of `time` ms, its corners on the way too. */
50
+ export declare function holeAt(from: Hole, to: Hole, elapsed: number, time: number): Hole;
51
+ /** Do two rects cover the same pixels, near enough? */
52
+ export declare function sameRect(a: Rect, b: Rect): boolean;
53
+ /** Do two openings cover the same pixels, their corners too, near enough? */
54
+ export declare function sameHole(a: Hole, b: Hole): boolean;
55
+ /**
56
+ * The opening as wide as a window of `size`, a px past each edge so no
57
+ * hairline of mat shows, with square corners.
58
+ */
59
+ export declare function windowRect(size: {
60
+ width: number;
61
+ height: number;
62
+ }): Hole;
63
+ /** The same opening with its corners rounded, as the window's is before it closes in. */
64
+ export declare function rounded(hole: Hole): Hole;
65
+ /**
66
+ * The corners of a rect as css draws them: where two on a side would overlap,
67
+ * all of them shrink by as much, and none is rounder than half the short side.
68
+ */
69
+ export declare function fitCorners(rect: Rect, radius: Corners): Corners;
70
+ /**
71
+ * The radius of each corner from a css `border-radius`, one to four values,
72
+ * the first of each pair where a corner is elliptical.
73
+ */
74
+ export declare function readCorners(text: string): Corners;
75
+ /**
76
+ * The mat with an opening at `hole`: a square far past the box, and the hole
77
+ * cut out of it by the even odd rule, each corner as round as it asks. A
78
+ * shape such as `inset()` keeps what is inside it, where the mat keeps what is
79
+ * outside.
80
+ */
81
+ export declare function holePath(hole: Hole): string;
82
+ /**
83
+ * How the screen stands as a device turns, against how it stood at the
84
+ * start: where its middle is, its angle in degrees, clockwise, and its scale.
85
+ */
86
+ export interface Pose {
87
+ x: number;
88
+ y: number;
89
+ angle: number;
90
+ scale: number;
91
+ }
92
+ /** A screen at `rect` as it stands, unturned. */
93
+ export declare function poseOf(rect: Rect): Pose;
94
+ /**
95
+ * The screen at `from` turned a quarter by `angle` onto `to`: its middle on
96
+ * the middle of `to`, and as big as it.
97
+ */
98
+ export declare function turnedPose(from: Rect, to: Rect, angle: number): Pose;
99
+ /**
100
+ * How far into a turn the page on the screen starts to go dark, so it is laid
101
+ * out the other way unseen, 0 to 1.
102
+ */
103
+ export declare const TURN_COVER = 0.6;
104
+ /**
105
+ * How far the cover is over the page `elapsed` ms into a turn of `time` ms,
106
+ * 0 to 1: on its way over in the turn's last part, or off all through a turn
107
+ * back to the way the page is laid out.
108
+ */
109
+ export declare function coverAt(from: number, to: number, elapsed: number, time: number): number;
110
+ /** How the screen stands `elapsed` ms into a turn of `time` ms. */
111
+ export declare function poseAt(from: Pose, to: Pose, elapsed: number, time: number): Pose;
112
+ /** Where a point of the screen drawn at `start` is at `pose`. */
113
+ export declare function posePoint(start: Rect, pose: Pose, point: {
114
+ x: number;
115
+ y: number;
116
+ }): {
117
+ x: number;
118
+ y: number;
119
+ };
120
+ /**
121
+ * The css transform that stands the device at `pose`, on the element that
122
+ * holds the case and the screen: its top left at `corner`, scaled by `base`
123
+ * from that corner as it stands, and the screen at `start`.
124
+ */
125
+ export declare function poseTransform(start: Rect, pose: Pose, corner: {
126
+ x: number;
127
+ y: number;
128
+ }, base: number): string;
129
+ /**
130
+ * Does going from one shape to the other turn the device the other way up?
131
+ * A turn to be held across goes a quarter anticlockwise, the top of the phone
132
+ * to the left as its mock turns, or clockwise for a device whose mock turns
133
+ * that way, and back the other way.
134
+ */
135
+ export declare function turnOf(from: string, to: string): number;
136
+ /**
137
+ * Does going from one shape to the other fold a foldable open or shut? Its
138
+ * hinge stays where it is, so the screen it goes to is held the other way.
139
+ */
140
+ export declare function folds(from: string, to: string): boolean;
141
+ /**
142
+ * Which way the frame is drawn, for a move: `closed`, `frame` for one with no
143
+ * device, or the device and the way it is held, and a foldable's posture.
144
+ */
145
+ export declare function shapeOf(knobs: Framing & Pick<DevknobsState, "device" | "orientation" | "posture">): string;
146
+ /**
147
+ * Does going from one shape to the other move? A device that comes, goes,
148
+ * changes or turns does. A width, a height or a zoom changes in place, as
149
+ * they are dragged and typed, and so does a frame with no device coming up.
150
+ */
151
+ export declare function moves(from: string, to: string): boolean;
152
+ /** What shows of a move, between steps: the veil over the page, the mat's opening, and the frame with its case. */
153
+ export interface Shown {
154
+ /** The veil in the page's color over the window's own page, 0 to 1. */
155
+ veil: number;
156
+ /** The case, the page in the frame and the readout, 0 to 1. */
157
+ content: number;
158
+ /** The window's own page is hidden under the frame. */
159
+ covered: boolean;
160
+ /** The mat's opening is the whole window, square, so none of the mat shows. */
161
+ open: boolean;
162
+ }
163
+ export type Step = {
164
+ kind: "fade";
165
+ veil?: number;
166
+ content?: number;
167
+ time: number;
168
+ }
169
+ /** The mat's opening goes to the screen, to the window with round corners, or to the window square. */
170
+ | {
171
+ kind: "mat";
172
+ to: "screen" | "round" | "window";
173
+ time: number;
174
+ }
175
+ /** Hide the window's own page under the frame. */
176
+ | {
177
+ kind: "cover";
178
+ }
179
+ /** Draw the knobs the move goes to. */
180
+ | {
181
+ kind: "layout";
182
+ }
183
+ /** Wait for the page in the frame to be ready to paint. */
184
+ | {
185
+ kind: "wait";
186
+ }
187
+ /** Hand the window its own page back. */
188
+ | {
189
+ kind: "release";
190
+ }
191
+ /** The frame as it stays, or none. */
192
+ | {
193
+ kind: "end";
194
+ };
195
+ /**
196
+ * The steps from what shows now to a frame with its new device, or to none.
197
+ * A move cut short starts the next from where it was, so each step is left
198
+ * out once what it does is done.
199
+ */
200
+ export declare function plan(shown: Shown, to: "open" | "closed"): Step[];
201
+ /** A plan on its way. Cancelled, it starts no step after the one in flight. */
202
+ export interface Run {
203
+ readonly steps: readonly Step[];
204
+ readonly target: "open" | "closed";
205
+ /** The step in flight, or the next one. */
206
+ at(): number;
207
+ /** The steps not done yet, the one in flight first. */
208
+ rest(): Step[];
209
+ live(): boolean;
210
+ cancel(): void;
211
+ /** Go through the steps in turn, each once the last is done. */
212
+ run(perform: (step: Step) => Promise<void> | void): Promise<void>;
213
+ }
214
+ export declare function sequence(steps: Step[], target: "open" | "closed"): Run;
@@ -0,0 +1,49 @@
1
+ import { type Hole } from "./morph";
2
+ export { still } from "./matchmedia";
3
+ /**
4
+ * Runs a device change's plan on the frame's nodes, a step at a time. What it
5
+ * needs of the frame comes in a `Scene`, so it holds no node of its own.
6
+ */
7
+ /** What a device change moves, and what it asks of the frame. */
8
+ export interface Scene {
9
+ /** The mat's paint, which a device change cuts its opening in. */
10
+ back: HTMLElement;
11
+ /** Hides the window's own page in its color while a device comes or goes. */
12
+ veil: HTMLElement;
13
+ /** The case, the page in the frame and the readout, which fade as one. */
14
+ content(): HTMLElement[];
15
+ /** Where the frame's screen is drawn now, in the letterbox, and how round its corners are. */
16
+ screenRect(): Hole;
17
+ /** The mat's opening at the whole window, a px past each edge, square. */
18
+ fullRect(): Hole;
19
+ /** The window's own page is hidden under the frame. */
20
+ covered(): boolean;
21
+ /** Hide the window's own page under the frame. */
22
+ hidePage(): void;
23
+ /** Is the frame's page in and ready to paint, with no reload on its way? */
24
+ painted(): boolean;
25
+ /** Draw the knobs the change goes to. */
26
+ layout(): void;
27
+ /** Hand the window its own page back, or leave for where the frame went. */
28
+ release(): void;
29
+ /** Take the frame away. */
30
+ teardown(): void;
31
+ }
32
+ /** Is a device change on its way? */
33
+ export declare function running(): boolean;
34
+ /** How far the veil is over the window's own page, 0 to 1. */
35
+ export declare function veilShare(): number;
36
+ /** The frame is gone, and the mat with it. */
37
+ export declare function forget(): void;
38
+ /**
39
+ * A frame that comes up for a device change: nothing of it shows yet, and the
40
+ * page is still there under a veil `share` of the way over it. None of the mat
41
+ * shows either: its opening is the whole window.
42
+ */
43
+ export declare function openVeiled(scene: Scene, share: number): void;
44
+ /** Start a device change from what shows now, toward a frame or none. */
45
+ export declare function start(scene: Scene, target: "open" | "closed"): void;
46
+ /** Stop a device change where it is, each part held where it got to. */
47
+ export declare function halt(): void;
48
+ /** Finish a device change at once, as it would end. */
49
+ export declare function snap(scene: Scene | null): void;
@@ -0,0 +1,129 @@
1
+ import type { ContrastValue, DevknobsState, MotionValue, SchemeValue, TextValue, TransparencyValue, UaValue } from "../types";
2
+ import { type UaPreset } from "./ua";
3
+ /** The prefers knobs, as a host sets them for real. */
4
+ export interface NativeMedia {
5
+ scheme: SchemeValue;
6
+ motion: MotionValue;
7
+ contrast: ContrastValue;
8
+ transparency: TransparencyValue;
9
+ }
10
+ /**
11
+ * The page's viewport as a host sets it for real, in place of the frame: a
12
+ * size knob or a device with nothing drawn around the page.
13
+ */
14
+ export interface NativeViewport {
15
+ /** In css px, or null for the window's own. */
16
+ width: number | null;
17
+ height: number | null;
18
+ /** The device pixel ratio, or null for the screen's own. */
19
+ dpr: number | null;
20
+ /** A phone or a tablet: the browser lays the page out as on one. */
21
+ mobile: boolean;
22
+ /** A touch screen: a coarse pointer that cannot hover, and touch points. */
23
+ touch: boolean;
24
+ /** The mouse acts as a finger, the touch pointer knob on a touch screen. */
25
+ touchPointer: boolean;
26
+ }
27
+ /**
28
+ * The browser the page's requests go out as: the ua knob's preset, a
29
+ * device's browser too. A custom string has the user agent alone, with an
30
+ * empty `platform` and `uaPlatform` and no brands.
31
+ */
32
+ export type NativeUa = Pick<UaPreset, "userAgent" | "platform" | "mobile" | "brands" | "uaPlatform" | "hints">;
33
+ /**
34
+ * A host that sets some knobs for real, in the browser itself, such as a
35
+ * browser extension through the DevTools protocol. Each part it has takes its
36
+ * knob over: devknobs leaves that knob's emulation in the page out and hands
37
+ * the value here instead, each time it changes. The panel, the state, its
38
+ * storage and `describe()` stay as they are. Unmount hands every part its
39
+ * default.
40
+ */
41
+ export interface NativeDriver {
42
+ /** The browser's default font size, in px, or `system` for its own. */
43
+ text?: (value: TextValue) => void;
44
+ /** Cut the network, for the network knob's `online` field. */
45
+ offline?: (offline: boolean) => void;
46
+ /** The prefers media features. */
47
+ media?: (value: NativeMedia) => void;
48
+ /**
49
+ * The viewport's size, ratio and touch screen, null for the window's own.
50
+ * Only while nothing is drawn around the page: a device's body or browser,
51
+ * a fold, a vision filter, a zoom or a docked panel keep the frame, and the
52
+ * host is handed null meanwhile, so the two never stack.
53
+ */
54
+ viewport?: (value: NativeViewport | null) => void;
55
+ /**
56
+ * The user agent the page's requests carry to servers, null for the
57
+ * browser's own. Unlike the parts above, it takes nothing from the page,
58
+ * whose navigator keeps its patches, and it is handed with the switch off
59
+ * too. A promise holds the frame's next load until it settles, so the
60
+ * server sees the new one.
61
+ */
62
+ ua?: (value: NativeUa | null) => void | Promise<void>;
63
+ /**
64
+ * A switch in the panel's settings that turns the driver off and on, shown
65
+ * only where the host gives one. Off, the page emulates every knob as with
66
+ * no driver, and the driver is handed its defaults first. `change` hears
67
+ * the user's choice for the host to keep; the host hands one back with
68
+ * `setNative`.
69
+ */
70
+ setting?: NativeSetting;
71
+ /**
72
+ * Asked each time the frame's page is refused, with the address the frame
73
+ * was given, for why: a line under the notice. Asked with the switch off
74
+ * too. Null adds nothing.
75
+ */
76
+ refused?: (url: string) => Promise<FrameRefusal | null>;
77
+ /**
78
+ * Told as the frame that loads the page opens, before its first load, and as
79
+ * it goes. A promise on the way in holds the frame's first load until it
80
+ * settles, so the host can let it in first.
81
+ */
82
+ framed?: (open: boolean) => void | Promise<void>;
83
+ }
84
+ /** Why the frame's page was refused, as the host knows it. */
85
+ export interface FrameRefusal {
86
+ /** One short line under the notice. */
87
+ why: string;
88
+ /** What the notice's "copy details" button puts on the clipboard. */
89
+ details?: string;
90
+ /** A button that runs `run`, then loads the frame again, to find out more. `now` runs it at once, unpressed. */
91
+ retry?: {
92
+ label: string;
93
+ run: () => Promise<void>;
94
+ now?: boolean;
95
+ };
96
+ }
97
+ /** The words of the driver's switch in the panel's settings, and who hears it. */
98
+ export interface NativeSetting {
99
+ label: string;
100
+ /** One short line under the label: what the driver costs. */
101
+ hint: string;
102
+ change: (on: boolean) => void;
103
+ }
104
+ /** Does the frame draw something around the page, beside giving it a size? */
105
+ export declare function drawnAround(state: DevknobsState): boolean;
106
+ /** The viewport a host can set for these knobs, null where they need no size or the frame draws. */
107
+ export declare function nativeViewport(state: DevknobsState): NativeViewport | null;
108
+ /** The browser a host sends requests as for the ua knob, null for the browser's own. */
109
+ export declare function nativeUa(value: UaValue): NativeUa | null;
110
+ /** The state the page's own emulation runs with: each knob the driver takes is left at system. */
111
+ export declare function inPage(state: DevknobsState, driver: NativeDriver | null): DevknobsState;
112
+ /** The state the frame runs with: no size of its own while the driver sets the viewport. */
113
+ export declare function framing(state: DevknobsState, driver: NativeDriver | null): DevknobsState;
114
+ export declare function nativeEnabled(): boolean;
115
+ export declare function enableNative(on: boolean): void;
116
+ /** What the frame's next load waits for: a part the host is still setting, or null. */
117
+ export declare function handing(): Promise<void> | null;
118
+ /** What a host's answer holds the frame's load for: until it settles, at most `HAND_WAIT`, or null for none. */
119
+ export declare function settles(result: unknown): Promise<void> | null;
120
+ /** Hand the driver the knobs it takes, those that changed since. */
121
+ export declare function drive(driver: NativeDriver, state: DevknobsState): void;
122
+ /** Hand the driver the ua knob, which it takes with its switch off too. */
123
+ export declare function driveUa(driver: NativeDriver, state: DevknobsState): void;
124
+ /**
125
+ * Hand the driver every default, for an unmount, and forget what it had. A
126
+ * driver never handed anything gets nothing. `ua` false keeps the ua part as
127
+ * it is, for the switch going off.
128
+ */
129
+ export declare function release(driver: NativeDriver, ua?: boolean): void;
@@ -0,0 +1,8 @@
1
+ import type { NetworkValue } from "../types";
2
+ /**
3
+ * Mimic the network the page sees: `navigator.onLine` with its `online` and
4
+ * `offline` events, and `navigator.connection` with its `change` event.
5
+ * Requests still go out as before: only what the page reads changes.
6
+ */
7
+ export declare function apply(value: NetworkValue): void;
8
+ export declare function reset(): void;