@vinena/knobs 0.0.0-stage → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (471) hide show
  1. package/CHANGELOG.md +228 -0
  2. package/LICENSE +21 -0
  3. package/README.md +110 -2
  4. package/THIRD_PARTY_NOTICES.md +429 -0
  5. package/dist/bezels/duo-fold/fold-000.webp +0 -0
  6. package/dist/bezels/duo-fold/fold-001.webp +0 -0
  7. package/dist/bezels/duo-fold/fold-002.webp +0 -0
  8. package/dist/bezels/duo-fold/fold-003.webp +0 -0
  9. package/dist/bezels/duo-fold/fold-004.webp +0 -0
  10. package/dist/bezels/duo-fold/fold-005.webp +0 -0
  11. package/dist/bezels/duo-fold/fold-006.webp +0 -0
  12. package/dist/bezels/duo-fold/fold-007.webp +0 -0
  13. package/dist/bezels/duo-fold/fold-008.webp +0 -0
  14. package/dist/bezels/duo-fold/fold-009.webp +0 -0
  15. package/dist/bezels/duo-fold/fold-010.webp +0 -0
  16. package/dist/bezels/duo-fold/fold-011.webp +0 -0
  17. package/dist/bezels/duo-fold/fold-012.webp +0 -0
  18. package/dist/bezels/duo-fold/fold-013.webp +0 -0
  19. package/dist/bezels/duo-fold/fold-014.webp +0 -0
  20. package/dist/bezels/duo-fold/fold-015.webp +0 -0
  21. package/dist/bezels/duo-fold/fold-016.webp +0 -0
  22. package/dist/bezels/duo-fold/fold-017.webp +0 -0
  23. package/dist/bezels/duo-fold/fold-018.webp +0 -0
  24. package/dist/bezels/duo-fold/fold-019.webp +0 -0
  25. package/dist/bezels/duo-fold/fold-020.webp +0 -0
  26. package/dist/bezels/duo-fold/fold-021.webp +0 -0
  27. package/dist/bezels/duo-fold/fold-022.webp +0 -0
  28. package/dist/bezels/duo-fold/fold-023.webp +0 -0
  29. package/dist/bezels/duo-fold/fold-024.webp +0 -0
  30. package/dist/bezels/duo-fold/fold-025.webp +0 -0
  31. package/dist/bezels/duo-fold/fold-026.webp +0 -0
  32. package/dist/bezels/duo-fold/fold-027.webp +0 -0
  33. package/dist/bezels/duo-fold/fold-028.webp +0 -0
  34. package/dist/bezels/duo-fold/fold-029.webp +0 -0
  35. package/dist/bezels/duo-fold/fold-030.webp +0 -0
  36. package/dist/bezels/duo-fold/fold-031.webp +0 -0
  37. package/dist/bezels/duo-fold/fold-032.webp +0 -0
  38. package/dist/bezels/duo-fold/fold-033.webp +0 -0
  39. package/dist/bezels/duo-fold/fold-034.webp +0 -0
  40. package/dist/bezels/duo-fold/fold-035.webp +0 -0
  41. package/dist/bezels/duo-fold/fold-036.webp +0 -0
  42. package/dist/bezels/duo-fold/fold-037.webp +0 -0
  43. package/dist/bezels/duo-fold/fold-038.webp +0 -0
  44. package/dist/bezels/duo-fold/fold-039.webp +0 -0
  45. package/dist/bezels/duo-fold/fold-040.webp +0 -0
  46. package/dist/bezels/duo-fold/fold-041.webp +0 -0
  47. package/dist/bezels/duo-fold/fold-042.webp +0 -0
  48. package/dist/bezels/duo-fold/fold-043.webp +0 -0
  49. package/dist/bezels/duo-fold/fold-044.webp +0 -0
  50. package/dist/bezels/duo-fold/fold-045.webp +0 -0
  51. package/dist/bezels/duo-fold/fold-046.webp +0 -0
  52. package/dist/bezels/duo-fold/fold-047.webp +0 -0
  53. package/dist/bezels/duo-fold/fold-048.webp +0 -0
  54. package/dist/bezels/duo-fold/fold-049.webp +0 -0
  55. package/dist/bezels/duo-fold/fold-050.webp +0 -0
  56. package/dist/bezels/duo-fold/fold-051.webp +0 -0
  57. package/dist/bezels/duo-fold/fold-052.webp +0 -0
  58. package/dist/bezels/duo-fold/fold-053.webp +0 -0
  59. package/dist/bezels/duo-fold/fold-054.webp +0 -0
  60. package/dist/bezels/duo-fold/fold-055.webp +0 -0
  61. package/dist/bezels/duo-fold/fold-056.webp +0 -0
  62. package/dist/bezels/duo-fold/fold-057.webp +0 -0
  63. package/dist/bezels/duo-fold/fold-058.webp +0 -0
  64. package/dist/bezels/duo-fold/fold-059.webp +0 -0
  65. package/dist/bezels/duo-fold/fold-060.webp +0 -0
  66. package/dist/bezels/duo-fold/fold-061.webp +0 -0
  67. package/dist/bezels/duo-fold/fold-062.webp +0 -0
  68. package/dist/bezels/duo-fold/fold-063.webp +0 -0
  69. package/dist/bezels/duo-fold/fold-064.webp +0 -0
  70. package/dist/bezels/duo-fold/fold-065.webp +0 -0
  71. package/dist/bezels/duo-fold/fold-066.webp +0 -0
  72. package/dist/bezels/duo-fold/fold-067.webp +0 -0
  73. package/dist/bezels/duo-fold/fold-068.webp +0 -0
  74. package/dist/bezels/duo-fold/fold-069.webp +0 -0
  75. package/dist/bezels/duo-fold/fold-070.webp +0 -0
  76. package/dist/bezels/duo-fold/fold-071.webp +0 -0
  77. package/dist/bezels/duo-fold/fold-072.webp +0 -0
  78. package/dist/bezels/duo-fold/fold-073.webp +0 -0
  79. package/dist/bezels/duo-fold/fold-074.webp +0 -0
  80. package/dist/bezels/duo-fold/fold-075.webp +0 -0
  81. package/dist/bezels/duo-fold/fold-076.webp +0 -0
  82. package/dist/bezels/duo-fold/fold-077.webp +0 -0
  83. package/dist/bezels/duo-fold/fold-078.webp +0 -0
  84. package/dist/bezels/duo-fold/fold-079.webp +0 -0
  85. package/dist/bezels/duo-fold/fold-080.webp +0 -0
  86. package/dist/bezels/duo-fold/fold-081.webp +0 -0
  87. package/dist/bezels/duo-fold/fold-082.webp +0 -0
  88. package/dist/bezels/duo-fold/fold-083.webp +0 -0
  89. package/dist/bezels/duo-fold/fold-084.webp +0 -0
  90. package/dist/bezels/duo-fold/fold-085.webp +0 -0
  91. package/dist/bezels/duo-fold/fold-086.webp +0 -0
  92. package/dist/bezels/duo-fold/fold-087.webp +0 -0
  93. package/dist/bezels/duo-fold/fold-088.webp +0 -0
  94. package/dist/bezels/duo-fold/fold-089.webp +0 -0
  95. package/dist/bezels/duo-fold/fold-090.webp +0 -0
  96. package/dist/bezels/duo-fold/fold-091.webp +0 -0
  97. package/dist/bezels/duo-fold/fold-092.webp +0 -0
  98. package/dist/bezels/duo-fold/fold-093.webp +0 -0
  99. package/dist/bezels/duo-fold/fold-094.webp +0 -0
  100. package/dist/bezels/duo-fold/fold-095.webp +0 -0
  101. package/dist/bezels/duo-fold/fold-096.webp +0 -0
  102. package/dist/bezels/duo-fold/fold-097.webp +0 -0
  103. package/dist/bezels/duo-fold/fold-098.webp +0 -0
  104. package/dist/bezels/duo-fold/fold-099.webp +0 -0
  105. package/dist/bezels/duo-fold/fold-100.webp +0 -0
  106. package/dist/bezels/duo-fold/fold-101.webp +0 -0
  107. package/dist/bezels/duo-fold/fold-102.webp +0 -0
  108. package/dist/bezels/duo-fold/fold-103.webp +0 -0
  109. package/dist/bezels/duo-fold/fold-104.webp +0 -0
  110. package/dist/bezels/duo-fold/fold-105.webp +0 -0
  111. package/dist/bezels/duo-fold/fold-106.webp +0 -0
  112. package/dist/bezels/duo-fold/fold-107.webp +0 -0
  113. package/dist/bezels/duo-fold/fold-108.webp +0 -0
  114. package/dist/bezels/duo-fold/fold-109.webp +0 -0
  115. package/dist/bezels/duo-fold/fold-110.webp +0 -0
  116. package/dist/bezels/duo-fold/fold-111.webp +0 -0
  117. package/dist/bezels/duo-fold/fold-112.webp +0 -0
  118. package/dist/bezels/duo-fold/fold-113.webp +0 -0
  119. package/dist/bezels/duo-fold/fold-114.webp +0 -0
  120. package/dist/bezels/duo-fold/fold-115.webp +0 -0
  121. package/dist/bezels/duo-fold/fold-116.webp +0 -0
  122. package/dist/bezels/duo-fold/fold-117.webp +0 -0
  123. package/dist/bezels/duo-fold/fold-118.webp +0 -0
  124. package/dist/bezels/duo-fold/fold-119.webp +0 -0
  125. package/dist/bezels/duo-fold/fold-120.webp +0 -0
  126. package/dist/bezels/duo-fold/fold-121.webp +0 -0
  127. package/dist/bezels/duo-fold/fold-122.webp +0 -0
  128. package/dist/bezels/duo-fold/fold-123.webp +0 -0
  129. package/dist/bezels/duo-fold/fold-124.webp +0 -0
  130. package/dist/bezels/duo-fold/fold-125.webp +0 -0
  131. package/dist/bezels/duo-fold/fold-126.webp +0 -0
  132. package/dist/bezels/duo-fold/fold-127.webp +0 -0
  133. package/dist/bezels/duo-fold/fold-128.webp +0 -0
  134. package/dist/bezels/duo-fold/fold-129.webp +0 -0
  135. package/dist/bezels/duo-fold/fold-130.webp +0 -0
  136. package/dist/bezels/duo-fold/fold-131.webp +0 -0
  137. package/dist/bezels/duo-fold/fold-132.webp +0 -0
  138. package/dist/bezels/duo-fold/fold-133.webp +0 -0
  139. package/dist/bezels/duo-fold/fold-134.webp +0 -0
  140. package/dist/bezels/duo-fold/fold-135.webp +0 -0
  141. package/dist/bezels/duo-fold/fold-136.webp +0 -0
  142. package/dist/bezels/duo-fold/fold-137.webp +0 -0
  143. package/dist/bezels/duo-fold/fold-138.webp +0 -0
  144. package/dist/bezels/duo-fold/fold-139.webp +0 -0
  145. package/dist/bezels/duo-fold/fold-140.webp +0 -0
  146. package/dist/bezels/duo-fold/fold-141.webp +0 -0
  147. package/dist/bezels/duo-fold/fold-142.webp +0 -0
  148. package/dist/bezels/duo-fold/fold-143.webp +0 -0
  149. package/dist/bezels/duo-fold/fold-144.webp +0 -0
  150. package/dist/bezels/duo-fold/fold-145.webp +0 -0
  151. package/dist/bezels/duo-fold/fold-146.webp +0 -0
  152. package/dist/bezels/duo-fold/fold-147.webp +0 -0
  153. package/dist/bezels/duo-fold/fold-148.webp +0 -0
  154. package/dist/bezels/duo-fold/fold-149.webp +0 -0
  155. package/dist/bezels/duo-fold/fold-150.webp +0 -0
  156. package/dist/bezels/duo-fold/fold-151.webp +0 -0
  157. package/dist/bezels/duo-fold/fold-152.webp +0 -0
  158. package/dist/bezels/duo-fold/fold-153.webp +0 -0
  159. package/dist/bezels/duo-fold/fold-154.webp +0 -0
  160. package/dist/bezels/duo-fold/fold-155.webp +0 -0
  161. package/dist/bezels/duo-fold/fold-156.webp +0 -0
  162. package/dist/bezels/duo-fold/fold-157.webp +0 -0
  163. package/dist/bezels/duo-fold/fold-158.webp +0 -0
  164. package/dist/bezels/duo-fold/fold-159.webp +0 -0
  165. package/dist/bezels/duo-fold/fold-160.webp +0 -0
  166. package/dist/bezels/duo-fold/fold-161.webp +0 -0
  167. package/dist/bezels/duo-fold/fold-162.webp +0 -0
  168. package/dist/bezels/duo-fold/fold-163.webp +0 -0
  169. package/dist/bezels/duo-fold/fold-164.webp +0 -0
  170. package/dist/bezels/duo-fold/fold-165.webp +0 -0
  171. package/dist/bezels/duo-fold/fold-166.webp +0 -0
  172. package/dist/bezels/duo-fold/fold-167.webp +0 -0
  173. package/dist/bezels/duo-fold/fold-168.webp +0 -0
  174. package/dist/bezels/duo-fold/fold-169.webp +0 -0
  175. package/dist/bezels/duo-fold/fold-170.webp +0 -0
  176. package/dist/bezels/duo-fold/fold-171.webp +0 -0
  177. package/dist/bezels/duo-fold/fold-172.webp +0 -0
  178. package/dist/bezels/duo-fold/fold-173.webp +0 -0
  179. package/dist/bezels/duo-fold/fold-174.webp +0 -0
  180. package/dist/bezels/duo-fold/fold-175.webp +0 -0
  181. package/dist/bezels/duo-fold/fold-176.webp +0 -0
  182. package/dist/bezels/duo-fold/fold-177.webp +0 -0
  183. package/dist/bezels/duo-fold/fold-178.webp +0 -0
  184. package/dist/bezels/duo-fold/fold-179.webp +0 -0
  185. package/dist/bezels/duo-fold/fold-180.webp +0 -0
  186. package/dist/bezels/duo-fold/still-000.webp +0 -0
  187. package/dist/bezels/duo-fold/still-161.webp +0 -0
  188. package/dist/bezels/duo-fold/still-162.webp +0 -0
  189. package/dist/bezels/duo-fold/still-163.webp +0 -0
  190. package/dist/bezels/duo-fold/still-164.webp +0 -0
  191. package/dist/bezels/duo-fold/still-165.webp +0 -0
  192. package/dist/bezels/duo-fold/still-166.webp +0 -0
  193. package/dist/bezels/duo-fold/still-167.webp +0 -0
  194. package/dist/bezels/duo-fold/still-168.webp +0 -0
  195. package/dist/bezels/duo-fold/still-169.webp +0 -0
  196. package/dist/bezels/duo-fold/still-170.webp +0 -0
  197. package/dist/bezels/duo-fold/still-171.webp +0 -0
  198. package/dist/bezels/duo-fold/still-172.webp +0 -0
  199. package/dist/bezels/duo-fold/still-173.webp +0 -0
  200. package/dist/bezels/duo-fold/still-174.webp +0 -0
  201. package/dist/bezels/duo-fold/still-175.webp +0 -0
  202. package/dist/bezels/duo-fold/still-176.webp +0 -0
  203. package/dist/bezels/duo-fold/still-177.webp +0 -0
  204. package/dist/bezels/duo-fold/still-178.webp +0 -0
  205. package/dist/bezels/duo-fold/still-179.webp +0 -0
  206. package/dist/bezels/duo-fold/still-180.webp +0 -0
  207. package/dist/bezels/iphone-16-plus.webp +0 -0
  208. package/dist/bezels/iphone-16-pro-max.webp +0 -0
  209. package/dist/bezels/iphone-16-pro.webp +0 -0
  210. package/dist/bezels/iphone-16.webp +0 -0
  211. package/dist/bezels/iphone-17-pro-max.webp +0 -0
  212. package/dist/bezels/iphone-17-pro.webp +0 -0
  213. package/dist/bezels/iphone-17.webp +0 -0
  214. package/dist/bezels/iphone-18-pro-max.webp +0 -0
  215. package/dist/bezels/iphone-18-pro.webp +0 -0
  216. package/dist/bezels/iphone-air.webp +0 -0
  217. package/dist/bezels/iphone-duo-inner-open-landscape.webp +0 -0
  218. package/dist/bezels/iphone-duo-inner-open-portrait.webp +0 -0
  219. package/dist/bezels/iphone-duo-outer-closed.webp +0 -0
  220. package/dist/bezels/iphone-se.webp +0 -0
  221. package/dist/bezels/pixel-10-pro-xl.webp +0 -0
  222. package/dist/bezels/pixel-10-pro.webp +0 -0
  223. package/dist/bezels/pixel-10.webp +0 -0
  224. package/dist/bezels/pixel-10a.webp +0 -0
  225. package/dist/bezels/pixel-9-pro-xl.webp +0 -0
  226. package/dist/bezels/pixel-9-pro.webp +0 -0
  227. package/dist/bezels/pixel-9.webp +0 -0
  228. package/dist/early.d.ts +1 -0
  229. package/dist/early.global.js +8 -0
  230. package/dist/elementsview-jnkbhzkj.js +2873 -0
  231. package/dist/elementsview-tf4qzmtw.js +2874 -0
  232. package/dist/engine/address.d.ts +31 -0
  233. package/dist/engine/animations.d.ts +13 -0
  234. package/dist/engine/barshot.d.ts +48 -0
  235. package/dist/engine/bezels.d.ts +140 -0
  236. package/dist/engine/bezelurls.d.ts +5 -0
  237. package/dist/engine/browserdraw.d.ts +57 -0
  238. package/dist/engine/browserkit.d.ts +59 -0
  239. package/dist/engine/browserui.d.ts +177 -0
  240. package/dist/engine/check.d.ts +8 -0
  241. package/dist/engine/chromedraw.d.ts +17 -0
  242. package/dist/engine/clock.d.ts +91 -0
  243. package/dist/engine/color.d.ts +37 -0
  244. package/dist/engine/describe.d.ts +49 -0
  245. package/dist/engine/devices.d.ts +96 -0
  246. package/dist/engine/dock.d.ts +53 -0
  247. package/dist/engine/endroom.d.ts +21 -0
  248. package/dist/engine/fit.d.ts +75 -0
  249. package/dist/engine/fold.d.ts +562 -0
  250. package/dist/engine/foldframes.d.ts +98 -0
  251. package/dist/engine/foldgl.d.ts +151 -0
  252. package/dist/engine/foldhand.d.ts +23 -0
  253. package/dist/engine/foldlook.d.ts +49 -0
  254. package/dist/engine/foldpage.d.ts +167 -0
  255. package/dist/engine/foldrun.d.ts +98 -0
  256. package/dist/engine/frame.d.ts +142 -0
  257. package/dist/engine/frameglide.d.ts +71 -0
  258. package/dist/engine/framekit.d.ts +7 -0
  259. package/dist/engine/frames.d.ts +42 -0
  260. package/dist/engine/fresh.d.ts +59 -0
  261. package/dist/engine/geo.d.ts +58 -0
  262. package/dist/engine/header.d.ts +16 -0
  263. package/dist/engine/identity.d.ts +27 -0
  264. package/dist/engine/index.d.ts +58 -0
  265. package/dist/engine/intl.d.ts +23 -0
  266. package/dist/engine/locale.d.ts +86 -0
  267. package/dist/engine/mat.d.ts +64 -0
  268. package/dist/engine/matchmedia.d.ts +25 -0
  269. package/dist/engine/matcolors.d.ts +45 -0
  270. package/dist/engine/matsplash.d.ts +81 -0
  271. package/dist/engine/media.d.ts +55 -0
  272. package/dist/engine/mock.d.ts +65 -0
  273. package/dist/engine/mockdata.d.ts +42 -0
  274. package/dist/engine/mockdraw.d.ts +21 -0
  275. package/dist/engine/morph.d.ts +214 -0
  276. package/dist/engine/morphrun.d.ts +49 -0
  277. package/dist/engine/native.d.ts +129 -0
  278. package/dist/engine/network.d.ts +8 -0
  279. package/dist/engine/notice.d.ts +15 -0
  280. package/dist/engine/objectfit.d.ts +35 -0
  281. package/dist/engine/outlines.d.ts +2 -0
  282. package/dist/engine/overflow.d.ts +11 -0
  283. package/dist/engine/owninline.d.ts +16 -0
  284. package/dist/engine/pagefonts.d.ts +21 -0
  285. package/dist/engine/pageshot.d.ts +127 -0
  286. package/dist/engine/placeholder.d.ts +89 -0
  287. package/dist/engine/pseudo.d.ts +15 -0
  288. package/dist/engine/ready.d.ts +9 -0
  289. package/dist/engine/reload.d.ts +35 -0
  290. package/dist/engine/remount.d.ts +30 -0
  291. package/dist/engine/replay.d.ts +7 -0
  292. package/dist/engine/safaridraw.d.ts +22 -0
  293. package/dist/engine/scrollbars.d.ts +17 -0
  294. package/dist/engine/scrollkeep.d.ts +124 -0
  295. package/dist/engine/spacing.d.ts +2 -0
  296. package/dist/engine/speed.d.ts +11 -0
  297. package/dist/engine/store.d.ts +68 -0
  298. package/dist/engine/stored.d.ts +17 -0
  299. package/dist/engine/style.d.ts +27 -0
  300. package/dist/engine/system.d.ts +15 -0
  301. package/dist/engine/text.d.ts +53 -0
  302. package/dist/engine/time.d.ts +32 -0
  303. package/dist/engine/touch.d.ts +20 -0
  304. package/dist/engine/touchdot.d.ts +71 -0
  305. package/dist/engine/touchmark.d.ts +27 -0
  306. package/dist/engine/touchpointer.d.ts +113 -0
  307. package/dist/engine/tree.d.ts +9 -0
  308. package/dist/engine/turnrun.d.ts +74 -0
  309. package/dist/engine/ua.d.ts +55 -0
  310. package/dist/engine/underneath.d.ts +7 -0
  311. package/dist/engine/viewportcss.d.ts +7 -0
  312. package/dist/engine/vision.d.ts +3 -0
  313. package/dist/engine/width.d.ts +56 -0
  314. package/dist/engine/zoom.d.ts +33 -0
  315. package/dist/framekit-3n7p79ht.js +8839 -0
  316. package/dist/framekit-g96t6nmq.js +8838 -0
  317. package/dist/global.d.ts +1 -0
  318. package/dist/grab/boxmodel.d.ts +109 -0
  319. package/dist/grab/boxtext.d.ts +17 -0
  320. package/dist/grab/card.d.ts +45 -0
  321. package/dist/grab/cardread.d.ts +22 -0
  322. package/dist/grab/cardview.d.ts +18 -0
  323. package/dist/grab/clipboard.d.ts +8 -0
  324. package/dist/grab/colors.d.ts +31 -0
  325. package/dist/grab/colorvalue.d.ts +40 -0
  326. package/dist/grab/context.d.ts +25 -0
  327. package/dist/grab/control.d.ts +37 -0
  328. package/dist/grab/copy.d.ts +7 -0
  329. package/dist/grab/dwell.d.ts +29 -0
  330. package/dist/grab/fiber.d.ts +17 -0
  331. package/dist/grab/fontused.d.ts +23 -0
  332. package/dist/grab/hit.d.ts +19 -0
  333. package/dist/grab/hook.d.ts +7 -0
  334. package/dist/grab/index.d.ts +9 -0
  335. package/dist/grab/inspect.d.ts +31 -0
  336. package/dist/grab/keys.d.ts +84 -0
  337. package/dist/grab/locate.d.ts +63 -0
  338. package/dist/grab/mode.d.ts +56 -0
  339. package/dist/grab/navigate.d.ts +21 -0
  340. package/dist/grab/outline.d.ts +16 -0
  341. package/dist/grab/overlay.d.ts +135 -0
  342. package/dist/grab/paint.d.ts +7 -0
  343. package/dist/grab/paths.d.ts +27 -0
  344. package/dist/grab/picks.d.ts +9 -0
  345. package/dist/grab/place.d.ts +25 -0
  346. package/dist/grab/preview.d.ts +12 -0
  347. package/dist/grab/selector.d.ts +15 -0
  348. package/dist/grab/source.d.ts +68 -0
  349. package/dist/grab/stack.d.ts +49 -0
  350. package/dist/grab/theme.d.ts +85 -0
  351. package/dist/grab/types.d.ts +52 -0
  352. package/dist/host.d.ts +7 -0
  353. package/dist/index-0casarhy.js +324 -0
  354. package/dist/index-2d6wvs8h.js +528 -0
  355. package/dist/index-33x9hxe3.js +4563 -0
  356. package/dist/index-5baxvd3v.js +4424 -0
  357. package/dist/index-78r0f8pw.js +27 -0
  358. package/dist/index-d0cjxjsm.js +21 -0
  359. package/dist/index-dvr4x91q.js +4800 -0
  360. package/dist/index-k015tb6c.js +357 -0
  361. package/dist/index-ke6v7919.js +4801 -0
  362. package/dist/index-peh33xjv.js +346 -0
  363. package/dist/index-ztnjefrh.js +23 -0
  364. package/dist/index-zvze25nf.js +686 -0
  365. package/dist/index.d.ts +116 -0
  366. package/dist/index.global.js +2655 -0
  367. package/dist/index.js +9262 -0
  368. package/dist/instance.d.ts +29 -0
  369. package/dist/react-65tgdbs8.js +22 -0
  370. package/dist/react-71a9ypex.js +529 -0
  371. package/dist/react-adky72h9.js +29 -0
  372. package/dist/react-carf84xv.js +4420 -0
  373. package/dist/react-eygws6cx.js +358 -0
  374. package/dist/react-h9w04skh.js +25 -0
  375. package/dist/react-pdvseef0.js +325 -0
  376. package/dist/react-qv0nykcv.js +4564 -0
  377. package/dist/react-sq9pkw4k.js +687 -0
  378. package/dist/react-xxfpfddf.js +347 -0
  379. package/dist/react.d.ts +6 -0
  380. package/dist/react.js +9255 -0
  381. package/dist/requests/body.d.ts +44 -0
  382. package/dist/requests/eventsource.d.ts +14 -0
  383. package/dist/requests/fetch.d.ts +14 -0
  384. package/dist/requests/index.d.ts +35 -0
  385. package/dist/requests/patch.d.ts +17 -0
  386. package/dist/requests/quiet.d.ts +12 -0
  387. package/dist/requests/record.d.ts +40 -0
  388. package/dist/requests/resource.d.ts +28 -0
  389. package/dist/requests/shared.d.ts +34 -0
  390. package/dist/requests/stack.d.ts +7 -0
  391. package/dist/requests/store.d.ts +37 -0
  392. package/dist/requests/types.d.ts +140 -0
  393. package/dist/requests/xhr.d.ts +16 -0
  394. package/dist/storage/cache.d.ts +32 -0
  395. package/dist/storage/clear.d.ts +35 -0
  396. package/dist/storage/cookies.d.ts +71 -0
  397. package/dist/storage/format.d.ts +53 -0
  398. package/dist/storage/idb.d.ts +62 -0
  399. package/dist/storage/onload.d.ts +47 -0
  400. package/dist/storage/presets.d.ts +79 -0
  401. package/dist/storage/site.d.ts +51 -0
  402. package/dist/storage/web.d.ts +57 -0
  403. package/dist/storageview-sb23henh.js +2729 -0
  404. package/dist/storageview-vf8v8q8j.js +2728 -0
  405. package/dist/styles/cascade.d.ts +59 -0
  406. package/dist/styles/collect.d.ts +73 -0
  407. package/dist/styles/declarations.d.ts +30 -0
  408. package/dist/styles/index.d.ts +20 -0
  409. package/dist/styles/inherited.d.ts +5 -0
  410. package/dist/styles/match.d.ts +41 -0
  411. package/dist/styles/selector.d.ts +36 -0
  412. package/dist/styles/tree.d.ts +14 -0
  413. package/dist/styles/types.d.ts +117 -0
  414. package/dist/styles/varrefs.d.ts +35 -0
  415. package/dist/types.d.ts +221 -0
  416. package/dist/ui/actions.d.ts +26 -0
  417. package/dist/ui/bindings.d.ts +89 -0
  418. package/dist/ui/boxdiagram.d.ts +50 -0
  419. package/dist/ui/catalog.d.ts +195 -0
  420. package/dist/ui/colors.d.ts +51 -0
  421. package/dist/ui/column.d.ts +22 -0
  422. package/dist/ui/copytext.d.ts +6 -0
  423. package/dist/ui/deviceknobs.d.ts +20 -0
  424. package/dist/ui/dockslide.d.ts +100 -0
  425. package/dist/ui/dom.d.ts +68 -0
  426. package/dist/ui/domtree.d.ts +143 -0
  427. package/dist/ui/drag.d.ts +34 -0
  428. package/dist/ui/editors.d.ts +30 -0
  429. package/dist/ui/elementsview.d.ts +32 -0
  430. package/dist/ui/foldslider.d.ts +48 -0
  431. package/dist/ui/footer.d.ts +51 -0
  432. package/dist/ui/hold.d.ts +20 -0
  433. package/dist/ui/icons.d.ts +145 -0
  434. package/dist/ui/inspector.d.ts +59 -0
  435. package/dist/ui/keys.d.ts +180 -0
  436. package/dist/ui/kit.d.ts +336 -0
  437. package/dist/ui/knobs.d.ts +41 -0
  438. package/dist/ui/list.d.ts +68 -0
  439. package/dist/ui/palette.d.ts +59 -0
  440. package/dist/ui/pane.d.ts +151 -0
  441. package/dist/ui/panel.d.ts +56 -0
  442. package/dist/ui/pin.d.ts +28 -0
  443. package/dist/ui/place.d.ts +136 -0
  444. package/dist/ui/prefs.d.ts +53 -0
  445. package/dist/ui/radio.d.ts +37 -0
  446. package/dist/ui/requestdetail.d.ts +56 -0
  447. package/dist/ui/requestformat.d.ts +142 -0
  448. package/dist/ui/requestparts.d.ts +312 -0
  449. package/dist/ui/requests.d.ts +48 -0
  450. package/dist/ui/rows.d.ts +72 -0
  451. package/dist/ui/search.d.ts +29 -0
  452. package/dist/ui/settings.d.ts +69 -0
  453. package/dist/ui/size.d.ts +105 -0
  454. package/dist/ui/slide.d.ts +46 -0
  455. package/dist/ui/stage.d.ts +24 -0
  456. package/dist/ui/storageaction.d.ts +22 -0
  457. package/dist/ui/storagecookies.d.ts +5 -0
  458. package/dist/ui/storagedeep.d.ts +18 -0
  459. package/dist/ui/storageparts.d.ts +131 -0
  460. package/dist/ui/storagepresets.d.ts +19 -0
  461. package/dist/ui/storageview.d.ts +45 -0
  462. package/dist/ui/storageweb.d.ts +11 -0
  463. package/dist/ui/styles.d.ts +1 -0
  464. package/dist/ui/stylesapplied.d.ts +46 -0
  465. package/dist/ui/stylesformat.d.ts +78 -0
  466. package/dist/ui/stylesview.d.ts +118 -0
  467. package/dist/ui/swatches.d.ts +26 -0
  468. package/dist/ui/syntax.d.ts +34 -0
  469. package/dist/ui/tooltip.d.ts +64 -0
  470. package/package.json +60 -4
  471. package/skills/devknobs/SKILL.md +214 -0
