@davidsouther/jiffies 2.2.5 → 2026.4.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 (427) hide show
  1. package/LICENSE +1 -1
  2. package/package.json +22 -25
  3. package/src/assert.ts +5 -5
  4. package/src/components/button_bar.ts +28 -30
  5. package/src/components/inline_edit.ts +8 -7
  6. package/src/components/logger.ts +6 -6
  7. package/src/components/select.ts +7 -7
  8. package/src/components/test.ts +5 -0
  9. package/src/components/virtual_scroll.test.ts +9 -6
  10. package/src/components/virtual_scroll.ts +29 -24
  11. package/src/context.test.ts +4 -4
  12. package/src/context.ts +16 -11
  13. package/src/debounce.ts +9 -3
  14. package/src/diff.test.ts +4 -4
  15. package/src/diff.ts +14 -16
  16. package/src/dom/css/border.ts +11 -11
  17. package/src/dom/css/core.ts +1 -1
  18. package/src/dom/css/fstyle.ts +4 -4
  19. package/src/dom/css/sizing.ts +1 -1
  20. package/src/dom/dom.ts +59 -47
  21. package/src/dom/fc.test.ts +8 -8
  22. package/src/dom/fc.ts +32 -35
  23. package/src/dom/form/form.app.ts +9 -9
  24. package/src/dom/form/form.ts +21 -15
  25. package/src/dom/form/index.html +3 -2
  26. package/src/dom/html.test.ts +12 -10
  27. package/src/dom/html.ts +2 -3
  28. package/src/dom/index.ts +2 -0
  29. package/src/dom/observable.test.ts +6 -6
  30. package/src/dom/observable.ts +2 -2
  31. package/src/dom/provide.ts +1 -1
  32. package/src/dom/router/link.ts +3 -3
  33. package/src/dom/router/router.ts +5 -5
  34. package/src/dom/svg.ts +7 -6
  35. package/src/dom/test.ts +3 -0
  36. package/src/dom/types/css.ts +43 -61
  37. package/src/dom/types/html.ts +2 -4
  38. package/src/dom/xml.ts +2 -2
  39. package/src/equal.test.ts +3 -3
  40. package/src/equal.ts +27 -14
  41. package/src/flags.test.ts +2 -2
  42. package/src/flags.ts +2 -2
  43. package/src/fs.test.ts +5 -5
  44. package/src/fs.ts +26 -20
  45. package/src/fs_node.ts +4 -4
  46. package/src/fs_win.test.ts +1 -1
  47. package/src/generator.test.ts +4 -3
  48. package/src/generator.ts +1 -1
  49. package/src/hooks/_notes +4 -1
  50. package/src/index.html +7 -7
  51. package/src/lock.test.ts +4 -4
  52. package/src/lock.ts +8 -7
  53. package/src/log.ts +17 -18
  54. package/src/observable/event.ts +7 -7
  55. package/src/observable/observable.test.ts +3 -3
  56. package/src/observable/observable.ts +73 -52
  57. package/src/result.test.ts +7 -10
  58. package/src/result.ts +51 -47
  59. package/src/safe.ts +1 -1
  60. package/src/scope/describe.ts +12 -11
  61. package/src/scope/display/console.ts +4 -4
  62. package/src/scope/display/dom.ts +9 -9
  63. package/src/scope/display/junit.ts +21 -24
  64. package/src/scope/execute.ts +17 -12
  65. package/src/scope/expect.ts +22 -22
  66. package/src/scope/fix.ts +8 -7
  67. package/src/scope/index.ts +3 -3
  68. package/src/scope/scope.ts +2 -2
  69. package/src/scope/state.ts +2 -2
  70. package/src/server/http/apps.ts +5 -5
  71. package/src/server/http/css.ts +10 -26
  72. package/src/server/http/index.ts +30 -24
  73. package/src/server/http/response.ts +12 -5
  74. package/src/server/http/sitemap.ts +8 -8
  75. package/src/server/http/static.ts +9 -6
  76. package/src/server/http/typescript.ts +25 -25
  77. package/src/server/main.ts +7 -4
  78. package/src/test.mjs +8 -8
  79. package/src/test_all.ts +16 -13
  80. package/src/transpile.mjs +5 -18
  81. package/tsconfig.json +34 -0
  82. package/build/pico.css +0 -2466
  83. package/build/pico.css.map +0 -1
  84. package/lib/cjs/assert.d.ts +0 -26
  85. package/lib/cjs/assert.js +0 -46
  86. package/lib/cjs/awaitable.d.ts +0 -1
  87. package/lib/cjs/awaitable.js +0 -2
  88. package/lib/cjs/case.d.ts +0 -1
  89. package/lib/cjs/case.js +0 -9
  90. package/lib/cjs/components/button_bar.d.ts +0 -8
  91. package/lib/cjs/components/button_bar.js +0 -29
  92. package/lib/cjs/components/inline_edit.d.ts +0 -12
  93. package/lib/cjs/components/inline_edit.js +0 -51
  94. package/lib/cjs/components/logger.d.ts +0 -6
  95. package/lib/cjs/components/logger.js +0 -27
  96. package/lib/cjs/components/select.d.ts +0 -13
  97. package/lib/cjs/components/select.js +0 -6
  98. package/lib/cjs/components/test.d.ts +0 -1
  99. package/lib/cjs/components/test.js +0 -7
  100. package/lib/cjs/components/virtual_scroll.d.ts +0 -40
  101. package/lib/cjs/components/virtual_scroll.js +0 -102
  102. package/lib/cjs/components/virtual_scroll.test.d.ts +0 -1
  103. package/lib/cjs/components/virtual_scroll.test.js +0 -22
  104. package/lib/cjs/context.d.ts +0 -15
  105. package/lib/cjs/context.js +0 -48
  106. package/lib/cjs/context.test.d.ts +0 -1
  107. package/lib/cjs/context.test.js +0 -48
  108. package/lib/cjs/debounce.d.ts +0 -1
  109. package/lib/cjs/debounce.js +0 -12
  110. package/lib/cjs/diff.d.ts +0 -15
  111. package/lib/cjs/diff.js +0 -58
  112. package/lib/cjs/diff.test.d.ts +0 -1
  113. package/lib/cjs/diff.test.js +0 -41
  114. package/lib/cjs/display.d.ts +0 -5
  115. package/lib/cjs/display.js +0 -16
  116. package/lib/cjs/dom/css/border.d.ts +0 -11
  117. package/lib/cjs/dom/css/border.js +0 -33
  118. package/lib/cjs/dom/css/constants.d.ts +0 -31
  119. package/lib/cjs/dom/css/constants.js +0 -31
  120. package/lib/cjs/dom/css/core.d.ts +0 -5
  121. package/lib/cjs/dom/css/core.js +0 -31
  122. package/lib/cjs/dom/css/fstyle.d.ts +0 -5
  123. package/lib/cjs/dom/css/fstyle.js +0 -36
  124. package/lib/cjs/dom/css/sizing.d.ts +0 -5
  125. package/lib/cjs/dom/css/sizing.js +0 -14
  126. package/lib/cjs/dom/dom.d.ts +0 -27
  127. package/lib/cjs/dom/dom.js +0 -110
  128. package/lib/cjs/dom/fc.d.ts +0 -14
  129. package/lib/cjs/dom/fc.js +0 -39
  130. package/lib/cjs/dom/fc.test.d.ts +0 -1
  131. package/lib/cjs/dom/fc.test.js +0 -23
  132. package/lib/cjs/dom/form/form.app.d.ts +0 -1
  133. package/lib/cjs/dom/form/form.app.js +0 -27
  134. package/lib/cjs/dom/form/form.d.ts +0 -26
  135. package/lib/cjs/dom/form/form.js +0 -49
  136. package/lib/cjs/dom/form/form.test.d.ts +0 -0
  137. package/lib/cjs/dom/form/form.test.js +0 -1
  138. package/lib/cjs/dom/html.d.ts +0 -113
  139. package/lib/cjs/dom/html.js +0 -119
  140. package/lib/cjs/dom/html.test.d.ts +0 -1
  141. package/lib/cjs/dom/html.test.js +0 -60
  142. package/lib/cjs/dom/observable.d.ts +0 -2
  143. package/lib/cjs/dom/observable.js +0 -10
  144. package/lib/cjs/dom/observable.test.d.ts +0 -1
  145. package/lib/cjs/dom/observable.test.js +0 -35
  146. package/lib/cjs/dom/provide.d.ts +0 -3
  147. package/lib/cjs/dom/provide.js +0 -12
  148. package/lib/cjs/dom/router/link.d.ts +0 -6
  149. package/lib/cjs/dom/router/link.js +0 -7
  150. package/lib/cjs/dom/router/router.d.ts +0 -13
  151. package/lib/cjs/dom/router/router.js +0 -55
  152. package/lib/cjs/dom/svg.d.ts +0 -64
  153. package/lib/cjs/dom/svg.js +0 -69
  154. package/lib/cjs/dom/test.d.ts +0 -1
  155. package/lib/cjs/dom/test.js +0 -13
  156. package/lib/cjs/dom/types/css.d.ts +0 -6612
  157. package/lib/cjs/dom/types/css.js +0 -24
  158. package/lib/cjs/dom/types/dom.d.ts +0 -0
  159. package/lib/cjs/dom/types/dom.js +0 -1
  160. package/lib/cjs/dom/types/html.d.ts +0 -616
  161. package/lib/cjs/dom/types/html.js +0 -2
  162. package/lib/cjs/dom/xml.d.ts +0 -1
  163. package/lib/cjs/dom/xml.js +0 -8
  164. package/lib/cjs/equal.d.ts +0 -8
  165. package/lib/cjs/equal.js +0 -48
  166. package/lib/cjs/equal.test.d.ts +0 -1
  167. package/lib/cjs/equal.test.js +0 -22
  168. package/lib/cjs/flags.d.ts +0 -7
  169. package/lib/cjs/flags.js +0 -52
  170. package/lib/cjs/flags.test.d.ts +0 -1
  171. package/lib/cjs/flags.test.js +0 -37
  172. package/lib/cjs/fs.d.ts +0 -72
  173. package/lib/cjs/fs.js +0 -235
  174. package/lib/cjs/fs.test.d.ts +0 -1
  175. package/lib/cjs/fs.test.js +0 -86
  176. package/lib/cjs/fs_node.d.ts +0 -15
  177. package/lib/cjs/fs_node.js +0 -50
  178. package/lib/cjs/fs_win.test.d.ts +0 -1
  179. package/lib/cjs/fs_win.test.js +0 -10
  180. package/lib/cjs/generator.d.ts +0 -1
  181. package/lib/cjs/generator.js +0 -14
  182. package/lib/cjs/generator.test.d.ts +0 -1
  183. package/lib/cjs/generator.test.js +0 -26
  184. package/lib/cjs/is_browser.d.ts +0 -1
  185. package/lib/cjs/is_browser.js +0 -4
  186. package/lib/cjs/loader-register.d.mts +0 -1
  187. package/lib/cjs/loader-register.d.ts +0 -1
  188. package/lib/cjs/loader-register.js +0 -4
  189. package/lib/cjs/loader-register.mjs +0 -4
  190. package/lib/cjs/loader.d.mts +0 -23
  191. package/lib/cjs/loader.mjs +0 -41
  192. package/lib/cjs/lock.d.ts +0 -1
  193. package/lib/cjs/lock.js +0 -27
  194. package/lib/cjs/lock.test.d.ts +0 -1
  195. package/lib/cjs/lock.test.js +0 -18
  196. package/lib/cjs/log.d.ts +0 -56
  197. package/lib/cjs/log.js +0 -103
  198. package/lib/cjs/observable/event.d.ts +0 -35
  199. package/lib/cjs/observable/event.js +0 -61
  200. package/lib/cjs/observable/observable.d.ts +0 -132
  201. package/lib/cjs/observable/observable.js +0 -363
  202. package/lib/cjs/observable/observable.test.d.ts +0 -1
  203. package/lib/cjs/observable/observable.test.js +0 -65
  204. package/lib/cjs/package.json +0 -1
  205. package/lib/cjs/range.d.ts +0 -1
  206. package/lib/cjs/range.js +0 -11
  207. package/lib/cjs/result.d.ts +0 -31
  208. package/lib/cjs/result.js +0 -80
  209. package/lib/cjs/result.test.d.ts +0 -1
  210. package/lib/cjs/result.test.js +0 -78
  211. package/lib/cjs/safe.d.ts +0 -1
  212. package/lib/cjs/safe.js +0 -14
  213. package/lib/cjs/scope/describe.d.ts +0 -18
  214. package/lib/cjs/scope/describe.js +0 -73
  215. package/lib/cjs/scope/display/console.d.ts +0 -2
  216. package/lib/cjs/scope/display/console.js +0 -25
  217. package/lib/cjs/scope/display/dom.d.ts +0 -3
  218. package/lib/cjs/scope/display/dom.js +0 -30
  219. package/lib/cjs/scope/display/junit.d.ts +0 -2
  220. package/lib/cjs/scope/display/junit.js +0 -21
  221. package/lib/cjs/scope/execute.d.ts +0 -12
  222. package/lib/cjs/scope/execute.js +0 -91
  223. package/lib/cjs/scope/expect.d.ts +0 -23
  224. package/lib/cjs/scope/expect.js +0 -110
  225. package/lib/cjs/scope/fix.d.ts +0 -4
  226. package/lib/cjs/scope/fix.js +0 -26
  227. package/lib/cjs/scope/index.d.ts +0 -3
  228. package/lib/cjs/scope/index.js +0 -15
  229. package/lib/cjs/scope/scope.d.ts +0 -17
  230. package/lib/cjs/scope/scope.js +0 -2
  231. package/lib/cjs/scope/state.d.ts +0 -2
  232. package/lib/cjs/scope/state.js +0 -12
  233. package/lib/cjs/server/http/apps.d.ts +0 -5
  234. package/lib/cjs/server/http/apps.js +0 -27
  235. package/lib/cjs/server/http/css.d.ts +0 -5
  236. package/lib/cjs/server/http/css.js +0 -54
  237. package/lib/cjs/server/http/index.d.ts +0 -21
  238. package/lib/cjs/server/http/index.js +0 -77
  239. package/lib/cjs/server/http/response.d.ts +0 -4
  240. package/lib/cjs/server/http/response.js +0 -45
  241. package/lib/cjs/server/http/sitemap.d.ts +0 -2
  242. package/lib/cjs/server/http/sitemap.js +0 -46
  243. package/lib/cjs/server/http/static.d.ts +0 -2
  244. package/lib/cjs/server/http/static.js +0 -25
  245. package/lib/cjs/server/http/typescript.d.ts +0 -5
  246. package/lib/cjs/server/http/typescript.js +0 -44
  247. package/lib/cjs/server/main.d.ts +0 -2
  248. package/lib/cjs/server/main.js +0 -14
  249. package/lib/cjs/test.d.mts +0 -2
  250. package/lib/cjs/test.mjs +0 -28
  251. package/lib/cjs/test_all.d.ts +0 -9
  252. package/lib/cjs/test_all.js +0 -30
  253. package/lib/cjs/transpile.d.mts +0 -3
  254. package/lib/cjs/transpile.mjs +0 -22
  255. package/lib/cjs/tsconfig.tsbuildinfo +0 -1
  256. package/lib/esm/assert.d.ts +0 -26
  257. package/lib/esm/assert.js +0 -38
  258. package/lib/esm/awaitable.d.ts +0 -1
  259. package/lib/esm/awaitable.js +0 -1
  260. package/lib/esm/case.d.ts +0 -1
  261. package/lib/esm/case.js +0 -5
  262. package/lib/esm/components/button_bar.d.ts +0 -8
  263. package/lib/esm/components/button_bar.js +0 -27
  264. package/lib/esm/components/inline_edit.d.ts +0 -12
  265. package/lib/esm/components/inline_edit.js +0 -48
  266. package/lib/esm/components/logger.d.ts +0 -6
  267. package/lib/esm/components/logger.js +0 -22
  268. package/lib/esm/components/select.d.ts +0 -10
  269. package/lib/esm/components/select.js +0 -3
  270. package/lib/esm/components/test.d.ts +0 -1
  271. package/lib/esm/components/test.js +0 -3
  272. package/lib/esm/components/virtual_scroll.d.ts +0 -40
  273. package/lib/esm/components/virtual_scroll.js +0 -94
  274. package/lib/esm/components/virtual_scroll.test.d.ts +0 -1
  275. package/lib/esm/components/virtual_scroll.test.js +0 -20
  276. package/lib/esm/context.d.ts +0 -15
  277. package/lib/esm/context.js +0 -43
  278. package/lib/esm/context.test.d.ts +0 -1
  279. package/lib/esm/context.test.js +0 -46
  280. package/lib/esm/debounce.d.ts +0 -2
  281. package/lib/esm/debounce.js +0 -8
  282. package/lib/esm/diff.d.ts +0 -15
  283. package/lib/esm/diff.js +0 -54
  284. package/lib/esm/diff.test.d.ts +0 -1
  285. package/lib/esm/diff.test.js +0 -39
  286. package/lib/esm/display.d.ts +0 -5
  287. package/lib/esm/display.js +0 -11
  288. package/lib/esm/dom/css/border.d.ts +0 -11
  289. package/lib/esm/dom/css/border.js +0 -27
  290. package/lib/esm/dom/css/constants.d.ts +0 -31
  291. package/lib/esm/dom/css/constants.js +0 -28
  292. package/lib/esm/dom/css/core.d.ts +0 -5
  293. package/lib/esm/dom/css/core.js +0 -24
  294. package/lib/esm/dom/css/fstyle.d.ts +0 -5
  295. package/lib/esm/dom/css/fstyle.js +0 -32
  296. package/lib/esm/dom/css/sizing.d.ts +0 -5
  297. package/lib/esm/dom/css/sizing.js +0 -10
  298. package/lib/esm/dom/dom.d.ts +0 -27
  299. package/lib/esm/dom/dom.js +0 -104
  300. package/lib/esm/dom/fc.d.ts +0 -14
  301. package/lib/esm/dom/fc.js +0 -35
  302. package/lib/esm/dom/fc.test.d.ts +0 -1
  303. package/lib/esm/dom/fc.test.js +0 -21
  304. package/lib/esm/dom/form/form.app.d.ts +0 -1
  305. package/lib/esm/dom/form/form.app.js +0 -23
  306. package/lib/esm/dom/form/form.d.ts +0 -26
  307. package/lib/esm/dom/form/form.js +0 -34
  308. package/lib/esm/dom/form/form.test.d.ts +0 -0
  309. package/lib/esm/dom/form/form.test.js +0 -1
  310. package/lib/esm/dom/html.d.ts +0 -113
  311. package/lib/esm/dom/html.js +0 -114
  312. package/lib/esm/dom/html.test.d.ts +0 -1
  313. package/lib/esm/dom/html.test.js +0 -58
  314. package/lib/esm/dom/observable.d.ts +0 -2
  315. package/lib/esm/dom/observable.js +0 -6
  316. package/lib/esm/dom/observable.test.d.ts +0 -1
  317. package/lib/esm/dom/observable.test.js +0 -33
  318. package/lib/esm/dom/provide.d.ts +0 -3
  319. package/lib/esm/dom/provide.js +0 -7
  320. package/lib/esm/dom/router/link.d.ts +0 -6
  321. package/lib/esm/dom/router/link.js +0 -3
  322. package/lib/esm/dom/router/router.d.ts +0 -13
  323. package/lib/esm/dom/router/router.js +0 -52
  324. package/lib/esm/dom/svg.d.ts +0 -64
  325. package/lib/esm/dom/svg.js +0 -65
  326. package/lib/esm/dom/test.d.ts +0 -1
  327. package/lib/esm/dom/test.js +0 -9
  328. package/lib/esm/dom/types/css.d.ts +0 -6612
  329. package/lib/esm/dom/types/css.js +0 -23
  330. package/lib/esm/dom/types/dom.d.ts +0 -0
  331. package/lib/esm/dom/types/dom.js +0 -1
  332. package/lib/esm/dom/types/html.d.ts +0 -616
  333. package/lib/esm/dom/types/html.js +0 -1
  334. package/lib/esm/dom/xml.d.ts +0 -1
  335. package/lib/esm/dom/xml.js +0 -4
  336. package/lib/esm/equal.d.ts +0 -8
  337. package/lib/esm/equal.js +0 -41
  338. package/lib/esm/equal.test.d.ts +0 -1
  339. package/lib/esm/equal.test.js +0 -20
  340. package/lib/esm/flags.d.ts +0 -7
  341. package/lib/esm/flags.js +0 -48
  342. package/lib/esm/flags.test.d.ts +0 -1
  343. package/lib/esm/flags.test.js +0 -35
  344. package/lib/esm/fs.d.ts +0 -72
  345. package/lib/esm/fs.js +0 -226
  346. package/lib/esm/fs.test.d.ts +0 -1
  347. package/lib/esm/fs.test.js +0 -84
  348. package/lib/esm/fs_node.d.ts +0 -15
  349. package/lib/esm/fs_node.js +0 -45
  350. package/lib/esm/fs_win.test.d.ts +0 -1
  351. package/lib/esm/fs_win.test.js +0 -8
  352. package/lib/esm/generator.d.ts +0 -1
  353. package/lib/esm/generator.js +0 -10
  354. package/lib/esm/generator.test.d.ts +0 -1
  355. package/lib/esm/generator.test.js +0 -24
  356. package/lib/esm/is_browser.d.ts +0 -1
  357. package/lib/esm/is_browser.js +0 -1
  358. package/lib/esm/loader-register.d.mts +0 -1
  359. package/lib/esm/loader-register.mjs +0 -2
  360. package/lib/esm/loader.d.mts +0 -23
  361. package/lib/esm/loader.mjs +0 -36
  362. package/lib/esm/lock.d.ts +0 -1
  363. package/lib/esm/lock.js +0 -23
  364. package/lib/esm/lock.test.d.ts +0 -1
  365. package/lib/esm/lock.test.js +0 -16
  366. package/lib/esm/log.d.ts +0 -56
  367. package/lib/esm/log.js +0 -93
  368. package/lib/esm/observable/event.d.ts +0 -35
  369. package/lib/esm/observable/event.js +0 -46
  370. package/lib/esm/observable/observable.d.ts +0 -132
  371. package/lib/esm/observable/observable.js +0 -343
  372. package/lib/esm/observable/observable.test.d.ts +0 -1
  373. package/lib/esm/observable/observable.test.js +0 -63
  374. package/lib/esm/range.d.ts +0 -1
  375. package/lib/esm/range.js +0 -7
  376. package/lib/esm/result.d.ts +0 -31
  377. package/lib/esm/result.js +0 -65
  378. package/lib/esm/result.test.d.ts +0 -1
  379. package/lib/esm/result.test.js +0 -76
  380. package/lib/esm/safe.d.ts +0 -1
  381. package/lib/esm/safe.js +0 -10
  382. package/lib/esm/scope/describe.d.ts +0 -18
  383. package/lib/esm/scope/describe.js +0 -60
  384. package/lib/esm/scope/display/console.d.ts +0 -2
  385. package/lib/esm/scope/display/console.js +0 -21
  386. package/lib/esm/scope/display/dom.d.ts +0 -3
  387. package/lib/esm/scope/display/dom.js +0 -26
  388. package/lib/esm/scope/display/junit.d.ts +0 -2
  389. package/lib/esm/scope/display/junit.js +0 -17
  390. package/lib/esm/scope/execute.d.ts +0 -12
  391. package/lib/esm/scope/execute.js +0 -85
  392. package/lib/esm/scope/expect.d.ts +0 -23
  393. package/lib/esm/scope/expect.js +0 -104
  394. package/lib/esm/scope/fix.d.ts +0 -4
  395. package/lib/esm/scope/fix.js +0 -22
  396. package/lib/esm/scope/index.d.ts +0 -3
  397. package/lib/esm/scope/index.js +0 -3
  398. package/lib/esm/scope/scope.d.ts +0 -17
  399. package/lib/esm/scope/scope.js +0 -1
  400. package/lib/esm/scope/state.d.ts +0 -2
  401. package/lib/esm/scope/state.js +0 -8
  402. package/lib/esm/server/http/apps.d.ts +0 -5
  403. package/lib/esm/server/http/apps.js +0 -23
  404. package/lib/esm/server/http/css.d.ts +0 -5
  405. package/lib/esm/server/http/css.js +0 -50
  406. package/lib/esm/server/http/index.d.ts +0 -21
  407. package/lib/esm/server/http/index.js +0 -73
  408. package/lib/esm/server/http/response.d.ts +0 -4
  409. package/lib/esm/server/http/response.js +0 -40
  410. package/lib/esm/server/http/sitemap.d.ts +0 -2
  411. package/lib/esm/server/http/sitemap.js +0 -42
  412. package/lib/esm/server/http/static.d.ts +0 -2
  413. package/lib/esm/server/http/static.js +0 -21
  414. package/lib/esm/server/http/typescript.d.ts +0 -5
  415. package/lib/esm/server/http/typescript.js +0 -40
  416. package/lib/esm/server/main.d.ts +0 -2
  417. package/lib/esm/server/main.js +0 -12
  418. package/lib/esm/test.d.mts +0 -2
  419. package/lib/esm/test.mjs +0 -26
  420. package/lib/esm/test_all.d.ts +0 -9
  421. package/lib/esm/test_all.js +0 -28
  422. package/lib/esm/transpile.d.mts +0 -3
  423. package/lib/esm/transpile.mjs +0 -18
  424. package/lib/esm/tsconfig.tsbuildinfo +0 -1
  425. package/src/components/test.js +0 -3
  426. package/src/loader-register.mjs +0 -3
  427. package/src/loader.mjs +0 -46
