@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,151 @@
1
+ import { type FoldShots, type Pane, type Quad } from "./fold";
2
+ import type { Rect } from "./mock";
3
+ /**
4
+ * The page on the screen of a fold's half that turns, drawn by WebGL2 from
5
+ * a picture of it, as Apple and jadon7/iphone-duo draw theirs: blurred from
6
+ * the hinge toward the free edge as the hinge sets it, and past the
7
+ * picture's ends along the hinge, where the turned screen reaches past it,
8
+ * blurred together with the black there, so its colour spreads into the
9
+ * dark and the line between them never shows, and so at the turned screen's
10
+ * free edge, where the page is cut off as it is seen. The blur is the picture's
11
+ * mipmaps, sampled 25 times about each point as far apart as it is wide,
12
+ * and where there is no blur, all on the point.
13
+ * Its shades are worked out there too, at every px.
14
+ * The picture goes up once as the fold starts, and each frame sets only a
15
+ * few numbers and draws one quad. Where WebGL2 is not, the page's blurrier
16
+ * pictures are laid over each other instead.
17
+ */
18
+ /** How the screen is blurred with the hinge where it is, in the picture's css px. */
19
+ export interface ScreenLook {
20
+ /** How wide the blur at the turned screen's free edge is, as `turnBlur` has it. */
21
+ peak: number;
22
+ /** How wide the blur at the picture's ends is, at the hinge and at the free edge. */
23
+ edge: [hinge: number, free: number];
24
+ /** Where the turned screen's free edge is seen on the picture, as a share of the way from the hinge to its own. */
25
+ free: number;
26
+ /** How deep the dark at the turned screen's free edge is, as `freeDepth` has it. */
27
+ dark: number;
28
+ /** What shades the screen, as `shadeOf` has it, but the screen's own light, which lies over the canvas as it does over the other half: nothing where gradients over the canvas shade it. */
29
+ lit: [wipe: number, area: number, far: number];
30
+ }
31
+ /**
32
+ * How the turned screen is blurred with the hinge `open` of the way open,
33
+ * reaching `wedge` css px past the picture's ends at its free edge, and its
34
+ * free edge seen `free` of the way from the hinge to the picture's. It is
35
+ * shaded as the screen of `shaded` is, or not at all, null, where gradients
36
+ * over the canvas shade it, and blurred as the screen of `pane` is.
37
+ */
38
+ export declare function screenLook(open: number, wedge: number, free?: number, shaded?: Pane | null, pane?: Pane): ScreenLook;
39
+ /**
40
+ * How much of its light the screen of `pane` keeps `t` of the way from the
41
+ * hinge to the picture's free edge, shaded as `look` has it, as shown: the
42
+ * wipe, the dark of Apple's blurs and the far side's shadow, worked out only
43
+ * where one is on. Past where the turned screen is cut, as much as there, as
44
+ * a gradient's last stop goes on.
45
+ */
46
+ export declare function shadeAt(pane: Pane, look: ScreenLook, across: number): number;
47
+ /**
48
+ * How wide the blur is, in css px, `t` of the way from the hinge to the free
49
+ * edge, `inside` css px in from the picture's nearer end along the hinge,
50
+ * less than 0 past it: least at the hinge and most at the turned screen's
51
+ * free edge, as `blurShare` has it, or the ends', whichever is the wider.
52
+ */
53
+ export declare function blurAt(look: ScreenLook, t: number, inside: number): number;
54
+ /** The share of a blurred point each of its taps takes, by how many taps it is from the middle one, each way: a row's five add up to 1. */
55
+ export declare const WEIGHTS: readonly [0.375, 0.25, 0.0625];
56
+ /**
57
+ * The picture's level a point needs with no blur at all, as the hardware
58
+ * picks it by itself: a px of the canvas to its `right` and one `down` are
59
+ * that many of the picture's px away. 0 where the picture is no denser than
60
+ * the canvas.
61
+ */
62
+ export declare function sharpLevel(right: [number, number], down: [number, number]): number;
63
+ /**
64
+ * The picture's level the taps `gap` css px apart are taken from, the
65
+ * picture `texels` of its px to a css px: a tap's own px as wide as the gap,
66
+ * and never sharper than `sharp`, the level with no blur. It has no step
67
+ * anywhere in `gap`, so nowhere on the screen does the picture change level
68
+ * at once.
69
+ */
70
+ export declare function levelAt(gap: number, texels: number, sharp: number): number;
71
+ /**
72
+ * What the shader's 25 taps about a point add up to, `gap` apart, each read
73
+ * by `sample`: with no gap they all fall on the point, so it is the point's
74
+ * own, sharp.
75
+ */
76
+ export declare function tapped(sample: (x: number, y: number) => number, x: number, y: number, gap: number): number;
77
+ /** How much of the picture there is `at` css px along a picture `span` long, softened over `soft` either way: none past its ends. */
78
+ export declare function coverage(at: number, span: number, soft: number): number;
79
+ /**
80
+ * How far the turned screen of `pane` reaches past the picture's ends at its
81
+ * free edge, in the picture's css px, as `darkAt` has it: the picture
82
+ * `span` css px long along the hinge.
83
+ */
84
+ export declare function wedgeOf(window: Quad, pane: Pane, picture: Rect, span: number): number;
85
+ /**
86
+ * Where the turned screen of `pane`, its window `window`, is seen to end on
87
+ * its `picture` at its free edge, as a share of the way from the hinge to
88
+ * the picture's own, 1 where it reaches it: the window cuts the page lying
89
+ * flat there, so the page is blurred into the dark past that cut, as past
90
+ * its ends.
91
+ */
92
+ export declare function freeOf(window: Quad, pane: Pane, picture: Rect): number;
93
+ /** How far, at most, the turned screen of `pane` reaches past the picture's ends in any of the fold's frames, as a share of its length. */
94
+ export declare function reachOf(shots: FoldShots, pane: Pane): number;
95
+ /** Where the screen's picture is drawn, in the css px of the whole screen it is a picture of. */
96
+ export interface ScreenPlace {
97
+ pane: Pane;
98
+ /** Does the hinge run down the screen, so its ends along the hinge are its top and bottom. */
99
+ across: boolean;
100
+ /** The whole screen's size, which the picture is of, and the part of it that turns, in its css px. */
101
+ stage: {
102
+ width: number;
103
+ height: number;
104
+ };
105
+ part: Rect;
106
+ /** How far past the screen's ends along the hinge the turned screen may reach, in css px. */
107
+ margin: number;
108
+ /** How many of the display's px a css px of the picture takes. */
109
+ density: number;
110
+ }
111
+ /** Where the canvas lies on the whole screen: over the part that turns, and `margin` past its ends along the hinge. */
112
+ export declare function canvasRect(place: ScreenPlace): Rect;
113
+ /** How far a point of the whole screen is from the hinge to the free edge, 0 to 1, as `a x + b y + c`. */
114
+ export declare function hingeLine(pane: Pane, across: boolean, part: Rect): [number, number, number];
115
+ /** A canvas's WebGL2 context, or null where it has none: a context of another kind, or none at all. */
116
+ export declare function contextOf(canvas: {
117
+ getContext(id: "webgl2", options?: WebGLContextAttributes): unknown;
118
+ }): WebGL2RenderingContext | null;
119
+ /**
120
+ * `blurAt` and `coverage`, the same, then the picture and the
121
+ * black past it blurred together: past its ends along the hinge, and past
122
+ * where the turned screen's free edge cuts it, and darkened toward that edge
123
+ * as `freeDark` has it, and shaded as `shadeAt` has it: each at every px, so
124
+ * no shade has stops to bend at. A shade that is off costs a compare. What
125
+ * varies gets a little noise, under a step of the screen's 256, so a dark,
126
+ * slow shade shows no bands. What `tune` has comes in as uniforms, so a
127
+ * number changed by hand shows at the next draw.
128
+ * Every px goes one way through it: the same taps from a level that
129
+ * `levelAt` has, which close onto the point as the blur goes to none. A px
130
+ * that took another way than the next one, by how wide its blur is, drew a
131
+ * line where they met, which moved with the fold. Only a draw with no blur
132
+ * anywhere takes one tap, and what says so is the same for all of its px.
133
+ */
134
+ export declare const FRAGMENT: string;
135
+ /** The screen's picture drawn by WebGL2, on a canvas that lies over the part that turns. */
136
+ export interface ScreenGl {
137
+ canvas: HTMLCanvasElement;
138
+ /** Take up a new picture of the page and draw it again. Where it cannot, it lets go of itself and hands the picture to the layers. */
139
+ paint(shot: HTMLCanvasElement): void;
140
+ /** Draw it as `look` has it. */
141
+ draw(look: ScreenLook): void;
142
+ /** Let go of the canvas, its context and what it holds. */
143
+ release(): void;
144
+ }
145
+ /**
146
+ * The screen of `place` drawn by WebGL2, or null where it cannot be. Each
147
+ * time it cannot, as it is made, as it takes up a picture, or once its
148
+ * context is lost, `refused` is told why in a plain sentence, and the
149
+ * picture it holds by then, for the layers to show instead.
150
+ */
151
+ export declare function screenGl(place: ScreenPlace, refused: (why: string, shot: HTMLCanvasElement | null) => void): ScreenGl | null;
@@ -0,0 +1,23 @@
1
+ import type { DevknobsState } from "../types";
2
+ import { foldRest, holdingHinge, watchFold, watchHinge } from "./foldrun";
3
+ /**
4
+ * A hand on a foldable's hinge, for the panel's fold slider, which is
5
+ * experimental. The hinge follows the hand through its spring, goes on at one
6
+ * speed once let go, and the knobs change posture only once it is let go at
7
+ * an end, which the slider says.
8
+ */
9
+ export { foldRest, holdingHinge, watchFold, watchHinge };
10
+ /**
11
+ * Take the hinge of the foldable `state` shows: of the fold on its way, else
12
+ * of one toward its other posture, which stays shut or open till the hand
13
+ * moves. False where it cannot, as while a device turns or changes.
14
+ */
15
+ export declare function takeHinge(state: DevknobsState): boolean;
16
+ /** Move the hinge the hand holds toward `target`, 0 shut to 1 open. False where no hand holds one. */
17
+ export declare function moveHinge(target: number): boolean;
18
+ /**
19
+ * Let go of the hinge toward `stop`, going there at one speed, or at once
20
+ * where the user prefers less motion. False where there is no fold to let go
21
+ * of.
22
+ */
23
+ export declare function letGo(stop: number): boolean;
@@ -0,0 +1,49 @@
1
+ /**
2
+ * The numbers a fold's look is drawn by, as they ship, in one table read each
3
+ * time a fold is drawn. The built package has these and no way to set them.
4
+ * From source, the tuning controls set them by hand on a live page.
5
+ */
6
+ /** Every number as it ships. Tuned values that are kept go here. */
7
+ export declare const TUNE_DEFAULTS: {
8
+ /** The widest the blur gets, in css px at scale 1: at the free edge, the half standing at `blurAngle`. */
9
+ blurMost: number;
10
+ /** The blur at the hinge, as a share of the blur at the free edge at the same angle. None as it ships: the hinge side is sharp. */
11
+ blurHinge: number;
12
+ /** How the blur rises from the hinge to the free edge: 1 evenly, more keeps it low further from the hinge. */
13
+ blurRise: number;
14
+ /** The hinge's angle the blur is widest at, in degrees: 180 open flat, 90 a right angle, 0 shut. */
15
+ blurAngle: number;
16
+ /** How the blur falls off away from that angle: 1 evenly, more keeps it low further from it. */
17
+ blurStand: number;
18
+ /** How much of its peak the blur keeps past that angle, on the side away from where the screen lies flat in sight: 0 falls as it rose, 1 stays at the peak. */
19
+ blurHold: number;
20
+ /** How the blur rises to its peak: 0 by `blurStand`'s power, 1 slow at both ends, as jadon7/iphone-duo's does. */
21
+ blurEase: number;
22
+ /** How wide the blur at the picture's ends along the hinge is at the hinge, in widths of the dark past them. */
23
+ edgeHinge: number;
24
+ /** The same at the free edge. */
25
+ edgeFree: number;
26
+ /** How far into the picture from an end the blur past it reaches, in widths of that blur. */
27
+ edgeReach: number;
28
+ /** How far apart WebGL2's taps are, as a share of the blur's width: more is softer, till the taps show. */
29
+ blurSpread: number;
30
+ /** How dark the turned screen's free edge gets, 0 to 1, the half standing at a right angle. None as it ships, so the four numbers under it do nothing till a hand raises it: 0.7 is as measured from Apple's. */
31
+ darkMost: number;
32
+ /** How that dark falls off away from a right angle: more keeps it to fewer degrees about it. */
33
+ darkPower: number;
34
+ /** Where that dark starts, as a share of the way from the hinge to the free edge. */
35
+ darkFrom: number;
36
+ /** How wide the darkest strip at the free edge is, as a share of the same way. */
37
+ darkBand: number;
38
+ /** How much of that dark comes on evenly from where it starts: the rest is the strip's. */
39
+ darkBroad: number;
40
+ /** How strongly the half that turns is shaded toward its free edge as it turns. Not at all as it ships: Apple's is 1.5. */
41
+ wipeShade: number;
42
+ /** How deep the shadow over the outer half of the open screen's half gets, 0 to 1. None as it ships: Apple's is 1. */
43
+ farShade: number;
44
+ /** How much noise WebGL2 adds to a shade it draws, in steps of a screen's 256, so a dark, slow one shows no bands. */
45
+ grain: number;
46
+ };
47
+ export type LookKey = keyof typeof TUNE_DEFAULTS;
48
+ /** The numbers as they are now. Read where a fold is drawn, never copied. */
49
+ export declare const tune: Record<LookKey, number>;
@@ -0,0 +1,167 @@
1
+ import { type BarsKnobs, type Drawn } from "./barshot";
2
+ import { type FoldLayout, type FoldSide, type Pane, type Point } from "./fold";
3
+ import type { Mock, Rect } from "./mock";
4
+ import { type ScreenGl } from "./foldgl";
5
+ import type { Corners } from "./morph";
6
+ /**
7
+ * The page on the screens of a fold's half that turns, whichever way the
8
+ * half is drawn: the pictures of it, where the part that turns is on each
9
+ * side's screen, and how the hinge lights and blurs
10
+ * it. Shared by the copies and the frames, whose screens WebGL2 draws where it
11
+ * can.
12
+ */
13
+ /** One side of a fold as it is drawn: its body, and the picture of it that has loaded. */
14
+ export interface Face extends FoldSide {
15
+ body: Mock | null;
16
+ href: string | null;
17
+ }
18
+ /** The page on a screen of the half that turns: its pictures, lit and blurred as it turns. */
19
+ export interface Panel {
20
+ pane: Pane;
21
+ /** The screen as it lies: the pictures of the page and the browser's bars. */
22
+ stage: HTMLElement;
23
+ /** The page, and the same blurred more and more. */
24
+ pictures: HTMLElement[];
25
+ /** The picture those were made of, and how wide the blur of each is, for making them again once a hand sets the widest. */
26
+ shot: HTMLCanvasElement | null;
27
+ widths: number[];
28
+ /** Why its pictures are laid over each other, where WebGL2 does not draw the page, in a plain sentence. */
29
+ why: string;
30
+ /** The dark of the picture as it lies, and of the screen as it turns. */
31
+ flat: HTMLElement;
32
+ shade: HTMLElement;
33
+ /** The dark at the turned screen's free edge, where WebGL2 does not draw it. */
34
+ edge: HTMLElement;
35
+ /** The way from the hinge to the free edge, as a gradient goes, and where the two are on the stage, in percent. */
36
+ toward: string;
37
+ span: [number, number];
38
+ /** The screen's width, in css px. */
39
+ width: number;
40
+ /** Does the hinge run down the screen, so its ends along it are its top and bottom. */
41
+ across: boolean;
42
+ }
43
+ export declare function div(className: string): HTMLElement;
44
+ /** Corners as a css border radius. */
45
+ export declare function round(radii: Corners): string;
46
+ /** Fill the box it is in. */
47
+ export declare function fill(node: HTMLElement): HTMLElement;
48
+ /** Put a node at `rect`, in its parent's css px. */
49
+ export declare function placeAt(node: HTMLElement, rect: Rect): HTMLElement;
50
+ /** Put `shot` on a leaf's stage, and the same blurred over it, as much as was shown before. */
51
+ export declare function paintLeaf(leaf: Panel, shot: HTMLCanvasElement): void;
52
+ /** The screen of a side's body, where it is in the body, and its corners. */
53
+ export declare function screenOf(side: Face): {
54
+ rect: Rect;
55
+ radii: Corners;
56
+ };
57
+ /** The part of a side's screen that turns, and the way from its hinge to its free edge. */
58
+ export interface Turning {
59
+ pane: Pane;
60
+ /** Where it is in the body, and its corners, square at the hinge. */
61
+ rect: Rect;
62
+ radii: Corners;
63
+ toward: string;
64
+ /** Where the hinge and the free edge are along `toward` on the whole screen, in percent. */
65
+ span: [number, number];
66
+ pivot: Point;
67
+ }
68
+ /** The two sides of the half that turns: the open screen's half, and the folded body's whole screen. */
69
+ export declare function turningOf(layout: FoldLayout, open: Face, closed: Face): {
70
+ inner: Turning;
71
+ outer: Turning;
72
+ };
73
+ /**
74
+ * The page as laid out on a screen: a rough picture of it now, or null where
75
+ * it is out of reach, the one the browser draws once it has, with the bars
76
+ * drawn in where they draw, and a copy of the browser's bars to go over the
77
+ * pictures till then, or where they do not.
78
+ */
79
+ export interface Picture {
80
+ shot: HTMLCanvasElement | null;
81
+ painted: Promise<Drawn | null> | null;
82
+ bars: HTMLElement | null;
83
+ }
84
+ /**
85
+ * A rough picture of the page in `frame` as laid out now on a screen `size`
86
+ * css px, shown in `glass` for the knobs `value`, which it is kept by: the
87
+ * same one again while the page, its pictures and the screen stay as they are.
88
+ */
89
+ export declare function roughOf(frame: HTMLIFrameElement, glass: HTMLElement, value: BarsKnobs, size: {
90
+ width: number;
91
+ height: number;
92
+ }, color: string): HTMLCanvasElement | null;
93
+ /**
94
+ * The page in `frame` as laid out now on a screen `size` css px, shown in
95
+ * `glass` for the knobs `value`, `copy` of it to draw, and its bars as shown.
96
+ */
97
+ export declare function pictureOf(frame: HTMLIFrameElement, glass: HTMLElement, value: BarsKnobs, size: {
98
+ width: number;
99
+ height: number;
100
+ }, color: string, copy: Element | null): Picture;
101
+ /** Put `drawn` on a screen with `paint`, and once its bars are in it, take their copy off the screen. */
102
+ export declare function paintDrawn(picture: Picture, drawn: Drawn, paint: (shot: HTMLCanvasElement) => void): void;
103
+ /** Pictures of the page as laid out on each screen. */
104
+ export interface Pictures {
105
+ open: Picture;
106
+ closed: Picture;
107
+ }
108
+ /**
109
+ * Light and blur the page on a screen of the half that turns as the hinge
110
+ * `open` of the way open has it, and darken it toward the turned screen's
111
+ * free edge, seen `free` of the way from the hinge, or not where WebGL2
112
+ * does, null. Its blur is least at the hinge and most at the turned screen's
113
+ * free edge, seen `out` of the way from the hinge to the picture's. Where
114
+ * WebGL2 shades the screen itself, `lit`, no shade is worked out here but
115
+ * the screen's own light, one dark all over. Which
116
+ * of the two draws the page, and why, is noted for the tuning hook to tell.
117
+ */
118
+ export declare function light(panel: Panel, open: number, free: number | null, out: number, lit?: boolean): void;
119
+ /**
120
+ * Does WebGL2 shade a glued screen itself: where it draws the page and
121
+ * nothing lies on the stage over its canvas. The copy of the browser's bars
122
+ * does till they are in the picture, and gradients shade it with the page
123
+ * till then.
124
+ */
125
+ export declare function litByGl(glued: Glued): boolean;
126
+ /** A screen of a frame's half that turns, a window onto the page lying flat behind it. */
127
+ export interface Glued extends Panel {
128
+ /** Dark, over every frame in the render, cut a little past the turned screen's outline, under the case, so no edge of it lets the mat through, and `over` css px short of the open screen's hinge. */
129
+ node: HTMLElement;
130
+ /** The window in it, cut to the turned screen's outline. */
131
+ cut: HTMLElement;
132
+ /** The part that turns as it lies, in its own css px, laid flat where the page is seen, and its corners. */
133
+ picture: HTMLElement;
134
+ size: {
135
+ width: number;
136
+ height: number;
137
+ };
138
+ radii: Corners;
139
+ /** How far short of the hinge the screen stops, in its css px, the half that stays going on under it: not at all on the folded screen, whose hinge side is under its case. */
140
+ over: number;
141
+ /** The page drawn by WebGL2, or null where the pictures are laid over each other instead. */
142
+ gl: ScreenGl | null;
143
+ }
144
+ /**
145
+ * How far short of the hinge the open screen's half that turns stops, the
146
+ * half that stays going on under it that far and a px more, with the same
147
+ * page: in css px of the screen, and in px of the display where those are
148
+ * the bigger, at most 4 times as far. So the edge of the half that turns and
149
+ * of its dark, which is one edge, and the other half's never meet in one px
150
+ * of the display, where the dark would show between the two as a line down
151
+ * the hinge.
152
+ */
153
+ export declare const OVER = 2;
154
+ /** `OVER` for a screen drawn `density` display px a css px. */
155
+ export declare function overOf(density: number): number;
156
+ /**
157
+ * The page on a side's screen of the half that turns, seen through a frame:
158
+ * a window over `box`, the render's px every frame lies in, dark, and in it
159
+ * the part that turns, in its own css px, the pictures and the browser's bars
160
+ * as the screen lies, the dark of the picture and the shade of the turned
161
+ * screen, all laid flat. The window is cut to the turned screen, so none of
162
+ * its dark shows past the case. The page is drawn by WebGL2 where it can be,
163
+ * `margin` css px past its ends along the hinge, `density` display px a css px.
164
+ */
165
+ export declare function gluedOf(side: Face, picture: Picture, turning: Turning, across: boolean, box: Rect, margin: number, density: number): Glued;
166
+ /** Put `shot` on a glued screen: drawn by WebGL2, which hands it to the pictures laid over each other where it cannot. */
167
+ export declare function paintGlued(glued: Glued, shot: HTMLCanvasElement): void;
@@ -0,0 +1,98 @@
1
+ import type { Mock, Rect } from "./mock";
2
+ import { type TurnScene } from "./turnrun";
3
+ import type { ViewportValue } from "./width";
4
+ /**
5
+ * Folds a foldable open or shut in view, as the phone does. The frame's own device stays live and sharp: open, as the half
6
+ * of it that stays, and shut, for the last of the way there. A copy of the
7
+ * body of the half that turns turns about the hinge on a layer over it, and
8
+ * its screen is a window onto a picture of the page that lies flat, as
9
+ * Apple's does: the picture is cut to where the turned screen is seen, dark
10
+ * past its edge, blurred a few ever softer ways over the part the wipe
11
+ * reaches, and the turned screen's shade goes over it. The hinge sets how
12
+ * far it has turned and how the screens are lit and blurred: it goes at one
13
+ * speed, start to end, a whole fold in `FOLD_TIME` ms, and through its spring
14
+ * only while a hand holds it. Close
15
+ * to shut and to open the copy fades into the device. Each frame changes only
16
+ * transforms, the window's outline, gradients, masks and opacities. What it
17
+ * needs of the frame comes in a `FoldScene`, so it holds no node of its own.
18
+ *
19
+ * A fold the knobs start waits at rest where it starts, the device shown as
20
+ * it is drawn, till the pictures of the page as the browser draws it are in,
21
+ * and the Duo's frames where it draws them, or `FOLD_WAIT` ms at most: its
22
+ * hinge moves from the next frame, so what turns is sharp from the first. A
23
+ * hand on the hinge ends the wait, and a fold back meanwhile lands where it
24
+ * started. One a hand starts does not wait, as it stays till the hand moves.
25
+ *
26
+ * A fold of the Duo in its bezels decodes the Duo's fold frames round the
27
+ * hinge's angle as it goes, and once the first are in draws the half that
28
+ * turns as the frame nearest that angle instead, rendered from Apple's model,
29
+ * exactly as it was rendered, never warped, and its screen, by that frame's
30
+ * own corners, a window onto the page lying flat, as Apple projects it: its
31
+ * picture, blurs and shades stay still, and the window is dark where it
32
+ * reaches past them. The case of the half that stays is drawn from the same
33
+ * render, over the device's own, whose live page shows through it, so both
34
+ * halves meet at the hinge in the same size and shade. It fades in over the
35
+ * device's bezel picture as the hinge leaves an end, and once the hinge is
36
+ * still at an end the whole render fades out to the device as it is drawn at
37
+ * rest. All of it, the device under it too, is drawn at the angle of the
38
+ * frame shown, not the hinge's, so the whole changes as one picture, a frame
39
+ * at a time, and nothing is written between two. Till the frames are in, or
40
+ * where one fails, it turns the copies. Those a fold from the end it lands
41
+ * at starts with stay decoded while the Duo is shown at rest in its bezels,
42
+ * and all are let go of once it is not.
43
+ */
44
+ /** What a foldable folding asks of the frame, as it starts. */
45
+ export interface FoldScene extends TurnScene {
46
+ /** Put the layer the fold is drawn on over the device, under the readout. */
47
+ place(layer: HTMLElement): void;
48
+ /** The body drawn around the screen for the knobs. */
49
+ body(value: ViewportValue): Mock | null;
50
+ /** Where the screen would be drawn for the knobs, in the letterbox. */
51
+ screenFor(value: ViewportValue): Rect | null;
52
+ }
53
+ /** The foldable the frame shows, and the knobs it is drawn by. */
54
+ export interface Shown {
55
+ scene: FoldScene;
56
+ value: ViewportValue;
57
+ }
58
+ /** The frame says how to ask it for the foldable it shows, for the tuning hook. */
59
+ export declare function foldableShown(source: (() => Shown | null) | null): void;
60
+ /** Is a foldable folding? */
61
+ export declare function folding(): boolean;
62
+ /**
63
+ * Fold the device drawn as `from` to the posture `value` has, in view, and
64
+ * `draw` the knobs once it is there. It waits at rest where it starts till
65
+ * it has what it turns, `FOLD_WAIT` ms at most, then folds at one speed. A
66
+ * fold back while it folds turns round at once where it got to and goes back
67
+ * as fast, or lands where it started while it waits, and a hand on the hinge
68
+ * lets go of it.
69
+ * Without a scene or a place to go, the knobs are drawn at
70
+ * once. `held`, a hand takes the hinge instead, of the fold on its way or of
71
+ * one toward `value` that stays where it is till the hand moves it, with no
72
+ * wait, and nothing is drawn where there is none. True where it folds in view.
73
+ */
74
+ export declare function foldDevice(from: ViewportValue, value: ViewportValue, scene: FoldScene | null, draw: (value: ViewportValue) => void, held?: boolean): boolean;
75
+ /** Where the hand holding the hinge moves it to, 0 shut to 1 open, through the spring. False where none holds it. */
76
+ export declare function scrubFold(target: number): boolean;
77
+ /** The hand lets go of the hinge, which goes on to `stop` from where it is at a fold's one speed, at once where `snap`. False where there is no fold. */
78
+ export declare function releaseFold(stop: number, snap: boolean): boolean;
79
+ /** Does a hand hold the hinge? */
80
+ export declare function holdingHinge(): boolean;
81
+ /** Where a hand left the hinge between the ends, on its way there or resting, else null. */
82
+ export declare function foldRest(): number | null;
83
+ /** Hear when a fold is over, whichever way. Returns the way to stop. */
84
+ export declare function watchFold(watcher: () => void): () => void;
85
+ /** Hear where the hinge is drawn, 0 shut to 1 open, each time it is, and whether a hand sent it there. Returns the way to stop. */
86
+ export declare function watchHinge(watcher: (open: number, hand: boolean) => void): () => void;
87
+ /**
88
+ * The fold goes on, and the frame takes these knobs once it is there. One a
89
+ * hand left between the ends lands as the knobs have it, as the frame cannot
90
+ * draw anything else about it while it stays.
91
+ */
92
+ export declare function holdFold(value: ViewportValue): void;
93
+ /** Land a fold where it goes, at once. */
94
+ export declare function finishFold(): void;
95
+ /** Stop a fold where it is, and show the device as it is drawn. */
96
+ export declare function stopFold(): void;
97
+ /** The frame is gone, and the fold with it. */
98
+ export declare function forgetFold(): void;
@@ -0,0 +1,142 @@
1
+ import { type BoxRing } from "../grab/boxmodel";
2
+ import type { DevknobsState, DevknobsStatePatch, PanelValue, SchemeValue } from "../types";
3
+ /** Marks the iframe the width knob renders the page in. */
4
+ export declare const FRAME_ATTRIBUTE = "data-devknobs-frame";
5
+ /**
6
+ * The same frame by window name. A page that cannot reach its frame element,
7
+ * such as one on `file:`, still knows it is framed and never opens a frame of
8
+ * its own.
9
+ */
10
+ export declare const FRAME_NAME = "devknobs-frame";
11
+ /** The smallest and the largest frame width or height, in px. */
12
+ export declare const SIZE_MIN = 120;
13
+ export declare const SIZE_MAX = 8192;
14
+ /** The smallest and the largest device pixel ratio inside the frame. */
15
+ export declare const DPR_MIN = 0.25;
16
+ export declare const DPR_MAX = 5;
17
+ /** What a zoom key asks of the frame: a step in or out, or back to fit. */
18
+ export type ZoomAction = "zoom-in" | "zoom-out" | "zoom-fit";
19
+ /** What a key pressed inside the frame asks of the panel above it. */
20
+ export type KeyAction = "toggle" | "close" | "replay" | "requests" | "reset" | "storage" | "search" | ZoomAction;
21
+ /** Everything the page and its frame say to each other. */
22
+ export type DevknobsMessage =
23
+ /** `native`: whether the host's driver is on above, so the frame emulates its knobs while it is off. */
24
+ {
25
+ source: "devknobs";
26
+ type: "state";
27
+ state: DevknobsState;
28
+ native?: boolean;
29
+ } | {
30
+ source: "devknobs";
31
+ type: "key";
32
+ action: KeyAction;
33
+ } | {
34
+ source: "devknobs";
35
+ type: "overflow";
36
+ count: number;
37
+ } | {
38
+ source: "devknobs";
39
+ type: "grab" | "inspect";
40
+ on: boolean;
41
+ scheme?: "light" | "dark";
42
+ }
43
+ /** `picked`: inspect took an element in the frame. `outline`: the frame is to box another. */
44
+ | {
45
+ source: "devknobs";
46
+ type: "ready" | "replay" | "picked" | "outline";
47
+ }
48
+ /** The frame is to tint one area of the box it outlines, or with null all four. */
49
+ | {
50
+ source: "devknobs";
51
+ type: "area";
52
+ ring: BoxRing | null;
53
+ }
54
+ /** The frame's page is going to another origin, which the window above goes to instead. */
55
+ | {
56
+ source: "devknobs";
57
+ type: "leave";
58
+ url: string;
59
+ };
60
+ /** The parts of a `MessageEvent` that decide whether devknobs reads it. */
61
+ export interface Envelope {
62
+ data: unknown;
63
+ origin: string;
64
+ source: unknown;
65
+ }
66
+ /** Is this page the one the width knob renders inside its frame? */
67
+ export declare function isDevknobsFrame(): boolean;
68
+ /**
69
+ * Inside the frame: does the frame element carry the scheme? The page above
70
+ * only sets it there when the browser hands it down as this page's real
71
+ * `prefers-color-scheme`, so there is nothing left to emulate.
72
+ */
73
+ export declare function nativeScheme(scheme: SchemeValue): boolean;
74
+ export declare function handsSchemeDown(root: Node): boolean;
75
+ /** The knobs that bring the frame up. */
76
+ export type FrameKnobs = Pick<DevknobsState, "width" | "height" | "frame" | "dpr" | "vision">;
77
+ /** Each of those knobs at the value that leaves the frame down. */
78
+ export declare const UNFRAMED: FrameKnobs;
79
+ /**
80
+ * The frame leaving on its own: every knob that keeps it up off and the panel
81
+ * unpinned. No device as well, so the browser it brought goes as picking none does.
82
+ */
83
+ export declare const EXITED: DevknobsStatePatch;
84
+ /** The frame knobs, with the panel where it can be pinned to its side. */
85
+ export type Framing = FrameKnobs & {
86
+ panel?: Pick<PanelValue, "docked">;
87
+ };
88
+ /**
89
+ * Does any knob need the page inside the frame? Device pixels only exist in a
90
+ * frame. Vision does too: its filter on the frame leaves the panel alone and
91
+ * fixed elements in place, where one on `<html>` would not.
92
+ */
93
+ export declare function knobFrame(knobs: FrameKnobs): boolean;
94
+ /**
95
+ * Is the page inside the frame? A knob puts it there, and so does a panel
96
+ * pinned to its side: only a frame gives the page a viewport that ends where
97
+ * the panel starts, for its media queries, `100vw` and fixed boxes alike.
98
+ */
99
+ export declare function needsFrame(knobs: Framing): boolean;
100
+ /**
101
+ * Is the frame up for a pinned panel alone? Then it is the page as it was,
102
+ * edge to edge in the room the panel leaves: no mat shows, and no zoom.
103
+ */
104
+ export declare function plainFrame(knobs: Framing): boolean;
105
+ /**
106
+ * Is the frame up whatever the frame knob says? A size, a ratio or a vision
107
+ * deficiency brings it up alone, and the knob then changes nothing to see.
108
+ */
109
+ export declare function frameForced(knobs: Framing): boolean;
110
+ /**
111
+ * The knobs a framed page runs with. It is the viewport already, so it never
112
+ * frames itself, for a knob or for a pinned panel.
113
+ */
114
+ export declare function framed(state: DevknobsState): DevknobsState;
115
+ /**
116
+ * Read a devknobs message sent by `from` on `origin`. Anything from another
117
+ * window or origin, or in another shape, is null.
118
+ */
119
+ export declare function readMessage(event: Envelope, from: object | null, origin: string): DevknobsMessage | null;
120
+ /** What the frame needs of a Navigation API `navigate` event, where the browser has it. */
121
+ export interface FrameNavigation {
122
+ navigationType: string;
123
+ hashChange: boolean;
124
+ cancelable: boolean;
125
+ downloadRequest: string | null;
126
+ formData: FormData | null;
127
+ destination: {
128
+ url: string;
129
+ };
130
+ }
131
+ /**
132
+ * Where the window above goes in place of the frame's page, which sets off for
133
+ * another origin, or null where the frame goes itself. A form's post keeps its
134
+ * body in the frame: the window above could only follow it with a get.
135
+ */
136
+ export declare function leaveFor(navigate: FrameNavigation, origin: string): string | null;
137
+ /**
138
+ * Post to a window on this origin. A window on any other origin never sees it,
139
+ * nor does a frame that holds the browser's error page for a refused load:
140
+ * reading its origin throws, where posting to it would log an error.
141
+ */
142
+ export declare function post(target: Window | null, message: DevknobsMessage): void;