@@ -0,0 +1,71 @@
1
+ import type { PanelValue } from "../types";
2
+ import type { Rect } from "./mock";
3
+ import type { Point } from "./zoom";
4
+ /**
5
+ * The frame glides to its new place when the panel goes to the other side,
6
+ * opens or closes, or changes its width, and moves what the frame is fitted
7
+ * beside. What shows is measured before and after the frame is drawn there,
8
+ * moved back by the difference and let go, by `translate` and `scale` alone,
9
+ * so the case, the page and the bars glide as one and the page inside lays
10
+ * out once.
11
+ */
12
+ /** How long a glide takes at the least and at the most, in ms, as the panel's own. */
13
+ export declare const FRAME_GLIDE = 220;
14
+ export declare const FRAME_GLIDE_MAX = 440;
15
+ /**
16
+ * The panel as the frame is fitted beside it, and whether it is pinned there,
17
+ * which takes its room from the frame's.
18
+ */
19
+ export type PanelSpot = Pick<PanelValue, "open" | "side"> & {
20
+ docked?: boolean;
21
+ };
22
+ /** What decides whether a change of the knobs glides the frame. */
23
+ export interface GlideCue {
24
+ /** The knobs are applied for the first time, as on a reload. */
25
+ first: boolean;
26
+ /** The user asks for less motion, or the browser cannot animate. */
27
+ still: boolean;
28
+ /** A device change, turn or fold moves the frame already. */
29
+ moving: boolean;
30
+ from: PanelSpot;
31
+ to: PanelSpot;
32
+ /** The panel changed its width. */
33
+ sized?: boolean;
34
+ }
35
+ /**
36
+ * Does the frame glide? Only when the panel changed side or width, opened or
37
+ * closed, or was pinned or let go, never on the first paint, with less motion,
38
+ * or while the device moves.
39
+ */
40
+ export declare function glides(cue: GlideCue): boolean;
41
+ /** How far the frame is moved back and scaled, to show where it was. */
42
+ export interface Flip {
43
+ x: number;
44
+ y: number;
45
+ sx: number;
46
+ sy: number;
47
+ }
48
+ /**
49
+ * What takes the frame drawn at `after` back to where it showed at `before`,
50
+ * with its top left as the origin, or null where it did not move.
51
+ */
52
+ export declare function flipOf(before: Rect, after: Rect): Flip | null;
53
+ /** How long a glide over a distance in px takes, in ms: longer the farther it goes. */
54
+ export declare function frameGlideTime(distance: number): number;
55
+ /** Where the frame is drawn, as a key that changes when its place does. */
56
+ export declare function placeKey(at: Point, scale: number): string;
57
+ /** Is the frame gliding to its place? */
58
+ export declare function gliding(): boolean;
59
+ /** End a glide where it goes: the frame shows where it is drawn. */
60
+ export declare function landGlide(): void;
61
+ /**
62
+ * The frame was drawn at `key`. A glide toward another place, as the window
63
+ * resized or a picture came in, lands, as it no longer ends where it shows.
64
+ */
65
+ export declare function drawnAt(key: string): void;
66
+ /**
67
+ * Draw the frame with `draw`, and glide `node`, which holds the case and the
68
+ * page, from where it shows to there, as `cue` says. A glide on its way starts
69
+ * the next from where it got to.
70
+ */
71
+ export declare function glideFrame(node: HTMLElement | null, cue: Omit<GlideCue, "still" | "moving">, draw: () => void): void;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * The frame, the devices drawn round it and their folds, which `frames.ts`
3
+ * loads the first time the knobs need a frame.
4
+ */
5
+ export * as width from "./width";
6
+ export { foldRest, holdingHinge, letGo, moveHinge, takeHinge, watchFold, watchHinge } from "./foldhand";
7
+ export { landSplash } from "./matsplash";
@@ -0,0 +1,42 @@
1
+ import type { DevknobsState, ZoomValue } from "../types";
2
+ import { type ZoomAction } from "./frame";
3
+ import type { FrameRefusal } from "./native";
4
+ import type * as Kit from "./framekit";
5
+ /**
6
+ * The frame's side of the engine and the panel, which load the frame, its
7
+ * devices and their folds, `framekit.ts`, only the first time the knobs need
8
+ * a frame. Until then there is none, so each call answers as the frame does
9
+ * while it is down. Knobs that need one wait for it to load, the early
10
+ * script's stand-in over the page meanwhile, and the frame then draws from
11
+ * the knobs before them, as it would have.
12
+ */
13
+ type FrameKit = typeof Kit;
14
+ /** Load the frame's kit, once. Resolves once it is in and has drawn what the knobs ask. */
15
+ export declare function loadFrames(): Promise<void>;
16
+ /** For tests: load the kit from `next` in place of `framekit.ts`. */
17
+ export declare function loadKitWith(next: () => Promise<FrameKit>): void;
18
+ export declare function apply(state: DevknobsState): void;
19
+ export declare function sync(state: DevknobsState): void;
20
+ export declare function reset(): void;
21
+ export declare function onExit(handler: (() => void) | null): void;
22
+ export declare function onZoom(handler: ((zoom: ZoomValue) => void) | null): void;
23
+ export declare function onRefused(handler: ((url: string) => Promise<FrameRefusal | null>) | null): void;
24
+ export declare function onFramed(handler: ((open: boolean) => void | Promise<void>) | null): void;
25
+ /** The window inside the frame, while there is one. */
26
+ export declare function frameWindow(): Window | null;
27
+ /**
28
+ * Has the frame caught up with the knobs? Not while its kit loads for knobs
29
+ * that need one. A failed load clears the knobs it waited on.
30
+ */
31
+ export declare function idle(): boolean;
32
+ export declare function panelSized(glide: boolean): void;
33
+ export declare function zoomKey(action: ZoomAction): boolean;
34
+ export declare function landSplash(): void;
35
+ export declare function takeHinge(state: DevknobsState): boolean;
36
+ export declare function moveHinge(target: number): boolean;
37
+ export declare function letGo(stop: number): boolean;
38
+ export declare function holdingHinge(): boolean;
39
+ export declare function foldRest(): number | null;
40
+ export declare function watchFold(watcher: () => void): () => void;
41
+ export declare function watchHinge(watcher: (open: number, hand: boolean) => void): () => void;
42
+ export {};
@@ -0,0 +1,59 @@
1
+ /**
2
+ * Fresh mode, and the one way to web storage. With `devknobs=fresh` in the
3
+ * page's address, devknobs shows what a first visit sees: it leaves
4
+ * `localStorage` alone, and a load of the page it did not ask for starts with
5
+ * none of its items in `sessionStorage`. Every read and write devknobs makes
6
+ * for itself goes through `webStorage`, so the rule holds in one place. The
7
+ * storage view shows the page's own items, and reaches those directly.
8
+ */
9
+ /** The address parameter and the value that turn fresh mode on. */
10
+ export declare const FRESH_PARAM = "devknobs";
11
+ export declare const FRESH_VALUE = "fresh";
12
+ /** On the width knob's frame while the page above is in fresh mode. */
13
+ export declare const FRESH_ATTRIBUTE = "data-devknobs-fresh";
14
+ /** Where a reload devknobs is about to ask for is timed, in `sessionStorage`. */
15
+ export declare const FRESH_RELOAD_KEY = "devknobs:fresh-reload";
16
+ /** The version of the timing `FRESH_RELOAD_KEY` keeps. Bump it with a change of shape, see stored.ts. */
17
+ export declare const FRESH_RELOAD_VERSION = 1;
18
+ /** How long a reload devknobs asked for has to bring its page, in ms. A later load is the user's. */
19
+ export declare const FRESH_RELOAD_WINDOW = 10000;
20
+ /** Does this address query turn fresh mode on? */
21
+ export declare function freshIn(search: string): boolean;
22
+ /** Is `key` an item of devknobs that a load of the user's starts without? */
23
+ export declare function wiped(key: string): boolean;
24
+ /**
25
+ * Is this document in fresh mode? Settled once per document, before devknobs
26
+ * reads anything it keeps. The page settles it from its address, and starts
27
+ * its session over unless devknobs asked for this load. The copy in the width
28
+ * knob's frame follows the page above, and never drops anything.
29
+ */
30
+ export declare function fresh(): boolean;
31
+ /**
32
+ * Either storage, or null where it cannot be reached. In fresh mode there is
33
+ * no `localStorage`: what it keeps reads as nothing kept, and nothing is
34
+ * written over it.
35
+ */
36
+ export declare function webStorage(kind: "session" | "local"): Storage | null;
37
+ /**
38
+ * Does going from `from` to `target` load a page? Two addresses that differ in
39
+ * the hash alone are one document, and the browser loads nothing for the move.
40
+ */
41
+ export declare function loads(target: string, from: string): boolean;
42
+ /**
43
+ * `target` with the switch of fresh mode in its query, so the page there is in
44
+ * fresh mode too. The rest of the address stays as it is written. An address
45
+ * on another origin, or one that does not read, comes back as it is.
46
+ */
47
+ export declare function withFresh(target: string, origin: string): string;
48
+ /**
49
+ * Where the frame is, as the page takes it for its own address. In fresh mode
50
+ * it carries the switch, so a reload there, or the page's move there, stays in
51
+ * fresh mode.
52
+ */
53
+ export declare function carried(target: string): string;
54
+ /**
55
+ * Devknobs is about to reload the page, or send it elsewhere. In fresh mode
56
+ * the timing lets the next load tell it from one of the user's, and keep the
57
+ * session.
58
+ */
59
+ export declare function ownReload(): void;
@@ -0,0 +1,58 @@
1
+ import type { GeoValue } from "../types";
2
+ export interface GeoPreset {
3
+ id: string;
4
+ label: string;
5
+ lat: number;
6
+ lng: number;
7
+ timeZone: string;
8
+ }
9
+ export declare const GEO_PRESETS: GeoPreset[];
10
+ export declare const DEFAULT_ACCURACY = 20;
11
+ /** The `route` preset's pace, in km/h: a car in town. */
12
+ export declare const DEFAULT_SPEED = 40;
13
+ export interface GeoFix {
14
+ lat: number;
15
+ lng: number;
16
+ accuracy: number;
17
+ timeZone: string;
18
+ }
19
+ export declare function geoPreset(id: string): GeoPreset | undefined;
20
+ export interface RoutePoint {
21
+ lat: number;
22
+ lng: number;
23
+ }
24
+ /**
25
+ * The points of a route: the track points of a GPX file, else its route
26
+ * points, else its way points, or else one `lat,lng` pair per line. Points
27
+ * off the globe are dropped.
28
+ */
29
+ export declare function parseRoute(text: string): RoutePoint[];
30
+ /** Great circle distance between two points, in meters. */
31
+ export declare function distance(from: RoutePoint, to: RoutePoint): number;
32
+ /**
33
+ * Where a trip along the route stands after `meters`, and the heading it
34
+ * travels on. It starts over from the first point once it reaches the last.
35
+ * Straight in latitude and longitude between points, which at the scale of a
36
+ * track is as good as the great circle. A route that goes nowhere has no heading.
37
+ */
38
+ export declare function alongRoute(points: RoutePoint[], meters: number): RoutePoint & {
39
+ heading: number;
40
+ };
41
+ /** The position to report, or null when the knob is off or the preset is unknown. */
42
+ export declare function resolveGeo(value: GeoValue): GeoFix | null;
43
+ /** The `code` of a `GeolocationPositionError` for each failure. */
44
+ export declare const GEO_ERROR_CODES: {
45
+ readonly denied: 1;
46
+ readonly unavailable: 2;
47
+ readonly timeout: 3;
48
+ };
49
+ type ErrorCode = (typeof GEO_ERROR_CODES)[keyof typeof GEO_ERROR_CODES];
50
+ /**
51
+ * An error the page reads like the real one: the code, the message and the
52
+ * code constants, and `instanceof GeolocationPositionError` where it exists.
53
+ */
54
+ export declare function positionError(code: ErrorCode): GeolocationPositionError;
55
+ export declare function apply(value: GeoValue): void;
56
+ /** Stop emulating. Watches started meanwhile end here: the device never heard of them. */
57
+ export declare function reset(): void;
58
+ export {};
@@ -0,0 +1,16 @@
1
+ import type { ClockValue } from "../types";
2
+ /** The request header that tells the page's own server what time the clock says. */
3
+ export declare const NOW_HEADER = "x-devknobs-now";
4
+ /** Asked for, and a clock set to send. The real time is no news to a server. */
5
+ export declare function sends(clock: ClockValue): boolean;
6
+ /**
7
+ * Is the URL on the page's own origin? Only those get the header: on another
8
+ * origin it would set off a CORS preflight, and hand the clock to a stranger.
9
+ */
10
+ export declare function sameOrigin(url: string): boolean;
11
+ /**
12
+ * Put the clock's instant on every `fetch` and `XMLHttpRequest` to the page's
13
+ * own origin, when the clock knob asks for it.
14
+ */
15
+ export declare function apply(value: ClockValue): void;
16
+ export declare function reset(): void;
@@ -0,0 +1,27 @@
1
+ import type { DevknobsState, DprValue } from "../types";
2
+ /**
3
+ * What a page reads once as it loads and keeps: the browser, the touch screen
4
+ * and the pixel ratio. A script that sniffed the user agent or set a canvas up
5
+ * for the ratio never looks again, so the frame reloads when any of it moves.
6
+ */
7
+ export interface Identity {
8
+ /** The ua preset, which brings its platform and touch points, a custom string, or empty for the browser's own. */
9
+ agent: string;
10
+ /** A touch screen in the frame: `ontouchstart`, touch points and a coarse pointer. */
11
+ touch: boolean;
12
+ dpr: DprValue;
13
+ }
14
+ type IdentityKnobs = Pick<DevknobsState, "ua" | "device" | "dpr">;
15
+ export declare function identityOf(state: IdentityKnobs): Identity;
16
+ /** Does a page loaded as `loaded` read wrong under `next`? Not while no page has loaded. */
17
+ export declare function stale(loaded: Identity | null, next: Identity): boolean;
18
+ /** The identity a window was patched as from the page above, if it was. */
19
+ export declare function patchedAs(view: object): Identity | undefined;
20
+ /**
21
+ * Patch the frame's new window from the page above, as the frame's own copy
22
+ * would on mount: the user agent, the touch screen, its pointer queries and
23
+ * its scrollbars, before the window's first script. The copy there takes them
24
+ * over. A window patched already keeps what it has, and says what that is.
25
+ */
26
+ export declare function patchWindow(view: Window, state: IdentityKnobs): Identity;
27
+ export {};
@@ -0,0 +1,58 @@
1
+ import type { DevknobsState, DevknobsStatePatch } from "../types";
2
+ import { type NativeDriver, type NativeSetting } from "./native";
3
+ export interface EngineOptions {
4
+ /** Keep the knobs in sessionStorage across reloads. Defaults to true. */
5
+ persist?: boolean;
6
+ /** Knobs to apply on top of the stored state. */
7
+ state?: DevknobsStatePatch;
8
+ /**
9
+ * A host that sets text size, offline, the prefers knobs or the viewport
10
+ * for real. Those knobs leave the page alone and go to it instead.
11
+ */
12
+ native?: NativeDriver;
13
+ }
14
+ export type Listener = (state: DevknobsState) => void;
15
+ export declare function getState(): DevknobsState;
16
+ /** Hear about every knob change, whoever made it. Returns the way to stop. */
17
+ export declare function subscribe(listener: Listener): () => void;
18
+ export declare function applyState(next: DevknobsState): void;
19
+ /**
20
+ * Turn the host's driver off or on, every knob kept. Off, it is handed its
21
+ * defaults and the page emulates its knobs as with no driver; on, it takes
22
+ * them back from the page. `note` says why, for the panel, and null clears it.
23
+ */
24
+ export declare function setNative(on: boolean, note?: string | null): void;
25
+ /** The driver's switch for the panel: null where the host gives none. */
26
+ export declare function nativeSwitch(): {
27
+ setting: NativeSetting;
28
+ on: boolean;
29
+ note: string | null;
30
+ } | null;
31
+ export declare function setState(patch: DevknobsStatePatch): DevknobsState;
32
+ /**
33
+ * The knobs, once the frame has caught up with them and the panel has slid
34
+ * where it goes. A page devknobs reloads never resolves it: ask again on the
35
+ * next page. Rejects while devknobs is not mounted, and when it unmounts
36
+ * during the wait.
37
+ */
38
+ export declare function ready(): Promise<DevknobsState>;
39
+ /**
40
+ * The panel says how to tell it is still sliding, open or closed, its handle
41
+ * with it, so `ready()` waits for it to land. Returns the way to stop.
42
+ */
43
+ export declare function watchPanel(moving: () => boolean): () => void;
44
+ /**
45
+ * Keep the panel's place for new tabs and sessions, as the user just put it.
46
+ * Like a save, never from the copy in the width knob's frame.
47
+ */
48
+ export declare function keepPlace(): void;
49
+ /**
50
+ * Put every knob back to its default and list the default rows again. The
51
+ * panel keeps its place and stays open or closed, across a reload too.
52
+ */
53
+ export declare function reset(): void;
54
+ export declare function start(options?: EngineOptions): void;
55
+ /** Undo every patch and hand the page back to the browser. */
56
+ export declare function stop(): void;
57
+ /** Restart every CSS animation, in the width knob's frame too. */
58
+ export declare function replay(): void;
@@ -0,0 +1,23 @@
1
+ /**
2
+ * The default locale of every `Intl` service and `toLocale*` method, the one a
3
+ * browser takes from its language setting when the caller names none. Each
4
+ * member is swapped for an accessor that hands out a proxy of the real one,
5
+ * which puts the knob's tag in when the locales are left out. Whatever the page
6
+ * or another knob assigns meanwhile (the time zone knob puts its own
7
+ * `DateTimeFormat` and `toLocale*String` there) only replaces what sits under
8
+ * the proxy, so both apply, and a reset leaves the last assignment in place.
9
+ */
10
+ /** The tag in its canonical form, or null when it is not a valid BCP 47 tag. */
11
+ export declare function canonicalTag(lang: string): string | null;
12
+ /**
13
+ * The arguments with `locale` put in where the caller left the locales out:
14
+ * missing, `undefined` or an empty list, all of which mean the default.
15
+ */
16
+ export declare function withLocale(args: unknown[], index: number, locale: string | null): unknown[];
17
+ /** What sits under a locale proxy, or the value itself when it is not one. */
18
+ export declare function underLocale(value: unknown): unknown;
19
+ /**
20
+ * Make `lang` the default locale, or hand the default back to the browser with
21
+ * null. A tag `Intl` refuses is not applied, so it cannot make every call throw.
22
+ */
23
+ export declare function setDefaultLocale(lang: string | null): void;
@@ -0,0 +1,86 @@
1
+ import type { LocaleValue } from "../types";
2
+ export declare const LOCALE_PRESETS: readonly ["en", "en-US", "tr", "de", "fr", "es", "ar", "he", "ja", "zh-CN"];
3
+ /** Cookie Paraglide JS reads before the `Accept-Language` header. */
4
+ export declare const PARAGLIDE_COOKIE = "PARAGLIDE_LOCALE";
5
+ /**
6
+ * Where the stores devknobs wrote into are remembered, with what each held
7
+ * before. It sits beside the knobs in `sessionStorage`, so ownership outlives
8
+ * a reload and dies with the tab: a second tab left on `system` never puts
9
+ * back what this one wrote.
10
+ */
11
+ export declare const OWNER_KEY = "devknobs:locale-stores";
12
+ /** The version of the record `OWNER_KEY` keeps. Bump it with a change of shape, see stored.ts. */
13
+ export declare const OWNER_VERSION = 1;
14
+ /** Where the last reload devknobs asked for is timed. */
15
+ export declare const RELOAD_KEY = "devknobs:locale-reload";
16
+ /** The version of the timing `RELOAD_KEY` keeps. Bump it with a change of shape, see stored.ts. */
17
+ export declare const RELOAD_VERSION = 1;
18
+ /** The direction `Intl` knows for the tag, script and all, or null when it does not. */
19
+ export declare function intlDirection(lang: string): "ltr" | "rtl" | null;
20
+ /** Is this language tag written right to left? */
21
+ export declare function isRtl(lang: string): boolean;
22
+ /** The direction to use, deriving it from the language when set to `system`. */
23
+ export declare function dirFor(value: LocaleValue): "ltr" | "rtl";
24
+ /** What `navigator.languages` should report for a tag: the tag, then its base. */
25
+ export declare function languagesFor(lang: string): string[];
26
+ /** The value of one cookie in a `document.cookie` string, or null when unset. */
27
+ export declare function readCookie(jar: string, name: string): string | null;
28
+ export type StoreKind = "cookie" | "local" | "session";
29
+ /** One place an i18n library keeps the locale between page loads. */
30
+ export interface LocaleAdapter {
31
+ library: string;
32
+ kind: StoreKind;
33
+ key: string;
34
+ /** Does the page use this store, given whether it holds a value right now? */
35
+ used(present: boolean): boolean;
36
+ }
37
+ /**
38
+ * The stores devknobs keeps in step with the knob. A store already holding a
39
+ * value is one the page uses. Paraglide's cookie is written on every page:
40
+ * nothing writes it before the user picks a locale, yet the server reads it
41
+ * first. `NEXT_LOCALE` is written on any Next.js page for the same reason.
42
+ */
43
+ export declare const ADAPTERS: LocaleAdapter[];
44
+ /** A store devknobs wrote `value` into, and what it held before, null for nothing. */
45
+ export interface Written {
46
+ kind: StoreKind;
47
+ key: string;
48
+ prior: string | null;
49
+ value: string;
50
+ }
51
+ /** Everything devknobs wrote for the tag it last applied. */
52
+ export interface Owned {
53
+ lang: string;
54
+ writes: Written[];
55
+ }
56
+ /** Read an ownership record, or null when it is missing or malformed. */
57
+ export declare function parseOwned(json: string | null): Owned | null;
58
+ /**
59
+ * When the last reload devknobs asked for was, from its record, or 0 for none.
60
+ * One kept before records had a version is the time alone.
61
+ */
62
+ export declare function parseReload(text: string | null): number;
63
+ /** Did devknobs reload the page, which is now on its way out? */
64
+ export declare function reloading(): boolean;
65
+ /**
66
+ * Point every store the page uses at `lang`, or put back what each held before
67
+ * when `lang` is null, and reload so the page reads its locale again. Ownership
68
+ * is keyed on what devknobs wrote, never on what a store says now: the host
69
+ * owns the stores after the reload, and a framework that rewrites one to a
70
+ * locale it actually ships must not be argued with. So one knob choice buys
71
+ * one reload, a store already on the tag is not claimed, and one the host
72
+ * wrote over is never put back. A reload the throttle refuses is settled
73
+ * first, before anything is written: a store the page never reloads for only
74
+ * hides the strings it renders with. Returns whether the page was reloaded.
75
+ */
76
+ export declare function syncStores(lang: string | null): boolean;
77
+ /** Is a put back waiting out the throttle, to reload the page when it fires? */
78
+ export declare function retrying(): boolean;
79
+ export declare function apply(value: LocaleValue): void;
80
+ /**
81
+ * Put `lang`, `dir`, `navigator` and the `Intl` default back. The stores are
82
+ * left alone, and a put back still waiting is dropped: only `apply` with the
83
+ * knob on `system` puts them back, so that a strict mode unmount and remount
84
+ * cannot bounce the page between two reloads.
85
+ */
86
+ export declare function reset(): void;
@@ -0,0 +1,64 @@
1
+ /** The mat in the letterbox's shadow root, under the strip and the stage, and never in the way of a pointer. */
2
+ export declare const MAT_CSS: string;
3
+ /** The grid of the mat, in css px: a fine line, a stronger one, and the strongest with a mark where two cross. */
4
+ export declare const CELL = 10;
5
+ export declare const MAJOR = 50;
6
+ export declare const SPAN = 100;
7
+ /** A tick on a ruler: where it is from the mat's edge, and how far in it reaches. */
8
+ export interface Tick {
9
+ at: number;
10
+ size: number;
11
+ }
12
+ /** The ticks along an edge `length` px long, one every cell, longer on the major lines and spans. */
13
+ export declare function ticks(length: number): Tick[];
14
+ /**
15
+ * Where a ruler is numbered: every span along an edge `length` px long, whole
16
+ * numbers only, short of one that would run off the end or into `avoid`, the
17
+ * stretch of the edge that something else holds.
18
+ */
19
+ export declare function numbers(length: number, avoid?: {
20
+ from: number;
21
+ to: number;
22
+ }): number[];
23
+ /** A point on the mat, in css px from its top left. */
24
+ export interface Point {
25
+ x: number;
26
+ y: number;
27
+ }
28
+ /**
29
+ * The vertex of the angle guides on a mat `height` px tall: on the left edge,
30
+ * at the lowest span crossing at least `FOOT` px above the bottom, so its
31
+ * span line is the baseline and the left edge stands at 90 degrees. Null on a
32
+ * mat too short to hold one.
33
+ */
34
+ export declare function vertex(height: number): Point | null;
35
+ /**
36
+ * Where a ray from `from`, `angle` degrees up from the baseline (0 to 90),
37
+ * leaves a `width` by `height` box through its top or right edge, landing
38
+ * exactly on that edge.
39
+ */
40
+ export declare function exit(from: Point, angle: number, size: {
41
+ width: number;
42
+ height: number;
43
+ }): Point;
44
+ /** The point `radius` px from `from` along a ray `angle` degrees up from the baseline, moved `off` px to its left. */
45
+ export declare function along(from: Point, angle: number, radius: number, off?: number): Point;
46
+ /**
47
+ * The cutting mat, `size` css px, with lines `hair` px thin: a grid with a
48
+ * mark where the spans cross, rulers along the top and left edges numbered
49
+ * from the top left, and angle guides from a span crossing on the left edge
50
+ * to the far edges. Its tile is set off by half a span, so each mark sits
51
+ * whole in it. `bleed` is how far the grid alone runs on past the left and
52
+ * the right of that, under what lies over the mat there, so the rulers count
53
+ * from the edge of what shows.
54
+ */
55
+ export declare function drawMat(size: {
56
+ width: number;
57
+ height: number;
58
+ }, hair: number, avoid?: {
59
+ from: number;
60
+ to: number;
61
+ }, bleed?: {
62
+ left: number;
63
+ right: number;
64
+ }): SVGSVGElement;
@@ -0,0 +1,25 @@
1
+ /**
2
+ * The one patch over `window.matchMedia` that the knobs share. Text size takes
3
+ * em and rem to px, and the prefers knobs track the lists they hand out, each
4
+ * as a layer. The layers run in a fixed order, whichever came in first, and
5
+ * the browser's own `matchMedia` goes back when the last one leaves, whichever
6
+ * that is.
7
+ */
8
+ type MatchMedia = (query: string) => MediaQueryList;
9
+ /** One step of the patch. It gets the query and the rest of the chain below it. */
10
+ export type Layer = (query: string, next: MatchMedia) => MediaQueryList;
11
+ /**
12
+ * Outermost first. Text size goes before the prefers knobs, so the query they
13
+ * track and evaluate is the one the browser matches, in px.
14
+ */
15
+ declare const ORDER: readonly ["text", "media"];
16
+ export type LayerName = (typeof ORDER)[number];
17
+ /** Match a query under every layer, as `matchMedia` did before the patch. */
18
+ export declare function baseMatchMedia(query: string): MediaQueryList;
19
+ /** Put a layer in. The patch goes on with the first one. */
20
+ export declare function addLayer(name: LayerName, layer: Layer): void;
21
+ /** Take a layer out. The last one out puts `matchMedia` back. */
22
+ export declare function removeLayer(name: LayerName): void;
23
+ /** No movement: the user asks for less, or the browser cannot animate. */
24
+ export declare function still(): boolean;
25
+ export {};
@@ -0,0 +1,45 @@
1
+ import type { MatColorName } from "../types";
2
+ /**
3
+ * A mat's paint: its three stops, a little lighter up top and deeper toward
4
+ * the edges, in sRGB and wider in P3, and the light tint of its own hue its
5
+ * lines and numbers are drawn in.
6
+ */
7
+ export interface MatPaint {
8
+ srgb: readonly [string, string, string];
9
+ p3: readonly [string, string, string];
10
+ line: string;
11
+ }
12
+ /**
13
+ * Each color of the mat. The others take blue's lightness at each stop and
14
+ * its lines' lightness and chroma in OKLCH at their own hue, calmer where the
15
+ * hue is louder, and their P3 stops about 15% more chroma, as blue's have.
16
+ * Green is the classic cutting mat's, a little lighter, and graphite the
17
+ * dark grey one's, a little darker.
18
+ */
19
+ export declare const MAT_COLORS: Record<MatColorName, MatPaint>;
20
+ /** The names of the colors, in the order the panel shows them. */
21
+ export declare const MAT_COLOR_NAMES: readonly MatColorName[];
22
+ /** The mat's background: its stops spread from the middle of its top edge. */
23
+ export declare function matGradient(stops: readonly [string, string, string]): string;
24
+ /** Whether a value names one of the mat's own colors. */
25
+ export declare function isMatName(value: unknown): value is MatColorName;
26
+ /** The mat's stops alone, in sRGB and in P3. */
27
+ export type MatStops = Pick<MatPaint, "srgb" | "p3">;
28
+ /**
29
+ * The stops of any color the mat takes, which is all the early script paints:
30
+ * one of the mat's own by name, one of the user's from its hex, the same in
31
+ * P3, which a hex does not reach past sRGB, and blue's for anything else.
32
+ */
33
+ export declare function matStops(mat: string): MatStops;
34
+ /**
35
+ * The paint of any color the mat takes. One of the user's own has its lines
36
+ * and numbers in the ink that reads on all three of its stops, light on a
37
+ * dark color and dark on a light one.
38
+ */
39
+ export declare function matPaint(mat: string): MatPaint;
40
+ /**
41
+ * Give `node` a color of the mat: `data-mat` names it, and the rule of one of
42
+ * the mat's own paints it from there. A color of the user's has no rule, so
43
+ * its paint goes on the node itself. Null takes the color off again.
44
+ */
45
+ export declare function putMat(node: HTMLElement | SVGElement, mat: string | null): void;