@@ -1,12 +0,0 @@
1
- export interface InlineEditState {
2
- mode: number;
3
- value: string;
4
- }
5
- export declare const InlineEdit: import("../dom/fc.js").FCComponentCtor<{
6
- mode?: number | undefined;
7
- value: string;
8
- events: {
9
- change: (value: string) => void;
10
- };
11
- }, InlineEditState>;
12
- export default InlineEdit;
@@ -1,48 +0,0 @@
1
- import { width } from "../dom/css/sizing.js";
2
- import { FC, State } from "../dom/fc.js";
3
- import { input, span } from "../dom/html.js";
4
- const Mode = { VIEW: 0, EDIT: 1 };
5
- export const InlineEdit = FC("inline-edit", (el, { mode = Mode.VIEW, value, events }) => {
6
- const state = (el[State] ??= { mode, value });
7
- const render = () => {
8
- switch (state.mode) {
9
- case Mode.EDIT:
10
- return edit();
11
- case Mode.VIEW:
12
- return view();
13
- default:
14
- return span();
15
- }
16
- };
17
- const view = () => span({
18
- style: { cursor: "text", ...width("full", "inline") },
19
- events: {
20
- click: () => {
21
- state.mode = Mode.EDIT;
22
- el.update(render());
23
- },
24
- },
25
- }, state.value ?? "");
26
- const edit = () => {
27
- const edit = span({ style: { display: "block", position: "relative" } }, input({
28
- style: {
29
- zIndex: "10",
30
- position: "absolute",
31
- left: "0",
32
- marginTop: "-0.375rem",
33
- },
34
- events: {
35
- blur: ({ target }) => events.change(target?.value ?? ""),
36
- },
37
- type: "text",
38
- value: state.value,
39
- }), "\u00a0" // Hack to get the span to take up space
40
- );
41
- setTimeout(() => {
42
- edit.dispatchEvent(new Event("focus"));
43
- });
44
- return edit;
45
- };
46
- return render();
47
- });
48
- export default InlineEdit;
@@ -1,6 +0,0 @@
1
- import { Logger } from "../log.js";
2
- export interface HTMLLogger extends Logger {
3
- root: Element;
4
- }
5
- export declare function isHTMLLogger(logger: Logger): logger is HTMLLogger;
6
- export declare function makeHTMLLogger(name: string): HTMLLogger;
@@ -1,22 +0,0 @@
1
- import { display } from "../display.js";
2
- import { div, span, ul, li, pre, code } from "../dom/html.js";
3
- import { LEVEL } from "../log.js";
4
- export function isHTMLLogger(logger) {
5
- return logger.root != undefined;
6
- }
7
- export function makeHTMLLogger(name) {
8
- let log;
9
- const root = div(div(span(name)), (log = ul()));
10
- const logger = { level: LEVEL.INFO, root };
11
- function append(message) {
12
- log.appendChild(li(pre(code(message))));
13
- }
14
- const logAt = (level) => (message) => level >= (logger.level ?? LEVEL.ERROR)
15
- ? append(display(message))
16
- : undefined;
17
- logger.debug = logAt(LEVEL.VERBOSE);
18
- logger.info = logAt(LEVEL.INFO);
19
- logger.warn = logAt(LEVEL.WARN);
20
- logger.error = logAt(LEVEL.ERROR);
21
- return logger;
22
- }
@@ -1,10 +0,0 @@
1
- import { EventHandler } from "../dom/dom.js";
2
- export declare const Select: import("../dom/fc.js").FCComponentCtor<{
3
- name: string;
4
- value: string;
5
- events: {
6
- change: EventHandler;
7
- };
8
- disabled: boolean;
9
- options: [string, string][];
10
- }, {}>;
@@ -1,3 +0,0 @@
1
- import { FC } from "../dom/fc.js";
2
- import { option, select } from "../dom/html.js";
3
- export const Select = FC("jiffies-select", (el, { name, events: { change }, disabled, value, options }) => select({ name, events: { change }, disabled }, ...options.map(([v, name]) => option({ value: v, selected: value === v }, `${name}`))));
@@ -1 +0,0 @@
1
- export function loadTests(): Promise<void>;
@@ -1,3 +0,0 @@
1
- export async function loadTests() {
2
- // await import("./virtual_scroll.test.js");
3
- }
@@ -1,40 +0,0 @@
1
- export interface VirtualScrollSettings {
2
- minIndex: number;
3
- maxIndex: number;
4
- startIndex: number;
5
- itemHeight: number;
6
- count: number;
7
- tolerance: number;
8
- }
9
- export interface VirtualScrollDataAdapter<T> {
10
- (offset: number, limit: number): Iterable<T>;
11
- }
12
- export declare function arrayAdapter<T>(data: T[]): VirtualScrollDataAdapter<T>;
13
- export interface VirtualScrollProps<T, U extends HTMLElement> {
14
- settings: Partial<VirtualScrollSettings>;
15
- get: VirtualScrollDataAdapter<T>;
16
- row: (t: T) => U;
17
- }
18
- export declare function fillVirtualScrollSettings(settings: Partial<VirtualScrollSettings>): VirtualScrollSettings;
19
- export declare function initialState<T>(settings: VirtualScrollSettings): VirtualScrollState<T>;
20
- export declare function getData<T>(minIndex: number, maxIndex: number, offset: number, limit: number, get: VirtualScrollDataAdapter<T>): T[];
21
- export declare function doScroll<T>(scrollTop: number, state: VirtualScrollState<T>, get: VirtualScrollDataAdapter<T>): {
22
- scrollTop: number;
23
- topPaddingHeight: number;
24
- bottomPaddingHeight: number;
25
- data: T[];
26
- };
27
- interface VirtualScrollState<T, U extends HTMLElement = HTMLElement> {
28
- settings: VirtualScrollSettings;
29
- scrollTop: number;
30
- bufferedItems: number;
31
- totalHeight: number;
32
- viewportHeight: number;
33
- topPaddingHeight: number;
34
- bottomPaddingHeight: number;
35
- toleranceHeight: number;
36
- data: T[];
37
- rows: U[];
38
- }
39
- export declare const VirtualScroll: import("../dom/fc.js").FCComponentCtor<VirtualScrollProps<any, HTMLElement>, VirtualScrollState<any, HTMLElement>>;
40
- export default VirtualScroll;
@@ -1,94 +0,0 @@
1
- import { debounce } from "../debounce.js";
2
- import { FC, State } from "../dom/fc.js";
3
- import { div } from "../dom/html.js";
4
- export function arrayAdapter(data) {
5
- return (offset, limit) => data.slice(offset, offset + limit);
6
- }
7
- export function fillVirtualScrollSettings(settings) {
8
- const { minIndex = 0, maxIndex = Number.MAX_SAFE_INTEGER, startIndex = 0, itemHeight = 20, count = maxIndex - minIndex + 1, tolerance = count, } = settings;
9
- return { minIndex, maxIndex, startIndex, itemHeight, count, tolerance };
10
- }
11
- export function initialState(settings) {
12
- // From Denis Hilt, https://blog.logrocket.com/virtual-scrolling-core-principles-and-basic-implementation-in-react/
13
- const { minIndex, maxIndex, startIndex, itemHeight, count, tolerance } = settings;
14
- const bufferedItems = count + 2 * tolerance;
15
- const itemsAbove = Math.max(0, startIndex - tolerance - minIndex);
16
- const viewportHeight = count * itemHeight;
17
- const totalHeight = (maxIndex - minIndex + 1) * itemHeight;
18
- const toleranceHeight = tolerance * itemHeight;
19
- const bufferHeight = viewportHeight + 2 * toleranceHeight;
20
- const topPaddingHeight = itemsAbove * itemHeight;
21
- const bottomPaddingHeight = totalHeight - (topPaddingHeight + bufferHeight);
22
- return {
23
- scrollTop: 0,
24
- settings,
25
- viewportHeight,
26
- totalHeight,
27
- toleranceHeight,
28
- bufferedItems,
29
- topPaddingHeight,
30
- bottomPaddingHeight,
31
- data: [],
32
- rows: [],
33
- };
34
- }
35
- export function getData(minIndex, maxIndex, offset, limit, get) {
36
- const start = Math.max(0, minIndex, offset);
37
- const end = Math.min(maxIndex, offset + limit - 1);
38
- const data = get(start, end - start);
39
- return [...data];
40
- }
41
- export function doScroll(scrollTop, state, get) {
42
- const { totalHeight, toleranceHeight, bufferedItems, settings: { itemHeight, minIndex, maxIndex }, } = state;
43
- const index = minIndex + Math.floor((scrollTop - toleranceHeight) / itemHeight);
44
- const data = getData(minIndex, maxIndex, index, bufferedItems, get);
45
- const topPaddingHeight = Math.max((index - minIndex) * itemHeight, 0);
46
- const bottomPaddingHeight = Math.max(totalHeight - (topPaddingHeight + data.length * itemHeight), 0);
47
- return { scrollTop, topPaddingHeight, bottomPaddingHeight, data };
48
- }
49
- // export interface VirtualScroll<T, U extends HTMLElement> {
50
- // state: VirtualScrollState<T>;
51
- // rows: UHTMLElement<U>[];
52
- // }
53
- export const VirtualScroll = FC("virtual-scroll", (element, props) => {
54
- const settings = fillVirtualScrollSettings(props.settings);
55
- const state = (element[State] = {
56
- ...initialState(settings),
57
- ...element[State],
58
- });
59
- const scrollTo = ({ target } = { target: state }) => {
60
- const scrollTop = target?.scrollTop ?? state.topPaddingHeight;
61
- const updatedSate = {
62
- ...state,
63
- ...doScroll(scrollTop, state, props.get),
64
- };
65
- setState(updatedSate);
66
- };
67
- const viewportElement = div({
68
- style: { height: `${state.viewportHeight}px`, overflowY: "scroll" },
69
- events: { scroll: debounce(scrollTo, 0) },
70
- });
71
- setTimeout(() => {
72
- viewportElement.scroll({ top: state.scrollTop });
73
- });
74
- const setState = (newState) => {
75
- state.scrollTop = newState.scrollTop;
76
- state.topPaddingHeight = newState.topPaddingHeight;
77
- state.bottomPaddingHeight = newState.bottomPaddingHeight;
78
- state.data = newState.data;
79
- state.rows = state.data.map(props.row);
80
- viewportElement.update(div({
81
- class: "VirtualScroll__topPadding",
82
- style: { height: `${state.topPaddingHeight}px` },
83
- }), ...(state.rows ?? []).map((row, i) => div({
84
- class: `VirtualScroll__item_${i}`,
85
- style: { height: `${settings.itemHeight}px` },
86
- }, row)), div({
87
- class: "VirtualScroll__bottomPadding",
88
- style: { height: `${state.bottomPaddingHeight}px` },
89
- }));
90
- };
91
- scrollTo();
92
- return viewportElement;
93
- });
94
- export default VirtualScroll;
@@ -1 +0,0 @@
1
- export {};
@@ -1,20 +0,0 @@
1
- import { State } from "../dom/fc.js";
2
- import { div } from "../dom/html.js";
3
- import { describe, it, expect } from "../scope/index.js";
4
- import VirtualScroll, { arrayAdapter, } from "./virtual_scroll.js";
5
- describe("VirtualScroll", () => {
6
- it("tracks scroll position", () => {
7
- const data = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
8
- const props = {
9
- settings: { count: 3, startIndex: 2 },
10
- get: arrayAdapter(data),
11
- row: (i) => div(`${i}`),
12
- };
13
- const scroll = VirtualScroll(props);
14
- expect(scroll[State]?.bufferedItems).toBe(9);
15
- expect(scroll[State]?.data).toEqual([0, 1, 2, 3, 4]);
16
- //expect(scroll.state.topPaddingHeight).toBe(0);
17
- expect(scroll[State]?.viewportHeight).toBe(60);
18
- //expect(scroll.state.totalHeight).toBe(200);
19
- });
20
- });
@@ -1,15 +0,0 @@
1
- import { Err, Result } from "./result.js";
2
- export declare const Enter: unique symbol;
3
- export declare const Exit: unique symbol;
4
- export interface Context {
5
- [Enter]: () => void;
6
- [Exit]: () => void;
7
- }
8
- export interface Operation<T, E extends Error, C extends Context> {
9
- (c: C): T | Result<T, E>;
10
- }
11
- export interface AsyncOperation<T, E extends Error, C extends Context> {
12
- (c: C): Promise<T | Result<T, E>>;
13
- }
14
- export declare function using<T, E extends Error, C extends Context>(context: C | (() => C) | Operation<T, E, C>, operation?: Operation<T, E, C>, normalizeError?: (e: Error | unknown | any) => Err<E>): Result<T, E>;
15
- export declare function asyncUsing<T, E extends Error, C extends Context>(context: C | (() => Promise<C>), operation: AsyncOperation<T, E, C>, normalizeError?: (e: Error | unknown | any) => Err<E>): Promise<Result<T, E>>;
@@ -1,43 +0,0 @@
1
- import { Ok, Err, isResult } from "./result.js";
2
- export const Enter = Symbol("Context Enter");
3
- export const Exit = Symbol("Context Exit");
4
- export function using(context, operation, normalizeError = (e) => Err(e)) {
5
- if (typeof context === "function") {
6
- if (context.length === 1) {
7
- operation = context;
8
- context = {};
9
- }
10
- else {
11
- context = context();
12
- }
13
- }
14
- let result;
15
- try {
16
- context[Enter]();
17
- const op = operation(context);
18
- result = isResult(op) ? op : Ok(op);
19
- }
20
- catch (e) {
21
- result = normalizeError(e);
22
- }
23
- finally {
24
- context[Exit]();
25
- }
26
- return result;
27
- }
28
- export async function asyncUsing(context, operation, normalizeError = (e) => Err(e)) {
29
- context = typeof context === "function" ? await context() : context;
30
- let result;
31
- try {
32
- context[Enter]();
33
- const op = await operation(context);
34
- result = isResult(op) ? op : Ok(op);
35
- }
36
- catch (e) {
37
- result = normalizeError(e);
38
- }
39
- finally {
40
- context[Exit]();
41
- }
42
- return result;
43
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,46 +0,0 @@
1
- import { Enter, Exit, using } from "./context.js";
2
- import { Err, isErr, isOk, Ok, unwrap } from "./result.js";
3
- import { describe, it } from "./scope/describe.js";
4
- import { expect } from "./scope/expect.js";
5
- describe("Context", () => {
6
- it("performs an operation using a context", () => {
7
- const context = TestContext();
8
- const result = using(context, () => Ok(5));
9
- expect(unwrap(result)).toBe(5);
10
- expect(context.initialized).toBe(true);
11
- expect(context.completed).toBe(true);
12
- });
13
- it("reports the result of a thrown error", () => {
14
- const context = TestContext();
15
- const result = using(context, () => {
16
- throw new Error("Failed");
17
- });
18
- expect(isErr(result)).toBe(true);
19
- expect(Err(result)).toMatchObject({
20
- message: "Failed",
21
- });
22
- });
23
- it("passes the context to the operation", () => {
24
- const op = using(TestContext, ({ initialized, completed }) => ({
25
- initialized,
26
- completed,
27
- }));
28
- expect(isOk(op)).toBe(true);
29
- const { completed, initialized } = unwrap(op);
30
- expect(initialized).toBe(true);
31
- expect(completed).toBe(false);
32
- });
33
- });
34
- function TestContext() {
35
- const context = {
36
- [Enter]: () => {
37
- context.initialized = true;
38
- },
39
- [Exit]: () => {
40
- context.completed = true;
41
- },
42
- initialized: false,
43
- completed: false,
44
- };
45
- return context;
46
- }
@@ -1,2 +0,0 @@
1
- /// <reference types="node" />
2
- export declare function debounce(fn: (...args: any[]) => any, ms?: number): (...args: Parameters<typeof fn>) => NodeJS.Timeout;
@@ -1,8 +0,0 @@
1
- export function debounce(fn, ms = 32) {
2
- let timer;
3
- return (...args) => {
4
- clearTimeout(timer);
5
- timer = setTimeout(() => (clearTimeout(timer), fn(...args)), ms);
6
- return timer;
7
- };
8
- }
package/lib/esm/diff.d.ts DELETED
@@ -1,15 +0,0 @@
1
- export declare const DiffA: unique symbol;
2
- export declare const DiffB: unique symbol;
3
- export declare type DiffIndex = string | number;
4
- export declare type DiffPrimitive = string | number | boolean | null | undefined;
5
- interface DiffEntry {
6
- key: DiffIndex;
7
- left: DiffPrimitive;
8
- right: DiffPrimitive;
9
- }
10
- interface DiffList {
11
- key: DiffIndex;
12
- children: (DiffEntry | DiffList)[];
13
- }
14
- export declare function diff<T>(a: Partial<T>, b: Partial<T>): (DiffEntry | DiffList)[];
15
- export {};
package/lib/esm/diff.js DELETED
@@ -1,54 +0,0 @@
1
- import { range } from "./range.js";
2
- import { isSome, None, Some } from "./result.js";
3
- export const DiffA = Symbol("A");
4
- export const DiffB = Symbol("B");
5
- function doDiff(va, vb, k) {
6
- if (Array.isArray(va)) {
7
- // @ts-ignore
8
- return diffArray(va, vb, k);
9
- }
10
- if (typeof va === "object") {
11
- const d = diffObject(va, vb, k);
12
- if (d.children.length === 0) {
13
- return None();
14
- }
15
- else {
16
- return Some(d);
17
- }
18
- }
19
- if (Object.is(va, vb)) {
20
- return None();
21
- }
22
- else {
23
- // @ts-ignore
24
- return { key: k, left: va, right: vb };
25
- }
26
- }
27
- function diffArray(a, b, key) {
28
- const indexes = Math.max(a.length, b.length);
29
- const children = range(0, indexes)
30
- .map((i) => doDiff(a[i], b[i], i))
31
- .filter(isSome);
32
- return children.length > 0 ? { key, children } : None();
33
- }
34
- function diffObject(a, b, key = "") {
35
- const keys = new Set([...Object.keys(a), ...Object.keys(b)]);
36
- const children = [...keys]
37
- // @ts-ignore
38
- .map((k) => doDiff(a[k], b[k], k))
39
- .filter(isSome);
40
- return {
41
- key,
42
- children,
43
- };
44
- }
45
- export function diff(a, b) {
46
- if (typeof a != "object" && !Object.is(a, b)) {
47
- // @ts-ignore
48
- return [{ key: "", left: a, right: b }];
49
- }
50
- return (Array.isArray(a)
51
- ? // @ts-ignore
52
- diffArray(a, b, "") ?? { children: [] }
53
- : diffObject(a, b, "")).children;
54
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,39 +0,0 @@
1
- import { diff } from "./diff.js";
2
- import { describe, it } from "./scope/describe.js";
3
- import { expect } from "./scope/expect.js";
4
- describe("diff", () => {
5
- it("diffs primitives", () => {
6
- const diffed = diff(1, 2);
7
- expect(diffed).toEqual([{ key: "", left: 1, right: 2 }]);
8
- });
9
- it("diffs objects", () => {
10
- const diffed = diff({ a: 1, b: 2 }, { a: 2, b: 2 });
11
- expect(diffed).toEqual([{ key: "a", left: 1, right: 2 }]);
12
- });
13
- it("diffs nested objects", () => {
14
- const diffed = diff({ a: { c: 1 }, b: 2 }, { a: { c: 2 }, b: 2 });
15
- expect(diffed).toEqual([
16
- { key: "a", children: [{ key: "c", left: 1, right: 2 }] },
17
- ]);
18
- });
19
- it("diffs missing sides", () => {
20
- const diffed = diff({ a: 1 }, { b: 2 });
21
- expect(diffed).toEqual([
22
- { key: "a", left: 1, right: undefined },
23
- { key: "b", left: undefined, right: 2 },
24
- ]);
25
- });
26
- it("diffs arrays", () => {
27
- const diffed = diff([1, 2, 3], [1, 4, 3]);
28
- expect(diffed).toEqual([{ key: 1, left: 2, right: 4 }]);
29
- });
30
- it("diffs objects in an array", () => {
31
- const diffed = diff([{ a: { b: 1 } }, { a: { b: 2 } }, { a: { b: 3 } }], [{ a: { b: 1 } }, { a: { b: 4 } }, { a: { b: 3 } }]);
32
- expect(diffed).toEqual([
33
- {
34
- key: 1,
35
- children: [{ key: "a", children: [{ key: "b", left: 2, right: 4 }] }],
36
- },
37
- ]);
38
- });
39
- });
@@ -1,5 +0,0 @@
1
- export declare type Display = string | {
2
- toString(): string;
3
- };
4
- export declare const isDisplay: (a: unknown) => a is Display;
5
- export declare const display: (a: unknown | Display) => string;
@@ -1,11 +0,0 @@
1
- export const isDisplay = (a) => typeof a?.toString === "function" ||
2
- typeof a === "string";
3
- export const display = (a) => {
4
- if (isDisplay(a)) {
5
- const str = a.toString();
6
- if (str === "[object Object]")
7
- return JSON.stringify(a);
8
- return str;
9
- }
10
- return JSON.stringify(a);
11
- };
@@ -1,11 +0,0 @@
1
- import { Properties } from "../types/css.js";
2
- import { Side, Size } from "./constants.js";
3
- export declare function rounded(size?: Size, side?: Side): Properties<0 | (string & {}), string & {}>;
4
- export declare function border({ side, style, radius, width, color, }: {
5
- side?: Side;
6
- style?: "solid" | "dotted" | "dashed" | "double" | "none";
7
- radius?: Size;
8
- width?: 0 | 1 | 2 | 4 | 8;
9
- color?: string;
10
- }): {};
11
- export declare function inset(width: 0 | 1 | 2 | 4 | 8, color1?: string, color2?: string): {};
@@ -1,27 +0,0 @@
1
- import { isSide, getSize, getSide } from "./core.js";
2
- export function rounded(size = "", side = "") {
3
- if (isSide(size)) {
4
- side = size;
5
- size = "";
6
- }
7
- const sized = getSize(size);
8
- return getSide(side).reduce((prev, curr) => {
9
- if (curr === "") {
10
- prev.borderRadius = sized;
11
- }
12
- else {
13
- // @ts-ignore
14
- prev[`border${curr}Radius`] = sized;
15
- }
16
- return prev;
17
- }, {});
18
- }
19
- export function border({ side = "", style = "solid", radius = "", width = 1, color = "black", }) {
20
- return {};
21
- }
22
- export function inset(width, color1 = "gray", color2 = "lightgray") {
23
- return {
24
- ...border({ side: "tl", width, color: color1, radius: "none" }),
25
- ...border({ side: "br", width, color: color2, radius: "none" }),
26
- };
27
- }
@@ -1,31 +0,0 @@
1
- export declare const Sizes: {
2
- none: string;
3
- sm: string;
4
- "": string;
5
- md: string;
6
- lg: string;
7
- xl: string;
8
- "2xl": string;
9
- "3xl": string;
10
- full: string;
11
- };
12
- export declare const Sides: {
13
- "": string;
14
- t: string;
15
- r: string;
16
- l: string;
17
- b: string;
18
- tl: string;
19
- tr: string;
20
- bl: string;
21
- br: string;
22
- };
23
- export declare const Widths: {
24
- "1/4": string;
25
- "1/2": string;
26
- "3/4": string;
27
- full: string;
28
- };
29
- export declare type Size = keyof typeof Sizes;
30
- export declare type Side = keyof typeof Sides;
31
- export declare type Width = keyof typeof Widths;
@@ -1,28 +0,0 @@
1
- export const Sizes = {
2
- none: "0px",
3
- sm: "0.125rem",
4
- "": "0.25rem",
5
- md: "0.375rem",
6
- lg: "0.5rem",
7
- xl: "0.75rem",
8
- "2xl": "1rem",
9
- "3xl": "1.5rem",
10
- full: "9999px",
11
- };
12
- export const Sides = {
13
- "": "",
14
- t: "Top",
15
- r: "Right",
16
- l: "Left",
17
- b: "Bottom",
18
- tl: "TopLeft",
19
- tr: "TopRight",
20
- bl: "BottomLeft",
21
- br: "BottomRight",
22
- };
23
- export const Widths = {
24
- "1/4": "25%",
25
- "1/2": "50%",
26
- "3/4": "75%",
27
- full: "100%",
28
- };
@@ -1,5 +0,0 @@
1
- import { Side, Size, Sizes } from "./constants.js";
2
- export declare function isSide(v: string): v is Side;
3
- export declare function isSize(v: string): v is Size;
4
- export declare function getSize(size: keyof typeof Sizes): string;
5
- export declare function getSide(side: Side): string[];